16#include <com/sun/star/frame/ModuleManager.hpp>
17#include <com/sun/star/frame/theDesktop.hpp>
18#include <com/sun/star/frame/thePopupMenuControllerFactory.hpp>
33 css::uno::Reference<css::lang::XComponent> xComponent(
m_xPopupController, css::uno::UNO_QUERY);
35 xComponent->dispose();
60 css::uno::Reference<css::frame::XDesktop2> xDesktop(css::frame::theDesktop::get(xContext));
61 css::uno::Reference<css::frame::XFrame>
xFrame(xDesktop->getActiveFrame());
68 css::uno::Reference<css::frame::XModuleManager> xModuleManager(css::frame::ModuleManager::create(xContext));
69 aModuleName = xModuleManager->identify(
xFrame);
71 catch(
const css::uno::Exception& )
74 css::uno::Sequence<css::uno::Any> aArgs {
83 css::uno::Reference<css::frame::XUIControllerFactory> xPopupMenuControllerFactory =
84 css::frame::thePopupMenuControllerFactory::get(xContext);
86 if (xPopupMenuControllerFactory->hasController(
aCommand, aModuleName))
87 m_xPopupController.set(xPopupMenuControllerFactory->createInstanceWithArgumentsAndContext(
88 aCommand, aArgs, xContext), css::uno::UNO_QUERY);
93 m_xPopupController.set(xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
94 "com.sun.star.comp.framework.ResourceMenuController", aArgs, xContext), css::uno::UNO_QUERY);
A thin wrapper around rtl::Reference to implement the acquire and dispose semantics we want for refer...
Reference< XComponentContext > getProcessComponentContext()
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
Reference< XFrame > xFrame