summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-02-22 13:52:53 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2023-02-22 16:51:04 +0000
commit27a454359a0d57de872bc110d6e88d5e51f26202 (patch)
tree1d84af150cfb3ec2e004c3b61867ec7d71211807 /sd
parent94a1d9a4c17e5d578e10eee1a7f14a604305209e (diff)
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 <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd')
-rw-r--r--sd/qa/unit/data/pptx/tdf134862.pptxbin0 -> 32601 bytes
-rw-r--r--sd/qa/unit/export-tests-ooxml1.cxx30
2 files changed, 30 insertions, 0 deletions
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
--- /dev/null
+++ b/sd/qa/unit/data/pptx/tdf134862.pptx
Binary files 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");