Branch libreoffice-5-0-4
[LibreOffice.git] / include / svl / numuno.hxx
blob57ad15d420db60fadf42d20c52640cd5a8d38b13
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_SVL_NUMUNO_HXX
20 #define INCLUDED_SVL_NUMUNO_HXX
22 #include <svl/svldllapi.h>
23 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
24 #include <com/sun/star/lang/XUnoTunnel.hpp>
25 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
26 #include <cppuhelper/implbase2.hxx>
28 class SvNumberFormatter;
29 class SvNumFmtSuppl_Impl;
31 namespace comphelper
33 class SharedMutex;
38 // SvNumberFormatterServiceObj must be registered as service somewhere
40 com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL
41 SvNumberFormatterServiceObj_NewInstance(
42 const com::sun::star::uno::Reference<
43 com::sun::star::lang::XMultiServiceFactory>& rSMgr );
47 // SvNumberFormatsSupplierObj: aggregate to document,
48 // construct with SvNumberFormatter
50 class SVL_DLLPUBLIC SvNumberFormatsSupplierObj : public cppu::WeakAggImplHelper2<
51 com::sun::star::util::XNumberFormatsSupplier,
52 com::sun::star::lang::XUnoTunnel>
54 private:
55 SvNumFmtSuppl_Impl* pImpl;
57 public:
58 SvNumberFormatsSupplierObj();
59 SvNumberFormatsSupplierObj(SvNumberFormatter* pForm);
60 virtual ~SvNumberFormatsSupplierObj();
62 void SetNumberFormatter(SvNumberFormatter* pNew);
63 SvNumberFormatter* GetNumberFormatter() const;
65 // XNumberFormatsSupplier
66 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL
67 getNumberFormatSettings()
68 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
69 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > SAL_CALL
70 getNumberFormats()
71 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
73 // XUnoTunnel
74 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
75 sal_Int8 >& aIdentifier )
76 throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
78 static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
79 static SvNumberFormatsSupplierObj* getImplementation( const com::sun::star::uno::Reference<
80 com::sun::star::util::XNumberFormatsSupplier>& rObj );
82 ::comphelper::SharedMutex& getSharedMutex() const;
85 #endif // INCLUDED_SVL_NUMUNO_HXX
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */