[Libreoffice-commits] .: sc/source
Thomas Arnhold
tarnhold at kemper.freedesktop.org
Tue Aug 2 16:55:23 PDT 2011
sc/source/filter/excel/xecontent.cxx | 47 -----------------------------------
1 file changed, 47 deletions(-)
New commits:
commit 6cfa53074813a8acc3f148882a9818b94cdcb4c3
Author: Thomas Arnhold <thomas at arnhold.org>
Date: Wed Aug 3 01:49:20 2011 +0200
Remove EXC_INCL_SST_STATISTICS
This came in back in 11/2003. I assume this isn't used anymore.
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 9dd529d..6dbd962 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -73,11 +73,6 @@ using ::rtl::OUStringBuffer;
// Shared string table ========================================================
-// 1 = SST hash table statistics prompt
-#define EXC_INCL_SST_STATISTICS 0
-
-// ----------------------------------------------------------------------------
-
/** A single string entry in the hash table. */
struct XclExpHashEntry
{
@@ -169,48 +164,6 @@ void XclExpSstImpl::Save( XclExpStream& rStrm )
if( maStringList.empty() )
return;
-#if (OSL_DEBUG_LEVEL > 1) && EXC_INCL_SST_STATISTICS
- { // own scope for the statistics
-#define APPENDINT( value ) Append( ByteString::CreateFromInt32( value ) )
- ScfUInt32Vec aVec;
- size_t nPerBucket = mnSize / EXC_SST_HASHTABLE_SIZE + 1, nEff = 0;
- for( XclExpHashTab::const_iterator aTIt = maHashTab.begin(), aTEnd = maHashTab.end(); aTIt != aTEnd; ++aTIt )
- {
- size_t nSize = aTIt->size();
- if( nSize >= aVec.size() ) aVec.resize( nSize + 1, 0 );
- ++aVec[ nSize ];
- if( nSize > nPerBucket ) nEff += nSize - nPerBucket;
- }
- ByteString aStr( "SST HASHING STATISTICS\n\n" );
- aStr.Append( "Total count:\t" ).APPENDINT( mnTotal ).Append( " strings\n" );
- aStr.Append( "Reduced to:\t" ).APPENDINT( mnSize ).Append( " strings (" );
- aStr.APPENDINT( 100 * mnSize / mnTotal ).Append( "%)\n" );
- aStr.Append( "Effectivity:\t\t" ).APPENDINT( 100 - 100 * nEff / mnSize );
- aStr.Append( "% (best: " ).APPENDINT( nPerBucket ).Append( " strings per bucket)\n" );
- aStr.Append( "\t\tCount of buckets\nBucket size\ttotal\tmax\tTotal strings\n" );
- for( size_t nIx = 0, nSize = aVec.size(), nInc = 1; nIx < nSize; nIx += nInc )
- {
- if( (nIx == 10) || (nIx == 100) || (nIx == 1000) ) nInc = nIx;
- size_t nMaxIx = ::std::min( nIx + nInc, nSize ), nCount = 0, nMaxCount = 0, nStrings = 0;
- for( size_t nSubIx = nIx; nSubIx < nMaxIx; ++nSubIx )
- {
- nCount += aVec[ nSubIx ];
- if( aVec[ nSubIx ] > nMaxCount ) nMaxCount = aVec[ nSubIx ];
- nStrings += nSubIx * aVec[ nSubIx ];
- }
- if( nMaxCount )
- {
- aStr.APPENDINT( nIx );
- if( nMaxIx - nIx > 1 ) aStr.Append( '-' ).APPENDINT( nMaxIx - 1 );
- aStr.Append( "\t\t" ).APPENDINT( nCount ).Append( '\t' ).APPENDINT( nMaxCount );
- aStr.Append( '\t' ).APPENDINT( nStrings ).Append( '\n' );
- }
- }
- OSL_FAIL( aStr.GetBuffer() );
-#undef APPENDINT
- }
-#endif
-
SvMemoryStream aExtSst( 8192 );
sal_uInt32 nBucket = mnSize;
More information about the Libreoffice-commits
mailing list