diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-02-28 14:20:00 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-02-28 16:47:17 +0100 |
commit | 521586b328305c4466603438a9931993b92873c6 (patch) | |
tree | 9bfa4d43b9c7fc5b6b5d8803a00104125dd41938 /sw/qa | |
parent | f2e706d87399911e300c0101c876e44f2819c505 (diff) |
Related: fdo#59638 DOCX import of w:lvlOverride
Change-Id: I23fca674e2436b09eeea3337b4d3eeb7a33ccf09
Diffstat (limited to 'sw/qa')
-rwxr-xr-x | sw/qa/extras/ooxmlimport/data/fdo59638.docx | bin | 0 -> 12166 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 25 |
2 files changed, 25 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/fdo59638.docx b/sw/qa/extras/ooxmlimport/data/fdo59638.docx Binary files differnew file mode 100755 index 000000000000..d33e7cc0a037 --- /dev/null +++ b/sw/qa/extras/ooxmlimport/data/fdo59638.docx diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 62a2c987fd84..8365013aff62 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -118,6 +118,7 @@ public: void testN779642(); void testTbLrHeight(); void testFdo53985(); + void testFdo59638(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -187,6 +188,7 @@ void Test::run() {"n779642.docx", &Test::testN779642}, {"tblr-height.docx", &Test::testTbLrHeight}, {"fdo53985.docx", &Test::testFdo53985}, + {"fdo59638.docx", &Test::testFdo59638}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -1207,6 +1209,29 @@ void Test::testFdo53985() CPPUNIT_ASSERT_EQUAL(sal_Int32(5), xTables->getCount()); // Only 4 tables were imported. } +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(); |