summaryrefslogtreecommitdiff
path: root/unotools/source/i18n/textsearch.cxx
diff options
context:
space:
mode:
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()
{
}