Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-67622

QTextDocumentWriter misses information when writing OpenDocument Format

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 5.13.0 Alpha 1
    • 5.10.1
    • GUI: Text handling
    • Qt 5.10.1 MSVC2015 64bit

      Windows 7 Professional 64bit Service Pack 1, Intel Core i5-6500 3.20GHz, 8GB memory

      Microsoft Visual C++ Compiler 14.0 (amd64)

      x64 CDB debugger
    • dbffff0116f9618902cf4e9615a0ca6a7a6db9ed (qt/qtbase/dev)

    Description

      When I create a QTextDocument and insert a table, important information is set through a QTextTableFormat instance. That information gets lost when QTextDocument exports an ODT file, while being preserved in HTML and PDF files.

      In particular table borders and cells padding (and maybe other details) are not set in the contents.xml file that constitutes the core of an .odt file. Therefore opening this file with an editor (I used Microsoft Word, Apache OpenOffice and LibreOffice) results in tables rendered with the default settings of that particular editor.

      I am attaching some minimal code that produces three files - HTML, ODT and PDF - starting from the same QTextDocument object.

      Attachments

        1. sample.cpp
          1 kB
        2. test_table_format.html
          1 kB
        3. test_table_format.odt
          1 kB
        4. test_table_format.pdf
          4 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              allan.jensen Allan Sandfeld Jensen
              orraf Raffaele Orsato
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes