Bug 103210 - Impress creates empty animation steps not tied to any object
Summary: Impress creates empty animation steps not tied to any object
Status: RESOLVED DUPLICATE of bug 76700
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
5.1.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL: https://oc.danielfett.de/s/H8Yodzchmp...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-14 08:59 UTC by fett_lobugs
Modified: 2017-05-22 15:04 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fett_lobugs 2016-10-14 08:59:49 UTC
Description:
We have some slideshows that developed problems with "empty" animation steps. These are not visible in the custom animations box, yet when I present the slides I have to click eight or more times to advance to the next animation step. For larger slidesets, this also breaks going back in the animation steps; instead of going back, I will be thrown to some other slide. (Going back to the beginning of the presentation is not possible anymore.)

I found the cause when looking at the fodp file of a minimum (non)working example. The empty animation steps look as follows:

      <anim:par smil:begin="next">
       <anim:par smil:begin="0s">
        <anim:par smil:begin="0s" smil:fill="hold" presentation:node-type="on-click" presentation:preset-class="entrance" presentation:preset-id="ooo-entrance-appear">
         <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:attributeName="visibility" smil:to="visible"/>
        </anim:par>
       </anim:par>
      </anim:par>

As you can see, there is no smil:targetElement attribute, which is present for normal animation steps:

      <anim:par smil:begin="next">
       <anim:par smil:begin="0s">
        <anim:par smil:begin="0s" smil:fill="hold" presentation:node-type="on-click" presentation:preset-class="entrance" presentation:preset-id="ooo-entrance-appear">
         <anim:set smil:begin="0s" smil:dur="0.001s" smil:fill="hold" smil:targetElement="id1" smil:attributeName="visibility" smil:to="visible"/>
        </anim:par>
       </anim:par>
      </anim:par>

I don't know how these "empty" animation steps developed and precisely in what version of LibreOffice they appeared first.

LO should, however, just remove these empty steps when loading and/or saving the file. 



Steps to Reproduce:
1. Open this slide show: https://oc.danielfett.de/s/H8YodzchmpJewac
2. Try to get to the first animation step.

Actual Results:  
I have to click about eight to nine times.

Expected Results:
I have to click once.


Reproducible: Always

User Profile Reset: No, seems not relevant.

Additional Info:
I wrote a quick python script which removes the empty animation steps from an fodp file:

#!/usr/bin/python

import sys
import re
if len(sys.argv) != 2 or sys.argv[1][-5:] != '.fodp':
    sys.exit("Removes empty animation steps from LibreOffice Impress files.\nOnly works with .fodp files.\nUsage: %s <filename.fodp>")
filename = sys.argv[1]
filename_without_ext = sys.argv[1][:-5]
outfile = filename_without_ext + '-fixed.fodp'
with open(filename, 'r') as f:
    text = f.read()

search = ('<anim:par[^>]*>\s+' 
          '<anim:par[^>]*>\s+'
          '<anim:par[^>]*presentation:node-type[^>]*>\s+'
          '<anim:set ((?!smil:targetElement)[a-zA-Z0-9:-]+="[^"]+"\s*)+/>\s+' 
          '</anim:par>\s+'
          '</anim:par>\s+'
          '</anim:par>')

text = re.sub(search, '', text, 0, re.DOTALL)

with open(outfile, 'w') as f:
    f.write(text)


User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/54.0.2832.2 Safari/537.36
Comment 1 Julien Nabet 2016-10-15 03:55:19 UTC
On which env are you?
Do you reproduce this problem with last stable LO version 5.2.2?
If yes, could you give a minimum step by step process to reproduce this?
Comment 2 fett_lobugs 2016-10-15 18:51:45 UTC
I'm on Linux (Ubuntu 16.04), but I *did* observe this bug already in older versions of Ubuntu (don't remember exact versions). See also the reports of these users, which suggest that the bug existed already in 2013:

- https://ask.libreoffice.org/en/question/65793/invisible-click-events-in-impress/
- https://forum.openoffice.org/en/forum/viewtopic.php?f=10&t=61877
- (not sure if this is the same problem:) https://forum.openoffice.org/en/forum/viewtopic.php?f=10&t=7356

If I open the linked minimal example in 5.2.2, the problem can also be observed.

I can't give instructions for creating the "empty" animation steps. For now, I just know that they appeared in the slides at one point. As far as I know, the slides themselves were not imported from any other office format, but created solely with LO. 

I think, this problem should be attacked from two sides:

1. Empty animation steps should be discarded when opening a file. This should be the short term solution and should be easy to implement. Note that even when fixing the creation of empty animation steps, this solution is still needed for when users open older files.

2. We could investigate how these steps appear and how to avoid that. This could be harder, since I have no clue how the empty animation steps where created in the first place.
Comment 3 QA Administrators 2017-05-02 11:36:44 UTC Comment hidden (obsolete)
Comment 4 fett_lobugs 2017-05-22 15:04:36 UTC

*** This bug has been marked as a duplicate of bug 76700 ***