tdf#149547 fix "tdf#75297 sw uno: override default num char style"
[LibreOffice.git] / lotuswordpro / README.md
blob5642c6de157d1047ff9f232da5a82a0cb332a119
1 # Import Filter for File Format of Lotus Word Pro (lwp)
3 ## Description
5 > :warning: **Import Filter supports only Lotus Word Pro 97 and next versions**
7 The import is not direct, but via an intermediate format: [StarOffice XML](http://xml.openoffice.org/xml_specification_draft.pdf),
8 the predecessor of ODF (yes, the code is old). The entry point to
9 the filter is class `LotusWordProImportFilter` (refer to Source code
10 section), but that just hooks up the necessary machinery for processing
11 StarOffice XML produced by the filter. The real fun starts in function
12 `ReadWordproFile()` (`source/filter/lwpfilter.cxx`); this function
13 initializes the parser (class `Lwp9Reader`) and the [SAX XML](https://en.wikipedia.org/wiki/Simple_API_for_XML) handler that
14 produces the output (class `XFSaxStream`). The `Lwp9Reader` class then does
15 the actual parsing.
17 If the module is built with debug level greater than `0`, it is possible
18 to examine the intermediate XML: set [environment variable](https://en.wikipedia.org/wiki/Environment_variable)
19 `DBG_LWPIMPORT_DIR=` to an existing directory. During opening an `.lwp`
20 document, a file named `lwpimport.xml` will be created in `DBG_LWPIMPORT_DIR` directory.
22 ## Source Code
24 ### Module Contents
25 * `inc`: module-global headers (can be included by any file in source)
26 * `qa`: `cppunit` tests
27 * `source`: the filter itself
28 * `util`: UNO passive registration config
30 ### Source Contents
31 * `filter`: `lwp` document format parser
32 * `filter/LotusWordProImportFilter.cxx`: the entry point to the filter
33 * `filter/xfilter`: export to StarOffice XML