summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorTünde Tóth <toth.tunde@nisz.hu>2021-01-06 13:24:10 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-01-18 10:58:30 +0100
commit6492679040db6415543119ada9d1124bd532ec6a (patch)
tree875b2829ead6934a6bbbb6ea12d9e9c16f644259 /oox
parentad3b51b5b383dc9c7302b6d1d2e7f6daad5d4d5b (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> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109446 Tested-by: Jenkins
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx28
1 files changed, 27 insertions, 1 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 9eeacf4d2b19..559b35b9023f 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -3576,7 +3576,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: