diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-09-19 21:01:13 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-09-19 21:02:45 +0200 |
commit | 2855009f8fd1670c804996d64336ce5c3f45b175 (patch) | |
tree | 1dc7db7fa317bf5b2a63ffb32745785e7f5c59ca /sw | |
parent | af4b6c94c68b5f67b931cde8d0acda6ec8b288bb (diff) |
SwCrsrShell::Combine: this can be assert
Change-Id: Ia23804f213f80f4b31f1e31491dfc87d2d49f46a
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 187095ca543a..64da8ea7f483 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1987,13 +1987,10 @@ void SwCrsrShell::Combine() // rhbz#689053: IsSelOvr must restore the saved stack position, not the // current one, because current point + stack mark may be invalid PaM SwCrsrSaveState aSaveState(*pCrsrStk); - if( pCrsrStk->HasMark() ) // only if GetMark was set - { - bool const bResult = - CheckNodesRange( pCrsrStk->GetMark()->nNode, pCurCrsr->GetPoint()->nNode, sal_True ); - OSL_ENSURE(bResult, "StackCrsr & current Crsr not in same Section."); - (void) bResult; // non-debug: unused - } + // stack cursor & current cursor in same Section? + assert(!pCrsrStk->HasMark() || + CheckNodesRange(pCrsrStk->GetMark()->nNode, + pCurCrsr->GetPoint()->nNode, true)); *pCrsrStk->GetPoint() = *pCurCrsr->GetPoint(); pCrsrStk->GetPtPos() = pCurCrsr->GetPtPos(); @@ -2009,7 +2006,9 @@ void SwCrsrShell::Combine() if( !pCurCrsr->IsInProtectTable( sal_True ) && !pCurCrsr->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) ) + { UpdateCrsr(); // update current cursor + } } |