summaryrefslogtreecommitdiff
path: root/xmloff/source/draw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-06-22 09:42:58 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-06-22 13:06:49 +0200
commitc5d984b840db595796051bc2bf37d1c2179157e3 (patch)
treed6ae36b4315e18550c1b9e3107e216375907edd4 /xmloff/source/draw
parentb9ea3467383ccdfe4be842e61267256f281487ee (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/+/117616 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r--xmloff/source/draw/shapeexport.cxx31
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);
+ }
}
}
}