diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/frmfmt.hxx | 6 | ||||
-rw-r--r-- | sw/source/core/draw/dcontact.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unoobj2.cxx | 10 |
3 files changed, 10 insertions, 10 deletions
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx index 6c1e2daa1b90..f5e8140f971b 100644 --- a/sw/inc/frmfmt.hxx +++ b/sw/inc/frmfmt.hxx @@ -42,8 +42,8 @@ namespace sw // SwDrawFrameFormat too) as members struct SW_DLLPUBLIC FindSdrObjectHint final : SfxHint { - SdrObject** m_ppObject; - FindSdrObjectHint(SdrObject** ppObject) : m_ppObject(ppObject) {}; + SdrObject*& m_rpObject; + FindSdrObjectHint(SdrObject*& rpObject) : m_rpObject(rpObject) {}; virtual ~FindSdrObjectHint() override; }; } @@ -126,7 +126,7 @@ public: SdrObject* FindSdrObject() { SdrObject* pObject(nullptr); - CallSwClientNotify(sw::FindSdrObjectHint(&pObject)); + CallSwClientNotify(sw::FindSdrObjectHint(pObject)); return pObject; } const SdrObject *FindSdrObject() const diff --git a/sw/source/core/draw/dcontact.cxx b/sw/source/core/draw/dcontact.cxx index dab09e890ec7..977841b415fd 100644 --- a/sw/source/core/draw/dcontact.cxx +++ b/sw/source/core/draw/dcontact.cxx @@ -408,8 +408,8 @@ void SwContact::SwClientNotify(const SwModify& rMod, const SfxHint& rHint) // this does not call SwClient::SwClientNotify and thus doesnt handle RES_OBJECTDYING as usual. Is this intentional? if (auto pFindSdrObjectHint = dynamic_cast<const sw::FindSdrObjectHint*>(&rHint)) { - if(!*pFindSdrObjectHint->m_ppObject) - *pFindSdrObjectHint->m_ppObject = GetMaster(); + if(!pFindSdrObjectHint->m_rpObject) + pFindSdrObjectHint->m_rpObject = GetMaster(); } else if (auto pWW8AnchorConvHint = dynamic_cast<const sw::WW8AnchorConvHint*>(&rHint)) { diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx index d68923a66aec..a8cf485f2839 100644 --- a/sw/source/core/unocore/unoobj2.cxx +++ b/sw/source/core/unocore/unoobj2.cxx @@ -1705,12 +1705,12 @@ bool SwXParaFrameEnumerationImpl::CreateNextObject() // the format should be valid here, otherwise the client // would have been removed by PurgeFrameClients // check for a shape first - SwDrawContact* const pContact = SwIterator<SwDrawContact,SwFormat>( *pFormat ).First(); - if (pContact) + if(pFormat->Which() == RES_DRAWFRMFMT) { - SdrObject* const pSdr = pContact->GetMaster(); - if (pSdr) - m_xNextObject.set(pSdr->getUnoShape(), uno::UNO_QUERY); + SdrObject* pObject(nullptr); + pFormat->CallSwClientNotify(sw::FindSdrObjectHint(pObject)); + if(pObject) + m_xNextObject.set(pObject->getUnoShape(), uno::UNO_QUERY); } else { |