summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-02-22 09:13:10 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-02-23 10:31:19 +0000
commit170b9551b24b400fd98ef226e54a837a132870de (patch)
treeed775f1777a3cd43fa230cc68ef86c737b8730a5 /xmlhelp
parent561cbe2bd5f5983bb3f95e226f3c3230030fe532 (diff)
tweak for cross-platformity
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx32
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx4
2 files changed, 17 insertions, 19 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index ca090e5dc25e..8d9255f5851c 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -2109,8 +2109,9 @@ rtl::OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemp
m_xSFA->kill( aCreateTestFolder );
}
- catch (Exception &)
- {}
+ catch (const Exception &)
+ {
+ }
// TEST
//bIsWriteAccess = false;
@@ -2138,8 +2139,9 @@ rtl::OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemp
{
m_xSFA->kill( aTempDirURL );
}
- catch (Exception &)
- {}
+ catch (const Exception &)
+ {
+ }
m_xSFA->createFolder( aTempDirURL );
aZipDir = aTempDirURL;
@@ -2147,24 +2149,21 @@ rtl::OUString IndexFolderIterator::implGetIndexFolderFromPackage( bool& o_rbTemp
}
}
- rtl::OUString aTargetDir;
- osl::FileBase::getSystemPathFromFileURL( aZipDir, aTargetDir );
-
- rtl::OUString aSourceDir;
- osl::FileBase::getSystemPathFromFileURL( aLangURL, aSourceDir );
+ rtl::OUString aCaption = aLangURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/caption"));
+ rtl::OUString aContent = aLangURL + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/content"));
- rtl::OUString aCaption(RTL_CONSTASCII_USTRINGPARAM("/caption"));
- rtl::OUString aContent(RTL_CONSTASCII_USTRINGPARAM("/content"));
+ HelpIndexer aIndexer(aLang, aMod, aCaption, aContent, aZipDir);
- HelpIndexer aIndexer(aLang, aMod, aSourceDir + aCaption, aSourceDir + aContent, aTargetDir);
+ aIndexer.indexDocuments();
if( bIsWriteAccess )
aIndexFolder = implGetFileFromPackage( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ".idxl" )), xPackage );
else
aIndexFolder = aZipDir + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/help.idxl" ));
}
- catch (Exception &)
- {}
+ catch (const Exception &)
+ {
+ }
}
}
@@ -2181,8 +2180,9 @@ void IndexFolderIterator::deleteTempIndexFolder( const rtl::OUString& aIndexFold
{
m_xSFA->kill( aTmpFolder );
}
- catch (Exception &)
- {}
+ catch (const Exception &)
+ {
+ }
}
}
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
index e8fe9d899b6c..4e47a5befde6 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
@@ -169,15 +169,13 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF
// START Invoke CLucene HelpSearch
rtl::OUString aLang = m_aURLParameter.get_language();
- rtl::OUString aSystemPath;
- osl::FileBase::getSystemPathFromFileURL( idxDir, aSystemPath );
const std::vector< rtl::OUString >& aListItem = queryList[i];
::rtl::OUString aNewQueryStr = aListItem[0];
vector<float> aScoreVector;
vector<rtl::OUString> aPathVector;
- HelpSearch searcher(aLang, aSystemPath);
+ HelpSearch searcher(aLang, idxDir);
searcher.query(aNewQueryStr, bCaptionsOnly, aPathVector, aScoreVector);
if( nQueryListSize > 1 )