include/sfx2/objsh.hxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
New commits: commit 5586629f7519bc7e9d715f043327e9b87e54e597 Author: Noel Grandin <[email protected]> Date: Mon Aug 29 11:08:31 2016 +0200 cid#1371230 Missing move assignment operator Change-Id: Ia58dda7eaadf6a91b7af67e011a6f44a4e7a3c0b diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index e969772..2cc4af3 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -755,10 +755,12 @@ protected: public: inline SfxObjectShellLock() { pObj = nullptr; } inline SfxObjectShellLock( const SfxObjectShellLock & rObj ); + inline SfxObjectShellLock( SfxObjectShellLock && rObj ); inline SfxObjectShellLock( SfxObjectShell * pObjP ); inline void Clear(); inline ~SfxObjectShellLock(); inline SfxObjectShellLock & operator = ( const SfxObjectShellLock & rObj ); + inline SfxObjectShellLock & operator = ( SfxObjectShellLock && rObj ); inline SfxObjectShellLock & operator = ( SfxObjectShell * pObj ); inline bool Is() const { return pObj != nullptr; } inline SfxObjectShell * operator & () const { return pObj; } @@ -772,6 +774,11 @@ inline SfxObjectShellLock::SfxObjectShellLock( const SfxObjectShellLock & rObj ) if( pObj ) pObj->OwnerLock( true ); } +inline SfxObjectShellLock::SfxObjectShellLock( SfxObjectShellLock && rObj ) +{ + pObj = rObj.pObj; + rObj.pObj = nullptr; +} inline SfxObjectShellLock::SfxObjectShellLock( SfxObjectShell * pObjP ) { pObj = pObjP; @@ -802,6 +809,14 @@ inline SfxObjectShellLock & SfxObjectShellLock::operator=( const SfxObjectShellL pRefObj->OwnerLock( false ); return *this; } +inline SfxObjectShellLock & SfxObjectShellLock::operator=( SfxObjectShellLock && rObj ) +{ + if (pObj) + pObj->OwnerLock( false ); + pObj = rObj.pObj; + rObj.pObj = nullptr; + return *this; +} inline SfxObjectShellLock & SfxObjectShellLock::operator=( SfxObjectShell * pObjP ) { return *this = SfxObjectShellLock( pObjP ); _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
