[Libreoffice-commits] core.git: sot/source

Rohan Kumar rohankanojia420 at gmail.com
Fri Mar 11 14:07:19 UTC 2016


 sot/source/sdstor/ucbstorage.cxx |   19 +++++++++----------
 1 file changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 004c233d30a432ba4e8e4c0d0052d34798850bd4
Author: Rohan Kumar <rohankanojia420 at gmail.com>
Date:   Wed Mar 9 16:07:44 2016 +0530

    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 at libreoffice.org>
    Reviewed-by: Björn Michaelsen <bjoern.michaelsen at canonical.com>

diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 3b69a4b..d3b53a7 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;


More information about the Libreoffice-commits mailing list