I am seeing weird behavior in Impress which can be best explained with invisible animations, i.e. animations that exist but are not shown in the animation list and don’t have a visible effect during presentation. What I did - I created a couple of slides - and added Fade In animation for the text fields. - Then I copied all the slides and adjusted the animations (from “On Click” to “With Previous” and adjustments for Delays etc.). - Finally I saved the file and opened it again. What I observe 1. Many of my animations on the text bodies were gone, i.e. the text was immediately visible in presentation mode. 2. So I created the animations again. But when shifting them in the order, there seems to be an invisible element in the list which I have to pass. What do I mean with this: I have animations A, B and C (in this order), and I want to shift C above B. To achieve this, I have to click “Move Up” twice. I can move B above A with another “Move Up”, so it is not a general problem. It is the same when moving it back down: I can move B below A with one “Move Down”, and need two more “Move Downs” to move B below C. There seems to be an invisible animation item in the list above C! 3. During presentation, I have to click once after the B animation, and one more time to start C. So this invisible animation seems to start On Click, but there is nothing that happens.
I upgraded to version 7.0.4 and the issue is still the same.
Please attach a presentation that has the described problems.
Created attachment 175608 [details] Example with an invisible animation between the first and the second visible ones
That invisible animation node exists in fact in the file. It has no object assigned. You could delete this node in the file. I think, that the issue is here, that LibreOffice does only show animation nodes with assigned object and that is has no tool to clean up the animation tree.
That sounds reasonable. Thanks for looking into this! Can you point me to something how I can read and write ODP files in python? I tried to open it as ZipFile, but to save it again with a modified contents.xml I have to copy all other content to a new ZipFile, and I am not able to read all files (I get "Bad magic number for file header" errors for some files line "Configurations2/accelerator/current.xml" and Pictures).
(In reply to ns-libreoffice-91934 from comment #5) > Can you point me to something how I can read and write ODP files in python? > I tried to open it as ZipFile, but to save it again with a modified > contents.xml I have to copy all other content to a new ZipFile, and I am not > able to read all files (I get "Bad magic number for file header" errors for > some files line "Configurations2/accelerator/current.xml" and Pictures). I cannot help with python. But perhaps this description helps already: https://wiki.documentfoundation.org/WikiAction/edit/Documentation/ODF_Markup?section=3 To get help on python with LibreOffice you can use any of our support channels: https://www.libreoffice.org/get-help/community-support/ or try a forum: https://wiki.documentfoundation.org/Website/Unofficial_Community_Pages
Thank you! I didn't know about the flat file format. I could use it to repair my presentation: ``` import lxml.etree as ET ns = { "smil": "urn:oasis:names:tc:opendocument:xmlns:smil-compatible:1.0", "anim": "urn:oasis:names:tc:opendocument:xmlns:animation:1.0", } path_in = "Quiz1.fodp" path_out = "Quiz2.fodp" # parse fodp as xml with open(path_in, "rb") as odp: root = ET.fromstring(odp.read()) # find damaged animations setsWithoutTarget = root.xpath("//anim:set[not(@smil:targetElement)]", namespaces=ns) setsWithoutTarget.extend(root.xpath("//anim:animateColor[not(@smil:targetElement)]", namespaces=ns)) # remove these nodes for set in setsWithoutTarget: parent = set.getparent() while len(parent.getchildren()) == 1: parent = parent.getparent() parent.getparent().remove(parent) # write new fodp with open(path_out, "w") as odp: odp.write('<?xml version="1.0" encoding="UTF-8"?>\n\n') odp.write(ET.tostring(root, encoding="unicode", pretty_print=True)) ``` It would be good if Impress would automatically remove such invalid animations, but it would be even better if these animations wouldn't be created at all ;)