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