summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-10-31 16:32:07 +0100
committerMiklos Vajna <vmiklos@suse.cz>2012-10-31 16:34:54 +0100
commit819b0cb95b38c4c49d34011da68c747e2152059b (patch)
tree22cf96c2fe67fa705970962c85dbc5ade29da285 /sw
parent2caa5ab919fc86fc41fddf0a33f9239ad37b00b3 (diff)
NS_ooxml::LN_CT_TrPrBase_gridBefore/After testcase
Change-Id: Id488ffa6a6b01937fe32e4c80af45c40ebf673ec
Diffstat (limited to 'sw')
-rwxr-xr-xsw/qa/extras/ooxmlimport/data/n785767.docxbin0 -> 12848 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx14
2 files changed, 14 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/n785767.docx b/sw/qa/extras/ooxmlimport/data/n785767.docx
new file mode 100755
index 000000000000..db356769bc8b
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/n785767.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index d0cbc71a9f50..d19760fc823b 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
#include <com/sun/star/text/SetVariableType.hpp>
+#include <com/sun/star/text/TableColumnSeparator.hpp>
#include <com/sun/star/text/TextContentAnchorType.hpp>
#include <com/sun/star/text/VertOrientation.hpp>
#include <com/sun/star/text/WrapTextMode.hpp>
@@ -105,6 +106,7 @@ public:
void testN782345();
void testN783638();
void testFdo52208();
+ void testN785767();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -163,6 +165,7 @@ void Test::run()
{"n782345.docx", &Test::testN782345},
{"n783638.docx", &Test::testN783638},
{"fdo52208.docx", &Test::testFdo52208},
+ {"n785767.docx", &Test::testN785767},
};
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
{
@@ -1003,6 +1006,17 @@ void Test::testFdo52208()
CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xCursor->getPage());
}
+void Test::testN785767()
+{
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ uno::Reference<text::XTextTable> xTextTable(xTables->getByIndex(0), uno::UNO_QUERY);
+ uno::Reference<table::XTableRows> xTableRows(xTextTable->getRows(), uno::UNO_QUERY);
+ // 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_EQUAL(sal_Int16(36), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[0].Position);
+ CPPUNIT_ASSERT_EQUAL(sal_Int16(978), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(1), "TableColumnSeparators")[0].Position);
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();