From b2cdf8a1eac730f74160d7c7a1ab9ec907dddd23 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Fri, 5 Aug 2022 14:51:30 +0100 Subject: the "CreateWindow" function in svtools is newly removed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I6fb569cf293a896c92bec4c6aae647a0bd02d012 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137871 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- bin/find-can-be-private-symbols.py | 1 - toolkit/source/awt/vclxtoolkit.cxx | 63 +------------------------------------- 2 files changed, 1 insertion(+), 63 deletions(-) diff --git a/bin/find-can-be-private-symbols.py b/bin/find-can-be-private-symbols.py index 7203f8ed8c06..2ac7619d9026 100755 --- a/bin/find-can-be-private-symbols.py +++ b/bin/find-can-be-private-symbols.py @@ -182,7 +182,6 @@ with open("bin/find-can-be-private-symbols.functions.results", "wt") as f: elif sym.endswith("component_getFactory"): continue elif sym == "CreateDialogFactory": continue elif sym == "CreateUnoWrapper": continue - elif sym == "CreateWindow": continue elif sym == "ExportDOC": continue elif sym == "ExportPPT": continue elif sym == "ExportRTF": continue diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index da81df17b2dd..18daef169414 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -403,12 +403,6 @@ Size MessBox::GetOptimalSize() const namespace { -extern "C" typedef vcl::Window* (*FN_SvtCreateWindow)( - rtl::Reference* ppNewComp, - const css::awt::WindowDescriptor* pDescriptor, - vcl::Window* pParent, - WinBits nWinBits ); - class Pause : public Idle { public: @@ -440,9 +434,6 @@ class VCLXToolkit : public cppu::BaseMutex, css::uno::Reference< css::datatransfer::clipboard::XClipboard > mxClipboard; css::uno::Reference< css::datatransfer::clipboard::XClipboard > mxSelection; - oslModule hSvToolsLib; - FN_SvtCreateWindow fnSvtCreateWindow; - ::comphelper::OInterfaceContainerHelper3 m_aTopWindowListeners; ::comphelper::OInterfaceContainerHelper3 m_aKeyHandlers; ::comphelper::OInterfaceContainerHelper3 m_aFocusListeners; @@ -941,9 +932,6 @@ VCLXToolkit::VCLXToolkit(): m_bEventListener(false), m_bKeyListener(false) { - hSvToolsLib = nullptr; - fnSvtCreateWindow = nullptr; - #ifndef IOS osl::Guard< osl::Mutex > aGuard( getInitMutex() ); nVCLToolkitInstanceCount++; @@ -958,15 +946,6 @@ VCLXToolkit::VCLXToolkit(): void SAL_CALL VCLXToolkit::disposing() { -#ifndef DISABLE_DYNLOADING - if ( hSvToolsLib ) - { - osl_unloadModule( hSvToolsLib ); - hSvToolsLib = nullptr; - fnSvtCreateWindow = nullptr; - } -#endif - #ifndef IOS { osl::Guard< osl::Mutex > aGuard( getInitMutex() ); @@ -1855,16 +1834,6 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( rtl::Reference* ppNewCom return pNewWindow; } -#ifndef DISABLE_DYNLOADING - -extern "C" { static void thisModule() {} } - -#else - -extern "C" vcl::Window* SAL_CALL CreateWindow( rtl::Reference* ppNewComp, const css::awt::WindowDescriptor* pDescriptor, vcl::Window* pParent, WinBits nWinBits ); - -#endif - css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( const css::awt::WindowDescriptor& rDescriptor, MessBoxStyle nForceMessBoxStyle ) @@ -1893,37 +1862,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( rtl::Reference pNewComp; - vcl::Window* pNewWindow = nullptr; - // Try to create the window with SvTools - // (do this _before_ creating it on our own: The old mechanism (extended toolkit in SvTools) did it this way, - // and we need to stay compatible) - // try to load the lib - if ( !fnSvtCreateWindow -#ifndef DISABLE_DYNLOADING - && !hSvToolsLib -#endif - ) - { -#ifndef DISABLE_DYNLOADING - OUString aLibName(SVT_DLL_NAME); - hSvToolsLib = osl_loadModuleRelative( - &thisModule, aLibName.pData, SAL_LOADMODULE_DEFAULT ); - if ( hSvToolsLib ) - { - OUString aFunctionName( "CreateWindow" ); - fnSvtCreateWindow = reinterpret_cast(osl_getFunctionSymbol( hSvToolsLib, aFunctionName.pData )); - } -#else - fnSvtCreateWindow = nullptr; -#endif - } - // ask the SvTool creation function - if ( fnSvtCreateWindow ) - pNewWindow = fnSvtCreateWindow( &pNewComp, &rDescriptor, pParent, nWinBits ); - - // if SvTools could not provide a window, create it ourself - if ( !pNewWindow ) - pNewWindow = ImplCreateWindow( &pNewComp, rDescriptor, pParent, nWinBits, aPair.second ); + vcl::Window* pNewWindow = ImplCreateWindow( &pNewComp, rDescriptor, pParent, nWinBits, aPair.second ); DBG_ASSERT( pNewWindow, "createWindow: Unknown Component!" ); SAL_INFO_IF( !pNewComp, "toolkit", "createWindow: No special Interface!" ); -- cgit