Kaydet (Commit) 80fbd731 authored tarafından Caolán McNamara's avatar Caolán McNamara

similarly fix fatal export of kde216114-1.odt to docx

Change-Id: I78478de91473681fd8d836293dabe7b790dda516
üst aeb52a85
......@@ -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 );
......
......@@ -837,6 +837,12 @@ DECLARE_OOXMLEXPORT_TEST(testKDE302504, "kde302504-1.odt")
assertXPath(pXmlDoc, "//v:shape", "ID", "KoPathShape");
}
DECLARE_OOXMLEXPORT_TEST(testKDE216114, "kde216114-1.odt")
{
if (xmlDocPtr pXmlDoc = parseExport("word/document.xml"))
assertXPath(pXmlDoc, "//w:pict", 1);
}
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment