update dev300-m58
[ooovba.git] / i18npool / inc / indexentrysupplier.hxx
blob2fbc3d8e476985147a6fe50303c7b60ffcbf6d3c
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: indexentrysupplier.hxx,v $
10 * $Revision: 1.13 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _I18N_INDEXENTRYSUPPLIER_HXX_
31 #define _I18N_INDEXENTRYSUPPLIER_HXX_
33 #include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp>
34 #include <cppuhelper/implbase2.hxx> // helper for implementations
35 #include <com/sun/star/lang/XServiceInfo.hpp>
37 namespace com { namespace sun { namespace star { namespace i18n {
39 // ----------------------------------------------------
40 // class IndexEntrySupplier
41 // ----------------------------------------------------
42 class IndexEntrySupplier : public cppu::WeakImplHelper2
44 com::sun::star::i18n::XExtendedIndexEntrySupplier,
45 com::sun::star::lang::XServiceInfo
48 public:
49 IndexEntrySupplier( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF );
51 // Methods
52 virtual com::sun::star::uno::Sequence < com::sun::star::lang::Locale > SAL_CALL getLocaleList()
53 throw (com::sun::star::uno::RuntimeException);
55 virtual com::sun::star::uno::Sequence < rtl::OUString > SAL_CALL getAlgorithmList(
56 const com::sun::star::lang::Locale& rLocale )
57 throw (com::sun::star::uno::RuntimeException);
59 virtual sal_Bool SAL_CALL loadAlgorithm(
60 const com::sun::star::lang::Locale& rLocale,
61 const rtl::OUString& SortAlgorithm, sal_Int32 collatorOptions )
62 throw (com::sun::star::uno::RuntimeException);
64 virtual sal_Bool SAL_CALL usePhoneticEntry(
65 const com::sun::star::lang::Locale& rLocale )
66 throw (com::sun::star::uno::RuntimeException);
68 virtual rtl::OUString SAL_CALL getPhoneticCandidate( const rtl::OUString& IndexEntry,
69 const com::sun::star::lang::Locale& rLocale )
70 throw (com::sun::star::uno::RuntimeException);
72 virtual rtl::OUString SAL_CALL getIndexKey( const rtl::OUString& IndexEntry,
73 const rtl::OUString& PhoneticEntry, const com::sun::star::lang::Locale& rLocale )
74 throw (com::sun::star::uno::RuntimeException);
76 virtual sal_Int16 SAL_CALL compareIndexEntry( const rtl::OUString& IndexEntry1,
77 const rtl::OUString& PhoneticEntry1, const com::sun::star::lang::Locale& rLocale1,
78 const rtl::OUString& IndexEntry2, const ::rtl::OUString& PhoneticEntry2,
79 const com::sun::star::lang::Locale& rLocale2 )
80 throw (com::sun::star::uno::RuntimeException);
82 virtual rtl::OUString SAL_CALL getIndexCharacter( const rtl::OUString& IndexEntry,
83 const com::sun::star::lang::Locale& rLocale, const rtl::OUString& SortAlgorithm )
84 throw (com::sun::star::uno::RuntimeException);
86 virtual rtl::OUString SAL_CALL getIndexFollowPageWord( sal_Bool MorePages,
87 const com::sun::star::lang::Locale& rLocale )
88 throw (com::sun::star::uno::RuntimeException);
90 //XServiceInfo
91 virtual rtl::OUString SAL_CALL getImplementationName()
92 throw( com::sun::star::uno::RuntimeException );
93 virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName)
94 throw( com::sun::star::uno::RuntimeException );
95 virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames()
96 throw( com::sun::star::uno::RuntimeException );
98 private:
99 rtl::OUString aServiceName;
100 com::sun::star::uno::Reference < com::sun::star::i18n::XExtendedIndexEntrySupplier > xIES;
101 com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > xMSF;
102 sal_Bool SAL_CALL createLocaleSpecificIndexEntrySupplier(const rtl::OUString& name) throw( com::sun::star::uno::RuntimeException );
103 com::sun::star::uno::Reference < com::sun::star::i18n::XExtendedIndexEntrySupplier > SAL_CALL getLocaleSpecificIndexEntrySupplier(
104 const com::sun::star::lang::Locale& rLocale, const rtl::OUString& rSortAlgorithm) throw (com::sun::star::uno::RuntimeException);
106 protected:
107 com::sun::star::lang::Locale aLocale;
108 rtl::OUString aSortAlgorithm;
111 } } } }
113 #endif