26#include <com/sun/star/frame/Desktop.hpp>
27#include <com/sun/star/frame/DispatchResultState.hpp>
28#include <com/sun/star/frame/XController.hpp>
29#include <com/sun/star/frame/StartModule.hpp>
37 #error "Who uses \"fpf\" as define. It will overwrite my namespace alias ..."
50 const css::uno::Sequence< css::beans::PropertyValue >& lArguments)
56 const css::uno::Sequence< css::beans::PropertyValue >& ,
57 const css::uno::Reference< css::frame::XDispatchResultListener >& xListener )
59 ::sal_Int16 nResult = css::frame::DispatchResultState::DONTKNOW;
62 nResult = css::frame::DispatchResultState::FAILURE;
66 nResult = css::frame::DispatchResultState::SUCCESS;
75 return css::uno::Sequence< ::sal_Int16 >();
80 return css::uno::Sequence< css::frame::DispatchInformation >();
84 const css::util::URL& )
89 const css::util::URL& )
98 css::uno::Reference< css::frame::XFramesSupplier > xDesktop =
101 FrameListAnalyzer aCheck(
103 css::uno::Reference< css::frame::XFrame >(),
106 bool bIsPossible =
false;
108 if ( ! aCheck.m_xBackingComponent.is()
109 && aCheck.m_lOtherVisibleFrames.empty() )
119 css::uno::Reference< css::frame::XDesktop2> xDesktop = css::frame::Desktop::create(
m_xContext );
121 css::uno::Reference< css::awt::XWindow > xContainerWindow =
xFrame->getContainerWindow();
123 css::uno::Reference< css::frame::XController > xStartModule = css::frame::StartModule::createWithParentWindow(
m_xContext, xContainerWindow);
124 css::uno::Reference< css::awt::XWindow > xComponentWindow(xStartModule, css::uno::UNO_QUERY);
125 xFrame->setComponent(xComponentWindow, xStartModule);
126 xStartModule->attachFrame(
xFrame);
127 xContainerWindow->setVisible(
true);
132 const css::uno::Any& aResult )
134 if ( ! xListener.is())
137 css::frame::DispatchResultEvent
aEvent(
138 css::uno::Reference< css::uno::XInterface >(
static_cast< ::
cppu::OWeakObject*
>(
this), css::uno::UNO_QUERY),
142 xListener->dispatchFinished(
aEvent);
StartModuleDispatcher(css::uno::Reference< css::uno::XComponentContext > xContext)
connect a new StartModuleDispatcher instance to its "owner frame".
virtual ~StartModuleDispatcher() override
does nothing real.
bool implts_isBackingModePossible()
check if StartModule can be shown.
virtual void SAL_CALL removeStatusListener(const css::uno::Reference< css::frame::XStatusListener > &xListener, const css::util::URL &aURL) override
virtual css::uno::Sequence< css::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation(sal_Int16 nCommandGroup) override
virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSupportedCommandGroups() override
virtual void SAL_CALL dispatch(const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments) override
css::uno::Reference< css::uno::XComponentContext > m_xContext
reference to a uno service manager, which can be used to create own needed uno resources.
virtual void SAL_CALL addStatusListener(const css::uno::Reference< css::frame::XStatusListener > &xListener, const css::util::URL &aURL) override
void implts_establishBackingMode()
open the special BackingComponent (now StartModule)
virtual void SAL_CALL dispatchWithNotification(const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments, const css::uno::Reference< css::frame::XDispatchResultListener > &xListener) override
void implts_notifyResultListener(const css::uno::Reference< css::frame::XDispatchResultListener > &xListener, sal_Int16 nState, const css::uno::Any &aResult)
notify a DispatchResultListener.
css::uno::Reference< css::uno::XComponentContext > m_xContext
constexpr OUStringLiteral SPECIALTARGET_BLANK
bool isStartModuleDispatch(css::util::URL const &url)
Reference< XFrame > xFrame