summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
Diffstat (limited to 'sot')
-rw-r--r--sot/source/base/filelist.cxx13
-rw-r--r--sot/source/base/object.cxx32
2 files changed, 14 insertions, 31 deletions
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 <sot/filelist.hxx>
#include <osl/thread.h>
-/******************************************************************************
-|*
-|* 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 <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: */