[Libreoffice-commits] core.git: vcl/source

Tor Lillqvist tml at iki.fi
Mon Feb 4 14:57:08 PST 2013


 vcl/source/control/edit.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit f2133eb31696a417f783f34bb98d980e4ac0b1ff
Author: Tor Lillqvist <tml at iki.fi>
Date:   Tue Feb 5 00:10:33 2013 +0200

    WaE: comparison of integers of different signs: 'long' and 'unsigned long'
    
    Change-Id: I0669a75fcb91a2b713212983d6e04a5e17e297c4

diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 033dd78..80ed748 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -544,7 +544,7 @@ void Edit::ImplRepaint( xub_StrLen nStart, xub_StrLen nEnd, bool bLayout )
 
     if( !aText.isEmpty() )
     {
-        if( 2*aText.getLength() > SAL_N_ELEMENTS(nDXBuffer) )
+        if( (size_t) (2*aText.getLength()) > SAL_N_ELEMENTS(nDXBuffer) )
         {
             pDXBuffer = new sal_Int32[2*(aText.getLength()+1)];
             pDX = pDXBuffer;
@@ -1220,7 +1220,7 @@ void Edit::ImplShowCursor( sal_Bool bOnlyIfVisible )
 
     if( !aText.isEmpty() )
     {
-        if( 2*aText.getLength() > SAL_N_ELEMENTS(nDXBuffer) )
+        if( (size_t) (2*aText.getLength()) > SAL_N_ELEMENTS(nDXBuffer) )
         {
             pDXBuffer = new sal_Int32[2*(aText.getLength()+1)];
             pDX = pDXBuffer;
@@ -1343,7 +1343,7 @@ xub_StrLen Edit::ImplGetCharPos( const Point& rWindowPos ) const
     sal_Int32   nDXBuffer[256];
     sal_Int32*  pDXBuffer = NULL;
     sal_Int32*  pDX = nDXBuffer;
-    if( 2*aText.getLength() > SAL_N_ELEMENTS(nDXBuffer) )
+    if( (size_t) (2*aText.getLength()) > SAL_N_ELEMENTS(nDXBuffer) )
     {
         pDXBuffer = new sal_Int32[2*(aText.getLength()+1)];
         pDX = pDXBuffer;


More information about the Libreoffice-commits mailing list