1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 .
20 #ifndef INCLUDED_I18NPOOL_INC_INDEXENTRYSUPPLIER_COMMON_HXX
21 #define INCLUDED_I18NPOOL_INC_INDEXENTRYSUPPLIER_COMMON_HXX
23 #include <com/sun/star/i18n/XExtendedIndexEntrySupplier.hpp>
24 #include <cppuhelper/implbase.hxx>
25 #include <com/sun/star/lang/XServiceInfo.hpp>
26 #include <collatorImpl.hxx>
28 namespace com
{ namespace sun
{ namespace star
{ namespace i18n
{
31 // class IndexEntrySupplier_Common
34 class IndexEntrySupplier_Common
: public cppu::WeakImplHelper
36 css::i18n::XExtendedIndexEntrySupplier
,
37 css::lang::XServiceInfo
41 IndexEntrySupplier_Common( const css::uno::Reference
< css::uno::XComponentContext
>& rxContext
);
42 virtual ~IndexEntrySupplier_Common();
44 virtual css::uno::Sequence
< css::lang::Locale
> SAL_CALL
getLocaleList()
45 throw (css::uno::RuntimeException
, std::exception
) override
;
47 virtual css::uno::Sequence
< OUString
> SAL_CALL
getAlgorithmList(
48 const css::lang::Locale
& rLocale
)
49 throw (css::uno::RuntimeException
, std::exception
) override
;
51 virtual sal_Bool SAL_CALL
usePhoneticEntry(
52 const css::lang::Locale
& rLocale
)
53 throw (css::uno::RuntimeException
, std::exception
) override
;
55 virtual OUString SAL_CALL
getPhoneticCandidate( const OUString
& IndexEntry
,
56 const css::lang::Locale
& rLocale
)
57 throw (css::uno::RuntimeException
, std::exception
) override
;
59 virtual sal_Bool SAL_CALL
loadAlgorithm(
60 const css::lang::Locale
& rLocale
,
61 const OUString
& SortAlgorithm
, sal_Int32 collatorOptions
)
62 throw (css::uno::RuntimeException
, std::exception
) override
;
64 virtual OUString SAL_CALL
getIndexKey( const OUString
& IndexEntry
,
65 const OUString
& PhoneticEntry
, const css::lang::Locale
& rLocale
)
66 throw (css::uno::RuntimeException
, std::exception
) override
;
68 virtual sal_Int16 SAL_CALL
compareIndexEntry( const OUString
& IndexEntry1
,
69 const OUString
& PhoneticEntry1
, const css::lang::Locale
& rLocale1
,
70 const OUString
& IndexEntry2
, const OUString
& PhoneticEntry2
,
71 const css::lang::Locale
& rLocale2
)
72 throw (css::uno::RuntimeException
, std::exception
) override
;
74 virtual OUString SAL_CALL
getIndexCharacter( const OUString
& rIndexEntry
,
75 const css::lang::Locale
& rLocale
, const OUString
& rSortAlgorithm
)
76 throw (css::uno::RuntimeException
, std::exception
) override
;
78 virtual OUString SAL_CALL
getIndexFollowPageWord( sal_Bool MorePages
,
79 const css::lang::Locale
& rLocale
)
80 throw (css::uno::RuntimeException
, std::exception
) override
;
83 virtual OUString SAL_CALL
getImplementationName()
84 throw( css::uno::RuntimeException
, std::exception
) override
;
85 virtual sal_Bool SAL_CALL
supportsService(const OUString
& ServiceName
)
86 throw( css::uno::RuntimeException
, std::exception
) override
;
87 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames()
88 throw( css::uno::RuntimeException
, std::exception
) override
;
91 const sal_Char
* implementationName
;
93 CollatorImpl
* collator
;
94 css::lang::Locale aLocale
;
97 const OUString
& SAL_CALL
getEntry( const OUString
& IndexEntry
,
98 const OUString
& PhoneticEntry
, const css::lang::Locale
& rLocale
)
99 throw (css::uno::RuntimeException
);
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */