From d97528da0c70c43fccd3239cbe8e064c3480bba8 Mon Sep 17 00:00:00 2001 From: dipanshu124 Date: Thu, 11 Mar 2021 16:09:43 +0530 Subject: tdf#137494 Add Select Cycle uno command Assign F8 for toggling SelWrd > SelSentence > SelPara > Unselect. Reassign Extend Selection to Alt+F8. Change-Id: I2fc03c70a5786a629169178e64a0b0fd85ba2742 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112326 Tested-by: Jenkins Reviewed-by: Jim Raykowski --- sw/inc/cmdid.h | 1 + sw/inc/view.hxx | 13 +++++++++++++ 2 files changed, 14 insertions(+) (limited to 'sw/inc') diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h index c47002b4b90c..3b8194f52ec4 100644 --- a/sw/inc/cmdid.h +++ b/sw/inc/cmdid.h @@ -726,6 +726,7 @@ #define FN_TO_NEXT_PAGE (FN_SELECTION + 95) #define FN_TO_PREV_PAGE (FN_SELECTION + 96) +#define FN_SELECTION_CYCLE (FN_SELECTION + 97) // QUERY-Block #define FN_TXTATR_INET (FN_QUERY +29) /* INet-Attribute */ diff --git a/sw/inc/view.hxx b/sw/inc/view.hxx index f51a80aea1a3..2b7fe95094ec 100644 --- a/sw/inc/view.hxx +++ b/sw/inc/view.hxx @@ -148,6 +148,18 @@ class SW_DLLPUBLIC SwView: public SfxViewShell friend class SwView_Impl; friend class SwClipboardChangeListener; + // selection cycle + struct SelectCycle + { + Point m_pInitialCursor; + Point m_MarkPt; + Point m_PointPt; + sal_uInt16 nStep; + + SelectCycle() : + nStep(0) {} + }; + // search & replace static SvxSearchItem *s_pSrchItem; @@ -253,6 +265,7 @@ class SW_DLLPUBLIC SwView: public SfxViewShell /// functionality based on the user's view, instead of using the m_aVisArea. SwTwips m_nLOKPageUpDownOffset; + SelectCycle m_aSelectCycle; // methods for searching // set search context SAL_DLLPRIVATE bool SearchAndWrap(bool bApi); -- cgit v1.2.3