Bug 99617 - FILEOPEN pptx animation "rotate" is wrongly converted
Summary: FILEOPEN pptx animation "rotate" is wrongly converted
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
4.2.5.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:5.4.0
Keywords:
Depends on:
Blocks: Object-Animations
  Show dependency treegraph
 
Reported: 2016-05-01 20:53 UTC by Regina Henschel
Modified: 2021-11-04 16:54 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Wrong import of rotate animation (33.83 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2016-05-01 20:53 UTC, Regina Henschel
Details
reason is missing convert (725 bytes, patch)
2017-02-12 21:46 UTC, Regina Henschel
Details
rotate from 150° to 270° (32.97 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2017-02-14 19:23 UTC, Regina Henschel
Details
counter-clock wise 180° set in UI of PowerPoint (32.83 KB, application/vnd.openxmlformats-officedocument.presentationml.presentation)
2017-02-14 19:26 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2016-05-01 20:53:50 UTC
Created attachment 124771 [details]
Wrong import of rotate animation

Open the attached file and play the presentation. Click on the arrow. In PowerPoint it rotates 1 1/4 times. The setting in PowerPoint is rotate 360° clockwise in 1s, repeat it 1.25 times. The result is an arrow pointing downwards.

In LibreOffice it rotates very very often. It seems that the rotating angle or the repeat value is interpreted totally wrong.

PowerPoint has the value <p:animRot by="21600000"> in this file. Because 1 "PowerPoint-angle-unit" = 1/60000 degree and svg/smil unit is degree, it has to be imported as 360 degree.

PowerPoint sets <p:cTn repeatCount="1250">. That means 1.25 times. As LibreOffice currently cannot use noninteger smil:repeatCount, I expect that it is rounded to 1 or 2.

The missing feature of noninteger repeatCount in ODF is tracked in https://issues.oasis-open.org/browse/OFFICE-2129. But that problem is different from the too much rotating.
Comment 1 raal 2016-05-02 07:11:02 UTC
Confirm.
Comment 2 Regina Henschel 2017-02-12 21:46:43 UTC
Created attachment 131156 [details]
reason is missing convert

This would fix the bug. But do not yet merge, it is only for information.

I think, that converting a PowerPoint angle unit to degree is such a common task, that there should be a tool already for it. But I do not find such.
I'll ask on the dev-list.
Comment 3 Regina Henschel 2017-02-13 20:23:18 UTC
"from" and "to" need the same converting. A suitable place for adding a common converting function is in include/oox/drawingml/drawingmltypes.hxx.
[I do not assign the issue to me, because I do not know, whether I will have enough time in the near future to write and test the code.]
Comment 4 Regina Henschel 2017-02-14 19:23:33 UTC
Created attachment 131220 [details]
rotate from 150° to 270°

LibreOffice has no UI for it. There should be a jump to 150°, but I cannot notice that. The stop at 270° seems to work. Roundtrip test not possible because of bug 106002.
Comment 5 Regina Henschel 2017-02-14 19:26:29 UTC
Created attachment 131221 [details]
counter-clock wise 180° set in UI of PowerPoint

Another test file.
Comment 6 Regina Henschel 2017-02-14 19:28:50 UTC
File "reason is missing convert" is obsolete because new patch is in Gerrit for review.
Comment 7 Commit Notification 2017-03-20 21:27:47 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=386748d514fe1c84e4d373b828841308580665a8

tdf#99617 convert powerpoint angle to degree

It will be available in 5.4.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Xisco Faulí 2017-06-09 10:04:03 UTC
Hello,
Is this bug fixed?
If so, could you please close it as RESOLVED FIXED?
Comment 9 Regina Henschel 2017-06-09 18:12:09 UTC
Fixed in Version: 5.4.0.0.alpha1+
Build ID: 8c0be54a7da6262dffe04357121814dd22b5d7fe
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@62-TDF, Branch:MASTER, Time: 2017-05-15_01:35:45
Locale: de-DE (de_DE); Calc: group
Comment 10 Xisco Faulí 2021-11-04 16:54:46 UTC
The fix is covered by the unittest for bug 112280 -> http://cgit.freedesktop.org/libreoffice/core/commit/?id=d921d4fd24b6416e00069678886f9692ffb4a008