summaryrefslogtreecommitdiff
path: root/sw/qa/extras/rtfimport/rtfimport.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/rtfimport/rtfimport.cxx')
-rw-r--r--sw/qa/extras/rtfimport/rtfimport.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/sw/qa/extras/rtfimport/rtfimport.cxx b/sw/qa/extras/rtfimport/rtfimport.cxx
index f923762cae2a..e577f4269f15 100644
--- a/sw/qa/extras/rtfimport/rtfimport.cxx
+++ b/sw/qa/extras/rtfimport/rtfimport.cxx
@@ -143,6 +143,7 @@ public:
void testFdo59419();
void testFdo58076_2();
void testFdo59953();
+ void testFdo59638();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -258,6 +259,7 @@ void Test::run()
{"fdo59419.rtf", &Test::testFdo59419},
{"fdo58076-2.rtf", &Test::testFdo58076_2},
{"fdo59953.rtf", &Test::testFdo59953},
+ {"fdo59638.rtf", &Test::testFdo59638},
};
header();
for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i)
@@ -1120,6 +1122,29 @@ void Test::testFdo59953()
CPPUNIT_ASSERT_EQUAL(sal_Int16(7650), getProperty< uno::Sequence<text::TableColumnSeparator> >(xTableRows->getByIndex(0), "TableColumnSeparators")[0].Position);
}
+void Test::testFdo59638()
+{
+ // The problem was that w:lvlOverride inside w:num was ignores by dmapper.
+
+ 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 == "BulletChar")
+ {
+ // Was '*', should be 'o'.
+ CPPUNIT_ASSERT_EQUAL(OUString("\xEF\x82\xB7", 3, RTL_TEXTENCODING_UTF8), rProp.Value.get<OUString>());
+ return;
+ }
+ }
+ CPPUNIT_FAIL("no BulletChar property");
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(Test);
CPPUNIT_PLUGIN_IMPLEMENT();