bump product version to 5.0.4.1
[LibreOffice.git] / i18npool / inc / indexentrysupplier.hxx
blob56f4fcc83736b0bdde148135a07ae26069fb0960
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
19 #ifndef INCLUDED_I18NPOOL_INC_INDEXENTRYSUPPLIER_HXX
20 #define INCLUDED_I18NPOOL_INC_INDEXENTRYSUPPLIER_HXX
22 #include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp>
23 #include <cppuhelper/implbase2.hxx>
24 #include <com/sun/star/lang/XServiceInfo.hpp>
25 #include <com/sun/star/uno/XComponentContext.hpp>
27 namespace com { namespace sun { namespace star { namespace i18n {
30 // class IndexEntrySupplier
32 class IndexEntrySupplier : public cppu::WeakImplHelper2
34 com::sun::star::i18n::XExtendedIndexEntrySupplier,
35 com::sun::star::lang::XServiceInfo
38 public:
39 IndexEntrySupplier( const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& rxContext );
41 // Methods
42 virtual com::sun::star::uno::Sequence < com::sun::star::lang::Locale > SAL_CALL getLocaleList()
43 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
45 virtual com::sun::star::uno::Sequence < OUString > SAL_CALL getAlgorithmList(
46 const com::sun::star::lang::Locale& rLocale )
47 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
49 virtual sal_Bool SAL_CALL loadAlgorithm(
50 const com::sun::star::lang::Locale& rLocale,
51 const OUString& SortAlgorithm, sal_Int32 collatorOptions )
52 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
54 virtual sal_Bool SAL_CALL usePhoneticEntry(
55 const com::sun::star::lang::Locale& rLocale )
56 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
58 virtual OUString SAL_CALL getPhoneticCandidate( const OUString& IndexEntry,
59 const com::sun::star::lang::Locale& rLocale )
60 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
62 virtual OUString SAL_CALL getIndexKey( const OUString& IndexEntry,
63 const OUString& PhoneticEntry, const com::sun::star::lang::Locale& rLocale )
64 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
66 virtual sal_Int16 SAL_CALL compareIndexEntry( const OUString& IndexEntry1,
67 const OUString& PhoneticEntry1, const com::sun::star::lang::Locale& rLocale1,
68 const OUString& IndexEntry2, const OUString& PhoneticEntry2,
69 const com::sun::star::lang::Locale& rLocale2 )
70 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
72 virtual OUString SAL_CALL getIndexCharacter( const OUString& IndexEntry,
73 const com::sun::star::lang::Locale& rLocale, const OUString& SortAlgorithm )
74 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
76 virtual OUString SAL_CALL getIndexFollowPageWord( sal_Bool MorePages,
77 const com::sun::star::lang::Locale& rLocale )
78 throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
80 //XServiceInfo
81 virtual OUString SAL_CALL getImplementationName()
82 throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
83 virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName)
84 throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
85 virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
86 throw( com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
88 private:
89 com::sun::star::uno::Reference < com::sun::star::i18n::XExtendedIndexEntrySupplier > xIES;
90 com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext > m_xContext;
91 bool SAL_CALL createLocaleSpecificIndexEntrySupplier(const 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 OUString& rSortAlgorithm) throw (com::sun::star::uno::RuntimeException);
95 protected:
96 com::sun::star::lang::Locale aLocale;
97 OUString aSortAlgorithm;
100 } } } }
102 #endif
104 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */