21#include <com/sun/star/ui/ContextChangeEventObject.hpp>
22#include <com/sun/star/ui/ContextChangeEventMultiplexer.hpp>
23#include <com/sun/star/frame/ModuleManager.hpp>
24#include <osl/diagnose.h>
32using namespace css::uno;
37 : mbIsBroadcasterEnabled(true)
73 const css::uno::Reference<css::frame::XFrame>& rxFrame,
74 const OUString& rsModuleName,
75 const OUString& rsContextName)
80 if (rsContextName.getLength() == 0)
83 if ( ! rxFrame.is() || ! rxFrame->getController().is())
90 const css::ui::ContextChangeEventObject
aEvent(
91 rxFrame->getController(),
101 css::uno::Reference<css::ui::XContextChangeEventMultiplexer> xMultiplexer (
102 css::ui::ContextChangeEventMultiplexer::get(
103 ::comphelper::getProcessComponentContext()));
104 if (xMultiplexer.is())
105 xMultiplexer->broadcastContextChangeEvent(
aEvent, rxFrame->getController());
110 if ( ! rxFrame.is() || ! rxFrame->getController().is())
114 const Reference<XComponentContext> xContext (::comphelper::getProcessComponentContext() );
115 const Reference<frame::XModuleManager> xModuleManager = frame::ModuleManager::create( xContext );
116 return xModuleManager->identify(rxFrame);
static void notifyContextChange(const css::ui::ContextChangeEventObject &rEvent)
Notify about the editing context change.
static const OUString & GetContextName(const Context eContext)
#define TOOLS_WARN_EXCEPTION(area, stream)