[Libreoffice-commits] core.git: sfx2/source

Julien Nabet serval2412 at yahoo.fr
Sat Jun 30 15:45:35 UTC 2018


 sfx2/source/notebookbar/SfxNotebookBar.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit ac7141d750447335787829e26271c0490e55826c
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Sat Jun 30 15:54:14 2018 +0200

    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 <serval2412 at yahoo.fr>

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<frame::XModuleManager> 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 ) );


More information about the Libreoffice-commits mailing list