summaryrefslogtreecommitdiff
path: root/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2012-11-08 15:17:36 +0100
committerLuboš Luňák <l.lunak@suse.cz>2012-11-08 15:20:51 +0100
commit5c87553432058f5241eda1dbfbfa1ec840fe3890 (patch)
treeae8b08fc306563cca999109249ae1bcc210d84bb /sw/qa/extras/ooxmlimport/ooxmlimport.cxx
parentf2c55815128fde9f760c5cbf81e3ab18402c5b3d (diff)
testcase for a recent bnc#773061 fix
Change-Id: I60874c6ad8ccb9767961ed0064b9a15bfc1b07d5
Diffstat (limited to 'sw/qa/extras/ooxmlimport/ooxmlimport.cxx')
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx13
1 files changed, 13 insertions, 0 deletions
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);