[Libreoffice-commits] .: 2 commits - sw/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Nov 18 04:57:08 PST 2010


 sw/source/core/bastyp/calc.cxx    |    3 +--
 sw/source/core/txtnode/txtedt.cxx |    1 -
 2 files changed, 1 insertion(+), 3 deletions(-)

New commits:
commit acc723fc7c542d5de91e72b79f72eeef03ad99f8
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 18 12:42:44 2010 +0000

    assert is meaningless, is always >= 0 by definition

diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index c03ab05..adaa248 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1939,7 +1939,6 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
     }
 
     nTmpChars = nExpandEnd - nExpandBegin - nNumOfMaskedChars;
-    OSL_ENSURE( nTmpChars >= 0, "Less than zero total characters found!" );
 
     // no nTmpCharsExcludingSpaces adjust needed neither for blanked out MaskedChars
     // nor for mid-word selection - set scanner bClip = true at creation
commit b058e4e88848f97ada2e817cf28503158ddc077e
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 18 12:20:29 2010 +0000

    silence && || warning

diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx
index 9b95a6b..42a3503 100644
--- a/sw/source/core/bastyp/calc.cxx
+++ b/sw/source/core/bastyp/calc.cxx
@@ -1096,8 +1096,7 @@ else
                     }
                     break;
 
-        default:	if( ch && pCharClass->isLetter( sCommand, nCommandPos - 1)
-                            || '_' == ch )
+        default:	if (ch && (pCharClass->isLetter( sCommand, nCommandPos - 1) || '_' == ch))
                     {
                         xub_StrLen nStt = nCommandPos-1;
                         while( 0 != (ch = NextCh( sCommand, nCommandPos )) &&


More information about the Libreoffice-commits mailing list