diff options
author | Caolán McNamara <caolanm@redhat.com> | 2021-06-22 09:42:58 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2021-06-22 17:02:10 +0200 |
commit | 25d253d3bf9ad822a967e7d78caed70a6ce6544c (patch) | |
tree | f1acf1d25f4e3e8cb281bd30ff55884ad3072380 /xmloff | |
parent | 66e234549a15cad1b5b61661fb28c7f827ed6e8b (diff) |
crashtesting: assert on export of tdf105134-1.docx to odt
when interactively saving on creating preview for recently used
Change-Id: I9d859cf404c34659653a14f8c2a94f867c704b7e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117633
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/draw/shapeexport.cxx | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index e68bf388325f..5ed81e82a247 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -2129,23 +2129,26 @@ void XMLShapeExport::ImpExportLineShape( // create base position awt::Point aBasePosition(FRound(aTRTranslate.getX()), FRound(aTRTranslate.getY())); - // get the two points - uno::Any aAny(xPropSet->getPropertyValue("Geometry")); - if (auto pSourcePolyPolygon - = o3tl::tryAccess<drawing::PointSequenceSequence>(aAny)) + if (xPropSet->getPropertySetInfo()->hasPropertyByName("Geometry")) { - if (pSourcePolyPolygon->getLength() > 0) + // get the two points + uno::Any aAny(xPropSet->getPropertyValue("Geometry")); + if (auto pSourcePolyPolygon + = o3tl::tryAccess<drawing::PointSequenceSequence>(aAny)) { - const drawing::PointSequence& rInnerSequence = (*pSourcePolyPolygon)[0]; - if (rInnerSequence.hasElements()) + if (pSourcePolyPolygon->getLength() > 0) { - const awt::Point& rPoint = rInnerSequence[0]; - aStart = awt::Point(rPoint.X + aBasePosition.X, rPoint.Y + aBasePosition.Y); - } - if (rInnerSequence.getLength() > 1) - { - const awt::Point& rPoint = rInnerSequence[1]; - aEnd = awt::Point(rPoint.X + aBasePosition.X, rPoint.Y + aBasePosition.Y); + const drawing::PointSequence& rInnerSequence = (*pSourcePolyPolygon)[0]; + if (rInnerSequence.hasElements()) + { + const awt::Point& rPoint = rInnerSequence[0]; + aStart = awt::Point(rPoint.X + aBasePosition.X, rPoint.Y + aBasePosition.Y); + } + if (rInnerSequence.getLength() > 1) + { + const awt::Point& rPoint = rInnerSequence[1]; + aEnd = awt::Point(rPoint.X + aBasePosition.X, rPoint.Y + aBasePosition.Y); + } } } } |