1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _I18N_COLLATOR_UNICODE_HXX_
24 #define _I18N_COLLATOR_UNICODE_HXX_
25 
26 #include <com/sun/star/uno/Reference.h>
27 #include <com/sun/star/i18n/XCollator.hpp>
28 #include <cppuhelper/implbase1.hxx>
29 #include <osl/module.h>
30 
31 #include "warnings_guard_unicode_tblcoll.h"
32 
33 //      ----------------------------------------------------
34 //      class Collator_Unicode
35 //      ----------------------------------------------------
36 
37 namespace com { namespace sun { namespace star { namespace i18n {
38 
39 class Collator_Unicode : public cppu::WeakImplHelper1 < XCollator >
40 {
41 public:
42 	// Constructors
43 	Collator_Unicode();
44 	// Destructor
45 	~Collator_Unicode();
46 
47 	sal_Int32 SAL_CALL compareSubstring( const rtl::OUString& s1, sal_Int32 off1, sal_Int32 len1,
48 		const rtl::OUString& s2, sal_Int32 off2, sal_Int32 len2) throw(com::sun::star::uno::RuntimeException);
49 
50 	sal_Int32 SAL_CALL compareString( const rtl::OUString& s1, const rtl::OUString& s2)
51 		throw(com::sun::star::uno::RuntimeException);
52 
53 	sal_Int32 SAL_CALL loadCollatorAlgorithm( const rtl::OUString& impl, const lang::Locale& rLocale,
54 		sal_Int32 collatorOptions) throw(com::sun::star::uno::RuntimeException);
55 
56 
57 	// following 4 methods are implemented in collatorImpl.
loadDefaultCollator(const lang::Locale &,sal_Int32)58 	sal_Int32 SAL_CALL loadDefaultCollator( const lang::Locale&,  sal_Int32)
59 		throw(com::sun::star::uno::RuntimeException) {throw com::sun::star::uno::RuntimeException();}
loadCollatorAlgorithmWithEndUserOption(const rtl::OUString &,const lang::Locale &,const com::sun::star::uno::Sequence<sal_Int32> &)60 	void SAL_CALL loadCollatorAlgorithmWithEndUserOption( const rtl::OUString&, const lang::Locale&,
61 		const com::sun::star::uno::Sequence< sal_Int32 >&) throw(com::sun::star::uno::RuntimeException) {throw com::sun::star::uno::RuntimeException();}
listCollatorAlgorithms(const lang::Locale &)62 	com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL listCollatorAlgorithms( const lang::Locale&)
63 		throw(com::sun::star::uno::RuntimeException) {throw com::sun::star::uno::RuntimeException();}
listCollatorOptions(const rtl::OUString &)64 	com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL listCollatorOptions( const rtl::OUString& )
65 		throw(com::sun::star::uno::RuntimeException) {throw com::sun::star::uno::RuntimeException();}
66 
67 	//XServiceInfo
68 	virtual rtl::OUString SAL_CALL getImplementationName() throw( com::sun::star::uno::RuntimeException );
69 	virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( com::sun::star::uno::RuntimeException );
70 	virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames() throw( com::sun::star::uno::RuntimeException );
71 
72 protected:
73 	const sal_Char *implementationName;
74 private:
75 	RuleBasedCollator *uca_base, *collator;
76     oslModule hModule;
77 };
78 
79 } } } }
80 
81 #endif
82