Kaydet (Commit) eaf41045 authored tarafından Miklos Vajna's avatar Miklos Vajna

comphelper::dispatchCommand: allow passing command arguments

Change-Id: I6464c5d1a46fadac2510700101f3c8cc29dd7995
üst 017f2507
......@@ -30,7 +30,7 @@ using namespace css;
namespace comphelper {
bool dispatchCommand(const OUString& rCommand)
bool dispatchCommand(const OUString& rCommand, const css::uno::Sequence<css::beans::PropertyValue>& rArguments)
{
// Target where we will execute the .uno: command
uno::Reference<uno::XComponentContext> xContext = ::comphelper::getProcessComponentContext();
......@@ -54,7 +54,7 @@ bool dispatchCommand(const OUString& rCommand)
return false;
// And do the work...
xDisp->dispatch(aCommandURL, uno::Sequence<beans::PropertyValue>());
xDisp->dispatch(aCommandURL, rArguments);
return true;
}
......
......@@ -705,7 +705,7 @@ static void doc_postUnoCommand(LibreOfficeKitDocument* /*pThis*/, const char* pC
{
OUString aCommand(pCommand, strlen(pCommand), RTL_TEXTENCODING_UTF8);
if (!comphelper::dispatchCommand(aCommand))
if (!comphelper::dispatchCommand(aCommand, uno::Sequence<beans::PropertyValue>()))
{
gImpl->maLastExceptionMsg = "Failed to dispatch the .uno: command";
}
......
......@@ -12,6 +12,8 @@
#include <comphelper/comphelperdllapi.h>
#include <rtl/ustring.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
namespace comphelper
{
......@@ -22,7 +24,7 @@ namespace comphelper
@return true on success.
*/
COMPHELPER_DLLPUBLIC bool dispatchCommand(const OUString& rCommand);
COMPHELPER_DLLPUBLIC bool dispatchCommand(const OUString& rCommand, const css::uno::Sequence<css::beans::PropertyValue>& rArguments);
}
......
......@@ -599,7 +599,7 @@ sal_IntPtr Button::dispatchCommandHandler(void *, void *pCaller)
if (pButton == NULL)
return 0;
if (!comphelper::dispatchCommand(pButton->maCommand))
if (!comphelper::dispatchCommand(pButton->maCommand, uno::Sequence<beans::PropertyValue>()))
return 0;
return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment