about writing import filters What interfaces are available for filter developers The nice and cool way to write an import filter without actually having to understand LibreOffice
is the future of the humanity Nevertheless, humanity does not know about it as of now Other de facto standards Some people use other Office Suites :( Hard-disks full of teenage poetry in funny formats LibreOffice offers the freedom to read that crap
program for LibreOffice without having to understand its internals Pretty stand-alone functionality communicating with LibreOffice over well defined interfaces … … almost Happy users will reward you You will be the hero of the people who can now read their documents... … and they will get on your nerves listing features that are not converted.
to write an import filter from other xml format Possibility to add using user interface … … and export as an extension Used services com.sun.star.comp.Writer.XMLOasisImporter XSLT filter that pushes to LibreOffice flat ODT com.sun.star.comp.Calc.XMLOasisExporter XSLT filter that receives from LibreOffice flat ODS Reasonably fast in LibreOffice Someone rewrote it from Java to C++
com::sun::star::beans::PropertyValue Basically XML-ish structure with property names and their values com::sun::star::io::XOutputStream OutputStream A stream to receive the document data (for export filters) com::sun::star::io::XInputStream InputStream Content of document string URL URL of the document Create the stream if it does not exist Not necessary now because the XOutputStream or XinputStream are guaranteed
sequence< ::com::sun::star::beans::PropertyValue > Descriptor) Returns any valid type name (which specifies the detected format) or an empty value for unknown formats. Adds the information into the Descriptor
framework Originally just a module for WordPerfect importer Microsoft Works importer Need to make a bit more generic Initial rewrite / adaptation WordPerfect Graphics import The same framework for graphic files Visio Import filter Multipage graphic documents
trivial Settings, Styles, Automatic styles, Content Provide a linear interface Reuse instead of copy the existing ODF generators Developer does not waste time designing interface Speeds up development by focusing on the essentials
of libwpg::WPGPaintInterface OdtGenerator.cxx Implementation of WPXDocumentInterface OdfDocumentHandler.hxx Abstract SAX interface to receive ODF document
LOC (apart from the real import logic) Existing stream implementation Existing ODF Generator Read document and determine whether it is supported Read document and call callbacks of the interface