[Libreoffice-commits] core.git: editeng/source
Ivan Timofeev
timofeev.i.s at gmail.com
Sat Mar 9 07:42:14 PST 2013
editeng/source/outliner/outlvw.cxx | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
New commits:
commit 66b86df5736e84888e2e6d54079e4adef819bbb5
Author: Ivan Timofeev <timofeev.i.s at gmail.com>
Date: Sat Mar 9 19:27:15 2013 +0400
related to fdo#47018: fix DBG_ASSERT in EditEngine::QuickMarkInvalid
regression from 2a6abe21ca8723123c5957369c0c518db37ad02e
Change-Id: I007c54d5b6d28bfbf0bf21c4b85d408181731fd2
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index eb3f877..6bbbf42 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 );
More information about the Libreoffice-commits
mailing list