Kaydet (Commit) 21233e29 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Use comphelper::getProcessComponentContext()

The context in the mxContext member does not seem to be usable for
what we need it for here. Using what
comphelper::getProcessComponentContext() returns works better. Let's
hope it has no unintended side-effects.

This likely makes the mxContext member unused, but I did not bother
removing it yet, to keep this commit minimal.

Change-Id: Ic048683b066af7952e2e84b03ea306e7daaba259
Reviewed-on: https://gerrit.libreoffice.org/68592
Tested-by: Jenkins
Reviewed-by: 's avatarTor Lillqvist <tml@collabora.com>
üst fbee1960
......@@ -28,6 +28,7 @@
#include <com/sun/star/ui/UIElementType.hpp>
#include <com/sun/star/ui/theWindowStateConfiguration.hpp>
#include <comphelper/random.hxx>
#include <comphelper/processfactory.hxx>
#include <vbahelper/vbahelper.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
......@@ -110,12 +111,13 @@ void VbaCommandBarHelper::Init( )
throw uno::RuntimeException( "Not implemented" );
}
css::uno::Reference< css::uno::XComponentContext > xContext(comphelper::getProcessComponentContext());
css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xUICfgMgrSupp(
css::ui::theModuleUIConfigurationManagerSupplier::get(mxContext) );
css::ui::theModuleUIConfigurationManagerSupplier::get( xContext ) );
m_xAppCfgMgr.set( xUICfgMgrSupp->getUIConfigurationManager( maModuleId ), uno::UNO_QUERY_THROW );
css::uno::Reference< css::container::XNameAccess > xNameAccess = css::ui::theWindowStateConfiguration::get( mxContext );
css::uno::Reference< css::container::XNameAccess > xNameAccess = css::ui::theWindowStateConfiguration::get( xContext );
m_xWindowState.set( xNameAccess->getByName( maModuleId ), uno::UNO_QUERY_THROW );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment