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 // 30caff391cSHerbert Dürr // For bootstrapping 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 45caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XComponent.hpp" 46caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XInitialization.hpp" 47caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XSingleServiceFactory.hpp" 48caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XSingleComponentFactory.hpp" 49caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XMultiServiceFactory.hpp" 50*5696ffe9SHerbert Dürr #include "cppuhelper/com/sun/star/lang/XMultiComponentFactory.hpp" 51caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XServiceInfo.hpp" 52caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XEventListener.hpp" 53caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XTypeProvider.hpp" 54caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/lang/XUnoTunnel.hpp" 55caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/uno/DeploymentException.hpp" 56caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/uno/XWeak.hpp" 57caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/uno/XCurrentContext.hpp" 58caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/uno/XComponentContext.hpp" 59caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/uno/RuntimeException.hpp" 60caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/beans/PropertyValue.hpp" 61caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/beans/XPropertySet.hpp" 62caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/beans/XMultiPropertySet.hpp" 63caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/container/XEnumerationAccess.hpp" 64caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/container/XEnumeration.hpp" 65caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/container/XHierarchicalNameAccess.hpp" 66caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/container/XSet.hpp" 67caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/bridge/XUnoUrlResolver.hpp" 68caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/bridge/XUnoUrlResolver.hpp" 69caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/io/IOException.hpp" 70caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/io/FilePermission.hpp" 71caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/security/RuntimePermission.hpp" 72caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/loader/XImplementationLoader.hpp" 73caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/security/XAccessController.hpp" 74caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/registry/XRegistryKey.hpp" 75caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/registry/XSimpleRegistry.hpp" 76caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XTypeDescription.hpp" 77caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XEnumTypeDescription.hpp" 78caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XArrayTypeDescription.hpp" 79caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XStructTypeDescription.hpp" 80caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XUnionTypeDescription.hpp" 81caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XCompoundTypeDescription.hpp" 82caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XIndirectTypeDescription.hpp" 83caff391cSHerbert Dürr #include "cppuhelper/com/sun/star/reflection/XMethodParameter.hpp" 84caff391cSHerbert Dürr 85caff391cSHerbert Dürr void primeWeakMap( void) 86caff391cSHerbert Dürr { 87caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XComponent ); 88caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XInitialization ); 89caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XSingleServiceFactory ); 90caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XSingleComponentFactory ); 91caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XMultiServiceFactory ); 92caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XMultiComponentFactory ); 93caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XServiceInfo ); 94caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XEventListener ); 95caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XTypeProvider ); 96caff391cSHerbert Dürr InitTypeDesc( com::sun::star::lang::XUnoTunnel ); 97caff391cSHerbert Dürr InitTypeDesc( com::sun::star::uno::XWeak ); 98caff391cSHerbert Dürr InitTypeDesc( com::sun::star::uno::DeploymentException ); 99caff391cSHerbert Dürr InitTypeDesc( com::sun::star::uno::XCurrentContext ); 100caff391cSHerbert Dürr InitTypeDesc( com::sun::star::uno::XComponentContext ); 101caff391cSHerbert Dürr InitTypeDesc( com::sun::star::uno::RuntimeException ); 102caff391cSHerbert Dürr InitTypeDesc( com::sun::star::beans::PropertyState ); 103caff391cSHerbert Dürr InitTypeDesc( com::sun::star::beans::PropertyValue ); 104caff391cSHerbert Dürr InitTypeDesc( com::sun::star::beans::XPropertySet ); 105caff391cSHerbert Dürr InitTypeDesc( com::sun::star::beans::XMultiPropertySet ); 106caff391cSHerbert Dürr InitTypeDesc( com::sun::star::container::XElementAccess ); 107caff391cSHerbert Dürr InitTypeDesc( com::sun::star::container::XEnumeration ); 108caff391cSHerbert Dürr InitTypeDesc( com::sun::star::container::XEnumerationAccess ); 109caff391cSHerbert Dürr InitTypeDesc( com::sun::star::container::XHierarchicalNameAccess ); 110caff391cSHerbert Dürr InitTypeDesc( com::sun::star::container::XSet ); 111caff391cSHerbert Dürr InitTypeDesc( com::sun::star::io::IOException ); 112caff391cSHerbert Dürr InitTypeDesc( com::sun::star::io::FilePermission ); 113caff391cSHerbert Dürr InitTypeDesc( com::sun::star::security::XAccessController ); 114caff391cSHerbert Dürr InitTypeDesc( com::sun::star::security::RuntimePermission); 115caff391cSHerbert Dürr InitTypeDesc( com::sun::star::loader::XImplementationLoader ); 116caff391cSHerbert Dürr InitTypeDesc( com::sun::star::bridge::XUnoUrlResolver ); 117caff391cSHerbert Dürr InitTypeDesc( com::sun::star::registry::XRegistryKey ); 118caff391cSHerbert Dürr InitTypeDesc( com::sun::star::registry::XSimpleRegistry ); 119caff391cSHerbert Dürr InitTypeDesc( com::sun::star::reflection::XTypeDescription ); 120caff391cSHerbert Dürr InitTypeDesc( com::sun::star::reflection::XEnumTypeDescription ); 121caff391cSHerbert Dürr InitTypeDesc( com::sun::star::reflection::XArrayTypeDescription ); 122caff391cSHerbert Dürr InitTypeDesc( com::sun::star::reflection::XStructTypeDescription ); 123caff391cSHerbert Dürr InitTypeDesc( com::sun::star::reflection::XUnionTypeDescription ); 124caff391cSHerbert Dürr InitTypeDesc( com::sun::star::reflection::XCompoundTypeDescription ); 125caff391cSHerbert Dürr InitTypeDesc( com::sun::star::reflection::XIndirectTypeDescription ); 126caff391cSHerbert Dürr InitTypeDesc( com::sun::star::reflection::XMethodParameter ); 127caff391cSHerbert Dürr } 128caff391cSHerbert Dürr 129