diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-01-12 04:00:21 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-18 17:01:33 +0200 |
commit | 2bb637426cb48bfcec1e0041c3ad3144d044485e (patch) | |
tree | c455ee71d99eb418713614491326f20990dff9a3 | |
parent | 8317e2e5a9b74b10914072516211a9cc1ed7b6ba (diff) |
uitest: support the parameters in the executeAction command
Change-Id: I78df2fe58b9d1386f360bef4c0eeddb6afe83b8d
-rw-r--r-- | offapi/com/sun/star/ui/test/XUIObject.idl | 4 | ||||
-rw-r--r-- | vcl/source/uitest/uno/uiobject_uno.cxx | 15 | ||||
-rw-r--r-- | vcl/source/uitest/uno/uiobject_uno.hxx | 3 |
3 files changed, 18 insertions, 4 deletions
diff --git a/offapi/com/sun/star/ui/test/XUIObject.idl b/offapi/com/sun/star/ui/test/XUIObject.idl index 0e5192674028..962fde74dd9d 100644 --- a/offapi/com/sun/star/ui/test/XUIObject.idl +++ b/offapi/com/sun/star/ui/test/XUIObject.idl @@ -10,13 +10,15 @@ #ifndef __com_sun_star_ui_test_XUIObject_idl__ #define __com_sun_star_ui_test_XUIObject_idl__ +#include <com/sun/star/beans/PropertyValues.idl> + module com { module sun { module star { module ui { module test { interface XUIObject { XUIObject getChild([in] string id); - void executeAction([in] string action); + void executeAction([in] string action, [in] com::sun::star::beans::PropertyValues propValues); }; }; }; }; }; }; diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx b/vcl/source/uitest/uno/uiobject_uno.cxx index 5913dff112d4..1d464c729926 100644 --- a/vcl/source/uitest/uno/uiobject_uno.cxx +++ b/vcl/source/uitest/uno/uiobject_uno.cxx @@ -28,11 +28,22 @@ css::uno::Reference<css::ui::test::XUIObject> SAL_CALL UIObjectUnoObj::getChild( return new UIObjectUnoObj(std::move(pObj)); } -void SAL_CALL UIObjectUnoObj::executeAction(const OUString& rAction) +void SAL_CALL UIObjectUnoObj::executeAction(const OUString& rAction, const css::uno::Sequence<css::beans::PropertyValue>& rPropValues) throw (css::uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; - mpObj->execute(rAction, StringMap()); + StringMap aMap; + for (sal_Int32 i = 0, n = rPropValues.getLength(); i < n; ++i) + { + OUString aVal; + if (!(rPropValues[i].Value >>= aVal)) + continue; + + aMap[rPropValues[i].Name] = aVal; + } + mpObj->execute(rAction, aMap); +} + } OUString SAL_CALL UIObjectUnoObj::getImplementationName() diff --git a/vcl/source/uitest/uno/uiobject_uno.hxx b/vcl/source/uitest/uno/uiobject_uno.hxx index 10b6fb36bcd4..6817d82588cd 100644 --- a/vcl/source/uitest/uno/uiobject_uno.hxx +++ b/vcl/source/uitest/uno/uiobject_uno.hxx @@ -16,6 +16,7 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/ui/test/XUIObject.hpp> +#include <com/sun/star/beans/PropertyValues.hpp> #include <memory> @@ -39,7 +40,7 @@ public: css::uno::Reference<css::ui::test::XUIObject> SAL_CALL getChild(const OUString& rID) throw (css::uno::RuntimeException, std::exception) override; - void SAL_CALL executeAction(const OUString& rAction) + void SAL_CALL executeAction(const OUString& rAction, const css::uno::Sequence<css::beans::PropertyValue>& xPropValues) throw (css::uno::RuntimeException, std::exception) override; OUString SAL_CALL getImplementationName() |