summaryrefslogtreecommitdiff
path: root/svx/source/unodraw/unoshape.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/unodraw/unoshape.cxx')
-rw-r--r--svx/source/unodraw/unoshape.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index f9bae61e7008..8a78b92cbd53 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -1253,7 +1253,15 @@ void SAL_CALL SvxShape::setSize( const awt::Size& rSize )
if( mpObj.is() && mpModel)
{
- Rectangle aRect( svx_getLogicRectHack(mpObj.get()) );
+ // #i123539# optimization for 3D chart object generation: do not use UNO
+ // API commmands to get the range, this is too expensive since for 3D
+ // scenes it may recalculate the whole scene since in AOO this depends
+ // on the contained geometry (layouted to show all content)
+ const bool b3DConstruction(dynamic_cast< E3dObject* >(mpObj.get()) && mpModel->isLocked());
+ Rectangle aRect(
+ b3DConstruction ?
+ Rectangle(maPosition.X, maPosition.Y, maSize.Width, maSize.Height) :
+ svx_getLogicRectHack(mpObj.get()) );
Size aLocalSize( rSize.Width, rSize.Height );
ForceMetricToItemPoolMetric(aLocalSize);