20#include <config_features.h>
21#include <config_fuzzers.h>
23#include <com/sun/star/frame/XFrame.hpp>
24#include <com/sun/star/view/XSelectionSupplier.hpp>
30#include <osl/diagnose.h>
53 m_xIntercepted->registerDispatchProviderInterceptor(
static_cast<frame::XDispatchProviderInterceptor*
>(
this));
56 uno::Reference< lang::XComponent> xInterceptedComponent(
m_xIntercepted, uno::UNO_QUERY);
57 if (xInterceptedComponent.is())
58 xInterceptedComponent->addEventListener(
static_cast<lang::XEventListener*
>(
this));
68 const util::URL& aURL,
const OUString& aTargetFrameName, sal_Int32 nSearchFlags )
71 uno::Reference< frame::XDispatch> xResult;
73 if(
m_pView &&
aURL.Complete.startsWith(
".uno:DataSourceBrowser/"))
95 uno::Sequence<OUString> aRet =
97 OUString(
".uno:DataSourceBrowser/*")
104 const uno::Sequence< frame::DispatchDescriptor >& aDescripts )
107 uno::Sequence< uno::Reference< frame::XDispatch> > aReturn(aDescripts.getLength());
108 std::transform(aDescripts.begin(), aDescripts.end(), aReturn.getArray(),
109 [
this](
const frame::DispatchDescriptor& rDescr) -> uno::Reference<frame::XDispatch> {
110 return queryDispatch(rDescr.FeatureURL, rDescr.FrameName, rDescr.SearchFlags); });
121 const uno::Reference< frame::XDispatchProvider >& xNewDispatchProvider )
134 const uno::Reference< frame::XDispatchProvider >& xNewSupplier )
145 m_xIntercepted->releaseDispatchProviderInterceptor(
static_cast<frame::XDispatchProviderInterceptor*
>(
this));
146 uno::Reference< lang::XComponent> xInterceptedComponent(
m_xIntercepted, uno::UNO_QUERY);
147 if (xInterceptedComponent.is())
148 xInterceptedComponent->removeEventListener(
static_cast<lang::XEventListener*
>(
this));
159 m_xIntercepted->releaseDispatchProviderInterceptor(
static_cast<frame::XDispatchProviderInterceptor*
>(
this));
160 uno::Reference< lang::XComponent> xInterceptedComponent(
m_xIntercepted, uno::UNO_QUERY);
161 if (xInterceptedComponent.is())
162 xInterceptedComponent->removeEventListener(
static_cast<lang::XEventListener*
>(
this));
172 m_bListenerAdded(false)
181 uno::Reference<view::XSelectionChangeListener> xThis =
this;
182 xSupplier->removeSelectionChangeListener(xThis);
187 const uno::Sequence< beans::PropertyValue >& aArgs)
190 throw uno::RuntimeException();
191#if !HAVE_FEATURE_DBCONNECTIVITY || ENABLE_FUZZERS
203 pDBManager->
Merge(aMergeDesc);
214 SfxCallMode::ASYNCHRON,
220 OSL_FAIL(
"SwXDispatch::dispatch: this URL is not to be dispatched!");
224 frame::FeatureStateEvent
aEvent;
239 for (
auto & status : copyStatusListenerVector)
243 aEvent.FeatureURL = status.aURL;
244 status.xListener->statusChanged(
aEvent );
249 throw uno::RuntimeException();
254 const uno::Reference< frame::XStatusListener >& xControl,
const util::URL& aURL )
257 throw uno::RuntimeException();
265 frame::FeatureStateEvent
aEvent;
266 aEvent.IsEnabled = bEnable;
284 xControl->statusChanged(
aEvent );
294 uno::Reference<view::XSelectionChangeListener> xThis =
this;
295 xSupplier->addSelectionChangeListener(xThis);
301 const uno::Reference< frame::XStatusListener >& xControl,
const util::URL& )
305 [&](
const StatusStruct_Impl& status) { return status.xListener.get() == xControl.get(); }),
310 uno::Reference<view::XSelectionChangeListener> xThis =
this;
311 xSupplier->removeSelectionChangeListener(xThis);
327 frame::FeatureStateEvent
aEvent;
328 aEvent.IsEnabled = bEnable;
334 for (
auto & status : copyStatusListenerVector)
336 aEvent.FeatureURL = status.aURL;
339 status.xListener->statusChanged(
aEvent );
345 uno::Reference<view::XSelectionSupplier> xSupplier(rSource.Source, uno::UNO_QUERY);
346 uno::Reference<view::XSelectionChangeListener> xThis =
this;
347 xSupplier->removeSelectionChangeListener(xThis);
350 lang::EventObject aObject;
355 for (
auto & status : copyStatusListenerVector)
357 status.xListener->disposing(aObject);
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
SfxDispatcher * GetDispatcher()
SfxFrame & GetFrame() const
SfxViewFrame & GetViewFrame() const
bool Merge(const SwMergeDescriptor &rMergeDesc)
Merging of data records into fields.
static void InsertText(SwWrtShell &rSh, const css::uno::Sequence< css::beans::PropertyValue > &rProperties)
SwDBManager * GetDBManager() const
For evaluation of DB fields (new DB-manager).
SwDBData const & GetDBData() const
Database information.
SwWrtShell & GetWrtShell() const
css::view::XSelectionSupplier * GetUNOObject()
ShellMode GetShellMode() const
Used by the UI to modify the document model.
~DispatchMutexLock_Impl()
virtual css::uno::Sequence< css::uno::Reference< css::frame::XDispatch > > SAL_CALL queryDispatches(const css::uno::Sequence< css::frame::DispatchDescriptor > &aDescripts) override
virtual ~SwXDispatchProviderInterceptor() override
css::uno::Reference< css::frame::XDispatchProviderInterception > m_xIntercepted
SwXDispatchProviderInterceptor(SwView &rView)
virtual void SAL_CALL setMasterDispatchProvider(const css::uno::Reference< css::frame::XDispatchProvider > &xNewSupplier) override
css::uno::Reference< css::frame::XDispatch > m_xDispatch
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
virtual void SAL_CALL setSlaveDispatchProvider(const css::uno::Reference< css::frame::XDispatchProvider > &xNewDispatchProvider) override
css::uno::Reference< css::frame::XDispatchProvider > m_xMasterDispatcher
css::uno::Reference< css::frame::XDispatchProvider > m_xSlaveDispatcher
virtual css::uno::Reference< css::frame::XDispatchProvider > SAL_CALL getMasterDispatchProvider() override
virtual css::uno::Reference< css::frame::XDispatch > SAL_CALL queryDispatch(const css::util::URL &aURL, const OUString &aTargetFrameName, sal_Int32 nSearchFlags) override
virtual css::uno::Reference< css::frame::XDispatchProvider > SAL_CALL getSlaveDispatchProvider() override
virtual css::uno::Sequence< OUString > SAL_CALL getInterceptedURLs() override
static const char * GetDBChangeURL()
virtual void SAL_CALL selectionChanged(const css::lang::EventObject &aEvent) override
virtual ~SwXDispatch() override
virtual void SAL_CALL dispatch(const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &aArgs) override
virtual void SAL_CALL addStatusListener(const css::uno::Reference< css::frame::XStatusListener > &xControl, const css::util::URL &aURL) override
std::vector< StatusStruct_Impl > m_aStatusListenerVector
virtual void SAL_CALL disposing(const css::lang::EventObject &Source) override
SwXDispatch(SwView &rView)
virtual void SAL_CALL removeStatusListener(const css::uno::Reference< css::frame::XStatusListener > &xControl, const css::util::URL &aURL) override
css::uno::Sequence< css::beans::PropertyValue > const & createPropertyValueSequence()
void setDataSource(const OUString &_sDataSourceNameOrLocation)
#define FN_PARAM_DATABASE_PROPERTIES
#define FN_MAILMERGE_WIZARD
@ DBMGR_MERGE
Data records in fields.
css::uno::Reference< css::frame::XStatusListener > xListener
const char cURLInsertContent[]
const char cURLFormLetter[]
const char cURLInsertColumns[]
const char cInternalDBChangeNotification[]
const char cURLDocumentDataSource[]