sd/qa/unit/data/pptx/tdf134862.pptx |binary sd/qa/unit/export-tests-ooxml1.cxx | 30 ++++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+)
New commits: commit 27a454359a0d57de872bc110d6e88d5e51f26202 Author: Xisco Fauli <xiscofa...@libreoffice.org> AuthorDate: Wed Feb 22 13:52:53 2023 +0100 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Wed Feb 22 16:51:04 2023 +0000 tdf#134862: sd_export_tests-ooxml1: Add unittest Change-Id: I72c293c6d1a5337a6460bfbd8846c6be9a33626a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147465 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org> diff --git a/sd/qa/unit/data/pptx/tdf134862.pptx b/sd/qa/unit/data/pptx/tdf134862.pptx new file mode 100644 index 000000000000..b92acfc3e235 Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf134862.pptx differ diff --git a/sd/qa/unit/export-tests-ooxml1.cxx b/sd/qa/unit/export-tests-ooxml1.cxx index 2c3c5a0152e3..b7b43f886ff9 100644 --- a/sd/qa/unit/export-tests-ooxml1.cxx +++ b/sd/qa/unit/export-tests-ooxml1.cxx @@ -85,6 +85,7 @@ public: void testBulletStartNumber(); void testLineStyle(); void testCellLeftAndRightMargin(); + void testTdf134862(); void testRightToLeftParaghraph(); void testTextboxWithHyperlink(); void testMergedCells(); @@ -160,6 +161,7 @@ public: CPPUNIT_TEST(testBulletStartNumber); CPPUNIT_TEST(testLineStyle); CPPUNIT_TEST(testCellLeftAndRightMargin); + CPPUNIT_TEST(testTdf134862); CPPUNIT_TEST(testRightToLeftParaghraph); CPPUNIT_TEST(testTextboxWithHyperlink); CPPUNIT_TEST(testMergedCells); @@ -999,6 +1001,34 @@ void SdOOXMLExportTest1::testLineStyle() static_cast<int>(rStyleItem.GetValue())); } +void SdOOXMLExportTest1::testTdf134862() +{ + createSdImpressDoc("pptx/tdf134862.pptx"); + uno::Reference<beans::XPropertySet> xShape(getShapeFromPage(0, 0)); + + uno::Reference<text::XTextRange> xParagraph(getParagraphFromShape(0, xShape)); + uno::Reference<beans::XPropertySet> xPropSet(xParagraph, uno::UNO_QUERY_THROW); + + sal_Int16 nWritingMode = 0; + xPropSet->getPropertyValue("WritingMode") >>= nWritingMode; + + // Without the fix in place, this test would have failed here + CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong paragraph WritingMode", text::WritingMode2::RL_TB, + nWritingMode); + + saveAndReload("Impress Office Open XML"); + + xShape.set(getShapeFromPage(0, 0)); + + xParagraph.set(getParagraphFromShape(0, xShape)); + xPropSet.set(xParagraph, uno::UNO_QUERY_THROW); + + nWritingMode = 0; + xPropSet->getPropertyValue("WritingMode") >>= nWritingMode; + CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong paragraph WritingMode", text::WritingMode2::RL_TB, + nWritingMode); +} + void SdOOXMLExportTest1::testRightToLeftParaghraph() { createSdImpressDoc("pptx/rightToLeftParagraph.pptx");