diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-06-10 13:05:51 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-06-10 13:05:51 +0100 |
commit | 80fbd731d8b8b101a10466a4d16d4867e9de968b (patch) | |
tree | 11e2ef1ee082690ddd721c2b01ccb211ac1e8c99 /oox/source | |
parent | aeb52a855d55475ff2e74f5308ae580dce3e069f (diff) |
similarly fix fatal export of kde216114-1.odt to docx
Change-Id: I78478de91473681fd8d836293dabe7b790dda516
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/export/drawingml.cxx | 41 |
1 files changed, 30 insertions, 11 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index e510eb806b4c..df535f80de77 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 ); |