To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=101455


User mba changed the following:

                What    |Old value                 |New value
================================================================================
                  Status|NEW                       |RESOLVED
--------------------------------------------------------------------------------
              Resolution|                          |FIXED
--------------------------------------------------------------------------------




------- Additional comments from [email protected] Tue Sep  1 14:54:32 +0000 
2009 -------
OK, makes sense. Then it also makes sense not to look for brackets. Looks very
simple now and of course works. Please verify:

static BOOL ReadRangeSvIdl( SvStringHashEntry * pName, SvTokenStream & rInStm,
                            ULONG nMin, ULONG nMax, ULONG* pValue )
{
    UINT32 nTokPos = rInStm.Tell();
    SvToken * pTok = rInStm.GetToken_Next();
    if( pTok->Is( pName ) )
    {
        BOOL bOk = FALSE;
        if( rInStm.Read( '=' ) )
        {
            pTok = rInStm.GetToken_Next();
            if( pTok->IsInteger() )
            {
                ULONG n = pTok->GetNumber();
                if ( n >= nMin && n <= nMax )
                {
                    *pValue = n;
                    bOK = TRUE;
                }
            }
        }

        if( bOk )
            return TRUE;
    }

    rInStm.Seek( nTokPos );
    return FALSE;
}

Now the method does much less than the old one, but everything needed at the
only place where it is used.

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to