summaryrefslogtreecommitdiff
path: root/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx')
-rw-r--r--writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx20
1 files changed, 20 insertions, 0 deletions
diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
index 803f2cd938b6..1f044bc2f309 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapperTableHandler.cxx
@@ -13,6 +13,7 @@
#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/text/XTextTable.hpp>
#include <com/sun/star/text/XTextTablesSupplier.hpp>
+#include <com/sun/star/text/XTextFramesSupplier.hpp>
#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
#include <com/sun/star/text/XTextDocument.hpp>
#include <com/sun/star/style/BreakType.hpp>
@@ -94,6 +95,25 @@ CPPUNIT_TEST_FIXTURE(Test, test3NestedFloatingTables)
uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(3), xIndexAccess->getCount());
}
+
+CPPUNIT_TEST_FIXTURE(Test, testFloatingTablesOuterNonsplitInner)
+{
+ // Given a document with a normal table, 3 outer floating tables and an inner floating table in
+ // the last floating table:
+ loadFromURL(u"floattable-outer-nonsplit-inner.docx");
+
+ // When counting the floating tables in the document:
+ uno::Reference<text::XTextFramesSupplier> xFramesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xFrames(xFramesSupplier->getTextFrames(),
+ uno::UNO_QUERY);
+
+ // Then make sure no floating tables are missing:
+ // Without the accompanying fix in place, this test would have failed with:
+ // - Expected: 4
+ // - Actual : 3
+ // i.e. the inner floating table was not floating.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4), xFrames->getCount());
+}
}
CPPUNIT_PLUGIN_IMPLEMENT();