Bug 145010 - Invisible animations in Impress
Summary: Invisible animations in Impress
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.1.5.2 release
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Object-Animations
  Show dependency treegraph
 
Reported: 2021-10-08 21:01 UTC by ns-libreoffice-91934
Modified: 2025-06-02 03:10 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example with an invisible animation between the first and the second visible ones (286.98 KB, application/vnd.oasis.opendocument.presentation)
2021-10-09 06:20 UTC, ns-libreoffice-91934
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ns-libreoffice-91934 2021-10-08 21:01:21 UTC
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.
Comment 1 ns-libreoffice-91934 2021-10-08 21:31:27 UTC
I upgraded to version 7.0.4 and the issue is still the same.
Comment 2 Regina Henschel 2021-10-09 00:17:08 UTC
Please attach a presentation that has the described problems.
Comment 3 ns-libreoffice-91934 2021-10-09 06:20:50 UTC
Created attachment 175608 [details]
Example with an invisible animation between the first and the second visible ones
Comment 4 Regina Henschel 2021-10-09 11:39:31 UTC
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.
Comment 5 ns-libreoffice-91934 2021-10-09 20:53:58 UTC
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).
Comment 6 Regina Henschel 2021-10-09 21:22:52 UTC
(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
Comment 7 ns-libreoffice-91934 2021-10-12 17:13:19 UTC
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 ;)
Comment 8 QA Administrators 2025-06-02 03:10:15 UTC
Dear ns-libreoffice-91934,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug