[Libreoffice-commits] core.git: chart2/source

Jochen Nitschke j.nitschke+logerrit at ok.de
Sat Oct 15 02:56:53 UTC 2016


 chart2/source/view/main/ShapeFactory.cxx |   19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

New commits:
commit 99e3cf1ce98357ae068b52d726be1b76df5278fe
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Tue Oct 4 23:11:58 2016 +0200

    avoid exception
    
    Transformation is an optional property of XShape,
    rATransformation can refer to an empty Any.
    
    results in warnings like this, e.g. when you add a legend:
    > warn:chart2:27587:1:chart2/source/view/main/ShapeFactory.cxx:2135:
    > Exception caught. Type: N3com3sun4star3uno9ExceptionE, Message:
    
    set Transformation property only if needed
    
    Change-Id: I1edae0a984f8264a6a0638b90a7197e316832c02
    Reviewed-on: https://gerrit.libreoffice.org/29527
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>

diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index bf8de16..d9ccc32 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -2225,15 +2225,18 @@ uno::Reference< drawing::XShape >
         //set whole text shape properties
         PropertyMapper::setMultiProperties( rPropNames, rPropValues, xProp );
 
-        //set position matrix
-        //the matrix needs to be set at the end behind autogrow and such position influencing properties
-        try
-        {
-            xProp->setPropertyValue( "Transformation", rATransformation );
-        }
-        catch( const uno::Exception& e )
+        if (rATransformation.hasValue())
         {
-            ASSERT_EXCEPTION( e );
+            //set position matrix
+            //the matrix needs to be set at the end behind autogrow and such position influencing properties
+            try
+            {
+                xProp->setPropertyValue( "Transformation", rATransformation );
+            }
+            catch( const uno::Exception& e )
+            {
+                ASSERT_EXCEPTION( e );
+            }
         }
     }
     return xShape;


More information about the Libreoffice-commits mailing list