diff options
-rw-r--r-- | oox/source/export/drawingml.cxx | 17 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlexport/data/kde302504-1.odt | bin | 0 -> 10014 bytes | |||
-rw-r--r-- | sw/qa/extras/ooxmlexport/ooxmlexport5.cxx | 6 |
3 files changed, 15 insertions, 8 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 236678a161ad..e510eb806b4c 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -2289,14 +2289,15 @@ void DrawingML::WriteCustomGeometry( Reference< XShape > rXShape ) for ( int j = 0; j < aPairs.getLength(); ++j ) { - if ( aPairs[j].First.Value.get<sal_Int32>() < nXMin ) - nXMin = aPairs[j].First.Value.get<sal_Int32>(); - if ( aPairs[j].Second.Value.get<sal_Int32>() < nYMin ) - nYMin = aPairs[j].Second.Value.get<sal_Int32>(); - if ( aPairs[j].First.Value.get<sal_Int32>() > nXMax ) - nXMax = aPairs[j].First.Value.get<sal_Int32>(); - if ( aPairs[j].Second.Value.get<sal_Int32>() > nYMax ) - nYMax = aPairs[j].Second.Value.get<sal_Int32>(); + sal_Int32 nCandidate(0); + if ((aPairs[j].First.Value >>= nCandidate) && nCandidate < nXMin) + nXMin = nCandidate; + if ((aPairs[j].Second.Value >>= nCandidate) && nCandidate < nYMin) + nYMin = nCandidate; + if ((aPairs[j].First.Value >>= nCandidate) && nCandidate > nXMax) + nXMax = nCandidate; + if ((aPairs[j].Second.Value >>= nCandidate) && nCandidate > nYMax) + nYMax = nCandidate; } mpFS->startElementNS( XML_a, XML_path, XML_w, I64S( nXMax - nXMin ), diff --git a/sw/qa/extras/ooxmlexport/data/kde302504-1.odt b/sw/qa/extras/ooxmlexport/data/kde302504-1.odt Binary files differnew file mode 100644 index 000000000000..d0b7c6017dfa --- /dev/null +++ b/sw/qa/extras/ooxmlexport/data/kde302504-1.odt diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx index b63d7559f3a9..67ad8df9cdab 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport5.cxx @@ -831,6 +831,12 @@ DECLARE_OOXMLEXPORT_TEST(testOO67471, "ooo67471-2.odt") assertXPathContent(pXmlDoc, "(//w:t)[2]", "B"); } +DECLARE_OOXMLEXPORT_TEST(testKDE302504, "kde302504-1.odt") +{ + if (xmlDocPtr pXmlDoc = parseExport("word/document.xml")) + assertXPath(pXmlDoc, "//v:shape", "ID", "KoPathShape"); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |