[Libreoffice-commits] core.git: sw/qa vcl/source

Jan Holesovsky (via logerrit) logerrit at kemper.freedesktop.org
Sun Nov 15 14:42:37 UTC 2020


 sw/qa/uitest/writer_tests3/customizeDialog.py |    2 +-
 vcl/source/uitest/uiobject.cxx                |   13 ++++++++++++-
 2 files changed, 13 insertions(+), 2 deletions(-)

New commits:
commit 706aff509857a79cbd93a76410e63931747369f5
Author:     Jan Holesovsky <kendy at collabora.com>
AuthorDate: Fri Oct 16 14:27:27 2020 +0200
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Sun Nov 15 15:41:56 2020 +0100

    uitest: Rename the "SET" to "TYPE" for Edit boxes + implement the real "SET".
    
    To be consistent with the other controls: "TYPE" actually enters the
    characters one by one, while "SET" sets it as a whole.
    
    Change-Id: I967dc270b1d92fe76107732a511cc3e70d3d65c0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104435
    Tested-by: Andras Timar <andras.timar at collabora.com>
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105739
    Tested-by: Jenkins

diff --git a/sw/qa/uitest/writer_tests3/customizeDialog.py b/sw/qa/uitest/writer_tests3/customizeDialog.py
index 5b6ab664346a..52adae2b0ee1 100644
--- a/sw/qa/uitest/writer_tests3/customizeDialog.py
+++ b/sw/qa/uitest/writer_tests3/customizeDialog.py
@@ -35,7 +35,7 @@ class ConfigureDialog(UITestCase):
         initialEntryCount = get_state_as_dict(xfunc)["Children"]
         self.assertTrue(initialEntryCount != 0)
 
-        xSearch.executeAction("SET", mkPropertyValues({"TEXT":"format"}))
+        xSearch.executeAction("TYPE", mkPropertyValues({"TEXT":"format"}))
 
         # Wait for the search/filter op to be completed
         timeout = time.time() + 1
diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx
index 32d8d2417f0f..90322d500611 100644
--- a/vcl/source/uitest/uiobject.cxx
+++ b/vcl/source/uitest/uiobject.cxx
@@ -720,7 +720,7 @@ void EditUIObject::execute(const OUString& rAction,
         const StringMap& rParameters)
 {
     bool bHandled = true;
-    if (rAction == "SET")
+    if (rAction == "TYPE")
     {
         if (rParameters.find("TEXT") != rParameters.end())
         {
@@ -743,6 +743,17 @@ void EditUIObject::execute(const OUString& rAction,
             bHandled = false;
         }
     }
+    else if (rAction == "SET")
+    {
+        auto it = rParameters.find("TEXT");
+        if (it != rParameters.end())
+        {
+            mxEdit->SetText(it->second);
+            mxEdit->Modify();
+        }
+        else
+            bHandled = false;
+    }
     else if (rAction == "SELECT")
     {
         if (rParameters.find("FROM") != rParameters.end() &&


More information about the Libreoffice-commits mailing list