From ac7141d750447335787829e26271c0490e55826c Mon Sep 17 00:00:00 2001 From: Julien Nabet Date: Sat, 30 Jun 2018 15:54:14 +0200 Subject: Avoid com.sun.star.container.NoSuchElementException "Active" Just launch Writer without any file and look at this kind of logs: warn:unotools:4125:4125:unotools/source/config/confignode.cxx:444: DBG_UNHANDLED_EXCEPTION in com::sun::star::uno::Any utl::OConfigurationNode::getNodeValue(const rtl::OUString&) const type: com.sun.star.container.NoSuchElementException message: Active context: configmgr::RootAccess Change-Id: I42d4a653061accbf124c62d51ea341eed8e44579 Reviewed-on: https://gerrit.libreoffice.org/56760 Tested-by: Jenkins Reviewed-by: Julien Nabet --- sfx2/source/notebookbar/SfxNotebookBar.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sfx2') diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index 3289638bcdef..77ed3f8c495c 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -206,6 +206,8 @@ bool SfxNotebookBar::IsActive() const Reference xModuleManager = frame::ModuleManager::create( ::comphelper::getProcessComponentContext() ); eApp = vcl::EnumContext::GetApplicationEnum(xModuleManager->identify(xFrame)); } + else + return false; OUStringBuffer aPath("org.openoffice.Office.UI.ToolbarMode/Applications/"); aPath.append( lcl_getAppName( eApp ) ); -- cgit