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