sync master with lastest vba changes
[ooovba.git] / binfilter / inc / bf_svtools / numuno.hxx
blob5f07aaf6d991abf38ee082b3ba81e1894cbcc596
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: numuno.hxx,v $
10 * $Revision: 1.3 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _NUMUNO_HXX
31 #define _NUMUNO_HXX
33 #ifndef INCLUDED_SVTDLLAPI_H
34 #include "bf_svtools/svtdllapi.h"
35 #endif
37 #ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_
38 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
39 #endif
40 #ifndef _COM_SUN_STAR_LANG_XUNOTUNNEL_HPP_
41 #include <com/sun/star/lang/XUnoTunnel.hpp>
42 #endif
44 #ifndef _CPPUHELPER_IMPLBASE2_HXX_
45 #include <cppuhelper/implbase2.hxx>
46 #endif
48 namespace binfilter
51 class SvNumberFormatter;
52 class SvNumFmtSuppl_Impl;
54 //------------------------------------------------------------------
56 // SvNumberFormatterServiceObj must be registered as service somewhere
58 com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL
59 SvNumberFormatterServiceObj_NewInstance(
60 const com::sun::star::uno::Reference<
61 com::sun::star::lang::XMultiServiceFactory>& rSMgr );
63 //------------------------------------------------------------------
65 // SvNumberFormatsSupplierObj: aggregate to document,
66 // construct with SvNumberFormatter
68 class SvNumberFormatsSupplierObj : public cppu::WeakAggImplHelper2<
69 com::sun::star::util::XNumberFormatsSupplier,
70 com::sun::star::lang::XUnoTunnel>
72 private:
73 SvNumFmtSuppl_Impl* pImpl;
75 public:
76 SvNumberFormatsSupplierObj();
77 SvNumberFormatsSupplierObj(SvNumberFormatter* pForm);
78 virtual ~SvNumberFormatsSupplierObj();
80 void SetNumberFormatter(SvNumberFormatter* pNew);
81 SvNumberFormatter* GetNumberFormatter() const;
83 // ueberladen, um Attribute im Dokument anzupassen
84 virtual void NumberFormatDeleted(sal_uInt32 nKey);
85 // ueberladen, um evtl. neu zu formatieren
86 virtual void SettingsChanged();
88 // XNumberFormatsSupplier
89 virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL
90 getNumberFormatSettings()
91 throw(::com::sun::star::uno::RuntimeException);
92 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > SAL_CALL
93 getNumberFormats()
94 throw(::com::sun::star::uno::RuntimeException);
96 // XUnoTunnel
97 virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence<
98 sal_Int8 >& aIdentifier )
99 throw(::com::sun::star::uno::RuntimeException);
101 static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId();
102 static SvNumberFormatsSupplierObj* getImplementation( const com::sun::star::uno::Reference<
103 com::sun::star::util::XNumberFormatsSupplier> xObj );
108 #endif // #ifndef _NUMUNO_HXX