summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/ww8')
-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
5 files changed, 4 insertions, 54 deletions
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();