office-gobmx/writerfilter
Attila Szűcs d656191ec3 tdf#119952 DOCX import: fix negative page margins
DOCX body text can overlap with header/footer, if top/bottom
page margin is negative. To support this, convert header/footer
text content to textbox anchored to header/footer, if needed.

Note: possible improvements:

1) Skip this hack, if the header is small enough to not overlap with
the body, calculate only the height of the header at the import time.

2) This hack does not fix the case when the top of the header
is under the top of the body. (A problem in DOC import, too.)
This could be achieved by repositioning the dummy header to the top,
and lower the textbox by the same amount. (This would still not
resolve the extreme situation, when the body start from 0 mm
(in LibreOffice, header must be at least 1 mm).

3) Import of VertOrientation::BOTTOM property seems to be bad,
or at least the footer loses this property after a DOCX round-trip,
resulting bad footer position.

4) after a round-trip, the 1 mm height of the dummy header
increases to 1 line height. Also the "Autofit height" and
"Use dynamic spacing" settings are changed, likely related
to their missing DOCX export.

Co-authored-by: Tibor Nagy (NISZ)

Change-Id: I8319c93c6c5a980878ee9956c8ab2953da60409e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117842
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
2021-07-02 15:08:24 +02:00
..
documentation
inc [API CHANGE] drop ShapeContextHandler service and interface 2021-06-28 14:30:53 +02:00
qa tdf#142304 a.o. Improve wrap margins in docx filters 2021-06-28 09:49:00 +02:00
source tdf#119952 DOCX import: fix negative page margins 2021-07-02 15:08:24 +02:00
util
CppunitTest_writerfilter_dmapper.mk
CppunitTest_writerfilter_filters_test.mk
CppunitTest_writerfilter_misc.mk
CppunitTest_writerfilter_rtftok.mk
CustomTarget_source.mk
IwyuFilter_writerfilter.yaml
Library_writerfilter.mk
Makefile
Module_writerfilter.mk
README.md

Import Filters for LibreOffice Writer

The writerfilter module contains import filters for Writer, using its UNO API.

Import filter for DOCX and RTF.

  • Module contents

    • documentation: RNG schema for the OOXML tokenizer, etc.
    • inc: module-global headers (can be included by any files under source)
    • qa: cppunit tests
    • source: the filters themselves
    • util: UNO passive registration config
  • Source contents

    • dmapper: the domain mapper, hiding UNO from the tokenizers, used by DOCX and RTF import
      • The incoming traffic of dmapper can be dumped into an XML file in /tmp in dbgutil builds, start soffice with the SW_DEBUG_WRITERFILTER=1 environment variable if you want that.
    • filter: the UNO filter service implementations, invoked by UNO and calling the dmapper + one of the tokenizers
    • ooxml: the docx tokenizer
    • rtftok: the rtf tokenizer