Difference between revisions of "WriterFilter"

From Apache OpenOffice Wiki
Jump to: navigation, search
m (Download install sets for current milestone)
(xmlfilter02 move + category)
Line 16: Line 16:
 
=== Prerequisites ===
 
=== Prerequisites ===
  
The current [[CWS]] for WriterFilter is <code>writerfilter2</code>. Have a look in [[EIS]] for details on the CWS.
+
The current [[CWS]] for WriterFilter is <code>xmlfilter02</code>. It previously was in <code>wrinterfilter2</code>. Have a look in [[EIS]] for details on the CWS.
  
 
You will need an installed StarOffice/OOo and the following projects:
 
You will need an installed StarOffice/OOo and the following projects:
Line 55: Line 55:
 
=== Create Resource Database for New Intefaces ===
 
=== Create Resource Database for New Intefaces ===
  
Note: This is only necessary if you do not use CWS writerfilter2.
+
Note: This is only necessary if you do not use CWS xmlfilter02.
  
 
Generate resource database for new interfaces: In <code>offapi/<platform>/ucr/com/sun/star/text</code> call
 
Generate resource database for new interfaces: In <code>offapi/<platform>/ucr/com/sun/star/text</code> call
Line 62: Line 62:
 
=== Register New Interfaces ===
 
=== Register New Interfaces ===
  
Note: Again, only necessary if not using the CWS writerfilter2.
+
Note: Again, only necessary if not using the CWS xmlfilter02
  
 
In <code><SOINST>/program</code> call
 
In <code><SOINST>/program</code> call
Line 103: Line 103:
 
The properties of sprm 0x6a03 (sprmCPicLocation) have to be resolved. Otherwise the FC of the picture to come is not stored.
 
The properties of sprm 0x6a03 (sprmCPicLocation) have to be resolved. Otherwise the FC of the picture to come is not stored.
  
[[Category: Filter]]
+
[[Category:Filter]]
 +
[[Category:Office Open XML]]

Revision as of 16:41, 26 October 2007

Download Install Sets for Current Milestone

We provide downloads for the current milestone (Solaris SPARC, Linux and Windows) here:

http://ooo.services.openoffice.org/pub/OpenOffice.org/cws/upload/writerfilter2/

Getting Current Source Code for WriterFilter

WriterFilter is currently not included in the build system. You have to check it out manually:

cvs -d:pserver:anoncvs@anoncvs.services.openoffice.org:/cvs co sw/writerfilter 

Installing WriterFilter

Prerequisites

The current CWS for WriterFilter is xmlfilter02. It previously was in wrinterfilter2. Have a look in EIS for details on the CWS.

You will need an installed StarOffice/OOo and the following projects:

  • comphelper
  • filter
  • jurt
  • offapi
  • offuh
  • scp2
  • svtools
  • svx
  • sw

Compile these projects and deliver the libraries to your installation in <SOINST>.

Changing Filter Detection

In <SOINST>/share/registry/modules/org/openoffice/TypeDetection/Filter/fcfg_writer_filters.xcu add node with attribute oor:name="MS Word 97":

   <node oor:name="MS Word 97" oor:op="replace">
        <prop oor:name="Flags"><value>IMPORT EXPORT ALIEN 3RDPARTYFILTER</value></prop>
        <prop oor:name="UIComponent"/>
        <prop oor:name="FilterService"><value>com.sun.star.comp.Writer.WriterFilter</value></prop>
        <prop oor:name="UserData"><value>CWW8</value></prop>
        <prop oor:name="UIName">
            <value xml:lang="x-default">Microsoft Word 97/2000/XP (new)</value>
        </prop>
        <prop oor:name="FileFormatVersion"><value>0</value></prop>
        <prop oor:name="Type"><value>writer_MS_Word_97</value></prop>
        <prop oor:name="TemplateName"/>
        <prop oor:name="DocumentService"><value>com.sun.star.text.TextDocument</value></prop>
    </node>

Remember to grant yourself write access to the xcu.

Create Resource Database for New Intefaces

Note: This is only necessary if you do not use CWS xmlfilter02.

Generate resource database for new interfaces: In offapi/<platform>/ucr/com/sun/star/text call

regmerge /tmp/merge.rdb -UCR XTextAppend.urd

Register New Interfaces

Note: Again, only necessary if not using the CWS xmlfilter02

In <SOINST>/program call

./unopkg add /tmp/merge.rdb

Register filter component

In <SOINST>/program call

chmod u+w services.rdb
regcomp -register -r services.rdb -c <writerfilter lib>

Now, if you load a file recognized as "Word 97", WriterFilter will be used.

Documentation

  • Documentation generated by Doxygen (will be available soon)

Debug tokenizers

You will need an installation of OpenOffice.org with the libraries from writerfilter delivered into the $SOINST/program directory.

Dump WW8 tokens

$SOINST/program/uno -l libwriterfilter.uno.so -c debugservices.doctok.ScannerTestService -- file://...

Dump OOXML tokens

$SOINST/program/uno -l libwriterfilter.uno.so -c debugservices.ooxml.ScannerTestService -- file://...

Notes

The properties of sprm 0x6a03 (sprmCPicLocation) have to be resolved. Otherwise the FC of the picture to come is not stored.

Personal tools