diff options
author | Ivan Timofeev <timofeev.i.s@gmail.com> | 2013-03-09 19:27:15 +0400 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2013-03-09 19:35:13 +0400 |
commit | 66b86df5736e84888e2e6d54079e4adef819bbb5 (patch) | |
tree | c83f421f3445a2887910b48f0a1bb35ad8281e27 | |
parent | 6a7ab93ad08fb000bbc5898929e89fd0532894a9 (diff) |
related to fdo#47018: fix DBG_ASSERT in EditEngine::QuickMarkInvalid
regression from 2a6abe21ca8723123c5957369c0c518db37ad02e
Change-Id: I007c54d5b6d28bfbf0bf21c4b85d408181731fd2
-rw-r--r-- | editeng/source/outliner/outlvw.cxx | 9 |
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 ); |