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 _TOXHLP_HXX 25 #define _TOXHLP_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 32 namespace com { namespace sun { namespace star { 33 namespace i18n { 34 class XExtendedIndexEntrySupplier; 35 } 36 namespace lang { 37 class XMultiServiceFactory; 38 } 39 }}} 40 41 42 class String; 43 44 class IndexEntrySupplierWrapper 45 { 46 STAR_NMSPC::lang::Locale aLcl; 47 STAR_NMSPC::uno::Reference < com::sun::star::i18n::XExtendedIndexEntrySupplier > xIES; 48 49 public: 50 IndexEntrySupplierWrapper( 51 const STAR_NMSPC::lang::Locale& rLcl, 52 STAR_REFERENCE( lang::XMultiServiceFactory )& rxMSF ); 53 ~IndexEntrySupplierWrapper(); 54 55 String GetIndexKey( const String& rTxt, const String& rTxtReading, 56 const STAR_NMSPC::lang::Locale& rLocale ) const; 57 58 String GetFollowingText( sal_Bool bMorePages ) const; 59 60 STAR_NMSPC::uno::Sequence< ::rtl::OUString > 61 GetAlgorithmList( const STAR_NMSPC::lang::Locale& rLcl ) const; 62 63 sal_Bool LoadAlgorithm( const STAR_NMSPC::lang::Locale& rLcl, 64 const String& sSortAlgorithm, long nOptions ) const; 65 66 sal_Int16 CompareIndexEntry( const String& rTxt1, const String& rTxtReading1, 67 const STAR_NMSPC::lang::Locale& rLcl1, 68 const String& rTxt2, const String& rTxtReading2, 69 const STAR_NMSPC::lang::Locale& rLcl2 ) const; 70 }; 71 72 #endif 73