oox/source/drawingml/shape.cxx |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

New commits:
commit 72499d57daf8f53dae268b2160fa0585ed0bd36d
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Mar 30 09:05:09 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Wed Mar 30 12:20:35 2022 +0200

    ofz#46160 Use-of-uninitialized-value
    
    Change-Id: Ic39fd3579623563adf16025442bb634a273decb7
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132298
    Tested-by: Caolán McNamara <caol...@redhat.com>
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 2ef801c5ee08..12eb72d40542 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -1654,30 +1654,28 @@ Reference< XShape > const & Shape::createAndInsert(
 
         if (bIsConnectorShape)
         {
-            ConnectorType aConnectorType;
             sal_Int32 nType = mpCustomShapePropertiesPtr->getShapePresetType();
             switch (nType)
             {
             case XML_line:
             case XML_straightConnector1:
-                aConnectorType = ConnectorType_LINE;
+                xSet->setPropertyValue("EdgeKind", Any(ConnectorType_LINE));
                 break;
             case XML_bentConnector2:
             case XML_bentConnector3:
             case XML_bentConnector4:
             case XML_bentConnector5:
-                aConnectorType = ConnectorType_STANDARD;
+                xSet->setPropertyValue("EdgeKind", 
Any(ConnectorType_STANDARD));
                 break;
             case XML_curvedConnector2:
             case XML_curvedConnector3:
             case XML_curvedConnector4:
             case XML_curvedConnector5:
-                aConnectorType = ConnectorType_CURVE;
+                xSet->setPropertyValue("EdgeKind", Any(ConnectorType_CURVE));
                 break;
             default:
                 break;
             }
-            xSet->setPropertyValue("EdgeKind", Any(aConnectorType));
         }
 
         if( bIsCustomShape )

Reply via email to