diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-07-17 13:48:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-07-17 13:52:13 +0100 |
commit | fdb1d62a09f7320ee5c2828aa4ce84248a6e3e4e (patch) | |
tree | 1b9e7d06f26ebd6b962e0d36e6eaf7e92ee28e93 /editeng | |
parent | 8416a65af18b7b030dece09f532235b8bb195a2b (diff) |
Related: rhbz#1117853 nStartPara of EE_PARA_NOT_FOUND
we know that nStartPara is EE_PARA_NOT_FOUND so rOutliner.GetAbsPos must have
returned that, but we don't know the circumstances that lead to that yet.
Change-Id: I53a488317d154b4a3c050248b8737da0a611ca43
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/outliner/outliner.cxx | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx index 4d7214b5b62e..aaa843da69c0 100644 --- a/editeng/source/outliner/outliner.cxx +++ b/editeng/source/outliner/outliner.cxx @@ -384,7 +384,6 @@ sal_Int32 Outliner::GetBulletsNumberingStatus() const OutlinerParaObject* Outliner::CreateParaObject( sal_Int32 nStartPara, sal_Int32 nCount ) const { - if ( static_cast<sal_uLong>(nStartPara) + nCount > static_cast<sal_uLong>(pParaList->GetParagraphCount()) ) nCount = pParaList->GetParagraphCount() - nStartPara; @@ -394,7 +393,7 @@ OutlinerParaObject* Outliner::CreateParaObject( sal_Int32 nStartPara, sal_Int32 if ( ( nStartPara + nCount ) > pEditEngine->GetParagraphCount() ) nCount = pEditEngine->GetParagraphCount() - nStartPara; - if( !nCount ) + if (nCount <= 0) return NULL; EditTextObject* pText = pEditEngine->CreateTextObject( nStartPara, nCount ); |