merge the formfield patch from ooo-build
[ooovba.git] / i18npool / inc / indexentrysupplier_common.hxx
blob9f2c7b03d1b8f8505e3b984069d897866d2c6848
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_common.hxx,v $
10 * $Revision: 1.5 $
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 ************************************************************************/
31 #ifndef _I18N_INDEXENTRYSUPPLIER_COMMON_HXX_
32 #define _I18N_INDEXENTRYSUPPLIER_COMMON_HXX_
34 #include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp>
35 #include <cppuhelper/implbase2.hxx> // helper for implementations
36 #include <com/sun/star/lang/XServiceInfo.hpp>
37 #include <collatorImpl.hxx>
39 namespace com { namespace sun { namespace star { namespace i18n {
41 // ----------------------------------------------------
42 // class IndexEntrySupplier_Common
43 // ----------------------------------------------------
45 class IndexEntrySupplier_Common : public cppu::WeakImplHelper2
47 com::sun::star::i18n::XExtendedIndexEntrySupplier,
48 com::sun::star::lang::XServiceInfo
51 public:
52 IndexEntrySupplier_Common( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF );
53 ~IndexEntrySupplier_Common();
55 virtual com::sun::star::uno::Sequence < com::sun::star::lang::Locale > SAL_CALL getLocaleList()
56 throw (com::sun::star::uno::RuntimeException);
58 virtual com::sun::star::uno::Sequence < rtl::OUString > SAL_CALL getAlgorithmList(
59 const com::sun::star::lang::Locale& rLocale )
60 throw (com::sun::star::uno::RuntimeException);
62 virtual sal_Bool SAL_CALL usePhoneticEntry(
63 const com::sun::star::lang::Locale& rLocale )
64 throw (com::sun::star::uno::RuntimeException);
66 virtual rtl::OUString SAL_CALL getPhoneticCandidate( const rtl::OUString& IndexEntry,
67 const com::sun::star::lang::Locale& rLocale )
68 throw (com::sun::star::uno::RuntimeException);
70 virtual sal_Bool SAL_CALL loadAlgorithm(
71 const com::sun::star::lang::Locale& rLocale,
72 const rtl::OUString& SortAlgorithm, sal_Int32 collatorOptions )
73 throw (com::sun::star::uno::RuntimeException);
75 virtual rtl::OUString SAL_CALL getIndexKey( const rtl::OUString& IndexEntry,
76 const rtl::OUString& PhoneticEntry, const com::sun::star::lang::Locale& rLocale )
77 throw (com::sun::star::uno::RuntimeException);
79 virtual sal_Int16 SAL_CALL compareIndexEntry( const rtl::OUString& IndexEntry1,
80 const rtl::OUString& PhoneticEntry1, const com::sun::star::lang::Locale& rLocale1,
81 const rtl::OUString& IndexEntry2, const ::rtl::OUString& PhoneticEntry2,
82 const com::sun::star::lang::Locale& rLocale2 )
83 throw (com::sun::star::uno::RuntimeException);
85 virtual rtl::OUString SAL_CALL getIndexCharacter( const rtl::OUString& rIndexEntry,
86 const com::sun::star::lang::Locale& rLocale, const rtl::OUString& rSortAlgorithm )
87 throw (com::sun::star::uno::RuntimeException);
89 virtual rtl::OUString SAL_CALL getIndexFollowPageWord( sal_Bool MorePages,
90 const com::sun::star::lang::Locale& rLocale )
91 throw (com::sun::star::uno::RuntimeException);
93 //XServiceInfo
94 virtual rtl::OUString SAL_CALL getImplementationName()
95 throw( com::sun::star::uno::RuntimeException );
96 virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName)
97 throw( com::sun::star::uno::RuntimeException );
98 virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames()
99 throw( com::sun::star::uno::RuntimeException );
101 protected:
102 const sal_Char *implementationName;
103 sal_Bool usePhonetic;
104 CollatorImpl *collator;
105 const rtl::OUString& SAL_CALL getEntry( const rtl::OUString& IndexEntry,
106 const rtl::OUString& PhoneticEntry, const com::sun::star::lang::Locale& rLocale )
107 throw (com::sun::star::uno::RuntimeException);
108 com::sun::star::lang::Locale aLocale;
109 rtl::OUString aAlgorithm;
112 } } } }
113 #endif