summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-06-10 13:05:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-06-25 20:22:47 +0100
commit5e9483c0e2573d759a96050070f51ff3b068c6af (patch)
tree3b512f337c9b796c031db777229133f79048fc9a /oox
parent02d527344d8d18a01664f32416471161e2f78e27 (diff)
similarly fix fatal export of kde216114-1.odt to docx
Change-Id: I78478de91473681fd8d836293dabe7b790dda516 (cherry picked from commit 80fbd731d8b8b101a10466a4d16d4867e9de968b)
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx41
1 files changed, 30 insertions, 11 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index b795c3ed0a0b..9d4d84dfb0d6 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -2282,9 +2282,11 @@ void DrawingML::WriteCustomGeometry( Reference< XShape > rXShape )
}
else
{
- sal_Int32 nXMin = aPairs[0].First.Value.get<sal_Int32>();
+ sal_Int32 nXMin(0);
+ aPairs[0].First.Value >>= nXMin;
sal_Int32 nXMax = nXMin;
- sal_Int32 nYMin = aPairs[0].Second.Value.get<sal_Int32>();
+ sal_Int32 nYMin(0);
+ aPairs[0].Second.Value >>= nYMin;
sal_Int32 nYMax = nYMin;
for ( int j = 0; j < aPairs.getLength(); ++j )
@@ -2321,9 +2323,13 @@ void DrawingML::WriteCustomGeometry( Reference< XShape > rXShape )
{
mpFS->startElementNS( XML_a, XML_moveTo, FSEND );
+ sal_Int32 nX(0), nY(0);
+ aPairs[nPairIndex].First.Value >>= nX;
+ aPairs[nPairIndex].Second.Value >>= nY;
+
mpFS->singleElementNS( XML_a, XML_pt,
- XML_x, I64S( aPairs[nPairIndex].First.Value.get<sal_Int32>() ),
- XML_y, I64S( aPairs[nPairIndex].Second.Value.get<sal_Int32>() ),
+ XML_x, I64S(nX),
+ XML_y, I64S(nY),
FSEND );
mpFS->endElementNS( XML_a, XML_moveTo );
@@ -2333,9 +2339,14 @@ void DrawingML::WriteCustomGeometry( Reference< XShape > rXShape )
case drawing::EnhancedCustomShapeSegmentCommand::LINETO :
{
mpFS->startElementNS( XML_a, XML_lnTo, FSEND );
+
+ sal_Int32 nX(0), nY(0);
+ aPairs[nPairIndex].First.Value >>= nX;
+ aPairs[nPairIndex].Second.Value >>= nY;
+
mpFS->singleElementNS( XML_a, XML_pt,
- XML_x, I64S( aPairs[nPairIndex].First.Value.get<sal_Int32>() ),
- XML_y, I64S( aPairs[nPairIndex].Second.Value.get<sal_Int32>() ),
+ XML_x, I64S(nX),
+ XML_y, I64S(nY),
FSEND );
mpFS->endElementNS( XML_a, XML_lnTo );
nPairIndex++;
@@ -2346,9 +2357,13 @@ void DrawingML::WriteCustomGeometry( Reference< XShape > rXShape )
mpFS->startElementNS( XML_a, XML_cubicBezTo, FSEND );
for( sal_uInt8 l = 0; l <= 2; ++l )
{
+ sal_Int32 nX(0), nY(0);
+ aPairs[nPairIndex+l].First.Value >>= nX;
+ aPairs[nPairIndex+l].Second.Value >>= nY;
+
mpFS->singleElementNS( XML_a, XML_pt,
- XML_x, I64S( aPairs[nPairIndex+l].First.Value.get<sal_Int32>() ),
- XML_y, I64S( aPairs[nPairIndex+l].Second.Value.get<sal_Int32>() ),
+ XML_x, I64S( nX ),
+ XML_y, I64S( nY ),
FSEND );
}
@@ -2381,10 +2396,14 @@ void DrawingML::WriteCustomGeometry( Reference< XShape > rXShape )
mpFS->startElementNS( XML_a, XML_quadBezTo, FSEND );
for( sal_uInt8 l = 0; l < 2; ++l )
{
+ sal_Int32 nX(0), nY(0);
+ aPairs[nPairIndex+l].First.Value >>= nX;
+ aPairs[nPairIndex+l].Second.Value >>= nY;
+
mpFS->singleElementNS( XML_a, XML_pt,
- XML_x, I64S( aPairs[nPairIndex+l].First.Value.get<sal_Int32>() ),
- XML_y, I64S( aPairs[nPairIndex+l].Second.Value.get<sal_Int32>() ),
- FSEND );
+ XML_x, I64S( nX ),
+ XML_y, I64S( nY ),
+ FSEND );
}
mpFS->endElementNS( XML_a, XML_quadBezTo );