Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 : #ifndef _I18N_INDEXENTRYSUPPLIER_HXX_
20 : #define _I18N_INDEXENTRYSUPPLIER_HXX_
21 :
22 : #include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp>
23 : #include <cppuhelper/implbase2.hxx> // helper for implementations
24 : #include <com/sun/star/lang/XServiceInfo.hpp>
25 :
26 : namespace com { namespace sun { namespace star { namespace i18n {
27 :
28 : // ----------------------------------------------------
29 : // class IndexEntrySupplier
30 : // ----------------------------------------------------
31 0 : class IndexEntrySupplier : public cppu::WeakImplHelper2
32 : <
33 : com::sun::star::i18n::XExtendedIndexEntrySupplier,
34 : com::sun::star::lang::XServiceInfo
35 : >
36 : {
37 : public:
38 : IndexEntrySupplier( const com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory >& rxMSF );
39 :
40 : // Methods
41 : virtual com::sun::star::uno::Sequence < com::sun::star::lang::Locale > SAL_CALL getLocaleList()
42 : throw (com::sun::star::uno::RuntimeException);
43 :
44 : virtual com::sun::star::uno::Sequence < rtl::OUString > SAL_CALL getAlgorithmList(
45 : const com::sun::star::lang::Locale& rLocale )
46 : throw (com::sun::star::uno::RuntimeException);
47 :
48 : virtual sal_Bool SAL_CALL loadAlgorithm(
49 : const com::sun::star::lang::Locale& rLocale,
50 : const rtl::OUString& SortAlgorithm, sal_Int32 collatorOptions )
51 : throw (com::sun::star::uno::RuntimeException);
52 :
53 : virtual sal_Bool SAL_CALL usePhoneticEntry(
54 : const com::sun::star::lang::Locale& rLocale )
55 : throw (com::sun::star::uno::RuntimeException);
56 :
57 : virtual rtl::OUString SAL_CALL getPhoneticCandidate( const rtl::OUString& IndexEntry,
58 : const com::sun::star::lang::Locale& rLocale )
59 : throw (com::sun::star::uno::RuntimeException);
60 :
61 : virtual rtl::OUString SAL_CALL getIndexKey( const rtl::OUString& IndexEntry,
62 : const rtl::OUString& PhoneticEntry, const com::sun::star::lang::Locale& rLocale )
63 : throw (com::sun::star::uno::RuntimeException);
64 :
65 : virtual sal_Int16 SAL_CALL compareIndexEntry( const rtl::OUString& IndexEntry1,
66 : const rtl::OUString& PhoneticEntry1, const com::sun::star::lang::Locale& rLocale1,
67 : const rtl::OUString& IndexEntry2, const ::rtl::OUString& PhoneticEntry2,
68 : const com::sun::star::lang::Locale& rLocale2 )
69 : throw (com::sun::star::uno::RuntimeException);
70 :
71 : virtual rtl::OUString SAL_CALL getIndexCharacter( const rtl::OUString& IndexEntry,
72 : const com::sun::star::lang::Locale& rLocale, const rtl::OUString& SortAlgorithm )
73 : throw (com::sun::star::uno::RuntimeException);
74 :
75 : virtual rtl::OUString SAL_CALL getIndexFollowPageWord( sal_Bool MorePages,
76 : const com::sun::star::lang::Locale& rLocale )
77 : throw (com::sun::star::uno::RuntimeException);
78 :
79 : //XServiceInfo
80 : virtual rtl::OUString SAL_CALL getImplementationName()
81 : throw( com::sun::star::uno::RuntimeException );
82 : virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName)
83 : throw( com::sun::star::uno::RuntimeException );
84 : virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames()
85 : throw( com::sun::star::uno::RuntimeException );
86 :
87 : private:
88 : rtl::OUString aServiceName;
89 : com::sun::star::uno::Reference < com::sun::star::i18n::XExtendedIndexEntrySupplier > xIES;
90 : com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > xMSF;
91 : sal_Bool SAL_CALL createLocaleSpecificIndexEntrySupplier(const rtl::OUString& name) throw( com::sun::star::uno::RuntimeException );
92 : com::sun::star::uno::Reference < com::sun::star::i18n::XExtendedIndexEntrySupplier > SAL_CALL getLocaleSpecificIndexEntrySupplier(
93 : const com::sun::star::lang::Locale& rLocale, const rtl::OUString& rSortAlgorithm) throw (com::sun::star::uno::RuntimeException);
94 :
95 : protected:
96 : com::sun::star::lang::Locale aLocale;
97 : rtl::OUString aSortAlgorithm;
98 : };
99 :
100 : } } } }
101 :
102 : #endif
103 :
104 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|