diff options
author | Rohan Kumar <rohankanojia420@gmail.com> | 2016-03-09 16:07:44 +0530 |
---|---|---|
committer | Björn Michaelsen <bjoern.michaelsen@canonical.com> | 2016-03-11 14:06:55 +0000 |
commit | 004c233d30a432ba4e8e4c0d0052d34798850bd4 (patch) | |
tree | 83c190db375fa7293e393eb309085dd0b9edd1c7 /sot | |
parent | 2e0c1e03e85ef6a20ca362f263c60b141741f698 (diff) |
tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
I removed OSL_DEBUG_LEVEL > 1 conditionals and replaced them with
OSL_DEBUG_LEVEL > 0 as suggested in easy hack
Change-Id: I6495bf203365356e0969a057f5238c2343931d2b
Reviewed-on: https://gerrit.libreoffice.org/23061
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'sot')
-rw-r--r-- | sot/source/sdstor/ucbstorage.cxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx index 3b69a4b2c6fc..d3b53a710863 100644 --- a/sot/source/sdstor/ucbstorage.cxx +++ b/sot/source/sdstor/ucbstorage.cxx @@ -74,8 +74,7 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::sdbc; using namespace ::ucbhelper; -#if OSL_DEBUG_LEVEL > 1 -#include <stdio.h> +#if OSL_DEBUG_LEVEL > 0 static int nOpenFiles=0; static int nOpenStreams=0; #endif @@ -120,7 +119,7 @@ FileStreamWrapper_Impl::~FileStreamWrapper_Impl() if ( m_pSvStream ) { delete m_pSvStream; -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 --nOpenFiles; #endif } @@ -225,7 +224,7 @@ void SAL_CALL FileStreamWrapper_Impl::closeInput() throw( NotConnectedException, ::osl::MutexGuard aGuard( m_aMutex ); checkConnected(); DELETEZ( m_pSvStream ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 --nOpenFiles; #endif ::utl::UCBContentHelper::Kill( m_aURL ); @@ -288,7 +287,7 @@ void FileStreamWrapper_Impl::checkConnected() if ( !m_pSvStream ) { m_pSvStream = ::utl::UcbStreamHelper::CreateStream( m_aURL, STREAM_STD_READ ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 ++nOpenFiles; #endif } @@ -729,7 +728,7 @@ bool UCBStorageStream_Impl::Init() m_aTempURL = ::utl::TempFile().GetURL(); m_pStream = ::utl::UcbStreamHelper::CreateStream( m_aTempURL, STREAM_STD_READWRITE, true /* bFileExists */ ); -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 ++nOpenFiles; #endif @@ -1206,7 +1205,7 @@ bool UCBStorageStream_Impl::Clear() void UCBStorageStream_Impl::Free() { -#if OSL_DEBUG_LEVEL > 1 +#if OSL_DEBUG_LEVEL > 0 if ( m_pStream ) { if ( !m_aTempURL.isEmpty() ) @@ -2253,9 +2252,9 @@ sal_Int16 UCBStorage_Impl::Commit() } else { -#if OSL_DEBUG_LEVEL > 1 - fprintf ( stderr, "Files: %i\n", nOpenFiles ); - fprintf ( stderr, "Streams: %i\n", nOpenStreams ); +#if OSL_DEBUG_LEVEL > 0 + SAL_INFO("sot", "Files: " << nOpenFiles); + SAL_INFO("sot", "Streams: " << nOpenStreams); #endif // force writing Any aAny; |