diff options
author | Thomas Arnhold <thomas@arnhold.org> | 2011-02-15 01:16:38 +0100 |
---|---|---|
committer | Thomas Arnhold <thomas@arnhold.org> | 2011-02-15 13:27:12 +0100 |
commit | 708c0caa14a2cfe375c146755640c1a0a518c941 (patch) | |
tree | 57067e397dff0976a51c0a29ae2fc070a72d87af /xmlhelp | |
parent | c434abf945c0f8132819337f5cfb2b8d07310537 (diff) |
Remove LOGGING
Diffstat (limited to 'xmlhelp')
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx index 0da606e5ce06..93fbb6383d95 100644 --- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx +++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx @@ -49,9 +49,6 @@ #include "resultsetforquery.hxx" #include "databases.hxx" -// For testing -// #define LOGGING - using namespace std; using namespace chelp; using namespace xmlsearch::excep; @@ -141,10 +138,6 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF bool bCaptionsOnly = ( scope.compareToAscii( "Heading" ) == 0 ); sal_Int32 hitCount = m_aURLParameter.get_hitCount(); -#ifdef LOGGING - FILE* pFile = fopen( "d:\\resultset_out.txt", "w" ); -#endif - IndexFolderIterator aIndexFolderIt( *pDatabases, m_aURLParameter.get_module(), m_aURLParameter.get_language() ); rtl::OUString idxDir; bool bExtension = false; @@ -235,14 +228,6 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF pQueryResultVector->push_back( HitItem( aURL, fScore ) ); if( nQueryListSize > 1 ) aSet.insert( aURL ); - -#ifdef LOGGING - if( pFile ) - { - rtl::OString tmp(rtl::OUStringToOString( aURL, RTL_TEXTENCODING_UTF8)); - fprintf( pFile, "Dir %d, Query %d, Item: score=%f, URL=%s\n", iDir, i, fScore, tmp.getStr() ); - } -#endif } } @@ -285,14 +270,6 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF { // Use first pass to create entry aIndexFolderResultVector.push_back( aItemCopy ); - -#ifdef LOGGING - if( pFile ) - { - rtl::OString tmp(rtl::OUStringToOString( aItemCopy.m_aURL, RTL_TEXTENCODING_UTF8)); - fprintf( pFile, "Combine: Query %d (first pass), Item %d: score=%f (%f), URL=%s\n", n, i, aItemCopy.m_fScore, rItem.m_fScore, tmp.getStr() ); - } -#endif } else { @@ -303,15 +280,6 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF HitItem& rFindItem = aIndexFolderResultVector[ j ]; if( rFindItem.m_aURL.equals( aItemCopy.m_aURL ) ) { -#ifdef LOGGING - if( pFile ) - { - rtl::OString tmp(rtl::OUStringToOString( aItemCopy.m_aURL, RTL_TEXTENCODING_UTF8)); - fprintf( pFile, "Combine: Query %d, Item %d: score=%f + %f = %f, URL=%s\n", n, i, - rFindItem.m_fScore, aItemCopy.m_fScore, rFindItem.m_fScore + aItemCopy.m_fScore, tmp.getStr() ); - } -#endif - rFindItem.m_fScore += aItemCopy.m_fScore; break; } @@ -347,26 +315,6 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF for( int j = 0 ; j < nVectorCount ; ++j ) pCurrentVectorIndex[j] = 0; -#ifdef LOGGING - if( pFile ) - { - for( int k = 0 ; k < nVectorCount ; ++k ) - { - vector<HitItem>& rIndexFolderVector = *aIndexFolderResultVectorVector[k]; - int nItemCount = rIndexFolderVector.size(); - - fprintf( pFile, "Vector %d, %d elements\n", k, nItemCount ); - - for( int i = 0 ; i < nItemCount ; ++i ) - { - const HitItem& rItem = rIndexFolderVector[ i ]; - rtl::OString tmp(rtl::OUStringToOString(rItem.m_aURL, RTL_TEXTENCODING_UTF8)); - fprintf( pFile, " Item_vector%d, %d/%d: score=%f, URL=%s\n", k, i, nItemCount, rItem.m_fScore, tmp.getStr() ); - } - } - } -#endif - sal_Int32 nTotalHitCount = m_aURLParameter.get_hitCount(); sal_Int32 nHitCount = 0; while( nHitCount < nTotalHitCount ) @@ -406,10 +354,6 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF vector<HitItem>* pIndexFolderVector = aIndexFolderResultVectorVector[n]; delete pIndexFolderVector; } - -#ifdef LOGGING - fclose( pFile ); -#endif } sal_Int32 replIdx = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "#HLP#" )).getLength(); |