uitest/libreoffice/uno/eventlistener.py | 6 +++++- vcl/source/uitest/uiobject.cxx | 13 +++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-)
New commits: commit 5a61fa1c9ee33e4616ec7277ecf2b3110c0e4589 Author: Markus Mohrhard <[email protected]> Date: Wed Dec 21 14:36:31 2016 +0100 uitest: handle typing in a combobox correctly with sub edits Change-Id: I20ad39075601deef36122f065ddfec8bd63dc1fe Reviewed-on: https://gerrit.libreoffice.org/32282 Tested-by: Jenkins <[email protected]> Reviewed-by: Markus Mohrhard <[email protected]> diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx index 0aff1e0..d5b1d70 100644 --- a/vcl/source/uitest/uiobject.cxx +++ b/vcl/source/uitest/uiobject.cxx @@ -799,6 +799,19 @@ void ComboBoxUIObject::execute(const OUString& rAction, } mxComboBox->Select(); } + else if (rAction == "TYPE") + { + if (mxComboBox->GetSubEdit()) + { + Edit* pEdit = mxComboBox->GetSubEdit(); + std::unique_ptr<UIObject> pObj = EditUIObject::create(pEdit); + pObj->execute(rAction, rParameters); + } + else + WindowUIObject::execute(rAction, rParameters); + } + else + WindowUIObject::execute(rAction, rParameters); } StringMap ComboBoxUIObject::get_state() commit d19307846e6e360aacdec7fc81e3a923d387d1d2 Author: Markus Mohrhard <[email protected]> Date: Wed Dec 21 14:34:42 2016 +0100 uitest: add an optional way to print all received event names Change-Id: I8180d131c2f4dbc9759ca1166192970bc06231c0 Reviewed-on: https://gerrit.libreoffice.org/32280 Tested-by: Jenkins <[email protected]> Reviewed-by: Markus Mohrhard <[email protected]> diff --git a/uitest/libreoffice/uno/eventlistener.py b/uitest/libreoffice/uno/eventlistener.py index 8338f6f..2dbdd68 100644 --- a/uitest/libreoffice/uno/eventlistener.py +++ b/uitest/libreoffice/uno/eventlistener.py @@ -18,12 +18,13 @@ except ImportError: class EventListener(XDocumentEventListener,unohelper.Base): - def __init__(self, xContext, eventNames): + def __init__(self, xContext, eventNames, **kwargs): self.xGEB = xContext.ServiceManager.createInstanceWithContext( "com.sun.star.frame.GlobalEventBroadcaster", xContext) self.xContext = xContext self.executed = False self.eventExecuted = [] + self.printEvents = kwargs.get('printNames', False) if isinstance(eventNames, str): self.eventNames = [eventNames] elif isinstance(eventNames, list): @@ -37,6 +38,9 @@ class EventListener(XDocumentEventListener,unohelper.Base): self.xGEB.removeDocumentEventListener(self) def documentEventOccured(self, event): + if self.printEvents is True: + print(event.EventName) + if event.EventName in self.eventNames: self.executed = True self.eventExecuted.append(event.EventName) _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
