diff options
author | Noel Grandin <noel@peralex.com> | 2016-08-25 14:33:32 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-08-29 09:23:46 +0200 |
commit | 82ca8bf77c7ea4ea9f5604235cbab012532e4494 (patch) | |
tree | a512c2897267347a8f65d81256c3df851ff580fc | |
parent | 83c0f29341a80cc71aac30293543e4ab66ae34e5 (diff) |
make the SfxObjectShellLock inline code a little more readable
Change-Id: Ia312f3bf588c7987ee6956ab2675e73b7d9db6a4
-rw-r--r-- | include/sfx2/objsh.hxx | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx index 5a145dfb0fe9..e9697720b141 100644 --- a/include/sfx2/objsh.hxx +++ b/include/sfx2/objsh.hxx @@ -760,16 +760,24 @@ public: inline ~SfxObjectShellLock(); inline SfxObjectShellLock & operator = ( const SfxObjectShellLock & rObj ); inline SfxObjectShellLock & operator = ( SfxObjectShell * pObj ); - inline bool Is() const { return pObj != nullptr; } + inline bool Is() const { return pObj != nullptr; } inline SfxObjectShell * operator & () const { return pObj; } inline SfxObjectShell * operator -> () const { return pObj; } inline SfxObjectShell & operator * () const { return *pObj; } inline operator SfxObjectShell * () const { return pObj; } }; inline SfxObjectShellLock::SfxObjectShellLock( const SfxObjectShellLock & rObj ) - { pObj = rObj.pObj; if( pObj ) { pObj->OwnerLock( true ); } } +{ + pObj = rObj.pObj; + if( pObj ) + pObj->OwnerLock( true ); +} inline SfxObjectShellLock::SfxObjectShellLock( SfxObjectShell * pObjP ) -{ pObj = pObjP; if( pObj ) { pObj->OwnerLock( true ); } } +{ + pObj = pObjP; + if( pObj ) + pObj->OwnerLock( true ); +} inline void SfxObjectShellLock::Clear() { if( pObj ) @@ -780,18 +788,24 @@ inline void SfxObjectShellLock::Clear() } } inline SfxObjectShellLock::~SfxObjectShellLock() -{ if( pObj ) { pObj->OwnerLock( false ); } } -inline SfxObjectShellLock & SfxObjectShellLock:: - operator = ( const SfxObjectShellLock & rObj ) { - if( rObj.pObj ) rObj.pObj->OwnerLock( true ); + if( pObj ) + pObj->OwnerLock( false ); +} +inline SfxObjectShellLock & SfxObjectShellLock::operator=( const SfxObjectShellLock & rObj ) +{ + if( rObj.pObj ) + rObj.pObj->OwnerLock( true ); SfxObjectShell* const pRefObj = pObj; pObj = rObj.pObj; - if( pRefObj ) { pRefObj->OwnerLock( false ); } + if( pRefObj ) + pRefObj->OwnerLock( false ); return *this; } -inline SfxObjectShellLock & SfxObjectShellLock::operator = ( SfxObjectShell * pObjP ) -{ return *this = SfxObjectShellLock( pObjP ); } +inline SfxObjectShellLock & SfxObjectShellLock::operator=( SfxObjectShell * pObjP ) +{ + return *this = SfxObjectShellLock( pObjP ); +} class SFX2_DLLPUBLIC SfxObjectShellItem: public SfxPoolItem { |