diff options
Diffstat (limited to 'sw/source/filter')
-rw-r--r-- | sw/source/filter/html/htmldrawreader.cxx | 3 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxsdrexport.cxx | 17 | ||||
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 17 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtw8esh.cxx | 16 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8graf.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8graf2.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/xml/swxml.cxx | 2 |
7 files changed, 6 insertions, 57 deletions
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() ); |