summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2022-01-13 14:14:44 +0100
committerThorsten Behrens <thorsten.behrens@allotropia.de>2022-01-15 11:29:00 +0100
commiteb88b41c15f6451e06b34e2ec0ef5ec4359c200c (patch)
treedec7fd3ba132b9d78ae50aeea6a9ce134f56eae7
parent9862ce925429e5a2f7f75f654f798f55b33e8bcf (diff)
tdf#143039 tdf#143106 sw: DOCX export: don't export duplicate flys
The problem is that at the end of the paragraph a second call to OutFlys() is made in line 2730 and that causes the duplication; for this call the value FLY_POSTPONED must be returned, not FLY_NONE. (regression from 3eced2d52415abeac266804ab682bee022322a19) Also revert commit deb892628a1501527c8c41b85a65282df95b81b1 because its test fails now as 0 comments are exported; it was apparently another problem introduced by the above commit, and apparently this fix helps for duplication of comments too. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128386 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit f261fae4af72b1328bc3e93fc52a9a24ce0975b3) Restore tdf#134951 docxexport: stop duplicating stuff in postponed text Partially revert commit f261fae4af72b1328bc3e93fc52a9a24ce0975b3 to restore deb892628a1501527c8c41b85a65282df95b81b1 because as reported by jluth the test case testfdo79008 that failed was apparently somewhat misleading and the test case testTdf134951_duplicates that should test comments erroneously failed to fail because it is doing a loadAndSave() instead of a loadAndReload(). Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128410 Tested-by: Michael Stahl <michael.stahl@allotropia.de> Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 4c4fb36222f6c624cfdea82ce266bf9d99073558) Change-Id: Ib9706e4c24db38c15a0170ba2e8f08fba5327f98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128341 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport5.cxx3
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx3
2 files changed, 5 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
index 00b58a149ef4..17fe49c8f8aa 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx
@@ -136,9 +136,12 @@ CPPUNIT_TEST_FIXTURE(Test, testfdo79008)
*/
parseExport("word/document.xml");
+#if 0
+ // TODO: jluth says this test case needs more work
// tdf#134951: there is only one comment
xmlDocUniquePtr pXmlSettings = parseExport("word/comments.xml");
assertXPath(pXmlSettings, "/w:comments/w:comment", 1);
+#endif
// Read-only is set, but it is not enforced, so it should be off...
SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument *>(mxComponent.get());
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 4f3ca7f94305..6081ab30af1d 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -717,7 +717,8 @@ FlyProcessingState SwWW8AttrIter::OutFlys(sal_Int32 nSwPos)
if (maFlyIter == maFlyFrames.end())
{
- return FLY_NONE;
+ // tdf#143039 postponed prevents fly duplication at end of paragraph
+ return m_rExport.AttrOutput().IsFlyProcessingPostponed() ? FLY_POSTPONED : FLY_NONE;
}
/*