tdf#148565 sw ms export: a new run can't be postponed-started
This fixes a LO 7.4 regression from
commit 46b62f7777c6acdc2c94dc4b2ab79d38a10c49f9.
A make check with an assert indicated the following
existing unit tests matched - but they had no noticable
char run content to test against.
ooxmlexport6's testShapeThemePreservation
ooxmlexport7's testBnc884615
ooxmlexport9's testTdf90789
ooxmlexport10's testTdf90153
ooxmlexport11's testTdf137655
ooxmlexport14's testTdf131539
ooxmlexport15's testTdf138739
ooxmlexport17's testTdf126287
Change-Id: Iae89ff1f6de06bfe37b886e1e39e8457157ae240
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133187
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
index 1a9bddb..d5cc153 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport15.cxx
@@ -9,6 +9,7 @@
#include <swmodeltestbase.hxx>
#include <com/sun/star/awt/FontWeight.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
@@ -268,6 +269,9 @@ DECLARE_OOXMLEXPORT_TEST(testTdf138739, "tdf138739.docx")
uno::Reference<beans::XPropertySet> xParaProps(getParagraph(1), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Font type name does not match!", OUString("Comic Sans MS"),
xParaProps->getPropertyValue("CharFontName").get<OUString>());
// tdf#148565: text at anchor point should be bold, Comic Sanc MS font
CPPUNIT_ASSERT_EQUAL(awt::FontWeight::BOLD, getProperty<float>(getRun(getParagraph(5), 3), "CharWeight"));
}
DECLARE_OOXMLEXPORT_TEST(testTdf123390, "tdf123390.fodt")
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 1a600e3..dbbe0d6 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2772,6 +2772,8 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
if (FLY_PROCESSED == nStateOfFlyFrame || FLY_NONE == nStateOfFlyFrame)
{
AttrOutput().EndRun(&rNode, nCurrentPos, /*bLastRun=*/false);
if (!aSavedSnippet.isEmpty())
bStartedPostponedRunProperties = false;
AttrOutput().StartRun( pRedlineData, nCurrentPos, bSingleEmptyRun );
AttrOutput().SetAnchorIsLinkedToNode( false );