From d3efa1d00da2aba4474d785d0b88885686170884 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 24 Oct 2012 16:08:13 +0200 Subject: Related fdo#46808: Improve previous commit slightly Change-Id: I95da6e3082a3ebd0bebabf233497ae40d6398fdd --- extensions/source/nsplugin/source/so_instance.cxx | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'extensions') diff --git a/extensions/source/nsplugin/source/so_instance.cxx b/extensions/source/nsplugin/source/so_instance.cxx index a86ddbeec814..030fd93ae537 100644 --- a/extensions/source/nsplugin/source/so_instance.cxx +++ b/extensions/source/nsplugin/source/so_instance.cxx @@ -32,7 +32,6 @@ #include #include #include -#include #include #include #include @@ -137,7 +136,7 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) Reference< uno::XComponentContext > xContext( xFactoryProperties->getPropertyValue( "DefaultContext" ), UNO_QUERY ); // try to create netscape plugin window - Reference< awt::XToolkit > xToolkit( awt::Toolkit::create(xContext), uno::UNO_QUERY_THROW ); + Reference< awt::XToolkit2 > xToolkit( awt::Toolkit::create(xContext) ); // prepare parameters for plugin window css::uno::Any hwndParent = css::uno::makeAny((sal_Int32)hParent); @@ -148,18 +147,11 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) sal_Int16 nWindowType = css::lang::SystemDependent::SYSTEM_WIN32; #endif //end of WNT - Reference< awt::XSystemChildFactory > xToolkitSystemChildFactory(xToolkit, uno::UNO_QUERY); - if (!xToolkitSystemChildFactory.is()) - { - debug_fprintf(NSP_LOG_APPEND, "print by Nsplugin, get xToolkitSystemChildFactory failure.\n"); - return sal_False; - } - debug_fprintf(NSP_LOG_APPEND, "print by Nsplugin, try to create plugin container window HWIN:%ld.\n", hParent); // create the plugin window Reference< awt::XWindowPeer > xNewWinPeer = - xToolkitSystemChildFactory->createSystemChild( hwndParent, + xToolkit->createSystemChild( hwndParent, css::uno::Sequence(), nWindowType ); if ( !xNewWinPeer.is() ) { -- cgit