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-25 20:22:47 +0100
commit02d527344d8d18a01664f32416471161e2f78e27 (patch)
tree65803762c7215914b7175b2060939c660f64595f /oox
parent7d60c07613c5efec3ce1f217f00458296aeb5e3b (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 (cherry picked from commit aeb52a855d55475ff2e74f5308ae580dce3e069f)
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 15a8cb7df191..b795c3ed0a0b 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 ),