[ooo-build-commit] Branch 'ooo/master' - xmlhelp/source

Jan Holesovsky kendy at kemper.freedesktop.org
Thu Jun 18 17:57:15 PDT 2009


 xmlhelp/source/cxxhelp/provider/db.cxx |   44 ++++++++++++++++-----------------
 xmlhelp/source/cxxhelp/provider/db.hxx |    2 -
 2 files changed, 23 insertions(+), 23 deletions(-)

New commits:
commit 4b97c008fe42dabd535e7a551a916389aa3a6177
Author: Release Engineers <releng at openoffice.org>
Date:   Thu Jun 18 16:35:07 2009 +0000

    #i10000# #i102806# remove assertion

diff --git a/xmlhelp/source/cxxhelp/provider/db.cxx b/xmlhelp/source/cxxhelp/provider/db.cxx
index a8d8769..989bed4 100644
--- a/xmlhelp/source/cxxhelp/provider/db.cxx
+++ b/xmlhelp/source/cxxhelp/provider/db.cxx
@@ -39,8 +39,8 @@
 #include "com/sun/star/io/XSeekable.hpp"
 
 #ifdef TEST_DBHELP
-#include <osl/time.h>
-#endif
+#include <osl/time.h>
+#endif
 
 using namespace com::sun::star;
 using namespace com::sun::star::uno;
@@ -65,7 +65,7 @@ namespace db_internal
 void DBData::copyToBuffer( const char* pSrcData, int nSize )
 {
     m_nSize = nSize;
-    delete m_pBuffer;
+    delete [] m_pBuffer;
     m_pBuffer = new char[m_nSize+1];
     memcpy( m_pBuffer, pSrcData, m_nSize );
     m_pBuffer[m_nSize] = 0;
@@ -111,10 +111,10 @@ void testWriteKeyValue( FILE* pFile, const KeyValPair& rKeyValPair )
     int nValueLen = aValueStr.getLength();
     fprintf( pFile, "%x ", nKeyLen );
     if( nKeyLen > 0 )
-        fwrite( aKeyStr.getStr(), 1, nKeyLen, pFile );
+        fwrite( aKeyStr.getStr(), 1, nKeyLen, pFile );
     fprintf( pFile, " %x ", nValueLen );
     if( nValueLen > 0 )
-        fwrite( aValueStr.getStr(), 1, nValueLen, pFile );
+        fwrite( aValueStr.getStr(), 1, nValueLen, pFile );
     fprintf( pFile, "%c", cLF );
 }
 
@@ -178,9 +178,9 @@ bool DBHelp::testAgainstDb( const rtl::OString& fileName, bool bOldDbAccess )
     const char* pTestReadData = NULL;
     int nTestReadDataSize = 0;
 
-    sal_uInt32 starttime = osl_getGlobalTimer();
-    sal_uInt32 afterfirsttime = starttime;
-
+    sal_uInt32 starttime = osl_getGlobalTimer();
+    sal_uInt32 afterfirsttime = starttime;
+
     if( pFile != NULL )
     {
         if( bOldDbAccess )
@@ -238,20 +238,20 @@ bool DBHelp::testAgainstDb( const rtl::OString& fileName, bool bOldDbAccess )
         }
         if( bFirst )
         {
-            afterfirsttime = osl_getGlobalTimer();
+            afterfirsttime = osl_getGlobalTimer();
             bFirst = false;
         }
         int nError = 0;
         if( bTestSuccess && pTestReadData != NULL )
         {
-            int nCmp = memcmp( ptr, pTestReadData, nValueLen );
-            if( nCmp == 0 )
-                ++nOkCount;
-            else
-                nError = 1;
-
+            int nCmp = memcmp( ptr, pTestReadData, nValueLen );
+            if( nCmp == 0 )
+                ++nOkCount;
+            else
+                nError = 1;
+
             if( nValueLen != nTestReadDataSize )
-                nError = 2;
+                nError = 2;
         }
         else
             nError = 3;
@@ -266,14 +266,14 @@ bool DBHelp::testAgainstDb( const rtl::OString& fileName, bool bOldDbAccess )
                 fprintf( pFile, "ERROR, not found:\n" );
                 testWriteKeyValue( pFile, rKeyValPair );
                 fprintf( pFile, "\nError Code: %d\n", nError );
-            }
+            }
         }
     }
     tableTest.close( 0 );
 
-    sal_uInt32 endtime = osl_getGlobalTimer();
-    double dDiffTime = (endtime-starttime) / 1000.0;
-    double dDiffFirstTime = (afterfirsttime-starttime) / 1000.0;
+    sal_uInt32 endtime = osl_getGlobalTimer();
+    double dDiffTime = (endtime-starttime) / 1000.0;
+    double dDiffFirstTime = (afterfirsttime-starttime) / 1000.0;
     if( pFile != NULL )
     {
         int nCount = avKeyValPair.size();
@@ -397,8 +397,8 @@ bool DBHelp::getValueForKey( const rtl::OString& rKey, DBData& rValue )
                 Reference< XSeekable > xXSeekable( xIn, UNO_QUERY );
                 if( xXSeekable.is() )
                 {
-                    xXSeekable->seek( iValuePos );
-
+                    xXSeekable->seek( iValuePos );
+
                     Sequence< sal_Int8 > aData;
                     sal_Int32 nRead = xIn->readBytes( aData, nValueLen );
                     if( nRead == nValueLen )
diff --git a/xmlhelp/source/cxxhelp/provider/db.hxx b/xmlhelp/source/cxxhelp/provider/db.hxx
index 2997ab8..82b6374 100644
--- a/xmlhelp/source/cxxhelp/provider/db.hxx
+++ b/xmlhelp/source/cxxhelp/provider/db.hxx
@@ -108,7 +108,7 @@ namespace berkeleydbproxy {
             , m_pBuffer( NULL )
         {}
         ~DBData()
-            { delete m_pBuffer; }
+            { delete [] m_pBuffer; }
 
           int getSize() const
             { return m_nSize; }


More information about the ooo-build-commit mailing list