nss: upgrade to release 3.73
[LibreOffice.git] / i18npool / inc / textconversionImpl.hxx
blob4a104f59719a33ab3d02d327ed638166b88e39d1
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_TEXTCONVERSIONIMPL_HXX
20 #define INCLUDED_I18NPOOL_INC_TEXTCONVERSIONIMPL_HXX
22 #include <com/sun/star/lang/XServiceInfo.hpp>
23 #include <com/sun/star/i18n/XExtendedTextConversion.hpp>
24 #include <cppuhelper/implbase.hxx>
26 namespace com::sun::star::uno { class XComponentContext; }
28 namespace i18npool {
32 class TextConversionImpl final : public cppu::WeakImplHelper
34 css::i18n::XExtendedTextConversion,
35 css::lang::XServiceInfo
38 public:
39 TextConversionImpl( const css::uno::Reference < css::uno::XComponentContext >& rxContext ) : m_xContext(rxContext) {};
41 // Methods
42 css::i18n::TextConversionResult SAL_CALL
43 getConversions( const OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength,
44 const css::lang::Locale& aLocale, sal_Int16 nTextConversionType,
45 sal_Int32 nTextConversionOptions ) override;
46 OUString SAL_CALL
47 getConversion( const OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength,
48 const css::lang::Locale& aLocale, sal_Int16 nTextConversionType,
49 sal_Int32 nTextConversionOptions ) override;
50 OUString SAL_CALL
51 getConversionWithOffset( const OUString& aText, sal_Int32 nStartPos, sal_Int32 nLength,
52 const css::lang::Locale& aLocale, sal_Int16 nTextConversionType,
53 sal_Int32 nTextConversionOptions, css::uno::Sequence< sal_Int32 >& offset ) override;
54 sal_Bool SAL_CALL
55 interactiveConversion( const css::lang::Locale& aLocale,
56 sal_Int16 nTextConversionType, sal_Int32 nTextConversionOptions ) override;
58 //XServiceInfo
59 OUString SAL_CALL
60 getImplementationName() override;
61 sal_Bool SAL_CALL
62 supportsService(const OUString& ServiceName) override;
63 css::uno::Sequence< OUString > SAL_CALL
64 getSupportedServiceNames() override;
65 private:
66 css::lang::Locale aLocale;
67 css::uno::Reference < css::i18n::XExtendedTextConversion > xTC;
68 css::uno::Reference < css::uno::XComponentContext > m_xContext;
70 /// @throws css::lang::NoSupportException
71 void getLocaleSpecificTextConversion( const css::lang::Locale& rLocale );
74 } // i18npool
77 #endif
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */