[Libreoffice-bugs] [Bug 52120] New: Skip an effect does not work with the hide after animation option

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Jul 15 23:36:57 CEST 2012


https://bugs.freedesktop.org/show_bug.cgi?id=52120

             Bug #: 52120
           Summary: Skip an effect does not work with the hide after
                    animation option
    Classification: Unclassified
           Product: LibreOffice
           Version: 3.7.0.0.alpha0+ Master
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: medium
         Component: Presentation
        AssignedTo: libreoffice-bugs at lists.freedesktop.org
        ReportedBy: mrcekets at gmail.com


Created attachment 64239
  --> https://bugs.freedesktop.org/attachment.cgi?id=64239
a presentation sample

In order to reproduce this bug do as follow:
1) create an empty presentation,
2) add any shape, e.g. a rectangle,
3) add any effect, e.g. change fill color (to blue),
4) open the "Effect Options" dialog and from the "After animation" drop list
select "Hide after animation" option.
5) play the presentation,
6) click to start the "change fill color" effect,
7) click again to skip the effect.

The correct result should be that the rectangle is no more visible as it
happens when the effect is fully played, on the contrary a rectangle with the
fill color changed is shown.

In the attached file you can see a presentation that has been created following
the above steps.

This bug is due to the fact that the "Hide after animation" option is performed
by a <set> animation element whose "begin" attribute is set to a
synchronization value of "<animation-id>.end", where <animation-id> is the id
of the animation element, the "hide after animation" option is related to. The
issue is that when a skip action is performed the "end" method is called
recursively for all the animation nodes that made up the effect, so referring
to the above example when the <change fill color> animation "end" method is
invoked the event that fires the "activate" method of the <set visibility to
hidden> animation node is appended to the event queue, but soon after the "end"
method of the <set visibility to hidden> animation node is invoked too, before
the event queue and the activity queue are processed. So when the event firing
the "activate" method is finally processed the <set visibility to hidden>
animation node is already in "ended" state and hence the hiding action is never
performed.
A possible solution is the one implemented in the JavaScript presentation
engine. The ingredients of this solution are two: 1) the ActivityQueue class
has been provided with a method ("endAll") that invokes the "end" method for
all currently processed activities; 2) when we are skipping the "activate"
method instead of appending a new activity to the activity queue, executes the
end method of the activity immediately.
You can read more on this solution here:
https://docs.google.com/document/d/1GSLPSIWRGSDTSi69dT9Te8tRyTJcAekxT7scoCoGO2M/edit?pli=1#heading=h.nimeoxbia176.
I think you should take into account also these considerations:
https://docs.google.com/document/d/1GSLPSIWRGSDTSi69dT9Te8tRyTJcAekxT7scoCoGO2M/edit?pli=1#heading=h.91ikvmblf8ng

Source reference:
for the C++ implementation of the skip action go to:
http://cgit.freedesktop.org/libreoffice/core/tree/slideshow/source/engine/animationnodes/sequentialtimecontainer.cxx?id=17ac2bb3b37d738488c12b26387822d62c4e8ded&h=master
and look for the SequentialTimeContainer::skipEffect method.
for the JavaScript implementation of the skip action go to:
http://cgit.freedesktop.org/libreoffice/core/tree/filter/source/svg/presentation_engine.js?id=d501d66a69340869227f2051b912614b04799d2c
and look for SequentialTimeContainer.prototype.skipEffect and
AnimationBaseNode.prototype.activate_st methods.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Libreoffice-bugs mailing list