diff options
-rw-r--r-- | sw/inc/crsrsh.hxx | 6 | ||||
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 11 |
2 files changed, 8 insertions, 9 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index d57520caf610..13489ce684b4 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -447,14 +447,8 @@ public: */ void Combine(); -#ifdef DBG_UTIL void SttCrsrMove(); void EndCrsrMove( const bool bIdleEnd = false ); -#else - void SttCrsrMove() { ++m_nCrsrMove; StartAction(); } - void EndCrsrMove( const bool bIdleEnd = false ) - { EndAction( bIdleEnd, true ); --m_nCrsrMove; } -#endif /* * When the focus is lost the selected ranges are not displayed anymore. diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 2e63da77e63b..a8cd152dcfb0 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -314,22 +314,27 @@ void SwCrsrShell::EndAction( const bool bIdleEnd, const bool DoSetPosX ) } } -#ifdef DBG_UTIL void SwCrsrShell::SttCrsrMove() { +#ifdef DBG_UTIL OSL_ENSURE( m_nCrsrMove < USHRT_MAX, "To many nested CrsrMoves." ); +#endif ++m_nCrsrMove; StartAction(); } void SwCrsrShell::EndCrsrMove( const bool bIdleEnd ) { +#ifdef DBG_UTIL OSL_ENSURE( m_nCrsrMove, "EndCrsrMove() without SttCrsrMove()." ); +#endif EndAction( bIdleEnd, true ); - if( !--m_nCrsrMove ) + --m_nCrsrMove; +#ifdef DBG_UTIL + if( !m_nCrsrMove ) m_bInCMvVisportChgd = false; -} #endif +} bool SwCrsrShell::LeftRight( bool bLeft, sal_uInt16 nCnt, sal_uInt16 nMode, bool bVisualAllowed ) |