diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 19 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewmdi.cxx | 20 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/select.cxx | 23 |
3 files changed, 62 insertions, 0 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index ccb5ffc84ccf..9ad23eb7a3ca 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -68,6 +68,8 @@ #include <editeng/editview.hxx> #include <PostItMgr.hxx> #include <DocumentSettingManager.hxx> +#include <vcl/uitest/logger.hxx> +#include <vcl/uitest/eventdescription.hxx> using namespace com::sun::star; using namespace util; @@ -1067,6 +1069,21 @@ bool SwCursorShell::SetInFrontOfLabel( bool bNew ) return false; } +namespace { + +void collectUIInformation(const OUString& aPage) +{ + EventDescription aDescription; + aDescription.aAction = "GOTO"; + aDescription.aParameters = {{"PAGE", aPage}}; + aDescription.aID = "writer_edit"; + aDescription.aKeyWord = "SwEditWinUIObject"; + aDescription.aParent = "MainWindow"; + UITestLogger::getInstance().logEvent(aDescription); +} + +} + bool SwCursorShell::GotoPage( sal_uInt16 nPage ) { SET_CURR_SHELL( this ); @@ -1077,6 +1094,8 @@ bool SwCursorShell::GotoPage( sal_uInt16 nPage ) SwCursorSelOverFlags::ChangePos ); if( bRet ) UpdateCursor(SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE|SwCursorShell::READONLY); + + collectUIInformation(OUString::number(nPage)); return bRet; } diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx index b3ac8c5b152b..11ee243edcd5 100644 --- a/sw/source/uibase/uiview/viewmdi.cxx +++ b/sw/source/uibase/uiview/viewmdi.cxx @@ -53,11 +53,29 @@ #include <svx/srchdlg.hxx> +#include <vcl/uitest/logger.hxx> +#include <vcl/uitest/eventdescription.hxx> + sal_uInt16 SwView::m_nMoveType = NID_PGE; sal_Int32 SwView::m_nActMark = 0; using namespace ::com::sun::star::uno; +namespace { + +void collectUIInformation(const OUString& aFactor) +{ + EventDescription aDescription; + aDescription.aID = "writer_edit"; + aDescription.aParameters = {{"ZOOM", aFactor}}; + aDescription.aAction = "SET"; + aDescription.aKeyWord = "SwEditWinUIObject"; + aDescription.aParent = "MainWindow"; + UITestLogger::getInstance().logEvent(aDescription); +} + +} + void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, bool bViewOnly ) { bool const bCursorIsVisible(m_pWrtShell->IsCursorVisible()); @@ -65,6 +83,8 @@ void SwView::SetZoom( SvxZoomType eZoomType, short nFactor, bool bViewOnly ) // fdo#40465 force the cursor to stay in view whilst zooming if (bCursorIsVisible) m_pWrtShell->ShowCursor(); + + collectUIInformation(OUString::number(nFactor)); } void SwView::SetZoom_( const Size &rEditSize, SvxZoomType eZoomType, diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx index f12005e5cbab..3f4c2540f006 100644 --- a/sw/source/uibase/wrtsh/select.cxx +++ b/sw/source/uibase/wrtsh/select.cxx @@ -40,6 +40,8 @@ #include <doc.hxx> #include <wordcountdialog.hxx> #include <memory> +#include <vcl/uitest/logger.hxx> +#include <vcl/uitest/eventdescription.hxx> namespace com { namespace sun { namespace star { namespace util { struct SearchOptions2; @@ -388,6 +390,25 @@ void SwWrtShell::SttSelect() SwTransferable::CreateSelection( *this ); } +namespace { + +void collectUIInformation(SwShellCursor* pCursor) +{ + EventDescription aDescription; + OUString aSelStart = OUString::number(pCursor->Start()->nContent.GetIndex()); + OUString aSelEnd = OUString::number(pCursor->End()->nContent.GetIndex()); + + aDescription.aParameters = {{"START_POS", aSelStart}, {"END_POS", aSelEnd}}; + aDescription.aAction = "SELECT"; + aDescription.aID = "writer_edit"; + aDescription.aKeyWord = "SwEditWinUIObject"; + aDescription.aParent = "MainWindow"; + + UITestLogger::getInstance().logEvent(aDescription); +} + +} + // End of a selection process. void SwWrtShell::EndSelect() @@ -409,6 +430,8 @@ void SwWrtShell::EndSelect() SwWordCountWrapper *pWrdCnt = static_cast<SwWordCountWrapper*>(GetView().GetViewFrame()->GetChildWindow(SwWordCountWrapper::GetChildWindowId())); if (pWrdCnt) pWrdCnt->UpdateCounts(); + + collectUIInformation(GetCursor_()); } void SwWrtShell::ExtSelWrd(const Point *pPt, bool ) |