diff options
Diffstat (limited to 'cppuhelper/inc')
57 files changed, 0 insertions, 12678 deletions
diff --git a/cppuhelper/inc/cppuhelper/access_control.hxx b/cppuhelper/inc/cppuhelper/access_control.hxx deleted file mode 100644 index acd5008b8..000000000 --- a/cppuhelper/inc/cppuhelper/access_control.hxx +++ /dev/null @@ -1,127 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_ACCESS_CONTROL_HXX_ -#define _CPPUHELPER_ACCESS_CONTROL_HXX_ - -#include <com/sun/star/uno/XComponentContext.hpp> -#include <com/sun/star/security/XAccessController.hpp> - - -namespace cppu -{ - -/** Helper class retriving access controller singleton from component context. -*/ -class AccessControl -{ - ::com::sun::star::uno::Reference< ::com::sun::star::security::XAccessController > m_xController; - -public: - /** Ctor. - - @param xContext component context to retrieve access controller singleton - */ - AccessControl( - ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XComponentContext > const & xContext ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); - /** Ctor. - - @param xController access controller - */ - AccessControl( - ::com::sun::star::uno::Reference< - ::com::sun::star::security::XAccessController > const & xController ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); - /** Copy ctor. - - @param another object - */ - AccessControl( ::cppu::AccessControl const & ac ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); - - /** Clears the access controller reference being used. - */ - inline void SAL_CALL clear() SAL_THROW( () ) - { m_xController.clear(); } - - /** Returns access to the access controller reference being used. - - @return access controller - */ - inline ::com::sun::star::uno::Reference< - ::com::sun::star::security::XAccessController > const & SAL_CALL get() const SAL_THROW( () ) - { return m_xController; } - - /** Returns access to the access controller reference being used. - - @return access controller - */ - inline ::com::sun::star::security::XAccessController * SAL_CALL operator -> () const SAL_THROW( () ) - { return m_xController.get(); } - - - /** A com.sun.star.security.RuntimePermission is for runtime permissions. - A RuntimePermission contains a name (also referred to as a "target name") but no - actions list; you either have the named permission or you don't. - - @param name name of permission - */ - void SAL_CALL checkRuntimePermission( - ::rtl::OUString const & name ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); - - /** A com.sun.star.io.FilePermission represents access to a file or directory. - A FilePermission consists of a file url and a set of actions valid for that pathname. - - @param url file url - @param actions actions list - */ - void SAL_CALL checkFilePermission( - ::rtl::OUString const & url, - ::rtl::OUString const & actions ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); - - /** A com.sun.star.connection.SocketPermission represents access to a network via sockets. - A SocketPermission consists of a host specification and a set of "actions" - specifying ways to connect to that host. - - @param host host and optional portrange - @param actions actions list - */ - void SAL_CALL checkSocketPermission( - ::rtl::OUString const & host, - ::rtl::OUString const & actions ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); -}; - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/basemutex.hxx b/cppuhelper/inc/cppuhelper/basemutex.hxx deleted file mode 100644 index 0b94deda0..000000000 --- a/cppuhelper/inc/cppuhelper/basemutex.hxx +++ /dev/null @@ -1,52 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _CPPUHELPER_BASEMUTEX_HXX_ -#define _CPPUHELPER_BASEMUTEX_HXX_ - -#include <osl/mutex.hxx> - -namespace cppu -{ - /** base class for all classes who want derive from - ::cppu::WeakComponentImplHelperXX. - - Implmentation classes have first to derive from BaseMutex and then from - ::cppu::WeakComponentImplHelperXX to ensure that the BaseMutex is completely - initialized when the mutex is used to intialize the - ::cppu::WeakComponentImplHelperXX - */ - class BaseMutex - { - protected: - mutable ::osl::Mutex m_aMutex; - }; -} -#endif // _CPPUHELPER_BASEMUTEX_HXX_ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/bootstrap.hxx b/cppuhelper/inc/cppuhelper/bootstrap.hxx deleted file mode 100644 index 76a0c32a4..000000000 --- a/cppuhelper/inc/cppuhelper/bootstrap.hxx +++ /dev/null @@ -1,226 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_BOOTSTRAP_HXX_ -#define _CPPUHELPER_BOOTSTRAP_HXX_ - -#include "sal/config.h" -#include "com/sun/star/uno/Exception.hpp" -#include "com/sun/star/uno/Reference.hxx" -#include "rtl/ustring.hxx" -#include "sal/types.h" - -namespace com { namespace sun { namespace star { - namespace container { class XHierarchicalNameAccess; } - namespace registry { class XSimpleRegistry; } - namespace uno { class XComponentContext; } -} } } - -namespace cppu -{ - -/** Creates a simple registry service instance. - - @rBootstrapPath optional bootstrap path for initial components - @return simple registry service instance -*/ -::com::sun::star::uno::Reference< ::com::sun::star::registry::XSimpleRegistry > -SAL_CALL createSimpleRegistry( - const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() ) - SAL_THROW( () ); - -/** Creates a nested registry service instance. - - @rBootstrapPath optional bootstrap path for initial components - @return nested registry service instance -*/ -::com::sun::star::uno::Reference< ::com::sun::star::registry::XSimpleRegistry > -SAL_CALL createNestedRegistry( - const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() ) - SAL_THROW( () ); - -/** Installs type description manager instance, i.e. registers a callback at cppu core. - - @param xTDMgr manager instance - @return true, if successfully registered -*/ -sal_Bool SAL_CALL installTypeDescriptionManager( - ::com::sun::star::uno::Reference< ::com::sun::star::container::XHierarchicalNameAccess > const & xTDMgr ) - SAL_THROW( () ); - -/** Bootstraps an initial component context with service manager upon a given registry. - This includes insertion of initial services: - - (registry) service manager, shared lib loader, - - simple registry, nested registry, - - implementation registration - - registry typedescription provider, typedescription manager (also installs it into cppu core) - - @param xRegistry registry for service manager and singleton objects of context (may be null) - @param rBootstrapPath optional bootstrap path for initial components - @return component context -*/ -::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > SAL_CALL -bootstrap_InitialComponentContext( - ::com::sun::star::uno::Reference< ::com::sun::star::registry::XSimpleRegistry > const & xRegistry, - ::rtl::OUString const & rBootstrapPath = ::rtl::OUString() ) - SAL_THROW( (::com::sun::star::uno::Exception) ); - - -/** Bootstraps an initial component context with service manager upon default types and - services registry. - This includes insertion of initial services: - - (registry) service manager, shared lib loader, - - simple registry, nested registry, - - implementation registration - - registry typedescription provider, typedescription manager (also installs it into cppu core) - - This function tries to find its parameters via these bootstrap variables: - - - UNO_TYPES -- a space separated list of file urls of type rdbs - - UNO_SERVICES -- a space separated list of file urls of service rdbs - - UNO_WRITERDB -- a file url of a write rdb (e.g. user.rdb) - - Please look at http://udk.openoffice.org/common/man/concept/uno_default_bootstrapping.html - for further info. - - @return component context -*/ -::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > SAL_CALL -defaultBootstrap_InitialComponentContext() SAL_THROW( (::com::sun::star::uno::Exception) ); - - -/** Bootstraps an initial component context with service manager upon default types and - services registry. - This includes insertion of initial services: - - (registry) service manager, shared lib loader, - - simple registry, nested registry, - - implementation registration - - registry typedescription provider, typedescription manager (also installs it into cppu core) - - This function tries to find its parameters via these bootstrap variables: - - - UNO_TYPES -- a space separated list of file urls of type rdbs - - UNO_SERVICES -- a space separated list of file urls of service rdbs - - UNO_WRITERDB -- a file url of a write rdb (e.g. user.rdb) - - Please look at http://udk.openoffice.org/common/man/concept/uno_default_bootstrapping.html - for further info. - - @param iniFile ini filename to get bootstrap variables - @return component context -*/ -::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > SAL_CALL -defaultBootstrap_InitialComponentContext(const ::rtl::OUString & iniFile) SAL_THROW( (::com::sun::star::uno::Exception) ); - -/** - * An exception indicating a bootstrap error. - * - * @since UDK 3.2.0 - */ -class BootstrapException -{ -public: - /** - * Constructs a BootstrapException. - */ - BootstrapException(); - - /** - * Constructs a BootstrapException with the specified detail message. - * - * @param rMessage - * A message containing any details about the exception. - */ - BootstrapException( const ::rtl::OUString & rMessage ); - - /** - * Copy constructs a BootstrapException. - */ - BootstrapException( const BootstrapException & e ); - - /** - * Destructs a BootstrapException. - */ - virtual ~BootstrapException(); - - /** - * Assigns a BootstrapException. - */ - BootstrapException & operator=( const BootstrapException & e ); - - /** Gets the message. - - @return - A reference to the message. The reference is valid for the lifetime of - this BootstrapException. - */ - const ::rtl::OUString & getMessage() const; - -private: - ::rtl::OUString m_aMessage; -}; - -/** - * Bootstraps the component context from a UNO installation. - * - * @return a bootstrapped component context - * @exception BootstrapException - * Thrown in case bootstrap() signals an exception due to a - * bootstrap error. - * - * @since UDK 3.2.0 - */ -::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > -SAL_CALL bootstrap(); - -/** - * Helper function to expand vnd.sun.star.expand URLs in contexts where no - * properly bootstrapped UNO is (yet) available. - * - * @internal - * - * @param uri - * Some URI (but not a URI reference). - * - * @return - * If uri is a vnd.sun.star.expand URL, then the expansion of that URL is - * returned; expansion may lead to a string that is not a legal URI. Otherwise, - * the uri is returned unchanged. - * - * @exception com::sun::star::lang::IllegalArgumentException - * If uri is a vnd.sun.star.expand URL that contains unknown macros. - * - * @since UDK 3.2.8 - */ -::rtl::OUString -SAL_CALL bootstrap_expandUri(::rtl::OUString const & uri); - -} // end namespace cppu - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/compbase.hxx b/cppuhelper/inc/cppuhelper/compbase.hxx deleted file mode 100644 index 54db23a4e..000000000 --- a/cppuhelper/inc/cppuhelper/compbase.hxx +++ /dev/null @@ -1,118 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_COMPBASE_HXX_ -#define _CPPUHELPER_COMPBASE_HXX_ - -#include <cppuhelper/compbase_ex.hxx> -#include <cppuhelper/implbase.hxx> - -/* This header should not be used anymore. - @deprecated -*/ - -//================================================================================================== -/** @internal */ -#define __DEF_COMPIMPLHELPER_A( N ) \ -namespace cppu \ -{ \ -template< __CLASS_IFC##N > \ -class SAL_NO_VTABLE WeakComponentImplHelper##N \ - : public ::cppu::WeakComponentImplHelperBase \ - , public ImplHelperBase##N< __IFC##N > \ -{ \ - static ClassData##N s_aCD; \ -public: \ - WeakComponentImplHelper##N( ::osl::Mutex & rMutex ) SAL_THROW( () ) \ - : WeakComponentImplHelperBase( rMutex ) \ - {} \ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { \ - ::com::sun::star::uno::Any aRet( getClassData( s_aCD ).query( rType, (ImplHelperBase##N< __IFC##N > *)this ) ); \ - if (aRet.hasValue()) \ - return aRet; \ - return WeakComponentImplHelperBase::queryInterface( rType ); \ - } \ - virtual void SAL_CALL acquire() throw () \ - { WeakComponentImplHelperBase::acquire(); } \ - virtual void SAL_CALL release() throw () \ - { WeakComponentImplHelperBase::release(); } \ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \ - { return getClassData( s_aCD ).getTypes(); } \ - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \ - { return getClassData( s_aCD ).getImplementationId(); } \ -}; \ -template< __CLASS_IFC##N > \ -class SAL_NO_VTABLE WeakAggComponentImplHelper##N \ - : public ::cppu::WeakAggComponentImplHelperBase \ - , public ImplHelperBase##N< __IFC##N > \ -{ \ - static ClassData##N s_aCD; \ -public: \ - WeakAggComponentImplHelper##N( ::osl::Mutex & rMutex ) SAL_THROW( () ) \ - : WeakAggComponentImplHelperBase( rMutex ) \ - {} \ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { return WeakAggComponentImplHelperBase::queryInterface( rType ); } \ - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { \ - ::com::sun::star::uno::Any aRet( getClassData( s_aCD ).query( rType, (ImplHelperBase##N< __IFC##N > *)this ) ); \ - if (aRet.hasValue()) \ - return aRet; \ - return WeakAggComponentImplHelperBase::queryAggregation( rType ); \ - } \ - virtual void SAL_CALL acquire() throw () \ - { WeakAggComponentImplHelperBase::acquire(); } \ - virtual void SAL_CALL release() throw () \ - { WeakAggComponentImplHelperBase::release(); } \ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \ - { return getClassData( s_aCD ).getTypes(); } \ - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \ - { return getClassData( s_aCD ).getImplementationId(); } \ -}; - -//================================================================================================== -/** @internal */ -#define __DEF_COMPIMPLHELPER_B( N ) \ -template< __CLASS_IFC##N > \ -ClassData##N WeakComponentImplHelper##N< __IFC##N >::s_aCD = ClassData##N( 4 ); \ -template< __CLASS_IFC##N > \ -ClassData##N WeakAggComponentImplHelper##N< __IFC##N >::s_aCD = ClassData##N( 3 ); -//================================================================================================== -/** @internal */ -#define __DEF_COMPIMPLHELPER_C( N ) \ -} -//================================================================================================== -/** @internal */ -#define __DEF_COMPIMPLHELPER( N ) \ -__DEF_COMPIMPLHELPER_A( N ) \ -__DEF_COMPIMPLHELPER_B( N ) \ -__DEF_COMPIMPLHELPER_C( N ) - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/compbase1.hxx b/cppuhelper/inc/cppuhelper/compbase1.hxx deleted file mode 100644 index 7879b6172..000000000 --- a/cppuhelper/inc/cppuhelper/compbase1.hxx +++ /dev/null @@ -1,173 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_COMPBASE1_HXX_ -#define _CPPUHELPER_COMPBASE1_HXX_ - -#include <cppuhelper/implbase1.hxx> -#include <cppuhelper/compbase_ex.hxx> -/* -__DEF_COMPIMPLHELPER_EX( 1 ) -*/ - -namespace cppu -{ - -// Suppress warnings about hidden functions in case any of the IfcN has -// functions named dispose, addEventListener, or removeEventListener: -#if defined __SUNPRO_CC -#pragma disable_warn -#endif - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1 > - class SAL_NO_VTABLE WeakComponentImplHelper1 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData1< Ifc1, WeakComponentImplHelper1< Ifc1 > > > {}; - public: - inline WeakComponentImplHelper1( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::dispose(); } - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::addEventListener(xListener); } - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::removeEventListener(xListener); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - -#if defined __SUNPRO_CC -#pragma enable_warn -#endif - - /** Same as WeakComponentImplHelper1, except doesn't implement - addEventListener, removeEventListener and dispose. - - This requires derived classes to implement those three methods. - This makes it possible to implement classes which are required to - implement methods from multiple bases which have different - addEventListener/removeEventListener signatures without triggering - the g++ overloaded-virtual warning - */ - template< class Ifc1 > - class SAL_NO_VTABLE PartialWeakComponentImplHelper1 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData1< Ifc1, PartialWeakComponentImplHelper1< Ifc1 > > > {}; - public: - inline PartialWeakComponentImplHelper1( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. Object of this class can be - aggregated, i.e. incoming queryInterface() calls are delegated. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - - @deprecated - */ - template< class Ifc1 > - class SAL_NO_VTABLE WeakAggComponentImplHelper1 - : public WeakAggComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData1< Ifc1, WeakAggComponentImplHelper1< Ifc1 > > > {}; - public: - inline WeakAggComponentImplHelper1( ::osl::Mutex & rMutex ) throw () - : WeakAggComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelperBase::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakAggComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakAggComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/compbase10.hxx b/cppuhelper/inc/cppuhelper/compbase10.hxx deleted file mode 100644 index 42c2468ef..000000000 --- a/cppuhelper/inc/cppuhelper/compbase10.hxx +++ /dev/null @@ -1,173 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_COMPBASE10_HXX_ -#define _CPPUHELPER_COMPBASE10_HXX_ - -#include <cppuhelper/implbase10.hxx> -#include <cppuhelper/compbase_ex.hxx> -/* -__DEF_COMPIMPLHELPER_EX( 10 ) -*/ - -namespace cppu -{ - -// Suppress warnings about hidden functions in case any of the IfcN has -// functions named dispose, addEventListener, or removeEventListener: -#if defined __SUNPRO_CC -#pragma disable_warn -#endif - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 > - class SAL_NO_VTABLE WeakComponentImplHelper10 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, WeakComponentImplHelper10<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10> > > {}; - public: - inline WeakComponentImplHelper10( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::dispose(); } - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::addEventListener(xListener); } - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::removeEventListener(xListener); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - -#if defined __SUNPRO_CC -#pragma enable_warn -#endif - - /** Same as WeakComponentImplHelper10, except doesn't implement - addEventListener, removeEventListener and dispose. - - This requires derived classes to implement those three methods. - This makes it possible to implement classes which are required to - implement methods from multiple bases which have different - addEventListener/removeEventListener signatures without triggering - the g++ overloaded-virtual warning - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 > - class SAL_NO_VTABLE PartialWeakComponentImplHelper10 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, PartialWeakComponentImplHelper10<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10> > > {}; - public: - inline PartialWeakComponentImplHelper10( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. Object of this class can be - aggregated, i.e. incoming queryInterface() calls are delegated. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - - @deprecated - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 > - class SAL_NO_VTABLE WeakAggComponentImplHelper10 - : public WeakAggComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, WeakAggComponentImplHelper10<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10> > > {}; - public: - inline WeakAggComponentImplHelper10( ::osl::Mutex & rMutex ) throw () - : WeakAggComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelperBase::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakAggComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakAggComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/compbase11.hxx b/cppuhelper/inc/cppuhelper/compbase11.hxx deleted file mode 100644 index 025750c3c..000000000 --- a/cppuhelper/inc/cppuhelper/compbase11.hxx +++ /dev/null @@ -1,173 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_COMPBASE11_HXX_ -#define _CPPUHELPER_COMPBASE11_HXX_ - -#include <cppuhelper/implbase11.hxx> -#include <cppuhelper/compbase_ex.hxx> -/* -__DEF_COMPIMPLHELPER_EX( 11 ) -*/ - -namespace cppu -{ - -// Suppress warnings about hidden functions in case any of the IfcN has -// functions named dispose, addEventListener, or removeEventListener: -#if defined __SUNPRO_CC -#pragma disable_warn -#endif - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > - class SAL_NO_VTABLE WeakComponentImplHelper11 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, WeakComponentImplHelper11<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {}; - public: - inline WeakComponentImplHelper11( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::dispose(); } - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::addEventListener(xListener); } - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::removeEventListener(xListener); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - -#if defined __SUNPRO_CC -#pragma enable_warn -#endif - - /** Same as WeakComponentImplHelper11, except doesn't implement - addEventListener, removeEventListener and dispose. - - This requires derived classes to implement those three methods. - This makes it possible to implement classes which are required to - implement methods from multiple bases which have different - addEventListener/removeEventListener signatures without triggering - the g++ overloaded-virtual warning - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > - class SAL_NO_VTABLE PartialWeakComponentImplHelper11 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, PartialWeakComponentImplHelper11<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {}; - public: - inline PartialWeakComponentImplHelper11( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. Object of this class can be - aggregated, i.e. incoming queryInterface() calls are delegated. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - - @deprecated - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > - class SAL_NO_VTABLE WeakAggComponentImplHelper11 - : public WeakAggComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, WeakAggComponentImplHelper11<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {}; - public: - inline WeakAggComponentImplHelper11( ::osl::Mutex & rMutex ) throw () - : WeakAggComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelperBase::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakAggComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakAggComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/compbase12.hxx b/cppuhelper/inc/cppuhelper/compbase12.hxx deleted file mode 100644 index 015eaadb4..000000000 --- a/cppuhelper/inc/cppuhelper/compbase12.hxx +++ /dev/null @@ -1,173 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_COMPBASE12_HXX_ -#define _CPPUHELPER_COMPBASE12_HXX_ - -#include <cppuhelper/implbase12.hxx> -#include <cppuhelper/compbase_ex.hxx> -/* -__DEF_COMPIMPLHELPER_EX( 12 ) -*/ - -namespace cppu -{ - -// Suppress warnings about hidden functions in case any of the IfcN has -// functions named dispose, addEventListener, or removeEventListener: -#if defined __SUNPRO_CC -#pragma disable_warn -#endif - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 > - class SAL_NO_VTABLE WeakComponentImplHelper12 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, WeakComponentImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {}; - public: - inline WeakComponentImplHelper12( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::dispose(); } - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::addEventListener(xListener); } - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::removeEventListener(xListener); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - -#if defined __SUNPRO_CC -#pragma enable_warn -#endif - - /** Same as WeakComponentImplHelper12, except doesn't implement - addEventListener, removeEventListener and dispose. - - This requires derived classes to implement those three methods. - This makes it possible to implement classes which are required to - implement methods from multiple bases which have different - addEventListener/removeEventListener signatures without triggering - the g++ overloaded-virtual warning - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 > - class SAL_NO_VTABLE PartialWeakComponentImplHelper12 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, PartialWeakComponentImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {}; - public: - inline PartialWeakComponentImplHelper12( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. Object of this class can be - aggregated, i.e. incoming queryInterface() calls are delegated. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - - @deprecated - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 > - class SAL_NO_VTABLE WeakAggComponentImplHelper12 - : public WeakAggComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, WeakAggComponentImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {}; - public: - inline WeakAggComponentImplHelper12( ::osl::Mutex & rMutex ) throw () - : WeakAggComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelperBase::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakAggComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakAggComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/compbase2.hxx b/cppuhelper/inc/cppuhelper/compbase2.hxx deleted file mode 100644 index 778f0b6ae..000000000 --- a/cppuhelper/inc/cppuhelper/compbase2.hxx +++ /dev/null @@ -1,174 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_COMPBASE2_HXX_ -#define _CPPUHELPER_COMPBASE2_HXX_ - -#include <cppuhelper/implbase2.hxx> -#include <cppuhelper/compbase_ex.hxx> -/* -__DEF_COMPIMPLHELPER_EX( 2 ) -*/ - -namespace cppu -{ - -// Suppress warnings about hidden functions in case any of the IfcN has -// functions named dispose, addEventListener, or removeEventListener: -#if defined __SUNPRO_CC -#pragma disable_warn -#endif - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2 > - class SAL_NO_VTABLE WeakComponentImplHelper2 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, WeakComponentImplHelper2<Ifc1, Ifc2> > > {}; - public: - inline WeakComponentImplHelper2( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::dispose(); } - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::addEventListener(xListener); } - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::removeEventListener(xListener); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - -#if defined __SUNPRO_CC -#pragma enable_warn -#endif - - /** Same as WeakComponentImplHelper2, except doesn't implement - addEventListener, removeEventListener and dispose. - - This requires derived classes to implement those three methods. - This makes it possible to implement classes which are required to - implement methods from multiple bases which have different - addEventListener/removeEventListener signatures without triggering - the g++ overloaded-virtual warning - */ - template< class Ifc1, class Ifc2 > - class SAL_NO_VTABLE PartialWeakComponentImplHelper2 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, PartialWeakComponentImplHelper2<Ifc1, Ifc2> > > {}; - public: - inline PartialWeakComponentImplHelper2( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. Object of this class can be - aggregated, i.e. incoming queryInterface() calls are delegated. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - - @deprecated - */ - template< class Ifc1, class Ifc2 > - class SAL_NO_VTABLE WeakAggComponentImplHelper2 - : public WeakAggComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, WeakAggComponentImplHelper2<Ifc1, Ifc2> > > {}; - public: - inline WeakAggComponentImplHelper2( ::osl::Mutex & rMutex ) throw () - : WeakAggComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelperBase::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakAggComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakAggComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/compbase3.hxx b/cppuhelper/inc/cppuhelper/compbase3.hxx deleted file mode 100644 index 2150be3d4..000000000 --- a/cppuhelper/inc/cppuhelper/compbase3.hxx +++ /dev/null @@ -1,173 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_COMPBASE3_HXX_ -#define _CPPUHELPER_COMPBASE3_HXX_ - -#include <cppuhelper/implbase3.hxx> -#include <cppuhelper/compbase_ex.hxx> -/* -__DEF_COMPIMPLHELPER_EX( 3 ) -*/ - -namespace cppu -{ - -// Suppress warnings about hidden functions in case any of the IfcN has -// functions named dispose, addEventListener, or removeEventListener: -#if defined __SUNPRO_CC -#pragma disable_warn -#endif - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3 > - class SAL_NO_VTABLE WeakComponentImplHelper3 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, WeakComponentImplHelper3<Ifc1, Ifc2, Ifc3> > > {}; - public: - inline WeakComponentImplHelper3( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::dispose(); } - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::addEventListener(xListener); } - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::removeEventListener(xListener); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - -#if defined __SUNPRO_CC -#pragma enable_warn -#endif - - /** Same as WeakComponentImplHelper3, except doesn't implement - addEventListener, removeEventListener and dispose. - - This requires derived classes to implement those three methods. - This makes it possible to implement classes which are required to - implement methods from multiple bases which have different - addEventListener/removeEventListener signatures without triggering - the g++ overloaded-virtual warning - */ - template< class Ifc1, class Ifc2, class Ifc3 > - class SAL_NO_VTABLE PartialWeakComponentImplHelper3 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, PartialWeakComponentImplHelper3<Ifc1, Ifc2, Ifc3> > > {}; - public: - inline PartialWeakComponentImplHelper3( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. Object of this class can be - aggregated, i.e. incoming queryInterface() calls are delegated. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - - @deprecated - */ - template< class Ifc1, class Ifc2, class Ifc3 > - class SAL_NO_VTABLE WeakAggComponentImplHelper3 - : public WeakAggComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, WeakAggComponentImplHelper3<Ifc1, Ifc2, Ifc3> > > {}; - public: - inline WeakAggComponentImplHelper3( ::osl::Mutex & rMutex ) throw () - : WeakAggComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelperBase::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakAggComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakAggComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/compbase4.hxx b/cppuhelper/inc/cppuhelper/compbase4.hxx deleted file mode 100644 index d9c0c4afd..000000000 --- a/cppuhelper/inc/cppuhelper/compbase4.hxx +++ /dev/null @@ -1,173 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_COMPBASE4_HXX_ -#define _CPPUHELPER_COMPBASE4_HXX_ - -#include <cppuhelper/implbase4.hxx> -#include <cppuhelper/compbase_ex.hxx> -/* -__DEF_COMPIMPLHELPER_EX( 4 ) -*/ - -namespace cppu -{ - -// Suppress warnings about hidden functions in case any of the IfcN has -// functions named dispose, addEventListener, or removeEventListener: -#if defined __SUNPRO_CC -#pragma disable_warn -#endif - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 > - class SAL_NO_VTABLE WeakComponentImplHelper4 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData4 < Ifc1, Ifc2, Ifc3, Ifc4, WeakComponentImplHelper4<Ifc1, Ifc2, Ifc3, Ifc4> > > {}; - public: - inline WeakComponentImplHelper4( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::dispose(); } - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::addEventListener(xListener); } - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::removeEventListener(xListener); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - -#if defined __SUNPRO_CC -#pragma enable_warn -#endif - - /** Same as WeakComponentImplHelper4, except doesn't implement - addEventListener, removeEventListener and dispose. - - This requires derived classes to implement those three methods. - This makes it possible to implement classes which are required to - implement methods from multiple bases which have different - addEventListener/removeEventListener signatures without triggering - the g++ overloaded-virtual warning - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 > - class SAL_NO_VTABLE PartialWeakComponentImplHelper4 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData4 < Ifc1, Ifc2, Ifc3, Ifc4, PartialWeakComponentImplHelper4<Ifc1, Ifc2, Ifc3, Ifc4> > > {}; - public: - inline PartialWeakComponentImplHelper4( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. Object of this class can be - aggregated, i.e. incoming queryInterface() calls are delegated. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - - @deprecated - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 > - class SAL_NO_VTABLE WeakAggComponentImplHelper4 - : public WeakAggComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData4 < Ifc1, Ifc2, Ifc3, Ifc4, WeakAggComponentImplHelper4<Ifc1, Ifc2, Ifc3, Ifc4> > > {}; - public: - inline WeakAggComponentImplHelper4( ::osl::Mutex & rMutex ) throw () - : WeakAggComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelperBase::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakAggComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakAggComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/compbase5.hxx b/cppuhelper/inc/cppuhelper/compbase5.hxx deleted file mode 100644 index e2376b340..000000000 --- a/cppuhelper/inc/cppuhelper/compbase5.hxx +++ /dev/null @@ -1,173 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_COMPBASE5_HXX_ -#define _CPPUHELPER_COMPBASE5_HXX_ - -#include <cppuhelper/implbase5.hxx> -#include <cppuhelper/compbase_ex.hxx> -/* -__DEF_COMPIMPLHELPER_EX( 5 ) -*/ - -namespace cppu -{ - -// Suppress warnings about hidden functions in case any of the IfcN has -// functions named dispose, addEventListener, or removeEventListener: -#if defined __SUNPRO_CC -#pragma disable_warn -#endif - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 > - class SAL_NO_VTABLE WeakComponentImplHelper5 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, WeakComponentImplHelper5<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {}; - public: - inline WeakComponentImplHelper5( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::dispose(); } - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::addEventListener(xListener); } - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::removeEventListener(xListener); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - -#if defined __SUNPRO_CC -#pragma enable_warn -#endif - - /** Same as WeakComponentImplHelper5, except doesn't implement - addEventListener, removeEventListener and dispose. - - This requires derived classes to implement those three methods. - This makes it possible to implement classes which are required to - implement methods from multiple bases which have different - addEventListener/removeEventListener signatures without triggering - the g++ overloaded-virtual warning - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 > - class SAL_NO_VTABLE PartialWeakComponentImplHelper5 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, PartialWeakComponentImplHelper5<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {}; - public: - inline PartialWeakComponentImplHelper5( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. Object of this class can be - aggregated, i.e. incoming queryInterface() calls are delegated. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - - @deprecated - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 > - class SAL_NO_VTABLE WeakAggComponentImplHelper5 - : public WeakAggComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, WeakAggComponentImplHelper5<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {}; - public: - inline WeakAggComponentImplHelper5( ::osl::Mutex & rMutex ) throw () - : WeakAggComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelperBase::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakAggComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakAggComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/compbase6.hxx b/cppuhelper/inc/cppuhelper/compbase6.hxx deleted file mode 100644 index 0d962f6af..000000000 --- a/cppuhelper/inc/cppuhelper/compbase6.hxx +++ /dev/null @@ -1,173 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_COMPBASE6_HXX_ -#define _CPPUHELPER_COMPBASE6_HXX_ - -#include <cppuhelper/implbase6.hxx> -#include <cppuhelper/compbase_ex.hxx> -/* -__DEF_COMPIMPLHELPER_EX( 6 ) -*/ - -namespace cppu -{ - -// Suppress warnings about hidden functions in case any of the IfcN has -// functions named dispose, addEventListener, or removeEventListener: -#if defined __SUNPRO_CC -#pragma disable_warn -#endif - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 > - class SAL_NO_VTABLE WeakComponentImplHelper6 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, WeakComponentImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {}; - public: - inline WeakComponentImplHelper6( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::dispose(); } - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::addEventListener(xListener); } - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::removeEventListener(xListener); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - -#if defined __SUNPRO_CC -#pragma enable_warn -#endif - - /** Same as WeakComponentImplHelper6, except doesn't implement - addEventListener, removeEventListener and dispose. - - This requires derived classes to implement those three methods. - This makes it possible to implement classes which are required to - implement methods from multiple bases which have different - addEventListener/removeEventListener signatures without triggering - the g++ overloaded-virtual warning - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 > - class SAL_NO_VTABLE PartialWeakComponentImplHelper6 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, PartialWeakComponentImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {}; - public: - inline PartialWeakComponentImplHelper6( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. Object of this class can be - aggregated, i.e. incoming queryInterface() calls are delegated. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - - @deprecated - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 > - class SAL_NO_VTABLE WeakAggComponentImplHelper6 - : public WeakAggComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, WeakAggComponentImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {}; - public: - inline WeakAggComponentImplHelper6( ::osl::Mutex & rMutex ) throw () - : WeakAggComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelperBase::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakAggComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakAggComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/compbase7.hxx b/cppuhelper/inc/cppuhelper/compbase7.hxx deleted file mode 100644 index b299bdb97..000000000 --- a/cppuhelper/inc/cppuhelper/compbase7.hxx +++ /dev/null @@ -1,173 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_COMPBASE7_HXX_ -#define _CPPUHELPER_COMPBASE7_HXX_ - -#include <cppuhelper/implbase7.hxx> -#include <cppuhelper/compbase_ex.hxx> -/* -__DEF_COMPIMPLHELPER_EX( 7 ) -*/ - -namespace cppu -{ - -// Suppress warnings about hidden functions in case any of the IfcN has -// functions named dispose, addEventListener, or removeEventListener: -#if defined __SUNPRO_CC -#pragma disable_warn -#endif - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 > - class SAL_NO_VTABLE WeakComponentImplHelper7 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, WeakComponentImplHelper7<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {}; - public: - inline WeakComponentImplHelper7( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::dispose(); } - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::addEventListener(xListener); } - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::removeEventListener(xListener); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - -#if defined __SUNPRO_CC -#pragma enable_warn -#endif - - /** Same as WeakComponentImplHelper7, except doesn't implement - addEventListener, removeEventListener and dispose. - - This requires derived classes to implement those three methods. - This makes it possible to implement classes which are required to - implement methods from multiple bases which have different - addEventListener/removeEventListener signatures without triggering - the g++ overloaded-virtual warning - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 > - class SAL_NO_VTABLE PartialWeakComponentImplHelper7 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, PartialWeakComponentImplHelper7<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {}; - public: - inline PartialWeakComponentImplHelper7( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. Object of this class can be - aggregated, i.e. incoming queryInterface() calls are delegated. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - - @deprecated - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 > - class SAL_NO_VTABLE WeakAggComponentImplHelper7 - : public WeakAggComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, WeakAggComponentImplHelper7<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {}; - public: - inline WeakAggComponentImplHelper7( ::osl::Mutex & rMutex ) throw () - : WeakAggComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelperBase::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakAggComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakAggComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/compbase8.hxx b/cppuhelper/inc/cppuhelper/compbase8.hxx deleted file mode 100644 index 3c71b2ad0..000000000 --- a/cppuhelper/inc/cppuhelper/compbase8.hxx +++ /dev/null @@ -1,173 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_COMPBASE8_HXX_ -#define _CPPUHELPER_COMPBASE8_HXX_ - -#include <cppuhelper/implbase8.hxx> -#include <cppuhelper/compbase_ex.hxx> -/* -__DEF_COMPIMPLHELPER_EX( 8 ) -*/ - -namespace cppu -{ - -// Suppress warnings about hidden functions in case any of the IfcN has -// functions named dispose, addEventListener, or removeEventListener: -#if defined __SUNPRO_CC -#pragma disable_warn -#endif - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 > - class SAL_NO_VTABLE WeakComponentImplHelper8 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, WeakComponentImplHelper8<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {}; - public: - inline WeakComponentImplHelper8( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::dispose(); } - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::addEventListener(xListener); } - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::removeEventListener(xListener); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - -#if defined __SUNPRO_CC -#pragma enable_warn -#endif - - /** Same as WeakComponentImplHelper8, except doesn't implement - addEventListener, removeEventListener and dispose. - - This requires derived classes to implement those three methods. - This makes it possible to implement classes which are required to - implement methods from multiple bases which have different - addEventListener/removeEventListener signatures without triggering - the g++ overloaded-virtual warning - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 > - class SAL_NO_VTABLE PartialWeakComponentImplHelper8 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, PartialWeakComponentImplHelper8<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {}; - public: - inline PartialWeakComponentImplHelper8( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. Object of this class can be - aggregated, i.e. incoming queryInterface() calls are delegated. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - - @deprecated - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 > - class SAL_NO_VTABLE WeakAggComponentImplHelper8 - : public WeakAggComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, WeakAggComponentImplHelper8<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {}; - public: - inline WeakAggComponentImplHelper8( ::osl::Mutex & rMutex ) throw () - : WeakAggComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelperBase::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakAggComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakAggComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/compbase9.hxx b/cppuhelper/inc/cppuhelper/compbase9.hxx deleted file mode 100644 index aa9fd3d2d..000000000 --- a/cppuhelper/inc/cppuhelper/compbase9.hxx +++ /dev/null @@ -1,172 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_COMPBASE9_HXX_ -#define _CPPUHELPER_COMPBASE9_HXX_ - -#include <cppuhelper/implbase9.hxx> -#include <cppuhelper/compbase_ex.hxx> -/* -__DEF_COMPIMPLHELPER_EX( 9 ) -*/ - -namespace cppu -{ - -// Suppress warnings about hidden functions in case any of the IfcN has -// functions named dispose, addEventListener, or removeEventListener: -#if defined __SUNPRO_CC -#pragma disable_warn -#endif - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 > - class SAL_NO_VTABLE WeakComponentImplHelper9 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, WeakComponentImplHelper9<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9> > > {}; - public: - inline WeakComponentImplHelper9( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual void SAL_CALL dispose()throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::dispose(); } - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::addEventListener(xListener); } - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & xListener)throw (::com::sun::star::uno::RuntimeException) - { WeakComponentImplHelperBase::removeEventListener(xListener); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - -#if defined __SUNPRO_CC -#pragma enable_warn -#endif - - /** Same as WeakComponentImplHelper9, except doesn't implement - addEventListener, removeEventListener and dispose. - - This requires derived classes to implement those three methods. - This makes it possible to implement classes which are required to - implement methods from multiple bases which have different - addEventListener/removeEventListener signatures without triggering - the g++ overloaded-virtual warning - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 > - class SAL_NO_VTABLE PartialWeakComponentImplHelper9 - : public WeakComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, PartialWeakComponentImplHelper9<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9> > > {}; - public: - inline PartialWeakComponentImplHelper9( ::osl::Mutex & rMutex ) throw () - : WeakComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_query( rType, cd::get(), this, (WeakComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - - /** Implementation helper supporting ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::lang::XComponent. - Upon disposing objects of this class, sub-classes receive a disposing() - call. Objects of this class can be held weakly, i.e. by a - ::com::sun::star::uno::WeakReference. Object of this class can be - aggregated, i.e. incoming queryInterface() calls are delegated. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - - @deprecated - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 > - class SAL_NO_VTABLE WeakAggComponentImplHelper9 - : public WeakAggComponentImplHelperBase - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, WeakAggComponentImplHelper9<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9> > > {}; - public: - inline WeakAggComponentImplHelper9( ::osl::Mutex & rMutex ) throw () - : WeakAggComponentImplHelperBase( rMutex ) - {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelperBase::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_queryAgg( rType, cd::get(), this, (WeakAggComponentImplHelperBase *)this ); } - virtual void SAL_CALL acquire() throw () - { WeakAggComponentImplHelperBase::acquire(); } - virtual void SAL_CALL release() throw () - { WeakAggComponentImplHelperBase::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggComponentImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/compbase_ex.hxx b/cppuhelper/inc/cppuhelper/compbase_ex.hxx deleted file mode 100644 index 7d79304b2..000000000 --- a/cppuhelper/inc/cppuhelper/compbase_ex.hxx +++ /dev/null @@ -1,179 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_COMPBASE_EX_HXX_ -#define _CPPUHELPER_COMPBASE_EX_HXX_ - -#include <osl/mutex.hxx> -#include <cppuhelper/implbase_ex.hxx> -#include <cppuhelper/interfacecontainer.hxx> -#include <com/sun/star/lang/XComponent.hpp> - - -namespace cppu -{ - -/** Implementation helper base class for components. Inherits from ::cppu::OWeakObject and - ::com::sun::star::lang::XComponent. - @internal -*/ -class SAL_NO_VTABLE WeakComponentImplHelperBase - : public ::cppu::OWeakObject - , public ::com::sun::star::lang::XComponent -{ -protected: - /** broadcast helper for disposing events - */ - ::cppu::OBroadcastHelper rBHelper; - - /** this function is called upon disposing the component - */ - virtual void SAL_CALL disposing(); - - /** This is the one and only constructor that is called from derived implementations. - - @param rMutex mutex to sync upon disposing - */ - WeakComponentImplHelperBase( ::osl::Mutex & rMutex ) SAL_THROW( () ); -public: - /** Destructor - */ - virtual ~WeakComponentImplHelperBase() SAL_THROW( () ); - - // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () ) - { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () ) - { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () ) - { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) - {} - - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( - ::com::sun::star::uno::Type const & rType ) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire() - throw (); - virtual void SAL_CALL release() - throw (); - virtual void SAL_CALL dispose() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > const & xListener ) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener( - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > const & xListener ) - throw (::com::sun::star::uno::RuntimeException); -}; - -/** Implementation helper base class for components. Inherits from ::cppu::OWeakAggObject and - ::com::sun::star::lang::XComponent. - @internal -*/ -class SAL_NO_VTABLE WeakAggComponentImplHelperBase - : public ::cppu::OWeakAggObject - , public ::com::sun::star::lang::XComponent -{ -protected: - ::cppu::OBroadcastHelper rBHelper; - - /** Is called upon disposing the component. - */ - virtual void SAL_CALL disposing(); - - WeakAggComponentImplHelperBase( ::osl::Mutex & rMutex ) SAL_THROW( () ); -public: - virtual ~WeakAggComponentImplHelperBase() SAL_THROW( () ); - - // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () ) - { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () ) - { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () ) - { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) - {} - - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( - ::com::sun::star::uno::Type const & rType ) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( - ::com::sun::star::uno::Type const & rType ) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire() - throw (); - virtual void SAL_CALL release() - throw (); - virtual void SAL_CALL dispose() - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > const & xListener ) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener( - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > const & xListener ) - throw (::com::sun::star::uno::RuntimeException); -}; - -/** WeakComponentImplHelper - @internal -*/ -::com::sun::star::uno::Any SAL_CALL WeakComponentImplHelper_query( - ::com::sun::star::uno::Type const & rType, - class_data * cd, - void * that, - ::cppu::WeakComponentImplHelperBase * pBase ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); -/** WeakComponentImplHelper - @internal -*/ -::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL WeakComponentImplHelper_getTypes( - class_data * cd ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); - -/** WeakAggComponentImplHelper - @internal -*/ -::com::sun::star::uno::Any SAL_CALL WeakAggComponentImplHelper_queryAgg( - ::com::sun::star::uno::Type const & rType, - class_data * cd, - void * that, - ::cppu::WeakAggComponentImplHelperBase * pBase ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); -/** WeakAggComponentImplHelper - @internal -*/ -::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL WeakAggComponentImplHelper_getTypes( - class_data * cd ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/component.hxx b/cppuhelper/inc/cppuhelper/component.hxx deleted file mode 100644 index 92eb60389..000000000 --- a/cppuhelper/inc/cppuhelper/component.hxx +++ /dev/null @@ -1,121 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_COMPONENT_HXX_ -#define _CPPUHELPER_COMPONENT_HXX_ - -#include <osl/mutex.hxx> -#include <cppuhelper/weakagg.hxx> -#include <cppuhelper/interfacecontainer.hxx> - -#include <cppuhelper/implbase1.hxx> - -#include <com/sun/star/lang/XComponent.hpp> -#include <com/sun/star/lang/XEventListener.hpp> - - -namespace cppu -{ - -/** Deprecated. Helper for implementing ::com::sun::star::lang::XComponent. - Upon disposing objects of this class, sub-classes receive a disposing() call. Objects of - this class can be held weakly, i.e. by a ::com::sun::star::uno::WeakReference. Object of - this class can be aggregated, i.e. incoming queryInterface() calls are delegated. - - @attention - The life-cycle of the passed mutex reference has to be longer than objects of this class. - @deprecated -*/ -class OComponentHelper - : public ::cppu::OWeakAggObject - , public ::com::sun::star::lang::XTypeProvider - , public ::com::sun::star::lang::XComponent -{ -public: - /** Constructor. - - @param rMutex - the mutex used to protect multi-threaded access; - lifetime must be longer than the lifetime of this object. - */ - OComponentHelper( ::osl::Mutex & rMutex ) SAL_THROW( () ); - /** Dewstructor. If this object was not disposed previously, object will be disposed manually. - */ - virtual ~OComponentHelper() SAL_THROW( (::com::sun::star::uno::RuntimeException) ); - - // XAggregation - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( - ::com::sun::star::uno::Type const & rType ) - throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( - ::com::sun::star::uno::Type const & rType ) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL acquire() - throw (); - virtual void SAL_CALL release() - throw (); - - /** @attention - XTypeProvider::getImplementationId() has to be implemented separately! - */ - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() - throw(::com::sun::star::uno::RuntimeException) = 0; - /** @attention - XTypeProvider::getTypes() has to be re-implemented! - */ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() - throw (::com::sun::star::uno::RuntimeException); - - // XComponent - virtual void SAL_CALL dispose() - throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addEventListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) - throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) - throw(::com::sun::star::uno::RuntimeException); - -protected: - /** Called in dispose method after the listeners were notified. - */ - virtual void SAL_CALL disposing(); - - /** @internal */ - OBroadcastHelper rBHelper; -private: - /** @internal */ - inline OComponentHelper( const OComponentHelper & ) SAL_THROW( () ); - /** @internal */ - inline OComponentHelper & operator = ( const OComponentHelper & ) SAL_THROW( () ); -}; - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/component_context.hxx b/cppuhelper/inc/cppuhelper/component_context.hxx deleted file mode 100644 index 2ab6a0cf2..000000000 --- a/cppuhelper/inc/cppuhelper/component_context.hxx +++ /dev/null @@ -1,99 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_COMPONENT_CONTEXT_HXX_ -#define _CPPUHELPER_COMPONENT_CONTEXT_HXX_ - -#include <com/sun/star/uno/XComponentContext.hpp> -#include <com/sun/star/lang/XSingleComponentFactory.hpp> - - -namespace cppu -{ - -/** Context entries init struct calling createComponentContext(). -*/ -struct ContextEntry_Init -{ - /** late init denotes a object that will be raised when first get() is calling for it - - The context implementation expects either a ::com::sun::star::lang::XSingleComponentFactory - object as value (to instanciate the object) or a string as value for raising - a service via the used service manager. - */ - bool bLateInitService; - /** name of context value - */ - ::rtl::OUString name; - /** context value - */ - ::com::sun::star::uno::Any value; - - /** Default ctor. - */ - inline ContextEntry_Init() SAL_THROW( () ) - : bLateInitService( false ) - {} - /** Ctor. - - @param name_ - name of entry - @param value_ - value of entry - @param bLateInitService_ - whether this entry is a late-init named object entry - (value is object factory or service string) - */ - inline ContextEntry_Init( - ::rtl::OUString const & name_, - ::com::sun::star::uno::Any const & value_, - bool bLateInitService_ = false ) SAL_THROW( () ) - : bLateInitService( bLateInitService_ ), - name( name_ ), - value( value_ ) - {} -}; - -/** Creates a component context with the given entries. - - @param pEntries array of entries - @param nEntries number of entries - @param xDelegate delegation to further context, if value was not found - @return new context object -*/ -::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > -SAL_CALL createComponentContext( - ContextEntry_Init const * pEntries, sal_Int32 nEntries, - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xDelegate = - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >() ) - SAL_THROW( () ); - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/exc_hlp.hxx b/cppuhelper/inc/cppuhelper/exc_hlp.hxx deleted file mode 100644 index 3d70b9eb6..000000000 --- a/cppuhelper/inc/cppuhelper/exc_hlp.hxx +++ /dev/null @@ -1,100 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _CPPUHELPER_EXC_HLP_HXX_ -#define _CPPUHELPER_EXC_HLP_HXX_ - -#include <com/sun/star/uno/Any.hxx> - -namespace cppu -{ - -/** This function throws the exception given by rExc. The given value has to - be of typeclass EXCEPTION and must be dervived from or of - type com.sun.star.uno.Exception. - - @param rExc - exception to be thrown. -*/ -void SAL_CALL throwException( const ::com::sun::star::uno::Any & rExc ) - SAL_THROW( (::com::sun::star::uno::Exception) ); - -/** Use this function to get the dynamic type of a caught C++-UNO exception; - completes the above function throwing exceptions generically. - - try - { - ... - } - catch (::com::sun::star::uno::RuntimeException &) - { - // you ought not handle RuntimeExceptions: - throw; - } - catch (::com::sun::star::uno::Exception &) - { - ::com::sun::star::uno::Any caught( ::cppu::getCaughtException() ); - ... - } - - Restrictions: - - use only for caught C++-UNO exceptions (UNOIDL defined) - - only as first statement in a catch block! - - don't do a C++ rethrow (throw;) after you have called this function - - call getCaughtException() just once in your catch block! - (function internally uses a C++ rethrow) - - @return - caught UNO exception - - @attention Caution! - This function is limited to the same C++ compiler runtime library. - E.g. for MSVC, this means that the catch handler code (the one - that calls getCaughtException()) needs to use the very same - C++ runtime library, e.g. msvcrt.dll as cppuhelper, e.g. - cppuhelper3MSC.dll and the bridge library, e.g. msci_uno.dll. - This is the case if all of them are compiled with the same - compiler version. - Background: The msci_uno.dll gets a rethrown exception out - of the internal msvcrt.dll thread local storage (tls). - Thus you _must_ not use this function if your code needs to run - in newer UDK versions without being recompiled, because those - newer UDK (-> OOo versions) potentially use newer C++ runtime - libraries which most often become incompatible! - - But this function ought to be usable for most OOo internal C++-UNO - development, because the whole OOo code base is compiled using the - same C++ compiler (and linking against one runtime library). -*/ -::com::sun::star::uno::Any SAL_CALL getCaughtException(); - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/factory.hxx b/cppuhelper/inc/cppuhelper/factory.hxx deleted file mode 100644 index f0d1a8407..000000000 --- a/cppuhelper/inc/cppuhelper/factory.hxx +++ /dev/null @@ -1,281 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_FACTORY_HXX_ -#define _CPPUHELPER_FACTORY_HXX_ - -#include <rtl/ustring.hxx> -#include <uno/dispatcher.h> -#include <rtl/unload.h> - -#include <com/sun/star/uno/XComponentContext.hpp> -#include <com/sun/star/lang/XSingleComponentFactory.hpp> -#include <com/sun/star/lang/XSingleServiceFactory.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/registry/XRegistryKey.hpp> - -//################################################################################################## - -#define COMPONENT_GETENV "component_getImplementationEnvironment" -#define COMPONENT_GETENVEXT "component_getImplementationEnvironmentExt" -#define COMPONENT_GETDESCRIPTION "component_getDescription" -#define COMPONENT_WRITEINFO "component_writeInfo" -#define COMPONENT_GETFACTORY "component_getFactory" - -typedef struct _uno_Environment uno_Environment; - -/** Function pointer declaration. - Function determines the environment of the component implementation, i.e. which compiler - compiled it. If the environment is NOT session specific (needs no additional context), - then this function should return the environment type name and leave ppEnv (to 0). - - @param ppEnvTypeName environment type name; string must be constant - @param ppEnv function returns its environment if the environment is session specific, - i.e. has special context -*/ -typedef void (SAL_CALL * component_getImplementationEnvironmentFunc)( - const sal_Char ** ppEnvTypeName, uno_Environment ** ppEnv ); - -/** Function pointer declaration. - Function determines the environment of the component implementation, i.e. the compiler. - If the environment is NOT session specific (needs no additional context), - then this function should return the environment type name and leave ppEnv (to 0). - - @param ppEnvTypeName environment type name; string must be a constant - @param ppEnv function returns an environment if the environment is session specific, - i.e. has special context - @param pImplName -*/ -typedef void (SAL_CALL * component_getImplementationEnvironmentExtFunc)( - sal_Char const ** ppEnvTypeName, - uno_Environment ** ppEnv, - sal_Char const * pImplName, - uno_Environment * pTargetEnv -); - -/** Function pointer declaration. - Function retrieves a component description. - - @return an XML formatted string containing a short component description - @deprecated -*/ -typedef const sal_Char * (SAL_CALL * component_getDescriptionFunc)(void); - -/** Function pointer declaration. - - @obsolete component_writeInfo should no longer be used in new components - - Function writes component registry info, at least writing the supported service names. - - @param pServiceManager - a service manager (the type is an XMultiServiceFactory that can be used - by the environment returned by component_getImplementationEnvironment) - @param pRegistryKey a registry key - (the type is XRegistryKey that can be used by the environment - returned by component_getImplementationEnvironment) - @return true if everything went fine -*/ -typedef sal_Bool (SAL_CALL * component_writeInfoFunc)( - void * pServiceManager, void * pRegistryKey ); - -/** Function pointer declaration. - Retrieves a factory to create component instances. - - @param pImplName - desired implementation name - @param pServiceManager - a service manager (the type is XMultiServiceFactory that can be used by the environment - returned by component_getImplementationEnvironment) - @param pRegistryKey - a registry key (the type is XRegistryKey that can be used by the environment - returned by component_getImplementationEnvironment) - @return acquired component factory - (the type is lang::XSingleComponentFactory or lang::XSingleServiceFactory to be used by the - environment returned by component_getImplementationEnvironment) -*/ -typedef void * (SAL_CALL * component_getFactoryFunc)( - const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey ); - -//################################################################################################## - -namespace cppu -{ - -/** Function pointer declaration. - Function creates component instance passing the component context to be used. - - @param xContext component context to be used - @return component instance -*/ -typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >( - SAL_CALL * ComponentFactoryFunc)( - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext ) - SAL_THROW( (::com::sun::star::uno::Exception) ); - -/** Creates a single component factory supporting the XSingleComponentFactory interface. - - @param fptr function pointer for instanciating the object - @param rImplementationName implementation name of service - @param rServiceNames supported services - @param pModCount for future extension (library unloading concept). -*/ -::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > -SAL_CALL createSingleComponentFactory( - ComponentFactoryFunc fptr, - ::rtl::OUString const & rImplementationName, - ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames, - rtl_ModuleCount * pModCount = 0 ) - SAL_THROW( () ); - -/** Creates a single service factory which holds the instance created only once. - - @param fptr function pointer for instanciating the object - @param rImplementationName implementation name of service - @param rServiceNames supported services - @param pModCount for future extension (library unloading concept). - - @see createSingleComponentFactory -*/ -::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > SAL_CALL -createOneInstanceComponentFactory( - ComponentFactoryFunc fptr, - ::rtl::OUString const & rImplementationName, - ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames, - rtl_ModuleCount * pModCount = 0 ) - SAL_THROW( () ); - -/** Deprecated. The type of the instanciate function used as argument of the create*Fcatory functions. - - @see createSingleFactory - @see createOneInstanceFactory - @deprecated -*/ -typedef ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >(SAL_CALL * ComponentInstantiation)( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager ); - -/** Deprecated. Creates a single service factory. - - @param rServiceManager the service manager used by the implementation. - @param rImplementationName the implementation name. An empty string is possible. - @param ComponentInstantiation the function pointer to create an object. - @param rServiceNames the service supported by the implementation. - @param pModCount for future extension (library unloading concept). - @return a factory that support the interfaces XServiceProvider, XServiceInfo - XSingleServiceFactory and XComponent. - - @see createOneInstanceFactory - @deprecated -*/ -::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL -createSingleFactory( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, - const ::rtl::OUString & rImplementationName, - ComponentInstantiation pCreateFunction, - const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames, - rtl_ModuleCount * pModCount = 0 ) - SAL_THROW( () ); - -/** Deprecated. Creates a factory wrapping another one. - This means the methods of the interfaces XServiceProvider, XServiceInfo and - XSingleServiceFactory are forwarded. - @attention - The XComponent interface is not supported! - - @param rServiceManager the service manager used by the implementation. - @param xSingleServiceFactory the wrapped service factory. - @return a factory that support the interfaces XServiceProvider, XServiceInfo - XSingleServiceFactory. - - @see createSingleFactory - @deprecated -*/ -::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL -createFactoryProxy( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > & rFactory ) - SAL_THROW( () ); - -/** Deprecated. Creates a single service factory which holds the instance created only once. - - @param rServiceManager the service manager used by the implementation. - @param rImplementationName the implementation name. An empty string is possible. - @param ComponentInstantiation the function pointer to create an object. - @param rServiceNames the service supported by the implementation. - @param pModCount for future extension (library unloading concept). - @return a factory that support the interfaces XServiceProvider, XServiceInfo - XSingleServiceFactory and XComponent. - - @see createSingleFactory - @deprecated -*/ -::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL -createOneInstanceFactory( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, - const ::rtl::OUString & rComponentName, - ComponentInstantiation pCreateFunction, - const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rServiceNames, - rtl_ModuleCount * pModCount = 0 ) - SAL_THROW( () ); - -/** Deprecated. Creates a single service factory based on a registry. - - @param rServiceManager the service manager used by the implementation. - @param rImplementationName the implementation name. An empty string is possible. - @param rImplementationKey the registry key of the implementation section. - @return a factory that support the interfaces XServiceProvider, XServiceInfo - XSingleServiceFactory and XComponent. - @deprecated -*/ -::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL createSingleRegistryFactory( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, - const ::rtl::OUString & rImplementationName, - const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey ) - SAL_THROW( () ); - -/** Deprecated. Creates a single service factory which holds the instance created only once - based on a registry. - - @param rServiceManager the service manager used by the implementation. - @param rImplementationName the implementation name. An empty string is possible. - @param rImplementationKey the registry key of the implementation section. - @return a factory that support the interfaces XServiceProvider, XServiceInfo - XSingleServiceFactory and XComponent. - - @see createSingleRegistryFactory - @deprecated -*/ -::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > SAL_CALL createOneInstanceRegistryFactory( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > & rServiceManager, - const ::rtl::OUString & rComponentName, - const ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > & rImplementationKey ) - SAL_THROW( () ); - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/findsofficepath.h b/cppuhelper/inc/cppuhelper/findsofficepath.h deleted file mode 100644 index 8a7027ebf..000000000 --- a/cppuhelper/inc/cppuhelper/findsofficepath.h +++ /dev/null @@ -1,48 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef INCLUDED_CPPUHELPER_FINDSOFFICEPATH_H -#define INCLUDED_CPPUHELPER_FINDSOFFICEPATH_H - -#include "sal/config.h" - -#if defined __cplusplus -extern "C" { -#endif - -/* Internal function to find an soffice installation. - Not to be called by client code */ -char const* cppuhelper_detail_findSofficePath(void); - -#if defined __cplusplus -} -#endif - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implbase.hxx b/cppuhelper/inc/cppuhelper/implbase.hxx deleted file mode 100644 index 14cdde9bd..000000000 --- a/cppuhelper/inc/cppuhelper/implbase.hxx +++ /dev/null @@ -1,300 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLBASE_HXX_ -#define _CPPUHELPER_IMPLBASE_HXX_ - -#include <osl/mutex.hxx> -#include <cppuhelper/weak.hxx> -#include <cppuhelper/weakagg.hxx> -#include <rtl/instance.hxx> - -#include <com/sun/star/lang/XTypeProvider.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> - -/* This header should not be used anymore. - @deprecated -*/ - -namespace cppu -{ - -/** Struct used for inline template implementation helpers: type entries. - Not for public use. - @internal -*/ -struct Type_Offset -{ - /** binary offset of vtable pointer from object base - */ - sal_Int32 nOffset; - /** interface type description of interface entry - */ - typelib_InterfaceTypeDescription * pTD; -}; -/** Struct used for inline template implementation helpers: class data of implementation. - Not for public use. - @internal -*/ -struct ClassDataBase -{ - /** determines whether the class data has been statically initialized - */ - sal_Bool bOffsetsInit; - /** length of static array ClassDataN - */ - sal_Int32 nType2Offset; - - /** class code determines which standard types are supported (and returned on - com.sun.star.lang.XTypeProvider::getTypes()) by the helper: - - - 1 -- com.sun.star.uno.XWeak - - 2 -- com.sun.star.uno.XWeak, com.sun.star.uno.XAggregation - - 3 -- com.sun.star.uno.XWeak, com.sun.star.uno.XAggregation, com.sun.star.lang.XComponent - - 4 -- com.sun.star.uno.XWeak, com.sun.star.lang.XComponent - */ - sal_Int32 nClassCode; - - /** pointer to types sequence (com.sun.star.lang.XTypeProvider) - */ - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > * pTypes; - /** pointer to class id (com.sun.star.lang.XTypeProvider) - */ - ::com::sun::star::uno::Sequence< sal_Int8 > * pId; - - /** def ctor - */ - ClassDataBase() SAL_THROW( () ); - /** class code ctor - - @param nClassCode class code, see ClassDataBase::nClassCode - */ - ClassDataBase( sal_Int32 nClassCode ) SAL_THROW( () ); - /** dtor - */ - ~ClassDataBase() SAL_THROW( () ); -}; -/** Struct used for inline template implementation helpers: - There will be versions of this struct with varying arType2Offset[] array sizes, each of which - is binary compatible with this one to be casted and used uniform. The size of the varying array - is set in ClassDataBase::nType2Offset (base class). - Not for public use. - @internal -*/ -struct ClassData : public ClassDataBase -{ - /** type entries array - */ - Type_Offset arType2Offset[1]; - - /** init call for supporting com.sun.star.lang.XTypeProvider - */ - void SAL_CALL initTypeProvider() SAL_THROW( () ); - /** initial writing type offsets for vtables - - @param rType type of interface - @param nOffset offset to vtable entry - */ - void SAL_CALL writeTypeOffset( const ::com::sun::star::uno::Type & rType, sal_Int32 nOffset ) - SAL_THROW( () ); - - /** Queries for an interface. - - @param rType demanded interface type - @pBase base this pointer related when writing type offsets (writeTypeOffset()) - @return demanded interface or empty any - */ - ::com::sun::star::uno::Any SAL_CALL query( - const ::com::sun::star::uno::Type & rType, ::com::sun::star::lang::XTypeProvider * pBase ) - SAL_THROW( () ); - /** Gets the types for supporting com.sun.star.lang.XTypeProvider - - @return sequence of types supported - */ - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() - SAL_THROW( () ); - /** Gets the class id of implementation supporting com.sun.star.lang.XTypeProvider - - @return class identifier (sequence< byte >) - */ - ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() - SAL_THROW( () ); -}; - -/** Shared mutex for implementation helper initialization. - Not for public use. - @internal -*/ -::osl::Mutex & SAL_CALL getImplHelperInitMutex(void) SAL_THROW( () ); -} - -// -// settle down beavis, here comes the macro template hell :] -// - -//================================================================================================== - -/** Implementation helper macros - Not for common use. There are expanded forms of the macro usage in implbaseN.hxx/compbaseN.hxx. - So there is commonly no need to use these macros. Though, you may need to implement more than - 12 interfaces. Then you have to declare something like the following in your headers - (where N is your demanded number of interfaces): - - #define __IFC3 Ifc1, Ifc2, Ifc3, ... up to N - #define __CLASS_IFC3 class Ifc1, class Ifc2, class Ifc3, ... up to N - #define __PUBLIC_IFC3 public Ifc1, public Ifc2, public Ifc3, ... up to N - __DEF_IMPLHELPER_PRE( N ) - __IFC_WRITEOFFSET( 1 ) __IFC_WRITEOFFSET( 2 ) __IFC_WRITEOFFSET( 3 ), ... up to N - __DEF_IMPLHELPER_POST( N ) - - @internal -*/ -#define __DEF_IMPLHELPER_PRE( N ) \ -namespace cppu \ -{ \ -struct ClassData##N : public ClassDataBase \ -{ \ - Type_Offset arType2Offset[ N ]; \ - ClassData##N( sal_Int32 nInClassCode ) SAL_THROW( () ) \ - : ClassDataBase( nInClassCode ) \ - {} \ -}; \ -template< __CLASS_IFC##N > \ -class SAL_NO_VTABLE ImplHelperBase##N \ - : public ::com::sun::star::lang::XTypeProvider \ - , __PUBLIC_IFC##N \ -{ \ -protected: \ - ClassData & SAL_CALL getClassData( ClassDataBase & s_aCD ) SAL_THROW( () ) \ - { \ - ClassData & rCD = * static_cast< ClassData * >( &s_aCD ); \ - if (! rCD.bOffsetsInit) \ - { \ - ::osl::MutexGuard aGuard( getImplHelperInitMutex() ); \ - if (! rCD.bOffsetsInit) \ - { \ - char * pBase = (char *)this; -/** Implementation helper macro: have a look at __DEF_IMPLHELPER_PRE - @internal -*/ -#define __IFC_WRITEOFFSET( N ) \ - rCD.writeTypeOffset( ::getCppuType( (const ::com::sun::star::uno::Reference< Ifc##N > *)0 ), \ - (char *)(Ifc##N *)this - pBase ); -/** Implementation helper macro: have a look at __DEF_IMPLHELPER_PRE - @internal -*/ -#define __DEF_IMPLHELPER_POST_A( N ) \ - rCD.bOffsetsInit = sal_True; \ - } \ - } \ - return rCD; \ - } \ -}; \ -template< __CLASS_IFC##N > \ -class SAL_NO_VTABLE ImplHelper##N \ - : public ImplHelperBase##N< __IFC##N > \ -{ \ - static ClassData##N s_aCD; \ -public: \ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { return this->getClassData( s_aCD ).query( rType, (ImplHelperBase##N< __IFC##N > *)this ); } \ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \ - { return this->getClassData( s_aCD ).getTypes(); } \ - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \ - { return this->getClassData( s_aCD ).getImplementationId(); } \ -}; \ -template< __CLASS_IFC##N > \ -class SAL_NO_VTABLE WeakImplHelper##N \ - : public ::cppu::OWeakObject \ - , public ImplHelperBase##N< __IFC##N > \ -{ \ - static ClassData##N s_aCD; \ -public: \ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { \ - ::com::sun::star::uno::Any aRet( this->getClassData( s_aCD ).query( rType, (ImplHelperBase##N< __IFC##N > *)this ) ); \ - return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType )); \ - } \ - virtual void SAL_CALL acquire() throw () \ - { OWeakObject::acquire(); } \ - virtual void SAL_CALL release() throw () \ - { OWeakObject::release(); } \ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \ - { return this->getClassData( s_aCD ).getTypes(); } \ - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \ - { return this->getClassData( s_aCD ).getImplementationId(); } \ -}; \ -template< __CLASS_IFC##N > \ -class SAL_NO_VTABLE WeakAggImplHelper##N \ - : public ::cppu::OWeakAggObject \ - , public ImplHelperBase##N< __IFC##N > \ -{ \ - static ClassData##N s_aCD; \ -public: \ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { return OWeakAggObject::queryInterface( rType ); } \ - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { \ - ::com::sun::star::uno::Any aRet( this->getClassData( s_aCD ).query( rType, (ImplHelperBase##N< __IFC##N > *)this ) ); \ - return (aRet.hasValue() ? aRet : OWeakAggObject::queryAggregation( rType )); \ - } \ - virtual void SAL_CALL acquire() throw () \ - { OWeakAggObject::acquire(); } \ - virtual void SAL_CALL release() throw () \ - { OWeakAggObject::release(); } \ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \ - { return this->getClassData( s_aCD ).getTypes(); } \ - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \ - { return this->getClassData( s_aCD ).getImplementationId(); } \ -}; - -/** Implementation helper macro: have a look at __DEF_IMPLHELPER_PRE - @internal -*/ -#define __DEF_IMPLHELPER_POST_B( N ) \ -template< __CLASS_IFC##N > \ -ClassData##N ImplHelper##N< __IFC##N >::s_aCD = ClassData##N( 0 ); \ -template< __CLASS_IFC##N > \ -ClassData##N WeakImplHelper##N< __IFC##N >::s_aCD = ClassData##N( 1 ); \ -template< __CLASS_IFC##N > \ -ClassData##N WeakAggImplHelper##N< __IFC##N >::s_aCD = ClassData##N( 2 ); -/** Implementation helper macro: have a look at __DEF_IMPLHELPER_PRE - @internal -*/ -#define __DEF_IMPLHELPER_POST_C( N ) \ -} -//================================================================================================== -/** Implementation helper macro: have a look at __DEF_IMPLHELPER_PRE - @internal -*/ -#define __DEF_IMPLHELPER_POST( N ) \ -__DEF_IMPLHELPER_POST_A( N ) \ -__DEF_IMPLHELPER_POST_B( N ) \ -__DEF_IMPLHELPER_POST_C( N ) -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implbase1.hxx b/cppuhelper/inc/cppuhelper/implbase1.hxx deleted file mode 100644 index c7de4ad26..000000000 --- a/cppuhelper/inc/cppuhelper/implbase1.hxx +++ /dev/null @@ -1,302 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLBASE1_HXX_ -#define _CPPUHELPER_IMPLBASE1_HXX_ - -#include <cppuhelper/implbase_ex.hxx> -#include <rtl/instance.hxx> -#include <com/sun/star/uno/XComponentContext.hpp> - -namespace cppu -{ - /** @internal */ - struct class_data1 - { - sal_Int16 m_nTypes; - sal_Bool m_storedTypeRefs; - sal_Bool m_storedId; - sal_Int8 m_id[ 16 ]; - type_entry m_typeEntries[ 1 + 1 ]; - }; - - /** @internal */ - template< typename Ifc1, typename Impl > struct ImplClassData1 - { - class_data* operator ()() - { - static class_data1 s_cd = - { - 1 +1, sal_False, sal_False, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { - { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 }, - { { ::com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(::com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } - } - }; - return reinterpret_cast< class_data * >(&s_cd); - } - }; - - /** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider - and method XInterface::queryInterface(), but no reference counting. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s) including acquire()/ - release() and delegates incoming queryInterface() calls to this base class. - */ - template< class Ifc1 > - class SAL_NO_VTABLE ImplHelper1 - : public ::com::sun::star::lang::XTypeProvider - , public Ifc1 - { - struct cd : public rtl::StaticAggregate< class_data, ImplClassData1 < Ifc1, ImplHelper1<Ifc1> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_query( rType, cd::get(), this ); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakObject). - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - - These classes are used when you implement your UNO component. - WeakImplHelper1 till WeakImplHelper12 can be used when you want - to implement 1 till 12 interfaces in your component. - */ - template< class Ifc1 > - class SAL_NO_VTABLE WeakImplHelper1 - : public OWeakObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData1< Ifc1, WeakImplHelper1< Ifc1 > > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakAggObject). - In addition, it supports also aggregation meaning object of this class can be aggregated - (::com::sun::star::uno::XAggregation thru ::cppu::OWeakAggObject). - If a delegator is set (this object is aggregated), then incoming queryInterface() - calls are delegated to the delegator object. If the delegator does not support the - demanded interface, it calls queryAggregation() on its aggregated objects. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1 > - class SAL_NO_VTABLE WeakAggImplHelper1 - : public OWeakAggObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData1< Ifc1, WeakAggImplHelper1< Ifc1 > > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return OWeakAggObject::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakAggObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakAggObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire() and release() calls are delegated to the BaseClass. Upon queryInterface(), - if a demanded interface is not supported by this class directly, the request is - delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface - and ::com::sun::star::lang::XTypeProvider are implemented properly. The - BaseClass must have at least one ctor that can be called with six or - fewer arguments, of which none is of non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1 > - class SAL_NO_VTABLE ImplInheritanceHelper1 - : public BaseClass - , public Ifc1 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData1< Ifc1, ImplInheritanceHelper1< BaseClass, Ifc1 > > > {}; - protected: -#if (defined __SUNPRO_CC && __SUNPRO_CC <= 0x550) - // Hack, to get comphelper::service_decl to work for non-trivial impl classes - ImplInheritanceHelper1( com::sun::star::uno::Sequence<com::sun::star::uno::Any> const& args, - com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const& xContext ) : BaseClass(args,xContext) {} -#endif - template< typename T1 > - explicit ImplInheritanceHelper1(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - ImplInheritanceHelper1(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - ImplInheritanceHelper1( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - ImplInheritanceHelper1( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - ImplInheritanceHelper1( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - ImplInheritanceHelper1( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - ImplInheritanceHelper1() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryInterface( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire(), release() and queryInterface() calls are delegated to the BaseClass. - Upon queryAggregation(), if a demanded interface is not supported by this class directly, - the request is delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface, - ::com::sun::star::uno::XAggregation and ::com::sun::star::lang::XTypeProvider - are implemented properly. The BaseClass must have at least one ctor - that can be called with six or fewer arguments, of which none is of - non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1 > - class SAL_NO_VTABLE AggImplInheritanceHelper1 - : public BaseClass - , public Ifc1 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData1< Ifc1, AggImplInheritanceHelper1< BaseClass, Ifc1 > > > {}; - protected: - template< typename T1 > - explicit AggImplInheritanceHelper1(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - AggImplInheritanceHelper1(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - AggImplInheritanceHelper1( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - AggImplInheritanceHelper1( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - AggImplInheritanceHelper1( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - AggImplInheritanceHelper1( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - AggImplInheritanceHelper1() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return BaseClass::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryAggregation( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implbase10.hxx b/cppuhelper/inc/cppuhelper/implbase10.hxx deleted file mode 100644 index 26ea75257..000000000 --- a/cppuhelper/inc/cppuhelper/implbase10.hxx +++ /dev/null @@ -1,303 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLBASE10_HXX_ -#define _CPPUHELPER_IMPLBASE10_HXX_ - -#include <cppuhelper/implbase_ex.hxx> -#include <rtl/instance.hxx> - -namespace cppu -{ - /** @internal */ - struct class_data10 - { - sal_Int16 m_nTypes; - sal_Bool m_storedTypeRefs; - sal_Bool m_storedId; - sal_Int8 m_id[ 16 ]; - type_entry m_typeEntries[ 10 + 1 ]; - }; - - /** @internal */ - template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Ifc7, typename Ifc8, typename Ifc9, typename Ifc10, typename Impl > - struct ImplClassData10 - { - class_data* operator ()() - { - static class_data10 s_cd = - { - 10 +1, sal_False, sal_False, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { - { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 }, - { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 }, - { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 }, - { { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 }, - { { Ifc5::static_type }, ((sal_IntPtr)(Ifc5 *) (Impl *) 16) - 16 }, - { { Ifc6::static_type }, ((sal_IntPtr)(Ifc6 *) (Impl *) 16) - 16 }, - { { Ifc7::static_type }, ((sal_IntPtr)(Ifc7 *) (Impl *) 16) - 16 }, - { { Ifc8::static_type }, ((sal_IntPtr)(Ifc8 *) (Impl *) 16) - 16 }, - { { Ifc9::static_type }, ((sal_IntPtr)(Ifc9 *) (Impl *) 16) - 16 }, - { { Ifc10::static_type }, ((sal_IntPtr)(Ifc10 *) (Impl *) 16) - 16 }, - { { ::com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(::com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } - } - }; - return reinterpret_cast< class_data * >(&s_cd); - } - }; - - /** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider - and method XInterface::queryInterface(), but no reference counting. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s) including acquire()/ - release() and delegates incoming queryInterface() calls to this base class. - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 > - class SAL_NO_VTABLE ImplHelper10 - : public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, ImplHelper10<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_query( rType, cd::get(), this ); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakObject). - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 > - class SAL_NO_VTABLE WeakImplHelper10 - : public OWeakObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, WeakImplHelper10<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakAggObject). - In addition, it supports also aggregation meaning object of this class can be aggregated - (::com::sun::star::uno::XAggregation thru ::cppu::OWeakAggObject). - If a delegator is set (this object is aggregated), then incoming queryInterface() - calls are delegated to the delegator object. If the delegator does not support the - demanded interface, it calls queryAggregation() on its aggregated objects. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 > - class SAL_NO_VTABLE WeakAggImplHelper10 - : public OWeakAggObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, WeakAggImplHelper10<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return OWeakAggObject::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakAggObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakAggObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire() and release() calls are delegated to the BaseClass. Upon queryInterface(), - if a demanded interface is not supported by this class directly, the request is - delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface - and ::com::sun::star::lang::XTypeProvider are implemented properly. The - BaseClass must have at least one ctor that can be called with six or - fewer arguments, of which none is of non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 > - class SAL_NO_VTABLE ImplInheritanceHelper10 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, ImplInheritanceHelper10<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10> > > {}; - protected: - template< typename T1 > - explicit ImplInheritanceHelper10(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - ImplInheritanceHelper10(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - ImplInheritanceHelper10( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - ImplInheritanceHelper10( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - ImplInheritanceHelper10( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - ImplInheritanceHelper10( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - ImplInheritanceHelper10() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryInterface( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire(), release() and queryInterface() calls are delegated to the BaseClass. - Upon queryAggregation(), if a demanded interface is not supported by this class directly, - the request is delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface, - ::com::sun::star::uno::XAggregation and ::com::sun::star::lang::XTypeProvider - are implemented properly. The BaseClass must have at least one ctor - that can be called with six or fewer arguments, of which none is of - non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10 > - class SAL_NO_VTABLE AggImplInheritanceHelper10 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData10< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, AggImplInheritanceHelper10<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10> > > {}; - protected: - template< typename T1 > - explicit AggImplInheritanceHelper10(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - AggImplInheritanceHelper10(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - AggImplInheritanceHelper10( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - AggImplInheritanceHelper10( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - AggImplInheritanceHelper10( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - AggImplInheritanceHelper10( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - AggImplInheritanceHelper10() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return BaseClass::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryAggregation( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implbase11.hxx b/cppuhelper/inc/cppuhelper/implbase11.hxx deleted file mode 100644 index c262cd6ae..000000000 --- a/cppuhelper/inc/cppuhelper/implbase11.hxx +++ /dev/null @@ -1,304 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLBASE11_HXX_ -#define _CPPUHELPER_IMPLBASE11_HXX_ - -#include <cppuhelper/implbase_ex.hxx> -#include <rtl/instance.hxx> - -namespace cppu -{ - /** @internal */ - struct class_data11 - { - sal_Int16 m_nTypes; - sal_Bool m_storedTypeRefs; - sal_Bool m_storedId; - sal_Int8 m_id[ 16 ]; - type_entry m_typeEntries[ 11 + 1 ]; - }; - - /** @internal */ - template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Ifc7, typename Ifc8, typename Ifc9, typename Ifc10, typename Ifc11, typename Impl > - struct ImplClassData11 - { - class_data* operator ()() - { - static class_data11 s_cd = - { - 11 +1, sal_False, sal_False, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { - { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 }, - { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 }, - { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 }, - { { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 }, - { { Ifc5::static_type }, ((sal_IntPtr)(Ifc5 *) (Impl *) 16) - 16 }, - { { Ifc6::static_type }, ((sal_IntPtr)(Ifc6 *) (Impl *) 16) - 16 }, - { { Ifc7::static_type }, ((sal_IntPtr)(Ifc7 *) (Impl *) 16) - 16 }, - { { Ifc8::static_type }, ((sal_IntPtr)(Ifc8 *) (Impl *) 16) - 16 }, - { { Ifc9::static_type }, ((sal_IntPtr)(Ifc9 *) (Impl *) 16) - 16 }, - { { Ifc10::static_type }, ((sal_IntPtr)(Ifc10 *) (Impl *) 16) - 16 }, - { { Ifc11::static_type }, ((sal_IntPtr)(Ifc11 *) (Impl *) 16) - 16 }, - { { ::com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(::com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } - } - }; - return reinterpret_cast< class_data * >(&s_cd); - } - }; - - /** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider - and method XInterface::queryInterface(), but no reference counting. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s) including acquire()/ - release() and delegates incoming queryInterface() calls to this base class. - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > - class SAL_NO_VTABLE ImplHelper11 - : public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, ImplHelper11<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_query( rType, cd::get(), this ); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakObject). - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > - class SAL_NO_VTABLE WeakImplHelper11 - : public OWeakObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, WeakImplHelper11<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakAggObject). - In addition, it supports also aggregation meaning object of this class can be aggregated - (::com::sun::star::uno::XAggregation thru ::cppu::OWeakAggObject). - If a delegator is set (this object is aggregated), then incoming queryInterface() - calls are delegated to the delegator object. If the delegator does not support the - demanded interface, it calls queryAggregation() on its aggregated objects. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > - class SAL_NO_VTABLE WeakAggImplHelper11 - : public OWeakAggObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, WeakAggImplHelper11<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return OWeakAggObject::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakAggObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakAggObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire() and release() calls are delegated to the BaseClass. Upon queryInterface(), - if a demanded interface is not supported by this class directly, the request is - delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface - and ::com::sun::star::lang::XTypeProvider are implemented properly. The - BaseClass must have at least one ctor that can be called with six or - fewer arguments, of which none is of non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > - class SAL_NO_VTABLE ImplInheritanceHelper11 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, ImplInheritanceHelper11<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {}; - protected: - template< typename T1 > - explicit ImplInheritanceHelper11(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - ImplInheritanceHelper11(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - ImplInheritanceHelper11( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - ImplInheritanceHelper11( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - ImplInheritanceHelper11( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - ImplInheritanceHelper11( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - ImplInheritanceHelper11() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryInterface( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire(), release() and queryInterface() calls are delegated to the BaseClass. - Upon queryAggregation(), if a demanded interface is not supported by this class directly, - the request is delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface, - ::com::sun::star::uno::XAggregation and ::com::sun::star::lang::XTypeProvider - are implemented properly. The BaseClass must have at least one ctor - that can be called with six or fewer arguments, of which none is of - non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11 > - class SAL_NO_VTABLE AggImplInheritanceHelper11 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData11< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, AggImplInheritanceHelper11<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11> > > {}; - protected: - template< typename T1 > - explicit AggImplInheritanceHelper11(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - AggImplInheritanceHelper11(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - AggImplInheritanceHelper11( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - AggImplInheritanceHelper11( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - AggImplInheritanceHelper11( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - AggImplInheritanceHelper11( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - AggImplInheritanceHelper11() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return BaseClass::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryAggregation( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implbase12.hxx b/cppuhelper/inc/cppuhelper/implbase12.hxx deleted file mode 100644 index a4ef396c0..000000000 --- a/cppuhelper/inc/cppuhelper/implbase12.hxx +++ /dev/null @@ -1,305 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLBASE12_HXX_ -#define _CPPUHELPER_IMPLBASE12_HXX_ - -#include <cppuhelper/implbase_ex.hxx> -#include <rtl/instance.hxx> - -namespace cppu -{ - /** @internal */ - struct class_data12 - { - sal_Int16 m_nTypes; - sal_Bool m_storedTypeRefs; - sal_Bool m_storedId; - sal_Int8 m_id[ 16 ]; - type_entry m_typeEntries[ 12 + 1 ]; - }; - - /** @internal */ - template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Ifc7, typename Ifc8, typename Ifc9, typename Ifc10, typename Ifc11, typename Ifc12, typename Impl > - struct ImplClassData12 - { - class_data* operator ()() - { - static class_data12 s_cd = - { - 12 +1, sal_False, sal_False, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { - { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 }, - { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 }, - { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 }, - { { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 }, - { { Ifc5::static_type }, ((sal_IntPtr)(Ifc5 *) (Impl *) 16) - 16 }, - { { Ifc6::static_type }, ((sal_IntPtr)(Ifc6 *) (Impl *) 16) - 16 }, - { { Ifc7::static_type }, ((sal_IntPtr)(Ifc7 *) (Impl *) 16) - 16 }, - { { Ifc8::static_type }, ((sal_IntPtr)(Ifc8 *) (Impl *) 16) - 16 }, - { { Ifc9::static_type }, ((sal_IntPtr)(Ifc9 *) (Impl *) 16) - 16 }, - { { Ifc10::static_type }, ((sal_IntPtr)(Ifc10 *) (Impl *) 16) - 16 }, - { { Ifc11::static_type }, ((sal_IntPtr)(Ifc11 *) (Impl *) 16) - 16 }, - { { Ifc12::static_type }, ((sal_IntPtr)(Ifc12 *) (Impl *) 16) - 16 }, - { { ::com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(::com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } - } - }; - return reinterpret_cast< class_data * >(&s_cd); - } - }; - - /** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider - and method XInterface::queryInterface(), but no reference counting. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s) including acquire()/ - release() and delegates incoming queryInterface() calls to this base class. - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 > - class SAL_NO_VTABLE ImplHelper12 - : public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, ImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_query( rType, cd::get(), this ); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakObject). - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 > - class SAL_NO_VTABLE WeakImplHelper12 - : public OWeakObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, WeakImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakAggObject). - In addition, it supports also aggregation meaning object of this class can be aggregated - (::com::sun::star::uno::XAggregation thru ::cppu::OWeakAggObject). - If a delegator is set (this object is aggregated), then incoming queryInterface() - calls are delegated to the delegator object. If the delegator does not support the - demanded interface, it calls queryAggregation() on its aggregated objects. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 > - class SAL_NO_VTABLE WeakAggImplHelper12 - : public OWeakAggObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, WeakAggImplHelper12<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return OWeakAggObject::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakAggObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakAggObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire() and release() calls are delegated to the BaseClass. Upon queryInterface(), - if a demanded interface is not supported by this class directly, the request is - delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface - and ::com::sun::star::lang::XTypeProvider are implemented properly. The - BaseClass must have at least one ctor that can be called with six or - fewer arguments, of which none is of non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 > - class SAL_NO_VTABLE ImplInheritanceHelper12 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, ImplInheritanceHelper12<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {}; - protected: - template< typename T1 > - explicit ImplInheritanceHelper12(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - ImplInheritanceHelper12(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - ImplInheritanceHelper12( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - ImplInheritanceHelper12( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - ImplInheritanceHelper12( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - ImplInheritanceHelper12( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - ImplInheritanceHelper12() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryInterface( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire(), release() and queryInterface() calls are delegated to the BaseClass. - Upon queryAggregation(), if a demanded interface is not supported by this class directly, - the request is delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface, - ::com::sun::star::uno::XAggregation and ::com::sun::star::lang::XTypeProvider - are implemented properly. The BaseClass must have at least one ctor - that can be called with six or fewer arguments, of which none is of - non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9, class Ifc10, class Ifc11, class Ifc12 > - class SAL_NO_VTABLE AggImplInheritanceHelper12 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9, public Ifc10, public Ifc11, public Ifc12 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData12< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12, AggImplInheritanceHelper12<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, Ifc10, Ifc11, Ifc12> > > {}; - protected: - template< typename T1 > - explicit AggImplInheritanceHelper12(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - AggImplInheritanceHelper12(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - AggImplInheritanceHelper12( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - AggImplInheritanceHelper12( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - AggImplInheritanceHelper12( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - AggImplInheritanceHelper12( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - AggImplInheritanceHelper12() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return BaseClass::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryAggregation( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implbase2.hxx b/cppuhelper/inc/cppuhelper/implbase2.hxx deleted file mode 100644 index 8aa6fb4ce..000000000 --- a/cppuhelper/inc/cppuhelper/implbase2.hxx +++ /dev/null @@ -1,294 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLBASE2_HXX_ -#define _CPPUHELPER_IMPLBASE2_HXX_ - -#include <cppuhelper/implbase_ex.hxx> -#include <rtl/instance.hxx> - -namespace cppu -{ - /** @internal */ - struct class_data2 - { - sal_Int16 m_nTypes; - sal_Bool m_storedTypeRefs; - sal_Bool m_storedId; - sal_Int8 m_id[ 16 ]; - type_entry m_typeEntries[ 2 + 1 ]; - }; - - /** @internal */ - template< typename Ifc1, typename Ifc2, typename Impl > struct ImplClassData2 - { - class_data* operator ()() - { - static class_data2 s_cd = - { - 2 +1, sal_False, sal_False, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { - { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 }, - { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 }, - { { ::com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(::com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } - } - }; - return reinterpret_cast< class_data * >(&s_cd); - } - }; - - /** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider - and queryInterface(), but no reference counting. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your base class defines method implementations, acquire(), release() and delegates incoming - queryInterface() calls to this base class. - */ - template< class Ifc1, class Ifc2 > - class SAL_NO_VTABLE ImplHelper2 - : public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, ImplHelper2<Ifc1, Ifc2> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_query( rType, cd::get(), this ); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakObject). - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2 > - class SAL_NO_VTABLE WeakImplHelper2 - : public OWeakObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, WeakImplHelper2<Ifc1, Ifc2> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakAggObject). - In addition, it supports also aggregation meaning object of this class can be aggregated - (::com::sun::star::uno::XAggregation thru ::cppu::OWeakAggObject). - If a delegator is set (this object is aggregated), then incoming queryInterface() - calls are delegated to the delegator object. If the delegator does not support the - demanded interface, it calls queryAggregation() on its aggregated objects. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2 > - class SAL_NO_VTABLE WeakAggImplHelper2 - : public OWeakAggObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, WeakAggImplHelper2<Ifc1, Ifc2> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return OWeakAggObject::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakAggObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakAggObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire() and release() calls are delegated to the BaseClass. Upon queryInterface(), - if a demanded interface is not supported by this class directly, the request is - delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface - and ::com::sun::star::lang::XTypeProvider are implemented properly. The - BaseClass must have at least one ctor that can be called with six or - fewer arguments, of which none is of non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2 > - class SAL_NO_VTABLE ImplInheritanceHelper2 - : public BaseClass - , public Ifc1, public Ifc2 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, ImplInheritanceHelper2<BaseClass, Ifc1, Ifc2> > > {}; - protected: - template< typename T1 > - explicit ImplInheritanceHelper2(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - ImplInheritanceHelper2(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - ImplInheritanceHelper2( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - ImplInheritanceHelper2( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - ImplInheritanceHelper2( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - ImplInheritanceHelper2( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - ImplInheritanceHelper2() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryInterface( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire(), release() and queryInterface() calls are delegated to the BaseClass. - Upon queryAggregation(), if a demanded interface is not supported by this class directly, - the request is delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface, - ::com::sun::star::uno::XAggregation and ::com::sun::star::lang::XTypeProvider - are implemented properly. The BaseClass must have at least one ctor - that can be called with six or fewer arguments, of which none is of - non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2 > - class SAL_NO_VTABLE AggImplInheritanceHelper2 - : public BaseClass - , public Ifc1, public Ifc2 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData2 < Ifc1, Ifc2, AggImplInheritanceHelper2<BaseClass, Ifc1, Ifc2> > > {}; - protected: - template< typename T1 > - explicit AggImplInheritanceHelper2(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - AggImplInheritanceHelper2(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - AggImplInheritanceHelper2( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - AggImplInheritanceHelper2( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - AggImplInheritanceHelper2( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - AggImplInheritanceHelper2( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - AggImplInheritanceHelper2() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return BaseClass::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryAggregation( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implbase3.hxx b/cppuhelper/inc/cppuhelper/implbase3.hxx deleted file mode 100644 index e3cca581f..000000000 --- a/cppuhelper/inc/cppuhelper/implbase3.hxx +++ /dev/null @@ -1,296 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLBASE3_HXX_ -#define _CPPUHELPER_IMPLBASE3_HXX_ - -#include <cppuhelper/implbase_ex.hxx> -#include <rtl/instance.hxx> - -namespace cppu -{ - /** @internal */ - struct class_data3 - { - sal_Int16 m_nTypes; - sal_Bool m_storedTypeRefs; - sal_Bool m_storedId; - sal_Int8 m_id[ 16 ]; - type_entry m_typeEntries[ 3 + 1 ]; - }; - - /** @internal */ - template< typename Ifc1, typename Ifc2, typename Ifc3, typename Impl > struct ImplClassData3 - { - class_data* operator ()() - { - static class_data3 s_cd = - { - 3 +1, sal_False, sal_False, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { - { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 }, - { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 }, - { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 }, - { { ::com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(::com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } - } - }; - return reinterpret_cast< class_data * >(&s_cd); - } - }; - - /** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider - and method XInterface::queryInterface(), but no reference counting. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s) including acquire()/ - release() and delegates incoming queryInterface() calls to this base class. - */ - template< class Ifc1, class Ifc2, class Ifc3 > - class SAL_NO_VTABLE ImplHelper3 - : public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, ImplHelper3<Ifc1, Ifc2, Ifc3> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_query( rType, cd::get(), this ); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakObject). - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3 > - class SAL_NO_VTABLE WeakImplHelper3 - : public OWeakObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, WeakImplHelper3<Ifc1, Ifc2, Ifc3> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakAggObject). - In addition, it supports also aggregation meaning object of this class can be aggregated - (::com::sun::star::uno::XAggregation thru ::cppu::OWeakAggObject). - If a delegator is set (this object is aggregated), then incoming queryInterface() - calls are delegated to the delegator object. If the delegator does not support the - demanded interface, it calls queryAggregation() on its aggregated objects. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3 > - class SAL_NO_VTABLE WeakAggImplHelper3 - : public OWeakAggObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, WeakAggImplHelper3<Ifc1, Ifc2, Ifc3> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return OWeakAggObject::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakAggObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakAggObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire() and release() calls are delegated to the BaseClass. Upon queryInterface(), - if a demanded interface is not supported by this class directly, the request is - delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface - and ::com::sun::star::lang::XTypeProvider are implemented properly. The - BaseClass must have at least one ctor that can be called with six or - fewer arguments, of which none is of non-const reference type. - also has to have a default ctor. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3 > - class SAL_NO_VTABLE ImplInheritanceHelper3 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, ImplInheritanceHelper3<BaseClass, Ifc1, Ifc2, Ifc3> > > {}; - protected: - template< typename T1 > - explicit ImplInheritanceHelper3(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - ImplInheritanceHelper3(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - ImplInheritanceHelper3( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - ImplInheritanceHelper3( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - ImplInheritanceHelper3( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - ImplInheritanceHelper3( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - ImplInheritanceHelper3() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryInterface( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire(), release() and queryInterface() calls are delegated to the BaseClass. - Upon queryAggregation(), if a demanded interface is not supported by this class directly, - the request is delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface, - ::com::sun::star::uno::XAggregation and ::com::sun::star::lang::XTypeProvider - are implemented properly. The BaseClass must have at least one ctor - that can be called with six or fewer arguments, of which none is of - non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3 > - class SAL_NO_VTABLE AggImplInheritanceHelper3 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData3 < Ifc1, Ifc2, Ifc3, AggImplInheritanceHelper3<BaseClass, Ifc1, Ifc2, Ifc3> > > {}; - protected: - template< typename T1 > - explicit AggImplInheritanceHelper3(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - AggImplInheritanceHelper3(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - AggImplInheritanceHelper3( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - AggImplInheritanceHelper3( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - AggImplInheritanceHelper3( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - AggImplInheritanceHelper3( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - AggImplInheritanceHelper3() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return BaseClass::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryAggregation( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implbase4.hxx b/cppuhelper/inc/cppuhelper/implbase4.hxx deleted file mode 100644 index c982fca2a..000000000 --- a/cppuhelper/inc/cppuhelper/implbase4.hxx +++ /dev/null @@ -1,297 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLBASE4_HXX_ -#define _CPPUHELPER_IMPLBASE4_HXX_ - -#include <cppuhelper/implbase_ex.hxx> -#include <rtl/instance.hxx> - -namespace cppu -{ - /** @internal */ - struct class_data4 - { - sal_Int16 m_nTypes; - sal_Bool m_storedTypeRefs; - sal_Bool m_storedId; - sal_Int8 m_id[ 16 ]; - type_entry m_typeEntries[ 4 + 1 ]; - }; - - /** @internal */ - template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Impl > - struct ImplClassData4 - { - class_data* operator ()() - { - static class_data4 s_cd = - { - 4 +1, sal_False, sal_False, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { - { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 }, - { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 }, - { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 }, - { { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 }, - { { ::com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(::com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } - } - }; - return reinterpret_cast< class_data * >(&s_cd); - } - }; - - /** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider - and method XInterface::queryInterface(), but no reference counting. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s) including acquire()/ - release() and delegates incoming queryInterface() calls to this base class. - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 > - class SAL_NO_VTABLE ImplHelper4 - : public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData4 < Ifc1, Ifc2, Ifc3, Ifc4, ImplHelper4<Ifc1, Ifc2, Ifc3, Ifc4> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_query( rType, cd::get(), this ); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakObject). - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 > - class SAL_NO_VTABLE WeakImplHelper4 - : public OWeakObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData4 < Ifc1, Ifc2, Ifc3, Ifc4, WeakImplHelper4<Ifc1, Ifc2, Ifc3, Ifc4> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakAggObject). - In addition, it supports also aggregation meaning object of this class can be aggregated - (::com::sun::star::uno::XAggregation thru ::cppu::OWeakAggObject). - If a delegator is set (this object is aggregated), then incoming queryInterface() - calls are delegated to the delegator object. If the delegator does not support the - demanded interface, it calls queryAggregation() on its aggregated objects. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4 > - class SAL_NO_VTABLE WeakAggImplHelper4 - : public OWeakAggObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData4 < Ifc1, Ifc2, Ifc3, Ifc4, WeakAggImplHelper4<Ifc1, Ifc2, Ifc3, Ifc4> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return OWeakAggObject::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakAggObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakAggObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire() and release() calls are delegated to the BaseClass. Upon queryInterface(), - if a demanded interface is not supported by this class directly, the request is - delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface - and ::com::sun::star::lang::XTypeProvider are implemented properly. The - BaseClass must have at least one ctor that can be called with six or - fewer arguments, of which none is of non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4 > - class SAL_NO_VTABLE ImplInheritanceHelper4 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData4 < Ifc1, Ifc2, Ifc3, Ifc4, ImplInheritanceHelper4<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4> > > {}; - protected: - template< typename T1 > - explicit ImplInheritanceHelper4(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - ImplInheritanceHelper4(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - ImplInheritanceHelper4( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - ImplInheritanceHelper4( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - ImplInheritanceHelper4( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - ImplInheritanceHelper4( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - ImplInheritanceHelper4() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryInterface( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire(), release() and queryInterface() calls are delegated to the BaseClass. - Upon queryAggregation(), if a demanded interface is not supported by this class directly, - the request is delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface, - ::com::sun::star::uno::XAggregation and ::com::sun::star::lang::XTypeProvider - are implemented properly. The BaseClass must have at least one ctor - that can be called with six or fewer arguments, of which none is of - non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4 > - class SAL_NO_VTABLE AggImplInheritanceHelper4 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData4 < Ifc1, Ifc2, Ifc3, Ifc4, AggImplInheritanceHelper4<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4> > > {}; - protected: - template< typename T1 > - explicit AggImplInheritanceHelper4(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - AggImplInheritanceHelper4(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - AggImplInheritanceHelper4( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - AggImplInheritanceHelper4( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - AggImplInheritanceHelper4( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - AggImplInheritanceHelper4( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - AggImplInheritanceHelper4() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return BaseClass::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryAggregation( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implbase5.hxx b/cppuhelper/inc/cppuhelper/implbase5.hxx deleted file mode 100644 index c2eff30c0..000000000 --- a/cppuhelper/inc/cppuhelper/implbase5.hxx +++ /dev/null @@ -1,298 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLBASE5_HXX_ -#define _CPPUHELPER_IMPLBASE5_HXX_ - -#include <cppuhelper/implbase_ex.hxx> -#include <rtl/instance.hxx> - -namespace cppu -{ - /** @internal */ - struct class_data5 - { - sal_Int16 m_nTypes; - sal_Bool m_storedTypeRefs; - sal_Bool m_storedId; - sal_Int8 m_id[ 16 ]; - type_entry m_typeEntries[ 5 + 1 ]; - }; - - /** @internal */ - template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Impl > - struct ImplClassData5 - { - class_data* operator ()() - { - static class_data5 s_cd = - { - 5 +1, sal_False, sal_False, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { - { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 }, - { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 }, - { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 }, - { { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 }, - { { Ifc5::static_type }, ((sal_IntPtr)(Ifc5 *) (Impl *) 16) - 16 }, - { { ::com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(::com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } - } - }; - return reinterpret_cast< class_data * >(&s_cd); - } - }; - - /** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider - and method XInterface::queryInterface(), but no reference counting. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s) including acquire()/ - release() and delegates incoming queryInterface() calls to this base class. - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 > - class SAL_NO_VTABLE ImplHelper5 - : public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, ImplHelper5<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_query( rType, cd::get(), this ); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakObject). - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 > - class SAL_NO_VTABLE WeakImplHelper5 - : public OWeakObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, WeakImplHelper5<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakAggObject). - In addition, it supports also aggregation meaning object of this class can be aggregated - (::com::sun::star::uno::XAggregation thru ::cppu::OWeakAggObject). - If a delegator is set (this object is aggregated), then incoming queryInterface() - calls are delegated to the delegator object. If the delegator does not support the - demanded interface, it calls queryAggregation() on its aggregated objects. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 > - class SAL_NO_VTABLE WeakAggImplHelper5 - : public OWeakAggObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, WeakAggImplHelper5<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return OWeakAggObject::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakAggObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakAggObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire() and release() calls are delegated to the BaseClass. Upon queryInterface(), - if a demanded interface is not supported by this class directly, the request is - delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface - and ::com::sun::star::lang::XTypeProvider are implemented properly. The - BaseClass must have at least one ctor that can be called with six or - fewer arguments, of which none is of non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 > - class SAL_NO_VTABLE ImplInheritanceHelper5 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, ImplInheritanceHelper5<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {}; - protected: - template< typename T1 > - explicit ImplInheritanceHelper5(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - ImplInheritanceHelper5(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - ImplInheritanceHelper5( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - ImplInheritanceHelper5( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - ImplInheritanceHelper5( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - ImplInheritanceHelper5( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - ImplInheritanceHelper5() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryInterface( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire(), release() and queryInterface() calls are delegated to the BaseClass. - Upon queryAggregation(), if a demanded interface is not supported by this class directly, - the request is delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface, - ::com::sun::star::uno::XAggregation and ::com::sun::star::lang::XTypeProvider - are implemented properly. The BaseClass must have at least one ctor - that can be called with six or fewer arguments, of which none is of - non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5 > - class SAL_NO_VTABLE AggImplInheritanceHelper5 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData5 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, AggImplInheritanceHelper5<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5> > > {}; - protected: - template< typename T1 > - explicit AggImplInheritanceHelper5(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - AggImplInheritanceHelper5(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - AggImplInheritanceHelper5( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - AggImplInheritanceHelper5( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - AggImplInheritanceHelper5( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - AggImplInheritanceHelper5( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - AggImplInheritanceHelper5() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return BaseClass::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryAggregation( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implbase6.hxx b/cppuhelper/inc/cppuhelper/implbase6.hxx deleted file mode 100644 index ca1181314..000000000 --- a/cppuhelper/inc/cppuhelper/implbase6.hxx +++ /dev/null @@ -1,299 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLBASE6_HXX_ -#define _CPPUHELPER_IMPLBASE6_HXX_ - -#include <cppuhelper/implbase_ex.hxx> -#include <rtl/instance.hxx> - -namespace cppu -{ - /** @internal */ - struct class_data6 - { - sal_Int16 m_nTypes; - sal_Bool m_storedTypeRefs; - sal_Bool m_storedId; - sal_Int8 m_id[ 16 ]; - type_entry m_typeEntries[ 6 + 1 ]; - }; - - /** @internal */ - template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Impl > - struct ImplClassData6 - { - class_data* operator ()() - { - static class_data6 s_cd = - { - 6 +1, sal_False, sal_False, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { - { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 }, - { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 }, - { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 }, - { { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 }, - { { Ifc5::static_type }, ((sal_IntPtr)(Ifc5 *) (Impl *) 16) - 16 }, - { { Ifc6::static_type }, ((sal_IntPtr)(Ifc6 *) (Impl *) 16) - 16 }, - { { ::com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(::com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } - } - }; - return reinterpret_cast< class_data * >(&s_cd); - } - }; - - /** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider - and method XInterface::queryInterface(), but no reference counting. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s) including acquire()/ - release() and delegates incoming queryInterface() calls to this base class. - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 > - class SAL_NO_VTABLE ImplHelper6 - : public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, ImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_query( rType, cd::get(), this ); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakObject). - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 > - class SAL_NO_VTABLE WeakImplHelper6 - : public OWeakObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, WeakImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakAggObject). - In addition, it supports also aggregation meaning object of this class can be aggregated - (::com::sun::star::uno::XAggregation thru ::cppu::OWeakAggObject). - If a delegator is set (this object is aggregated), then incoming queryInterface() - calls are delegated to the delegator object. If the delegator does not support the - demanded interface, it calls queryAggregation() on its aggregated objects. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 > - class SAL_NO_VTABLE WeakAggImplHelper6 - : public OWeakAggObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, WeakAggImplHelper6<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return OWeakAggObject::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakAggObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakAggObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire() and release() calls are delegated to the BaseClass. Upon queryInterface(), - if a demanded interface is not supported by this class directly, the request is - delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface - and ::com::sun::star::lang::XTypeProvider are implemented properly. The - BaseClass must have at least one ctor that can be called with six or - fewer arguments, of which none is of non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 > - class SAL_NO_VTABLE ImplInheritanceHelper6 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, ImplInheritanceHelper6<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {}; - protected: - template< typename T1 > - explicit ImplInheritanceHelper6(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - ImplInheritanceHelper6(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - ImplInheritanceHelper6( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - ImplInheritanceHelper6( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - ImplInheritanceHelper6( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - ImplInheritanceHelper6( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - ImplInheritanceHelper6() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryInterface( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire(), release() and queryInterface() calls are delegated to the BaseClass. - Upon queryAggregation(), if a demanded interface is not supported by this class directly, - the request is delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface, - ::com::sun::star::uno::XAggregation and ::com::sun::star::lang::XTypeProvider - are implemented properly. The BaseClass must have at least one ctor - that can be called with six or fewer arguments, of which none is of - non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6 > - class SAL_NO_VTABLE AggImplInheritanceHelper6 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData6 < Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, AggImplInheritanceHelper6<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6> > > {}; - protected: - template< typename T1 > - explicit AggImplInheritanceHelper6(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - AggImplInheritanceHelper6(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - AggImplInheritanceHelper6( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - AggImplInheritanceHelper6( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - AggImplInheritanceHelper6( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - AggImplInheritanceHelper6( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - AggImplInheritanceHelper6() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return BaseClass::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryAggregation( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implbase7.hxx b/cppuhelper/inc/cppuhelper/implbase7.hxx deleted file mode 100644 index 620e0e0a5..000000000 --- a/cppuhelper/inc/cppuhelper/implbase7.hxx +++ /dev/null @@ -1,301 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLBASE7_HXX_ -#define _CPPUHELPER_IMPLBASE7_HXX_ - -#include <cppuhelper/implbase_ex.hxx> -#include <rtl/instance.hxx> - -namespace cppu -{ - /** @internal */ - struct class_data7 - { - sal_Int16 m_nTypes; - sal_Bool m_storedTypeRefs; - sal_Bool m_storedId; - sal_Int8 m_id[ 16 ]; - type_entry m_typeEntries[ 7 + 1 ]; - }; - - /** @internal */ - template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Ifc7, typename Impl > - struct ImplClassData7 - { - class_data* operator ()() - { - static class_data7 s_cd = - { - 7 +1, sal_False, sal_False, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { - { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 }, - { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 }, - { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 }, - { { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 }, - { { Ifc5::static_type }, ((sal_IntPtr)(Ifc5 *) (Impl *) 16) - 16 }, - { { Ifc6::static_type }, ((sal_IntPtr)(Ifc6 *) (Impl *) 16) - 16 }, - { { Ifc7::static_type }, ((sal_IntPtr)(Ifc7 *) (Impl *) 16) - 16 }, - { { ::com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(::com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } - } - }; - return reinterpret_cast< class_data * >(&s_cd); - } - }; - - - /** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider - and method XInterface::queryInterface(), but no reference counting. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s) including acquire()/ - release() and delegates incoming queryInterface() calls to this base class. - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 > - class SAL_NO_VTABLE ImplHelper7 - : public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, ImplHelper7<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_query( rType, cd::get(), this ); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakObject). - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 > - class SAL_NO_VTABLE WeakImplHelper7 - : public OWeakObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, WeakImplHelper7<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakAggObject). - In addition, it supports also aggregation meaning object of this class can be aggregated - (::com::sun::star::uno::XAggregation thru ::cppu::OWeakAggObject). - If a delegator is set (this object is aggregated), then incoming queryInterface() - calls are delegated to the delegator object. If the delegator does not support the - demanded interface, it calls queryAggregation() on its aggregated objects. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 > - class SAL_NO_VTABLE WeakAggImplHelper7 - : public OWeakAggObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, WeakAggImplHelper7<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return OWeakAggObject::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakAggObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakAggObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire() and release() calls are delegated to the BaseClass. Upon queryInterface(), - if a demanded interface is not supported by this class directly, the request is - delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface - and ::com::sun::star::lang::XTypeProvider are implemented properly. The - BaseClass must have at least one ctor that can be called with six or - fewer arguments, of which none is of non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 > - class SAL_NO_VTABLE ImplInheritanceHelper7 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, ImplInheritanceHelper7<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {}; - protected: - template< typename T1 > - explicit ImplInheritanceHelper7(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - ImplInheritanceHelper7(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - ImplInheritanceHelper7( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - ImplInheritanceHelper7( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - ImplInheritanceHelper7( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - ImplInheritanceHelper7( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - ImplInheritanceHelper7() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryInterface( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire(), release() and queryInterface() calls are delegated to the BaseClass. - Upon queryAggregation(), if a demanded interface is not supported by this class directly, - the request is delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface, - ::com::sun::star::uno::XAggregation and ::com::sun::star::lang::XTypeProvider - are implemented properly. The BaseClass must have at least one ctor - that can be called with six or fewer arguments, of which none is of - non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7 > - class SAL_NO_VTABLE AggImplInheritanceHelper7 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData7< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, AggImplInheritanceHelper7<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7> > > {}; - protected: - template< typename T1 > - explicit AggImplInheritanceHelper7(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - AggImplInheritanceHelper7(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - AggImplInheritanceHelper7( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - AggImplInheritanceHelper7( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - AggImplInheritanceHelper7( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - AggImplInheritanceHelper7( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - AggImplInheritanceHelper7() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return BaseClass::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryAggregation( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implbase8.hxx b/cppuhelper/inc/cppuhelper/implbase8.hxx deleted file mode 100644 index 31bda399b..000000000 --- a/cppuhelper/inc/cppuhelper/implbase8.hxx +++ /dev/null @@ -1,301 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLBASE8_HXX_ -#define _CPPUHELPER_IMPLBASE8_HXX_ - -#include <cppuhelper/implbase_ex.hxx> -#include <rtl/instance.hxx> - -namespace cppu -{ - /** @internal */ - struct class_data8 - { - sal_Int16 m_nTypes; - sal_Bool m_storedTypeRefs; - sal_Bool m_storedId; - sal_Int8 m_id[ 16 ]; - type_entry m_typeEntries[ 8 + 1 ]; - }; - - /** @internal */ - template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Ifc7, typename Ifc8, typename Impl > - struct ImplClassData8 - { - class_data* operator ()() - { - static class_data8 s_cd = - { - 8 +1, sal_False, sal_False, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { - { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 }, - { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 }, - { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 }, - { { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 }, - { { Ifc5::static_type }, ((sal_IntPtr)(Ifc5 *) (Impl *) 16) - 16 }, - { { Ifc6::static_type }, ((sal_IntPtr)(Ifc6 *) (Impl *) 16) - 16 }, - { { Ifc7::static_type }, ((sal_IntPtr)(Ifc7 *) (Impl *) 16) - 16 }, - { { Ifc8::static_type }, ((sal_IntPtr)(Ifc8 *) (Impl *) 16) - 16 }, - { { ::com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(::com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } - } - }; - return reinterpret_cast< class_data * >(&s_cd); - } - }; - - /** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider - and method XInterface::queryInterface(), but no reference counting. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s) including acquire()/ - release() and delegates incoming queryInterface() calls to this base class. - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 > - class SAL_NO_VTABLE ImplHelper8 - : public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, ImplHelper8<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_query( rType, cd::get(), this ); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakObject). - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 > - class SAL_NO_VTABLE WeakImplHelper8 - : public OWeakObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, WeakImplHelper8<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakAggObject). - In addition, it supports also aggregation meaning object of this class can be aggregated - (::com::sun::star::uno::XAggregation thru ::cppu::OWeakAggObject). - If a delegator is set (this object is aggregated), then incoming queryInterface() - calls are delegated to the delegator object. If the delegator does not support the - demanded interface, it calls queryAggregation() on its aggregated objects. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 > - class SAL_NO_VTABLE WeakAggImplHelper8 - : public OWeakAggObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, WeakAggImplHelper8<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return OWeakAggObject::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakAggObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakAggObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire() and release() calls are delegated to the BaseClass. Upon queryInterface(), - if a demanded interface is not supported by this class directly, the request is - delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface - and ::com::sun::star::lang::XTypeProvider are implemented properly. The - BaseClass must have at least one ctor that can be called with six or - fewer arguments, of which none is of non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 > - class SAL_NO_VTABLE ImplInheritanceHelper8 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, ImplInheritanceHelper8<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {}; - protected: - template< typename T1 > - explicit ImplInheritanceHelper8(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - ImplInheritanceHelper8(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - ImplInheritanceHelper8( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - ImplInheritanceHelper8( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - ImplInheritanceHelper8( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - ImplInheritanceHelper8( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - ImplInheritanceHelper8() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryInterface( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire(), release() and queryInterface() calls are delegated to the BaseClass. - Upon queryAggregation(), if a demanded interface is not supported by this class directly, - the request is delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface, - ::com::sun::star::uno::XAggregation and ::com::sun::star::lang::XTypeProvider - are implemented properly. The BaseClass must have at least one ctor - that can be called with six or fewer arguments, of which none is of - non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8 > - class SAL_NO_VTABLE AggImplInheritanceHelper8 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData8< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, AggImplInheritanceHelper8<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8> > > {}; - protected: - template< typename T1 > - explicit AggImplInheritanceHelper8(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - AggImplInheritanceHelper8(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - AggImplInheritanceHelper8( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - AggImplInheritanceHelper8( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - AggImplInheritanceHelper8( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - AggImplInheritanceHelper8( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - AggImplInheritanceHelper8() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return BaseClass::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryAggregation( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implbase9.hxx b/cppuhelper/inc/cppuhelper/implbase9.hxx deleted file mode 100644 index 911caac08..000000000 --- a/cppuhelper/inc/cppuhelper/implbase9.hxx +++ /dev/null @@ -1,303 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLBASE9_HXX_ -#define _CPPUHELPER_IMPLBASE9_HXX_ - -#include <cppuhelper/implbase_ex.hxx> -#include <rtl/instance.hxx> - -namespace cppu -{ - /** @internal */ - struct class_data9 - { - sal_Int16 m_nTypes; - sal_Bool m_storedTypeRefs; - sal_Bool m_storedId; - sal_Int8 m_id[ 16 ]; - type_entry m_typeEntries[ 9 + 1 ]; - }; - - /** @internal */ - template< typename Ifc1, typename Ifc2, typename Ifc3, typename Ifc4, typename Ifc5, typename Ifc6, typename Ifc7, typename Ifc8, typename Ifc9, typename Impl > - struct ImplClassData9 - { - class_data* operator ()() - { - static class_data9 s_cd = - { - 9 +1, sal_False, sal_False, - { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, - { - { { Ifc1::static_type }, ((sal_IntPtr)(Ifc1 *) (Impl *) 16) - 16 }, - { { Ifc2::static_type }, ((sal_IntPtr)(Ifc2 *) (Impl *) 16) - 16 }, - { { Ifc3::static_type }, ((sal_IntPtr)(Ifc3 *) (Impl *) 16) - 16 }, - { { Ifc4::static_type }, ((sal_IntPtr)(Ifc4 *) (Impl *) 16) - 16 }, - { { Ifc5::static_type }, ((sal_IntPtr)(Ifc5 *) (Impl *) 16) - 16 }, - { { Ifc6::static_type }, ((sal_IntPtr)(Ifc6 *) (Impl *) 16) - 16 }, - { { Ifc7::static_type }, ((sal_IntPtr)(Ifc7 *) (Impl *) 16) - 16 }, - { { Ifc8::static_type }, ((sal_IntPtr)(Ifc8 *) (Impl *) 16) - 16 }, - { { Ifc9::static_type }, ((sal_IntPtr)(Ifc9 *) (Impl *) 16) - 16 }, - { { ::com::sun::star::lang::XTypeProvider::static_type }, ((sal_IntPtr)(::com::sun::star::lang::XTypeProvider *) (Impl *) 16) - 16 } - } - }; - return reinterpret_cast< class_data * >(&s_cd); - } - }; - - - /** Implementation helper implementing interface ::com::sun::star::lang::XTypeProvider - and method XInterface::queryInterface(), but no reference counting. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s) including acquire()/ - release() and delegates incoming queryInterface() calls to this base class. - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 > - class SAL_NO_VTABLE ImplHelper9 - : public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, ImplHelper9<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_query( rType, cd::get(), this ); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakObject). - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 > - class SAL_NO_VTABLE WeakImplHelper9 - : public OWeakObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, WeakImplHelper9<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_query( rType, cd::get(), this, (OWeakObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface which supports weak mechanism to be held weakly - (supporting ::com::sun::star::uno::XWeak thru ::cppu::OWeakAggObject). - In addition, it supports also aggregation meaning object of this class can be aggregated - (::com::sun::star::uno::XAggregation thru ::cppu::OWeakAggObject). - If a delegator is set (this object is aggregated), then incoming queryInterface() - calls are delegated to the delegator object. If the delegator does not support the - demanded interface, it calls queryAggregation() on its aggregated objects. - - @derive - Inherit from this class giving your interface(s) to be implemented as template argument(s). - Your sub class defines method implementations for these interface(s). - */ - template< class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 > - class SAL_NO_VTABLE WeakAggImplHelper9 - : public OWeakAggObject - , public ::com::sun::star::lang::XTypeProvider - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, WeakAggImplHelper9<Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9> > > {}; - public: - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return OWeakAggObject::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_queryAgg( rType, cd::get(), this, (OWeakAggObject *)this ); } - virtual void SAL_CALL acquire() throw () - { OWeakAggObject::acquire(); } - virtual void SAL_CALL release() throw () - { OWeakAggObject::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return WeakAggImplHelper_getTypes( cd::get() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire() and release() calls are delegated to the BaseClass. Upon queryInterface(), - if a demanded interface is not supported by this class directly, the request is - delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface - and ::com::sun::star::lang::XTypeProvider are implemented properly. The - BaseClass must have at least one ctor that can be called with six or - fewer arguments, of which none is of non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 > - class SAL_NO_VTABLE ImplInheritanceHelper9 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, ImplInheritanceHelper9<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9> > > {}; - protected: - template< typename T1 > - explicit ImplInheritanceHelper9(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - ImplInheritanceHelper9(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - ImplInheritanceHelper9( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - ImplInheritanceHelper9( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - ImplInheritanceHelper9( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - ImplInheritanceHelper9( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - ImplInheritanceHelper9() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryInterface( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; - /** Implementation helper implementing interfaces ::com::sun::star::lang::XTypeProvider and - ::com::sun::star::uno::XInterface inherting from a BaseClass. - All acquire(), release() and queryInterface() calls are delegated to the BaseClass. - Upon queryAggregation(), if a demanded interface is not supported by this class directly, - the request is delegated to the BaseClass. - - @attention - The BaseClass has to be complete in a sense, that ::com::sun::star::uno::XInterface, - ::com::sun::star::uno::XAggregation and ::com::sun::star::lang::XTypeProvider - are implemented properly. The BaseClass must have at least one ctor - that can be called with six or fewer arguments, of which none is of - non-const reference type. - - @derive - Inherit from this class giving your additional interface(s) to be implemented as - template argument(s). Your sub class defines method implementations for these interface(s). - */ - template< class BaseClass, class Ifc1, class Ifc2, class Ifc3, class Ifc4, class Ifc5, class Ifc6, class Ifc7, class Ifc8, class Ifc9 > - class SAL_NO_VTABLE AggImplInheritanceHelper9 - : public BaseClass - , public Ifc1, public Ifc2, public Ifc3, public Ifc4, public Ifc5, public Ifc6, public Ifc7, public Ifc8, public Ifc9 - { - /** @internal */ - struct cd : public rtl::StaticAggregate< class_data, ImplClassData9< Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9, AggImplInheritanceHelper9<BaseClass, Ifc1, Ifc2, Ifc3, Ifc4, Ifc5, Ifc6, Ifc7, Ifc8, Ifc9> > > {}; - protected: - template< typename T1 > - explicit AggImplInheritanceHelper9(T1 const & arg1): BaseClass(arg1) {} - template< typename T1, typename T2 > - AggImplInheritanceHelper9(T1 const & arg1, T2 const & arg2): - BaseClass(arg1, arg2) {} - template< typename T1, typename T2, typename T3 > - AggImplInheritanceHelper9( - T1 const & arg1, T2 const & arg2, T3 const & arg3): - BaseClass(arg1, arg2, arg3) {} - template< typename T1, typename T2, typename T3, typename T4 > - AggImplInheritanceHelper9( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4): - BaseClass(arg1, arg2, arg3, arg4) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5 > - AggImplInheritanceHelper9( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5): - BaseClass(arg1, arg2, arg3, arg4, arg5) {} - template< - typename T1, typename T2, typename T3, typename T4, typename T5, - typename T6 > - AggImplInheritanceHelper9( - T1 const & arg1, T2 const & arg2, T3 const & arg3, T4 const & arg4, - T5 const & arg5, T6 const & arg6): - BaseClass(arg1, arg2, arg3, arg4, arg5, arg6) {} - public: - AggImplInheritanceHelper9() {} - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { return BaseClass::queryInterface( rType ); } - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) - { - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, cd::get(), this ) ); - if (aRet.hasValue()) - return aRet; - return BaseClass::queryAggregation( rType ); - } - virtual void SAL_CALL acquire() throw () - { BaseClass::acquire(); } - virtual void SAL_CALL release() throw () - { BaseClass::release(); } - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) - { return ImplInhHelper_getTypes( cd::get(), BaseClass::getTypes() ); } - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) - { return ImplHelper_getImplementationId( cd::get() ); } - }; -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implbase_ex.hxx b/cppuhelper/inc/cppuhelper/implbase_ex.hxx deleted file mode 100644 index 056bb3760..000000000 --- a/cppuhelper/inc/cppuhelper/implbase_ex.hxx +++ /dev/null @@ -1,177 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLBASE_EX_HXX_ -#define _CPPUHELPER_IMPLBASE_EX_HXX_ - -#include <cppuhelper/weak.hxx> -#include <cppuhelper/weakagg.hxx> -#include <com/sun/star/lang/XTypeProvider.hpp> - -// Despite the fact that the following include is not used in this header, it has to remain, -// because it is expected by files including cppuhelper/implbaseN.hxx. -// So maybe we can omit it some time in the future... -#include <com/sun/star/lang/XMultiServiceFactory.hpp> - -/* If you need to define implementation helper classes that deal with more than - 12 interfaces, then use macros as follows, e.g. for 3 interfaces: - -#include <cppuhelper/implbase_ex_pre.hxx> -#define __IFC_EX_TYPE_INIT3( class_cast ) \ - __IFC_EX_TYPE_INIT( class_cast, 1 ), __IFC_EX_TYPE_INIT( class_cast, 2 ), \ - __IFC_EX_TYPE_INIT( class_cast, 3 ) -#include <cppuhelper/implbase_ex_post.hxx> -__DEF_IMPLHELPER_EX( 3 ) -*/ - - -namespace cppu -{ - -/** function pointer signature for getCppuType - @internal -*/ -typedef ::com::sun::star::uno::Type const & (SAL_CALL * fptr_getCppuType)( void * ) SAL_THROW( () ); - -/** single type + object offset - @internal -*/ -struct type_entry -{ - /** the type_entry is initialized with function pointer to ::getCppuType() function first, - but holds an unacquired typelib_TypeDescriptionReference * after initialization, - thus reusing the memory. Flag class_data::m_storedTypeRefs - */ - union - { - fptr_getCppuType getCppuType; - typelib_TypeDescriptionReference * typeRef; - } m_type; - /** offset for interface pointer - */ - sal_IntPtr m_offset; -}; - -/** identical dummy struct for casting class_dataN to class_data - @internal -*/ -struct class_data -{ - /** number of supported types in m_typeEntries - */ - sal_Int16 m_nTypes; - - /** determines whether m_typeEntries is initialized and carries unacquired type refs - */ - sal_Bool m_storedTypeRefs; - - /** determines whether an implementation id was created in m_id - */ - sal_Bool m_createdId; - - /** implementation id - */ - sal_Int8 m_id[ 16 ]; - - /** type, object offset - */ - type_entry m_typeEntries[ 1 ]; -}; - -/** ImplHelper - @internal -*/ -::com::sun::star::uno::Any SAL_CALL ImplHelper_query( - ::com::sun::star::uno::Type const & rType, - class_data * cd, - void * that ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); -/** ImplHelper - @internal -*/ -::com::sun::star::uno::Any SAL_CALL ImplHelper_queryNoXInterface( - ::com::sun::star::uno::Type const & rType, - class_data * cd, - void * that ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); -/** ImplHelper - @internal -*/ -::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL ImplHelper_getTypes( - class_data * cd ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); -/** ImplHelper - @internal -*/ -::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL ImplInhHelper_getTypes( - class_data * cd, - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > const & rAddTypes ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); -/** ImplHelper - @internal -*/ -::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL ImplHelper_getImplementationId( - class_data * cd ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); - -/** WeakImplHelper - @internal -*/ -::com::sun::star::uno::Any SAL_CALL WeakImplHelper_query( - ::com::sun::star::uno::Type const & rType, - class_data * cd, - void * that, - ::cppu::OWeakObject * pBase ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); -/** WeakImplHelper - @internal -*/ -::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL WeakImplHelper_getTypes( - class_data * cd ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); - -/** WeakAggImplHelper - @internal -*/ -::com::sun::star::uno::Any SAL_CALL WeakAggImplHelper_queryAgg( - ::com::sun::star::uno::Type const & rType, - class_data * cd, - void * that, - ::cppu::OWeakAggObject * pBase ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); -/** WeakAggImplHelper - @internal -*/ -::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL WeakAggImplHelper_getTypes( - class_data * cd ) - SAL_THROW( (::com::sun::star::uno::RuntimeException) ); - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implbase_ex_post.hxx b/cppuhelper/inc/cppuhelper/implbase_ex_post.hxx deleted file mode 100644 index 3a2f4ca4a..000000000 --- a/cppuhelper/inc/cppuhelper/implbase_ex_post.hxx +++ /dev/null @@ -1,234 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLBASE_EX_POST_HXX_ -#define _CPPUHELPER_IMPLBASE_EX_POST_HXX_ - - -/** @internal */ -#define __DEF_CLASS_DATA_INIT_EX( N, class_cast ) \ -{ \ -N +1, sal_False, sal_False, \ -{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, \ -{ \ -__IFC_EX_TYPE_INIT##N( class_cast ), \ -__IFC_EX_TYPE_INIT_NAME( class_cast, ::com::sun::star::lang::XTypeProvider ) \ -} \ -} - -/** @internal */ -#define __DEF_IMPLHELPER_EX( N ) \ -namespace cppu \ -{ \ -struct class_data##N \ -{ \ - sal_Int16 m_nTypes; \ - sal_Bool m_storedTypeRefs; \ - sal_Bool m_storedId; \ - sal_Int8 m_id[ 16 ]; \ - type_entry m_typeEntries[ N + 1 ]; \ -}; \ -template< __CLASS_IFC##N > \ -class SAL_NO_VTABLE ImplHelper##N \ - : public ::com::sun::star::lang::XTypeProvider \ - , __PUBLIC_IFC##N \ -{ \ - static class_data##N s_cd; \ -public: \ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { return ImplHelper_query( rType, (class_data *)&s_cd, this ); } \ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \ - { return ImplHelper_getTypes( (class_data *)&s_cd ); } \ - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \ - { return ImplHelper_getImplementationId( (class_data *)&s_cd ); } \ -}; \ -template< __CLASS_IFC##N > \ -class_data##N ImplHelper##N< __IFC##N >::s_cd = \ -__DEF_CLASS_DATA_INIT_EX( N, (ImplHelper##N< __IFC##N > *) ); \ -template< __CLASS_IFC##N > \ -class SAL_NO_VTABLE WeakImplHelper##N \ - : public OWeakObject \ - , public ::com::sun::star::lang::XTypeProvider \ - , __PUBLIC_IFC##N \ -{ \ - static class_data##N s_cd; \ -public: \ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { return WeakImplHelper_query( rType, (class_data *)&s_cd, this, (OWeakObject *)this ); } \ - virtual void SAL_CALL acquire() throw () \ - { OWeakObject::acquire(); } \ - virtual void SAL_CALL release() throw () \ - { OWeakObject::release(); } \ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \ - { return WeakImplHelper_getTypes( (class_data *)&s_cd ); } \ - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \ - { return ImplHelper_getImplementationId( (class_data *)&s_cd ); } \ -}; \ -template< __CLASS_IFC##N > \ -class_data##N WeakImplHelper##N< __IFC##N >::s_cd = \ -__DEF_CLASS_DATA_INIT_EX( N, (WeakImplHelper##N< __IFC##N > *) ); \ -template< __CLASS_IFC##N > \ -class SAL_NO_VTABLE WeakAggImplHelper##N \ - : public OWeakAggObject \ - , public ::com::sun::star::lang::XTypeProvider \ - , __PUBLIC_IFC##N \ -{ \ - static class_data##N s_cd; \ -public: \ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { return OWeakAggObject::queryInterface( rType ); } \ - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { return WeakAggImplHelper_queryAgg( rType, (class_data *)&s_cd, this, (OWeakAggObject *)this ); } \ - virtual void SAL_CALL acquire() throw () \ - { OWeakAggObject::acquire(); } \ - virtual void SAL_CALL release() throw () \ - { OWeakAggObject::release(); } \ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \ - { return WeakAggImplHelper_getTypes( (class_data *)&s_cd ); } \ - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \ - { return ImplHelper_getImplementationId( (class_data *)&s_cd ); } \ -}; \ -template< __CLASS_IFC##N > \ -class_data##N WeakAggImplHelper##N< __IFC##N >::s_cd = \ -__DEF_CLASS_DATA_INIT_EX( N, (WeakAggImplHelper##N< __IFC##N > *) ); \ -template< class BaseClass, __CLASS_IFC##N > \ -class SAL_NO_VTABLE ImplInheritanceHelper##N \ - : public BaseClass \ - , __PUBLIC_IFC##N \ -{ \ - static class_data##N s_cd; \ -public: \ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { \ - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, (class_data *)&s_cd, this ) ); \ - if (aRet.hasValue()) \ - return aRet; \ - return BaseClass::queryInterface( rType ); \ - } \ - virtual void SAL_CALL acquire() throw () \ - { BaseClass::acquire(); } \ - virtual void SAL_CALL release() throw () \ - { BaseClass::release(); } \ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \ - { return ImplInhHelper_getTypes( (class_data *)&s_cd, BaseClass::getTypes() ); } \ - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \ - { return ImplHelper_getImplementationId( (class_data *)&s_cd ); } \ -}; \ -template< class BaseClass, __CLASS_IFC##N > \ -class_data##N ImplInheritanceHelper##N< BaseClass, __IFC##N >::s_cd = \ -__DEF_CLASS_DATA_INIT_EX( N, (ImplInheritanceHelper##N< BaseClass, __IFC##N > *) ); \ -template< class BaseClass, __CLASS_IFC##N > \ -class SAL_NO_VTABLE AggImplInheritanceHelper##N \ - : public BaseClass \ - , __PUBLIC_IFC##N \ -{ \ - static class_data##N s_cd; \ -public: \ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { return BaseClass::queryInterface( rType ); } \ - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { \ - ::com::sun::star::uno::Any aRet( ImplHelper_queryNoXInterface( rType, (class_data *)&s_cd, this ) ); \ - if (aRet.hasValue()) \ - return aRet; \ - return BaseClass::queryAggregation( rType ); \ - } \ - virtual void SAL_CALL acquire() throw () \ - { BaseClass::acquire(); } \ - virtual void SAL_CALL release() throw () \ - { BaseClass::release(); } \ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \ - { return ImplInhHelper_getTypes( (class_data *)&s_cd, BaseClass::getTypes() ); } \ - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \ - { return ImplHelper_getImplementationId( (class_data *)&s_cd ); } \ -}; \ -template< class BaseClass, __CLASS_IFC##N > \ -class_data##N AggImplInheritanceHelper##N< BaseClass, __IFC##N >::s_cd = \ -__DEF_CLASS_DATA_INIT_EX( N, (AggImplInheritanceHelper##N< BaseClass, __IFC##N > *) ); \ -} - -/** @internal */ -#define __DEF_COMPIMPLHELPER_EX( N ) \ -namespace cppu \ -{ \ -template< __CLASS_IFC##N > \ -class SAL_NO_VTABLE WeakComponentImplHelper##N \ - : public WeakComponentImplHelperBase \ - , public ::com::sun::star::lang::XTypeProvider \ - , __PUBLIC_IFC##N \ -{ \ - static class_data##N s_cd; \ -public: \ - inline WeakComponentImplHelper##N( ::osl::Mutex & rMutex ) SAL_THROW( () ) \ - : WeakComponentImplHelperBase( rMutex ) \ - {} \ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { return WeakComponentImplHelper_query( rType, (class_data *)&s_cd, this, (WeakComponentImplHelperBase *)this ); } \ - virtual void SAL_CALL acquire() throw () \ - { WeakComponentImplHelperBase::acquire(); } \ - virtual void SAL_CALL release() throw () \ - { WeakComponentImplHelperBase::release(); } \ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \ - { return WeakComponentImplHelper_getTypes( (class_data *)&s_cd ); } \ - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \ - { return ImplHelper_getImplementationId( (class_data *)&s_cd ); } \ -}; \ -template< __CLASS_IFC##N > \ -class_data##N WeakComponentImplHelper##N< __IFC##N >::s_cd = \ -__DEF_CLASS_DATA_INIT_EX( N, (WeakComponentImplHelper##N< __IFC##N > *) ); \ -template< __CLASS_IFC##N > \ -class SAL_NO_VTABLE WeakAggComponentImplHelper##N \ - : public WeakAggComponentImplHelperBase \ - , public ::com::sun::star::lang::XTypeProvider \ - , __PUBLIC_IFC##N \ -{ \ - static class_data##N s_cd; \ -public: \ - inline WeakAggComponentImplHelper##N( ::osl::Mutex & rMutex ) SAL_THROW( () ) \ - : WeakAggComponentImplHelperBase( rMutex ) \ - {} \ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { return WeakAggComponentImplHelperBase::queryInterface( rType ); } \ - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException) \ - { return WeakAggComponentImplHelper_queryAgg( rType, (class_data *)&s_cd, this, (WeakAggComponentImplHelperBase *)this ); } \ - virtual void SAL_CALL acquire() throw () \ - { WeakAggComponentImplHelperBase::acquire(); } \ - virtual void SAL_CALL release() throw () \ - { WeakAggComponentImplHelperBase::release(); } \ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException) \ - { return WeakAggComponentImplHelper_getTypes( (class_data *)&s_cd ); } \ - virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() throw (::com::sun::star::uno::RuntimeException) \ - { return ImplHelper_getImplementationId( (class_data *)&s_cd ); } \ -}; \ -template< __CLASS_IFC##N > \ -class_data##N WeakAggComponentImplHelper##N< __IFC##N >::s_cd = \ -__DEF_CLASS_DATA_INIT_EX( N, (WeakAggComponentImplHelper##N< __IFC##N > *) ); \ -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implbase_ex_pre.hxx b/cppuhelper/inc/cppuhelper/implbase_ex_pre.hxx deleted file mode 100644 index 7eee744cd..000000000 --- a/cppuhelper/inc/cppuhelper/implbase_ex_pre.hxx +++ /dev/null @@ -1,39 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLBASE_EX_PRE_HXX_ -#define _CPPUHELPER_IMPLBASE_EX_PRE_HXX_ - -/** @internal */ -#define __IFC_EX_TYPE_INIT_NAME( class_cast, ifc_name ) \ -{ { ifc_name::static_type }, ((sal_IntPtr)(ifc_name *) class_cast 16) - 16 } -/** @internal */ -#define __IFC_EX_TYPE_INIT( class_cast, N ) __IFC_EX_TYPE_INIT_NAME( class_cast, Ifc##N ) - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/implementationentry.hxx b/cppuhelper/inc/cppuhelper/implementationentry.hxx deleted file mode 100644 index 7e03bb939..000000000 --- a/cppuhelper/inc/cppuhelper/implementationentry.hxx +++ /dev/null @@ -1,116 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_ -#define _CPPUHELPER_IMPLEMENTATIONENTRY_HXX_ - -#include <cppuhelper/factory.hxx> - -namespace cppu -{ -/** One struct instance represents all data necessary for registering one service implementation. - - */ -struct ImplementationEntry -{ - /** Function that creates an instance of the implementation - */ - ComponentFactoryFunc create; - - /** Function that returns the implementation-name of the implementation - (same as XServiceInfo.getImplementationName() ). - */ - rtl::OUString ( SAL_CALL * getImplementationName )(); - - /** Function that returns all supported servicenames of the implementation - ( same as XServiceInfo.getSupportedServiceNames() ). - */ - com::sun::star::uno::Sequence< rtl::OUString > ( SAL_CALL * getSupportedServiceNames ) (); - - /** Function that creates a SingleComponentFactory. - */ - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleComponentFactory > - ( SAL_CALL * createFactory )( - ComponentFactoryFunc fptr, - ::rtl::OUString const & rImplementationName, - ::com::sun::star::uno::Sequence< ::rtl::OUString > const & rServiceNames, - rtl_ModuleCount * pModCount ); - - /** The shared-library module-counter of the implementation. Maybe 0. The module-counter - is used during by the createFactory()-function. - */ - rtl_ModuleCount * moduleCounter; - - /** Must be set to 0 ! - For future extensions. - */ - sal_Int32 nFlags; -}; - -/** Helper function for implementation of the component_writeInfo()-function. - - @obsolete component_writeInfo should no longer be used in new components - - @param pServiceManager The first parameter passed to component_writeInfo()-function - (This is an instance of the service manager, that creates the factory). - @param pRegistryKey The second parameter passed to the component_writeInfo()-function. - This is a reference to the registry key, into which the implementation - data shall be written to. - @param entries Each element of the entries-array must contains a function pointer - table for registering an implementation. The end of the array - must be marked with a 0 entry in the create-function. - @return sal_True, if all implementations could be registered, otherwise sal_False. - */ -sal_Bool component_writeInfoHelper( - void *pServiceManager, void *pRegistryKey , const struct ImplementationEntry entries[] ); - -/** Helper function for implementation of the component_getFactory()-function, - that must be implemented by every shared library component. - - @param pImplName The implementation-name to be instantiated ( This is the - first parameter passed to the component_getFactory - @param pServiceManager The second parameter passed to component_getFactory()-function - (This is a of the service manager, that creates the factory). - @param pRegistryKey The third parameter passed to the component_getFactory()-function. - This is a reference to the registry key, where the implementation - data has been written to. - @param entries Each element of the entries-array must contains a function pointer - table for creating a factor of the implementation. The end of the array - must be marked with a 0 entry in the create-function. - @return 0 if the helper failed to instantiate a factory, otherwise an acquired pointer - to a factory. - */ -void *component_getFactoryHelper( - const sal_Char * pImplName, - void * pServiceManager, - void * pRegistryKey, - const struct ImplementationEntry entries[] ); - -} -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/interfacecontainer.h b/cppuhelper/inc/cppuhelper/interfacecontainer.h deleted file mode 100644 index 6242de88b..000000000 --- a/cppuhelper/inc/cppuhelper/interfacecontainer.h +++ /dev/null @@ -1,619 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_INTERFACECONTAINER_H_ -#define _CPPUHELPER_INTERFACECONTAINER_H_ - -#include <vector> -#include <osl/mutex.hxx> -#include <rtl/alloc.h> -#include <com/sun/star/uno/Sequence.hxx> -#include <com/sun/star/uno/XInterface.hpp> -#ifndef _COM_SUN_STAR_LANG_EVENTOBJECT_HXX_ -#include <com/sun/star/lang/EventObject.hpp> -#endif - -#ifndef _COM_SUN_STAR_LANG_DISPOSEDEXCEPTION_HXX_ -#include "com/sun/star/lang/DisposedException.hpp" -#endif - -/** */ //for docpp -namespace cppu -{ - -namespace detail { - - union element_alias - { - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > *pAsSequence; - ::com::sun::star::uno::XInterface * pAsInterface; - element_alias() : pAsInterface(0) {} - }; - -} - -//=================================================================== -class OInterfaceContainerHelper; -/** - This is the iterator of a InterfaceContainerHelper. Typically - one constructs an instance on the stack for one firing session. - It is not allowed to assign or copy an instance of this class. - - @see OInterfaceContainerHelper - */ -class OInterfaceIteratorHelper -{ -public: - /** - Create an iterator over the elements of the container. The iterator - copies the elements of the conatainer. A change to the container - during the lifetime of an iterator is allowed and does not - affect the iterator-instance. The iterator and the container take cares - themself for concurrent access, no additional guarding is necessary. - - Remark: The copy is on demand. The iterator copy the elements only if the container - change the contents. It is not allowed to destroy the container as long - as an iterator exist. - - @param rCont the container of the elements. - */ - OInterfaceIteratorHelper( OInterfaceContainerHelper & rCont ) SAL_THROW( () ); - - /** - Releases the connection to the container. - */ - ~OInterfaceIteratorHelper() SAL_THROW( () ); - - /** Return sal_True, if there are more elements in the iterator. */ - sal_Bool SAL_CALL hasMoreElements() const SAL_THROW( () ) - { return nRemain != 0; } - /** Return the next element of the iterator. Calling this method if - hasMoreElements() has returned sal_False, is an error. Cast the - returned pointer to the - */ - ::com::sun::star::uno::XInterface * SAL_CALL next() SAL_THROW( () ); - - /** Removes the current element (the last one returned by next()) - from the underlying container. Calling this method before - next() has been called or calling it twice with no next() - inbetween is an error. - */ - void SAL_CALL remove() SAL_THROW( () ); - -private: - OInterfaceContainerHelper & rCont; - sal_Bool bIsList; - - detail::element_alias aData; - - sal_Int32 nRemain; - - OInterfaceIteratorHelper( const OInterfaceIteratorHelper & ) SAL_THROW( () ); - OInterfaceIteratorHelper & operator = ( const OInterfaceIteratorHelper & ) SAL_THROW( () ); -}; - -//=================================================================== -/** - A container of interfaces. To access the elements use an iterator. - This implementation is thread save. - - @see OInterfaceIteratorHelper - */ -class OInterfaceContainerHelper -{ -public: - // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () ) - { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () ) - { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () ) - { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) - {} - - /** - Create an interface container. - - @param rMutex the mutex to protect multi thread access. - The lifetime must be longer than the lifetime - of this object. - */ - OInterfaceContainerHelper( ::osl::Mutex & rMutex ) SAL_THROW( () ); - /** - Release all interfaces. All iterators must be destroyed before - the container is destructed. - */ - ~OInterfaceContainerHelper() SAL_THROW( () ); - /** - Return the number of Elements in the container. Only useful if you have acquired - the mutex. - */ - sal_Int32 SAL_CALL getLength() const SAL_THROW( () ); - - /** - Return all interfaces added to this container. - **/ - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > > SAL_CALL getElements() const SAL_THROW( () ); - - /** Inserts an element into the container. The position is not specified, thus it is not - specified in which order events are fired. - - @attention - If you add the same interface more than once, then it will be added to the elements list - more than once and thus if you want to remove that interface from the list, you have to call - removeInterface() the same number of times. - In the latter case, you will also get events fired more than once (if the interface is a - listener interface). - - @param rxIFace - interface to be added; it is allowed to insert null or - the same interface more than once - @return - the new count of elements in the container - */ - sal_Int32 SAL_CALL addInterface( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ) SAL_THROW( () ); - /** Removes an element from the container. It uses interface equality to remove the interface. - - @param rxIFace - interface to be removed - @return - the new count of elements in the container - */ - sal_Int32 SAL_CALL removeInterface( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ) SAL_THROW( () ); - /** - Call disposing on all object in the container that - support XEventListener. Than clear the container. - */ - void SAL_CALL disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ) SAL_THROW( () ); - /** - Clears the container without calling disposing(). - */ - void SAL_CALL clear() SAL_THROW( () ); - - /** Executes a functor for each contained listener of specified type, e.g. - <code>forEach<awt::XPaintListener>(...</code>. - - If a com::sun::star::lang::DisposedException occurs which relates to - the called listener, then that listener is removed from the container. - - @tpl ListenerT listener type - @tpl FuncT unary functor type, let your compiler deduce this for you - @param func unary functor object expecting an argument of type - ::com::sun::star::uno::Reference<ListenerT> - */ - template <typename ListenerT, typename FuncT> - inline void forEach( FuncT const& func ); - - /** Calls a UNO listener method for each contained listener. - - The listener method must take a single argument of type EventT, - and return <code>void</code>. - - If a com::sun::star::lang::DisposedException occurs which relates to - the called listener, then that listener is removed from the container. - - @tpl ListenerT UNO event listener type, let your compiler deduce this for you - @tpl EventT event type, let your compiler deduce this for you - @param NotificationMethod - Pointer to a method of a ListenerT interface. - @param Event - Event to notify to all contained listeners - - @example -<pre> - awt::PaintEvent aEvent( static_cast< ::cppu::OWeakObject* >( this ), ... ); - listeners.notifyEach( &XPaintListener::windowPaint, aEvent ); -</pre> - */ - template< typename ListenerT, typename EventT > - inline void notifyEach( void ( SAL_CALL ListenerT::*NotificationMethod )( const EventT& ), const EventT& Event ); - -private: -friend class OInterfaceIteratorHelper; - /** - bIsList == TRUE -> aData.pAsSequence of type Sequence< XInterfaceSequence >, - otherwise aData.pAsInterface == of type (XEventListener *) - */ - detail::element_alias aData; - ::osl::Mutex & rMutex; - /** TRUE -> used by an iterator. */ - sal_Bool bInUse; - /** TRUE -> aData.pAsSequence is of type Sequence< XInterfaceSequence >. */ - sal_Bool bIsList; - - OInterfaceContainerHelper( const OInterfaceContainerHelper & ) SAL_THROW( () ); - OInterfaceContainerHelper & operator = ( const OInterfaceContainerHelper & ) SAL_THROW( () ); - - /* - Dulicate content of the conaitner and release the old one without destroying. - The mutex must be locked and the memberbInUse must be true. - */ - void copyAndResetInUse() SAL_THROW( () ); - -private: - template< typename ListenerT, typename EventT > - class NotifySingleListener - { - private: - typedef void ( SAL_CALL ListenerT::*NotificationMethod )( const EventT& ); - NotificationMethod m_pMethod; - const EventT& m_rEvent; - public: - NotifySingleListener( NotificationMethod method, const EventT& event ) : m_pMethod( method ), m_rEvent( event ) { } - - void operator()( const ::com::sun::star::uno::Reference<ListenerT>& listener ) const - { - (listener.get()->*m_pMethod)( m_rEvent ); - } - }; -}; - -template <typename ListenerT, typename FuncT> -inline void OInterfaceContainerHelper::forEach( FuncT const& func ) -{ - OInterfaceIteratorHelper iter( *this ); - while (iter.hasMoreElements()) { - ::com::sun::star::uno::Reference<ListenerT> const xListener( - iter.next(), ::com::sun::star::uno::UNO_QUERY ); - if (xListener.is()) { -#if defined(EXCEPTIONS_OFF) - func( xListener ); -#else - try { - func( xListener ); - } - catch (::com::sun::star::lang::DisposedException const& exc) { - if (exc.Context == xListener) - iter.remove(); - } -#endif - } - } -} - -template< typename ListenerT, typename EventT > -inline void OInterfaceContainerHelper::notifyEach( void ( SAL_CALL ListenerT::*NotificationMethod )( const EventT& ), const EventT& Event ) -{ - forEach< ListenerT, NotifySingleListener< ListenerT, EventT > >( NotifySingleListener< ListenerT, EventT >( NotificationMethod, Event ) ); -} - -//=================================================================== -/** - A helper class to store interface references of different types. - - @see OInterfaceIteratorHelper - @see OInterfaceContainerHelper - */ -template< class key , class hashImpl , class equalImpl > -class OMultiTypeInterfaceContainerHelperVar -{ -public: - // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () ) - { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () ) - { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () ) - { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) - {} - - /** - Create a container of interface containers. - - @param rMutex the mutex to protect multi thread access. - The lifetime must be longer than the lifetime - of this object. - */ - inline OMultiTypeInterfaceContainerHelperVar( ::osl::Mutex & ) SAL_THROW( () ); - /** - Deletes all containers. - */ - inline ~OMultiTypeInterfaceContainerHelperVar() SAL_THROW( () ); - - /** - Return all id's under which at least one interface is added. - */ - inline ::com::sun::star::uno::Sequence< key > SAL_CALL getContainedTypes() const SAL_THROW( () ); - - /** - Return the container created under this key. - The InterfaceContainerHelper exists until the whole MultiTypeContainer is destroyed. - @return the container created under this key. If the container - was not created, null was returned. - */ - inline OInterfaceContainerHelper * SAL_CALL getContainer( const key & ) const SAL_THROW( () ); - - /** Inserts an element into the container with the specified key. - The position is not specified, thus it is not specified in which order events are fired. - - @attention - If you add the same interface more than once, then it will be added to the elements list - more than once and thus if you want to remove that interface from the list, you have to call - removeInterface() the same number of times. - In the latter case, you will also get events fired more than once (if the interface is a - listener interface). - - @param rKey - the id of the container - @param r - interface to be added; it is allowed, to insert null or - the same interface more than once - @return - the new count of elements in the container - */ - inline sal_Int32 SAL_CALL addInterface( - const key & rKey, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & r ) - SAL_THROW( () ); - - /** Removes an element from the container with the specified key. - It uses interface equality to remove the interface. - - @param rKey - the id of the container - @param rxIFace - interface to be removed - @return - the new count of elements in the container - */ - inline sal_Int32 SAL_CALL removeInterface( - const key & rKey, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ) - SAL_THROW( () ); - - /** - Call disposing on all references in the container, that - support XEventListener. Then clears the container. - @param rEvt the event object which is passed during disposing() call - */ - inline void SAL_CALL disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ) SAL_THROW( () ); - /** - Remove all elements of all containers. Does not delete the container. - */ - inline void SAL_CALL clear() SAL_THROW( () ); - - typedef key keyType; -private: - typedef ::std::vector< std::pair < key , void* > > InterfaceMap; - InterfaceMap *m_pMap; - ::osl::Mutex & rMutex; - - inline typename InterfaceMap::iterator find(const key &rKey) const - { - typename InterfaceMap::iterator iter = m_pMap->begin(); - typename InterfaceMap::iterator end = m_pMap->end(); - - while( iter != end ) - { - equalImpl equal; - if( equal( iter->first, rKey ) ) - break; - iter++; - } - return iter; - } - - inline OMultiTypeInterfaceContainerHelperVar( const OMultiTypeInterfaceContainerHelperVar & ) SAL_THROW( () ); - inline OMultiTypeInterfaceContainerHelperVar & operator = ( const OMultiTypeInterfaceContainerHelperVar & ) SAL_THROW( () ); -}; - - - - -/** - This struct contains the standard variables of a broadcaster. Helper - classes only know a reference to this struct instead of references - to the four members. The access to the members must be guarded with - rMutex. - - The additional template parameter keyType has been added, because gcc - can't compile addListener( const container::keyType &key ). - */ -template < class container , class keyType > -struct OBroadcastHelperVar -{ - /** The shared mutex. */ - ::osl::Mutex & rMutex; - /** ListenerContainer class is thread save. */ - container aLC; - /** Dispose call ready. */ - sal_Bool bDisposed; - /** In dispose call. */ - sal_Bool bInDispose; - - /** - Initialize the structur. bDispose and bInDispose are set to false. - @param rMutex the mutex reference. - */ - OBroadcastHelperVar( ::osl::Mutex & rMutex_ ) SAL_THROW( () ) - : rMutex( rMutex_ ) - , aLC( rMutex_ ) - , bDisposed( sal_False ) - , bInDispose( sal_False ) - {} - - /** - adds a listener threadsafe. - **/ - inline void addListener( - const keyType &key, - const ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface > &r ) - SAL_THROW( () ) - { - ::osl::MutexGuard guard( rMutex ); - OSL_ENSURE( !bInDispose, "do not add listeners in the dispose call" ); - OSL_ENSURE( !bDisposed, "object is disposed" ); - if( ! bInDispose && ! bDisposed ) - aLC.addInterface( key , r ); - } - - /** - removes a listener threadsafe - **/ - inline void removeListener( - const keyType &key, - const ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface > & r ) - SAL_THROW( () ) - { - ::osl::MutexGuard guard( rMutex ); - OSL_ENSURE( !bDisposed, "object is disposed" ); - if( ! bInDispose && ! bDisposed ) - aLC.removeInterface( key , r ); - } - - /** - Return the container created under this key. - @return the container created under this key. If the container - was not created, null was returned. This can be used to optimize - performance ( construction of an event object can be avoided ). - ***/ - inline OInterfaceContainerHelper * SAL_CALL getContainer( const keyType &key ) const SAL_THROW( () ) - { return aLC.getContainer( key ); } -}; - -/*------------------------------------------ -* -* In general, the above templates are used with a Type as key. -* Therefore a default declaration is given ( OMultiTypeInterfaceContainerHelper and OBroadcastHelper ) -* -*------------------------------------------*/ - -// helper function call class -struct hashType_Impl -{ - size_t operator()(const ::com::sun::star::uno::Type & s) const SAL_THROW( () ) - { return s.getTypeName().hashCode(); } -}; - - -/** Specialized class for key type com::sun::star::uno::Type, - without explicit usage of STL symbols. -*/ -class OMultiTypeInterfaceContainerHelper -{ -public: - // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () ) - { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () ) - { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () ) - { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) - {} - - /** - Create a container of interface containers. - - @param rMutex the mutex to protect multi thread access. - The lifetime must be longer than the lifetime - of this object. - */ - OMultiTypeInterfaceContainerHelper( ::osl::Mutex & ) SAL_THROW( () ); - /** - Delete all containers. - */ - ~OMultiTypeInterfaceContainerHelper() SAL_THROW( () ); - - /** - Return all id's under which at least one interface is added. - */ - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getContainedTypes() const SAL_THROW( () ); - - /** - Return the container created under this key. - @return the container created under this key. If the container - was not created, null was returned. - */ - OInterfaceContainerHelper * SAL_CALL getContainer( const ::com::sun::star::uno::Type & rKey ) const SAL_THROW( () ); - - /** Inserts an element into the container with the specified key. - The position is not specified, thus it is not specified in which order events are fired. - - @attention - If you add the same interface more than once, then it will be added to the elements list - more than once and thus if you want to remove that interface from the list, you have to call - removeInterface() the same number of times. - In the latter case, you will also get events fired more than once (if the interface is a - listener interface). - - @param rKey - the id of the container - @param r - interface to be added; it is allowed, to insert null or - the same interface more than once - @return - the new count of elements in the container - */ - sal_Int32 SAL_CALL addInterface( - const ::com::sun::star::uno::Type & rKey, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & r ) - SAL_THROW( () ); - - /** Removes an element from the container with the specified key. - It uses interface equality to remove the interface. - - @param rKey - the id of the container - @param rxIFace - interface to be removed - @return - the new count of elements in the container - */ - sal_Int32 SAL_CALL removeInterface( - const ::com::sun::star::uno::Type & rKey, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ) - SAL_THROW( () ); - - /** - Call disposing on all object in the container that - support XEventListener. Than clear the container. - */ - void SAL_CALL disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ) SAL_THROW( () ); - /** - Remove all elements of all containers. Does not delete the container. - */ - void SAL_CALL clear() SAL_THROW( () ); - - typedef ::com::sun::star::uno::Type keyType; -private: - void *m_pMap; - ::osl::Mutex & rMutex; - - inline OMultiTypeInterfaceContainerHelper( const OMultiTypeInterfaceContainerHelper & ) SAL_THROW( () ); - inline OMultiTypeInterfaceContainerHelper & operator = ( const OMultiTypeInterfaceContainerHelper & ) SAL_THROW( () ); -}; - -typedef OBroadcastHelperVar< OMultiTypeInterfaceContainerHelper , OMultiTypeInterfaceContainerHelper::keyType > OBroadcastHelper; - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/interfacecontainer.hxx b/cppuhelper/inc/cppuhelper/interfacecontainer.hxx deleted file mode 100644 index 68781c9d5..000000000 --- a/cppuhelper/inc/cppuhelper/interfacecontainer.hxx +++ /dev/null @@ -1,204 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_INTERFACECONTAINER_HXX_ -#define _CPPUHELPER_INTERFACECONTAINER_HXX_ - -#include <cppuhelper/interfacecontainer.h> - - -namespace cppu -{ - -template< class key , class hashImpl , class equalImpl > -inline OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::OMultiTypeInterfaceContainerHelperVar( ::osl::Mutex & rMutex_ ) - SAL_THROW( () ) - : rMutex( rMutex_ ) -{ - m_pMap = new InterfaceMap; -} - -//=================================================================== -template< class key , class hashImpl , class equalImpl > -inline OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::~OMultiTypeInterfaceContainerHelperVar() - SAL_THROW( () ) -{ - typename InterfaceMap::iterator iter = m_pMap->begin(); - typename InterfaceMap::iterator end = m_pMap->end(); - - while( iter != end ) - { - delete (OInterfaceContainerHelper*)(*iter).second; - (*iter).second = 0; - ++iter; - } - delete m_pMap; -} - -//=================================================================== -template< class key , class hashImpl , class equalImpl > -inline ::com::sun::star::uno::Sequence< key > OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::getContainedTypes() const - SAL_THROW( () ) -{ - ::osl::MutexGuard aGuard( rMutex ); - typename InterfaceMap::size_type nSize = m_pMap->size(); - if( nSize != 0 ) - { - ::com::sun::star::uno::Sequence< key > aInterfaceTypes( nSize ); - key * pArray = aInterfaceTypes.getArray(); - - typename InterfaceMap::iterator iter = m_pMap->begin(); - typename InterfaceMap::iterator end = m_pMap->end(); - - sal_uInt32 i = 0; - while( iter != end ) - { - // are interfaces added to this container? - if( ((OInterfaceContainerHelper*)(*iter).second)->getLength() ) - // yes, put the type in the array - pArray[i++] = (*iter).first; - iter++; - } - if( i != nSize ) { - // may be empty container, reduce the sequence to the right size - aInterfaceTypes = ::com::sun::star::uno::Sequence<key>( pArray, i ); - } - return aInterfaceTypes; - } - return ::com::sun::star::uno::Sequence<key>(); -} - -//=================================================================== -template< class key , class hashImpl , class equalImpl > -OInterfaceContainerHelper * OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::getContainer( - const key & rKey ) const SAL_THROW( () ) -{ - ::osl::MutexGuard aGuard( rMutex ); - - typename InterfaceMap::iterator iter = find( rKey ); - if( iter != m_pMap->end() ) - return (OInterfaceContainerHelper*) (*iter).second; - return 0; -} - -//=================================================================== -template< class key , class hashImpl , class equalImpl > -sal_Int32 OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::addInterface( - const key & rKey, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rListener ) - SAL_THROW( () ) -{ - ::osl::MutexGuard aGuard( rMutex ); - typename InterfaceMap::iterator iter = find( rKey ); - if( iter == m_pMap->end() ) - { - OInterfaceContainerHelper * pLC = new OInterfaceContainerHelper( rMutex ); - m_pMap->push_back(std::pair<key, void*>(rKey, pLC)); - return pLC->addInterface( rListener ); - } - else - return ((OInterfaceContainerHelper*)(*iter).second)->addInterface( rListener ); -} - -//=================================================================== -template< class key , class hashImpl , class equalImpl > -inline sal_Int32 OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::removeInterface( - const key & rKey, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rListener ) - SAL_THROW( () ) -{ - ::osl::MutexGuard aGuard( rMutex ); - - // search container with id nUik - typename InterfaceMap::iterator iter = find( rKey ); - // container found? - if( iter != m_pMap->end() ) - return ((OInterfaceContainerHelper*)(*iter).second)->removeInterface( rListener ); - - // no container with this id. Always return 0 - return 0; -} - -//=================================================================== -template< class key , class hashImpl , class equalImpl > -void OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::disposeAndClear( - const ::com::sun::star::lang::EventObject & rEvt ) - SAL_THROW( () ) -{ - typename InterfaceMap::size_type nSize = 0; - OInterfaceContainerHelper ** ppListenerContainers = NULL; - { - ::osl::MutexGuard aGuard( rMutex ); - nSize = m_pMap->size(); - if( nSize ) - { - typedef OInterfaceContainerHelper* ppp; - ppListenerContainers = new ppp[nSize]; - - typename InterfaceMap::iterator iter = m_pMap->begin(); - typename InterfaceMap::iterator end = m_pMap->end(); - - typename InterfaceMap::size_type i = 0; - while( iter != end ) - { - ppListenerContainers[i++] = (OInterfaceContainerHelper*)(*iter).second; - ++iter; - } - } - } - - // create a copy, because do not fire event in a guarded section - for( typename InterfaceMap::size_type i = 0; i < nSize; i++ ) - { - if( ppListenerContainers[i] ) - ppListenerContainers[i]->disposeAndClear( rEvt ); - } - - delete [] ppListenerContainers; -} - -//=================================================================== -template< class key , class hashImpl , class equalImpl > -void OMultiTypeInterfaceContainerHelperVar< key , hashImpl , equalImpl >::clear() SAL_THROW( () ) -{ - ::osl::MutexGuard aGuard( rMutex ); - typename InterfaceMap::iterator iter = m_pMap->begin(); - typename InterfaceMap::iterator end = m_pMap->end(); - - while( iter != end ) - { - ((OInterfaceContainerHelper*)(*iter).second)->clear(); - ++iter; - } -} - - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/propertysetmixin.hxx b/cppuhelper/inc/cppuhelper/propertysetmixin.hxx deleted file mode 100644 index 41a9f1ae4..000000000 --- a/cppuhelper/inc/cppuhelper/propertysetmixin.hxx +++ /dev/null @@ -1,491 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef INCLUDED_CPPUHELPER_PROPERTYSETMIXIN_HXX -#define INCLUDED_CPPUHELPER_PROPERTYSETMIXIN_HXX \ - INCLUDED_CPPUHELPER_PROPERTYSETMIXIN_HXX - -#include "sal/config.h" -#include "com/sun/star/beans/PropertyVetoException.hpp" -#include "com/sun/star/beans/UnknownPropertyException.hpp" -#include "com/sun/star/beans/XFastPropertySet.hpp" -#include "com/sun/star/beans/XPropertyAccess.hpp" -#include "com/sun/star/beans/XPropertySet.hpp" -#include "com/sun/star/lang/IllegalArgumentException.hpp" -#include "com/sun/star/lang/WrappedTargetException.hpp" -#include "com/sun/star/uno/Reference.hxx" -#include "com/sun/star/uno/RuntimeException.hpp" -#include "com/sun/star/uno/Sequence.hxx" -#include "sal/types.h" - -/// @HTML - -namespace com { namespace sun { namespace star { - namespace beans { - class XPropertyChangeListener; - class XPropertySetInfo; - class XVetoableChangeListener; - struct PropertyValue; - } - namespace uno { - class Any; - class Type; - class XComponentContext; - } -} } } -namespace rtl { class OUString; } - -namespace cppu { - -template< typename T > class PropertySetMixin; - -// Suppress warnings about virtual functions but non-virtual destructor: -#if defined _MSC_VER -#pragma warning(push) -#pragma warning(disable: 4265) -#endif - -/** - @short A helper base class for <code>cppu::PropertySetMixin</code>. - - @descr See the documentation of <code>cppu::PropertySetMixin</code> for - further details. - - @descr That <code>cppu::PropertySetMixin</code> is derived from this - base class should be considered an implementation detail. The functionality - of <code>cppu::PropertySetMixin</code> that is inherited from this base - class and is visible to subclasses of - <code>cppu::PropertySetMixin</code> should be treated by such - subclasses as being provided by <code>cppu::PropertySetMixin</code> - directly (e.g., in such subclasses, use - “<code>PropertySetMixin::Implements</code>” instead of - “<code>PropertySetMixinImpl::Implements</code>”). - - @since UDK 3.2.1 -*/ -class PropertySetMixinImpl: - public com::sun::star::beans::XPropertySet, - public com::sun::star::beans::XFastPropertySet, - public com::sun::star::beans::XPropertyAccess -{ -protected: - /** - @short Flags used by subclasses of - <code>cppu::PropertySetMixin</code> to specify what UNO interface - types shall be supported. - */ - enum Implements { - /** - @short Flag specifying that the UNO interface type - <code>com::sun::star::beans::XPropertySet</code> shall be supported. - */ - IMPLEMENTS_PROPERTY_SET = 1, - - /** - @short Flag specifying that the UNO interface type - <code>com::sun::star::beans::XFastPropertySet</code> shall be - supported. - */ - IMPLEMENTS_FAST_PROPERTY_SET = 2, - - /** - @short Flag specifying that the UNO interface type - <code>com::sun::star::beans::XPropertyAccess</code> shall be - supported. - */ - IMPLEMENTS_PROPERTY_ACCESS = 4 - }; - - /** - @short A class used by subclasses of - <code>cppu::PropertySetMixin</code> when implementing UNO interface - type attribute setter functions. - - @descr This class is not thread safe; that is, the constructor, - <code>notify</code>, and the destructor must be called from the same - thread. - - @descr See <code>cppu::PropertySetMixinImpl::prepareSet</code> for - further details. - */ - class BoundListeners { - public: - /** - @short The constructor. - - @descr May throw <code>std::bad_alloc</code>. - */ - BoundListeners(); - - /** - @short The destructor. - - @descr Does not throw. - */ - ~BoundListeners(); - - /** - @short Notifies any - <code>com::sun::star::beans::XPropertyChangeListener</code>s. - - @descr May throw <code>com::sun::star::uno::RuntimeException</code> - and <code>std::bad_alloc</code>. - - @descr See <code>cppu::PropertySetMixinImpl::prepareSet</code> - for further details. - */ - void notify() const; - - private: - BoundListeners(BoundListeners &); // not defined - void operator =(BoundListeners); // not defined - - class Impl; - Impl * m_impl; - - friend class PropertySetMixinImpl; - }; - - /** - @short A function used by subclasses of - <code>cppu::PropertySetMixin</code> when implementing UNO interface - type attribute setter functions. - - @descr First, this function checks whether this instance has already been - disposed (see <code>cppu::PropertySetMixinImpl::dispose</code>), - and throws a <code>com::sun::star::lang::DisposedException</code> if - applicable. For a constrained attribute (whose setter can explicitly - raise <code>com::sun::star::beans::PropertyVetoException</code>), this - function notifies any - <code>com::sun::star::beans::XVetoableChangeListener</code>s. For a - bound attribute, this function modifies the passed-in - <code>boundListeners</code> so that it can afterwards be used to notify - any <code>com::sun::star::beans::XPropertyChangeListener</code>s. This - function should be called before storing the new attribute value, and - <code>boundListeners->notify()</code> should be called exactly once after - storing the new attribute value (in case the attribute is bound; - otherwise, calling <code>boundListeners->notify()</code> is ignored). - Furthermore, <code>boundListeners->notify()</code> and this function have - to be called from the same thread. - - @descr May throw - <code>com::sun::star::beans::PropertyVetoException</code>, - <code>com::sun::star::uno::RuntimeException</code> (and - <code>com::sun::star::lang::DisposedException</code> in particular), and - <code>std::bad_alloc</code>. - - @param propertyName the name of the property (which is the same as the - name of the attribute that is going to be set) - - @param oldValue the property value corresponding to the old attribute - value. This is only used as - <code>com::sun::star::beans::PropertyChangeEvent::OldValue</code>, which - is rather useless, anyway (see “Using the Observer Pattern” - in <a href="http://tools.openoffice.org/CodingGuidelines.sxw"> - <cite>OpenOffice.org Coding Guidelines</cite></a>). If the attribute - that is going to be set is neither bound nor constrained, or if - <code>com::sun::star::beans::PropertyChangeEvent::OldValue</code> should - not be set, a <code>VOID</code> <code>Any</code> can be used instead. - - @param newValue the property value corresponding to the new - attribute value. This is only used as - <code>com::sun::star::beans::PropertyChangeEvent::NewValue</code>, which - is rather useless, anyway (see “Using the Observer Pattern” - in <a href="http://tools.openoffice.org/CodingGuidelines.sxw"> - <cite>OpenOffice.org Coding Guidelines</cite></a>), <em>unless</em> the - attribute that is going to be set is constrained. If the attribute - that is going to be set is neither bound nor constrained, or if it is - only bound but - <code>com::sun::star::beans::PropertyChangeEvent::NewValue</code> should - not be set, a <code>VOID</code> <code>Any</code> can be used instead. - - @param boundListeners a pointer to a fresh - <code>cppu::PropertySetMixinImpl::BoundListeners</code> instance - (which has not been passed to this function before, and on which - <code>notify</code> has not yet been called); may only be null if the - attribute that is going to be set is not bound - */ - void prepareSet( - rtl::OUString const & propertyName, - com::sun::star::uno::Any const & oldValue, - com::sun::star::uno::Any const & newValue, - BoundListeners * boundListeners); - - /** - @short Mark this instance as being disposed. - - @descr See <code>com::sun::star::lang::XComponent</code> for the general - concept of disposing UNO objects. On the first call to this function, - all registered listeners - (<code>com::sun::star::beans::XPropertyChangeListener</code>s and - <code>com::sun::star::beans::XVetoableChangeListener</code>s) are - notified of the disposing source. Any subsequent calls to this function - are ignored. - - @descr May throw <code>com::sun::star::uno::RuntimeException</code> and - <code>std::bad_alloc</code>. - */ - void dispose(); - - /** - @short A function used by subclasses of - <code>cppu::PropertySetMixin</code> when implementing - <code>com::sun::star::uno::XInterface::queryInterface</code>. - - @descr This function checks for support of any of the UNO interface types - specified in the call of the <code>cppu::PropertySetMixin</code> - constructor. It does not check for any other UNO interface types (not - even for <code>com::sun::star::uno::XInterface</code>), and should not - be used directly as the implementation of - <code>com::sun::star::uno::XInterface::queryInterface</code> of this UNO - object. - */ - virtual com::sun::star::uno::Any SAL_CALL queryInterface( - com::sun::star::uno::Type const & type) - throw (com::sun::star::uno::RuntimeException); - - // @see com::sun::star::beans::XPropertySet::getPropertySetInfo - virtual - com::sun::star::uno::Reference< com::sun::star::beans::XPropertySetInfo > - SAL_CALL getPropertySetInfo() throw (com::sun::star::uno::RuntimeException); - - // @see com::sun::star::beans::XPropertySet::setPropertyValue - virtual void SAL_CALL setPropertyValue( - rtl::OUString const & propertyName, - com::sun::star::uno::Any const & value) - throw ( - com::sun::star::beans::UnknownPropertyException, - com::sun::star::beans::PropertyVetoException, - com::sun::star::lang::IllegalArgumentException, - com::sun::star::lang::WrappedTargetException, - com::sun::star::uno::RuntimeException); - - // @see com::sun::star::beans::XPropertySet::getPropertyValue - virtual com::sun::star::uno::Any SAL_CALL getPropertyValue( - rtl::OUString const & propertyName) - throw ( - com::sun::star::beans::UnknownPropertyException, - com::sun::star::lang::WrappedTargetException, - com::sun::star::uno::RuntimeException); - - /** - @short Adds a - <code>com::sun::star::beans::XPropertyChangeListener</code>. - - @descr If a listener is added more than once, it will receive all - relevant notifications multiple times. - - @see com::sun::star::beans::XPropertySet::addPropertyChangeListener - */ - virtual void SAL_CALL addPropertyChangeListener( - rtl::OUString const & propertyName, - com::sun::star::uno::Reference< - com::sun::star::beans::XPropertyChangeListener > const & listener) - throw ( - com::sun::star::beans::UnknownPropertyException, - com::sun::star::lang::WrappedTargetException, - com::sun::star::uno::RuntimeException); - - // @see com::sun::star::beans::XPropertySet::removePropertyChangeListener - virtual void SAL_CALL removePropertyChangeListener( - rtl::OUString const & propertyName, - com::sun::star::uno::Reference< - com::sun::star::beans::XPropertyChangeListener > const & listener) - throw ( - com::sun::star::beans::UnknownPropertyException, - com::sun::star::lang::WrappedTargetException, - com::sun::star::uno::RuntimeException); - - /** - @short Adds a - <code>com::sun::star::beans::XVetoableChangeListener</code>. - - @descr If a listener is added more than once, it will receive all - relevant notifications multiple times. - - @see com::sun::star::beans::XPropertySet::addVetoableChangeListener - */ - virtual void SAL_CALL addVetoableChangeListener( - rtl::OUString const & propertyName, - com::sun::star::uno::Reference< - com::sun::star::beans::XVetoableChangeListener > const & listener) - throw ( - com::sun::star::beans::UnknownPropertyException, - com::sun::star::lang::WrappedTargetException, - com::sun::star::uno::RuntimeException); - - // @see com::sun::star::beans::XPropertySet::removeVetoableChangeListener - virtual void SAL_CALL removeVetoableChangeListener( - rtl::OUString const & propertyName, - com::sun::star::uno::Reference< - com::sun::star::beans::XVetoableChangeListener > const & listener) - throw ( - com::sun::star::beans::UnknownPropertyException, - com::sun::star::lang::WrappedTargetException, - com::sun::star::uno::RuntimeException); - - // @see com::sun::star::beans::XFastPropertySet::setFastPropertyValue - virtual void SAL_CALL setFastPropertyValue( - sal_Int32 handle, com::sun::star::uno::Any const & value) - throw ( - com::sun::star::beans::UnknownPropertyException, - com::sun::star::beans::PropertyVetoException, - com::sun::star::lang::IllegalArgumentException, - com::sun::star::lang::WrappedTargetException, - com::sun::star::uno::RuntimeException); - - // @see com::sun::star::beans::XFastPropertySet::getFastPropertyValue - virtual com::sun::star::uno::Any SAL_CALL getFastPropertyValue( - sal_Int32 handle) - throw ( - com::sun::star::beans::UnknownPropertyException, - com::sun::star::lang::WrappedTargetException, - com::sun::star::uno::RuntimeException); - - // @see com::sun::star::beans::XPropertyAccess::getPropertyValues - virtual - com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > - SAL_CALL getPropertyValues() throw (com::sun::star::uno::RuntimeException); - - // @see com::sun::star::beans::XPropertyAccess::setPropertyValues - virtual void SAL_CALL setPropertyValues( - com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue > - const & props) - throw ( - com::sun::star::beans::UnknownPropertyException, - com::sun::star::beans::PropertyVetoException, - com::sun::star::lang::IllegalArgumentException, - com::sun::star::lang::WrappedTargetException, - com::sun::star::uno::RuntimeException); - -private: - PropertySetMixinImpl(PropertySetMixinImpl &); // not defined - void operator =(PropertySetMixinImpl &); // not defined - - PropertySetMixinImpl( - com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > - const & context, - Implements implements, - com::sun::star::uno::Sequence< rtl::OUString > const & absentOptional, - com::sun::star::uno::Type const & type); - - class Impl; - Impl * m_impl; - - friend class Impl; - template< typename T > friend class PropertySetMixin; - - ~PropertySetMixinImpl(); - - void checkUnknown(rtl::OUString const & propertyName); -}; - -/** - @short A helper mixin to implement certain UNO interfaces related to property - set handling on top of the attributes of a given UNO interface type. - - @descr The UNO interface type is specified by the type parameter - <code>T</code> (which must correspond to a UNO interface type). - - @descr No specializations of this class template should be added by client - code. - - @since UDK 3.2.1 -*/ -template< typename T > class PropertySetMixin: public PropertySetMixinImpl { -protected: - /** - @short The constructor. - - @descr May throw <code>com::sun::star::uno::RuntimeException</code> and - <code>std::bad_alloc</code>. - - @param context the component context used by this class template; must - not be null, and must supply the service - <code>com.sun.star.reflection.CoreReflection</code> and the singleton - <code>com.sun.star.reflection.theTypeDescriptionManager</code> - - @param implements a combination of zero or more flags specifying what - UNO interface types shall be supported - - @param absentOptional a list of optional properties that are not - present, and should thus not be visible via - <code>com::sun::star::beans::XPropertySet::getPropertySetInfo</code>, - <code>com::sun::star::beans::XPropertySet::addPropertyChangeListener<!-- - --></code>, <code>com::sun::star::beans::XPropertySet::<!-- - -->removePropertyChangeListener</code>, - <code>com::sun::star::beans::XPropertySet::addVetoableChangeListener<!-- - --></code>, and <code>com::sun::star::beans::XPropertySet::<!-- - -->removeVetoableChangeListener</code>. For consistency reasons, the - given <code>absentOptional</code> should only contain the names of - attributes that represent optional properties that are not present (that - is, the attribute getters and setters always throw a - <code>com::sun::star::beans::UnknownPropertyException</code>), and should - contain each such name only once. If an optional property is not present - (that is, the corresponding attribute getter and setter always throw a - <code>com::sun::star::beans::UnknownPropertyException</code>) but is not - contained in the given <code>absentOptional</code>, then it will be - visible via - <code>com::sun::star::beans::XPropertySet::getPropertySetInfo</code> as a - <code>com::sun::star::beans::Property</code> with a set - <code>com::sun::star::beans::PropertyAttribute::OPTIONAL</code>. If the - given <code>implements</code> specifies that - <code>com::sun::star::beans::XPropertySet</code> is not supported, then - the given <code>absentOptional</code> is effectively ignored and can be - empty. - */ - PropertySetMixin( - com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > - const & context, - Implements implements, - com::sun::star::uno::Sequence< rtl::OUString > const & absentOptional): - PropertySetMixinImpl( - context, implements, absentOptional, T::static_type()) - {} - - /** - @short The destructor. - - @descr Does not throw. - */ - ~PropertySetMixin() {} - -private: - PropertySetMixin(PropertySetMixin &); // not defined - void operator =(PropertySetMixin); // not defined -}; - -#if defined _MSC_VER -#pragma warning(pop) -#endif - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/propshlp.hxx b/cppuhelper/inc/cppuhelper/propshlp.hxx deleted file mode 100644 index 4e8889ccf..000000000 --- a/cppuhelper/inc/cppuhelper/propshlp.hxx +++ /dev/null @@ -1,675 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _CPPUHELPER_PROPSHLP_HXX -#define _CPPUHELPER_PROPSHLP_HXX - -#include <rtl/alloc.h> - -#include <cppuhelper/interfacecontainer.hxx> - -#include <com/sun/star/beans/XPropertySet.hpp> -#include <com/sun/star/beans/XMultiPropertySet.hpp> -#include <com/sun/star/beans/XFastPropertySet.hpp> - -#include <memory> - - -namespace cppu -{ - - -/************************************************************************* -*************************************************************************/ - - -/** - This interface is used by the OPropertyHelper, to access the property description. - */ -class IPropertyArrayHelper -{ -public: - // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () ) - { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () ) - { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () ) - { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) - {} - - /** - Folowing the rule, the first virtual method impies the virtual destructor. - */ - virtual ~IPropertyArrayHelper(); - - /** - Return the property members Name and Attribute from the handle nHandle. - @param nHandle the handle of a property. If the values of the handles - are sorted in the same way as the names and the highest handle value - is getCount() -1, than it must be an indexed acces to the property array. - @param pPropName is an out parameter filled with property name of the property with the - handle nHandle. May be NULL. - @param rAttributes is an out parameter filled with attributes of the property with the - handle nHandle. May be NULL. - @return True, if the handle exist, otherwise false. - */ - virtual sal_Bool SAL_CALL fillPropertyMembersByHandle( - ::rtl::OUString * pPropName, sal_Int16 * pAttributes, sal_Int32 nHandle ) = 0; - /** - Return the sequence of properties. The sequence is sorted by name. - */ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getProperties(void) = 0; - /** - Return the property with the name rPropertyName. - @param rPropertyName the name of the property. - @exception UnknownPropertyException thrown if the property name is unknown. - */ - virtual ::com::sun::star::beans::Property SAL_CALL getPropertyByName( - const ::rtl::OUString& rPropertyName ) - throw (::com::sun::star::beans::UnknownPropertyException) = 0; - /** - Return true if the property with the name rPropertyName exist, otherwise false. - @param rPropertyName the name of the property. - */ - virtual sal_Bool SAL_CALL hasPropertyByName(const ::rtl::OUString& rPropertyName) = 0; - /** - Return the handle of the property with the name rPropertyName. - If the property does not exist -1 is returned. - @param rPropertyName the name of the property. - */ - virtual sal_Int32 SAL_CALL getHandleByName( const ::rtl::OUString & rPropertyName ) = 0; - /** - Fill the array with the handles of the properties. - @return the handles of the names from the pHandles array. -1 - indicates an unknown property name. - */ - virtual sal_Int32 SAL_CALL fillHandles( - /*out*/ sal_Int32 * pHandles, const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rPropNames ) = 0; -}; - -/** - You can use this helper class to map a XPropertySet-Interface to a XFast- - or a XMultiPropertySet interface. - */ -class OPropertyArrayHelper : public IPropertyArrayHelper -{ -public: - /** - Create an object which supports the common property interfaces. - - @param pProps array of properties - The array pProps should be sorted. - @param nElements is the number of properties in the pProps structure. - @param bSorted indicates that the elements are sorted. - *********/ - OPropertyArrayHelper( - ::com::sun::star::beans::Property *pProps, - sal_Int32 nElements , - sal_Bool bSorted = sal_True ) - SAL_THROW( () ); - - /** - Create an object which supports the common property interfaces. - @param aProps sequence of properties which are supported by this helper. - The sequence aProps should be sorted. - @param bSorted indicates that the elements are sorted. - */ - OPropertyArrayHelper( - const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > & aProps, - sal_Bool bSorted = sal_True ) - SAL_THROW( () ); - - /** - Return the number of properties. - */ - sal_Int32 SAL_CALL getCount() const SAL_THROW( () ); - /** - Return the property members Name and Attribute from the handle nHandle. - @param nHandle the handle of a property. If the values of the handles - are sorted in the same way as the names and the highest handle value - is getCount() -1, than it is only an indexed acces to the property array. - Otherwise it is a linear search through the array. - @param pPropName is an out parameter filled with property name of the property with the - handle nHandle. May be NULL. - @param rAttributes is an out parameter filled with attributes of the property with the - handle nHandle. May be NULL. - @return True, if the handle exist, otherwise false. - */ - virtual sal_Bool SAL_CALL fillPropertyMembersByHandle( - ::rtl::OUString * pPropName, sal_Int16 * pAttributes, sal_Int32 nHandle ); - /** - Return the sequence of properties. The sequence is sorted by name. - */ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > SAL_CALL getProperties(void); - /** - Return the property with the name rPropertyName. - @param rPropertyName the name of the property. - @exception UnknownPropertyException thrown if the property name is unknown. - */ - virtual ::com::sun::star::beans::Property SAL_CALL getPropertyByName( - const ::rtl::OUString& rPropertyName ) - throw (::com::sun::star::beans::UnknownPropertyException); - /** - Return true if the property with the name rPropertyName exist, otherwise false. - @param rPropertyName the name of the property. - */ - virtual sal_Bool SAL_CALL hasPropertyByName(const ::rtl::OUString& rPropertyName); - /** - Return the handle of the property with the name rPropertyName. - If the property does not exist -1 is returned. - @param rPropertyName the name of the property. - */ - virtual sal_Int32 SAL_CALL getHandleByName( const ::rtl::OUString & rPropertyName ); - /** - Fill the array with the handles of the properties. - @return the handles of the names from the pHandles array. -1 - indicates an unknown property name. - */ - virtual sal_Int32 SAL_CALL fillHandles( - /*out*/sal_Int32 * pHandles, const ::com::sun::star::uno::Sequence< ::rtl::OUString > & rPropNames ); - -protected: - /** reserved for future use. do not use. - */ - void * m_pReserved; - -private: - void init( sal_Bool bSorted ) SAL_THROW( () ); - - /** The sequence generated from the pProperties array. */ - ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > aInfos; - - /** - True, If the values of the handles are sorted in the same way as the names - and the highest handle value is getCount() -1, otherwise false. - */ - sal_Bool bRightOrdered; -}; - - -//----------------------------------------------------------------------------- -// helper defines needed for an interface container with a 32 bit key values - -struct equalInt32_Impl -{ - bool operator()(const sal_Int32 & i1 , const sal_Int32 & i2) const SAL_THROW( () ) - { return i1 == i2; } -}; - -struct hashInt32_Impl -{ - size_t operator()(const sal_Int32 & i) const SAL_THROW( () ) - { return i; } -}; -/** Specialized class for key type sal_Int32, - without explicit usage of STL symbols. -*/ -class OMultiTypeInterfaceContainerHelperInt32 -{ -public: - // these are here to force memory de/allocation to sal lib. - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () ) - { return ::rtl_allocateMemory( nSize ); } - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () ) - { ::rtl_freeMemory( pMem ); } - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () ) - { return pMem; } - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) - {} - - /** - Create a container of interface containers. - - @param rMutex the mutex to protect multi thread access. - The lifetime must be longer than the lifetime - of this object. - */ - OMultiTypeInterfaceContainerHelperInt32( ::osl::Mutex & ) SAL_THROW( () ); - /** - Delete all containers. - */ - ~OMultiTypeInterfaceContainerHelperInt32() SAL_THROW( () ); - - /** - Return all id's under which at least one interface is added. - */ - ::com::sun::star::uno::Sequence< sal_Int32 > SAL_CALL getContainedTypes() const SAL_THROW( () ); - - /** - Return the container created under this key. - @return the container created under this key. If the container - was not created, null was returned. - */ - OInterfaceContainerHelper * SAL_CALL getContainer( const sal_Int32 & rKey ) const SAL_THROW( () ); - - /** - Insert an element in the container specified with the key. The position is not specified. - @param rKey the id of the container. - @param rxIFace the added interface. It is allowed to insert null or - the same pointer more than once. - @return the new count of elements in the container. - */ - sal_Int32 SAL_CALL addInterface( - const sal_Int32 & rKey, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & r ) - SAL_THROW( () ); - - /** - Remove an element from the container specified with the key. - It uses the equal definition of uno objects to remove the interfaces. - @param rKey the id of the container. - @param rxIFace the removed interface. - @return the new count of elements in the container. - */ - sal_Int32 SAL_CALL removeInterface( - const sal_Int32 & rKey, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & rxIFace ) - SAL_THROW( () ); - - /** - Call disposing on all objects in the container that - support XEventListener. Then clear the container. - */ - void SAL_CALL disposeAndClear( const ::com::sun::star::lang::EventObject & rEvt ) SAL_THROW( () ); - /** - Remove all elements of all containers. Does not delete the container. - */ - void SAL_CALL clear() SAL_THROW( () ); - - typedef sal_Int32 keyType; -private: - void *m_pMap; - ::osl::Mutex & rMutex; - - inline OMultiTypeInterfaceContainerHelperInt32( const OMultiTypeInterfaceContainerHelperInt32 & ) SAL_THROW( () ); - inline OMultiTypeInterfaceContainerHelperInt32 & operator = ( const OMultiTypeInterfaceContainerHelperInt32 & ) SAL_THROW( () ); -}; - - -/** An interface to extend event notification actions. - */ -class IEventNotificationHook -{ -public: - /** - Method to be called by OPropertySetHelper::fire. - - @param bIgnoreRuntimeExceptionsWhileFiring - indicates whether occuring RuntimeExceptions shall be - ignored when firing notifications - - @see OPropertySetHelper::fire - */ - virtual void fireEvents( - sal_Int32 * pnHandles, - sal_Int32 nCount, - sal_Bool bVetoable, - bool bIgnoreRuntimeExceptionsWhileFiring) = 0; -}; - - - -/** - This abstract class maps the methods of the interfaces XMultiPropertySet, XFastPropertySet - and XPropertySet to the methods getInfoHelper, convertFastPropertyValue, - setFastPropertyValue_NoBroadcast and getFastPropertyValue. You must derive from - this class and overload the methods. - It provides a standard implementation of the XPropertySetInfo. - The XPropertiesChangeListener are inserted in the rBHelper.aLC structure. - The XPropertyChangeListener and XVetoableChangeListener with no names are inserted - in the rBHelper.aLC structure. So it is possible to advise property listeners with - the connection point interfaces. But only listeners that listen to all property changes. - - */ -class OPropertySetHelper : public ::com::sun::star::beans::XMultiPropertySet, - public ::com::sun::star::beans::XFastPropertySet, - public ::com::sun::star::beans::XPropertySet -{ -public: - /** - @param rBHelper this structure contains the basic members of - a broadcaster. - The lifetime must be longer than the lifetime - of this object. Stored in the variable rBHelper. - */ - OPropertySetHelper( OBroadcastHelper & rBHelper ) SAL_THROW( () ); - - /** Constructor. - - @param rBHelper - this structure contains the basic members of - a broadcaster. - The lifetime must be longer than the lifetime - of this object. Stored in the variable rBHelper. - - @param bIgnoreRuntimeExceptionsWhileFiring - indicates whether occuring RuntimeExceptions will be - ignored when firing notifications (vetoableChange((), - propertyChange()) to listeners. - PropertyVetoExceptions may still be thrown. - This flag is useful in a inter-process scenarios when - remote bridges may break down - (firing DisposedExceptions). - */ - OPropertySetHelper( - OBroadcastHelper & rBHelper, bool bIgnoreRuntimeExceptionsWhileFiring ); - - /** Constructor. - - @param rBHelper - this structure contains the basic members of - a broadcaster. - The lifetime must be longer than the lifetime - of this object. Stored in the variable rBHelper. - - @param i_pFireEvents - additional event notifier - - @param bIgnoreRuntimeExceptionsWhileFiring - indicates whether occuring RuntimeExceptions will be - ignored when firing notifications (vetoableChange((), - propertyChange()) to listeners. - PropertyVetoExceptions may still be thrown. - This flag is useful in a inter-process scenarios when - remote bridges may break down - (firing DisposedExceptions). - */ - OPropertySetHelper( - OBroadcastHelper & rBHelper, - IEventNotificationHook *i_pFireEvents, - bool bIgnoreRuntimeExceptionsWhileFiring = false); - - /** - Only returns a reference to XMultiPropertySet, XFastPropertySet, XPropertySet and - XEventListener. - */ - ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) - throw (::com::sun::star::uno::RuntimeException); - - /** eases implementing XTypeProvider::getTypes, returns the types of XMultiPropertySet, XFastPropertySet, XPropertySet - */ - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > getTypes() - throw(::com::sun::star::uno::RuntimeException); - - /** - Send a disposing notification to the listeners in the conatiners aBoundLC - and aVetoableLC. - - @see OComponentHelper - */ - void SAL_CALL disposing() SAL_THROW( () ); - - /** - Throw UnknownPropertyException or PropertyVetoException if the property with the name - rPropertyName does not exist or is readonly. Otherwise rPropertyName is changed to its handle - value and setFastPropertyValue is called. - */ - virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& rPropertyName, const ::com::sun::star::uno::Any& aValue ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - /** - Throw UnknownPropertyException if the property with the name - rPropertyName does not exist. - */ - virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue(const ::rtl::OUString& aPropertyName) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - /** Ignored if the property is not bound. */ - virtual void SAL_CALL addPropertyChangeListener( - const ::rtl::OUString& aPropertyName, - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - /** Ignored if the property is not bound. */ - virtual void SAL_CALL removePropertyChangeListener( - const ::rtl::OUString& aPropertyName, - const ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertyChangeListener >& aListener) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - /** Ignored if the property is not constrained. */ - virtual void SAL_CALL addVetoableChangeListener( - const ::rtl::OUString& aPropertyName, - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - /** Ignored if the property is not constrained. */ - virtual void SAL_CALL removeVetoableChangeListener( - const ::rtl::OUString& aPropertyName, - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener > & aListener ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - /** - Throw UnknownPropertyException or PropertyVetoException if the property with the name - rPropertyName does not exist or is readonly. Otherwise the method convertFastPropertyValue - is called, then the vetoable listeners are notified. After this the value of the property - is changed with the setFastPropertyValue_NoBroadcast method and the bound listeners are - notified. - */ - virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - /** - @exception com::sun::star::beans::UnknownPropertyException - if the property with the handle nHandle does not exist. - */ - virtual ::com::sun::star::uno::Any SAL_CALL getFastPropertyValue( sal_Int32 nHandle ) - throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - // XMultiPropertySet - virtual void SAL_CALL setPropertyValues( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Values ) - throw(::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); - - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL getPropertyValues( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames ) - throw(::com::sun::star::uno::RuntimeException); - - virtual void SAL_CALL addPropertiesChangeListener( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames, - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& Listener ) - throw(::com::sun::star::uno::RuntimeException); - - virtual void SAL_CALL removePropertiesChangeListener( - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener >& Listener ) - throw(::com::sun::star::uno::RuntimeException); - - virtual void SAL_CALL firePropertiesChangeEvent( - const ::com::sun::star::uno::Sequence< ::rtl::OUString >& PropertyNames, - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertiesChangeListener > & Listener ) - throw(::com::sun::star::uno::RuntimeException); - /** - The property sequence is created in the call. The interface isn't used after the call. - */ - static ::com::sun::star::uno::Reference < ::com::sun::star::beans::XPropertySetInfo > SAL_CALL - createPropertySetInfo( IPropertyArrayHelper & rProperties ) SAL_THROW( () ); -protected: - /** - This method fire events to all registered property listeners. - @param pnHandles the id's of the properties that changed. - @param pNewValues the new values of the properties. - @param pOldValues the old values of the properties. - @param nCount the number of elements in the arrays pnHandles, pNewValues and pOldValues. - @param bVetoable true means fire to VetoableChangeListener, false means fire to - XPropertyChangedListener and XMultiPropertyChangedListener. - */ - void SAL_CALL fire( - sal_Int32 * pnHandles, - const ::com::sun::star::uno::Any * pNewValues, - const ::com::sun::star::uno::Any * pOldValues, - sal_Int32 nCount, - sal_Bool bVetoable ); - - /** - Set multiple properties with the handles. - @param nSeqLen the length of the arrays pHandles and Values. - @param pHandles the handles of the properties. The number of elements - in the Values sequence is the length of the handle array. A value of -1 - of a handle means invalid property. These are ignored. - @param pValues the values of the properties. - @param nHitCount the number of valid entries in the handle array. - */ - void SAL_CALL setFastPropertyValues( - sal_Int32 nSeqLen, - sal_Int32 * pHandles, - const ::com::sun::star::uno::Any * pValues, - sal_Int32 nHitCount ) - SAL_THROW( (::com::sun::star::uno::Exception) ); - - /** - This abstract method must return the name to index table. This table contains all property - names and types of this object. The method is not implemented in this class. - */ - virtual IPropertyArrayHelper & SAL_CALL getInfoHelper() = 0; - - /** - Converted the value rValue and return the result in rConvertedValue and the - old value in rOldValue. A IllegalArgumentException is thrown. - The method is not implemented in this class. After this call the vetoable - listeners are notified. - - @param rConvertedValue the converted value. Only set if return is true. - @param rOldValue the old value. Only set if return is true. - @param nHandle the handle of the proberty. - @return true if the value converted. - */ - virtual sal_Bool SAL_CALL convertFastPropertyValue( - ::com::sun::star::uno::Any & rConvertedValue, - ::com::sun::star::uno::Any & rOldValue, - sal_Int32 nHandle, - const ::com::sun::star::uno::Any& rValue ) - throw (::com::sun::star::lang::IllegalArgumentException) = 0; - - /** The same as setFastProperyValue; nHandle is always valid. - The changes must not be broadcasted in this method. - The method is implemented in a derived class. - - @attention - Although you are permitted to throw any UNO exception, only the following - are valid for usage: - -- ::com::sun::star::beans::UnknownPropertyException - -- ::com::sun::star::beans::PropertyVetoException - -- ::com::sun::star::lang::IllegalArgumentException - -- ::com::sun::star::lang::WrappedTargetException - -- ::com::sun::star::uno::RuntimeException - - @param nHandle - handle - @param rValue - value - */ - virtual void SAL_CALL setFastPropertyValue_NoBroadcast( - sal_Int32 nHandle, - const ::com::sun::star::uno::Any& rValue ) - throw (::com::sun::star::uno::Exception) = 0; - /** - The same as getFastProperyValue, but return the value through rValue and nHandle - is always valid. - The method is not implemented in this class. - */ - virtual void SAL_CALL getFastPropertyValue( - ::com::sun::star::uno::Any& rValue, - sal_Int32 nHandle ) const = 0; - - /** sets an dependent property's value - - <p>Sometimes setting a given property needs to implicitly modify another property's value. Calling |setPropertyValue| - from within |setFastPropertyValue_NoBroadcast| is not an option here, as it would notify the property listeners - while our mutex is still locked. Setting the dependent property's value directly (e.g. by calling |setFastPropertyValue_NoBroadcast| - recursively) is not an option, too, since it would miss firing the property change event.</p> - - <p>So, in such cases, you use |setDependentFastPropertyValue| from within |setFastPropertyValue_NoBroadcast|. - It will convert and actually set the property value (invoking |convertFastPropertyValue| and |setFastPropertyValue_NoBroadcast| - for the given handle and value), and add the property change event to the list of events to be notified - when the bottom-most |setFastPropertyValue_NoBroadcast| on the stack returns.</p> - - <p><strong>Note</strong>: The method will <em>not</em> invoke veto listeners for the property.</p> - - <p><strong>Note</strong>: It's the caller's responsibility to ensure that our mutex is locked. This is - canonically given when the method is invoked from within |setFastPropertyValue_NoBroadcast|, in other - contexts, you might need to take own measures.</p> - */ - void setDependentFastPropertyValue( - sal_Int32 i_handle, - const ::com::sun::star::uno::Any& i_value - ); - - /** The common data of a broadcaster. Use the mutex, disposing state and the listener container. */ - OBroadcastHelper &rBHelper; - /** - Container for the XProperyChangedListener. The listeners are inserted by handle. - */ - OMultiTypeInterfaceContainerHelperInt32 aBoundLC; - /** - Container for the XPropertyVetoableListener. The listeners are inserted by handle. - */ - OMultiTypeInterfaceContainerHelperInt32 aVetoableLC; - - class Impl; - - /** reserved for future use. finally, the future has arrived... - */ - const std::auto_ptr<Impl> m_pReserved; - -private: - OPropertySetHelper( const OPropertySetHelper & ) SAL_THROW( () ); - OPropertySetHelper & operator = ( const OPropertySetHelper & ) SAL_THROW( () ); - - /** notifies the given changes in property's values, <em>plus</em> all property changes collected during recent - |setDependentFastPropertyValue| calls. - */ - void impl_fireAll( - sal_Int32* i_handles, - const ::com::sun::star::uno::Any * i_newValues, - const ::com::sun::star::uno::Any * i_oldValues, - sal_Int32 i_count - ); - -public: -// Suppress warning about virtual functions but non-virtual destructor: -#if defined __GNUC__ -#pragma GCC system_header -#elif defined _MSC_VER -#pragma warning(push) -#pragma warning(disable: 4265) -#endif - /** - You must call disposing before destruction. - */ - ~OPropertySetHelper() SAL_THROW( () ); -}; -#if defined _MSC_VER -#pragma warning(pop) -#endif - -} // end namespace cppuhelper -#endif // - - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/proptypehlp.h b/cppuhelper/inc/cppuhelper/proptypehlp.h deleted file mode 100644 index a7c121031..000000000 --- a/cppuhelper/inc/cppuhelper/proptypehlp.h +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_PROPTYPEHLP_H -#define _CPPUHELPER_PROPTYPEHLP_H - -#include <com/sun/star/lang/IllegalArgumentException.hpp> -#include <com/sun/star/uno/TypeClass.hpp> - - -namespace cppu { - -/** Converts the value stored in an any to a concrete C++ type. - The function does the same as the operator >>= () at the - Any class, except that it throws an IllegalArgumentException in case of - failures (the value cannot be extracted without data loss ) - - @exception com::sun::star::lang::IllegalArgumentException when the type could not be converted. - */ -template < class target > -inline void SAL_CALL convertPropertyValue( target &value , const ::com::sun::star::uno::Any & a); - -template < class target > -inline void SAL_CALL convertPropertyValue( target &value , ::com::sun::star::uno::Any & a); - -/** - conversion of basic types -*/ -inline void SAL_CALL convertPropertyValue( sal_Int64 & target , const ::com::sun::star::uno::Any & source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( sal_uInt64 & target, const ::com::sun::star::uno::Any & source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( sal_Int32 & target , const ::com::sun::star::uno::Any & source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( sal_uInt32 & target, const ::com::sun::star::uno::Any & source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( sal_Int16 & target , const ::com::sun::star::uno::Any & source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( sal_uInt16 & target, const ::com::sun::star::uno::Any & source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( sal_Int8 & target , const ::com::sun::star::uno::Any & source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( float & target , const ::com::sun::star::uno::Any & source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( double &target , const ::com::sun::star::uno::Any &source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); -inline void SAL_CALL convertPropertyValue( ::rtl::OUString &target , const ::com::sun::star::uno::Any &source ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ); - -} // end namespace cppu - - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/proptypehlp.hxx b/cppuhelper/inc/cppuhelper/proptypehlp.hxx deleted file mode 100644 index b7a14e8bc..000000000 --- a/cppuhelper/inc/cppuhelper/proptypehlp.hxx +++ /dev/null @@ -1,532 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_PROPTYPEHLP_HXX -#define _CPPUHELPER_PROPTYPEHLP_HXX - -#include <cppuhelper/proptypehlp.h> - -namespace cppu -{ - -/** Converts the value stored in an any to a concrete C++ type. - The function does the same as the operator >>= () at the - Any class, except that it throws an IllegalArgumentException in case of - failures (the value cannot be extracted without data loss ) - - @exception com::sun::star::lang::IllegalArgumentException when the type could not be converted. - */ -template < class target > -inline void SAL_CALL convertPropertyValue( target &value , const ::com::sun::star::uno::Any & a) -{ - - if( !( a >>= value ) ) { - throw ::com::sun::star::lang::IllegalArgumentException(); - } -} - - -// This template is needed at least for msci4 compiler -template < class target > -inline void SAL_CALL convertPropertyValue( target &value , ::com::sun::star::uno::Any & a) -{ - convertPropertyValue( value , (const ::com::sun::star::uno::Any & ) a ); -} - -/** - conversion of basic types -*/ -inline void SAL_CALL convertPropertyValue( sal_Bool & b , const ::com::sun::star::uno::Any & a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) -{ - const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); - - if( ::com::sun::star::uno::TypeClass_LONG == tc ) { - sal_Int32 i32 = 0; - a >>= i32; - b = ( sal_Bool )i32; - } - else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { - sal_Unicode c = *(sal_Unicode*) a.getValue(); - b = ( sal_Bool ) c; - } - else if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { - sal_Int16 i16 = 0; - a >>= i16; - b = ( sal_Bool ) i16; - } - else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - b = *((sal_Bool*)a.getValue()); - } - else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { - sal_Int8 i8 = 0; - a >>= i8; - b = ( sal_Bool ) i8; - } - else if ( ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT == tc ) { - sal_uInt16 i16 = 0; - a >>= i16; - b = ( sal_Bool ) i16; - } - else if ( ::com::sun::star::uno::TypeClass_UNSIGNED_LONG == tc ) { - sal_uInt32 i32 = 0; - a >>= i32; - b = ( sal_Bool ) i32; - } - else { - throw ::com::sun::star::lang::IllegalArgumentException(); - } -} - -inline void SAL_CALL convertPropertyValue( sal_Int64 & i , const ::com::sun::star::uno::Any & a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) -{ - const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); - - if( ::com::sun::star::uno::TypeClass_HYPER == tc ) { - a >>= i; - } - else if( ::com::sun::star::uno::TypeClass_UNSIGNED_HYPER == tc ) { - sal_uInt64 i64 = 0; - a >>= i64; - i = ( sal_Int64 ) i64; - } - else if( ::com::sun::star::uno::TypeClass_LONG == tc ) { - sal_Int32 i32 = 0; - a >>= i32; - i = ( sal_Int64 )i32; - } - else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { - sal_Unicode c; - c = *(sal_Unicode *)a.getValue(); - i = ( sal_Int64 ) c; - } - else if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { - sal_Int16 i16 = 0; - a >>= i16; - i = ( sal_Int64 ) i16; - } - else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; - b = *((sal_Bool * )a.getValue()); - i = ( sal_Int64 ) b; - } - else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { - sal_Int8 i8 = 0; - a >>= i8; - i = ( sal_Int64 ) i8; - } - else if ( ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT == tc ) { - sal_uInt16 i16 = 0; - a >>= i16; - i = ( sal_Int64 ) i16; - } - else if ( ::com::sun::star::uno::TypeClass_UNSIGNED_LONG == tc ) { - sal_uInt32 i32 = 0; - a >>= i32; - i = ( sal_Int64 ) i32; - } - else { - throw ::com::sun::star::lang::IllegalArgumentException(); - } -} - - -inline void SAL_CALL convertPropertyValue( sal_uInt64 & i , const ::com::sun::star::uno::Any & a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) -{ - const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); - - if( ::com::sun::star::uno::TypeClass_UNSIGNED_HYPER == tc ) { - a >>= i; - } - if( ::com::sun::star::uno::TypeClass_HYPER == tc ) { - sal_Int64 i64; - a >>= i64; - i = ( sal_uInt64 ) i64; - } - else if( ::com::sun::star::uno::TypeClass_LONG == tc ) { - sal_Int32 i32; - a >>= i32; - i = ( sal_uInt64 )i32; - } - else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { - sal_Unicode c; - c = *( sal_Unicode * ) a.getValue() ; - i = ( sal_uInt64 ) c; - } - else if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { - sal_Int16 i16; - a >>= i16; - i = ( sal_uInt64 ) i16; - } - else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; - b = *((sal_Bool * )a.getValue()); - i = ( sal_uInt64 ) b; - } - else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { - sal_Int8 i8; - a >>= i8; - i = ( sal_uInt64 ) i8; - } - else if ( ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT == tc ) { - sal_uInt16 i16; - a >>= i16; - i = ( sal_uInt64 ) i16; - } - else if ( ::com::sun::star::uno::TypeClass_UNSIGNED_LONG == tc ) { - sal_uInt32 i32; - a >>= i32; - i = ( sal_uInt64 ) i32; - } - else { - throw ::com::sun::star::lang::IllegalArgumentException(); - } -} - -// the basic types -// sal_Int32 -inline void SAL_CALL convertPropertyValue( sal_Int32 & i , const ::com::sun::star::uno::Any & a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) -{ - const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); - - if( ::com::sun::star::uno::TypeClass_LONG == tc ) { - a >>= i; - } - else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { - sal_Unicode c; - c = *(sal_Unicode*) a.getValue(); - i = ( sal_Int32 ) c; - } - else if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { - sal_Int16 i16 = 0; - a >>= i16; - i = ( sal_Int32 ) i16; - } - else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; - b = *((sal_Bool * )a.getValue()); - i = ( sal_Int32 ) b; - } - else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { - sal_Int8 i8 = 0; - a >>= i8; - i = ( sal_Int32 ) i8; - } - else if ( ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT == tc ) { - sal_uInt16 i16 = 0; - a >>= i16; - i = ( sal_Int32 ) i16; - } - else if ( ::com::sun::star::uno::TypeClass_UNSIGNED_LONG == tc ) { - sal_uInt32 i32 = 0; - a >>= i32; - i = ( sal_Int32 ) i32; - } - else { - throw ::com::sun::star::lang::IllegalArgumentException(); - } -} - -inline void SAL_CALL convertPropertyValue( sal_uInt32 & i , const ::com::sun::star::uno::Any & a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) -{ - const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); - - if ( ::com::sun::star::uno::TypeClass_UNSIGNED_LONG == tc ) { - a >>= i; - } - else if( ::com::sun::star::uno::TypeClass_LONG == tc ) { - sal_Int32 i32; - a >>= i32; - i = (sal_uInt32 ) i32; - } - else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { - sal_Unicode c; - c = *(sal_Unicode*) a.getValue(); - i = ( sal_uInt32 ) c; - } - else if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { - sal_Int16 i16; - a >>= i16; - i = ( sal_uInt32 ) i16; - } - else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; - b = *((sal_Bool * )a.getValue()); - i = ( sal_uInt32 ) b; - } - else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { - sal_Int8 i8; - a >>= i8; - i = ( sal_uInt32 ) i8; - } - else if ( ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT == tc ) { - sal_uInt16 i16; - a >>= i16; - i = ( sal_uInt32 ) i16; - } - else { - throw ::com::sun::star::lang::IllegalArgumentException(); - } -} - - -inline void SAL_CALL convertPropertyValue( sal_Int16 & i , const ::com::sun::star::uno::Any & a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) -{ - const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); - - if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { - a >>= i; - } - else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { - sal_Unicode c; - c = *(sal_Unicode*) a.getValue(); - i = ( sal_Int16 ) c; - } - else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; - b = *((sal_Bool * )a.getValue()); - i = ( sal_Int16 ) b; - } - else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { - sal_Int8 i8 = 0; - a >>= i8; - i = ( sal_Int16 ) i8; - } - else if ( ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT == tc ) { - sal_uInt16 i16 = 0; - a >>= i16; - i = ( sal_Int16 ) i16; - } - else { - throw ::com::sun::star::lang::IllegalArgumentException(); - } -} - -inline void SAL_CALL convertPropertyValue( sal_uInt16 & i , const ::com::sun::star::uno::Any & a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) -{ - const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); - - if ( ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT == tc ) { - a >>= i; - } - else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { - sal_Unicode c; - c = *(sal_Unicode *) a.getValue(); - i = ( sal_Int16 ) c; - } - else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; - b = *((sal_Bool * )a.getValue()); - i = ( sal_Int16 ) b; - } - else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { - sal_Int8 i8 = 0; - a >>= i8; - i = ( sal_Int16 ) i8; - } - else if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { - sal_Int16 i16 = 0; - a >>= i16; - i = ( sal_Int16 ) i16; - } - else { - throw ::com::sun::star::lang::IllegalArgumentException(); - } -} - -inline void SAL_CALL convertPropertyValue( sal_Int8 & i , const ::com::sun::star::uno::Any & a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) -{ - const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); - - if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { - a >>= i; - } - else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; - b = *((sal_Bool * )a.getValue()); - i = ( sal_Int8 ) b; - } - else { - throw ::com::sun::star::lang::IllegalArgumentException(); - } -} - -inline void SAL_CALL convertPropertyValue( float &f , const ::com::sun::star::uno::Any &a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) -{ - const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); - - if ( ::com::sun::star::uno::TypeClass_FLOAT == tc ) { - a >>= f; - } - else if( ::com::sun::star::uno::TypeClass_DOUBLE == tc ) { - double d = 0; - a >>= d; - f = ( float ) d; - } - else if( ::com::sun::star::uno::TypeClass_HYPER == tc ) { - sal_Int64 i64 = 0; - a >>= i64; - f = ( float ) i64; - } - // msci 4 does not support this conversion -/* else if( ::com::sun::star::uno::TypeClass_UNSIGNED_HYPER == tc ) { - sal_uInt64 i64; - a >>= i64; - f = ( float ) i64; - } -*/ else if( ::com::sun::star::uno::TypeClass_LONG == tc ) { - sal_Int32 i32 = 0; - a >>= i32; - f = ( float )i32; - } - else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { - sal_Unicode c; - c = *(sal_Unicode*) a.getValue(); - f = ( float ) c; - } - else if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { - sal_Int16 i16 = 0; - a >>= i16; - f = ( float ) i16; - } - else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; - b = *((sal_Bool * )a.getValue()); - f = ( float ) b; - } - else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { - sal_Int8 i8 = 0; - a >>= i8; - f = ( float ) i8; - } - else if ( ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT == tc ) { - sal_uInt16 i16 = 0; - a >>= i16; - f = ( float ) i16; - } - else if ( ::com::sun::star::uno::TypeClass_UNSIGNED_LONG == tc ) { - sal_uInt32 i32 = 0; - a >>= i32; - f = ( float ) i32; - } - else { - throw ::com::sun::star::lang::IllegalArgumentException(); - } -} - - -inline void SAL_CALL convertPropertyValue( double &d , const ::com::sun::star::uno::Any &a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) -{ - const enum ::com::sun::star::uno::TypeClass tc = a.getValueType().getTypeClass(); - - if( ::com::sun::star::uno::TypeClass_DOUBLE == tc ) { - float f; - a >>= f; - d = ( double ) f; - } - else if ( ::com::sun::star::uno::TypeClass_FLOAT == tc ) { - float f; - a >>= f; - d = (double) f; - } - else if( ::com::sun::star::uno::TypeClass_HYPER == tc ) { - sal_Int64 i64; - a >>= i64; - d = (double) i64; - } - // msci 4 does not support this -/* else if( ::com::sun::star::uno::TypeClass_UNSIGNED_HYPER == tc ) { - sal_uInt64 i64; - a >>= i64; - d = (double) i64; - } -*/ else if( ::com::sun::star::uno::TypeClass_LONG == tc ) { - sal_Int32 i32; - a >>= i32; - d = (double)i32; - } - else if ( ::com::sun::star::uno::TypeClass_CHAR == tc ) { - sal_Unicode c; - c = *(sal_Unicode*) a.getValue(); - d = (double) c; - } - else if ( ::com::sun::star::uno::TypeClass_SHORT == tc ) { - sal_Int16 i16; - a >>= i16; - d = (double) i16; - } - else if ( ::com::sun::star::uno::TypeClass_BOOLEAN == tc ) { - sal_Bool b; - b = *((sal_Bool * )a.getValue()); - d = (double) b; - } - else if ( ::com::sun::star::uno::TypeClass_BYTE == tc ) { - sal_Int8 i8; - a >>= i8; - d = (double) i8; - } - else if ( ::com::sun::star::uno::TypeClass_UNSIGNED_SHORT == tc ) { - sal_uInt16 i16; - a >>= i16; - d = (double) i16; - } - else if ( ::com::sun::star::uno::TypeClass_UNSIGNED_LONG == tc ) { - sal_uInt32 i32; - a >>= i32; - d = (double) i32; - } - else { - throw ::com::sun::star::lang::IllegalArgumentException(); - } -} - -inline void SAL_CALL convertPropertyValue( ::rtl::OUString &ow , const ::com::sun::star::uno::Any &a ) - SAL_THROW( (::com::sun::star::lang::IllegalArgumentException) ) -{ - if( ::com::sun::star::uno::TypeClass_STRING == a.getValueType().getTypeClass() ) { - a >>= ow; - } - else { - throw ::com::sun::star::lang::IllegalArgumentException(); - } -} - -} // end namespace cppu - -#endif - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/queryinterface.hxx b/cppuhelper/inc/cppuhelper/queryinterface.hxx deleted file mode 100644 index 4efc77ae8..000000000 --- a/cppuhelper/inc/cppuhelper/queryinterface.hxx +++ /dev/null @@ -1,543 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _CPPUHELPER_QUERYINTERFACE_HXX_ -#define _CPPUHELPER_QUERYINTERFACE_HXX_ - -#include "sal/config.h" -#include "com/sun/star/uno/Any.hxx" -#include "com/sun/star/uno/Type.hxx" -#include "sal/types.h" - -namespace cppu -{ - -/** Compares demanded type to given template argument types. - - @tplparam Interface1 interface type - @param rType demanded type - @param p1 interface pointer - @return acquired interface of demanded type or empty Any -*/ -template< class Interface1 > -inline ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type & rType, - Interface1 * p1 ) - SAL_THROW( () ) -{ - if (rType == Interface1::static_type()) - return ::com::sun::star::uno::Any( &p1, rType ); - else - return ::com::sun::star::uno::Any(); -} -/** Compares demanded type to given template argument types. - - @tplparam Interface1 interface type - @tplparam Interface2 interface type - @param rType demanded type - @param p1 interface pointer - @param p2 interface pointer - @return acquired interface of demanded type or empty Any -*/ -template< class Interface1, class Interface2 > -inline ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type & rType, - Interface1 * p1, Interface2 * p2 ) - SAL_THROW( () ) -{ - if (rType == Interface1::static_type()) - return ::com::sun::star::uno::Any( &p1, rType ); - else if (rType == Interface2::static_type()) - return ::com::sun::star::uno::Any( &p2, rType ); - else - return ::com::sun::star::uno::Any(); -} -/** Compares demanded type to given template argument types. - - @tplparam Interface1 interface type - @tplparam Interface2 interface type - @tplparam Interface3 interface type - @param rType demanded type - @param p1 interface pointer - @param p2 interface pointer - @param p3 interface pointer - @return acquired interface of demanded type or empty Any -*/ -template< class Interface1, class Interface2, class Interface3 > -inline ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type & rType, - Interface1 * p1, Interface2 * p2, Interface3 * p3 ) - SAL_THROW( () ) -{ - if (rType == Interface1::static_type()) - return ::com::sun::star::uno::Any( &p1, rType ); - else if (rType == Interface2::static_type()) - return ::com::sun::star::uno::Any( &p2, rType ); - else if (rType == Interface3::static_type()) - return ::com::sun::star::uno::Any( &p3, rType ); - else - return ::com::sun::star::uno::Any(); -} -/** Compares demanded type to given template argument types. - - @tplparam Interface1 interface type - @tplparam Interface2 interface type - @tplparam Interface3 interface type - @tplparam Interface4 interface type - @param rType demanded type - @param p1 interface pointer - @param p2 interface pointer - @param p3 interface pointer - @param p4 interface pointer - @return acquired interface of demanded type or empty Any -*/ -template< class Interface1, class Interface2, class Interface3, class Interface4 > -inline ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type & rType, - Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4 ) - SAL_THROW( () ) -{ - if (rType == Interface1::static_type()) - return ::com::sun::star::uno::Any( &p1, rType ); - else if (rType == Interface2::static_type()) - return ::com::sun::star::uno::Any( &p2, rType ); - else if (rType == Interface3::static_type()) - return ::com::sun::star::uno::Any( &p3, rType ); - else if (rType == Interface4::static_type()) - return ::com::sun::star::uno::Any( &p4, rType ); - else - return ::com::sun::star::uno::Any(); -} -/** Compares demanded type to given template argument types. - - @tplparam Interface1 interface type - @tplparam Interface2 interface type - @tplparam Interface3 interface type - @tplparam Interface4 interface type - @tplparam Interface5 interface type - @param rType demanded type - @param p1 interface pointer - @param p2 interface pointer - @param p3 interface pointer - @param p4 interface pointer - @param p5 interface pointer - @return acquired interface of demanded type or empty Any -*/ -template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5 > -inline ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type & rType, - Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5 ) - SAL_THROW( () ) -{ - if (rType == Interface1::static_type()) - return ::com::sun::star::uno::Any( &p1, rType ); - else if (rType == Interface2::static_type()) - return ::com::sun::star::uno::Any( &p2, rType ); - else if (rType == Interface3::static_type()) - return ::com::sun::star::uno::Any( &p3, rType ); - else if (rType == Interface4::static_type()) - return ::com::sun::star::uno::Any( &p4, rType ); - else if (rType == Interface5::static_type()) - return ::com::sun::star::uno::Any( &p5, rType ); - else - return ::com::sun::star::uno::Any(); -} -/** Compares demanded type to given template argument types. - - @tplparam Interface1 interface type - @tplparam Interface2 interface type - @tplparam Interface3 interface type - @tplparam Interface4 interface type - @tplparam Interface5 interface type - @tplparam Interface6 interface type - @param rType demanded type - @param p1 interface pointer - @param p2 interface pointer - @param p3 interface pointer - @param p4 interface pointer - @param p5 interface pointer - @param p6 interface pointer - @return acquired interface of demanded type or empty Any -*/ -template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5, - class Interface6 > -inline ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type & rType, - Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, - Interface6 * p6 ) - SAL_THROW( () ) -{ - if (rType == Interface1::static_type()) - return ::com::sun::star::uno::Any( &p1, rType ); - else if (rType == Interface2::static_type()) - return ::com::sun::star::uno::Any( &p2, rType ); - else if (rType == Interface3::static_type()) - return ::com::sun::star::uno::Any( &p3, rType ); - else if (rType == Interface4::static_type()) - return ::com::sun::star::uno::Any( &p4, rType ); - else if (rType == Interface5::static_type()) - return ::com::sun::star::uno::Any( &p5, rType ); - else if (rType == Interface6::static_type()) - return ::com::sun::star::uno::Any( &p6, rType ); - else - return ::com::sun::star::uno::Any(); -} -/** Compares demanded type to given template argument types. - - @tplparam Interface1 interface type - @tplparam Interface2 interface type - @tplparam Interface3 interface type - @tplparam Interface4 interface type - @tplparam Interface5 interface type - @tplparam Interface6 interface type - @tplparam Interface7 interface type - @param rType demanded type - @param p1 interface pointer - @param p2 interface pointer - @param p3 interface pointer - @param p4 interface pointer - @param p5 interface pointer - @param p6 interface pointer - @param p7 interface pointer - @return acquired interface of demanded type or empty Any -*/ -template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5, - class Interface6, class Interface7 > -inline ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type & rType, - Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, - Interface6 * p6, Interface7 * p7 ) - SAL_THROW( () ) -{ - if (rType == Interface1::static_type()) - return ::com::sun::star::uno::Any( &p1, rType ); - else if (rType == Interface2::static_type()) - return ::com::sun::star::uno::Any( &p2, rType ); - else if (rType == Interface3::static_type()) - return ::com::sun::star::uno::Any( &p3, rType ); - else if (rType == Interface4::static_type()) - return ::com::sun::star::uno::Any( &p4, rType ); - else if (rType == Interface5::static_type()) - return ::com::sun::star::uno::Any( &p5, rType ); - else if (rType == Interface6::static_type()) - return ::com::sun::star::uno::Any( &p6, rType ); - else if (rType == Interface7::static_type()) - return ::com::sun::star::uno::Any( &p7, rType ); - else - return ::com::sun::star::uno::Any(); -} -/** Compares demanded type to given template argument types. - - @tplparam Interface1 interface type - @tplparam Interface2 interface type - @tplparam Interface3 interface type - @tplparam Interface4 interface type - @tplparam Interface5 interface type - @tplparam Interface6 interface type - @tplparam Interface7 interface type - @tplparam Interface8 interface type - @param rType demanded type - @param p1 interface pointer - @param p2 interface pointer - @param p3 interface pointer - @param p4 interface pointer - @param p5 interface pointer - @param p6 interface pointer - @param p7 interface pointer - @param p8 interface pointer - @return acquired interface of demanded type or empty Any -*/ -template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5, - class Interface6, class Interface7, class Interface8 > -inline ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type & rType, - Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, - Interface6 * p6, Interface7 * p7, Interface8 * p8 ) - SAL_THROW( () ) -{ - if (rType == Interface1::static_type()) - return ::com::sun::star::uno::Any( &p1, rType ); - else if (rType == Interface2::static_type()) - return ::com::sun::star::uno::Any( &p2, rType ); - else if (rType == Interface3::static_type()) - return ::com::sun::star::uno::Any( &p3, rType ); - else if (rType == Interface4::static_type()) - return ::com::sun::star::uno::Any( &p4, rType ); - else if (rType == Interface5::static_type()) - return ::com::sun::star::uno::Any( &p5, rType ); - else if (rType == Interface6::static_type()) - return ::com::sun::star::uno::Any( &p6, rType ); - else if (rType == Interface7::static_type()) - return ::com::sun::star::uno::Any( &p7, rType ); - else if (rType == Interface8::static_type()) - return ::com::sun::star::uno::Any( &p8, rType ); - else - return ::com::sun::star::uno::Any(); -} -/** Compares demanded type to given template argument types. - - @tplparam Interface1 interface type - @tplparam Interface2 interface type - @tplparam Interface3 interface type - @tplparam Interface4 interface type - @tplparam Interface5 interface type - @tplparam Interface6 interface type - @tplparam Interface7 interface type - @tplparam Interface8 interface type - @tplparam Interface9 interface type - @param rType demanded type - @param p1 interface pointer - @param p2 interface pointer - @param p3 interface pointer - @param p4 interface pointer - @param p5 interface pointer - @param p6 interface pointer - @param p7 interface pointer - @param p8 interface pointer - @param p9 interface pointer - @return acquired interface of demanded type or empty Any -*/ -template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5, - class Interface6, class Interface7, class Interface8, class Interface9 > -inline ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type & rType, - Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, - Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9 ) - SAL_THROW( () ) -{ - if (rType == Interface1::static_type()) - return ::com::sun::star::uno::Any( &p1, rType ); - else if (rType == Interface2::static_type()) - return ::com::sun::star::uno::Any( &p2, rType ); - else if (rType == Interface3::static_type()) - return ::com::sun::star::uno::Any( &p3, rType ); - else if (rType == Interface4::static_type()) - return ::com::sun::star::uno::Any( &p4, rType ); - else if (rType == Interface5::static_type()) - return ::com::sun::star::uno::Any( &p5, rType ); - else if (rType == Interface6::static_type()) - return ::com::sun::star::uno::Any( &p6, rType ); - else if (rType == Interface7::static_type()) - return ::com::sun::star::uno::Any( &p7, rType ); - else if (rType == Interface8::static_type()) - return ::com::sun::star::uno::Any( &p8, rType ); - else if (rType == Interface9::static_type()) - return ::com::sun::star::uno::Any( &p9, rType ); - else - return ::com::sun::star::uno::Any(); -} -/** Compares demanded type to given template argument types. - - @tplparam Interface1 interface type - @tplparam Interface2 interface type - @tplparam Interface3 interface type - @tplparam Interface4 interface type - @tplparam Interface5 interface type - @tplparam Interface6 interface type - @tplparam Interface7 interface type - @tplparam Interface8 interface type - @tplparam Interface9 interface type - @tplparam Interface10 interface type - @param rType demanded type - @param p1 interface pointer - @param p2 interface pointer - @param p3 interface pointer - @param p4 interface pointer - @param p5 interface pointer - @param p6 interface pointer - @param p7 interface pointer - @param p8 interface pointer - @param p9 interface pointer - @param p10 interface pointer - @return acquired interface of demanded type or empty Any -*/ -template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5, - class Interface6, class Interface7, class Interface8, class Interface9, class Interface10 > -inline ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type & rType, - Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, - Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10 ) - SAL_THROW( () ) -{ - if (rType == Interface1::static_type()) - return ::com::sun::star::uno::Any( &p1, rType ); - else if (rType == Interface2::static_type()) - return ::com::sun::star::uno::Any( &p2, rType ); - else if (rType == Interface3::static_type()) - return ::com::sun::star::uno::Any( &p3, rType ); - else if (rType == Interface4::static_type()) - return ::com::sun::star::uno::Any( &p4, rType ); - else if (rType == Interface5::static_type()) - return ::com::sun::star::uno::Any( &p5, rType ); - else if (rType == Interface6::static_type()) - return ::com::sun::star::uno::Any( &p6, rType ); - else if (rType == Interface7::static_type()) - return ::com::sun::star::uno::Any( &p7, rType ); - else if (rType == Interface8::static_type()) - return ::com::sun::star::uno::Any( &p8, rType ); - else if (rType == Interface9::static_type()) - return ::com::sun::star::uno::Any( &p9, rType ); - else if (rType == Interface10::static_type()) - return ::com::sun::star::uno::Any( &p10, rType ); - else - return ::com::sun::star::uno::Any(); -} -/** Compares demanded type to given template argument types. - - @tplparam Interface1 interface type - @tplparam Interface2 interface type - @tplparam Interface3 interface type - @tplparam Interface4 interface type - @tplparam Interface5 interface type - @tplparam Interface6 interface type - @tplparam Interface7 interface type - @tplparam Interface8 interface type - @tplparam Interface9 interface type - @tplparam Interface10 interface type - @tplparam Interface11 interface type - @param rType demanded type - @param p1 interface pointer - @param p2 interface pointer - @param p3 interface pointer - @param p4 interface pointer - @param p5 interface pointer - @param p6 interface pointer - @param p7 interface pointer - @param p8 interface pointer - @param p9 interface pointer - @param p10 interface pointer - @param p11 interface pointer - @return acquired interface of demanded type or empty Any -*/ -template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5, - class Interface6, class Interface7, class Interface8, class Interface9, class Interface10, - class Interface11 > -inline ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type & rType, - Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, - Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10, - Interface11 * p11 ) - SAL_THROW( () ) -{ - if (rType == Interface1::static_type()) - return ::com::sun::star::uno::Any( &p1, rType ); - else if (rType == Interface2::static_type()) - return ::com::sun::star::uno::Any( &p2, rType ); - else if (rType == Interface3::static_type()) - return ::com::sun::star::uno::Any( &p3, rType ); - else if (rType == Interface4::static_type()) - return ::com::sun::star::uno::Any( &p4, rType ); - else if (rType == Interface5::static_type()) - return ::com::sun::star::uno::Any( &p5, rType ); - else if (rType == Interface6::static_type()) - return ::com::sun::star::uno::Any( &p6, rType ); - else if (rType == Interface7::static_type()) - return ::com::sun::star::uno::Any( &p7, rType ); - else if (rType == Interface8::static_type()) - return ::com::sun::star::uno::Any( &p8, rType ); - else if (rType == Interface9::static_type()) - return ::com::sun::star::uno::Any( &p9, rType ); - else if (rType == Interface10::static_type()) - return ::com::sun::star::uno::Any( &p10, rType ); - else if (rType == Interface11::static_type()) - return ::com::sun::star::uno::Any( &p11, rType ); - else - return ::com::sun::star::uno::Any(); -} -/** Compares demanded type to given template argument types. - - @tplparam Interface1 interface type - @tplparam Interface2 interface type - @tplparam Interface3 interface type - @tplparam Interface4 interface type - @tplparam Interface5 interface type - @tplparam Interface6 interface type - @tplparam Interface7 interface type - @tplparam Interface8 interface type - @tplparam Interface9 interface type - @tplparam Interface10 interface type - @tplparam Interface11 interface type - @tplparam Interface12 interface type - @param rType demanded type - @param p1 interface pointer - @param p2 interface pointer - @param p3 interface pointer - @param p4 interface pointer - @param p5 interface pointer - @param p6 interface pointer - @param p7 interface pointer - @param p8 interface pointer - @param p9 interface pointer - @param p10 interface pointer - @param p11 interface pointer - @param p12 interface pointer - @return acquired interface of demanded type or empty Any -*/ -template< class Interface1, class Interface2, class Interface3, class Interface4, class Interface5, - class Interface6, class Interface7, class Interface8, class Interface9, class Interface10, - class Interface11, class Interface12 > -inline ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type & rType, - Interface1 * p1, Interface2 * p2, Interface3 * p3, Interface4 * p4, Interface5 * p5, - Interface6 * p6, Interface7 * p7, Interface8 * p8, Interface9 * p9, Interface10 * p10, - Interface11 * p11, Interface12 * p12 ) - SAL_THROW( () ) -{ - if (rType == Interface1::static_type()) - return ::com::sun::star::uno::Any( &p1, rType ); - else if (rType == Interface2::static_type()) - return ::com::sun::star::uno::Any( &p2, rType ); - else if (rType == Interface3::static_type()) - return ::com::sun::star::uno::Any( &p3, rType ); - else if (rType == Interface4::static_type()) - return ::com::sun::star::uno::Any( &p4, rType ); - else if (rType == Interface5::static_type()) - return ::com::sun::star::uno::Any( &p5, rType ); - else if (rType == Interface6::static_type()) - return ::com::sun::star::uno::Any( &p6, rType ); - else if (rType == Interface7::static_type()) - return ::com::sun::star::uno::Any( &p7, rType ); - else if (rType == Interface8::static_type()) - return ::com::sun::star::uno::Any( &p8, rType ); - else if (rType == Interface9::static_type()) - return ::com::sun::star::uno::Any( &p9, rType ); - else if (rType == Interface10::static_type()) - return ::com::sun::star::uno::Any( &p10, rType ); - else if (rType == Interface11::static_type()) - return ::com::sun::star::uno::Any( &p11, rType ); - else if (rType == Interface12::static_type()) - return ::com::sun::star::uno::Any( &p12, rType ); - else - return ::com::sun::star::uno::Any(); -} - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/servicefactory.hxx b/cppuhelper/inc/cppuhelper/servicefactory.hxx deleted file mode 100644 index bdf9f9e6b..000000000 --- a/cppuhelper/inc/cppuhelper/servicefactory.hxx +++ /dev/null @@ -1,124 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_SERVICEFACTORY_HXX_ -#define _CPPUHELPER_SERVICEFACTORY_HXX_ - -#include <rtl/ustring.hxx> - -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/lang/XMultiComponentFactory.hpp> - - -namespace cppu -{ - -/** Deprecated. Use cppuhelper/bootstrap.hxx functions instead. - - This bootstraps an initial service factory working on a registry. If the first or both - parameters contain a value then the service factory is initialized with a simple registry - or a nested registry. Otherwise the service factory must be initialized later with a valid - registry. - - @param rWriteRegistryFile - file name of the simple registry or the first registry file of - the nested registry which will be opened with read/write rights. This - file will be created if necessary. - @param rReadRegistryFile - file name of the second registry file of the nested registry - which will be opened with readonly rights. - @param bReadOnly - flag which specify that the first registry file will be opened with - readonly rights. Default is FALSE. If this flag is used the registry - will not be created if not exist. - @param rBootstrapPath - specifies a path where the bootstrap components could be find. If this - parameter is an empty string the compoents will be searched in the system - path. - @deprecated -*/ -::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SAL_CALL -createRegistryServiceFactory( - const ::rtl::OUString & rWriteRegistryFile, - const ::rtl::OUString & rReadRegistryFile, - sal_Bool bReadOnly = sal_False, - const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() ) - SAL_THROW( (::com::sun::star::uno::Exception) ); - - -/** Deprecated. Use cppuhelper/bootstrap.hxx functions instead. - - This bootstraps an initial service factory working on a registry file. - - @param rRegistryFile - file name of the registry to use/ create; if this is an empty - string, the default registry is used instead - @param bReadOnly - flag which specify that the registry file will be opened with - readonly rights. Default is FALSE. If this flag is used the registry - will not be created if not exist. - @param rBootstrapPath - specifies a path where the bootstrap components could be find. If this - parameter is an empty string the compoents will be searched in the system - path. - @deprecated -*/ -inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SAL_CALL -createRegistryServiceFactory( - const ::rtl::OUString & rRegistryFile, - sal_Bool bReadOnly = sal_False, - const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() ) - SAL_THROW( (::com::sun::star::uno::Exception) ) -{ - return ::cppu::createRegistryServiceFactory( - rRegistryFile, ::rtl::OUString(), bReadOnly, rBootstrapPath ); -} - -/** Deprecated. Use cppuhelper/bootstrap.hxx functions instead. - - This bootstraps a service factory without initialize a registry. - - @param rBootstrapPath - specifies a path where the bootstrap components could be find. If this - parameter is an empty string the compoents will be searched in the system - path. - @deprecated -*/ -inline ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > SAL_CALL -createServiceFactory( - const ::rtl::OUString & rBootstrapPath = ::rtl::OUString() ) - SAL_THROW( (::com::sun::star::uno::Exception) ) -{ - return ::cppu::createRegistryServiceFactory( - ::rtl::OUString(), ::rtl::OUString(), sal_False, rBootstrapPath ); -} - -} // end namespace cppu - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/shlib.hxx b/cppuhelper/inc/cppuhelper/shlib.hxx deleted file mode 100644 index ebbc1e1d9..000000000 --- a/cppuhelper/inc/cppuhelper/shlib.hxx +++ /dev/null @@ -1,113 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_SHLIB_HXX_ -#define _CPPUHELPER_SHLIB_HXX_ - -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/registry/XRegistryKey.hpp> -#include <com/sun/star/loader/CannotActivateFactoryException.hpp> -#include <com/sun/star/registry/CannotRegisterImplementationException.hpp> - - -namespace cppu -{ - -/** Loads a shared library component and gets the factory out of it. You can give either a - fully qualified libname or single lib name. The libname need not be pre/postfixed - (e.g. xxx.dll). You can give parameter rPath to force lookup of the library in a specific - directory. The resulting path of the library will be checked against environment variable - CPLD_ACCESSPATH if set. - - @param rLibName name of the library - @param rPath optional path - @param rImplName implementation to be retrieved from the library - @param xMgr service manager to be provided to the component - @param xKey registry key to be provided to the component - @return - factory instance (::com::sun::star::lang::XSingleComponentFactory or - ::com::sun::star::lang::XSingleComponentFactory) -*/ -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > -SAL_CALL loadSharedLibComponentFactory( - ::rtl::OUString const & rLibName, ::rtl::OUString const & rPath, - ::rtl::OUString const & rImplName, - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & xMgr, - ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > const & xKey ) - SAL_THROW( (::com::sun::star::loader::CannotActivateFactoryException) ); - -/** Loads a shared library component and gets the factory out of it. You can give either a - fully qualified libname or single lib name. The libname need not be pre/postfixed - (e.g. xxx.dll). You can give parameter rPath to force lookup of the library in a specific - directory. The resulting path of the library will be checked against environment variable - CPLD_ACCESSPATH if set. An optional 'prefix' parameter is used to determine the symbol - name of the entry point in the library. - - @param rLibName name of the library - @param rPath optional path - @param rImplName implementation to be retrieved from the library - @param xMgr service manager to be provided to the component - @param xKey registry key to be provided to the component - @param rPrefix optional component prefix - @return - factory instance (::com::sun::star::lang::XSingleComponentFactory or - ::com::sun::star::lang::XSingleComponentFactory) -*/ -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > -SAL_CALL loadSharedLibComponentFactory( - ::rtl::OUString const & rLibName, ::rtl::OUString const & rPath, - ::rtl::OUString const & rImplName, - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & xMgr, - ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > const & xKey, - ::rtl::OUString const & rPrefix ) - SAL_THROW( (::com::sun::star::loader::CannotActivateFactoryException) ); - -/** Invokes component_writeInfo() function of specified component library. You can give either - a fully qualified libname or single lib name. The libname need not be pre/postfixed - (e.g. xxx.dll). You can give parameter rPath to force lookup of the library in a specific - directory. The resulting path of the library will be checked against environment variable - CPLD_ACCESSPATH if set. - - @obsolete component_writeInfo should no longer be used in new components - - @param rLibName name of the library - @param rPath optional path - @param xMgr service manager to be provided to the component - @param xKey registry key to be provided to the component -*/ -void -SAL_CALL writeSharedLibComponentInfo( - ::rtl::OUString const & rLibName, ::rtl::OUString const & rPath, - ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > const & xMgr, - ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > const & xKey ) - SAL_THROW( (::com::sun::star::registry::CannotRegisterImplementationException) ); - -} // end namespace cppu - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/stdidlclass.hxx b/cppuhelper/inc/cppuhelper/stdidlclass.hxx deleted file mode 100644 index 576378b10..000000000 --- a/cppuhelper/inc/cppuhelper/stdidlclass.hxx +++ /dev/null @@ -1,392 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_STDIDLCLASS_HXX_ -#define _CPPUHELPER_STDIDLCLASS_HXX_ - -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/reflection/XIdlClass.hpp> - - -namespace cppu { - -/* - @deprecated -*/ -::com::sun::star::reflection::XIdlClass * SAL_CALL createStandardClassWithSequence( - const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > &rSMgr , - const ::rtl::OUString & sImplementationName , - const ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > & rSuperClass, - const ::com::sun::star::uno::Sequence < ::rtl::OUString > &seq ) - SAL_THROW( () ); - - - -/** - Standard function to create an XIdlClass for a component. - There is a function for each number of supported interfaces up to 10. - - Since the switch to the final component model, there are no use cases anymore where - these functions should be used. Instead use the implementation helpers directly - (see cppuhelper/implbase1.hxx). - - @see OTypeCollection - - @deprecated - */ -template < class Interface1 > -inline ::com::sun::star::reflection::XIdlClass * SAL_CALL -//inline ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > -createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > &rSMgr, - const ::rtl::OUString &sImplementationName , - const ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > &rSuperClass , - const Interface1 * - ) - SAL_THROW( () ) -{ - ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(1); - seqInterface.getArray()[0] = Interface1::static_type().getTypeName(); - return createStandardClassWithSequence( - rSMgr, - sImplementationName, - rSuperClass, - seqInterface - ); -} - - - -template < class Interface1, class Interface2 > -inline ::com::sun::star::reflection::XIdlClass * SAL_CALL -//inline ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > -createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > &rSMgr, - const ::rtl::OUString &sImplementationName , - const ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > &rSuperClass , - const Interface1 *, - const Interface2 * - ) - SAL_THROW( () ) -{ - ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(2); - seqInterface.getArray()[0] = Interface1::static_type().getTypeName(); - seqInterface.getArray()[1] = Interface2::static_type().getTypeName(); - return createStandardClassWithSequence( - rSMgr, - sImplementationName, - rSuperClass, - seqInterface - ); -} - - - - - -template < class Interface1, class Interface2 , class Interface3 > -inline ::com::sun::star::reflection::XIdlClass * SAL_CALL -//inline ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > -createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > &rSMgr, - const ::rtl::OUString &sImplementationName , - const ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > &rSuperClass , - const Interface1 *, - const Interface2 *, - const Interface3 * - ) - SAL_THROW( () ) -{ - ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(3); - seqInterface.getArray()[0] = Interface1::static_type().getTypeName(); - seqInterface.getArray()[1] = Interface2::static_type().getTypeName(); - seqInterface.getArray()[2] = Interface3::static_type().getTypeName(); - return createStandardClassWithSequence( - rSMgr, - sImplementationName, - rSuperClass, - seqInterface - ); -} - - - - - -template < class Interface1, class Interface2 , class Interface3 , class Interface4 > -inline ::com::sun::star::reflection::XIdlClass * SAL_CALL -//inline ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > -createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > &rSMgr, - const ::rtl::OUString &sImplementationName , - const ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > &rSuperClass , - const Interface1 *, - const Interface2 *, - const Interface3 *, - const Interface4 * - ) - SAL_THROW( () ) -{ - ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(4); - seqInterface.getArray()[0] = Interface1::static_type().getTypeName(); - seqInterface.getArray()[1] = Interface2::static_type().getTypeName(); - seqInterface.getArray()[2] = Interface3::static_type().getTypeName(); - seqInterface.getArray()[3] = Interface4::static_type().getTypeName(); - return createStandardClassWithSequence( - rSMgr, - sImplementationName, - rSuperClass, - seqInterface - ); -} - - - - - - - -template < class Interface1, class Interface2 , class Interface3 , class Interface4 , class Interface5 > -inline ::com::sun::star::reflection::XIdlClass * SAL_CALL -//inline ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > -createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > &rSMgr, - const ::rtl::OUString &sImplementationName , - const ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > &rSuperClass , - const Interface1 *, - const Interface2 *, - const Interface3 *, - const Interface4 *, - const Interface5 * - ) - SAL_THROW( () ) -{ - ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(5); - seqInterface.getArray()[0] = Interface1::static_type().getTypeName(); - seqInterface.getArray()[1] = Interface2::static_type().getTypeName(); - seqInterface.getArray()[2] = Interface3::static_type().getTypeName(); - seqInterface.getArray()[3] = Interface4::static_type().getTypeName(); - seqInterface.getArray()[4] = Interface5::static_type().getTypeName(); - return createStandardClassWithSequence( - rSMgr, - sImplementationName, - rSuperClass, - seqInterface - ); -} - - - - -template < class Interface1, class Interface2 , class Interface3 , class Interface4 , class Interface5 , - class Interface6 > -inline ::com::sun::star::reflection::XIdlClass * SAL_CALL -//inline ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > -createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > &rSMgr, - const ::rtl::OUString &sImplementationName , - const ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > &rSuperClass , - const Interface1 *, - const Interface2 *, - const Interface3 *, - const Interface4 *, - const Interface5 *, - const Interface6 * - ) - SAL_THROW( () ) -{ - ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(6); - seqInterface.getArray()[0] = Interface1::static_type().getTypeName(); - seqInterface.getArray()[1] = Interface2::static_type().getTypeName(); - seqInterface.getArray()[2] = Interface3::static_type().getTypeName(); - seqInterface.getArray()[3] = Interface4::static_type().getTypeName(); - seqInterface.getArray()[4] = Interface5::static_type().getTypeName(); - seqInterface.getArray()[5] = Interface6::static_type().getTypeName(); - return createStandardClassWithSequence( - rSMgr, - sImplementationName, - rSuperClass, - seqInterface - ); -} - - - - - -template < class Interface1, class Interface2 , class Interface3 , class Interface4 , class Interface5 , - class Interface6, class Interface7 > -inline ::com::sun::star::reflection::XIdlClass * SAL_CALL -//inline ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > -createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > &rSMgr, - const ::rtl::OUString &sImplementationName , - const ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > &rSuperClass , - const Interface1 *, - const Interface2 *, - const Interface3 *, - const Interface4 *, - const Interface5 *, - const Interface6 *, - const Interface7 * - ) - SAL_THROW( () ) -{ - ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(7); - seqInterface.getArray()[0] = Interface1::static_type().getTypeName(); - seqInterface.getArray()[1] = Interface2::static_type().getTypeName(); - seqInterface.getArray()[2] = Interface3::static_type().getTypeName(); - seqInterface.getArray()[3] = Interface4::static_type().getTypeName(); - seqInterface.getArray()[4] = Interface5::static_type().getTypeName(); - seqInterface.getArray()[5] = Interface6::static_type().getTypeName(); - seqInterface.getArray()[6] = Interface7::static_type().getTypeName(); - return createStandardClassWithSequence( - rSMgr, - sImplementationName, - rSuperClass, - seqInterface - ); -} - - - - - - -template < class Interface1, class Interface2, class Interface3 , class Interface4 , class Interface5 , - class Interface6, class Interface7, class Interface8 > -inline ::com::sun::star::reflection::XIdlClass * SAL_CALL -//inline ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > -createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > &rSMgr, - const ::rtl::OUString &sImplementationName , - const ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > &rSuperClass , - const Interface1 *, - const Interface2 *, - const Interface3 *, - const Interface4 *, - const Interface5 *, - const Interface6 *, - const Interface7 *, - const Interface8 * - ) - SAL_THROW( () ) -{ - ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(8); - seqInterface.getArray()[0] = Interface1::static_type().getTypeName(); - seqInterface.getArray()[1] = Interface2::static_type().getTypeName(); - seqInterface.getArray()[2] = Interface3::static_type().getTypeName(); - seqInterface.getArray()[3] = Interface4::static_type().getTypeName(); - seqInterface.getArray()[4] = Interface5::static_type().getTypeName(); - seqInterface.getArray()[5] = Interface6::static_type().getTypeName(); - seqInterface.getArray()[6] = Interface7::static_type().getTypeName(); - seqInterface.getArray()[7] = Interface8::static_type().getTypeName(); - return createStandardClassWithSequence( - rSMgr, - sImplementationName, - rSuperClass, - seqInterface - ); -} - - - - -template < class Interface1, class Interface2, class Interface3 , class Interface4 , class Interface5 , - class Interface6, class Interface7, class Interface8 , class Interface9 > -inline ::com::sun::star::reflection::XIdlClass * SAL_CALL -//inline ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > -createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > &rSMgr, - const ::rtl::OUString &sImplementationName , - const ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > &rSuperClass , - const Interface1 *, - const Interface2 *, - const Interface3 *, - const Interface4 *, - const Interface5 *, - const Interface6 *, - const Interface7 *, - const Interface8 *, - const Interface9 * - ) - SAL_THROW( () ) -{ - ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(9); - seqInterface.getArray()[0] = Interface1::static_type().getTypeName(); - seqInterface.getArray()[1] = Interface2::static_type().getTypeName(); - seqInterface.getArray()[2] = Interface3::static_type().getTypeName(); - seqInterface.getArray()[3] = Interface4::static_type().getTypeName(); - seqInterface.getArray()[4] = Interface5::static_type().getTypeName(); - seqInterface.getArray()[5] = Interface6::static_type().getTypeName(); - seqInterface.getArray()[6] = Interface7::static_type().getTypeName(); - seqInterface.getArray()[7] = Interface8::static_type().getTypeName(); - seqInterface.getArray()[8] = Interface9::static_type().getTypeName(); - return createStandardClassWithSequence( - rSMgr, - sImplementationName, - rSuperClass, - seqInterface - ); -} - - -template < class Interface1, class Interface2, class Interface3 , class Interface4 , class Interface5 , - class Interface6, class Interface7, class Interface8 , class Interface9 , class Interface10 > -inline ::com::sun::star::reflection::XIdlClass * SAL_CALL -//inline ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > -createStandardClass( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > &rSMgr, - const ::rtl::OUString &sImplementationName , - const ::com::sun::star::uno::Reference < ::com::sun::star::reflection::XIdlClass > &rSuperClass , - const Interface1 *, - const Interface2 *, - const Interface3 *, - const Interface4 *, - const Interface5 *, - const Interface6 *, - const Interface7 *, - const Interface8 *, - const Interface9 *, - const Interface10 * - ) - SAL_THROW( () ) -{ - ::com::sun::star::uno::Sequence < ::rtl::OUString > seqInterface(10); - seqInterface.getArray()[0] = Interface1::static_type().getTypeName(); - seqInterface.getArray()[1] = Interface2::static_type().getTypeName(); - seqInterface.getArray()[2] = Interface3::static_type().getTypeName(); - seqInterface.getArray()[3] = Interface4::static_type().getTypeName(); - seqInterface.getArray()[4] = Interface5::static_type().getTypeName(); - seqInterface.getArray()[5] = Interface6::static_type().getTypeName(); - seqInterface.getArray()[6] = Interface7::static_type().getTypeName(); - seqInterface.getArray()[7] = Interface8::static_type().getTypeName(); - seqInterface.getArray()[8] = Interface9::static_type().getTypeName(); - seqInterface.getArray()[9] = Interface10::static_type().getTypeName(); - return createStandardClassWithSequence( - rSMgr, - sImplementationName, - rSuperClass, - seqInterface - ); -} - -} // end namespace cppu - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/typeprovider.hxx b/cppuhelper/inc/cppuhelper/typeprovider.hxx deleted file mode 100644 index 4e01bb5ac..000000000 --- a/cppuhelper/inc/cppuhelper/typeprovider.hxx +++ /dev/null @@ -1,245 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_TYPEPROVIDER_HXX_ -#define _CPPUHELPER_TYPEPROVIDER_HXX_ - -#include <rtl/alloc.h> -#include <rtl/uuid.h> -#include <com/sun/star/uno/Sequence.hxx> - - -namespace cppu -{ - -/** Helper class to implement ::com::sun::star::lang::XTypeProvider. Construct a static object - of this class with your UNO object's supported types. -*/ -class OTypeCollection -{ - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > _aTypes; - -public: - // these are here to force memory de/allocation to sal lib. - /** @internal */ - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () ) - { return ::rtl_allocateMemory( nSize ); } - /** @internal */ - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () ) - { ::rtl_freeMemory( pMem ); } - /** @internal */ - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () ) - { return pMem; } - /** @internal */ - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) - {} - - inline OTypeCollection( const OTypeCollection & rCollection ) - SAL_THROW( () ) - : _aTypes( rCollection._aTypes ) - {} - OTypeCollection( - const ::com::sun::star::uno::Type & rType1, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW( () ); - OTypeCollection( - const ::com::sun::star::uno::Type & rType1, - const ::com::sun::star::uno::Type & rType2, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW( () ); - OTypeCollection( - const ::com::sun::star::uno::Type & rType1, - const ::com::sun::star::uno::Type & rType2, - const ::com::sun::star::uno::Type & rType3, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW( () ); - OTypeCollection( - const ::com::sun::star::uno::Type & rType1, - const ::com::sun::star::uno::Type & rType2, - const ::com::sun::star::uno::Type & rType3, - const ::com::sun::star::uno::Type & rType4, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW( () ); - OTypeCollection( - const ::com::sun::star::uno::Type & rType1, - const ::com::sun::star::uno::Type & rType2, - const ::com::sun::star::uno::Type & rType3, - const ::com::sun::star::uno::Type & rType4, - const ::com::sun::star::uno::Type & rType5, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW( () ); - OTypeCollection( - const ::com::sun::star::uno::Type & rType1, - const ::com::sun::star::uno::Type & rType2, - const ::com::sun::star::uno::Type & rType3, - const ::com::sun::star::uno::Type & rType4, - const ::com::sun::star::uno::Type & rType5, - const ::com::sun::star::uno::Type & rType6, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW( () ); - OTypeCollection( - const ::com::sun::star::uno::Type & rType1, - const ::com::sun::star::uno::Type & rType2, - const ::com::sun::star::uno::Type & rType3, - const ::com::sun::star::uno::Type & rType4, - const ::com::sun::star::uno::Type & rType5, - const ::com::sun::star::uno::Type & rType6, - const ::com::sun::star::uno::Type & rType7, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW( () ); - OTypeCollection( - const ::com::sun::star::uno::Type & rType1, - const ::com::sun::star::uno::Type & rType2, - const ::com::sun::star::uno::Type & rType3, - const ::com::sun::star::uno::Type & rType4, - const ::com::sun::star::uno::Type & rType5, - const ::com::sun::star::uno::Type & rType6, - const ::com::sun::star::uno::Type & rType7, - const ::com::sun::star::uno::Type & rType8, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW( () ); - OTypeCollection( - const ::com::sun::star::uno::Type & rType1, - const ::com::sun::star::uno::Type & rType2, - const ::com::sun::star::uno::Type & rType3, - const ::com::sun::star::uno::Type & rType4, - const ::com::sun::star::uno::Type & rType5, - const ::com::sun::star::uno::Type & rType6, - const ::com::sun::star::uno::Type & rType7, - const ::com::sun::star::uno::Type & rType8, - const ::com::sun::star::uno::Type & rType9, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW( () ); - OTypeCollection( - const ::com::sun::star::uno::Type & rType1, - const ::com::sun::star::uno::Type & rType2, - const ::com::sun::star::uno::Type & rType3, - const ::com::sun::star::uno::Type & rType4, - const ::com::sun::star::uno::Type & rType5, - const ::com::sun::star::uno::Type & rType6, - const ::com::sun::star::uno::Type & rType7, - const ::com::sun::star::uno::Type & rType8, - const ::com::sun::star::uno::Type & rType9, - const ::com::sun::star::uno::Type & rType10, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW( () ); - OTypeCollection( - const ::com::sun::star::uno::Type & rType1, - const ::com::sun::star::uno::Type & rType2, - const ::com::sun::star::uno::Type & rType3, - const ::com::sun::star::uno::Type & rType4, - const ::com::sun::star::uno::Type & rType5, - const ::com::sun::star::uno::Type & rType6, - const ::com::sun::star::uno::Type & rType7, - const ::com::sun::star::uno::Type & rType8, - const ::com::sun::star::uno::Type & rType9, - const ::com::sun::star::uno::Type & rType10, - const ::com::sun::star::uno::Type & rType11, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW( () ); - OTypeCollection( - const ::com::sun::star::uno::Type & rType1, - const ::com::sun::star::uno::Type & rType2, - const ::com::sun::star::uno::Type & rType3, - const ::com::sun::star::uno::Type & rType4, - const ::com::sun::star::uno::Type & rType5, - const ::com::sun::star::uno::Type & rType6, - const ::com::sun::star::uno::Type & rType7, - const ::com::sun::star::uno::Type & rType8, - const ::com::sun::star::uno::Type & rType9, - const ::com::sun::star::uno::Type & rType10, - const ::com::sun::star::uno::Type & rType11, - const ::com::sun::star::uno::Type & rType12, - const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > & rAddTypes = ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >() ) - SAL_THROW( () ); - - /** Called upon XTypeProvider::getTypes(). - - @return type collection - */ - ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() SAL_THROW( () ) - { return _aTypes; } -}; - -/** Helper class to implement ::com::sun::star::lang::XTypeProvider. Construct a static object - of this class for your UNO object's implementation id. -*/ -class OImplementationId -{ - /** @internal */ - mutable ::com::sun::star::uno::Sequence< sal_Int8 > * _pSeq; - /** @internal */ - sal_Bool _bUseEthernetAddress; - -public: - // these are here to force memory de/allocation to sal lib. - /** @internal */ - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () ) - { return ::rtl_allocateMemory( nSize ); } - /** @internal */ - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () ) - { ::rtl_freeMemory( pMem ); } - /** @internal */ - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () ) - { return pMem; } - /** @internal */ - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) - {} - - /** @internal */ - ~OImplementationId() SAL_THROW( () ); - /** Constructor. - - @param bUseEthernetAddress whether an ethernet mac address should be taken into account - */ - inline OImplementationId( sal_Bool bUseEthernetAddress = sal_True ) SAL_THROW( () ) - : _pSeq( 0 ) - , _bUseEthernetAddress( bUseEthernetAddress ) - {} - /** Constructor giving implementation id. - - @param rSeq implementation id - */ - inline OImplementationId( const ::com::sun::star::uno::Sequence< sal_Int8 > & rSeq ) SAL_THROW( () ) - : _pSeq( new ::com::sun::star::uno::Sequence< sal_Int8 >( rSeq ) ) - {} - inline OImplementationId( const OImplementationId & rId ) SAL_THROW( () ) - : _pSeq( new ::com::sun::star::uno::Sequence< sal_Int8 >( rId.getImplementationId() ) ) - {} - - /** Called upon XTypeProvider::getImplementationId(). - - @return implementation id - */ - ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() const SAL_THROW( () ); -}; - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/unourl.hxx b/cppuhelper/inc/cppuhelper/unourl.hxx deleted file mode 100644 index 55127ed84..000000000 --- a/cppuhelper/inc/cppuhelper/unourl.hxx +++ /dev/null @@ -1,195 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#if !defined INCLUDED_CPPUHELPER_UNOURL_HXX -#define INCLUDED_CPPUHELPER_UNOURL_HXX - -#include <memory> - -namespace rtl { class OUString; } - -namespace cppu { - -/** A descriptor as part of a UNO URL (connection descriptor or protocol - descriptor). - - Such a descriptor can also be useful outside the context of a full UNO URL. - For example, some functions take a string representing a connection or - protocol descriptor as input, and can use this class to parse the string. - */ -class UnoUrlDescriptor -{ -public: - /** @internal - */ - class Impl; - - /** Construct a descriptor from a string representation. - - @param rDescriptor - The string representation of a descriptor. - - @exception rtl::MalformedUriException - Thrown when the given string representation is invalid. - */ - explicit UnoUrlDescriptor(rtl::OUString const & rDescriptor); - - /** @internal - */ - explicit UnoUrlDescriptor(std::auto_ptr< Impl > & rImpl); - - UnoUrlDescriptor(UnoUrlDescriptor const & rOther); - - ~UnoUrlDescriptor(); - - UnoUrlDescriptor & operator =(UnoUrlDescriptor const & rOther); - - /** Return the string representation of the descriptor. - - @return - A reference to the string representation used to construct this - descriptor, without any modifications. The reference is valid for the - lifetime of this URL object. - */ - rtl::OUString const & getDescriptor() const; - - /** Return the name component of the descriptor. - - @return - A reference to the (case insensitive) name, in lower case form. The - reference is valid for the lifetime of this URL object. - */ - rtl::OUString const & getName() const; - - /** Test whether the parameters contain a key. - - @param - A (case insensitive) key. - - @return - True if the parameters contain a matching key/value pair. - */ - bool hasParameter(rtl::OUString const & rKey) const; - - /** Return the parameter value for a key. - - @param - A (case insensitive) key. - - @return - The (case sensitive) value associated with the given key, or an empty - string if there is no matching key/value pair. - */ - rtl::OUString getParameter(rtl::OUString const & rKey) const; - -private: - std::auto_ptr< Impl > m_xImpl; -}; - -/** Parse UNO URLs into their components. - - The ABNF for UNO URLs is as follows (see RFCs 2234, 2396, also see - <http://udk.openoffice.org/common/man/spec/uno-url.html>): - - uno-url = "UNO:" connection ";" protocol ";" object-name - connection = descriptor - protocol = descriptor - descriptor = name *("," parameter) - name = 1*alphanum - parameter = key "=" value - key = 1*alphanum - value = *vchar - valchar = unreserved / escaped / "$" / "&" / "+" / "/" / ":" / "?" / "@" - object-name = 1*ochar - ochar = unreserved / "$" / "&" / "+" / "," / "/" / ":" / "=" / "?" / "@" - - Within a descriptor, the name and the keys are case insensitive, and within - the parameter list all keys must be distinct. - - Parameter values are encoded using UTF-8. Note that parsing of parameter - values as done by UnoUrl and UnoUrlDescriptor is not strict: Invalid UTF-16 - entities in the input, as well as broken escape sequences ("%" not followed - by two hex digits) are copied verbatim to the output, invalid bytes in the - converted UTF-8 data are considered individual Unicode characters, and - invalid UTF-16 entities in the resulting output (e.g., a high surrogate not - followed by a low surrogate) are not detected. - */ -class UnoUrl -{ -public: - /** Construct a UNO URL from a string representation. - - @param rUrl - The string representation of a UNO URL. - - @exception rtl::MalformedUriException - Thrown when the given string representation is invalid. - */ - explicit UnoUrl(rtl::OUString const & rUrl); - - UnoUrl(UnoUrl const & rOther); - - ~UnoUrl(); - - UnoUrl & operator =(UnoUrl const & rOther); - - /** Return the connection descriptor component of the URL. - - @return - A reference to the connection descriptor. The reference is valid for - the lifetime of this URL object. - */ - UnoUrlDescriptor const & getConnection() const; - - /** Return the protocol descriptor component of the URL. - - @return - A reference to the protocol descriptor. The reference is valid for the - lifetime of this URL object. - */ - UnoUrlDescriptor const & getProtocol() const; - - /** Return the object-name component of the URL. - - @return - A reference to the (case sensitive) object-name. The reference is valid - for the lifetime of this URL object. - */ - rtl::OUString const & getObjectName() const; - -private: - class Impl; - - std::auto_ptr< Impl > m_xImpl; -}; - -} - -#endif // INCLUDED_RTL_UNOURL_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/weak.hxx b/cppuhelper/inc/cppuhelper/weak.hxx deleted file mode 100644 index 2000557ea..000000000 --- a/cppuhelper/inc/cppuhelper/weak.hxx +++ /dev/null @@ -1,172 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_WEAK_HXX_ -#define _CPPUHELPER_WEAK_HXX_ - -#include <osl/interlck.h> -#include <rtl/alloc.h> -#include <cppuhelper/weakref.hxx> -#include <cppuhelper/queryinterface.hxx> -#include <com/sun/star/uno/XWeak.hpp> - - -namespace cppu -{ - -/** @internal */ -class OWeakConnectionPoint; - -/** Base class to implement an UNO object supporting weak references, i.e. the object can be held - weakly (by a ::com::sun::star::uno::WeakReference). - This implementation copes with reference counting. Upon last release(), the virtual dtor - is called. - - @derive - Inherit from this class and delegate acquire()/ release() calls. -*/ -class OWeakObject : public ::com::sun::star::uno::XWeak -{ - /** @internal */ - friend class OWeakConnectionPoint; - -protected: - /** Virtual dtor. - - @attention - Despite the fact that a RuntimeException is allowed to be thrown, you must not throw any - exception upon destruction! - */ - virtual ~OWeakObject() SAL_THROW( (::com::sun::star::uno::RuntimeException) ); - - /** disposes and resets m_pWeakConnectionPoint - @precond - m_refCount equals 0 - */ - void disposeWeakConnectionPoint(); - - /** reference count. - - @attention - Don't modify manually! Use acquire() and release(). - */ - oslInterlockedCount m_refCount; - - /** Container of all weak reference listeners and the connection point from the weak reference. - @internal - */ - OWeakConnectionPoint * m_pWeakConnectionPoint; - - /** reserved for future use. do not use. - @internal - */ - void * m_pReserved; - -public: - // these are here to force memory de/allocation to sal lib. - /** @internal */ - inline static void * SAL_CALL operator new( size_t nSize ) SAL_THROW( () ) - { return ::rtl_allocateMemory( nSize ); } - /** @internal */ - inline static void SAL_CALL operator delete( void * pMem ) SAL_THROW( () ) - { ::rtl_freeMemory( pMem ); } - /** @internal */ - inline static void * SAL_CALL operator new( size_t, void * pMem ) SAL_THROW( () ) - { return pMem; } - /** @internal */ - inline static void SAL_CALL operator delete( void *, void * ) SAL_THROW( () ) - {} - -#ifdef _MSC_VER - /** Default Constructor. Sets the reference count to zero. - Accidentally occurs in msvc mapfile = > had to be outlined. - */ - OWeakObject() SAL_THROW( () ); -#else - /** Default Constructor. Sets the reference count to zero. - */ - inline OWeakObject() SAL_THROW( () ) - : m_refCount( 0 ) - , m_pWeakConnectionPoint( 0 ) - {} -#endif - /** Dummy copy constructor. Set the reference count to zero. - - @param rObj dummy param - */ - inline OWeakObject( const OWeakObject & ) SAL_THROW( () ) - : com::sun::star::uno::XWeak() - , m_refCount( 0 ) - , m_pWeakConnectionPoint( 0 ) - {} - /** Dummy assignment operator. Does not affect reference count. - - @return this OWeakObject - */ - inline OWeakObject & SAL_CALL operator = ( const OWeakObject &) - SAL_THROW( () ) - { return *this; } - - /** Basic queryInterface() implementation supporting ::com::sun::star::uno::XWeak and - ::com::sun::star::uno::XInterface. - - @param rType demanded type - @return demanded type or empty any - */ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( - const ::com::sun::star::uno::Type & rType ) - throw (::com::sun::star::uno::RuntimeException); - /** increasing m_refCount - */ - virtual void SAL_CALL acquire() - throw (); - /** decreasing m_refCount - */ - virtual void SAL_CALL release() - throw (); - - /** XWeak::queryAdapter() implementation - - @return a ::com::sun::star::uno::XAdapter reference - */ - virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAdapter > SAL_CALL queryAdapter() - throw (::com::sun::star::uno::RuntimeException); - - /** Cast operator to XInterface reference. - - @return XInterface reference - */ - inline SAL_CALL operator ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > () SAL_THROW( () ) - { return this; } -}; - -} - -#endif - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/weakagg.hxx b/cppuhelper/inc/cppuhelper/weakagg.hxx deleted file mode 100644 index aac14997e..000000000 --- a/cppuhelper/inc/cppuhelper/weakagg.hxx +++ /dev/null @@ -1,114 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_WEAKAGG_HXX_ -#define _CPPUHELPER_WEAKAGG_HXX_ - -#include <cppuhelper/weak.hxx> -#include <com/sun/star/uno/XAggregation.hpp> - - -namespace cppu -{ - -/** Base class to implement an UNO object supporting weak references, i.e. the object can be held - weakly (by a ::com::sun::star::uno::WeakReference) and aggregation, i.e. the object can be - aggregated by another (delegator). - This implementation copes with reference counting. Upon last release(), the virtual dtor - is called. - - @derive - Inherit from this class and delegate acquire()/ release() calls. Re-implement - XAggregation::queryInterface(). -*/ -class OWeakAggObject - : public ::cppu::OWeakObject - , public ::com::sun::star::uno::XAggregation -{ -public: - /** Constructor. No delegator set. - */ - inline OWeakAggObject() SAL_THROW( () ) - {} - - /** If a delegator is set, then the delegators gets acquired. Otherwise call is delegated to - base class ::cppu::OWeakObject. - */ - virtual void SAL_CALL acquire() throw(); - /** If a delegator is set, then the delegators gets released. Otherwise call is delegated to - base class ::cppu::OWeakObject. - */ - virtual void SAL_CALL release() throw(); - /** If a delegator is set, then the delegator is queried for the demanded interface. If the - delegator cannot provide the demanded interface, it calls queryAggregation() on its - aggregated objects. - - @param rType demanded interface type - @return demanded type or empty any - @see queryAggregation. - */ - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type & rType ) - throw(::com::sun::star::uno::RuntimeException); - - /** Set the delegator. The delegator member reference is a weak reference. - - @param Delegator the object that delegate its queryInterface to this aggregate. - */ - virtual void SAL_CALL setDelegator( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & Delegator ) - throw(::com::sun::star::uno::RuntimeException); - /** Called by the delegator or queryInterface. Re-implement this method instead of - queryInterface. - - @see queryInterface - */ - virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) - throw(::com::sun::star::uno::RuntimeException); - -protected: - /** Virtual dtor. Called when reference count is 0. - - @attention - Despite the fact that a RuntimeException is allowed to be thrown, you must not throw any - exception upon destruction! - */ - virtual ~OWeakAggObject() SAL_THROW( (::com::sun::star::uno::RuntimeException) ); - - /** weak reference to delegator. - */ - ::com::sun::star::uno::WeakReferenceHelper xDelegator; -private: - /** @internal */ - OWeakAggObject( const OWeakAggObject & rObj ) SAL_THROW( () ); - /** @internal */ - OWeakAggObject & operator = ( const OWeakAggObject & rObj ) SAL_THROW( () ); -}; - -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/cppuhelper/weakref.hxx b/cppuhelper/inc/cppuhelper/weakref.hxx deleted file mode 100644 index 54a313b2d..000000000 --- a/cppuhelper/inc/cppuhelper/weakref.hxx +++ /dev/null @@ -1,172 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ -#ifndef _CPPUHELPER_WEAKREF_HXX_ -#define _CPPUHELPER_WEAKREF_HXX_ - -#include <com/sun/star/uno/XInterface.hpp> - - -namespace com -{ -namespace sun -{ -namespace star -{ -namespace uno -{ - -/** @internal */ -class OWeakRefListener; - -/** The WeakReferenceHelper holds a weak reference to an object. This object must implement - the ::com::sun::star::uno::XWeak interface. The implementation is thread safe. -*/ -class WeakReferenceHelper -{ -public: - /** Default ctor. Creates an empty weak reference. - */ - inline WeakReferenceHelper() SAL_THROW( () ) - : m_pImpl( 0 ) - {} - - /** Copy ctor. Initialize this reference with the same interface as in rWeakRef. - - @param rWeakRef another weak ref - */ - WeakReferenceHelper( const WeakReferenceHelper & rWeakRef ) SAL_THROW( () ); - /** Initialize this reference with the hard interface reference xInt. If the implementation - behind xInt does not support XWeak or XInt is null then this reference will be null. - - @param xInt another hard interface reference - */ - WeakReferenceHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xInt ) - SAL_THROW( () ); - /** Releases this reference. - */ - ~WeakReferenceHelper() SAL_THROW( () ); - - /** Releases this reference and takes over rWeakRef. - - @param rWeakRef another weak ref - */ - WeakReferenceHelper & SAL_CALL operator = ( const WeakReferenceHelper & rWeakRef ) SAL_THROW( () ); - - /** Releases this reference and takes over hard reference xInt. - If the implementation behind xInt does not support XWeak - or XInt is null, then this reference is null. - - @param xInt another hard reference - */ - WeakReferenceHelper & SAL_CALL operator = ( - const ::com::sun::star::uno::Reference< - ::com::sun::star::uno::XInterface > & xInt ) SAL_THROW( () ); - - /** Returns true if both weak refs reference to the same object. - - @param rObj another weak ref - @return true, if both weak refs reference to the same object. - */ - inline sal_Bool SAL_CALL operator == ( const WeakReferenceHelper & rObj ) const SAL_THROW( () ) - { return (get() == rObj.get()); } - - /** Gets a hard reference to the object. - - @return hard reference or null, if the weakly referenced interface has gone - */ - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL get() const SAL_THROW( () ); - /** Gets a hard reference to the object. - - @return hard reference or null, if the weakly referenced interface has gone - */ - inline SAL_CALL operator Reference< XInterface > () const SAL_THROW( () ) - { return get(); } - - /** Releases this reference. - - @since UDK 3.2.12 - */ - void SAL_CALL clear() SAL_THROW( () ); - -protected: - /** @internal */ - OWeakRefListener * m_pImpl; -}; - -/** The WeakReference<> holds a weak reference to an object. This object must implement - the ::com::sun::star::uno::XWeak interface. The implementation is thread safe. - - @tplparam interface_type type of interface -*/ -template< class interface_type > -class WeakReference : public WeakReferenceHelper -{ -public: - /** Default ctor. Creates an empty weak reference. - */ - inline WeakReference() SAL_THROW( () ) - : WeakReferenceHelper() - {} - - /** Copy ctor. Initialize this reference with a hard reference. - - @param rRef another hard ref - */ - inline WeakReference( const Reference< interface_type > & rRef ) SAL_THROW( () ) - : WeakReferenceHelper( rRef ) - {} - - /** Releases this reference and takes over hard reference xInt. - If the implementation behind xInt does not support XWeak - or XInt is null, then this reference is null. - - @param xInt another hard reference - - @since UDK 3.2.12 - */ - WeakReference & SAL_CALL operator = ( - const ::com::sun::star::uno::Reference< interface_type > & xInt ) - SAL_THROW( () ) - { WeakReferenceHelper::operator=(xInt); return *this; } - - /** Gets a hard reference to the object. - - @return hard reference or null, if the weakly referenced interface has gone - */ - inline SAL_CALL operator Reference< interface_type > () const SAL_THROW( () ) - { return Reference< interface_type >::query( get() ); } -}; - -} -} -} -} - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/makefile.mk b/cppuhelper/inc/makefile.mk deleted file mode 100644 index 0208c0dbf..000000000 --- a/cppuhelper/inc/makefile.mk +++ /dev/null @@ -1,47 +0,0 @@ -#************************************************************************* -# -# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -# -# Copyright 2000, 2010 Oracle and/or its affiliates. -# -# OpenOffice.org - a multi-platform office productivity suite -# -# This file is part of OpenOffice.org. -# -# OpenOffice.org is free software: you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License version 3 -# only, as published by the Free Software Foundation. -# -# OpenOffice.org is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU Lesser General Public License version 3 for more details -# (a copy is included in the LICENSE file that accompanied this code). -# -# You should have received a copy of the GNU Lesser General Public License -# version 3 along with OpenOffice.org. If not, see -# <http://www.openoffice.org/license.html> -# for a copy of the LGPLv3 License. -# -#************************************************************************* -PRJ=.. - -PRJNAME=cppuhelper -TARGET=inc - -# --- Settings ----------------------------------------------------- - -.INCLUDE : settings.mk - -# --- Files -------------------------------------------------------- -# --- Targets ------------------------------------------------------- - -.INCLUDE : target.mk - -.IF "$(ENABLE_PCH)"!="" -ALLTAR : \ - $(SLO)$/precompiled.pch \ - $(SLO)$/precompiled_ex.pch - -.ENDIF # "$(ENABLE_PCH)"!="" - diff --git a/cppuhelper/inc/pch/precompiled_cppuhelper.cxx b/cppuhelper/inc/pch/precompiled_cppuhelper.cxx deleted file mode 100644 index d8090977e..000000000 --- a/cppuhelper/inc/pch/precompiled_cppuhelper.cxx +++ /dev/null @@ -1,31 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#include "precompiled_cppuhelper.hxx" - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cppuhelper/inc/pch/precompiled_cppuhelper.hxx b/cppuhelper/inc/pch/precompiled_cppuhelper.hxx deleted file mode 100644 index b1a1df1a1..000000000 --- a/cppuhelper/inc/pch/precompiled_cppuhelper.hxx +++ /dev/null @@ -1,34 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2000, 2010 Oracle and/or its affiliates. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -// MARKER(update_precomp.py): Generated on 2006-09-01 17:49:37.342833 - -#ifdef PRECOMPILED_HEADERS -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |