diff options
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/wrtsh/delete.cxx | 12 | ||||
-rw-r--r-- | sw/source/ui/wrtsh/wrtsh4.cxx | 5 |
2 files changed, 14 insertions, 3 deletions
diff --git a/sw/source/ui/wrtsh/delete.cxx b/sw/source/ui/wrtsh/delete.cxx index f19455e0d681..940a41148087 100644 --- a/sw/source/ui/wrtsh/delete.cxx +++ b/sw/source/ui/wrtsh/delete.cxx @@ -446,7 +446,17 @@ long SwWrtShell::DelToStartOfSentence() if(IsStartOfDoc()) return 0; OpenMark(); - long nRet = _BwdSentence() ? Delete() : 0; + + SwCrsrSaveState aSaveState( *(_GetCrsr()) ); + sal_Bool bSuccessfulSelection = _BwdSentence(); + if ( _GetCrsr()->IsInProtectTable( sal_True ) + || _GetCrsr()->IsSelOvr( nsSwCursorSelOverFlags::SELOVER_TOGGLE | + nsSwCursorSelOverFlags::SELOVER_CHANGEPOS ) ) + { + bSuccessfulSelection = sal_False; + } + long nRet = bSuccessfulSelection ? Delete() : 0; + CloseMark( 0 != nRet ); return nRet; } diff --git a/sw/source/ui/wrtsh/wrtsh4.cxx b/sw/source/ui/wrtsh/wrtsh4.cxx index 6966e45c4fda..62772766fc4a 100644 --- a/sw/source/ui/wrtsh/wrtsh4.cxx +++ b/sw/source/ui/wrtsh/wrtsh4.cxx @@ -198,14 +198,15 @@ sal_Bool SwWrtShell::_BwdSentence() if(!SwCrsrShell::Left(1,CRSR_SKIP_CHARS)) { Pop(sal_False); - return 0; + return sal_False; } if( !GoStartSentence() && !IsSttPara() ) // not found --> go to the beginning of the paragraph SwCrsrShell::MovePara( fnParaCurr, fnParaStart ); ClearMark(); Combine(); - return 1; + + return sal_True; } sal_Bool SwWrtShell::_FwdPara() |