[Libreoffice-commits] core.git: cppuhelper/source filter/source include/cppuhelper odk/examples odk/Package_odk_headers.mk

Matthew Pottage matthewpottage at invincitech.com
Fri Aug 8 02:59:39 PDT 2014


 cppuhelper/source/compat.cxx                                                           |   56 +
 cppuhelper/source/implbase.cxx                                                         |  144 ----
 filter/source/odfflatxml/OdfFlatXml.cxx                                                |    1 
 filter/source/xsltfilter/LibXSLTTransformer.cxx                                        |    1 
 filter/source/xsltfilter/LibXSLTTransformer.hxx                                        |    1 
 filter/source/xsltfilter/OleHandler.hxx                                                |    1 
 filter/source/xsltfilter/XSLTFilter.cxx                                                |    1 
 include/cppuhelper/compbase.hxx                                                        |  107 ---
 include/cppuhelper/implbase.hxx                                                        |  293 ----------
 odk/Package_odk_headers.mk                                                             |    2 
 odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx |    1 
 11 files changed, 57 insertions(+), 551 deletions(-)

New commits:
commit 03e0bd6b3b4314e2476030da7ddc71cf30f8b2e9
Author: Matthew Pottage <matthewpottage at invincitech.com>
Date:   Wed Aug 6 08:32:04 2014 +0100

    [API CHANGE] Removed two cppuhelper deprecated headers.
    
    The headers cppuheader/compbase.hxx and implbase.hxx. They have been deprecated
    since 2001. Moved the definitions of the deprecated functions to
    cppuhelper/source/compat.cxx.
    
    Signed-off-by: Stephan Bergmann <sbergman at redhat.com>, adding fixes and clean-up
    in cppuhelper/source/compat.cxx and odk/Package_odk_headers.mk
    
    Change-Id: I48b3cbf551b59d72614737a883a96aab55fc2090

diff --git a/cppuhelper/source/compat.cxx b/cppuhelper/source/compat.cxx
index 2141f8b..092e244 100644
--- a/cppuhelper/source/compat.cxx
+++ b/cppuhelper/source/compat.cxx
@@ -32,6 +32,7 @@ namespace com { namespace sun { namespace star {
     namespace lang {
         class XMultiComponentFactory;
         class XMultiServiceFactory;
+        class XTypeProvider;
     }
     namespace reflection { class XIdlClass; }
     namespace registry {
@@ -112,6 +113,61 @@ loadSharedLibComponentFactory(
     for (;;) { std::abort(); } // avoid "must return a value" warnings
 }
 
+struct SAL_DLLPUBLIC_EXPORT ClassData {
+    css::uno::Sequence<sal_Int8> SAL_CALL getImplementationId();
+
+    css::uno::Sequence<css::uno::Type> SAL_CALL getTypes();
+
+    void SAL_CALL initTypeProvider();
+
+    css::uno::Any SAL_CALL query(
+        css::uno::Type const &, css::lang::XTypeProvider *);
+
+    void SAL_CALL writeTypeOffset(css::uno::Type const &, sal_Int32);
+};
+
+css::uno::Sequence<sal_Int8> ClassData::getImplementationId() {
+    for (;;) { std::abort(); } // avoid "must return a value" warnings
+}
+
+css::uno::Sequence<css::uno::Type> ClassData::getTypes() {
+    for (;;) { std::abort(); } // avoid "must return a value" warnings
+}
+
+void ClassData::initTypeProvider() {
+    std::abort();
+}
+
+css::uno::Any ClassData::query(
+    css::uno::Type const &, css::lang::XTypeProvider *)
+{
+    for (;;) { std::abort(); } // avoid "must return a value" warnings
+}
+
+void ClassData::writeTypeOffset(css::uno::Type const &, sal_Int32) {
+    std::abort();
+}
+
+struct SAL_DLLPUBLIC_EXPORT ClassDataBase {
+    ClassDataBase();
+
+    ClassDataBase(sal_Int32);
+
+    ~ClassDataBase();
+};
+
+ClassDataBase::ClassDataBase() {
+    std::abort();
+}
+
+ClassDataBase::ClassDataBase(sal_Int32) {
+    std::abort();
+}
+
+ClassDataBase::~ClassDataBase() {
+    std::abort();
+}
+
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/cppuhelper/source/implbase.cxx b/cppuhelper/source/implbase.cxx
index 1ffb856..aa75e9e 100644
--- a/cppuhelper/source/implbase.cxx
+++ b/cppuhelper/source/implbase.cxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <cppuhelper/implbase.hxx>
-#include <cppuhelper/compbase.hxx>
+#include <cppuhelper/compbase_ex.hxx>
 #include <osl/diagnose.h>
 #include <rtl/instance.hxx>
 #include <rtl/string.hxx>
@@ -36,147 +35,6 @@ using rtl::OString;
 namespace cppu
 {
 
-// ClassDataBase
-
-ClassDataBase::ClassDataBase()
-    : bOffsetsInit( sal_False )
-    , nType2Offset( 0 )
-    , nClassCode( 0 )
-    , pTypes( 0 )
-    , pId( 0 )
-{
-}
-
-ClassDataBase::ClassDataBase( sal_Int32 nClassCode_ )
-    : bOffsetsInit( sal_False )
-    , nType2Offset( 0 )
-    , nClassCode( nClassCode_ )
-    , pTypes( 0 )
-    , pId( 0 )
-{
-}
-
-ClassDataBase::~ClassDataBase()
-{
-    delete pTypes;
-    delete pId;
-
-    for ( sal_Int32 nPos = nType2Offset; nPos--; )
-    {
-        typelib_typedescription_release(
-            (typelib_TypeDescription *)((ClassData *)this)->arType2Offset[nPos].pTD );
-    }
-}
-
-// ClassData
-
-void ClassData::writeTypeOffset( const Type & rType, sal_Int32 nOffset )
-{
-    arType2Offset[nType2Offset].nOffset = nOffset;
-
-    arType2Offset[nType2Offset].pTD = 0;
-    typelib_typedescriptionreference_getDescription(
-        (typelib_TypeDescription **)&arType2Offset[nType2Offset].pTD, rType.getTypeLibType() );
-
-    if (arType2Offset[nType2Offset].pTD)
-        ++nType2Offset;
-#if OSL_DEBUG_LEVEL > 1
-    else
-    {
-        OString msg( "### cannot get type description for " );
-        msg += OUStringToOString( rType.getTypeName(), RTL_TEXTENCODING_ASCII_US );
-        OSL_FAIL( msg.getStr() );
-    }
-#endif
-}
-
-void ClassData::initTypeProvider()
-{
-    ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
-    if (! pTypes)
-    {
-        // collect types
-        Sequence< Type > * types = new Sequence< Type >(
-            nType2Offset + 1 + (nClassCode == 4 ? 2 : nClassCode) );
-        Type * pTypeAr = types->getArray();
-
-        // given types
-        sal_Int32 nPos = nType2Offset;
-        while (nPos--)
-            pTypeAr[nPos] = ((typelib_TypeDescription *)arType2Offset[nPos].pTD)->pWeakRef;
-
-        // XTypeProvider
-        pTypeAr[nType2Offset] = ::getCppuType( (const Reference< lang::XTypeProvider > *)0 );
-
-        // class code extra types: [[XComponent,] XWeak[, XAggregation]]
-        switch (nClassCode)
-        {
-        case 4:
-            pTypeAr[nType2Offset +2] = ::getCppuType( (const Reference< lang::XComponent > *)0 );
-            pTypeAr[nType2Offset +1] = ::getCppuType( (const Reference< XWeak > *)0 );
-            break;
-        case 3:
-            pTypeAr[nType2Offset +3] = ::getCppuType( (const Reference< lang::XComponent > *)0 );
-        case 2:
-            pTypeAr[nType2Offset +2] = ::getCppuType( (const Reference< XAggregation > *)0 );
-        case 1:
-            pTypeAr[nType2Offset +1] = ::getCppuType( (const Reference< XWeak > *)0 );
-        }
-
-        pTypes = types;
-    }
-}
-
-Sequence< Type > ClassData::getTypes()
-{
-    if (! pTypes)
-        initTypeProvider();
-    return *pTypes;
-}
-
-Sequence< sal_Int8 > ClassData::getImplementationId()
-{
-    return css::uno::Sequence<sal_Int8>();
-}
-
-
-static inline bool td_equals(
-    typelib_TypeDescription * pTD, typelib_TypeDescriptionReference * pType )
-{
-    return (pTD->pWeakRef == pType ||
-            (pTD->pTypeName->length == pType->pTypeName->length &&
-             rtl_ustr_compare( pTD->pTypeName->buffer, pType->pTypeName->buffer ) == 0));
-}
-
-Any ClassData::query( const Type & rType, lang::XTypeProvider * pBase )
-{
-    if (rType == ::getCppuType( (const Reference< XInterface > *)0 ))
-        return Any( &pBase, ::getCppuType( (const Reference< XInterface > *)0 ) );
-    for ( sal_Int32 nPos = 0; nPos < nType2Offset; ++nPos )
-    {
-        const Type_Offset & rTO = arType2Offset[nPos];
-        typelib_InterfaceTypeDescription * pTD = rTO.pTD;
-        while (pTD)
-        {
-            if (td_equals( (typelib_TypeDescription *)pTD,
-                           *(typelib_TypeDescriptionReference **)&rType ))
-            {
-                void * pInterface = (char *)pBase + rTO.nOffset;
-                return Any( &pInterface, (typelib_TypeDescription *)pTD );
-            }
-            pTD = pTD->pBaseTypeDescription;
-        }
-    }
-    if (rType == ::getCppuType( (const Reference< lang::XTypeProvider > *)0 ))
-        return Any( &pBase, ::getCppuType( (const Reference< lang::XTypeProvider > *)0 ) );
-
-    return Any();
-}
-
-
-
-
-
 // WeakComponentImplHelperBase
 
 WeakComponentImplHelperBase::WeakComponentImplHelperBase( Mutex & rMutex )
diff --git a/filter/source/odfflatxml/OdfFlatXml.cxx b/filter/source/odfflatxml/OdfFlatXml.cxx
index 2c2bef3..09d03cc 100644
--- a/filter/source/odfflatxml/OdfFlatXml.cxx
+++ b/filter/source/odfflatxml/OdfFlatXml.cxx
@@ -11,7 +11,6 @@
 #include <comphelper/processfactory.hxx>
 #include <cppuhelper/factory.hxx>
 #include <cppuhelper/implbase3.hxx>
-#include <cppuhelper/implbase.hxx>
 
 #include <sax/tools/documenthandleradapter.hxx>
 
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index d0d850f..7b21e24 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -29,7 +29,6 @@
 
 #include <cppuhelper/factory.hxx>
 #include <cppuhelper/implbase4.hxx>
-#include <cppuhelper/implbase.hxx>
 
 #include <osl/module.h>
 #include <osl/file.hxx>
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.hxx b/filter/source/xsltfilter/LibXSLTTransformer.hxx
index 45c5490..cfdead8 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.hxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.hxx
@@ -23,7 +23,6 @@
 
 #include <cppuhelper/factory.hxx>
 #include <cppuhelper/implbase1.hxx>
-#include <cppuhelper/implbase.hxx>
 
 #include <rtl/ref.hxx>
 
diff --git a/filter/source/xsltfilter/OleHandler.hxx b/filter/source/xsltfilter/OleHandler.hxx
index 35ce965..799226f 100644
--- a/filter/source/xsltfilter/OleHandler.hxx
+++ b/filter/source/xsltfilter/OleHandler.hxx
@@ -25,7 +25,6 @@
 
 #include <cppuhelper/factory.hxx>
 #include <cppuhelper/implbase4.hxx>
-#include <cppuhelper/implbase.hxx>
 #include <osl/module.h>
 #include <osl/file.hxx>
 #include <osl/process.h>
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index 4c769e8..ce992a7 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -22,7 +22,6 @@
 
 #include <cppuhelper/factory.hxx>
 #include <cppuhelper/implbase4.hxx>
-#include <cppuhelper/implbase.hxx>
 
 #include <sax/tools/documenthandleradapter.hxx>
 
diff --git a/include/cppuhelper/compbase.hxx b/include/cppuhelper/compbase.hxx
deleted file mode 100644
index 007cabf..0000000
--- a/include/cppuhelper/compbase.hxx
+++ /dev/null
@@ -1,107 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_CPPUHELPER_COMPBASE_HXX
-#define INCLUDED_CPPUHELPER_COMPBASE_HXX
-
-#include <cppuhelper/compbase_ex.hxx>
-#include <cppuhelper/implbase.hxx>
-
-/* This header should not be used anymore.
-   @deprecated
-*/
-
-/// @cond INTERNAL
-
-#define __DEF_COMPIMPLHELPER_A( N ) \
-namespace cppu \
-{ \
-template< __CLASS_IFC##N > \
-class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE WeakComponentImplHelper##N \
-    : public ::cppu::WeakComponentImplHelperBase \
-    , public ImplHelperBase##N< __IFC##N > \
-{ \
-    static ClassData##N s_aCD; \
-public: \
-    WeakComponentImplHelper##N( ::osl::Mutex & rMutex ) \
-        : 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 SAL_DLLPUBLIC_TEMPLATE WeakAggComponentImplHelper##N \
-    : public ::cppu::WeakAggComponentImplHelperBase \
-    , public ImplHelperBase##N< __IFC##N > \
-{ \
-    static ClassData##N s_aCD; \
-public: \
-    WeakAggComponentImplHelper##N( ::osl::Mutex & rMutex ) \
-        : 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(); } \
-};
-
-#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 );
-
-#define __DEF_COMPIMPLHELPER_C( N ) \
-}
-
-#define __DEF_COMPIMPLHELPER( N ) \
-__DEF_COMPIMPLHELPER_A( N ) \
-__DEF_COMPIMPLHELPER_B( N ) \
-__DEF_COMPIMPLHELPER_C( N )
-
-/// @endcond
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/cppuhelper/implbase.hxx b/include/cppuhelper/implbase.hxx
deleted file mode 100644
index c8a5e4e..0000000
--- a/include/cppuhelper/implbase.hxx
+++ /dev/null
@@ -1,293 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   Licensed to the Apache Software Foundation (ASF) under one or more
- *   contributor license agreements. See the NOTICE file distributed
- *   with this work for additional information regarding copyright
- *   ownership. The ASF licenses this file to you under the Apache
- *   License, Version 2.0 (the "License"); you may not use this file
- *   except in compliance with the License. You may obtain a copy of
- *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
- */
-#ifndef INCLUDED_CPPUHELPER_IMPLBASE_HXX
-#define INCLUDED_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>
-#include <cppuhelper/cppuhelperdllapi.h>
-
-/* This header should not be used anymore.
-   @deprecated
-*/
-
-/// @cond INTERNAL
-
-namespace cppu
-{
-
-/** Struct used for inline template implementation helpers: type entries.
-    Not for public use.
-*/
-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.
-*/
-struct CPPUHELPER_DLLPUBLIC 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;
-    /** obsolete pointer to class id (com.sun.star.lang.XTypeProvider), will
-        always be null
-    */
-    ::com::sun::star::uno::Sequence< sal_Int8 > * pId;
-
-    /** def ctor
-    */
-    ClassDataBase();
-    /** class code ctor
-
-        @param nClassCode class code, see ClassDataBase::nClassCode
-    */
-    ClassDataBase( sal_Int32 nClassCode );
-    /** dtor
-    */
-    ~ClassDataBase();
-};
-/** 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.
-*/
-struct CPPUHELPER_DLLPUBLIC ClassData : public ClassDataBase
-{
-    /** type entries array
-    */
-    Type_Offset arType2Offset[1];
-
-    /** init call for supporting com.sun.star.lang.XTypeProvider
-    */
-    void SAL_CALL initTypeProvider();
-    /** 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 );
-
-    /** 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 );
-    /** 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();
-    /** 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();
-};
-
-/** Shared mutex for implementation helper initialization.
-    Not for public use.
-*/
-CPPUHELPER_DLLPUBLIC ::osl::Mutex & SAL_CALL getImplHelperInitMutex(void);
-}
-
-
-// settle down beavis, here comes the macro template hell :]
-
-
-
-
-#if defined _MSC_VER // public -> protected changes mangled names there
-#define CPPUHELPER_DETAIL_IMPLHELPER_PROTECTED public
-#else
-#define CPPUHELPER_DETAIL_IMPLHELPER_PROTECTED protected
-#endif
-
-/** 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 )
-*/
-#define __DEF_IMPLHELPER_PRE( N ) \
-namespace cppu \
-{ \
-struct ClassData##N : public ClassDataBase \
-{ \
-    Type_Offset arType2Offset[ N ]; \
-    ClassData##N( sal_Int32 nInClassCode ) \
-        : ClassDataBase( nInClassCode ) \
-        {} \
-}; \
-template< __CLASS_IFC##N > \
-class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE ImplHelperBase##N \
-    : public ::com::sun::star::lang::XTypeProvider \
-    , __PUBLIC_IFC##N \
-{ \
-CPPUHELPER_DETAIL_IMPLHELPER_PROTECTED: \
-    ~ImplHelperBase##N() throw () {} \
-protected: \
-    ClassData & SAL_CALL getClassData( ClassDataBase & s_aCD ) \
-    { \
-        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
-*/
-#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
-*/
-#define __DEF_IMPLHELPER_POST_A( N ) \
-                rCD.bOffsetsInit = sal_True; \
-            } \
-        } \
-        return rCD; \
-    } \
-}; \
-template< __CLASS_IFC##N > \
-class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE 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(); } \
-CPPUHELPER_DETAIL_IMPLHELPER_PROTECTED: \
-    ~ImplHelper##N() throw () {} \
-}; \
-template< __CLASS_IFC##N > \
-class SAL_NO_VTABLE SAL_DLLPUBLIC_TEMPLATE 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 SAL_DLLPUBLIC_TEMPLATE 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
-*/
-#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
-*/
-#define __DEF_IMPLHELPER_POST_C( N ) \
-}
-
-/** Implementation helper macro: have a look at __DEF_IMPLHELPER_PRE
-*/
-#define __DEF_IMPLHELPER_POST( N ) \
-__DEF_IMPLHELPER_POST_A( N ) \
-__DEF_IMPLHELPER_POST_B( N ) \
-__DEF_IMPLHELPER_POST_C( N )
-
-/// @endcond
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/odk/Package_odk_headers.mk b/odk/Package_odk_headers.mk
index 331af21..0475898 100644
--- a/odk/Package_odk_headers.mk
+++ b/odk/Package_odk_headers.mk
@@ -35,7 +35,6 @@ $(eval $(call gb_Package_add_files_with_dir,odk_headers,$(SDKDIRNAME)/include,\
 	cppuhelper/access_control.hxx \
 	cppuhelper/basemutex.hxx \
 	cppuhelper/bootstrap.hxx \
-	cppuhelper/compbase.hxx \
 	cppuhelper/compbase1.hxx \
 	cppuhelper/compbase10.hxx \
 	cppuhelper/compbase11.hxx \
@@ -55,7 +54,6 @@ $(eval $(call gb_Package_add_files_with_dir,odk_headers,$(SDKDIRNAME)/include,\
 	cppuhelper/exc_hlp.hxx \
 	cppuhelper/factory.hxx \
 	cppuhelper/findsofficepath.h \
-	cppuhelper/implbase.hxx \
 	cppuhelper/implbase1.hxx \
 	cppuhelper/implbase10.hxx \
 	cppuhelper/implbase11.hxx \
diff --git a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
index 83a2100..a5c1929 100644
--- a/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
+++ b/odk/examples/DevelopersGuide/OfficeDev/FilterDevelopment/FlatXmlFilter_cpp/FlatXml.cxx
@@ -37,7 +37,6 @@
 #include <cppuhelper/implbase1.hxx>
 #include <cppuhelper/implbase2.hxx>
 #include <cppuhelper/implbase3.hxx>
-#include <cppuhelper/implbase.hxx>
 #include <uno/lbnames.h>
 
 #include <com/sun/star/lang/XComponent.hpp>


More information about the Libreoffice-commits mailing list