22#include <com/sun/star/frame/XRecordableDispatch.hpp>
33 return "com.sun.star.comp.framework.DispatchRecorderSupplier";
43 return {
"com.sun.star.frame.DispatchRecorderSupplier" };
119 const css::uno::Sequence< css::beans::PropertyValue >& lArguments ,
120 const css::uno::Reference< css::frame::XDispatch >& xDispatcher )
127 if (!xDispatcher.is())
128 throw css::uno::RuntimeException(
"specification violation: dispatcher is NULL",
static_cast< ::
cppu::OWeakObject*
>(
this));
131 throw css::uno::RuntimeException(
"specification violation: no valid dispatch recorder available",
static_cast< ::
cppu::OWeakObject*
>(
this));
135 css::uno::Reference< css::frame::XRecordableDispatch > xRecordable(
137 css::uno::UNO_QUERY);
139 if (xRecordable.is())
140 xRecordable->dispatchAndRecord(
aURL,lArguments,xRecorder);
147 xDispatcher->dispatch(
aURL,lArguments);
148 xRecorder->recordDispatch(
aURL,lArguments);
154extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
156 css::uno::XComponentContext* , css::uno::Sequence<css::uno::Any>
const& )
constexpr OUStringLiteral sServiceName
implement a supplier for dispatch recorder @descr This supplier can be set on property "DispatchRecor...
virtual void SAL_CALL dispatchAndRecord(const css::util::URL &aURL, const css::uno::Sequence< css::beans::PropertyValue > &lArguments, const css::uno::Reference< css::frame::XDispatch > &xDispatcher) override
execute a dispatch request and record it @descr If given dispatch object provides right recording int...
virtual OUString SAL_CALL getImplementationName() override
DispatchRecorderSupplier()
virtual css::uno::Reference< css::frame::XDispatchRecorder > SAL_CALL getDispatchRecorder() override
provides access to the dispatch recorder of this supplier @descr Such recorder can be used outside to...
css::uno::Reference< css::frame::XDispatchRecorder > m_xDispatchRecorder
provided dispatch recorder of this supplier instance
virtual sal_Bool SAL_CALL supportsService(const OUString &sServiceName) override
virtual void SAL_CALL setDispatchRecorder(const css::uno::Reference< css::frame::XDispatchRecorder > &xRecorder) override
set a new dispatch recorder on this supplier @descr Because there can exist more than one recorder im...
virtual ~DispatchRecorderSupplier() override
standard destructor @descr We are a helper and not a real service.
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
SAL_DLLPUBLIC_EXPORT css::uno::XInterface * framework_DispatchRecorderSupplier_get_implementation(css::uno::XComponentContext *, css::uno::Sequence< css::uno::Any > const &)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)