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

QTextOdfWriter checks wrong TopMargin when writing a FrameFormat

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P3: Somewhat important
    • 4.8.4
    • 4.7.4
    • GUI: Text handling
    • None

    Description

      When QTextOdWriter is wrting a FrameFormat it uses the following code -
      if (format.hasProperty(QTextFormat::BlockTopMargin))
      writer.writeAttribute(foNS, QString::fromLatin1("margin-top"), pixelToPoint(qMax(qreal(0.), format.topMargin())) );
      if (format.hasProperty(QTextFormat::BlockBottomMargin))
      writer.writeAttribute(foNS, QString::fromLatin1("margin-bottom"), pixelToPoint(qMax(qreal(0.), format.bottomMargin())) );
      if (format.hasProperty(QTextFormat::BlockLeftMargin))
      writer.writeAttribute(foNS, QString::fromLatin1("margin-left"), pixelToPoint(qMax(qreal(0.), format.leftMargin())) );
      if (format.hasProperty(QTextFormat::BlockRightMargin))
      writer.writeAttribute(foNS, QString::fromLatin1("margin-right"), pixelToPoint(qMax(qreal(0.), format.rightMargin())) );

      It is checking BlockTopMargin etc. and it should be checking FrameTopMargin etc.

      Attachments

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

        Activity

          People

            andysh Andy Shaw
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes