summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorRüdiger Timm <rt@openoffice.org>2005-01-27 09:07:40 +0000
committerRüdiger Timm <rt@openoffice.org>2005-01-27 09:07:40 +0000
commite2b83783a941459e1b6c174a8a3edfad15821f8c (patch)
tree0891ccc9991119a2631213f674e8421c5e7c7fdb /xmlhelp
parent5a60f54a203d98eee17b24b97843d319a4e8a232 (diff)
INTEGRATION: CWS helpcl (1.9.14); FILE MERGED
2005/01/25 17:38:31 abi 1.9.14.2: #i22548# testing service availability 2005/01/25 17:32:04 abi 1.9.14.1: #i22548# forgotten to use transliteration service
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx33
1 files changed, 29 insertions, 4 deletions
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
index c763af8416cb..0e4416a20201 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: resultsetforquery.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: kz $ $Date: 2004-08-30 17:27:13 $
+ * last change: $Author: rt $ $Date: 2005-01-27 10:07:40 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,9 +65,15 @@
#ifndef _COM_SUN_STAR_UCB_XCOMMANDENVIRONMENT_HPP_
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#endif
+#ifndef _COM_SUN_STAR_I18N_XEXTENDEDTRANSLITERATION_HPP_
+#include <com/sun/star/i18n/XExtendedTransliteration.hpp>
+#endif
#ifndef _COM_SUN_STAR_UCB_XCOMMANDPROCESSOR_HPP_
#include <com/sun/star/ucb/XCommandProcessor.hpp>
#endif
+#ifndef _COM_SUN_STAR_LANG_LOCALE_HPP_
+#include <com/sun/star/lang/Locale.hpp>
+#endif
#ifndef _RESULTSETFORROOT_HXX
#include <provider/resultsetforquery.hxx>
#endif
@@ -92,7 +98,9 @@ using namespace xmlsearch::excep;
using namespace xmlsearch::qe;
using namespace com::sun::star;
using namespace com::sun::star::ucb;
-
+using namespace com::sun::star::i18n;
+using namespace com::sun::star::uno;
+using namespace com::sun::star::lang;
ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceFactory >& xMSF,
const uno::Reference< XContentProvider >& xProvider,
@@ -105,6 +113,16 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF
m_aURLParameter( aURLParameter ),
m_pDatabases( pDatabases )
{
+ Reference< XTransliteration > xTrans(
+ xMSF->createInstance( rtl::OUString::createFromAscii( "com.sun.star.i18n.Transliteration" ) ),
+ UNO_QUERY );
+ Locale aLocale( aURLParameter.get_language(),
+ rtl::OUString(),
+ rtl::OUString() );
+ if(xTrans.is())
+ xTrans->loadModule(TransliterationModules_UPPERCASE_LOWERCASE,
+ aLocale );
+
unsigned int i;
vector< vector< rtl::OUString > > queryList;
@@ -118,7 +136,14 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF
idx = query.getLength();
vector< rtl::OUString > currentQuery;
- currentQuery.push_back( query.copy( 0,idx ) );
+ rtl::OUString tmp(query.copy( 0,idx ));
+ rtl:: OUString toliterate = tmp;
+ if(xTrans.is()) {
+ Sequence<sal_Int32> aSeq;
+ toliterate = xTrans->transliterate(
+ tmp,0,tmp.getLength(),aSeq);
+ }
+ currentQuery.push_back( toliterate );
queryList.push_back( currentQuery );
query = query.copy( 1 + idx );
}