[Home] [Download] [Previous] [Next]
This filter was written mainly because OpenOffice.org, unlike MS Word, doesn't provide a possibility to save documents into plain text files with line breaks. However, OfficeFMT not only breaks long lines on a certain amount of characters, but also tries to preserve text layout as far as it is possible in plain text files. In particular the following types of layout are supported:
all types of paragraph justification. Additional spaces are added either at the middle of the line (for justified lines) or at the beginning of the line in order to make it look right aligned or centered;
paragraph indents and margins. These are represented with additional spaces and blank lines according to the user-defined character width to inch and line height to point ratios (see below);
hyphenation. Hyphenation may be applyed to some (or all) paragraphs of the output text file, if you have enabled automatical hyphenation for those paragraphs in your sxw document, and the corresponding hyphenation dictionary is available to OpenOffice.org;
character level formatting. OfficeFMT can reproduce 2 types of character level formatting, namely font weight and font slant. Fragments of text formatted in bold and italic may be enclosed between user-defined characters (see below) and marked by this way. Note that paragraph level text attributes are not supported;
tables and text frames. Tables and text frames are converted to pseudo-graphic boxes. Note that this conversion may produce some othersized table rows if your table cells are too narrow for the text they contain. If your encoding doesn't support box drawing characters, standard substitutions are applied, e. g. '|' for vertical line, '-' for horizontal line, and so on.
In general, the resulting file should be very similar to the output of some old good MS DOS word processors.
Of course I understand plain text with this type of layout is rarely used in contemporary word processing, but it may be very convenient for storing long documents which you are not planning to modify. For example, this filter may be used for formatting MS Word documents taken from some online libraries (I hate reading books in MS Word format).
In order to save your document as a plain text with layout, select the "File -> Export..." menu item in OpenOffice.org (note that, since this filter is for exporting files only, it is not available in the "File -> Save As..." dialog). In the "Export" dialog box select "OfficeFMT - Text with Layout (.txt)", specify the desired output file name and click "Export". After that a filter options dialog box will appear where you can specify the following parameters:

The Text with Layout output filter options dialog
Character set. That's clear: here you can specify the desired encoding for the resulting document. Note that the list of encodings available here is different from one shown in some OpenOffice.org built-in dialogs, since OfficeFMT takes it from Java, rather than from OOo itself.
Line break. Here you can choose one of 3 line break styles commonly used in plain text files, i. e. DOS CRLF, UNIX LF or MAC CR.
Text width. Specifies the number of characters to which lines in the resulting document should fit.
Tab width. Unfortunately OfficeFMT currently can't recognize tab positions in paragraphs, so it just converts each tab character to the number of spaces you can specify here. This value is also used for generating indents if it is impossible to determine their exact size, for example, while formatting paragraphs for which "automatic" first line indent is enabled.
Character width corresponds to... This is a character width to inch ratio, used for calculating horisontal indents (of course the only way to reproduce indents in a plain text document is converting them to space characters). By default 1 character is assumed to be 0.1in width, so that e.g. a paragraph indent equal to 0.5in will be converted to 5 spaces.
Line hight correspond to... This is a line height to point ratio, used for calculating vertical spaces (note that it is more convenient to represent vertical spaces in points rather than in inches). By default 1 line is assumed to be 14pt hight. This means that any additional space above or below a paragraph which has at least 7pt in height will be (due to the rules of number rounding) converted to an additional blank line in the output. You may decrease this value (e.g. to 12pt) if e.g. in your document all paragraphs of the body text have a 6pt spacing below and you want them to be separeted with blank lines in the resulting document.
Enclose with the following characters... This group of options allows to specify arbitrary opening and closing markers for some elements of text layout. By this way you can mark characters which were formatted in bold or italic in the initial OpenOffice.org documents or footnote/endnote markers. Note that footnotes and endnotes itself are collected either at the end of text, or at the and of section, depending from options you have set for each section in your OpenOffice.org document.