1caff391cSHerbert Dürr /************************************************************** 2caff391cSHerbert Dürr * 3caff391cSHerbert Dürr * Licensed to the Apache Software Foundation (ASF) under one 4caff391cSHerbert Dürr * or more contributor license agreements. See the NOTICE file 5caff391cSHerbert Dürr * distributed with this work for additional information 6caff391cSHerbert Dürr * regarding copyright ownership. The ASF licenses this file 7caff391cSHerbert Dürr * to you under the Apache License, Version 2.0 (the 8caff391cSHerbert Dürr * "License"); you may not use this file except in compliance 9caff391cSHerbert Dürr * with the License. You may obtain a copy of the License at 10caff391cSHerbert Dürr * 11caff391cSHerbert Dürr * http://www.apache.org/licenses/LICENSE-2.0 12caff391cSHerbert Dürr * 13caff391cSHerbert Dürr * Unless required by applicable law or agreed to in writing, 14caff391cSHerbert Dürr * software distributed under the License is distributed on an 15caff391cSHerbert Dürr * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16caff391cSHerbert Dürr * KIND, either express or implied. See the License for the 17caff391cSHerbert Dürr * specific language governing permissions and limitations 18caff391cSHerbert Dürr * under the License. 19caff391cSHerbert Dürr * 20caff391cSHerbert Dürr *************************************************************/ 21caff391cSHerbert Dürr 22caff391cSHerbert Dürr // MARKER(update_precomp.py): autogen include statement, do not remove 23caff391cSHerbert Dürr #include "precompiled_cppuhelper.hxx" 24caff391cSHerbert Dürr 25caff391cSHerbert Dürr // The only purpose of this file is to workaround a problem in UNO: 26caff391cSHerbert Dürr // Cppumaker and its brethren emit different implementations for 27caff391cSHerbert Dürr // the same symbol by design (!) which is quite... unfortunate 28caff391cSHerbert Dürr // and can confuse the heck out of dynamic linkers, debuggers, etc. 29caff391cSHerbert Dürr // 30*c52956d9SHerbert Dürr // For bootstrapping the comprehensive descriptions of some UNO types are needed. 31caff391cSHerbert Dürr // The mechanism in this file makes sure that these comprehensive type 32caff391cSHerbert Dürr // descriptions are used to prime the so-called "WeakMap". 33caff391cSHerbert Dürr // 34caff391cSHerbert Dürr // TODO: change cppumaker and its brethren to use different symbol names 35caff391cSHerbert Dürr // for different implementations. In particular "cppu_detail_getUnoType" 36caff391cSHerbert Dürr // should be divided into full, weak and mini implementations. 37caff391cSHerbert Dürr 38caff391cSHerbert Dürr // Types that are candidates for this special workaround are the ones mentioned 39caff391cSHerbert Dürr // by the exceptions thrown from implbase_ex.cxx's __queryDeepNoXInterface() 40caff391cSHerbert Dürr // that also need to added to the makefile's UNOTYPES define 41caff391cSHerbert Dürr 42caff391cSHerbert Dürr #define cppu_detail_getUnoType cppu_full_getUnoType 43caff391cSHerbert Dürr #define InitTypeDesc(T) {(void)cppu_full_getUnoType(static_cast< T * >(NULL));} 44caff391cSHerbert Dürr 45*c52956d9SHerbert Dürr // NOTE: the cppuhelper part in the include paths below ensures that the type descriptions 46*c52956d9SHerbert Dürr // are comprehensive descriptions and not some weak descriptions e.g. from solver 47caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XComponent.hpp" 48caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XInitialization.hpp" 49caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XSingleServiceFactory.hpp" 50caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XSingleComponentFactory.hpp" 51caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XMultiServiceFactory.hpp" 525696ffe9SHerbert Dürr #include "cppuhelper/com/sun/star/lang/XMultiComponentFactory.hpp" 53caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XServiceInfo.hpp" 54caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XEventListener.hpp" 55caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XTypeProvider.hpp" 56caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XUnoTunnel.hpp" 57*c52956d9SHerbert Dürr #include "cppuhelper/com/sun/star/lang/DisposedException.hpp" 58caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/uno/DeploymentException.hpp" 59caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/uno/XWeak.hpp" 60caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/uno/XCurrentContext.hpp" 61caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/uno/XComponentContext.hpp" 62caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/uno/RuntimeException.hpp" 63*c52956d9SHerbert Dürr #include "cppuhelper/com/sun/star/util/XMacroExpander.hpp" 64caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/beans/PropertyValue.hpp" 65caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/beans/XPropertySet.hpp" 66caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/beans/XMultiPropertySet.hpp" 67caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/container/XEnumerationAccess.hpp" 68caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/container/XEnumeration.hpp" 69*c52956d9SHerbert Dürr #include "cppuhelper/com/sun/star/container/XNameAccess.hpp" 70*c52956d9SHerbert Dürr #include "cppuhelper/com/sun/star/container/XNameReplace.hpp" 71*c52956d9SHerbert Dürr #include "cppuhelper/com/sun/star/container/XNameContainer.hpp" 72caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/container/XHierarchicalNameAccess.hpp" 73caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/container/XSet.hpp" 74caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/bridge/XUnoUrlResolver.hpp" 75caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/io/IOException.hpp" 76caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/io/FilePermission.hpp" 77caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/security/RuntimePermission.hpp" 78caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/loader/XImplementationLoader.hpp" 79caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/security/XAccessController.hpp" 80caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/registry/XRegistryKey.hpp" 81caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/registry/XSimpleRegistry.hpp" 82caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XTypeDescription.hpp" 83caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XEnumTypeDescription.hpp" 84caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XArrayTypeDescription.hpp" 85caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XStructTypeDescription.hpp" 86caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XUnionTypeDescription.hpp" 87caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XCompoundTypeDescription.hpp" 88caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XIndirectTypeDescription.hpp" 89*c52956d9SHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XInterfaceTypeDescription.hpp" 90*c52956d9SHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XInterfaceMemberTypeDescription.hpp" 91*c52956d9SHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XInterfaceMethodTypeDescription.hpp" 92caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XMethodParameter.hpp" 93caff391cSHerbert Dürr 94caff391cSHerbert Dürr void primeWeakMap( void) 95caff391cSHerbert Dürr { 96caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XComponent ); 97caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XInitialization ); 98caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XSingleServiceFactory ); 99caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XSingleComponentFactory ); 100caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XMultiServiceFactory ); 101caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XMultiComponentFactory ); 102caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XServiceInfo ); 103caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XEventListener ); 104caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XTypeProvider ); 105caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XUnoTunnel ); 106*c52956d9SHerbert Dürr InitTypeDesc( com::sun::star::lang::DisposedException ); 107caff391cSHerbert Dürr InitTypeDesc( com::sun::star::uno::XWeak ); 108caff391cSHerbert Dürr InitTypeDesc( com::sun::star::uno::DeploymentException ); 109caff391cSHerbert Dürr InitTypeDesc( com::sun::star::uno::XCurrentContext ); 110caff391cSHerbert Dürr InitTypeDesc( com::sun::star::uno::XComponentContext ); 111caff391cSHerbert Dürr InitTypeDesc( com::sun::star::uno::RuntimeException ); 112*c52956d9SHerbert Dürr InitTypeDesc( com::sun::star::util::XMacroExpander ); 113caff391cSHerbert Dürr InitTypeDesc( com::sun::star::beans::PropertyState ); 114caff391cSHerbert Dürr InitTypeDesc( com::sun::star::beans::PropertyValue ); 115caff391cSHerbert Dürr InitTypeDesc( com::sun::star::beans::XPropertySet ); 116caff391cSHerbert Dürr InitTypeDesc( com::sun::star::beans::XMultiPropertySet ); 117caff391cSHerbert Dürr InitTypeDesc( com::sun::star::container::XElementAccess ); 118caff391cSHerbert Dürr InitTypeDesc( com::sun::star::container::XEnumeration ); 119caff391cSHerbert Dürr InitTypeDesc( com::sun::star::container::XEnumerationAccess ); 120caff391cSHerbert Dürr InitTypeDesc( com::sun::star::container::XHierarchicalNameAccess ); 121*c52956d9SHerbert Dürr InitTypeDesc( com::sun::star::container::XNameAccess ); 122*c52956d9SHerbert Dürr InitTypeDesc( com::sun::star::container::XNameReplace ); 123*c52956d9SHerbert Dürr InitTypeDesc( com::sun::star::container::XNameContainer ); 124caff391cSHerbert Dürr InitTypeDesc( com::sun::star::container::XSet ); 125caff391cSHerbert Dürr InitTypeDesc( com::sun::star::io::IOException ); 126caff391cSHerbert Dürr InitTypeDesc( com::sun::star::io::FilePermission ); 127caff391cSHerbert Dürr InitTypeDesc( com::sun::star::security::XAccessController ); 128caff391cSHerbert Dürr InitTypeDesc( com::sun::star::security::RuntimePermission); 129caff391cSHerbert Dürr InitTypeDesc( com::sun::star::loader::XImplementationLoader ); 130caff391cSHerbert Dürr InitTypeDesc( com::sun::star::bridge::XUnoUrlResolver ); 131caff391cSHerbert Dürr InitTypeDesc( com::sun::star::registry::XRegistryKey ); 132caff391cSHerbert Dürr InitTypeDesc( com::sun::star::registry::XSimpleRegistry ); 133caff391cSHerbert Dürr InitTypeDesc( com::sun::star::reflection::XTypeDescription ); 134caff391cSHerbert Dürr InitTypeDesc( com::sun::star::reflection::XEnumTypeDescription ); 135caff391cSHerbert Dürr InitTypeDesc( com::sun::star::reflection::XArrayTypeDescription ); 136caff391cSHerbert Dürr InitTypeDesc( com::sun::star::reflection::XStructTypeDescription ); 137caff391cSHerbert Dürr InitTypeDesc( com::sun::star::reflection::XUnionTypeDescription ); 138caff391cSHerbert Dürr InitTypeDesc( com::sun::star::reflection::XCompoundTypeDescription ); 139caff391cSHerbert Dürr InitTypeDesc( com::sun::star::reflection::XIndirectTypeDescription ); 140*c52956d9SHerbert Dürr InitTypeDesc( com::sun::star::reflection::XInterfaceTypeDescription ); 141*c52956d9SHerbert Dürr InitTypeDesc( com::sun::star::reflection::XInterfaceMemberTypeDescription ); 142*c52956d9SHerbert Dürr InitTypeDesc( com::sun::star::reflection::XInterfaceMethodTypeDescription ); 143caff391cSHerbert Dürr InitTypeDesc( com::sun::star::reflection::XMethodParameter ); 144caff391cSHerbert Dürr } 145caff391cSHerbert Dürr 146