[Libreoffice-commits] .: editeng/source

Stephan Bergmann sbergmann at kemper.freedesktop.org
Thu Mar 29 02:04:46 PDT 2012


 editeng/source/editeng/editeng.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit a159dfbea39dd3470837e73bf2df4cd2a0f3e806
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Mar 29 11:04:03 2012 +0200

    -Werror=sign-compare
    
    ...solved by recasting the offending expression.

diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 2b246c9..4f9184f 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1320,7 +1320,7 @@ EditTextObject* EditEngine::CreateTextObject( sal_uInt16 nPara, sal_uInt16 nPara
 {
     DBG_CHKTHIS( EditEngine, 0 );
     DBG_ASSERT( nPara < pImpEditEngine->GetEditDoc().Count(), "CreateTextObject: Startpara out of Range" );
-    DBG_ASSERT( nPara+nParas-1 < pImpEditEngine->GetEditDoc().Count(), "CreateTextObject: Endpara out of Range" );
+    DBG_ASSERT( nParas <= pImpEditEngine->GetEditDoc().Count() - nPara, "CreateTextObject: Endpara out of Range" );
 
     ContentNode* pStartNode = pImpEditEngine->GetEditDoc().SafeGetObject( nPara );
     ContentNode* pEndNode = pImpEditEngine->GetEditDoc().SafeGetObject( nPara+nParas-1 );


More information about the Libreoffice-commits mailing list