update dev300-m58
[ooovba.git] / i18npool / inc / collator_unicode.hxx
blob33be04e434b516adb56f93b4f9c6ed420daf4f28
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: collator_unicode.hxx,v $
10 * $Revision: 1.13 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _I18N_COLLATOR_UNICODE_HXX_
31 #define _I18N_COLLATOR_UNICODE_HXX_
33 #include <com/sun/star/uno/Reference.h>
34 #include <com/sun/star/i18n/XCollator.hpp>
35 #include <cppuhelper/implbase1.hxx>
36 #include <osl/module.h>
38 #include "warnings_guard_unicode_tblcoll.h"
40 // ----------------------------------------------------
41 // class Collator_Unicode
42 // ----------------------------------------------------
44 namespace com { namespace sun { namespace star { namespace i18n {
46 class Collator_Unicode : public cppu::WeakImplHelper1 < XCollator >
48 public:
49 // Constructors
50 Collator_Unicode();
51 // Destructor
52 ~Collator_Unicode();
54 sal_Int32 SAL_CALL compareSubstring( const rtl::OUString& s1, sal_Int32 off1, sal_Int32 len1,
55 const rtl::OUString& s2, sal_Int32 off2, sal_Int32 len2) throw(com::sun::star::uno::RuntimeException);
57 sal_Int32 SAL_CALL compareString( const rtl::OUString& s1, const rtl::OUString& s2)
58 throw(com::sun::star::uno::RuntimeException);
60 sal_Int32 SAL_CALL loadCollatorAlgorithm( const rtl::OUString& impl, const lang::Locale& rLocale,
61 sal_Int32 collatorOptions) throw(com::sun::star::uno::RuntimeException);
64 // following 4 methods are implemented in collatorImpl.
65 sal_Int32 SAL_CALL loadDefaultCollator( const lang::Locale&, sal_Int32)
66 throw(com::sun::star::uno::RuntimeException) {throw com::sun::star::uno::RuntimeException();}
67 void SAL_CALL loadCollatorAlgorithmWithEndUserOption( const rtl::OUString&, const lang::Locale&,
68 const com::sun::star::uno::Sequence< sal_Int32 >&) throw(com::sun::star::uno::RuntimeException) {throw com::sun::star::uno::RuntimeException();}
69 com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL listCollatorAlgorithms( const lang::Locale&)
70 throw(com::sun::star::uno::RuntimeException) {throw com::sun::star::uno::RuntimeException();}
71 com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL listCollatorOptions( const rtl::OUString& )
72 throw(com::sun::star::uno::RuntimeException) {throw com::sun::star::uno::RuntimeException();}
74 //XServiceInfo
75 virtual rtl::OUString SAL_CALL getImplementationName() throw( com::sun::star::uno::RuntimeException );
76 virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( com::sun::star::uno::RuntimeException );
77 virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw( com::sun::star::uno::RuntimeException );
79 protected:
80 const sal_Char *implementationName;
81 private:
82 RuleBasedCollator *uca_base, *collator;
83 oslModule hModule;
86 } } } }
88 #endif