incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 121165] AnimatedImages : need to start the ImageSet at a given position
Date Sun, 07 Oct 2012 12:22:59 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=121165

Ariel Constenla-Haile <arielch@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|CONFIRMED                   |ACCEPTED
           Assignee|ooo-issues@incubator.apache |arielch@apache.org
                   |.org                        |

--- Comment #3 from Ariel Constenla-Haile <arielch@apache.org> ---
It turns out that the index of the image is stored in a member variable,
mnCurStep, that is reset to 0 only when AutoRepeat is enabled:

IMPL_LINK( Throbber, TimeOutHdl, void*, EMPTYARG )
{
    ::vos::OGuard aGuard( Application::GetSolarMutex() );
    if ( maImageList.empty() )
        return 0;

    if ( mnCurStep < mnStepCount - 1 )
        mnCurStep += 1;
    else
    {
        if ( mbRepeat )
        {
            // start over
            mnCurStep = 0;
        }
        else
        {
            stop();
        }
    }

    SetImage( maImageList[ mnCurStep ] );

    return 0;
}

neither start() nor stop() reset mnCurStep in zero.
The one-line fix is to set mnCurStep = 0 in Throbber::start().

Concerning the API changes, may be the following sounds reasonable:


startAnimation  - starts the animation from the beginning
resumeAnimation - starts the animation from the point where it was stoped
startAnimationAt( nIndex ) - starts the animation at index nIndex, if the index
exists in the image set, if no, it works like startAnimation (it could also
throw some exception)

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message