diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/tbrl-frame-vml.docx | bin | 0 -> 22756 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 12 |
2 files changed, 12 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/tbrl-frame-vml.docx b/sw/qa/extras/ooxmlimport/data/tbrl-frame-vml.docx Binary files differnew file mode 100644 index 000000000000..c697e5846ce6 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/tbrl-frame-vml.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index 1c7282623b00..80967be606d7 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -18,6 +18,7 @@ #include <wrtsh.hxx> #include <com/sun/star/document/XEmbeddedObjectSupplier2.hpp> #include <com/sun/star/embed/Aspects.hpp> +#include <com/sun/star/text/WritingMode2.hpp> class Test : public SwModelTestBase { @@ -255,6 +256,17 @@ DECLARE_OOXMLIMPORT_TEST(testTdf113946, "tdf113946.docx") CPPUNIT_ASSERT_EQUAL(OUString("1695"), aTop); } +DECLARE_OOXMLIMPORT_TEST(testTbrlFrameVml, "tbrl-frame-vml.docx") +{ + uno::Reference<beans::XPropertySet> xTextFrame(getShape(1), uno::UNO_QUERY); + CPPUNIT_ASSERT(xTextFrame.is()); + + auto nActual = getProperty<sal_Int16>(xTextFrame, "WritingMode"); + // Without the accompanying fix in place, this test would have failed with 'Expected: 2; Actual: + // 4', i.e. writing direction was inherited from page, instead of explicit tbrl. + CPPUNIT_ASSERT_EQUAL(text::WritingMode2::TB_RL, nActual); +} + DECLARE_OOXMLIMPORT_TEST(testTdf121804, "tdf121804.docx") { uno::Reference<container::XIndexAccess> xGroup(getShape(1), uno::UNO_QUERY); |