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