diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2012-11-08 15:17:36 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2012-11-08 15:20:51 +0100 |
commit | 5c87553432058f5241eda1dbfbfa1ec840fe3890 (patch) | |
tree | ae8b08fc306563cca999109249ae1bcc210d84bb /sw | |
parent | f2c55815128fde9f760c5cbf81e3ab18402c5b3d (diff) |
testcase for a recent bnc#773061 fix
Change-Id: I60874c6ad8ccb9767961ed0064b9a15bfc1b07d5
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/ooxmlimport/data/n773061.docx | bin | 0 -> 7081 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 13 |
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/n773061.docx b/sw/qa/extras/ooxmlimport/data/n773061.docx Binary files differnew file mode 100644 index 000000000000..e0d60019d45d --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/n773061.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 33112d4e7ed0..0da4febaf366 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -107,6 +107,7 @@ public: void testN783638(); void testFdo52208(); void testN785767(); + void testN773061(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -166,6 +167,7 @@ void Test::run() {"n783638.docx", &Test::testN783638}, {"fdo52208.docx", &Test::testFdo52208}, {"n785767.docx", &Test::testN785767}, + {"n773061.docx", &Test::testN773061}, }; for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) { @@ -1015,6 +1017,17 @@ void Test::testN785767() // Check the A1 and B1 cells, the width of both of them was the default value (10000 / 9, as there were 9 cells in the row). CPPUNIT_ASSERT_MESSAGE("A1 must not have default width", sal_Int16(10000 / 9) != getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[0].Position); CPPUNIT_ASSERT_MESSAGE("B1 must not have default width", sal_Int16(10000 / 9) != getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(1), "TableColumnSeparators")[0].Position); + +void Test::testN773061() +{ +// xray ThisComponent.TextFrames(0).LeftBorderDistance + 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( getProperty< sal_Int32 >( xFrame, "LeftBorderDistance" ), sal_Int32( 0 )); + CPPUNIT_ASSERT_EQUAL( getProperty< sal_Int32 >( xFrame, "TopBorderDistance" ), sal_Int32( 0 )); + CPPUNIT_ASSERT_EQUAL( getProperty< sal_Int32 >( xFrame, "RightBorderDistance" ), sal_Int32( 0 )); + CPPUNIT_ASSERT_EQUAL( getProperty< sal_Int32 >( xFrame, "BottomBorderDistance" ), sal_Int32( 0 )); } CPPUNIT_TEST_SUITE_REGISTRATION(Test); |