summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/uiwriter/data/tdf156348.odtbin0 -> 9359 bytes
-rw-r--r--sw/qa/extras/uiwriter/uiwriter3.cxx24
2 files changed, 24 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/data/tdf156348.odt b/sw/qa/extras/uiwriter/data/tdf156348.odt
new file mode 100644
index 000000000000..c440822b65d1
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf156348.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx
index 852ccd4e3b13..9be08e248dfc 100644
--- a/sw/qa/extras/uiwriter/uiwriter3.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter3.cxx
@@ -1341,6 +1341,30 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf139737)
dispatchCommand(mxComponent, u".uno:Undo"_ustr, {});
}
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf156348)
+{
+ createSwDoc("tdf156348.odt");
+
+ uno::Reference<text::XTextTablesSupplier> xTextTablesSupplier(mxComponent, uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(0), xIndexAccess->getCount());
+
+ dispatchCommand(mxComponent, u".uno:SelectAll"_ustr, {});
+
+ uno::Sequence<beans::PropertyValue> aArgs(
+ comphelper::InitPropertySequence({ { "Delimiter", uno::Any(u"\t"_ustr) },
+ { "WithHeader", uno::Any(false) },
+ { "RepeatHeaderLines", uno::Any(sal_uInt16(0)) },
+ { "WithBorder", uno::Any(false) },
+ { "DontSplitTable", uno::Any(false) } }));
+
+ // Without the fix in place, this test would have crashed here
+ dispatchCommand(mxComponent, u".uno:ConvertTextToTable"_ustr, aArgs);
+
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+}
+
CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf150845)
{
createSwDoc();