[Libreoffice-commits] core.git: Branch 'libreoffice-7-2' - xmloff/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Tue Jun 22 15:02:43 UTC 2021


 xmloff/source/draw/shapeexport.cxx |   31 +++++++++++++++++--------------
 1 file changed, 17 insertions(+), 14 deletions(-)

New commits:
commit 25d253d3bf9ad822a967e7d78caed70a6ce6544c
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Jun 22 09:42:58 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Tue Jun 22 17:02:10 2021 +0200

    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 at redhat.com>

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);
+                }
             }
         }
     }


More information about the Libreoffice-commits mailing list