Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Le 07/05/2011 16:01, Julien Nabet a écrit :
Hello,

Here are 2 examples of "Same expression on both sides of '!='" I found :
[sc/source/core/tool/rangeutl.cxx:507] -> [sc/source/core/tool/rangeutl.cxx:507]: (style) Same expression on both sides of '!=' [sc/source/core/tool/rangeutl.cxx:534] -> [sc/source/core/tool/rangeutl.cxx:534]: (style) Same expression on both sides of '!='

Is it a special "C++ thing" (like overloading operator) or is there a problem here ?

Hello,
Here are the context for both of the cppcheck warnings :
    497     if( nOffset >= 0 )
    498     {
    499         sal_Int32 nIndex = IndexOf( sToken, ':', 0, cQuote );
    500         String aUIString(sToken);
    501
    502         if( nIndex < 0 )
    503         {
    504             if ( aUIString.GetChar(0) == (sal_Unicode) '.' )
    505                 aUIString.Erase( 0, 1 );
506 bResult = ((rRange.aStart.Parse( aUIString, const_cast<ScDocument*> (pDocument), eConv) & SCA_VALID) == SCA_VALID);
    507             if (!bResult && eConv != eConv)
    508                 bResult = ((rRange.aStart.Parse(
509 aUIString, const_cast<ScDocument*>(pDocument), eConv) & SCA_VALID) == SCA_VALID);
    510             rRange.aEnd = rRange.aStart;
    511         }
    512         else
    513         {
    514             if ( aUIString.GetChar(0) == (sal_Unicode) '.' )
    515             {
    516                 aUIString.Erase( 0, 1 );
    517                 --nIndex;
    518             }
    519
    520             if ( nIndex < aUIString.Len() - 1 &&
521 aUIString.GetChar((xub_StrLen)nIndex + 1) == (sal_Unicode) '.' )
    522                 aUIString.Erase( (xub_StrLen)nIndex + 1, 1 );
    523
524 bResult = ((rRange.Parse(aUIString, const_cast<ScDocument*> (pDocument), eConv) & SCA_VALID) == SCA_VALID);
    525
526 // #i77703# chart ranges in the file format contain both sheet names, even for an external reference sheet. 527 // This isn't parsed by ScRange, so try to parse the two Addresses then.
    528             if (!bResult)
    529             {
530 bResult = ((rRange.aStart.Parse( aUIString.Copy(0, (xub_StrLen)nIndex), const_cast<ScDocument*>(pDocument), 531 eConv) & SCA_VALID) == SCA_VALID) && 532 ((rRange.aEnd.Parse( aUIString.Copy((xub_StrLen)nIndex+1), const_cast<ScDocument*>(pDocument),
    533                                 eConv) & SCA_VALID) == SCA_VALID);
    534                 if (!bResult && eConv != eConv)
    535                 {
536 bResult = ((rRange.aStart.Parse( aUIString.Copy(0, (xub_StrLen)nIndex), const_cast<ScDocument*>(pDocument),

Julien.


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.