22#include <com/sun/star/frame/XFrame.hpp>
23#include <com/sun/star/frame/XStatusListener.hpp>
24#include <com/sun/star/frame/XNotifyingDispatch.hpp>
25#include <com/sun/star/frame/XDispatchInformationProvider.hpp>
26#include <com/sun/star/util/URL.hpp>
27#include <com/sun/star/frame/XDispatchResultListener.hpp>
28#include <com/sun/star/uno/XComponentContext.hpp>
51 css::frame::XNotifyingDispatch,
52 css::frame::XDispatchInformationProvider >
76 css::uno::Reference< css::uno::XComponentContext >
m_xContext;
118 CloseDispatcher(css::uno::Reference< css::uno::XComponentContext > xContext ,
119 const css::uno::Reference< css::frame::XFrame >& xFrame ,
120 std::u16string_view sTarget);
131 const css::uno::Sequence< css::beans::PropertyValue >& lArguments,
132 const css::uno::Reference< css::frame::XDispatchResultListener >& xListener )
override;
135 virtual void SAL_CALL
dispatch (
const css::util::URL& aURL ,
136 const css::uno::Sequence< css::beans::PropertyValue >& lArguments)
override;
137 virtual void SAL_CALL
addStatusListener (
const css::uno::Reference< css::frame::XStatusListener >& xListener ,
138 const css::util::URL& aURL )
override;
139 virtual void SAL_CALL
removeStatusListener(
const css::uno::Reference< css::frame::XStatusListener >& xListener ,
140 const css::util::URL& aURL )
override;
176 bool bCloseAllOtherViewsToo,
177 bool& bControllerSuspended );
233 const css::uno::Any& aResult );
255 std::u16string_view sTarget);
helper to dispatch the URLs ".uno:CloseDoc"/".uno:CloseWin"/".uno:CloseFrame" to close a frame/docume...
virtual css::uno::Sequence< sal_Int16 > SAL_CALL getSupportedCommandGroups() override
virtual ~CloseDispatcher() override
does nothing real.
virtual void SAL_CALL addStatusListener(const css::uno::Reference< css::frame::XStatusListener > &xListener, const css::util::URL &aURL) override
bool implts_prepareFrameForClosing(const css::uno::Reference< css::frame::XFrame > &xFrame, bool bCloseAllOtherViewsToo, bool &bControllerSuspended)
prepare m_xCloseFrame so it should be closeable without problems.
virtual void SAL_CALL removeStatusListener(const css::uno::Reference< css::frame::XStatusListener > &xListener, const css::util::URL &aURL) override
bool implts_terminateApplication()
calls XDesktop->terminate().
std::unique_ptr< vcl::EventPoster > m_aAsyncCallback
used for asynchronous callbacks within the main thread.
css::uno::Reference< css::uno::XComponentContext > m_xContext
reference to a uno service manager, which can be used to create own needed uno resources.
css::uno::Reference< css::uno::XInterface > m_xSelfHold
for asynchronous operations we must hold us self alive!
void implts_notifyResultListener(const css::uno::Reference< css::frame::XDispatchResultListener > &xListener, sal_Int16 nState, const css::uno::Any &aResult)
notify a DispatchResultListener.
virtual css::uno::Sequence< css::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation(sal_Int16 nCommandGroup) override
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
DECL_LINK(impl_asyncCallback, LinkParamNone *, void)
a callback for asynchronous started operations.
static css::uno::Reference< css::frame::XFrame > static_impl_searchRightTargetFrame(const css::uno::Reference< css::frame::XFrame > &xFrame, std::u16string_view sTarget)
try to find the right target frame where this close request must be really done.
EOperation m_eOperation
used inside asynchronous callback to decide, which operation must be executed.
bool implts_closeFrame()
close the member m_xCloseFrame.
css::uno::WeakReference< css::frame::XFrame > m_xCloseFrame
reference to the target frame, which should be closed by this dispatch.
virtual void SAL_CALL dispatch(const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments) override
VclPtr< SystemWindow > m_pSysWindow
EOperation
describe, which request must be done here.
css::uno::Reference< css::frame::XDispatchResultListener > m_xResultListener
holded alive for internally asynchronous operations!
CloseDispatcher(css::uno::Reference< css::uno::XComponentContext > xContext, const css::uno::Reference< css::frame::XFrame > &xFrame, std::u16string_view sTarget)
connect a new CloseDispatcher instance to its frame.
bool implts_establishBackingMode()
set the special BackingComponent (now StartModule) as new component of our m_xCloseFrame.