diff options
author | Tünde Tóth <toth.tunde@nisz.hu> | 2021-01-06 13:24:10 +0100 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2021-01-15 10:49:54 +0100 |
commit | 7337e7e74d8bde77a56552bcb7b40bf1668c87b7 (patch) | |
tree | 48e1ce0de2ad974d27cf65b2a177e7a2de6ce1a8 /oox | |
parent | d5d905b480c2a9b1db982f2867e87b5c230d1ab9 (diff) |
tdf#61028 OOXML export: fix lost arcTo shape
a:custGeom was exported without the a:arcTo element
and its attributes.
Note: see customshapegeometry.cxx for import of a:arcTo
attributes.
Change-Id: I611ea9fb6a81d45cfd52a16abbb37071ea0ce7d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108874
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/drawingml.cxx | 28 |
1 files changed, 27 insertions, 1 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index c63e7d4181f1..8e8acb50cc92 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -3589,7 +3589,33 @@ bool DrawingML::WriteCustomGeometry( } case drawing::EnhancedCustomShapeSegmentCommand::ARCANGLETO : { - nPairIndex += 2; + if (nPairIndex + 1 >= aPairs.getLength()) + bOK = false; + else + { + const EnhancedCustomShape2d aCustoShape2d( + const_cast<SdrObjCustomShape&>(rSdrObjCustomShape)); + double fWR = 0.0; + aCustoShape2d.GetParameter(fWR, aPairs[nPairIndex].First, false, + false); + double fHR = 0.0; + aCustoShape2d.GetParameter(fHR, aPairs[nPairIndex].Second, + false, false); + double fStartAngle = 0.0; + aCustoShape2d.GetParameter( + fStartAngle, aPairs[nPairIndex + 1].First, false, false); + sal_Int32 nStartAng(std::lround(fStartAngle * 60000)); + double fSwingAng = 0.0; + aCustoShape2d.GetParameter( + fSwingAng, aPairs[nPairIndex + 1].Second, false, false); + sal_Int32 nSwingAng(std::lround(fSwingAng * 60000)); + mpFS->singleElement(FSNS(XML_a, XML_arcTo), + XML_wR, OString::number(fWR), + XML_hR, OString::number(fHR), + XML_stAng, OString::number(nStartAng), + XML_swAng, OString::number(nSwingAng)); + nPairIndex += 2; + } break; } default: |