diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-04-05 15:01:31 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-04-05 15:24:45 +0200 |
commit | e63950dc82ad7b30763c22391aec767111cf97d5 (patch) | |
tree | 2351afe6c510bbfd6eb56e9eb476446ba7fc3d25 /sw/qa/extras | |
parent | 13183219b7bd39b7a5c8088b2679e346c4f3280c (diff) |
w:numPicBullet export testcase
Change-Id: Ia8a32b6d9fcb53e3974940c173edb2fe4c9e1ab3
Diffstat (limited to 'sw/qa/extras')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/i120928.docx (renamed from sw/qa/extras/ooxmlimport/data/i120928.docx) | bin | 16550 -> 16550 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 22 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 23 |
3 files changed, 22 insertions, 23 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/i120928.docx b/sw/qa/extras/ooxmlexport/data/i120928.docx Binary files differindex ce78653e98e4..ce78653e98e4 100644 --- a/sw/qa/extras/ooxmlimport/data/i120928.docx +++ b/sw/qa/extras/ooxmlexport/data/i120928.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index 05908c414f90..35bb3b603e4d 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -86,6 +86,7 @@ public: void testTableStylerPrSz(); void testMathLiteral(); void testFdo48557(); + void testI120928(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -132,6 +133,7 @@ void Test::run() {"table-style-rPr-sz.docx", &Test::testTableStylerPrSz}, {"math-literal.docx", &Test::testMathLiteral}, {"fdo48557.odt", &Test::testFdo48557}, + {"i120928.docx", &Test::testI120928}, }; // Don't test the first import of these, for some reason those tests fail const char* aBlacklist[] = { @@ -672,6 +674,26 @@ void Test::testFdo48557() CPPUNIT_ASSERT_EQUAL(sal_Int32(150), getProperty<sal_Int32>(xFrame, "BottomBorderDistance")); } +void Test::testI120928() +{ + // w:numPicBullet was ignored, leading to missing graphic bullet in numbering. + 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 + + bool bIsGraphic = false; + for (int i = 0; i < aProps.getLength(); ++i) + { + const beans::PropertyValue& rProp = aProps[i]; + + if (rProp.Name == "NumberingType") + CPPUNIT_ASSERT_EQUAL(style::NumberingType::BITMAP, rProp.Value.get<sal_Int16>()); + else if (rProp.Name == "GraphicURL") + bIsGraphic = true; + } + CPPUNIT_ASSERT_EQUAL(true, bIsGraphic); +} CPPUNIT_TEST_SUITE_REGISTRATION(Test); diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 14228f14b634..7c4051c1d847 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -124,7 +124,6 @@ public: void testFdo60922(); void testFdo59273(); void testTableWidth(); - void testI120928(); CPPUNIT_TEST_SUITE(Test); #if !defined(MACOSX) && !defined(WNT) @@ -200,7 +199,6 @@ void Test::run() {"fdo60922.docx", &Test::testFdo60922}, {"fdo59273.docx", &Test::testFdo59273}, {"table_width.docx", &Test::testTableWidth}, - {"i120928.docx", &Test::testI120928}, }; header(); for (unsigned int i = 0; i < SAL_N_ELEMENTS(aMethods); ++i) @@ -1315,27 +1313,6 @@ void Test::testTableWidth() CPPUNIT_ASSERT_EQUAL(true, bool(getProperty<sal_Bool>(xTables->getByIndex(0), "IsWidthRelative"))); } -void Test::testI120928() -{ - // w:numPicBullet was ignored, leading to missing graphic bullet in numbering. - 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 - - bool bIsGraphic = false; - for (int i = 0; i < aProps.getLength(); ++i) - { - const beans::PropertyValue& rProp = aProps[i]; - - if (rProp.Name == "NumberingType") - CPPUNIT_ASSERT_EQUAL(style::NumberingType::BITMAP, rProp.Value.get<sal_Int16>()); - else if (rProp.Name == "GraphicURL") - bIsGraphic = true; - } - CPPUNIT_ASSERT_EQUAL(true, bIsGraphic); -} - CPPUNIT_TEST_SUITE_REGISTRATION(Test); CPPUNIT_PLUGIN_IMPLEMENT(); |