Download presentation
Presentation is loading. Please wait.
1
Writing Import Filters for LibreOffice
Fridrich Štrba, David Tardon (virtually) LibreOffice Productivity Suite
2
LibreOffice Productivity Suite
Agenda Introduction to import filters Use of XSLT filter Example: Integration of a librevenge-based filter Example: setting up a new librevenge-based filter library LibreOffice Productivity Suite
3
Introduction to import filters
You may add additional text here ... LibreOffice Productivity Suite
4
Why to write import filters?
In an ideal world, everyone would just use ODF. However, we are not living in an ideal world. Proprietary document formats Legacy document formats We want to be nice and play along, even if others do not.
5
What options for writing import filters are there?
XSLT filters “full-blown” filters Use one of the existing frameworks Librevenge Orcus (liborcus) Produce ODF (or Flat ODF) as intermediate format Directly use UNO Use internal LibreOffice structures Deprecated XMerge framework (only java)
6
XSLT filters Easiest to integrate Only for pure XML formats
XSLT is not a good choice for anyting complex Only XSLT 1.0 is supported out-of-the box
7
Use one of the existing frameworks
Librevenge (Document Liberation Project) Supports text, presentations, vector graphics and spreadsheets Uses ODF as itermediate format (libodfgen) A dozen of existing import libraries, supporting many formats: WordPerfect, MS Publisher, Visio and Works, CorelDRAW, Adobe PageMaker etc. Orcus (Kohei et al.) Supports spreadsheets Internally supports ODF, OpenXML, Gnumeric, CSV
8
Use one of the existing frameworks
Easier to use than UNO Potentially unsupported features In our opinion the best choice for less important formats
9
Produce ODF as an intermediate format
Slower, but there is no need to know any framework (or UNO) Existing filters: Lotus Word Pro (lotuswordpro) Hangul Writer (hwpfilter) It is probably easier to use librevenge instead
10
Directly use UNO Existing filters: OpenXML RTF ...
Filters can be extensions openoffice.org-diafilter (Caolán)
11
Use internal LibreOffice structures
Fastest, but a high potential to break things :-) Legacy filters (ww1, ww8, etc.) Hopefully nobody is considering doing that for a new filter :-) 'Nuff said LibreOffice Productivity Suite
12
Deprecated Xmerge framework
Java only We removed all existing filters in 4.0 External filters could still exist (no idea about that)
13
You may add additional text here ...
Use of XSLT filter You may add additional text here ... LibreOffice Productivity Suite
14
Integration of a librevenge-based filter
You may add additional text here ... LibreOffice Productivity Suite
15
Filter configuration This is generic—the same configuration is needed for all non- XSLT filters
16
Filter description <node oor:name="Publisher Document" oor:op="replace"> <prop oor:name="Flags"> <value>IMPORT ALIEN USESOPTIONS 3RDPARTYFILTER PREFERRED</value> </prop> <prop oor:name="FilterService"> <value>com.sun.star.comp.Draw.MSPUBImportFilter</value> <prop oor:name="UIName"> <value xml:lang="x-default">Microsoft Publisher </value> <prop oor:name="FileFormatVersion"> <value>0</value> <prop oor:name="Type"> <value>draw_Publisher_Document</value> <prop oor:name="DocumentService"> <value>com.sun.star.drawing.DrawingDocument</value> </node>
17
Setting up a new librevenge-based filter library
You may add additional text here ... LibreOffice Productivity Suite
18
LibreOffice Productivity Suite
Sources overview.html libraries-with-librevenge-part-i-getting-started/ LibreOffice Productivity Suite
19
LibreOffice Productivity Suite
Pre-defined Shapes Here are some pre-defined shapes for your convenience: copy the shapes, copy their formatting, or use the LibO styles. Green Dark Green Bright You may add your code examples, XML statements, or debug output here ;-) Blue Dark Blue Bright Orange Dark Orange Bright Purple Dark Purple Bright Yellow Dark Yellow Bright LibreOffice Productivity Suite
20
LibreOffice Productivity Suite
Thank you … … for not falling asleep! … for supporting LibreOffice! LibreOffice Productivity Suite
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.