summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2011-02-15 01:16:38 +0100
committerThomas Arnhold <thomas@arnhold.org>2011-02-15 13:27:12 +0100
commit008f3b2b18968e95f2e949378f7aa897e3316418 (patch)
tree052e8358e54c68cb6cae26147ce843bec2dca1a2 /xmlhelp
parent9a1dc84889c192a24e7c482065ae38dbb9f04511 (diff)
Remove LOGGING
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx56
1 files changed, 0 insertions, 56 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
index 0501c1e551..5b417010cb 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();