summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdotxat.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/svdraw/svdotxat.cxx')
-rw-r--r--svx/source/svdraw/svdotxat.cxx8
1 files changed, 2 insertions, 6 deletions
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index f4c9528d4125..e88e55519930 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -62,10 +62,6 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt,
// Not a text frame. Bail out.
return false;
- if (!pModel)
- // Model doesn't exist. Bail out.
- return false;
-
if (rR.IsEmpty())
// Empty rectangle.
return false;
@@ -95,7 +91,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight( tools::Rectangle& rR, bool bHgt,
aNewSize.AdjustWidth( -1 ); aNewSize.AdjustHeight( -1 );
Size aMaxSiz(100000, 100000);
- Size aTmpSiz = pModel->GetMaxObjSize();
+ Size aTmpSiz(getSdrModelFromSdrObject().GetMaxObjSize());
if (aTmpSiz.Width())
aMaxSiz.setWidth( aTmpSiz.Width() );
@@ -312,7 +308,7 @@ bool SdrTextObj::AdjustTextFrameWidthAndHeight()
void SdrTextObj::ImpSetTextStyleSheetListeners()
{
- SfxStyleSheetBasePool* pStylePool=pModel!=nullptr ? pModel->GetStyleSheetPool() : nullptr;
+ SfxStyleSheetBasePool* pStylePool(getSdrModelFromSdrObject().GetStyleSheetPool());
if (pStylePool!=nullptr)
{
std::vector<OUString> aStyleNames;