summaryrefslogtreecommitdiff
path: root/unotools/source/i18n/textsearch.cxx
diff options
context:
space:
mode:
authorFrank Meies <fme@openoffice.org>2002-08-02 08:58:02 +0000
committerFrank Meies <fme@openoffice.org>2002-08-02 08:58:02 +0000
commitcb387b1d0b4395a065a51d9eac10df983106bd38 (patch)
tree86e7f6431b1fb0e2fd5c9358987127db078afbf3 /unotools/source/i18n/textsearch.cxx
parent00e8eba862df67e843a0c050d25240f9523ac903 (diff)
#100447# Consider different scripts for similarity search
Diffstat (limited to 'unotools/source/i18n/textsearch.cxx')
-rw-r--r--unotools/source/i18n/textsearch.cxx26
1 files changed, 24 insertions, 2 deletions
diff --git a/unotools/source/i18n/textsearch.cxx b/unotools/source/i18n/textsearch.cxx
index 1462abc68d09..f5429159dd2c 100644
--- a/unotools/source/i18n/textsearch.cxx
+++ b/unotools/source/i18n/textsearch.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: textsearch.cxx,v $
*
- * $Revision: 1.5 $
+ * $Revision: 1.6 $
*
- * last change: $Author: er $ $Date: 2001-07-17 14:25:12 $
+ * last change: $Author: fme $ $Date: 2002-08-02 09:58:02 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -231,6 +231,28 @@ void TextSearch::Init( const SearchParam & rParam,
}
}
+void TextSearch::SetLocale( const ::com::sun::star::util::SearchOptions& rOptions,
+ const ::com::sun::star::lang::Locale& rLocale )
+{
+ // convert SearchParam to the UNO SearchOptions
+ SearchOptions aSOpt( rOptions );
+ aSOpt.Locale = rLocale;
+
+ try
+ {
+ Reference< XMultiServiceFactory > xMSF = ::comphelper::getProcessServiceFactory();
+ xTextSearch = Reference< XTextSearch > ( xMSF->createInstance(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.util.TextSearch" ) ) ), UNO_QUERY );
+ xTextSearch->setOptions( aSOpt );
+ }
+ catch ( Exception& )
+ {
+ DBG_ERRORFILE( "TextSearch ctor: Exception caught!" );
+ }
+}
+
+
TextSearch::~TextSearch()
{
}