diff options
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/view/viewfun2.cxx | 25 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun3.cxx | 33 | ||||
-rw-r--r-- | sc/source/ui/view/viewfunc.cxx | 28 |
3 files changed, 83 insertions, 3 deletions
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx index 2e9a0350ffa9..831e4c7dd8ee 100644 --- a/sc/source/ui/view/viewfun2.cxx +++ b/sc/source/ui/view/viewfun2.cxx @@ -41,6 +41,8 @@ #include <vcl/waitobj.hxx> #include <viewfunc.hxx> +#include <vcl/uitest/logger.hxx> +#include <vcl/uitest/eventdescription.hxx> #include <sc.hrc> #include <globstr.hrc> @@ -90,6 +92,21 @@ using namespace com::sun::star; using ::editeng::SvxBorderLine; +namespace { + +void collectUIInformation(const std::map<OUString, OUString>& aParameters,const OUString action) +{ + EventDescription aDescription; + aDescription.aID = "grid_window"; + aDescription.aAction = action; + aDescription.aParameters = aParameters; + aDescription.aParent = "MainWindow"; + aDescription.aKeyWord = "ScGridWinUIObject"; + + UITestLogger::getInstance().logEvent(aDescription); +} +} + using ::std::vector; using ::std::unique_ptr; @@ -1212,7 +1229,9 @@ bool ScViewFunc::MergeCells( bool bApi, bool& rDoContents, bool bCenter ) UpdateInputLine(); } } - + OUString aStartAddress = aMarkRange.aStart.GetColRowString(); + OUString aEndAddress = aMarkRange.aEnd.GetColRowString(); + collectUIInformation({{"RANGE", aStartAddress + ":" + aEndAddress}},"MERGE_CELLS"); return bOk; } @@ -1298,6 +1317,10 @@ bool ScViewFunc::RemoveMerge() if (bOk) pDocSh->UpdateOle(&GetViewData()); } + + OUString Cell_location = aRange.aStart.GetColRowString(); + collectUIInformation({{"CELL", Cell_location }},"UNMERGE_CELL"); + return true; //! bOk ?? } diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index db0391e3b69b..b43debda5e7e 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -29,6 +29,8 @@ #include <tools/urlobj.hxx> #include <sot/exchange.hxx> #include <memory> +#include <vcl/uitest/logger.hxx> +#include <vcl/uitest/eventdescription.hxx> #include <attrib.hxx> #include <patattr.hxx> @@ -62,6 +64,22 @@ using namespace com::sun::star; +namespace { + +void collectUIInformation(const std::map<OUString, OUString>& aParameters,OUString action) +{ + EventDescription aDescription; + aDescription.aID = "grid_window"; + aDescription.aAction = action; + aDescription.aParameters = aParameters; + aDescription.aParent = "MainWindow"; + aDescription.aKeyWord = "ScGridWinUIObject"; + + UITestLogger::getInstance().logEvent(aDescription); +} + +} + // GlobalName of writer-DocShell from comphelper/classids.hxx // C U T @@ -132,6 +150,10 @@ void ScViewFunc::CutToClip() pDocSh->UpdateOle(&GetViewData()); CellContentChanged(); + + OUString aStartAddress = aRange.aStart.GetColRowString(); + OUString aEndAddress = aRange.aEnd.GetColRowString(); + collectUIInformation({{"RANGE", aStartAddress + ":" + aEndAddress}},"CUT"); } else ErrorMessage( STR_NOMULTISELECT ); @@ -163,7 +185,11 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, bool bCut, bool bApi, bool bI if (!bApi) ErrorMessage(STR_NOMULTISELECT); } - + if( !bCut ){ + OUString aStartAddress = aRange.aStart.GetColRowString(); + OUString aEndAddress = aRange.aEnd.GetColRowString(); + collectUIInformation({{"RANGE", aStartAddress + ":" + aEndAddress}},"COPY"); + } return bDone; } @@ -180,6 +206,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b bDone = CopyToClipMultiRange(pClipDoc, rRanges, bCut, bApi, bIncludeObjects); else bDone = CopyToClipSingleRange(pClipDoc, rRanges, bCut, bIncludeObjects); + return bDone; } @@ -1436,7 +1463,9 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc, rProtectedChartRangesVector, aExcludedChartNames, bSameDoc ); } } - + OUString aStartAddress = aMarkRange.aStart.GetColRowString(); + OUString aEndAddress = aMarkRange.aEnd.GetColRowString(); + collectUIInformation({{"RANGE", aStartAddress + ":" + aEndAddress}},"PASTE"); return true; } diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index d58b2324332c..13c8bd708812 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -37,6 +37,8 @@ #include <vcl/waitobj.hxx> #include <stdlib.h> #include <unotools/charclass.hxx> +#include <vcl/uitest/logger.hxx> +#include <vcl/uitest/eventdescription.hxx> #include <viewfunc.hxx> #include <tabvwsh.hxx> @@ -97,6 +99,22 @@ ScViewFunc::~ScViewFunc() { } +namespace { + +void collectUIInformation(const std::map<OUString, OUString>& aParameters,const OUString action) +{ + EventDescription aDescription; + aDescription.aID = "grid_window"; + aDescription.aAction = action; + aDescription.aParameters = aParameters; + aDescription.aParent = "MainWindow"; + aDescription.aKeyWord = "ScGridWinUIObject"; + + UITestLogger::getInstance().logEvent(aDescription); +} + +} + void ScViewFunc::StartFormatArea() { // anything to do? @@ -1616,6 +1634,9 @@ bool ScViewFunc::InsertCells( InsCellCmd eCmd, bool bRecord, bool bPartOfPaste ) ScTabViewShell::notifyAllViewsHeaderInvalidation(ROW_HEADER, GetViewData().GetTabNo()); } } + OUString aStartAddress = aRange.aStart.GetColRowString(); + OUString aEndAddress = aRange.aEnd.GetColRowString(); + collectUIInformation({{"RANGE", aStartAddress + ":" + aEndAddress}},"INSERT_CELLS"); return bSuccess; } else @@ -1701,6 +1722,10 @@ void ScViewFunc::DeleteCells( DelCellCmd eCmd ) ErrorMessage(STR_NOMULTISELECT); } + OUString aStartAddress = aRange.aStart.GetColRowString(); + OUString aEndAddress = aRange.aEnd.GetColRowString(); + collectUIInformation({{"RANGE", aStartAddress + ":" + aEndAddress}},"DELETE_CELLS"); + Unmark(); } @@ -1978,6 +2003,9 @@ void ScViewFunc::DeleteContents( InsertDeleteFlags nFlags ) else StartFormatArea(); // delete attribute is also attribute-change } + OUString aStartAddress = aMarkRange.aStart.GetColRowString(); + OUString aEndAddress = aMarkRange.aEnd.GetColRowString(); + collectUIInformation({{"RANGE", aStartAddress + ":" + aEndAddress}},"DELETE"); } // column width/row height (via header) - undo OK |