vcl/source/uitest/uiobject.cxx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-)
New commits: commit 89289fd5df60e73aa5c96c72b94d5b0bef302ef2 Author: Markus Mohrhard <markus.mohrh...@googlemail.com> Date: Sun Jan 7 14:24:02 2018 +0100 uitest: port the selection code from multi line edit to normal edit Change-Id: I3ecc2cb55e53af532e5f525542437e904f7ce5dc Reviewed-on: https://gerrit.libreoffice.org/47530 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx index 56373981be74..65a6a09fad43 100644 --- a/vcl/source/uitest/uiobject.cxx +++ b/vcl/source/uitest/uiobject.cxx @@ -631,15 +631,22 @@ void EditUIObject::execute(const OUString& rAction, mxEdit->KeyInput(*itr); } } - else if (rParameters.find("SELECTION") != rParameters.end()) - { - // TODO: moggi: add code - } else { bHandled = false; } } + else if (rAction == "SELECT") + { + if (rParameters.find("FROM") != rParameters.end() && + rParameters.find("TO") != rParameters.end()) + { + long nMin = rParameters.find("FROM")->second.toInt32(); + long nMax = rParameters.find("TO")->second.toInt32(); + Selection aSelection(nMin, nMax); + mxEdit->SetSelection(aSelection); + } + } else { bHandled = false; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits