summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorRelease Engineers <releng@openoffice.org>2009-06-18 16:35:07 +0000
committerRelease Engineers <releng@openoffice.org>2009-06-18 16:35:07 +0000
commitade5abb1970f5bb9b55b3f2dc76ded5fd0a933d7 (patch)
tree347e66f3d1f358786ebfe88b8aa06052cdd9bf5b /xmlhelp
parentb788e865ae028fa253331a777587133081d679e3 (diff)
#i10000# #i102806# remove assertion
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/source/cxxhelp/provider/db.cxx44
-rw-r--r--xmlhelp/source/cxxhelp/provider/db.hxx2
2 files changed, 23 insertions, 23 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/db.cxx b/xmlhelp/source/cxxhelp/provider/db.cxx
index 3cc9b6168076..e3129f8e94b5 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 7633e78b3425..e98cd9040cf7 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; }