[Libreoffice-commits] core.git: sw/inc sw/source
Bjoern Michaelsen
bjoern.michaelsen at canonical.com
Thu Jan 5 15:14:55 UTC 2017
sw/inc/frmfmt.hxx | 6 +++---
sw/source/core/draw/dcontact.cxx | 4 ++--
sw/source/core/unocore/unoobj2.cxx | 10 +++++-----
3 files changed, 10 insertions(+), 10 deletions(-)
New commits:
commit ff4bafa065dd36fe1cdedcc4d20971f3abbd17fb
Author: Bjoern Michaelsen <bjoern.michaelsen at canonical.com>
Date: Wed Jan 4 16:30:20 2017 +0100
use proper message passing
- checking the type of Format hopefully allows skipping contact checks
Change-Id: I11690e4ec1e94b809b0ec13f2d9b4e3a22ded213
Reviewed-on: https://gerrit.libreoffice.org/32729
Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
Tested-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 6c1e2da..f5e8140 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 dab09e8..977841b 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 d68923a..a8cf485 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
{
More information about the Libreoffice-commits
mailing list