[Libreoffice-commits] core.git: vcl/source
Markus Mohrhard
markus.mohrhard at googlemail.com
Sun Jan 7 17:07:56 UTC 2018
vcl/source/uitest/uiobject.cxx | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
New commits:
commit 89289fd5df60e73aa5c96c72b94d5b0bef302ef2
Author: Markus Mohrhard <markus.mohrhard at 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 <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at 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;
More information about the Libreoffice-commits
mailing list