summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdotxed.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/svdraw/svdotxed.cxx')
-rw-r--r--svx/source/svdraw/svdotxed.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/svx/source/svdraw/svdotxed.cxx b/svx/source/svdraw/svdotxed.cxx
index 3290435144b1..bb3e60d9291b 100644
--- a/svx/source/svdraw/svdotxed.cxx
+++ b/svx/source/svdraw/svdotxed.cxx
@@ -49,7 +49,7 @@ bool SdrTextObj::BegTextEdit(SdrOutliner& rOutl)
if ( !IsOutlText() )
nOutlinerMode = OutlinerMode::TextObject;
rOutl.Init( nOutlinerMode );
- rOutl.SetRefDevice( pModel->GetRefDevice() );
+ rOutl.SetRefDevice(getSdrModelFromSdrObject().GetRefDevice());
bool bFitToSize(IsFitToSize());
bool bContourFrame=IsContourTextFrame();
@@ -146,11 +146,9 @@ void SdrTextObj::TakeTextEditArea(Size* pPaperMin, Size* pPaperMax, tools::Recta
Size aAnkSiz(aViewInit.GetSize());
aAnkSiz.AdjustWidth( -1 ); aAnkSiz.AdjustHeight( -1 ); // because GetSize() adds 1
Size aMaxSiz(1000000,1000000);
- if (pModel!=nullptr) {
- Size aTmpSiz(pModel->GetMaxObjSize());
- if (aTmpSiz.Width()!=0) aMaxSiz.setWidth(aTmpSiz.Width() );
- if (aTmpSiz.Height()!=0) aMaxSiz.setHeight(aTmpSiz.Height() );
- }
+ Size aTmpSiz(getSdrModelFromSdrObject().GetMaxObjSize());
+ if (aTmpSiz.Width()!=0) aMaxSiz.setWidth(aTmpSiz.Width() );
+ if (aTmpSiz.Height()!=0) aMaxSiz.setHeight(aTmpSiz.Height() );
// Done earlier since used in else tree below
SdrTextHorzAdjust eHAdj(GetTextHorizontalAdjust());