[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/source

Michael Stahl (via logerrit) logerrit at kemper.freedesktop.org
Tue Jul 14 14:51:18 UTC 2020


 sw/source/filter/ww8/docxattributeoutput.cxx |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 6715ba7af16b7ada2ee031f98f442c48c948a907
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Fri Jul 10 19:29:27 2020 +0200
Commit:     Xisco Fauli <xiscofauli at libreoffice.org>
CommitDate: Tue Jul 14 16:50:32 2020 +0200

    tdf#134618 sw: DOCX export: fix order of as-char and at-char fly...
    
    ...at same position.
    
    The problem is that in this case the as-char fly was written before the
    at-char fly but the positioning of the at-char fly can be relative to
    its character position, i.e. before the as-char fly.
    
    Apparently as-char flys are written in
    DocxAttributeOutput::EndRunProperties() via WritePostponedDMLDrawing(),
    wheras at-char flys are written earlier, in SwWW8AttrIter::OutFlys() via
    DocxAttributeOutput::OutputFlyFrame_Impl().
    
    So this undoes the swap that these undergo via the magic of the mark
    stack.
    
    Change-Id: I83a72bb2affbf321fc4dea4e7fb37bdb43cea2e7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98543
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit 7b156d37cfc92292323694ec064fe51ae57b3257)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98632
    Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 4a694015b098..8a3791a9d898 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2681,6 +2681,10 @@ void DocxAttributeOutput::EndRunProperties( const SwRedlineData* pRedlineData )
     // write footnotes/endnotes if we have any
     FootnoteEndnoteReference();
 
+    // merge the properties _before_ the run text (strictly speaking, just
+    // after the start of the run)
+    m_pSerializer->mergeTopMarks(Tag_StartRunProperties, sax_fastparser::MergeMarks::PREPEND);
+
     WritePostponedGraphic();
 
     WritePostponedDiagram();
@@ -2693,10 +2697,6 @@ void DocxAttributeOutput::EndRunProperties( const SwRedlineData* pRedlineData )
     WritePostponedOLE();
 
     WritePostponedActiveXControl(true);
-
-    // merge the properties _before_ the run text (strictly speaking, just
-    // after the start of the run)
-    m_pSerializer->mergeTopMarks(Tag_StartRunProperties, sax_fastparser::MergeMarks::PREPEND);
 }
 
 void DocxAttributeOutput::GetSdtEndBefore(const SdrObject* pSdrObj)
@@ -5855,7 +5855,7 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const ww8::Frame &rFrame, const P
             break;
     }
 
-    m_pSerializer->mergeTopMarks(Tag_OutputFlyFrame, sax_fastparser::MergeMarks::POSTPONE);
+    m_pSerializer->mergeTopMarks(Tag_OutputFlyFrame);
 }
 
 void DocxAttributeOutput::WriteOutliner(const OutlinerParaObject& rParaObj)


More information about the Libreoffice-commits mailing list