xref: /aoo4110/main/sw/inc/toxwrap.hxx (revision b1cdbd2c)
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 
24 #ifndef _TOXWRAP_HXX
25 #define _TOXWRAP_HXX
26 
27 #include <tools/solar.h>
28 #include <com/sun/star/lang/Locale.hpp>
29 #include <com/sun/star/uno/Reference.hxx>
30 #include <swunodef.hxx>
31 #include "swdllapi.h"
32 
33 namespace com { namespace sun { namespace star {
34 namespace i18n {
35     class XExtendedIndexEntrySupplier;
36 }
37 namespace lang {
38 	class XMultiServiceFactory;
39 }
40 }}}
41 
42 
43 class String;
44 
45 class SW_DLLPUBLIC IndexEntrySupplierWrapper
46 {
47 	STAR_NMSPC::lang::Locale aLcl;
48     STAR_NMSPC::uno::Reference < com::sun::star::i18n::XExtendedIndexEntrySupplier > xIES;
49 
50 public:
51     IndexEntrySupplierWrapper();
52 	~IndexEntrySupplierWrapper();
53 
SetLocale(const STAR_NMSPC::lang::Locale & rLocale)54     void SetLocale( const STAR_NMSPC::lang::Locale& rLocale ) { aLcl = rLocale; }
55 
56     String GetIndexKey( const String& rTxt, const String& rTxtReading,
57                         const STAR_NMSPC::lang::Locale& rLocale ) const;
58 
59     String GetFollowingText( sal_Bool bMorePages ) const;
60 
61     STAR_NMSPC::uno::Sequence< ::rtl::OUString >
62     GetAlgorithmList( const STAR_NMSPC::lang::Locale& rLcl ) const;
63 
64     sal_Bool LoadAlgorithm( const STAR_NMSPC::lang::Locale& rLcl,
65                             const String& sSortAlgorithm, long nOptions ) const;
66 
67     sal_Int16 CompareIndexEntry( const String& rTxt1, const String& rTxtReading1,
68                                  const STAR_NMSPC::lang::Locale& rLcl1,
69                                  const String& rTxt2, const String& rTxtReading2,
70                                  const STAR_NMSPC::lang::Locale& rLcl2 ) const;
71 };
72 
73 #endif
74