summaryrefslogtreecommitdiff
path: root/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/customshapes/EnhancedCustomShapeEngine.cxx')
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeEngine.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index fbba42ba8d01..0ac56ff21a43 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -188,8 +188,13 @@ SdrObject* EnhancedCustomShapeEngine::ImplForceGroupWithText( const SdrObjCustom
// get the text bounds and set at text object
Rectangle aTextBounds = pCustoObj->GetSnapRect();
- if( pCustoObj->GetTextBounds( aTextBounds ) )
- pTextObj->SetSnapRect( aTextBounds );
+ SdrObject* pSdrObjCustomShape( GetSdrObjectFromXShape( mxShape ) );
+ if ( pSdrObjCustomShape )
+ {
+ EnhancedCustomShape2d aCustomShape2d( pSdrObjCustomShape );
+ aTextBounds = aCustomShape2d.GetTextRect();
+ }
+ pTextObj->SetSnapRect( aTextBounds );
// if rotated, copy GeoStat, too.
const GeoStat& rSourceGeo = pCustoObj->GetGeoStat();