summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-06-10 12:20:31 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-06-10 12:42:06 +0100
commitaeb52a855d55475ff2e74f5308ae580dce3e069f (patch)
tree56cce35999a9fa855157e0907fdc378b28ba9cd0 /oox
parent80bff90943bb983033ace6339ff3e575666e8a74 (diff)
fix fatal attempt to export kde302504-1.odt to docx
the enhanced-path contains decimal points so the last element is a double not an integer Change-Id: I90be76a2d4cb90ee7a904aa72fe65770c675fc53
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx17
1 files changed, 9 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 ),