From 814e1da4db65c3cf97e2b8dec246bf25c7f51189 Mon Sep 17 00:00:00 2001 From: Tomaž Vajngerl Date: Fri, 26 Apr 2019 10:46:02 +0900 Subject: cleanup files in SOT, not change MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Ie3a2390a40214e61b05a57ebd5fbfa5f49a5e1fd Reviewed-on: https://gerrit.libreoffice.org/71351 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl --- sot/source/base/filelist.cxx | 13 ++----------- sot/source/base/object.cxx | 32 ++++++++++++-------------------- 2 files changed, 14 insertions(+), 31 deletions(-) (limited to 'sot/source') diff --git a/sot/source/base/filelist.cxx b/sot/source/base/filelist.cxx index 9db281b7d3ce..ac3388858643 100644 --- a/sot/source/base/filelist.cxx +++ b/sot/source/base/filelist.cxx @@ -23,11 +23,7 @@ #include #include -/****************************************************************************** -|* -|* Stream operators -|* -\******************************************************************************/ +/* Stream operators */ /* #i28176# The Windows clipboard bridge now provides a double '\0' @@ -63,12 +59,7 @@ SvStream& ReadFileList( SvStream& rIStm, FileList& rFileList ) return rIStm; } -/****************************************************************************** -|* -|* Fill in / check the list -|* -\******************************************************************************/ - +/* Fill in / check the list */ void FileList::AppendFile( const OUString& rStr ) { aStrList.push_back( rStr ); 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 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 . + * + * 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 xHoldAlive( this ); + tools::SvRef 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: */ -- cgit