Kaydet (Commit) 0a36be3f authored tarafından Mike Kaganski's avatar Mike Kaganski

tdf#121591, tdf#119945: ModuleManager::identify throws for embedded modules

Change-Id: Ief1a664fdf26c837fd55c9a236f45aa045067309
Reviewed-on: https://gerrit.libreoffice.org/64256
Tested-by: Jenkins
Reviewed-by: 's avatarMike Kaganski <mike.kaganski@collabora.com>
üst 20b8522e
......@@ -17,6 +17,7 @@
#include <vcl/tabctrl.hxx>
#include <sfx2/viewfrm.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/frame/UnknownModuleException.hpp>
#include <com/sun/star/ui/ContextChangeEventMultiplexer.hpp>
#include <com/sun/star/ui/XContextChangeEventMultiplexer.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
......@@ -208,7 +209,15 @@ bool SfxNotebookBar::IsActive()
return false;
const Reference<frame::XModuleManager> xModuleManager = frame::ModuleManager::create( ::comphelper::getProcessComponentContext() );
eApp = vcl::EnumContext::GetApplicationEnum(xModuleManager->identify(xFrame));
try
{
eApp = vcl::EnumContext::GetApplicationEnum(xModuleManager->identify(xFrame));
}
catch (css::frame::UnknownModuleException& e)
{
SAL_WARN("sfx.appl", "SfxNotebookBar::IsActive(): " + e.Message);
return false;
}
}
else
return false;
......
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