summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2013-07-10 12:41:57 +0200
committerMichael Stahl <mstahl@redhat.com>2013-07-10 12:44:34 +0200
commitb3944f124ab3dc87332796a46387f837ad29e8d5 (patch)
tree19b4b594cd24d49b631b749083597b47857980a0 /sw
parent1c90902cbccd4e4f5946dfc454da351c33c24f71 (diff)
rhbz#960019 : RTF import: handle extra groups in listoverride entry
This crashed because for a single listoverride entry 2 SPRMs were sent to the domain-mapper, and the second one was empty. Change-Id: Ic41ffd8bd4edcff065f49ecef3464efedd909d63
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/rtfimport/data/rhbz960019.rtf12
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx7
2 files changed, 19 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/data/rhbz960019.rtf b/sw/qa/extras/rtfimport/data/rhbz960019.rtf
new file mode 100644
index 000000000000..869aa339b0f1
--- /dev/null
+++ b/sw/qa/extras/rtfimport/data/rhbz960019.rtf
@@ -0,0 +1,12 @@
+{\rtf1
+{\*\listtable
+{\list\listtemplateid-723955400\listsimple{\listlevel\leveljc\levelfollow0\levelspace0\levelindent0\levelstartat1{\leveltext\'03\'00. ;}{\levelnumbers\'01;}\f0 }{\listname ;}\listid-1155484576}
+}
+{\*\listoverridetable
+{\*\listoverride{\listid-1155484576\listoverridecount0\ls1}}
+}
+\pard\plain \pvpg\phpg\posx1143\posy4743\absw9615\absh-2922\dfrmtxtx72\dfrmtxty72\nowrap
+Hello\par
+\pard\plain\par
+}
+
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index bc8c7fc0f5d1..4a861d50b04c 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -153,6 +153,7 @@ public:
void testFdo39001();
void testGroupshape();
void testFdo66565();
+ void testRhbz960019();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -291,6 +292,7 @@ void Test::run()
{"fdo39001.rtf", &Test::testFdo39001},
{"groupshape.rtf", &Test::testGroupshape},
{"fdo66565.rtf", &Test::testFdo66565},
+ {"rhbz960019.rtf", &Test::testRhbz960019},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1419,6 +1421,11 @@ void Test::testFdo66565()
CPPUNIT_ASSERT_EQUAL(sal_Int16(304), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(1), "TableColumnSeparators")[0].Position);
}
+void Test::testRhbz960019()
+{
+ // used to crash due to extra group in listoverride entry
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();