summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--filter/source/msfilter/msdffimp.cxx3
-rw-r--r--sd/qa/unit/data/ppt/tdf143315-WordartWithoutBullet.pptbin0 -> 68608 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml3.cxx27
3 files changed, 30 insertions, 0 deletions
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index f7176c186a77..783609c4ca24 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -3668,6 +3668,9 @@ void SvxMSDffManager::ReadObjText( const OUString& rText, SdrObject* pObj )
rOutliner.Clear();
rOutliner.SetUpdateMode( bOldUpdateMode );
pText->SetOutlinerParaObject( std::move(pNewText) );
+ // tdf#143315: restore stylesheet applied to Outliner's nodes when SdrTextObj initializes
+ // its attributes, but removed by Outliner::Init, which calls Outliner::Clear.
+ pText->SetStyleSheet(pText->GetStyleSheet(), true);
}
//static
diff --git a/sd/qa/unit/data/ppt/tdf143315-WordartWithoutBullet.ppt b/sd/qa/unit/data/ppt/tdf143315-WordartWithoutBullet.ppt
new file mode 100644
index 000000000000..54111bb28a7a
--- /dev/null
+++ b/sd/qa/unit/data/ppt/tdf143315-WordartWithoutBullet.ppt
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx
index f773c364f395..597783d85a70 100644
--- a/sd/qa/unit/export-tests-ooxml3.cxx
+++ b/sd/qa/unit/export-tests-ooxml3.cxx
@@ -119,6 +119,7 @@ public:
void testTdf96061_textHighlight();
void testTdf143222_embeddedWorksheet();
void testTdf142235_TestPlaceholderTextAlignment();
+ void testTdf143315();
CPPUNIT_TEST_SUITE(SdOOXMLExportTest3);
@@ -189,6 +190,7 @@ public:
CPPUNIT_TEST(testTdf96061_textHighlight);
CPPUNIT_TEST(testTdf143222_embeddedWorksheet);
CPPUNIT_TEST(testTdf142235_TestPlaceholderTextAlignment);
+ CPPUNIT_TEST(testTdf143315);
CPPUNIT_TEST_SUITE_END();
virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override
@@ -1773,6 +1775,31 @@ void SdOOXMLExportTest3::testTdf143222_embeddedWorksheet()
xDocShRef->DoClose();
}
+void SdOOXMLExportTest3::testTdf143315()
+{
+ auto xDocShRef = loadURL(
+ m_directories.getURLFromSrc(u"sd/qa/unit/data/ppt/tdf143315-WordartWithoutBullet.ppt"),
+ PPT);
+
+ utl::TempFile tmpfile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tmpfile);
+ xDocShRef->DoClose();
+
+ xmlDocUniquePtr pXml = parseExport(tmpfile, "ppt/slides/slide1.xml");
+
+ // Without the fix in place, whis would have failed with
+ // - Expected:
+ // - Actual : 216000
+ // - In <file:///tmp/lu161922zcvd.tmp>, XPath '/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:pPr' unexpected 'marL' attribute
+
+ assertXPathNoAttribute(pXml, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:pPr", "marL");
+ assertXPathNoAttribute(pXml, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:pPr", "indent");
+ assertXPath(pXml, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:pPr/a:buClr", 0);
+ assertXPath(pXml, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:pPr/a:buSzPct", 0);
+ assertXPath(pXml, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:pPr/a:buFont", 0);
+ assertXPath(pXml, "/p:sld/p:cSld/p:spTree/p:sp/p:txBody/a:p/a:pPr/a:buChar", 0);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SdOOXMLExportTest3);
CPPUNIT_PLUGIN_IMPLEMENT();