summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2018-04-16 22:34:50 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2018-09-17 09:10:18 +0200
commit1ebb77fd17b417d92ab48fcef56a0230c5750de2 (patch)
tree6f36c8b63ada04af4dfe4acaefb32d57995565fd /sw/source
parent47543560311038191fd7ae901031da6c40b697b1 (diff)
SOSAW080: Derive SdrObjGroup from SdrObjList
Also simplify parent/child relationships, get rid of double data (SdrPage/Parent infos in SdrObjects, also in SdrObjList). This is all not needed - when a SdrObject is inserted to a SdrPage, get SdrPage by traveling over parents (no double info, member as soon as inserted, ...). More cleanups/reworks included, will need some more cleanups, too. Stabilizing: SetRectsDirty/DefaultStyleSheet Had to correct the SetRectsDirty stuff for 3D due to going down the hierarchy while the 2D implementation goes the other direction -> endless loops. Added special handling for 3D stuff for now (will be chnaged again when SnapRect is no longer needed at SdrObject level). Also had to adapt how the DefaultStyleSheet is set at incarnated SdrObjects - better: their properties. Since we now always have a SdrModel, it is possible to correctly initialize with the correct default StyleSheet from that SdrModel. This needs to be done after ForceDefaultAttributes and in a way that again deletes Items that are set in the StyleSheet. This leads to an error in CppunitTest_sd_import_tests where I checked tdf100491 - it is okay and thus I change the control instance of the imported, XML-dumped file. The less hard attributes, the better for Styles in general. Cleanup of comments for last two commits Corrected SvxShape::getParent() Needed to get the direct parent, so test for SdrObject first (to get SdrObjGroup/E3DScene), for SdrPage second Fixed CppunitTest_sc_subsequent_export_test Several problems arose. The used SdrCaptionObj was Cloned, but the clone not inserted to a SdrPage. This leads to not being able to access a UNO API imlementation of the SdrPage (SvxPage) on lower levels. It worked before due to SdrObject having a SdrPage* additionally to being added to a SdrPage - this is exactly the main cleanup this change does. Looked for why it is cloned, could see no reasons. The SdrCaptionObj exists during all im/export, not difference to other SdrObjects (that do not get cloned). It is not changed in any way. It *might* be to suppress a crash that happened due to UNO API Service emfio/emfio not being available in the UnitTest scenario. Interestingly it did not crash with the cloned SdrCaptionObj, but the Graphic exported was probably wrong. Fixed by no longer Cloning the SdrCaptionObj and adding emfio/emfio UNO API Service. d139f821a5b39535a3e7b9c6261df7e18f8ae8ac 910e7f4bc628a715fda7545dffaf3369d5e76ea0 ca1de01b723051e09ac37d7ec7bba978beea41c5 3a76da1471dfe75e69847f64a6a3519ad21c8c9c Change-Id: I986586e326b563acebf00d931a7084c6eb09e5f8 Reviewed-on: https://gerrit.libreoffice.org/54689 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de> Reviewed-on: https://gerrit.libreoffice.org/60535 Tested-by: Jenkins
Diffstat (limited to 'sw/source')
-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 4ca1ec9d4f33..0eff340c3ecf 100644
--- a/sw/source/core/doc/textboxhelper.cxx
+++ b/sw/source/core/doc/textboxhelper.cxx
@@ -214,7 +214,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 d3d36b12c5be..637c7b46e43b 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);
@@ -2232,14 +2232,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(),
@@ -2256,9 +2256,9 @@ void SwDrawVirtObj::AddToDrawingPage()
void SwDrawVirtObj::RemoveFromDrawingPage()
{
SetUserCall( nullptr );
- if ( GetPage() )
+ if ( getSdrPageFromSdrObject() )
{
- GetPage()->RemoveObject( GetOrdNum() );
+ getSdrPageFromSdrObject()->RemoveObject( GetOrdNum() );
}
}
@@ -2266,7 +2266,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 af64373ee478..3646acaf75da 100644
--- a/sw/source/core/draw/dflyobj.cxx
+++ b/sw/source/core/draw/dflyobj.cxx
@@ -431,8 +431,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 169febf96934..60511cda2594 100644
--- a/sw/source/core/draw/dview.cxx
+++ b/sw/source/core/draw/dview.cxx
@@ -316,7 +316,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 f339af81f3e7..4d4f00718cb4 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -1526,7 +1526,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();
@@ -1579,7 +1579,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 8ae2ec3903fa..36bc46ba762c 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 1fce3519f635..5c5ea5d1e76c 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -993,7 +993,7 @@ void AppendObj(SwFrame *const pFrame, SwPageFrame *const pPage, SwFrameFormat *c
}
if ( pSdrObj )
{
- if ( !pSdrObj->GetPage() )
+ if ( !pSdrObj->getSdrPageFromSdrObject() )
{
pFormat->getIDocumentDrawModelAccess().GetDrawModel()->GetPage(0)->
InsertObject(pSdrObj, pSdrObj->GetOrdNumDirect());
@@ -2756,10 +2756,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 edd2830bc6e9..74061a776863 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1900,20 +1900,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);
@@ -1925,9 +1911,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 81e72a5096f6..af91c721ca76 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -2294,23 +2294,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 36a4aea53df8..1fe71b7ad7c1 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2867,7 +2867,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)
@@ -3095,7 +3095,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 56de45b67cdc..17c0b5e44f62 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 2eac04a31e5d..3bbe20917ab1 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 7951c4e8a681..ca3cd3808ae8 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;