diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-01-07 14:24:02 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2018-01-07 18:07:24 +0100 |
commit | 89289fd5df60e73aa5c96c72b94d5b0bef302ef2 (patch) | |
tree | 1d1f94914fd677907df89111891e6cbfe6edb098 /vcl | |
parent | e66a0d7095260c62b067541a0c47ce5c07074f18 (diff) |
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 <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/uitest/uiobject.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
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; |