From b78bd71b8d607e3ff773da1f972fec68934d4840 Mon Sep 17 00:00:00 2001 From: Markus Mohrhard Date: Sat, 21 May 2016 01:22:36 +0200 Subject: uitest: provide a way to jump at the beginning of page Note that page numbers in writer are 1-based Change-Id: I614ff08927b4cb92d3819b557ec6791199da69a4 --- sw/source/uibase/uitest/uiobject.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'sw/source/uibase/uitest/uiobject.cxx') diff --git a/sw/source/uibase/uitest/uiobject.cxx b/sw/source/uibase/uitest/uiobject.cxx index 555aef43f65a..c6df6e1fe663 100644 --- a/sw/source/uibase/uitest/uiobject.cxx +++ b/sw/source/uibase/uitest/uiobject.cxx @@ -56,6 +56,16 @@ void SwEditWinUIObject::execute(const OUString& rAction, mxEditWin->GetView().SetZoom(SvxZoomType::PERCENT, nVal); } } + else if (rAction == "GOTO") + { + if (rParameters.find("PAGE") != rParameters.end()) + { + auto itr = rParameters.find("PAGE"); + OUString aVal = itr->second; + sal_Int32 nVal = aVal.toInt32(); + getWrtShell(mxEditWin).GotoPage(nVal, false); + } + } else WindowUIObject::execute(rAction, rParameters); } -- cgit