Bug Hunting Session
Bug 107394 - Cell size change during paste not undone with undo if pasted as HTML
Summary: Cell size change during paste not undone with undo if pasted as HTML
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.0.6.3 release
Hardware: All All
: medium minor
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.4.0 target:6.3.2
Keywords: bibisected, bisected, regression
: 106904 (view as bug list)
Depends on:
Blocks: Undo-Redo HTML-Paste List-Combobox-RenderContext-regressions
  Show dependency treegraph
 
Reported: 2017-04-24 17:07 UTC by Yousuf Philips (jay) (retired)
Modified: 2019-08-23 09:13 UTC (History)
5 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 Yousuf Philips (jay) (retired) 2017-04-24 17:07:17 UTC
Steps:
1) Open Calc
2) Copy two long sentences from elsewhere and paste it in
3) Press okay on the import options dialog
4) Notice it has expanded the cells vertically to accommodate the text
5) Press undo
6) Cells stay the same height

Broken in 5.4 and 5.3, but works in 4.4. Sorry wasnt able to test 5.0 to 5.2 presently. :D

Version: 5.4.0.0.alpha0+
Build ID: f0340e3dca1091accdb71e0c566b96cdf9e0f791
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2017-04-21_13:34:48
Locale: en-US (en_US.UTF-8); Calc: group
Comment 1 Yousuf Philips (jay) (retired) 2017-04-24 18:06:11 UTC
Correction: The copied text should be from a webpage, so the text is being pasted as HTML.
Comment 2 Xisco Faulí 2017-04-24 19:56:33 UTC
Hi Yousuf,
Could you please share a link from where we can copy the strings ?
Comment 3 Yousuf Philips (jay) (retired) 2017-04-25 03:15:49 UTC
Hi Xisco,
Copy the steps lines from the description. Tested in Chromium and Firefox.
Comment 4 Buovjaga 2017-04-29 06:36:18 UTC
Repro. With two lines, after undo the second row stays high.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.4.0.0.alpha0+
Build ID: 9348b322a5c230dfcc2231661b73e480b130fcd9
CPU threads: 8; OS: Linux 4.10; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on April 28th 2016
Comment 5 Xisco Faulí 2017-05-04 13:57:20 UTC
The behaviour seems to be a bit weird:

1. Copy steps to calc
2. Undo the action -> height is not recalculated
3. Copy steps again
4. Undo the action -> height is recalculated

Tested in

Version: 5.4.0.0.alpha1+
Build ID: f12096272e684ddcd8ffa4e34dcb0a680cc594c2
CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk2; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group
Comment 6 raal 2017-05-25 04:01:17 UTC
This seems to have begun at the below commit.
Adding Cc: to Tomaž Vajngerl; Could you possibly take a look at this one? Thanks

db76ebae674812c4c3dffafc2d02201a67dd15a7 is the first bad commit
commit db76ebae674812c4c3dffafc2d02201a67dd15a7
Author: Norbert Thiebaud <nthiebaud@gmail.com>
Date:   Wed Jun 3 14:29:56 2015 -0500

    source sha:dca01def7885ad69cf66edd75cf8207a5adb64f9

author	Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>	2015-05-07 05:18:37 (GMT)
committer	Jan Holesovsky <kendy@collabora.com>	2015-05-07 07:57:50 (GMT)
commit	dca01def7885ad69cf66edd75cf8207a5adb64f9 (patch)
tree	f3b43717ab058b677c68614bcb2953beb7c7d1a0
parent	7a11ec1992bf877f42edce8d1d930c5b00bd3d48 (diff)
refactor ListBox/ComboBox to use RenderContext
Comment 7 Buovjaga 2018-03-10 14:30:13 UTC
*** Bug 106904 has been marked as a duplicate of this bug. ***
Comment 8 kie000 2018-03-10 14:44:11 UTC
Also, objects (images) aren't deleted upon undo.

Html source: just about any webpage with images.
Comment 9 Miklos Vajna 2019-07-24 13:01:10 UTC
(In reply to kie000 from comment #8)
> Also, objects (images) aren't deleted upon undo.
> 
> Html source: just about any webpage with images.

Let's not use the same bug for different purposes. This bug is about cell sizes. Once this is fixed and the images are still a problem, please open a separate bug for that.

FWIW, it seems this is not really specific to HTML paste, it affects all paste when the undo is done when the selection created by paste is already removed.
Comment 10 Commit Notification 2019-07-25 07:21:39 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/4840880148318dc384e28f9a8df9990b8690a4b6%5E%21

tdf#107394 sc ui: fix lack of row height update on undo of paste

It will be available in 6.4.0.

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

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2019-08-23 09:13:16 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/472679b00da5de87a76587bb5d7c0e0a607a5bba%5E%21

tdf#107394 sc ui: fix lack of row height update on undo of paste

It will be available in 6.3.2.

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

Affected users are encouraged to test the fix and report feedback.