diff options
Diffstat (limited to 'sw/qa/extras/ooxmlimport/ooxmlimport.cxx')
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index a47b4e80290f..0f0a9aa0540a 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -1325,6 +1325,38 @@ DECLARE_OOXMLIMPORT_TEST(testTdf108806, "tdf108806.docx") paragraph->getString()); } +DECLARE_OOXMLIMPORT_TEST(testTdf87533_bidi, "tdf87533_bidi.docx") +{ + // "w:bidi" (specified inside Default paragraph properties) should not be ignored + const OUString writingMode = "WritingMode"; //getPropertyName(PROP_WRITING_MODE); + + // check: "Default Style" master-style has RTL + { + const uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Default Style"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(text::WritingMode2::RL_TB), getProperty<sal_Int32>(xPropertySet, writingMode)); + } + + // check: "Standard" master-style has RTL + { + const uno::Reference<beans::XPropertySet> xPropertySet(getStyles("PageStyles")->getByName("Standard"), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(text::WritingMode2::RL_TB), getProperty<sal_Int32>(xPropertySet, writingMode)); + } + + // check: style of the first paragraph has RTL + // it has missing usage of the <w:bidi> => this property should be taken from style + { + const uno::Reference<beans::XPropertySet> xPara(getParagraph(1), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(text::WritingMode2::RL_TB), getProperty<sal_Int32>(xPara, writingMode)); + } + + // check: style of the first paragraph has LTR + // it has <w:bidi w:val="false"/> + { + const uno::Reference<beans::XPropertySet> xPara(getParagraph(2), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(text::WritingMode2::LR_TB), getProperty<sal_Int32>(xPara, writingMode)); + } +} + DECLARE_OOXMLIMPORT_TEST(testVmlAdjustments, "vml-adjustments.docx") { uno::Reference<beans::XPropertySet> xPropertySet(getShape(1), uno::UNO_QUERY); |