Kaydet (Commit) 99e3cf1c authored tarafından Jochen Nitschke's avatar Jochen Nitschke Kaydeden (comit) Markus Mohrhard

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/29527Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 619e74cc
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment