diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-03-29 14:53:09 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-03-29 15:38:21 +0100 |
commit | 18f299a47fecda6570ff898d6da4207b1ddd9a45 (patch) | |
tree | a5f776fd9814310b57402bf41829cdff8c3e8289 /sw/qa | |
parent | f7f9b74163acd6811ccfaabb2a1d762225258e15 (diff) |
fdo#48557 implement DOCX export of inner margin values for textbox text
Change-Id: I524e3bcd21731ad203a420f60dd328c6551f0eb7
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/fdo48557.odt | bin | 0 -> 16782 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 14 |
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/fdo48557.odt b/sw/qa/extras/ooxmlexport/data/fdo48557.odt Binary files differnew file mode 100644 index 000000000000..35353baace27 --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/fdo48557.odt diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 808bf6319af7..05908c414f90 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -85,6 +85,7 @@ public: void testCellBtlr(); void testTableStylerPrSz(); void testMathLiteral(); + void testFdo48557(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -130,6 +131,7 @@ void Test::run() {"cell-btlr.docx", &Test::testCellBtlr}, {"table-style-rPr-sz.docx", &Test::testTableStylerPrSz}, {"math-literal.docx", &Test::testMathLiteral}, + {"fdo48557.odt", &Test::testFdo48557}, }; // Don't test the first import of these, for some reason those tests fail const char* aBlacklist[] = { @@ -658,6 +660,18 @@ void Test::testMathLiteral() getFormula( getRun( getParagraph( 1 ), 1 ))); } +void Test::testFdo48557() +{ + // Inner margins of the textframe wasn't exported. + uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY); + CPPUNIT_ASSERT_EQUAL(sal_Int32(150), getProperty<sal_Int32>(xFrame, "LeftBorderDistance")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(150), getProperty<sal_Int32>(xFrame, "RightBorderDistance")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(150), getProperty<sal_Int32>(xFrame, "TopBorderDistance")); + CPPUNIT_ASSERT_EQUAL(sal_Int32(150), getProperty<sal_Int32>(xFrame, "BottomBorderDistance")); +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); |