summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorAttila Bakos (NISZ) <bakos.attilakaroly@nisz.hu>2022-05-26 17:04:54 +0200
committerLászló Németh <nemeth@numbertext.org>2022-05-31 13:00:38 +0200
commit445d4ce232b8e8efaeb2605533fede1b71f52f30 (patch)
tree4d9172a07ada471c2dd318ae70fcc03e48b8913b /sd
parentb94275f6d2cb4dc28d1563fd7994251042b6d51a (diff)
tdf#147991 PPTX export: fix bullet indent regression
Instead of exporting the inherited master slide indent values of the placeholders, export 0 indent value for removed/disabled bullets to fix interoperability. Regression from commit f57cfddb51b7d7409b7b425dc200aa73406a13bd "tdf#145162 PPTX export: fix extra bullet regression". Change-Id: Icbf823adc07f19fd10d1a60da9cff17616a2aef6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135025 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/odp/testZeroIndent.odpbin0 -> 15446 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml3.cxx38
2 files changed, 38 insertions, 0 deletions
diff --git a/sd/qa/unit/data/odp/testZeroIndent.odp b/sd/qa/unit/data/odp/testZeroIndent.odp
new file mode 100644
index 000000000000..ead2c02687cc
--- /dev/null
+++ b/sd/qa/unit/data/odp/testZeroIndent.odp
Binary files differ
diff --git a/sd/qa/unit/export-tests-ooxml3.cxx b/sd/qa/unit/export-tests-ooxml3.cxx
index 917142c61684..6100a9f64db6 100644
--- a/sd/qa/unit/export-tests-ooxml3.cxx
+++ b/sd/qa/unit/export-tests-ooxml3.cxx
@@ -56,6 +56,7 @@ public:
void testTdf130058();
void testTdf111789();
void testTdf145162();
+ void testZeroIndentExport();
void testTdf100348_convert_Fontwork2TextWarp();
void testTdf1225573_FontWorkScaleX();
void testTdf99497_keepAppearanceOfCircleKind();
@@ -139,6 +140,7 @@ public:
CPPUNIT_TEST(testTdf130058);
CPPUNIT_TEST(testTdf111789);
CPPUNIT_TEST(testTdf145162);
+ CPPUNIT_TEST(testZeroIndentExport);
CPPUNIT_TEST(testTdf100348_convert_Fontwork2TextWarp);
CPPUNIT_TEST(testTdf1225573_FontWorkScaleX);
CPPUNIT_TEST(testTdf99497_keepAppearanceOfCircleKind);
@@ -662,6 +664,42 @@ void SdOOXMLExportTest3::testTdf145162()
xDocShRef->DoClose();
}
+void SdOOXMLExportTest3::testZeroIndentExport()
+{
+ // Load the bugdoc and save to pptx then.
+ sd::DrawDocShellRef xDocShRef
+ = loadURL(m_directories.getURLFromSrc(u"sd/qa/unit/data/odp/testZeroIndent.odp"), ODP);
+ utl::TempFile tempFile;
+ xDocShRef = saveAndReload(xDocShRef.get(), PPTX, &tempFile);
+ // There are 3 slides, get them
+ xmlDocUniquePtr pSlide1 = parseExport(tempFile, "ppt/slides/slide1.xml");
+ xmlDocUniquePtr pSlide2 = parseExport(tempFile, "ppt/slides/slide2.xml");
+ xmlDocUniquePtr pSlide3 = parseExport(tempFile, "ppt/slides/slide3.xml");
+
+ CPPUNIT_ASSERT(pSlide1);
+ CPPUNIT_ASSERT(pSlide2);
+ CPPUNIT_ASSERT(pSlide3);
+
+ // Each slide has 3 paragraphs, one full line, an empty and a normal para.
+ // Check the indent and bullet. These have to match with PP. Before the fix,
+ // they were different.
+ assertXPath(pSlide1, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr/a:buNone");
+
+ assertXPath(pSlide2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[1]/a:pPr/a:buNone");
+ assertXPath(pSlide2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[1]/a:pPr", "indent", "0");
+ assertXPath(pSlide2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr/a:buNone");
+ assertXPath(pSlide2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr", "indent", "0");
+ assertXPath(pSlide2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[3]/a:pPr/a:buNone");
+ assertXPath(pSlide2, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[3]/a:pPr", "indent", "0");
+
+ assertXPath(pSlide3, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[1]/a:pPr", "indent", "0");
+ assertXPath(pSlide3, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr/a:buNone");
+ assertXPath(pSlide3, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[2]/a:pPr", "indent", "0");
+ assertXPath(pSlide3, "/p:sld/p:cSld/p:spTree/p:sp[2]/p:txBody/a:p[3]/a:pPr", "indent", "0");
+
+ xDocShRef->DoClose();
+}
+
void SdOOXMLExportTest3::testTdf100348_convert_Fontwork2TextWarp()
{
::sd::DrawDocShellRef xDocShRef = loadURL(