[Libreoffice-commits] core.git: cui/source
Maxim Monastirsky
momonasmon at gmail.com
Sun May 14 20:55:45 UTC 2017
cui/source/customize/cfgutil.cxx | 14 +++++---------
cui/source/tabpages/macroass.cxx | 2 +-
2 files changed, 6 insertions(+), 10 deletions(-)
New commits:
commit a4f512d09ff39ef2a46a7e5ad512460c6093d25a
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Sun May 14 23:49:52 2017 +0300
tdf#107847 Make sure m_xContext is not empty
Change-Id: I21d87b3a3d9732266e8c7d18cc07924700aaaafc
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index c6e310e6505c..ad171a755354 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -676,28 +676,24 @@ void SfxConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponent
SetUpdateMode(false);
ClearAll(); // Remove all old entries from treelist box
+ m_xContext = xContext;
m_xFrame = xFrame;
- if( xContext.is() )
+ if( bEventMode )
{
- m_xContext = xContext;
m_sModuleLongName = sModuleLongName;
-
m_xGlobalCategoryInfo = css::ui::theUICategoryDescription::get( m_xContext );
m_xModuleCategoryInfo.set(m_xGlobalCategoryInfo->getByName(m_sModuleLongName), css::uno::UNO_QUERY_THROW);
m_xUICmdDescription = css::frame::theUICommandDescription::get( m_xContext );
- if ( bEventMode )
- InitModule();
+ InitModule();
}
SAL_INFO("cui.customize", "** ** About to initialise SF Scripts");
// Add Scripting Framework entries
Reference< browse::XBrowseNode > rootNode;
- Reference< XComponentContext > xCtx(
- comphelper::getProcessComponentContext() );
try
{
- Reference< browse::XBrowseNodeFactory > xFac = browse::theBrowseNodeFactory::get( xCtx );
+ Reference< browse::XBrowseNodeFactory > xFac = browse::theBrowseNodeFactory::get( m_xContext );
rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) );
}
catch( Exception& e )
@@ -731,7 +727,7 @@ void SfxConfigGroupListBox::Init(const css::uno::Reference< css::uno::XComponent
}
// add styles
- if ( bEventMode && m_xContext.is() )
+ if ( bEventMode )
{
OUString sStyle(xImp->m_aStrGroupStyles);
SvTreeListEntry *pEntry = InsertEntry( sStyle );
diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx
index f1e56128f2ea..cb454389ea62 100644
--- a/cui/source/tabpages/macroass.cxx
+++ b/cui/source/tabpages/macroass.cxx
@@ -375,7 +375,7 @@ IMPL_LINK( SfxMacroTabPage, TimeOut_Impl, Timer*,, void )
}
// fill macro list
mpImpl->pGroupLB->Init(
- css::uno::Reference<css::uno::XComponentContext >(),
+ comphelper::getProcessComponentContext(),
GetFrame(),
OUString(), false);
if ( pTabDlg )
More information about the Libreoffice-commits
mailing list