diff options
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/tdf89890.docx | bin | 0 -> 41925 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport.cxx | 23 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport4.cxx | 2 |
3 files changed, 24 insertions, 1 deletions
diff --git a/sw/qa/extras/ooxmlexport/data/tdf89890.docx b/sw/qa/extras/ooxmlexport/data/tdf89890.docx Binary files differnew file mode 100644 index 000000000000..8b3e8ebe189b --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/tdf89890.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx index fc05887962b4..20be877a78d9 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport.cxx @@ -703,6 +703,29 @@ DECLARE_OOXMLEXPORT_TEST(testTdf79639, "tdf79639.docx") CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(1), xDrawPage->getCount()); } +DECLARE_OOXMLEXPORT_TEST(testTdf89890, "tdf89890.docx") +{ + // Numbering picture bullet was too large. + 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 bFound = false; + for (int i = 0; i < aProps.getLength(); ++i) + { + const beans::PropertyValue& rProp = aProps[i]; + + if (rProp.Name == "GraphicSize") + { + // Height of the graphic was too large: 4382 after import, then 2485 after roundtrip. + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(279), rProp.Value.get<awt::Size>().Height); + bFound = true; + } + } + CPPUNIT_ASSERT(bFound); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx index 21140f319830..372735313b7a 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport4.cxx @@ -353,7 +353,7 @@ DECLARE_OOXMLEXPORT_TEST(testFDO74215, "FDO74215.docx") xmlDocPtr pXmlDoc = parseExport("word/numbering.xml"); if (!pXmlDoc) return; - assertXPath(pXmlDoc, "/w:numbering/w:numPicBullet[2]/w:pict/v:shape", "style", "width:6.4pt;height:6.4pt"); + assertXPath(pXmlDoc, "/w:numbering/w:numPicBullet[2]/w:pict/v:shape", "style", "width:7.9pt;height:7.9pt"); } DECLARE_OOXMLEXPORT_TEST(testColumnBreak_ColumnCountIsZero,"fdo74153.docx") |