summaryrefslogtreecommitdiffstats
path: root/include/tools
diff options
context:
space:
mode:
authorJacek Fraczek <fraczek.jacek@gmail.com>2016-10-05 22:00:51 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-10-10 08:48:30 +0000
commitf004aa99514d385f3ee254bba735f5eaeb7d9ad8 (patch)
treeaacd5792f553b8e9cbf029cc7e0797ed0dd423fe /include/tools
parenttdf#101442 Change "hyperlink" to "link" (diff)
downloadcore-f004aa99514d385f3ee254bba735f5eaeb7d9ad8.tar.gz
core-f004aa99514d385f3ee254bba735f5eaeb7d9ad8.zip
tdf#89307: Removed SvRef::operator T*()
Conditional statements are using SvRef::Is() method. Changed static_cast<T*>(svRef<T>) occurances to svRef.get(). Added operator == and != to SvRef. SbxObject::Execute is using SbxVariableRef internally. SbxObject::FindQualified is using SbxVariableRef internally. Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395 Reviewed-on: https://gerrit.libreoffice.org/29621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'include/tools')
-rw-r--r--include/tools/inetmsg.hxx2
-rw-r--r--include/tools/ref.hxx5
-rw-r--r--include/tools/stream.hxx2
3 files changed, 5 insertions, 4 deletions
diff --git a/include/tools/inetmsg.hxx b/include/tools/inetmsg.hxx
index 7c3748effe01..b62b53e609ef 100644
--- a/include/tools/inetmsg.hxx
+++ b/include/tools/inetmsg.hxx
@@ -137,7 +137,7 @@ public:
}
}
- SvLockBytes* GetDocumentLB() const { return m_xDocLB; }
+ SvLockBytes* GetDocumentLB() const { return m_xDocLB.get(); }
void SetDocumentLB (SvLockBytes *pDocLB) { m_xDocLB = pDocLB; }
static bool ParseDateField (
diff --git a/include/tools/ref.hxx b/include/tools/ref.hxx
index 170e53ae7837..30abab3e5a29 100644
--- a/include/tools/ref.hxx
+++ b/include/tools/ref.hxx
@@ -98,7 +98,8 @@ public:
T & operator *() const { assert(pObj != nullptr); return *pObj; }
- operator T *() const { return pObj; }
+ bool operator ==(const SvRef<T> &rhs) const { return pObj == rhs.pObj; }
+ bool operator !=(const SvRef<T> &rhs) const { return !(*this == rhs); }
protected:
T * pObj;
@@ -203,7 +204,7 @@ public:
~SvCompatWeakBase() { _xHdl->ResetWeakBase(); }
- SvCompatWeakHdl<T>* GetHdl() { return _xHdl; }
+ SvCompatWeakHdl<T>* GetHdl() { return _xHdl.get(); }
};
/** We only have one weak reference in LO, in include/sfx2/frame.hxx, class SfxFrameWeak.
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 1268eab0338f..44af335b2e0e 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -205,7 +205,7 @@ public:
SvStream( SvLockBytes *pLockBytes);
virtual ~SvStream();
- SvLockBytes* GetLockBytes() const { return m_xLockBytes; }
+ SvLockBytes* GetLockBytes() const { return m_xLockBytes.get(); }
sal_uInt32 GetError() const { return ERRCODE_TOERROR(m_nError); }
sal_uInt32 GetErrorCode() const { return m_nError; }