diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-09-12 17:52:36 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-09-19 10:18:32 +0200 |
commit | ae2232366f00e08c1855667cfaf068269ac9af2f (patch) | |
tree | a77bd8fb1f7f475ddb2597c576958407083c3972 /sw/inc/swcrsr.hxx | |
parent | b6db9f2755b5d64028daa29e1c531a2ecbd2c587 (diff) |
sw_redlinehide_2: view cursor movement, Word/Sentence functions
E.g. Ctrl+Left/Right, Ctrl+Shift+Del/Backspace, double-click to select
word...
These are all implemented in SwCursor, so they need a layout passed to
them from the SwViewShell.
There was a bug in the while loop in SwCursor::GoSentence() case
NEXT_SENT that triggered assert in the mapping code when the
endOfSentence() returned the length of the SwTextNode but then it was
incremented once more.
Change-Id: Ic3866860a8c07774dce35952271c207eb6e7d182
Diffstat (limited to 'sw/inc/swcrsr.hxx')
-rw-r--r-- | sw/inc/swcrsr.hxx | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx index 9ec86d6f5f77..6eccacf8f1e3 100644 --- a/sw/inc/swcrsr.hxx +++ b/sw/inc/swcrsr.hxx @@ -131,25 +131,18 @@ public: const SfxItemSet* rReplSet = nullptr ); // UI versions - bool IsStartWord( sal_Int16 nWordType ) const; - bool IsEndWord( sal_Int16 nWordType ) const; - bool IsInWord( sal_Int16 nWordType ) const; - bool IsStartEndSentence( bool bEnd ) const; - bool GoStartWord(); - bool GoEndWord(); - bool GoNextWord(); - bool GoPrevWord(); + bool IsStartEndSentence(bool bEnd, SwRootFrame const* pLayout) const; bool SelectWord( SwViewShell const * pViewShell, const Point* pPt ); // API versions of above functions (will be used with a different // WordType for the break iterator) - bool IsStartWordWT( sal_Int16 nWordType ) const; - bool IsEndWordWT( sal_Int16 nWordType ) const; - bool IsInWordWT( sal_Int16 nWordType ) const; - bool GoStartWordWT( sal_Int16 nWordType ); - bool GoEndWordWT( sal_Int16 nWordType ); - bool GoNextWordWT( sal_Int16 nWordType ); - bool GoPrevWordWT( sal_Int16 nWordType ); + bool IsStartWordWT(sal_Int16 nWordType, SwRootFrame const* pLayout = nullptr) const; + bool IsEndWordWT(sal_Int16 nWordType, SwRootFrame const* pLayout = nullptr) const; + bool IsInWordWT(sal_Int16 nWordType, SwRootFrame const* pLayout = nullptr) const; + bool GoStartWordWT(sal_Int16 nWordType, SwRootFrame const* pLayout = nullptr); + bool GoEndWordWT(sal_Int16 nWordType, SwRootFrame const* pLayout = nullptr); + bool GoNextWordWT(sal_Int16 nWordType, SwRootFrame const* pLayout = nullptr); + bool GoPrevWordWT(sal_Int16 nWordType, SwRootFrame const* pLayout = nullptr); bool SelectWordWT( SwViewShell const * pViewShell, sal_Int16 nWordType, const Point* pPt ); enum SentenceMoveType @@ -159,11 +152,8 @@ public: START_SENT, END_SENT }; - bool GoSentence(SentenceMoveType eMoveType); - bool GoNextSentence(){return GoSentence(NEXT_SENT);} - bool GoEndSentence(){return GoSentence(END_SENT);} - bool GoStartSentence(){return GoSentence(START_SENT);} - bool ExpandToSentenceBorders(); + bool GoSentence(SentenceMoveType eMoveType, SwRootFrame const*pLayout = nullptr); + bool ExpandToSentenceBorders(SwRootFrame const* pLayout); virtual bool LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode, bool bAllowVisual, bool bSkipHidden, bool bInsertCursor, |