summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2012-05-10 10:35:47 +0200
committerMiklos Vajna <vmiklos@suse.cz>2012-05-10 10:53:20 +0200
commitf55c92211630b4e90531645dbd8ae3350fd9a437 (patch)
treea3a106bcac2529690988b902e2452939f14858ce /sw/qa
parenta9550f63cd7a7e064901b2c997375ed384781eea (diff)
fdo#49692 RTFValue::Clone(): copy m_bForceString as well
Change-Id: Ib8f06ff33fd9c01ea4a1e47c97cfa12f2ced7318
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/rtftok/data/fdo49692.rtf17
-rw-r--r--sw/qa/extras/rtftok/rtftok.cxx25
2 files changed, 42 insertions, 0 deletions
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<beans::XPropertySet> xPropertySet(getStyles("NumberingStyles")->getByName("WWNum1"), uno::UNO_QUERY);
+ uno::Reference<container::XIndexAccess> xLevels(xPropertySet->getPropertyValue("NumberingRules"), uno::UNO_QUERY);
+ uno::Sequence<beans::PropertyValue> 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();