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

Missing formatting in Odt - example

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 5.9.6
    • None
    • OpenSuse Leap 15.0
      Qt 5.9.6. von Qt-Hompage
    • All

    Description

      Der QDocumentwriter übernimmet für Odt-Files keine Formatangaben oder positionsangaben.

      Zue Testzwecke habe ich das Beispiel  Orderform so abgeändert, dass der Ausdruck in ein Odt-File  bzw. Html-File erfolgt.

      Code-Anfang:

      //editor->print(&printer);
      QTextDocument *docu = new QTextDocument;
      docu = editor->document();

      QTextDocumentWriter *writer = new QTextDocumentWriter;
      writer->setFormat("odt");
      writer->setFileName("/home/horst/ausgabe_test.odt");
      writer->write(docu);

       

      Code-Ende

       

      Das Html-file ist o.k.

      Das  odt-file verliert Position des Frames  verfälscht  den Schriftstil (2. Hälte ist nicht bold).

      Versuche mit eigenen Dateien sind noch schlechter.

      Fehler existiert anscheinend schon seit 2013 - siehe -QTBUG-29555- -

       

      Sorry for poor english:

      The QDocumentwriter does not accept format specifications or position information for Odt-Files.

      For the purpose of testing, I modified the example Orderform so that the printout takes place in an odt file or html file.

       

      //editor->print(&printer);
      QTextDocument *docu = new QTextDocument;
      docu = editor->document();
      
      QTextDocumentWriter *writer = new QTextDocumentWriter;
      writer->setFormat("odt");
      writer->setFileName("/home/horst/ausgabe_test.odt");
      writer->write(docu);

       

      The html file is o.k

      The odt-file loses position of the frame falsifies the font style (2nd half is not bold).

      Trying with your own files are even worse.

       

      Error seems to exist since 2013 - see QTBUG-29555 -

       

      Attachments

        1. ausgabe_test_eigen.odt
          1 kB
        2. ausgabe_test_eigen.html
          1 kB
        3. ausgabe_test.odt
          1 kB
        4. ausgabe_test.html
          6 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            esabraha Eskil Abrahamsen Blomfeldt
            sfbeetle Horst Käferstein
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes