[Libreoffice-commits] core.git: include/svx svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 18 20:55:04 UTC 2021
include/svx/svdetc.hxx | 2 +-
svx/source/svdraw/svdetc.cxx | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 7bba0f12e4bb726ef29a9b7c2f862128abcaf0d7
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Aug 18 16:32:00 2021 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 18 22:54:25 2021 +0200
UnloadObj always dereferences its SdrOle2Obj* arg
Change-Id: I24f68e83c15f7fad464ad164e75e7cd49ae17b9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120678
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/include/svx/svdetc.hxx b/include/svx/svdetc.hxx
index f594550a5aa2..8bd6b744ec46 100644
--- a/include/svx/svdetc.hxx
+++ b/include/svx/svdetc.hxx
@@ -164,7 +164,7 @@ class OLEObjCache
size_t nSize;
std::unique_ptr<AutoTimer> pTimer;
- static bool UnloadObj( SdrOle2Obj* pObj );
+ static bool UnloadObj(SdrOle2Obj& rObj);
DECL_LINK( UnloadCheckHdl, Timer*, void );
public:
diff --git a/svx/source/svdraw/svdetc.cxx b/svx/source/svdraw/svdetc.cxx
index 04219e7a8477..e97593ca0319 100644
--- a/svx/source/svdraw/svdetc.cxx
+++ b/svx/source/svdraw/svdetc.cxx
@@ -151,7 +151,7 @@ IMPL_LINK_NOARG(OLEObjCache, UnloadCheckHdl, Timer*, void)
}
}
- if ( bUnload && UnloadObj(pUnloadObj) )
+ if (bUnload && UnloadObj(*pUnloadObj))
{
// object was successfully unloaded
RemoveObj(pUnloadObj);
@@ -216,7 +216,7 @@ const SdrOle2Obj* OLEObjCache::operator[](size_t nPos) const
return maObjs[nPos];
}
-bool OLEObjCache::UnloadObj(SdrOle2Obj* pObj)
+bool OLEObjCache::UnloadObj(SdrOle2Obj& rObj)
{
bool bUnloaded = false;
@@ -227,12 +227,12 @@ bool OLEObjCache::UnloadObj(SdrOle2Obj* pObj)
// A much better (and working) criteria would be the VOC contact count.
// The question is what will happen when i make it work now suddenly? I
// will try it for 2.4.
- const sdr::contact::ViewContact& rViewContact = pObj->GetViewContact();
+ const sdr::contact::ViewContact& rViewContact = rObj.GetViewContact();
const bool bVisible(rViewContact.HasViewObjectContacts());
if(!bVisible)
{
- bUnloaded = pObj->Unload();
+ bUnloaded = rObj.Unload();
}
return bUnloaded;
More information about the Libreoffice-commits
mailing list