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

Ahmed ElShreif (via logerrit) logerrit at kemper.freedesktop.org
Tue Oct 13 18:37:24 UTC 2020


 vcl/source/control/ivctrl.cxx |   17 +++++++++++++++++
 vcl/source/uitest/logger.cxx  |    5 +++++
 2 files changed, 22 insertions(+)

New commits:
commit f558d810de845ad1dd52632ca0a2cae4733ed6e6
Author:     Ahmed ElShreif <aelshreif7 at gmail.com>
AuthorDate: Fri Aug 28 08:25:28 2020 +0200
Commit:     Ahmed ElShreif <aelshreif7 at gmail.com>
CommitDate: Tue Oct 13 20:36:45 2020 +0200

    uilogger : Add support in the Logger and DSL for Vertical Tab
    
    For example the DSL syntax will be:
            >> Choose Tab number 2 in 'tab_id' from parent_id
    
    We don't need DSL change as it will already handled by normal Tab grammar
    
    Change-Id: I51f294134be88c4ac88baf73c53d81187a023061
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101516
    Tested-by: Jenkins
    Reviewed-by: Ahmed ElShreif <aelshreif7 at gmail.com>

diff --git a/vcl/source/control/ivctrl.cxx b/vcl/source/control/ivctrl.cxx
index 03f820534392..5ce9b84e1f85 100644
--- a/vcl/source/control/ivctrl.cxx
+++ b/vcl/source/control/ivctrl.cxx
@@ -28,10 +28,26 @@
 #include <vcl/tabctrl.hxx>
 #include <vcl/vclevent.hxx>
 #include <vcl/uitest/uiobject.hxx>
+#include <vcl/uitest/logger.hxx>
+#include <vcl/uitest/eventdescription.hxx>
 #include <verticaltabctrl.hxx>
 
 using namespace ::com::sun::star::accessibility;
 
+namespace
+{
+void collectUIInformation( const OUString& aID, const OUString& aPos , const OUString& aParent )
+{
+    EventDescription aDescription;
+    aDescription.aID = aID;
+    aDescription.aParameters = {{ "POS" ,  aPos}};
+    aDescription.aAction = "SELECT";
+    aDescription.aParent = aParent;
+    aDescription.aKeyWord = "VerticalTab";
+    UITestLogger::getInstance().logEvent(aDescription);
+}
+}
+
 /*****************************************************************************
 |
 | class : SvxIconChoiceCtrlEntry
@@ -521,6 +537,7 @@ void VerticalTabControl::SetCurPageId(const OString& rId)
         ActivatePage();
         pNewData->xPage->Show();
     }
+    collectUIInformation(get_id(),OStringToOUString(m_sCurrentPageId,RTL_TEXTENCODING_UTF8), GetPageParent()->get_id());
 }
 
 OString VerticalTabControl::GetPageId(sal_uInt16 nIndex) const
diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx
index d67711422bb6..31e8ea836040 100644
--- a/vcl/source/uitest/logger.cxx
+++ b/vcl/source/uitest/logger.cxx
@@ -592,6 +592,11 @@ void UITestLogger::logEvent(const EventDescription& rDescription)
             aLogLine = "Select item no "+ GetValueInMapWithIndex(rDescription.aParameters, 0) +" From List of "+ rDescription.aID;
         }
     }
+    else if(rDescription.aKeyWord == "VerticalTab"){
+        aLogLine = "Choose Tab number " + GetValueInMapWithIndex(rDescription.aParameters, 0) +
+                " in '" + rDescription.aID +
+                "' from " + rDescription.aParent ;
+    }
     else
     {
         aLogLine = rDescription.aKeyWord + " Action:" + rDescription.aAction + " Id:"


More information about the Libreoffice-commits mailing list