diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-05-19 19:30:19 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-06-18 17:02:21 +0200 |
commit | 54d5931880e141fb3eb963da7040035569cfd8f3 (patch) | |
tree | 20fcae7126d8283fb525ead8da88a65c8c98a8c2 /sc/source/ui | |
parent | e0e414cd79c6faaa8a2770742b103b5df7efa487 (diff) |
uitest: allow to select charts in calc
Change-Id: I7fd899d7abda968e9c849e46714208a650b3cfdb
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/inc/uiobject.hxx | 2 | ||||
-rw-r--r-- | sc/source/ui/uitest/uiobject.cxx | 17 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sc/source/ui/inc/uiobject.hxx b/sc/source/ui/inc/uiobject.hxx index 91d21a40a85e..85dee5910e03 100644 --- a/sc/source/ui/inc/uiobject.hxx +++ b/sc/source/ui/inc/uiobject.hxx @@ -11,6 +11,7 @@ class ScGridWindow; class ScDBFunc; +class ScDrawView; class ScGridWinUIObject : public WindowUIObject { @@ -38,6 +39,7 @@ protected: private: ScDBFunc* getDBFunc(); + ScDrawView* getDrawView(); }; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/ui/uitest/uiobject.cxx b/sc/source/ui/uitest/uiobject.cxx index 550aeef41a46..84808c435dfc 100644 --- a/sc/source/ui/uitest/uiobject.cxx +++ b/sc/source/ui/uitest/uiobject.cxx @@ -14,6 +14,7 @@ #include "viewdata.hxx" #include "dbfunc.hxx" +#include "tabvwsh.hxx" #include <svx/svditer.hxx> #include <svx/svdobj.hxx> @@ -65,6 +66,14 @@ ScDBFunc* ScGridWinUIObject::getDBFunc() return pFunc; } +ScDrawView* ScGridWinUIObject::getDrawView() +{ + ScViewData* pViewData = mxGridWindow->getViewData(); + ScDrawView* pDrawView = pViewData->GetScDrawView(); + + return pDrawView; +} + void ScGridWinUIObject::execute(const OUString& rAction, const StringMap& rParameters) { @@ -103,6 +112,14 @@ void ScGridWinUIObject::execute(const OUString& rAction, sal_Int32 nTab = rStr.toUInt32(); mxGridWindow->getViewData()->SetTabNo(nTab); } + else if (rParameters.find("OBJECT") != rParameters.end()) + { + auto itr = rParameters.find("OBJECT"); + const OUString rStr = itr->second; + + ScDrawView* pDrawView = getDrawView(); + pDrawView->SelectObject(rStr); + } else { SAL_WARN("sc.uitest", "unknown selection method"); |