summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/vcl/uitest/uitest.hxx2
-rw-r--r--offapi/com/sun/star/ui/test/XUITest.idl2
-rw-r--r--vcl/source/uitest/uitest.cxx10
-rw-r--r--vcl/source/uitest/uno/uitest_uno.cxx8
4 files changed, 22 insertions, 0 deletions
diff --git a/include/vcl/uitest/uitest.hxx b/include/vcl/uitest/uitest.hxx
index 9f226b8bf581..53a049069a14 100644
--- a/include/vcl/uitest/uitest.hxx
+++ b/include/vcl/uitest/uitest.hxx
@@ -21,6 +21,8 @@ public:
static void executeCommand(const OUString& rCommand);
+ static void executeDialog(const OUString& rCommand);
+
static std::unique_ptr<UIObject> getFocusTopWindow();
};
diff --git a/offapi/com/sun/star/ui/test/XUITest.idl b/offapi/com/sun/star/ui/test/XUITest.idl
index 87a091202ffd..89da44c7d6e7 100644
--- a/offapi/com/sun/star/ui/test/XUITest.idl
+++ b/offapi/com/sun/star/ui/test/XUITest.idl
@@ -18,6 +18,8 @@ interface XUITest
{
void executeCommand([in] string command);
+ void executeDialog([in] string command);
+
XUIObject getTopFocusWindow();
};
diff --git a/vcl/source/uitest/uitest.cxx b/vcl/source/uitest/uitest.cxx
index d8764790f9e6..4484975c44f9 100644
--- a/vcl/source/uitest/uitest.cxx
+++ b/vcl/source/uitest/uitest.cxx
@@ -26,6 +26,16 @@ void UITest::executeCommand(const OUString& rCommand)
SAL_WARN_IF(!bSuccess, "vcl.uitest", "failed to execute command: " << rCommand);
}
+void UITest::executeDialog(const OUString& rCommand)
+{
+ bool bSuccess = comphelper::dispatchCommand(
+ rCommand,
+ {{"SynchronMode", -1, css::uno::Any(false),
+ css::beans::PropertyState_DIRECT_VALUE}});
+
+ SAL_WARN_IF(!bSuccess, "vcl.uitest", "failed to execute dialog command: " << rCommand);
+}
+
std::unique_ptr<UIObject> UITest::getFocusTopWindow()
{
ImplSVData* pSVData = ImplGetSVData();
diff --git a/vcl/source/uitest/uno/uitest_uno.cxx b/vcl/source/uitest/uno/uitest_uno.cxx
index aad296e9b604..c5a15a4f52ee 100644
--- a/vcl/source/uitest/uno/uitest_uno.cxx
+++ b/vcl/source/uitest/uno/uitest_uno.cxx
@@ -40,6 +40,8 @@ public:
void SAL_CALL executeCommand(const OUString& rCommand) override;
+ void SAL_CALL executeDialog(const OUString& rCommand) override;
+
css::uno::Reference<css::ui::test::XUIObject> SAL_CALL getTopFocusWindow() override;
OUString SAL_CALL getImplementationName() override;
@@ -61,6 +63,12 @@ void SAL_CALL UITestUnoObj::executeCommand(const OUString& rCommand)
UITest::executeCommand(rCommand);
}
+void SAL_CALL UITestUnoObj::executeDialog(const OUString& rCommand)
+{
+ SolarMutexGuard aGuard;
+ UITest::executeDialog(rCommand);
+}
+
css::uno::Reference<css::ui::test::XUIObject> SAL_CALL UITestUnoObj::getTopFocusWindow()
{
SolarMutexGuard aGuard;