view · edit · sidebar · attach · print · history


<< | Index | >>


  • Added external link to Epha 3D into interaction basket.
  • Updated to allow comany user editing of their owned fachinfo.



Added interaction basket link


Update fachinfo edit form for company user

in src/state/drugs/fachinfo.rb

  class RootFachinfo < Fachinfo
  def _has_editor_privilege?
    user = @session.user
    ].each do |priv|
      return true if user.allowed?('login', priv)
    return false

in src/view/drugs/fachinfo.rb

class RootFachinfoComposite < View::Drugs::FachinfoComposite
  def chapter_view(chapter)
  .  ..

I enabled Comany User to edit fachinfo (their owned fachinfo only).


Update word parser for images

Add img tag handling for doc.


rwv2 gem have arleady picture handling.
It is called from cpp parser.

module Rwv2
  class TextHandler
    def section_start(section_properties); end 
    def section_end; end 
    def page_break; end 
    def paragraph_start(paragraph_properties); end 
    def paragraph_end; end 
    def run_of_text(text, character_properties); end 
    def picture(pict); end 

But picture method are not called, expectedly.

wv2 -- pictureData handlir in TextHandler

I tried wv2-patch for picture data in rwv2 project.
I patched this patch against wv2-0.4.2
This patch are created against wv2-0.2.3.
It seems that patch is fine without word97_helper.cpp.

$ cmake
$ make
Scanning dependencies of target wv2
[  2%] Building CXX object src/CMakeFiles/wv2.dir/olestorage.cpp.o
In file included from /home/yasuhiro/Downloads/wv2-0.4.2/src/olestream.h:26:0,
                 from /home/yasuhiro/Downloads/wv2-0.4.2/src/olestorage.cpp:20:
/usr/include/glib-2.0/glib/giochannel.h:28:2: error: #error "Only <glib.h> can be included directly."
make[2]: *** [src/CMakeFiles/wv2.dir/olestorage.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/wv2.dir/all] Error 2
make: *** [all] Error 2
~/Downloads/wv2-0.4.2 591 $

Fixed this problem another patch from Ports project.
But I could not compile.

[ 30%] Building CXX object src/CMakeFiles/wv2.dir/parser9x.cpp.o
/home/yasuhiro/Downloads/wv2-0.4.2/src/parser9x.cpp: In member function ‘void wvWare::Parser9x::processSpecialCharacter(wvWare::UChar, wvWare::U32, wvWare::SharedPtr<const wvWare::Word97::CHP>)’:
/home/yasuhiro/Downloads/wv2-0.4.2/src/parser9x.cpp:758:14: error: ‘Drawing’ is not a member of ‘wvWare::TextHandler’
make[2]: *** [src/CMakeFiles/wv2.dir/parser9x.cpp.o] Error 1
make[1]: *** [src/CMakeFiles/wv2.dir/all] Error 2
make: *** [all] Error 2

commented out this line.

 // It has to be one of the very special characters...
        //case TextHandler::Drawing:
        case TextHandler::Picture:

I could complie wv2.
I compiled also extension for rwv2 gem with this wv2.

But result was same :(
parser ignored all images.

wv2 -- PictureHandler

wv2-0.4.2 has PictureHandler.

I tried to parser image with this PictureHandler.
But parser got SEGV error.

-- C level backtrace information -------------------------------------------
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ [0x7ff34095b1e8] vm_dump.c:796
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ [0x7ff34083d741] error.c:258
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ [0x7ff34083e527] error.c:277
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ [0x7ff3408efd4f] signal.c:609
/lib64/ [0x7ff3405d0b90]
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ruby/site_ruby/1.9.1/x86_64-linux/ [0x7ff3379f2905] /usr/local/include/wv2/sharedptr.h:112
/usr/lib64/ [0x7ff3377be72c] hash.c:2600
/usr/lib64/ [0x7ff3377c067a] hash.c:221
/usr/lib64/ [0x7ff3377beaf8] hash.c:2044
/usr/lib64/ [0x7ff3377bf7d5] hash.c:243
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ruby/site_ruby/1.9.1/x86_64-linux/ [0x7ff3379f2eab] rwv2_parser.cpp:39
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ [0x7ff340954991] vm_insnhelper.c:404
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ [0x7ff34094a709] insns.def:1015
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ [0x7ff340950b9a] vm.c:1220
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ [0x7ff3409552af] vm.c:624
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ [0x7ff3408444fb] eval.c:647
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ [0x7ff34094661e] vm_eval.c:846
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ [0x7ff340954991] vm_insnhelper.c:404
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ [0x7ff34094a709] insns.def:1015
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ [0x7ff340950b9a] vm.c:1220
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ [0x7ff340951b61] vm.c:670
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ [0x7ff340960f2e] thread.c:453
/home/yasuhiro/.rbenv/versions/1.9.3-p194/lib/ [0x7ff340961089] thread_pthread.c:653
/lib64/ [0x7ff3405c8e6c] rwv2_properties.cpp:87
/lib64/ [0x7ff33fa46b1d] process.c:1600

"string contains null byte"

re-compile wv2 with patch.

$ cd wv2-0.4.2/src
$ patch < /path/to/ports-patch.patch
patching file olestream.h
$ cd ../
$ cmake .
$ make
$ sudo make install
view · edit · sidebar · attach · print · history
Page last modified on July 05, 2012, at 01:34 PM