From 5d4d2eaa2ae50e936e65eb1ecbd17bc569049c05 Mon Sep 17 00:00:00 2001 From: Niklas Nebel Date: Mon, 15 Jan 2001 13:59:47 +0000 Subject: #79158# use OComponentHelper for implementation of XComponent --- sc/inc/fielduno.hxx | 62 ++++++++++++++++++++++++++++++++++++++++++----------- 1 file changed, 50 insertions(+), 12 deletions(-) (limited to 'sc/inc/fielduno.hxx') diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx index fcc32fd8c2f7..47df698965d9 100644 --- a/sc/inc/fielduno.hxx +++ b/sc/inc/fielduno.hxx @@ -2,9 +2,9 @@ * * $RCSfile: fielduno.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 16:44:49 $ + * last change: $Author: nn $ $Date: 2001-01-15 14:57:40 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,6 +65,9 @@ #ifndef SC_SCGLOB_HXX #include "global.hxx" // ScRange, ScAddress #endif +#ifndef SC_MUTEXHLP_HXX +#include "mutexhlp.hxx" +#endif #ifndef _SFXLSTNER_HXX //autogen #include @@ -98,6 +101,9 @@ #include #endif +#ifndef _CPPUHELPER_COMPONENT_HXX_ +#include +#endif #ifndef _CPPUHELPER_IMPLBASE4_HXX_ #include #endif @@ -167,11 +173,12 @@ public: }; -class ScCellFieldObj : public cppu::WeakImplHelper4< - com::sun::star::text::XTextField, - com::sun::star::beans::XPropertySet, - com::sun::star::lang::XUnoTunnel, - com::sun::star::lang::XServiceInfo >, +class ScCellFieldObj : public ScMutexHelper, + public ::cppu::OComponentHelper, + public ::com::sun::star::text::XTextField, + public ::com::sun::star::beans::XPropertySet, + public ::com::sun::star::lang::XUnoTunnel, + public ::com::sun::star::lang::XServiceInfo, public SfxListener { private: @@ -200,6 +207,15 @@ public: void InitDoc( ScDocShell* pDocSh, const ScAddress& rPos, const ESelection& rSel ); + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( + const ::com::sun::star::uno::Type & rType ) + throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( + const ::com::sun::star::uno::Type & rType ) + throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL release() throw(::com::sun::star::uno::RuntimeException); + // XTextField virtual ::rtl::OUString SAL_CALL getPresentation( sal_Bool bShowCommand ) throw(::com::sun::star::uno::RuntimeException); @@ -278,6 +294,12 @@ public: throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() + throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() + throw(::com::sun::star::uno::RuntimeException); }; //------------------------------------------------------------------ @@ -335,11 +357,12 @@ public: }; -class ScHeaderFieldObj : public cppu::WeakImplHelper4< - com::sun::star::text::XTextField, - com::sun::star::beans::XPropertySet, - com::sun::star::lang::XUnoTunnel, - com::sun::star::lang::XServiceInfo > +class ScHeaderFieldObj : public ScMutexHelper, + public ::cppu::OComponentHelper, + public ::com::sun::star::text::XTextField, + public ::com::sun::star::beans::XPropertySet, + public ::com::sun::star::lang::XUnoTunnel, + public ::com::sun::star::lang::XServiceInfo { private: SfxItemPropertySet aPropSet; @@ -362,6 +385,15 @@ public: void InitDoc( ScHeaderFooterContentObj* pContent, USHORT nP, const ESelection& rSel ); + virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( + const ::com::sun::star::uno::Type & rType ) + throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( + const ::com::sun::star::uno::Type & rType ) + throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL acquire() throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL release() throw(::com::sun::star::uno::RuntimeException); + // XTextField virtual ::rtl::OUString SAL_CALL getPresentation( sal_Bool bShowCommand ) throw(::com::sun::star::uno::RuntimeException); @@ -440,6 +472,12 @@ public: throw(::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); + + // XTypeProvider + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() + throw(::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() + throw(::com::sun::star::uno::RuntimeException); }; #endif -- cgit