summaryrefslogtreecommitdiff
path: root/sw/qa/extras
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-02-20 11:04:16 +0100
committerCédric Bosdonnat <cedric.bosdonnat@free.fr>2013-02-20 11:17:00 +0100
commitd0cde9640b52ccfbb28ed1f65bba0927afd7b69b (patch)
tree18c6342798d98ff8559a3cf26dac4994a2f82998 /sw/qa/extras
parenta633a96c3a50d803e5fa43b603edc0b8e2e34b6e (diff)
n#779642: Fixed floating tables import in writerfilter
Diffstat (limited to 'sw/qa/extras')
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx17
1 files changed, 16 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index ce07b6f97238..eec5e708cfa7 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1164,8 +1164,23 @@ void Test::testN793998()
void Test::testN779642()
{
uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+
+ // First problem: check that we have 2 tables, nesting caused the
+ // creation of outer one to fail
uno::Reference<container::XIndexAccess> xTables(xTextTablesSupplier->getTextTables(), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables->getCount());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong number of imported tables", sal_Int32(2), xTables->getCount());
+
+ // Second problem: check that the outer table is in a frame, at the bottom of the page
+ uno::Reference<text::XTextTable> xTextTable(xTextTablesSupplier->getTextTables()->getByName("Table2"), uno::UNO_QUERY);
+ uno::Reference<beans::XPropertySet> xAnchor(xTextTable->getAnchor(), uno::UNO_QUERY);
+ uno::Any aFrame = xAnchor->getPropertyValue("TextFrame");
+ uno::Reference<beans::XPropertySet> xFrame;
+ aFrame >>= xFrame;
+ sal_Int16 nValue;
+ xFrame->getPropertyValue("VertOrient") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation", nValue, text::VertOrientation::BOTTOM);
+ xFrame->getPropertyValue("VertOrientRelation") >>= nValue;
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("Wrong vertical orientation relation", nValue, text::RelOrientation::PAGE_PRINT_AREA);
}
CPPUNIT_TEST_SUITE_REGISTRATION(Test);