diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2019-04-26 10:46:02 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2019-04-26 17:12:08 +0200 |
commit | 814e1da4db65c3cf97e2b8dec246bf25c7f51189 (patch) | |
tree | ee40b9565f9d392a41f49789ffa0687e4189e583 /sot/source/base/object.cxx | |
parent | 615202cab983f1f13407f6515aeb047e4e09f6ed (diff) |
cleanup files in SOT, not change
Change-Id: Ie3a2390a40214e61b05a57ebd5fbfa5f49a5e1fd
Reviewed-on: https://gerrit.libreoffice.org/71351
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'sot/source/base/object.cxx')
-rw-r--r-- | sot/source/base/object.cxx | 32 |
1 files changed, 12 insertions, 20 deletions
diff --git a/sot/source/base/object.cxx b/sot/source/base/object.cxx index a33e16f7c281..5c91afeccba9 100644 --- a/sot/source/base/object.cxx +++ b/sot/source/base/object.cxx @@ -20,46 +20,40 @@ #include <sot/object.hxx> SotObject::SotObject() - : nOwnerLockCount( 0 ) - , bInClose ( false ) + : nOwnerLockCount(0) + , bInClose(false) { } -SotObject::~SotObject() -{ -} +SotObject::~SotObject() = default; -void SotObject::OwnerLock -( - bool bLock /* true, lock. false, unlock. */ -) -/* [Description] - - * When the OwnerLock is decremented to zero, the DoClose method is called. +/** When the OwnerLock is decremented to zero, the DoClose method is called. * This happens independently of the lock or RefCount. If the OwnerLock * counter != zero, no DoClose is called by <SotObject::FuzzyLock>. + * + * bLock - true, lock. false, unlock. */ +void SotObject::OwnerLock(bool bLock) { - if( bLock ) + if (bLock) { nOwnerLockCount++; AddFirstRef(); } - else if ( nOwnerLockCount ) + else if (nOwnerLockCount) { - if( 0 == --nOwnerLockCount ) + if (0 == --nOwnerLockCount) DoClose(); ReleaseRef(); } } - bool SotObject::DoClose() { bool bRet = false; - if( !bInClose ) + if (!bInClose) { - tools::SvRef<SotObject> xHoldAlive( this ); + tools::SvRef<SotObject> xHoldAlive(this); bInClose = true; bRet = Close(); bInClose = false; @@ -67,11 +61,9 @@ bool SotObject::DoClose() return bRet; } - bool SotObject::Close() { return true; } - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |