https://bugs.documentfoundation.org/show_bug.cgi?id=103210

            Bug ID: 103210
           Summary: Impress creates empty animation steps not tied to any
                    object
           Product: LibreOffice
           Version: 5.1.0.3 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Impress
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: fett_lob...@danielfett.de

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

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to