summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authordipanshu124 <dipanshu@iitk.ac.in>2021-03-11 16:09:43 +0530
committerJim Raykowski <raykowj@gmail.com>2021-03-14 16:13:31 +0100
commitd97528da0c70c43fccd3239cbe8e064c3480bba8 (patch)
tree57a8bc78136598c77f6c2e9589f2f974bde38967 /sw/inc
parent0adf52a644aaf85ba2bd666147c62c134234ffbb (diff)
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 <raykowj@gmail.com>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/cmdid.h1
-rw-r--r--sw/inc/view.hxx13
2 files changed, 14 insertions, 0 deletions
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);