From f55c92211630b4e90531645dbd8ae3350fd9a437 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 10 May 2012 10:35:47 +0200 Subject: fdo#49692 RTFValue::Clone(): copy m_bForceString as well Change-Id: Ib8f06ff33fd9c01ea4a1e47c97cfa12f2ced7318 --- sw/qa/extras/rtftok/data/fdo49692.rtf | 17 +++++++++++++++++ sw/qa/extras/rtftok/rtftok.cxx | 25 +++++++++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 sw/qa/extras/rtftok/data/fdo49692.rtf (limited to 'sw') diff --git a/sw/qa/extras/rtftok/data/fdo49692.rtf b/sw/qa/extras/rtftok/data/fdo49692.rtf new file mode 100644 index 000000000000..bcd7004e627d --- /dev/null +++ b/sw/qa/extras/rtftok/data/fdo49692.rtf @@ -0,0 +1,17 @@ +{\rtf1 +{\*\listtable +{\list\listtemplateid1 +{\listlevel\levelnfc255\leveljc0\levelstartat1\levelfollow0 +{\leveltext \'00;} +{\levelnumbers;} +\fi0\li0} +\listid1} +} +{\listoverridetable +{\listoverride\listid1\listoverridecount0\ls1} +} +\ilvl0 +\ls1 +EULA +\par +} diff --git a/sw/qa/extras/rtftok/rtftok.cxx b/sw/qa/extras/rtftok/rtftok.cxx index 92f722c3a533..bff076a47954 100644 --- a/sw/qa/extras/rtftok/rtftok.cxx +++ b/sw/qa/extras/rtftok/rtftok.cxx @@ -91,6 +91,7 @@ public: void testN757651(); void testFdo49501(); void testFdo49271(); + void testFdo49692(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -125,6 +126,7 @@ public: CPPUNIT_TEST(testN757651); CPPUNIT_TEST(testFdo49501); CPPUNIT_TEST(testFdo49271); + CPPUNIT_TEST(testFdo49692); #endif CPPUNIT_TEST_SUITE_END(); @@ -696,6 +698,29 @@ void Test::testFdo49271() CPPUNIT_ASSERT_EQUAL(25.f, fValue); } +void Test::testFdo49692() +{ + load("fdo49692.rtf"); + + uno::Reference xPropertySet(getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY); + uno::Reference xLevels(xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY); + uno::Sequence aProps; + xLevels->getByIndex(0) >>= aProps; // 1st level + + for (int i = 0; i < aProps.getLength(); ++i) + { + const beans::PropertyValue& rProp = aProps[i]; + + if (rProp.Name == "Suffix") + { + rtl::OUString sValue; + rProp.Value >>= sValue; + + CPPUNIT_ASSERT_EQUAL(sal_Int32(0), sValue.getLength()); + } + } +} + CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); -- cgit