oox/source/export/drawingml.cxx | 6 ++++++ sd/qa/unit/data/pptx/tdf145162.pptx |binary sd/qa/unit/export-tests-ooxml3.cxx | 16 ++++++++++++++++ 3 files changed, 22 insertions(+)
New commits: commit 97ce03ccf1287c1fa79d5741a85fa419e03d9a35 Author: Attila Bakos (NISZ) <bakos.attilakar...@nisz.hu> AuthorDate: Wed Dec 8 10:22:37 2021 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Dec 9 15:25:48 2021 +0100 tdf#145162 PPTX export: fix extra bullet regression Placeholders have bullet by default in MSO, so write <a:buNone/> for paragraphs where numbering/bullet is disabled to avoid extra bullets in Impress. Regression from commit b6b02e0b4c9d739836e1f61a886ea45b01e6696e (tdf#111903 tdf#137152 PPTX export: fix placeholders). Change-Id: Ib4c563cba475d61bc475ca05623e7c7b20fded30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126528 Tested-by: László Németh <nem...@numbertext.org> Reviewed-by: László Németh <nem...@numbertext.org> (cherry picked from commit f57cfddb51b7d7409b7b425dc200aa73406a13bd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126524 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index fbe13359dd9b..008e6ff9cf12 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2549,7 +2549,13 @@ static OUString GetAutoNumType(SvxNumType nNumberingType, bool bSDot, bool bPBeh void DrawingML::WriteParagraphNumbering(const Reference< XPropertySet >& rXPropSet, float fFirstCharHeight, sal_Int16 nLevel ) { if (nLevel < 0 || !GetProperty(rXPropSet, "NumberingRules")) + { + if (GetDocumentType() == DOCUMENT_PPTX) + { + mpFS->singleElementNS(XML_a, XML_buNone); + } return; + } Reference< XIndexAccess > rXIndexAccess; diff --git a/sd/qa/unit/data/pptx/tdf145162.pptx b/sd/qa/unit/data/pptx/tdf145162.pptx new file mode 100644 index 000000000000..3746740f327c Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf145162.pptx differ diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx index 900716e20093..fbf39e111f71 100644 --- a/sd/qa/unit/export-tests-ooxml3.cxx +++ b/sd/qa/unit/export-tests-ooxml3.cxx @@ -70,6 +70,7 @@ public: void testTdf118806(); void testTdf130058(); void testTdf111789(); + void testTdf145162(); void testTdf100348_convert_Fontwork2TextWarp(); void testTdf1225573_FontWorkScaleX(); void testTdf99497_keepAppearanceOfCircleKind(); @@ -143,6 +144,7 @@ public: CPPUNIT_TEST(testTdf118806); CPPUNIT_TEST(testTdf130058); CPPUNIT_TEST(testTdf111789); + CPPUNIT_TEST(testTdf145162); CPPUNIT_TEST(testTdf100348_convert_Fontwork2TextWarp); CPPUNIT_TEST(testTdf1225573_FontWorkScaleX); CPPUNIT_TEST(testTdf99497_keepAppearanceOfCircleKind); @@ -612,6 +614,20 @@ void SdOOXMLExportTest3::testTdf111789() xDocShRef->DoClose(); } +void SdOOXMLExportTest3::testTdf145162() +{ + sd::DrawDocShellRef xDocShRef + = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/pptx/tdf145162.pptx"), PPTX); + utl::TempFile tempFile; + xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile); + xmlDocUniquePtr pXmlDocContent = parseExport(tempFile, "ppt/slides/slide1.xml"); + + assertXPath(pXmlDocContent, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr/a:buNone"); + // Before the fix, that tag was missing so PP put bullet to each para. + + xDocShRef->DoClose(); +} + void SdOOXMLExportTest3::testTdf100348_convert_Fontwork2TextWarp() { ::sd::DrawDocShellRef xDocShRef = loadURL(