summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@suse.cz>2013-04-04 21:22:07 +0200
committerMiklos Vajna <vmiklos@suse.cz>2013-04-04 21:29:18 +0200
commitdf4a954c825e23ecb1df9416ccf2e5566274c53b (patch)
treeb1beda7679e45bd79dc06f6e2f18c75fefd6f577 /sw
parentb8764dd6e13d3a11fdce23fe1098f19b6c7ecdb8 (diff)
w:numPicBullet import testcase
Change-Id: I70ccfe4d927f404ce90d970e76fdbf0e2d7a5cf7
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/ooxmlimport/data/i120928.docxbin0 -> 16550 bytes
-rw-r--r--sw/qa/extras/ooxmlimport/ooxmlimport.cxx23
2 files changed, 23 insertions, 0 deletions
diff --git a/sw/qa/extras/ooxmlimport/data/i120928.docx b/sw/qa/extras/ooxmlimport/data/i120928.docx
new file mode 100644
index 000000000000..ce78653e98e4
--- /dev/null
+++ b/sw/qa/extras/ooxmlimport/data/i120928.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 7c4051c1d847..14228f14b634 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -124,6 +124,7 @@ public:
void testFdo60922();
void testFdo59273();
void testTableWidth();
+ void testI120928();
CPPUNIT_TEST_SUITE(Test);
#if !defined(MACOSX) && !defined(WNT)
@@ -199,6 +200,7 @@ 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)
@@ -1313,6 +1315,27 @@ 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();