Version 3.6.0.2, tag libreoffice-3.6.0.2
[LibreOffice.git] / i18npool / inc / collator_unicode.hxx
blob5cf481d5b5c37b69f82501a3adc1eb47e17b37a1
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
28 #ifndef _I18N_COLLATOR_UNICODE_HXX_
29 #define _I18N_COLLATOR_UNICODE_HXX_
31 #include <com/sun/star/uno/Reference.h>
32 #include <com/sun/star/i18n/XCollator.hpp>
33 #include <cppuhelper/implbase1.hxx>
34 #include <osl/module.h>
36 #include "warnings_guard_unicode_tblcoll.h"
38 // ----------------------------------------------------
39 // class Collator_Unicode
40 // ----------------------------------------------------
42 namespace com { namespace sun { namespace star { namespace i18n {
44 class Collator_Unicode : public cppu::WeakImplHelper1 < XCollator >
46 public:
47 // Constructors
48 Collator_Unicode();
49 // Destructor
50 ~Collator_Unicode();
52 sal_Int32 SAL_CALL compareSubstring( const rtl::OUString& s1, sal_Int32 off1, sal_Int32 len1,
53 const rtl::OUString& s2, sal_Int32 off2, sal_Int32 len2) throw(com::sun::star::uno::RuntimeException);
55 sal_Int32 SAL_CALL compareString( const rtl::OUString& s1, const rtl::OUString& s2)
56 throw(com::sun::star::uno::RuntimeException);
58 sal_Int32 SAL_CALL loadCollatorAlgorithm( const rtl::OUString& impl, const lang::Locale& rLocale,
59 sal_Int32 collatorOptions) throw(com::sun::star::uno::RuntimeException);
62 // following 4 methods are implemented in collatorImpl.
63 sal_Int32 SAL_CALL loadDefaultCollator( const lang::Locale&, sal_Int32)
64 throw(com::sun::star::uno::RuntimeException) {throw com::sun::star::uno::RuntimeException();}
65 void SAL_CALL loadCollatorAlgorithmWithEndUserOption( const rtl::OUString&, const lang::Locale&,
66 const com::sun::star::uno::Sequence< sal_Int32 >&) throw(com::sun::star::uno::RuntimeException) {throw com::sun::star::uno::RuntimeException();}
67 com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL listCollatorAlgorithms( const lang::Locale&)
68 throw(com::sun::star::uno::RuntimeException) {throw com::sun::star::uno::RuntimeException();}
69 com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL listCollatorOptions( const rtl::OUString& )
70 throw(com::sun::star::uno::RuntimeException) {throw com::sun::star::uno::RuntimeException();}
72 //XServiceInfo
73 virtual rtl::OUString SAL_CALL getImplementationName() throw( com::sun::star::uno::RuntimeException );
74 virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( com::sun::star::uno::RuntimeException );
75 virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw( com::sun::star::uno::RuntimeException );
77 protected:
78 const sal_Char *implementationName;
79 private:
80 RuleBasedCollator *uca_base, *collator;
81 oslModule hModule;
84 } } } }
86 #endif
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */