Bug 117940 - Undo doesn't work with 'resize shape to fit text'
Summary: Undo doesn't work with 'resize shape to fit text'
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
5.0 all versions
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.2.0 target:6.1.0.1 target:6.0.6
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Undo-Redo
  Show dependency treegraph
 
Reported: 2018-05-31 17:14 UTC by Xisco Faulí
Modified: 2018-06-07 12:09 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2018-05-31 17:14:22 UTC
Steps to reproduce:
1. Open Draw
2. Insert a shape
3. Insert some text in the shape
4. Select the text - Right click - Text
5. Check the option 'resize shape to fit text' and OK -> the shape is resized
6. Click outside of the shape
7. Ctrl+Z

-> the shape is not reshaped to the original shape

Reproduced in

Version: 6.2.0.0.alpha0+
Build ID: a7865cf710b71aa27b185f9d38c930f5603d37e7
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded
Comment 1 Xisco Faulí 2018-05-31 17:17:09 UTC
Regression introduced by:

author	Julien Nabet <serval2412@yahoo.fr>	2015-04-09 23:38:47 +0200
committer	David Tardon <dtardon@redhat.com>	2015-04-13 07:32:48 +0000
commit b2bae9b940fc34d2eecd7839e3cba1f41d111e87 (patch)
tree 7b4cebea9e35e787025882e31ad3fba0aacfe38b
parent 79d19a739c80c686e9ebfadb5f65eb1ff53dce65 (diff)
Related tdf#34467: Fit to Frame for text boxes is broken
Wrong Copy-paste

Bisected with: bibisect-50max

Adding Cc: to Julien Nabet

The 'resize shape to fit text' functionality was broken for a while until it got fixed by https://cgit.freedesktop.org/libreoffice/core/commit/?id=d1df071c3fc452817746a8daa13000d2df667aba.
Adding Caolán to the loop as well...
Comment 2 Julien Nabet 2018-05-31 18:34:29 UTC
I read the comment of https://cgit.freedesktop.org/libreoffice/core/commit/?id=d1df071c3fc452817746a8daa13000d2df667aba and understand why I could think it was a wrong copy paste.
Now, I don't know how to fix this.
Comment 3 Caolán McNamara 2018-06-05 10:13:00 UTC
I'm not sure there's a regression here, or at least not one specific to gtk3 or any of the fit to frame changes. What I think I see is that undo doesn't really work if the attributes of the frame are set while the text engine is active. And so https://gerrit.libreoffice.org/#/c/55323/ seems to make this reliably work for me. I'm going to assume what I see is the problem reported here.
Comment 4 Commit Notification 2018-06-05 13:00:25 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8bf0149b11239fed187ff20dd37116661907c442

tdf#117940 setting resize shape while text edit active not recorded in undo

It will be available in 6.2.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 5 Commit Notification 2018-06-05 14:02:31 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1c0e0646321e276c6be22a13a70e37fdf93430e1&h=libreoffice-6-1

tdf#117940 setting resize shape while text edit active not recorded in undo

It will be available in 6.1.0.1.

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 6 Caolán McNamara 2018-06-05 14:02:51 UTC
that appears to work for me, backports in gerrit
Comment 7 Xisco Faulí 2018-06-06 10:27:51 UTC
Verified in

Version: 6.1.0.0.beta1+
Build ID: 8b96445766efe237eb47608ade6c147673466e2e
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group

@Caolán, thanks for fixing this!!
Comment 8 Commit Notification 2018-06-07 12:09:40 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=66b4e7ee179cba8ec2f1229ebc6eb48343fae72a&h=libreoffice-6-0

tdf#117940 setting resize shape while text edit active not recorded in undo

It will be available in 6.0.6.

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.