summaryrefslogtreecommitdiff
path: root/editeng/source/outliner
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2013-03-09 19:27:15 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2013-03-09 19:35:13 +0400
commit66b86df5736e84888e2e6d54079e4adef819bbb5 (patch)
treec83f421f3445a2887910b48f0a1bb35ad8281e27 /editeng/source/outliner
parent6a7ab93ad08fb000bbc5898929e89fd0532894a9 (diff)
related to fdo#47018: fix DBG_ASSERT in EditEngine::QuickMarkInvalid
regression from 2a6abe21ca8723123c5957369c0c518db37ad02e Change-Id: I007c54d5b6d28bfbf0bf21c4b85d408181731fd2
Diffstat (limited to 'editeng/source/outliner')
-rw-r--r--editeng/source/outliner/outlvw.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index eb3f877fcde6..6bbbf42099a2 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -919,7 +919,9 @@ void OutlinerView::ToggleBullets()
// to sal_uInt16 without check, if the count is 0.
sal_uInt16 nParaCount = (sal_uInt16) (pOwner->pParaList->GetParagraphCount());
pOwner->ImplCheckParagraphs( aSel.nStartPara, nParaCount );
- pOwner->pEditEngine->QuickMarkInvalid( ESelection( aSel.nStartPara, 0, nParaCount, 0 ) );
+
+ sal_uInt16 nEndPara = (nParaCount > 0) ? nParaCount-1 : nParaCount;
+ pOwner->pEditEngine->QuickMarkInvalid( ESelection( aSel.nStartPara, 0, nEndPara, 0 ) );
pOwner->pEditEngine->SetUpdateMode( bUpdate );
@@ -951,9 +953,10 @@ void OutlinerView::EnableBullets()
// It is not a good idea to substract 1 from a count and cast the result
// to sal_uInt16 without check, if the count is 0.
sal_uInt16 nParaCount = (sal_uInt16) (pOwner->pParaList->GetParagraphCount());
-
pOwner->ImplCheckParagraphs( aSel.nStartPara, nParaCount );
- pOwner->pEditEngine->QuickMarkInvalid( ESelection( aSel.nStartPara, 0, nParaCount, 0 ) );
+
+ sal_uInt16 nEndPara = (nParaCount > 0) ? nParaCount-1 : nParaCount;
+ pOwner->pEditEngine->QuickMarkInvalid( ESelection( aSel.nStartPara, 0, nEndPara, 0 ) );
pOwner->pEditEngine->SetUpdateMode( bUpdate );