summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/n816593.docxbin0 -> 17030 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx11
2 files changed, 11 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/n816593.docx b/sw/qa/extras/ooxmlimport/data/n816593.docx
new file mode 100644
index 000000000000..7d784e69d4e6
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/n816593.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 5a268e48597e..c422ecc829ca 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -116,6 +116,7 @@ public:
void testPageBackground();
void testWatermark();
void testPageBorderShadow();
+ void testN816593();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -200,6 +201,7 @@ void Test::run()
{"page-background.docx", &Test::testPageBackground},
{"watermark.docx", &Test::testWatermark},
{"page-border-shadow.docx", &Test::testPageBorderShadow},
+ {"n816593.docx", &Test::testN816593},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1430,6 +1432,15 @@ void Test::testPageBorderShadow()
CPPUNIT_ASSERT_EQUAL(sal_Int16(TWIP_TO_MM100(48/8*20)), aShadow.ShadowWidth);
}
+void Test::testN816593()
+{
+ // Two consecutive <w:tbl> without any paragraph in between, but with different tblpPr. In this
+ // case we need to have 2 different tables instead of 1
+ uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables->getCount());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();