really tenacious guy

One-line Footer in OpenOffice.org Writer

Update: Ted has provided a great hint about the “normal” way to remove the last paragraph:

There’s an easier way to do this, as documented here.
Go to the end, ie place the text cursor after the last character, of the last cell of the table and press CTRL-SHIFT-DELETE. Presumably this trick works under all operating systems and not just Ubuntu Linux.

Thanks, Ted!

Old content below:
Yesterday I faced the need to create a table in OpenOffice.org footer. It turned out that it is virtually impossible to make the table occupy the whole footer height:

The system did not want to let me delete the last paragraph, it remained there no matter how hard I tried.
So I decomposed the odt file, found that empty paragraph, removed it and zipped the file again:

BIG WARNING: Create a backup of your original file first!


  1. unzip document.odt:

    rtg$ unzip document.odt
    Archive: document.odt
    extracting: mimetype
    creating: Configurations2/statusbar/
    inflating: Configurations2/accelerator/current.xml
    creating: Configurations2/floater/
    creating: Configurations2/popupmenu/
    creating: Configurations2/progressbar/
    creating: Configurations2/menubar/
    creating: Configurations2/toolbar/
    creating: Configurations2/images/Bitmaps/
    inflating: content.xml
    inflating: styles.xml
    inflating: meta.xml
    inflating: Thumbnails/thumbnail.png
    inflating: settings.xml
    inflating: META-INF/manifest.xml


  2. Edit styles.xml that holds information about all the styles used. Footer in our case is defined there (Header is defined there as well). Find the empty paragraph and remove it:

    <style:footer>
    ...
    <table:table-cell table:style-name="Table1.B2" office:value-type="string">
    <text:p text:style-name="Table_20_Contents"/>
    </table:table-cell>
    </table:table-row>
    </table:table>
    <text:p text:style-name="Footer"/>
    </style:footer>
    ...

    Remove that empty text:p node.

  3. Zip the document:

    rtg$ zip -r document.odt ./
    adding: settings.xml (deflated 84%)
    adding: content.xml (deflated 75%)
    adding: mimetype (stored 0%)
    adding: styles.xml (deflated 82%)
    adding: meta.xml (deflated 59%)
    adding: Thumbnails/ (stored 0%)
    adding: Thumbnails/thumbnail.png (deflated 74%)
    adding: META-INF/ (stored 0%)
    adding: META-INF/manifest.xml (deflated 83%)
    adding: Configurations2/ (stored 0%)
    adding: Configurations2/progressbar/ (stored 0%)
    adding: Configurations2/images/ (stored 0%)
    adding: Configurations2/images/Bitmaps/ (stored 0%)
    adding: Configurations2/floater/ (stored 0%)
    adding: Configurations2/toolbar/ (stored 0%)
    adding: Configurations2/popupmenu/ (stored 0%)
    adding: Configurations2/statusbar/ (stored 0%)
    adding: Configurations2/accelerator/ (stored 0%)
    adding: Configurations2/accelerator/current.xml (stored 0%)
    adding: Configurations2/menubar/ (stored 0%)


  4. Open the document in OpenOffice.org


Comments