Bug 116474 - Undo/redo: The redo of adding caption to an image isn't working: no image
Summary: Undo/redo: The redo of adding caption to an image isn't working: no image
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3 all versions
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:6.1.0 target:6.0.4 target:5.4....
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Undo-Redo
  Show dependency treegraph
 
Reported: 2018-03-18 18:40 UTC by Telesto
Modified: 2019-06-24 06:24 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (10.61 KB, application/vnd.oasis.opendocument.text)
2018-03-18 18:43 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2018-03-18 18:40:01 UTC
Description:
The redo part of adding caption to an image isn't working: no image

Steps to Reproduce:
1. Open the attached file
2. Select the image
3. Insert -> Caption
4. Press OK
5. Undo -> CTRL+Z
6. Redo -> CTRL+Y

Actual Results:  
No image, and page is scrolling to the bottom

Expected Results:
Normal redo


Reproducible: Always


User Profile Reset: No



Additional Info:
Found in
Version: 6.1.0.0.alpha0+
Build ID: e5bc7fa4e83b33fc3eee343e560a4f8cb91eacd6
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-03-14_23:37:38
Locale: nl-NL (nl_NL); Calc: CL

and in
Versie: 5.3.5.2 
Build ID: 50d9bf2b0a79cdb85a3814b592608037a682059d
CPU-threads: 4; Besturingssysteem:Windows 6.2; UI-render: standaard; Layout Engine: new; 
Locale: nl-NL (nl_NL); Calc: group

but not in
Versie: 5.1.6.2 
Build ID: 07ac168c60a517dba0f0d7bc7540f5afa45f0909
CPU Threads: 4; Versie besturingssysteem:Windows 6.2; UI Render: GL; 
Locale: nl-NL (nl_NL); Calc: CL


User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Telesto 2018-03-18 18:43:42 UTC
Created attachment 140693 [details]
Example file
Comment 2 Dieter 2018-03-18 19:49:46 UTC
Reproducible for me with

Version: 5.4.6.2 (x64)
Build-ID: 4014ce260a04f1026ba855d3b8d91541c224eab8
CPU-Threads: 4; BS: Windows 6.19; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group
Comment 3 Xisco Faulí 2018-03-19 18:38:44 UTC
Regression introduced by:

author	Caolán McNamara <caolanm@redhat.com>	2016-10-27 14:37:03 +0100
committer	Caolán McNamara <caolanm@redhat.com>	2016-10-27 14:37:03 +0100
commit feedd45ba2dd308af2d3a1b2f64681b9467535b6 (patch)
tree e513616af72c8b0effd4b57eb1b1744828153d78
parent f6ff0c237bde50d1fab6b19d87000038b6f3f042 (diff)
in msword the hard-break between image and caption has a width
while for us it doesn't, make it invisible to give it zero width
in both implementations to head off interoperability misery

Bisected with: bibisect-linux-64-5.3

Adding Cc: to Caolán McNamara
Comment 4 Caolán McNamara 2018-03-20 11:48:56 UTC
need to bring that under undo/redo control
Comment 5 Commit Notification 2018-03-20 14:23:26 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=2333786aa0eaf70c45c80e546239fb3565b1b4e7

Resolves: tdf#116474 bring hidden text property under undo control

It will be available in 6.1.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 6 Caolán McNamara 2018-03-20 14:27:48 UTC
backport to 6-0 and 5-4 in gerrit
Comment 7 Xisco Faulí 2018-03-28 14:41:52 UTC
Verified in

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

Thank you Caolán!
Comment 8 Commit Notification 2018-04-05 14:13: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=2028cb82837393ac0ae283a41ac7187d203085dc&h=libreoffice-6-0

Resolves: tdf#116474 bring hidden text property under undo control

It will be available in 6.0.4.

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 9 Commit Notification 2018-04-05 14:24:47 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-5-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=85a92ab3510641afd475a2d5fdffa9d8b7abcd39&h=libreoffice-5-4

Resolves: tdf#116474 bring hidden text property under undo control

It will be available in 5.4.7.

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 10 Commit Notification 2018-06-29 05:02:33 UTC
Zdeněk Crhonek committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=616917f4e15d30307062f3c1a73656c8c9fbf3a9

uitest for bug tdf#116474

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 11 artur 2019-06-24 06:24:48 UTC
UI test was added in http://cgit.freedesktop.org/libreoffice/core/commit/?id=616917f4e15d30307062f3c1a73656c8c9fbf3a9

I've removed "needUITest" keyword