summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/docdraw.cxx4
-rw-r--r--sw/source/core/doc/textboxhelper.cxx2
-rw-r--r--sw/source/core/draw/dcontact.cxx16
-rw-r--r--sw/source/core/draw/dflyobj.cxx4
-rw-r--r--sw/source/core/draw/dview.cxx2
-rw-r--r--sw/source/core/frmedt/fecopy.cxx10
-rw-r--r--sw/source/core/frmedt/feshview.cxx4
-rw-r--r--sw/source/core/layout/flylay.cxx8
-rw-r--r--sw/source/core/layout/frmtool.cxx6
-rw-r--r--sw/source/filter/html/htmldrawreader.cxx3
-rw-r--r--sw/source/filter/ww8/docxsdrexport.cxx17
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx17
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx16
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx4
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx4
-rw-r--r--sw/source/filter/xml/swxml.cxx2
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx2
-rw-r--r--sw/source/uibase/shells/drwbassh.cxx2
-rw-r--r--sw/source/uibase/uno/unotxvw.cxx2
19 files changed, 37 insertions, 88 deletions
diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx
index 2acd8c41561e..5ea865f618d1 100644
--- a/sw/source/core/doc/docdraw.cxx
+++ b/sw/source/core/doc/docdraw.cxx
@@ -577,7 +577,7 @@ namespace docfunc
{
const SdrPage& rSdrPage( *(p_rDoc.getIDocumentDrawModelAccess().GetDrawModel()->GetPage( 0 )) );
- SdrObjListIter aIter( rSdrPage, SdrIterMode::Flat );
+ SdrObjListIter aIter( &rSdrPage, SdrIterMode::Flat );
while( aIter.IsMore() )
{
SdrObject* pObj( aIter.Next() );
@@ -602,7 +602,7 @@ namespace docfunc
{
const SdrPage& rSdrPage( *(p_rDoc.getIDocumentDrawModelAccess().GetDrawModel()->GetPage( 0 )) );
- SdrObjListIter aIter( rSdrPage, SdrIterMode::Flat );
+ SdrObjListIter aIter( &rSdrPage, SdrIterMode::Flat );
while( aIter.IsMore() )
{
SdrObject* pObj( aIter.Next() );
diff --git a/sw/source/core/doc/textboxhelper.cxx b/sw/source/core/doc/textboxhelper.cxx
index 3377220d98fd..a958a9e80d1e 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -212,7 +212,7 @@ uno::Any SwTextBoxHelper::getByIndex(SdrPage const* pPage, sal_Int32 nIndex)
sal_Int32 SwTextBoxHelper::getOrdNum(const SdrObject* pObject)
{
- if (const SdrPage* pPage = pObject->GetPage())
+ if (const SdrPage* pPage = pObject->getSdrPageFromSdrObject())
{
sal_Int32 nOrder = 0; // Current logical order.
for (std::size_t i = 0; i < pPage->GetObjCount(); ++i)
diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx
index de8d91615722..6b569bae2a77 100644
--- a/sw/source/core/draw/dcontact.cxx
+++ b/sw/source/core/draw/dcontact.cxx
@@ -484,8 +484,8 @@ SwFlyDrawContact::~SwFlyDrawContact()
if ( mpMasterObj )
{
mpMasterObj->SetUserCall( nullptr );
- if ( mpMasterObj->GetPage() )
- mpMasterObj->GetPage()->RemoveObject( mpMasterObj->GetOrdNum() );
+ if ( mpMasterObj->getSdrPageFromSdrObject() )
+ mpMasterObj->getSdrPageFromSdrObject()->RemoveObject( mpMasterObj->GetOrdNum() );
}
}
@@ -531,7 +531,7 @@ SwVirtFlyDrawObj* SwFlyDrawContact::CreateNewRef(SwFlyFrame* pFly, SwFlyFrameFor
// After creating the first Reference the Masters are removed from the
// List and are not important anymore.
SdrPage* pPg(nullptr);
- if(nullptr != (pPg = pContact->GetMaster()->GetPage()))
+ if(nullptr != (pPg = pContact->GetMaster()->getSdrPageFromSdrObject()))
{
const size_t nOrdNum = pContact->GetMaster()->GetOrdNum();
pPg->ReplaceObject(pDrawObj, nOrdNum);
@@ -2231,14 +2231,14 @@ void SwDrawVirtObj::AddToDrawingPage()
// insert 'virtual' drawing object into page, set layer and user call.
SdrPage* pDrawPg;
// #i27030# - apply order number of referenced object
- if ( nullptr != ( pDrawPg = pOrgMasterSdrObj->GetPage() ) )
+ if ( nullptr != ( pDrawPg = pOrgMasterSdrObj->getSdrPageFromSdrObject() ) )
{
// #i27030# - apply order number of referenced object
pDrawPg->InsertObject( this, GetReferencedObj().GetOrdNum() );
}
else
{
- pDrawPg = GetPage();
+ pDrawPg = getSdrPageFromSdrObject();
if ( pDrawPg )
{
pDrawPg->SetObjectOrdNum( GetOrdNumDirect(),
@@ -2255,9 +2255,9 @@ void SwDrawVirtObj::AddToDrawingPage()
void SwDrawVirtObj::RemoveFromDrawingPage()
{
SetUserCall( nullptr );
- if ( GetPage() )
+ if ( getSdrPageFromSdrObject() )
{
- GetPage()->RemoveObject( GetOrdNum() );
+ getSdrPageFromSdrObject()->RemoveObject( GetOrdNum() );
}
}
@@ -2265,7 +2265,7 @@ void SwDrawVirtObj::RemoveFromDrawingPage()
bool SwDrawVirtObj::IsConnected() const
{
bool bRetVal = GetAnchorFrame() &&
- ( GetPage() && GetUserCall() );
+ ( getSdrPageFromSdrObject() && GetUserCall() );
return bRetVal;
}
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx
index eeebd9531207..41ba37b3089b 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -434,8 +434,8 @@ SwVirtFlyDrawObj::SwVirtFlyDrawObj(
SwVirtFlyDrawObj::~SwVirtFlyDrawObj()
{
- if ( GetPage() ) //Withdraw SdrPage the responsibility.
- GetPage()->RemoveObject( GetOrdNum() );
+ if ( getSdrPageFromSdrObject() ) //Withdraw SdrPage the responsibility.
+ getSdrPageFromSdrObject()->RemoveObject( GetOrdNum() );
}
const SwFrameFormat *SwVirtFlyDrawObj::GetFormat() const
diff --git a/sw/source/core/draw/dview.cxx b/sw/source/core/draw/dview.cxx
index 255163443a96..5bcd919937d3 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -315,7 +315,7 @@ sal_uInt32 SwDrawView::GetMaxChildOrdNum( const SwFlyFrame& _rParentObj,
{
sal_uInt32 nMaxChildOrdNum = _rParentObj.GetDrawObj()->GetOrdNum();
- const SdrPage* pDrawPage = _rParentObj.GetDrawObj()->GetPage();
+ const SdrPage* pDrawPage = _rParentObj.GetDrawObj()->getSdrPageFromSdrObject();
OSL_ENSURE( pDrawPage,
"<SwDrawView::GetMaxChildOrdNum(..) - missing drawing page at parent object - crash!" );
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index 478bb781b116..804ae7d33aac 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -931,11 +931,11 @@ bool SwFEShell::Paste( SwDoc* pClpDoc )
SdrObjList* pList = pNew->getParentOfSdrObject();
if ( pList )
{
- SdrObject* pOwner = pList->GetOwnerObj();
- if ( pOwner )
+ SdrObjGroup* pOwner(dynamic_cast< SdrObjGroup* >(pList->getSdrObjectFromSdrObjList()));
+
+ if(nullptr != pOwner)
{
- SdrObjGroup* pThisGroup = dynamic_cast<SdrObjGroup*>( pOwner );
- aGrpAnchor = pThisGroup->GetAnchorPos();
+ aGrpAnchor = pOwner->GetAnchorPos();
}
}
@@ -1269,7 +1269,7 @@ static void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SdrModel& _rModel )
{
// setup object iterator in order to iterate through all objects
// including objects in group objects, but exclusive group objects.
- SdrObjListIter aIter(*(_rModel.GetPage( nPgNum )));
+ SdrObjListIter aIter(_rModel.GetPage(nPgNum));
while( aIter.IsMore() )
{
SdrOle2Obj* pOle2Obj = dynamic_cast< SdrOle2Obj* >( aIter.Next() );
diff --git a/sw/source/core/frmedt/feshview.cxx b/sw/source/core/frmedt/feshview.cxx
index 723f763ded5c..e356ef8a69af 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1523,7 +1523,7 @@ const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool
OSL_ENSURE( pList, "No object list to iterate" );
- SdrObjListIter aObjIter( *pList, bFlat ? SdrIterMode::Flat : SdrIterMode::DeepNoGroups );
+ SdrObjListIter aObjIter( pList, bFlat ? SdrIterMode::Flat : SdrIterMode::DeepNoGroups );
while ( aObjIter.IsMore() )
{
SdrObject* pObj = aObjIter.Next();
@@ -1576,7 +1576,7 @@ const SdrObject* SwFEShell::GetBestObject( bool bNext, GotoObjFlags eType, bool
(aCurPos.getX() < aPos.getX())) ) // " reverse
{
aBestPos = Point( nTmp, nTmp );
- SdrObjListIter aTmpIter( *pList, bFlat ? SdrIterMode::Flat : SdrIterMode::DeepNoGroups );
+ SdrObjListIter aTmpIter( pList, bFlat ? SdrIterMode::Flat : SdrIterMode::DeepNoGroups );
while ( aTmpIter.IsMore() )
{
SdrObject* pTmpObj = aTmpIter.Next();
diff --git a/sw/source/core/layout/flylay.cxx b/sw/source/core/layout/flylay.cxx
index 2a20c9c70e9d..f07f386e63d4 100644
--- a/sw/source/core/layout/flylay.cxx
+++ b/sw/source/core/layout/flylay.cxx
@@ -825,8 +825,8 @@ void SwPageFrame::AppendFlyToPage( SwFlyFrame *pNew )
{
//#i119945# set pFly's OrdNum to _rNewObj's. So when pFly is removed by Undo, the original OrdNum will not be changed.
sal_uInt32 nNewNum = pObj->GetOrdNumDirect();
- if ( pObj->GetPage() )
- pObj->GetPage()->SetObjectOrdNum( pFly->GetVirtDrawObj()->GetOrdNumDirect(), nNewNum );
+ if ( pObj->getSdrPageFromSdrObject() )
+ pObj->getSdrPageFromSdrObject()->SetObjectOrdNum( pFly->GetVirtDrawObj()->GetOrdNumDirect(), nNewNum );
else
pFly->GetVirtDrawObj()->SetOrdNum( nNewNum );
}
@@ -1060,8 +1060,8 @@ void SwPageFrame::AppendDrawObjToPage( SwAnchoredObject& _rNewObj )
{
//#i119945# set pFly's OrdNum to _rNewObj's. So when pFly is removed by Undo, the original OrdNum will not be changed.
sal_uInt32 nNewNum = _rNewObj.GetDrawObj()->GetOrdNumDirect();
- if ( _rNewObj.GetDrawObj()->GetPage() )
- _rNewObj.DrawObj()->GetPage()->SetObjectOrdNum( pFlyFrame->GetVirtDrawObj()->GetOrdNumDirect(), nNewNum );
+ if ( _rNewObj.GetDrawObj()->getSdrPageFromSdrObject() )
+ _rNewObj.DrawObj()->getSdrPageFromSdrObject()->SetObjectOrdNum( pFlyFrame->GetVirtDrawObj()->GetOrdNumDirect(), nNewNum );
else
pFlyFrame->GetVirtDrawObj()->SetOrdNum( nNewNum );
}
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 0df9ee9c5900..07e5dc779c8b 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1027,7 +1027,7 @@ void AppendObjs( const SwFrameFormats *pTable, sal_uLong nIndex,
}
if ( pSdrObj )
{
- if ( !pSdrObj->GetPage() )
+ if ( !pSdrObj->getSdrPageFromSdrObject() )
{
pFormat->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0)->
InsertObject(pSdrObj, pSdrObj->GetOrdNumDirect());
@@ -2656,10 +2656,10 @@ static void lcl_Regist( SwPageFrame *pPage, const SwFrame *pAnch )
const SwFlyFrame* pFly = pAnch->FindFlyFrame();
if ( pFly &&
pObj->GetDrawObj()->GetOrdNum() < pFly->GetVirtDrawObj()->GetOrdNum() &&
- pObj->GetDrawObj()->GetPage() )
+ pObj->GetDrawObj()->getSdrPageFromSdrObject() )
{
//#i119945# set pFly's OrdNum to pObj's. So when pFly is removed by Undo, the original OrdNum will not be changed.
- pObj->DrawObj()->GetPage()->SetObjectOrdNum( pFly->GetVirtDrawObj()->GetOrdNumDirect(),
+ pObj->DrawObj()->getSdrPageFromSdrObject()->SetObjectOrdNum( pFly->GetVirtDrawObj()->GetOrdNumDirect(),
pObj->GetDrawObj()->GetOrdNumDirect() );
}
}
diff --git a/sw/source/filter/html/htmldrawreader.cxx b/sw/source/filter/html/htmldrawreader.cxx
index 8b1589563026..8b7413ebdef3 100644
--- a/sw/source/filter/html/htmldrawreader.cxx
+++ b/sw/source/filter/html/htmldrawreader.cxx
@@ -358,8 +358,7 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
m_pMarquee = SdrObjFactory::MakeNewObject(
*pModel,
SdrInventor::Default,
- OBJ_TEXT,
- pPg);
+ OBJ_TEXT);
if( !m_pMarquee )
return;
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index a5bd0bc8f571..75e05dd3b22c 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -758,20 +758,6 @@ void DocxSdrExport::endDMLAnchorInline(const SwFrameFormat* pFrameFormat)
void DocxSdrExport::writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat& rFrameFormat)
{
- bool bSwapInPage = false;
- if (!sdrObj->GetPage())
- {
- if (SdrModel* pModel
- = m_pImpl->m_rExport.m_pDoc->getIDocumentDrawModelAccess().GetDrawModel())
- {
- if (SdrPage* pPage = pModel->GetPage(0))
- {
- bSwapInPage = true;
- const_cast<SdrObject*>(sdrObj)->SetPage(pPage);
- }
- }
- }
-
m_pImpl->m_pSerializer->startElementNS(XML_w, XML_pict, FSEND);
m_pImpl->m_pDrawingML->SetFS(m_pImpl->m_pSerializer);
// See WinwordAnchoring::SetAnchoring(), these are not part of the SdrObject, have to be passed around manually.
@@ -782,9 +768,6 @@ void DocxSdrExport::writeVMLDrawing(const SdrObject* sdrObj, const SwFrameFormat
*sdrObj, rHoriOri.GetHoriOrient(), rVertOri.GetVertOrient(), rHoriOri.GetRelationOrient(),
rVertOri.GetRelationOrient(), true);
m_pImpl->m_pSerializer->endElementNS(XML_w, XML_pict);
-
- if (bSwapInPage)
- const_cast<SdrObject*>(sdrObj)->SetPage(nullptr);
}
bool lcl_isLockedCanvas(const uno::Reference<drawing::XShape>& xShape)
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 42199d4770b6..e44a7dd85a96 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1882,20 +1882,6 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const ww8::Frame& rFrame, const Poi
const SdrObject* pSdrObj = rFrame.GetFrameFormat().FindRealSdrObject();
if (pSdrObj)
{
- bool bSwapInPage = false;
- if (!pSdrObj->GetPage())
- {
- if (SwDrawModel* pModel
- = m_rExport.m_pDoc->getIDocumentDrawModelAccess().GetDrawModel())
- {
- if (SdrPage* pPage = pModel->GetPage(0))
- {
- bSwapInPage = true;
- const_cast<SdrObject*>(pSdrObj)->SetPage(pPage);
- }
- }
- }
-
m_aRunText->append("{" OOO_STRING_SVTOOLS_RTF_FIELD "{");
m_aRunText->append(OOO_STRING_SVTOOLS_RTF_IGNORE);
m_aRunText->append(OOO_STRING_SVTOOLS_RTF_FLDINST);
@@ -1907,9 +1893,6 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const ww8::Frame& rFrame, const Poi
m_aRunText->append('}');
m_aRunText->append('}');
-
- if (bSwapInPage)
- const_cast<SdrObject*>(pSdrObj)->SetPage(nullptr);
}
}
break;
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index fda60b12ce8d..19ab8097e7d5 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -2283,23 +2283,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
const SdrObject* pSdrObj = rFormat.FindRealSdrObject();
if (pSdrObj)
{
- bool bSwapInPage = false;
- if (!pSdrObj->GetPage())
- {
- if (SwDrawModel* pModel = rWrt.m_pDoc->getIDocumentDrawModelAccess().GetDrawModel())
- {
- if (SdrPage *pPage = pModel->GetPage(0))
- {
- bSwapInPage = true;
- const_cast<SdrObject*>(pSdrObj)->SetPage(pPage);
- }
- }
- }
-
nShapeId = AddSdrObject(*pSdrObj);
-
- if (bSwapInPage)
- const_cast<SdrObject*>(pSdrObj)->SetPage(nullptr);
}
#if OSL_DEBUG_LEVEL > 0
else
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 53a3c3289f71..31beefff762e 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2865,7 +2865,7 @@ SwFrameFormat* SwWW8ImplReader::MungeTextIntoDrawBox(SvxMSDffImportRec *pRecord,
// remove the object from Z-Order list
m_xMSDffManager->RemoveFromShapeOrder( pSdrTextObj );
// take the object from the drawing page
- if( pSdrTextObj->GetPage() )
+ if( pSdrTextObj->getSdrPageFromSdrObject() )
m_pDrawPg->RemoveObject( pSdrTextObj->GetOrdNum() );
// and delete FrameFormat, because replaced by graphic
// (this also deletes the object)
@@ -3093,7 +3093,7 @@ SwFlyFrameFormat* SwWW8ImplReader::ImportReplaceableDrawables( SdrObject* &rpObj
// remove old object from Z-Order-List
m_xMSDffManager->RemoveFromShapeOrder( rpObject );
// remove from Drawing-Page
- if( rpObject->GetPage() )
+ if( rpObject->getSdrPageFromSdrObject() )
m_pDrawPg->RemoveObject( rpObject->GetOrdNum() );
// and delete the object
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 2998c26f93f3..338b27aebe6a 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -713,7 +713,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj const * pTextObj,
pOurNewObject );
// delete and destroy old SdrGrafObj from page
- if (pObject->GetPage())
+ if (pObject->getSdrPageFromSdrObject())
m_pDrawPg->RemoveObject(pObject->GetOrdNum());
SdrObject::Free( pObject );
}
@@ -725,7 +725,7 @@ SwFrameFormat* SwWW8ImplReader::ImportGraf(SdrTextObj const * pTextObj,
m_xMSDffManager->RemoveFromShapeOrder( pObject );
// also delete this from the page if not grouped
- if (pTextObj && !bTextObjWasGrouped && pTextObj->GetPage())
+ if (pTextObj && !bTextObjWasGrouped && pTextObj->getSdrPageFromSdrObject())
m_pDrawPg->RemoveObject( pTextObj->GetOrdNum() );
}
m_xMSDffManager->EnableFallbackStream();
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index b04e2edc3117..cdeee03a3a96 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -440,7 +440,7 @@ static void lcl_ConvertSdrOle2ObjsToSdrGrafObjs(SwDoc& _rDoc)
const SdrPage& rSdrPage( *(_rDoc.getIDocumentDrawModelAccess().GetDrawModel()->GetPage( 0 )) );
// iterate recursive with group objects over all shapes on the draw page
- SdrObjListIter aIter( rSdrPage );
+ SdrObjListIter aIter( &rSdrPage );
while( aIter.IsMore() )
{
SdrOle2Obj* pOle2Obj = dynamic_cast< SdrOle2Obj* >( aIter.Next() );
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 4e69db27180e..85e1638aafed 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -628,7 +628,7 @@ bool SwTransferable::WriteObject( tools::SvRef<SotStorageStream>& xStream,
for(sal_uInt16 a(0); a < pModel->GetPageCount(); a++)
{
const SdrPage* pPage = pModel->GetPage(a);
- SdrObjListIter aIter(*pPage, SdrIterMode::DeepNoGroups);
+ SdrObjListIter aIter(pPage, SdrIterMode::DeepNoGroups);
while(aIter.IsMore())
{
diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx
index d175ffefb7e6..0aef51b6cdea 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -596,7 +596,7 @@ IMPL_LINK( SwDrawBaseShell, CheckGroupShapeNameHdl, AbstractSvxObjectNameDialog&
{
bRet = true;
SwDrawModel* pModel = rSh.getIDocumentDrawModelAccess().GetDrawModel();
- SdrObjListIter aIter( *(pModel->GetPage(0)), SdrIterMode::DeepWithGroups );
+ SdrObjListIter aIter( pModel->GetPage(0), SdrIterMode::DeepWithGroups );
while( aIter.IsMore() )
{
SdrObject* pTempObj = aIter.Next();
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index 88b27cbae3c1..1348a5fde2bf 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -306,7 +306,7 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface)
for (SdrObject* pSdrObject : sdrObjects)
{
// GetSelectableFromAny did not check pSdrObject is in right doc!
- if (pPV && pSdrObject->GetPage() == pPV->GetPage())
+ if (pPV && pSdrObject->getSdrPageFromSdrObject() == pPV->GetPage())
{
pDrawView->MarkObj(pSdrObject, pPV);
bRet = true;