Bug Hunting Session
Bug 108450 - Shrinking of grow/shrink custom animation effect does not work
Summary: Shrinking of grow/shrink custom animation effect does not work
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.0.0
Keywords:
Depends on:
Blocks: Sidebar-Custom-Animation
  Show dependency treegraph
 
Reported: 2017-06-10 19:12 UTC by Iceflower S
Modified: 2019-05-07 08:15 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Shrink using smil:to attribute (67.61 KB, application/vnd.oasis.opendocument.presentation-flat-xml)
2017-06-11 15:16 UTC, Regina Henschel
Details
shrink using smil:by attribute (67.61 KB, application/vnd.oasis.opendocument.presentation-flat-xml)
2017-06-11 15:16 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Iceflower S 2017-06-10 19:12:30 UTC
Description:
Shrink/ gow animation effect of Impress only grows, no matter which value.

@Buovjaga

Steps to Reproduce:
1. Add an Object
2. Choose shrink/grow animation effect
3. Choose a value

Actual Results:  
Shrinks everytime even if the value is below 100%.

Expected Results:
Shrinking if the value is below 100%.


Reproducible: Always

User Profile Reset: YES

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:53.0) Gecko/20100101 Firefox/53.0
Comment 1 Iceflower S 2017-06-10 19:20:25 UTC Comment hidden (obsolete)
Comment 2 Buovjaga 2017-06-10 19:23:27 UTC
Confirmed.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.5.0.0.alpha0+
Build ID: 2802dca10eef67554a81cb2347d5f648fa6fcd63
CPU threads: 8; OS: Linux 4.11; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on June 10th 2017
Comment 3 Regina Henschel 2017-06-10 22:17:01 UTC
I do not know any version, where shrinking has worked.
Comment 4 Yousuf Philips (jay) (retired) 2017-06-11 00:14:39 UTC
I only see Emphasis > Basic > Grow and Shrink in 5.5 master, so not sure how this is inherited from OOo.
Comment 5 Buovjaga 2017-06-11 06:16:03 UTC
(In reply to Yousuf Philips (jay) from comment #4)
> I only see Emphasis > Basic > Grow and Shrink in 5.5 master, so not sure how
> this is inherited from OOo.

Because only the UI is new. According to bug 48918, the effect itself has existed since at least 2006.
Comment 6 Regina Henschel 2017-06-11 15:14:23 UTC
The reason seems to be in the UI. The feature itself works.

Currently LibreOffice writes the attribute smil:by. The values given there are added to the existing value of the animated attribute, here "scale". An unscaled shape has a scale value of 1.

With the UI in LO 3.5.4.2 a setting of "vertical tiny" is written as smil:by="0,0.25". The result is, that the new scale becomes 1.0+0.0=1.0 in x-direction and 1.0+0.25=1.25 in y-direction. The value of the scale-attribute is a factor, so the resulting shape is 125% of the original shape in vertical direction.

The UI in current master, after fix for bug 48918, is worse. It writes smil:by="0,0" for that.

The correct value for getting a shape which is shrunken to 25% of the original size in vertical direction would be smil:by="0,-0.75".

The current UI is bad and therefore I had warned in bug 48918 to simple reactivate it.

The UI needs to give the ability to set grow/shrink with (nearly) arbitrary values and independent for x- and y-direction.

Instead of writing the smil:by attribute it would be possible to use the smil:to attribute as well. That would result in smil:to="1,0.25" for the above example.

I will attach two examples, which show, that LibreOffice can interpret the smil:by attribute with negative values and the smil:to attribute as well. Only the UI is inadequate.
Comment 7 Regina Henschel 2017-06-11 15:16:09 UTC
Created attachment 133956 [details]
Shrink using smil:to attribute

Do not use the animation dialog, but simple play the animation to see the effect.
Comment 8 Regina Henschel 2017-06-11 15:16:43 UTC
Created attachment 133957 [details]
shrink using smil:by attribute

Do not use the animation dialog, but simple play the animation to see the effect.
Comment 9 Buovjaga 2017-06-11 15:21:23 UTC
Ok, let's ping Caolán.
Comment 10 Caolán McNamara 2017-06-11 16:25:13 UTC
I presume I was cc'ed cause of bug 48918 and https://cgit.freedesktop.org/libreoffice/core/commit/?id=7d70516bb1aef8c234788c1cc515d78ac2df7a0c but that's in because of https://gerrit.libreoffice.org/#/c/36524/ and bublies "I'm going to merge this as there is a student who wants to work on the related bug" so presumably bubli can map this to the student who has some thoughts on the issue ?
Comment 11 Katarina Behrens (CIB) 2017-06-12 08:20:48 UTC
Rohan is working on this: https://gerrit.libreoffice.org/#/c/38231/
Comment 12 Katarina Behrens (CIB) 2017-11-16 12:13:47 UTC
Unfortunately I don't see the new extended UI for tweaking growth and shrink dimensions to be production-ready any time soon, so I've fixed at least the part where shrinking the object (tiny & small) actually works. 

However, this makes me wonder:

> An unscaled shape has a scale value of 1.
> 
> With the UI in LO 3.5.4.2 a setting of "vertical tiny" is written as
> smil:by="0,0.25". The result is, that the new scale becomes 1.0+0.0=1.0 in
> x-direction and 1.0+0.25=1.25 in y-direction. The value of the
> scale-attribute is a factor, so the resulting shape is 125% of the original
> shape in vertical direction.

> The correct value for getting a shape which is shrunken to 25% of the
> original size in vertical direction would be smil:by="0,-0.75".

How would a case when the shape would grow to 150% of its original size be written? 

Currently it is saved as smil:by="1.5, 1.5" 
but using the above formula, this results in 1 + 1.5 = 2.5 i.e 250% growth, which feels wrong ... would smil:by="0.5, 0.5" be the correct value?
Comment 13 Regina Henschel 2017-11-16 14:52:47 UTC
(In reply to Katarina Behrens (CIB) from comment #12)

> How would a case when the shape would grow to 150% of its original size be
> written? 
> 
> Currently it is saved as smil:by="1.5, 1.5" 
> but using the above formula, this results in 1 + 1.5 = 2.5 i.e 250% growth,
> which feels wrong ... would smil:by="0.5, 0.5" be the correct value?

You can use either smil:by="0.5,0.5" or smil:to="1.5,1.5". You can test it easily. Change the file manually and run the presentation.
Comment 14 Regina Henschel 2017-11-16 15:00:06 UTC
But smil:to is absolute, and smil:by is relative to the previous state. So smil:to="1.5,1.5" is only equal to smil:by="0.5,0.5", if you start with a scale of 1.
Comment 15 Commit Notification 2017-11-17 10:10:31 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=666dc76e0426927c5f8e70fcfa5bce25171a0722

tdf#108450: The shrink part of grow/shrink animation finally works

It will be available in 6.0.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 16 Xisco Faulí 2017-12-18 09:09:43 UTC
A polite ping to Katarina Behrens: is this bug fixed? if so, could you
please close it as RESOLVED FIXED ? Thanks
Comment 17 Xisco Faulí 2018-01-18 10:28:05 UTC
(In reply to Xisco Faulí from comment #16)
> A polite ping to Katarina Behrens: is this bug fixed? if so, could you
> please close it as RESOLVED FIXED ? Thanks

@Regina Henschel, could you please check whether this issue is fixed?
Comment 18 Katarina Behrens (CIB) 2018-01-18 11:31:42 UTC
Partially fixed, for complete fix https://gerrit.libreoffice.org/#/c/38231/ is needed ... but I said so already
Comment 19 Regina Henschel 2018-01-18 11:59:56 UTC
Given animations are correctly played. UI is still missing.
Comment 20 QA Administrators 2019-01-19 03:54:11 UTC Comment hidden (obsolete)
Comment 21 Regina Henschel 2019-01-19 09:44:36 UTC
UI is still missing. The file has different shrink settings for width and height. Such does not exist in the UI.
Comment 22 Xisco Faulí 2019-04-30 10:07:26 UTC
Dear Rohan Kumar,
This bug has been in ASSIGNED status for more than 3 months without any
activity. Resetting it to NEW.
Please assigned it back to yourself if you're still working on this.