1*39a19a47SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*39a19a47SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*39a19a47SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*39a19a47SAndrew Rist * distributed with this work for additional information 6*39a19a47SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*39a19a47SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*39a19a47SAndrew Rist * "License"); you may not use this file except in compliance 9*39a19a47SAndrew Rist * with the License. You may obtain a copy of the License at 10*39a19a47SAndrew Rist * 11*39a19a47SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*39a19a47SAndrew Rist * 13*39a19a47SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*39a19a47SAndrew Rist * software distributed under the License is distributed on an 15*39a19a47SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*39a19a47SAndrew Rist * KIND, either express or implied. See the License for the 17*39a19a47SAndrew Rist * specific language governing permissions and limitations 18*39a19a47SAndrew Rist * under the License. 19*39a19a47SAndrew Rist * 20*39a19a47SAndrew Rist *************************************************************/ 21*39a19a47SAndrew Rist 22*39a19a47SAndrew Rist 23cdf0e10cSrcweir #ifndef _NUMUNO_HXX 24cdf0e10cSrcweir #define _NUMUNO_HXX 25cdf0e10cSrcweir 26cdf0e10cSrcweir #include "svl/svldllapi.h" 27cdf0e10cSrcweir #include <com/sun/star/util/XNumberFormatsSupplier.hpp> 28cdf0e10cSrcweir #include <com/sun/star/lang/XUnoTunnel.hpp> 29cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx> 30cdf0e10cSrcweir 31cdf0e10cSrcweir class SvNumberFormatter; 32cdf0e10cSrcweir class SvNumFmtSuppl_Impl; 33cdf0e10cSrcweir 34cdf0e10cSrcweir namespace comphelper 35cdf0e10cSrcweir { 36cdf0e10cSrcweir class SharedMutex; 37cdf0e10cSrcweir } 38cdf0e10cSrcweir 39cdf0e10cSrcweir //------------------------------------------------------------------ 40cdf0e10cSrcweir 41cdf0e10cSrcweir // SvNumberFormatterServiceObj must be registered as service somewhere 42cdf0e10cSrcweir 43cdf0e10cSrcweir com::sun::star::uno::Reference<com::sun::star::uno::XInterface> SAL_CALL 44cdf0e10cSrcweir SvNumberFormatterServiceObj_NewInstance( 45cdf0e10cSrcweir const com::sun::star::uno::Reference< 46cdf0e10cSrcweir com::sun::star::lang::XMultiServiceFactory>& rSMgr ); 47cdf0e10cSrcweir 48cdf0e10cSrcweir //------------------------------------------------------------------ 49cdf0e10cSrcweir 50cdf0e10cSrcweir // SvNumberFormatsSupplierObj: aggregate to document, 51cdf0e10cSrcweir // construct with SvNumberFormatter 52cdf0e10cSrcweir 53cdf0e10cSrcweir class SVL_DLLPUBLIC SvNumberFormatsSupplierObj : public cppu::WeakAggImplHelper2< 54cdf0e10cSrcweir com::sun::star::util::XNumberFormatsSupplier, 55cdf0e10cSrcweir com::sun::star::lang::XUnoTunnel> 56cdf0e10cSrcweir { 57cdf0e10cSrcweir private: 58cdf0e10cSrcweir SvNumFmtSuppl_Impl* pImpl; 59cdf0e10cSrcweir 60cdf0e10cSrcweir public: 61cdf0e10cSrcweir SvNumberFormatsSupplierObj(); 62cdf0e10cSrcweir SvNumberFormatsSupplierObj(SvNumberFormatter* pForm); 63cdf0e10cSrcweir virtual ~SvNumberFormatsSupplierObj(); 64cdf0e10cSrcweir 65cdf0e10cSrcweir void SetNumberFormatter(SvNumberFormatter* pNew); 66cdf0e10cSrcweir SvNumberFormatter* GetNumberFormatter() const; 67cdf0e10cSrcweir 68cdf0e10cSrcweir // ueberladen, um Attribute im Dokument anzupassen 69cdf0e10cSrcweir virtual void NumberFormatDeleted(sal_uInt32 nKey); 70cdf0e10cSrcweir // ueberladen, um evtl. neu zu formatieren 71cdf0e10cSrcweir virtual void SettingsChanged(); 72cdf0e10cSrcweir 73cdf0e10cSrcweir // XNumberFormatsSupplier 74cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL 75cdf0e10cSrcweir getNumberFormatSettings() 76cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 77cdf0e10cSrcweir virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormats > SAL_CALL 78cdf0e10cSrcweir getNumberFormats() 79cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 80cdf0e10cSrcweir 81cdf0e10cSrcweir // XUnoTunnel 82cdf0e10cSrcweir virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< 83cdf0e10cSrcweir sal_Int8 >& aIdentifier ) 84cdf0e10cSrcweir throw(::com::sun::star::uno::RuntimeException); 85cdf0e10cSrcweir 86cdf0e10cSrcweir static const com::sun::star::uno::Sequence<sal_Int8>& getUnoTunnelId(); 87cdf0e10cSrcweir static SvNumberFormatsSupplierObj* getImplementation( const com::sun::star::uno::Reference< 88cdf0e10cSrcweir com::sun::star::util::XNumberFormatsSupplier> xObj ); 89cdf0e10cSrcweir 90cdf0e10cSrcweir ::comphelper::SharedMutex& getSharedMutex() const; 91cdf0e10cSrcweir }; 92cdf0e10cSrcweir 93cdf0e10cSrcweir #endif // #ifndef _NUMUNO_HXX 94cdf0e10cSrcweir 95cdf0e10cSrcweir 96