summaryrefslogtreecommitdiff
path: root/include/tools/ref.hxx
diff options
context:
space:
mode:
Diffstat (limited to 'include/tools/ref.hxx')
-rw-r--r--include/tools/ref.hxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/tools/ref.hxx b/include/tools/ref.hxx
index f9c2c384c37e..170e53ae7837 100644
--- a/include/tools/ref.hxx
+++ b/include/tools/ref.hxx
@@ -78,6 +78,16 @@ public:
return *this;
}
+ SvRef & operator =(SvRef && rObj)
+ {
+ if (pObj != nullptr) {
+ pObj->ReleaseRef();
+ }
+ pObj = rObj.pObj;
+ rObj.pObj = nullptr;
+ return *this;
+ }
+
bool Is() const { return pObj != nullptr; }
T * get() const { return pObj; }