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_SVL_SOURCE_NUMBERS_SUPSERVS_HXX
21 #define INCLUDED_SVL_SOURCE_NUMBERS_SUPSERVS_HXX
23 #include <svl/numuno.hxx>
24 #include <com/sun/star/lang/XInitialization.hpp>
25 #include <com/sun/star/lang/XServiceInfo.hpp>
26 #include <com/sun/star/uno/XComponentContext.hpp>
30 * SvNumberFormatsSupplierServiceObject - a number formats supplier which
31 * - can be instantiated as a service
32 * - works with its own SvNumberFormatter instance
33 * - can be initialized (css::lang::XInitialization)
34 * with a specific language (i.e. css::lang::Locale)
36 class SvNumberFormatsSupplierServiceObject final
37 :public SvNumberFormatsSupplierObj
38 ,public css::lang::XInitialization
39 ,public css::lang::XServiceInfo
41 std::unique_ptr
<SvNumberFormatter
> m_pOwnFormatter
;
42 css::uno::Reference
< css::uno::XComponentContext
> m_xORB
;
44 void implEnsureFormatter();
47 explicit SvNumberFormatsSupplierServiceObject(css::uno::Reference
< css::uno::XComponentContext
> _xORB
);
48 virtual ~SvNumberFormatsSupplierServiceObject() override
;
51 virtual void SAL_CALL
acquire() noexcept override
{ SvNumberFormatsSupplierObj::acquire(); }
52 virtual void SAL_CALL
release() noexcept override
{ SvNumberFormatsSupplierObj::release(); }
53 virtual css::uno::Any SAL_CALL
queryInterface( const css::uno::Type
& _rType
) override
54 { return SvNumberFormatsSupplierObj::queryInterface(_rType
); }
57 virtual css::uno::Any SAL_CALL
queryAggregation( const css::uno::Type
& _rType
) override
;
60 virtual void SAL_CALL
initialize( const css::uno::Sequence
< css::uno::Any
>& aArguments
) override
;
63 virtual OUString SAL_CALL
getImplementationName( ) override
;
64 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
65 virtual css::uno::Sequence
< OUString
> SAL_CALL
getSupportedServiceNames( ) override
;
67 // XNumberFormatsSupplier
68 virtual css::uno::Reference
< css::beans::XPropertySet
> SAL_CALL
69 getNumberFormatSettings() override
;
70 virtual css::uno::Reference
< css::util::XNumberFormats
> SAL_CALL
71 getNumberFormats() override
;
74 virtual sal_Int64 SAL_CALL
getSomething( const css::uno::Sequence
< sal_Int8
>& aIdentifier
) override
;
78 #endif // INCLUDED_SVL_SOURCE_NUMBERS_SUPSERVS_HXX
80 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */