Created attachment 143636 [details]
Example of text pasted then cancelled
The problem occurs when copying formatted text from a webpage.
When pasting it, the lines height is modified.
When you use Ctrl+Z (or click the corresponding menu), the text is removed, but the lines height is unmodified.
Forcing the height to "auto" on the faulty lines resolves the problem.
If you copy content from another libreoffice component, the problem doesn't happen.
The copy must be done on formatted text - plain text won't trigger the bug.
Attaching a file containing two tabs: one with the text I used (from this very bug file creation webpage), the other with the result of a "ctrl+z" executed after the paste.
Found with v184.108.40.206 on Windows
Reproduced with v220.127.116.11 on Linux
Confirmed on Windows 10 Home 64-bit en-US with
a current master/6.2.0
Version: 18.104.22.168.alpha0+ (x64)
Build ID: daafe79c55cd53decbeac2367f298d79371dcf3d
CPU threads: 4; OS: Windows 10.0; UI render: GL;
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-07-18_02:59:18
Locale: en-US (en_US); Calc: CL
reopening the example document has reset the optimal height for the cleared cells, but the Paste -> Ctrl+Z (or the Undo) of insert of formatted text into several rows is leaving behind the direct formatting applied to cells on undo.
@Julien, assigning the bug to yourself implies you are taking the issue and will provide patch in source code to correct the issue.
If that is the case, fine. Otherwise, suggest you remove yourself as assignee.
@Stuart, I am working on it, and hopefully will find the bug and fix it.
Whether or not I succeed is another question of course :-/
Should I wait to have a fix to assign the bug to myself ?
(In reply to Julien ROPE from comment #4)
> @Stuart, I am working on it, and hopefully will find the bug and fix it.
> Whether or not I succeed is another question of course :-/
> Should I wait to have a fix to assign the bug to myself ?
No, keep it assigned and have at it...
If you get stuck ask for help on the Dev ML, and should you throw in the towel, just remove yourself as assignee.
Created attachment 143769 [details]
Force an AdjustRowHeight call after the undo
I could work around the issue by forcing an "AdjustRowHeight()" call after the undo, making sure the modified range's rows are restored.
Now I'm not sure that is the proper way of fixing it, as it doesn't address the root cause (which still eludes me).
Any comment/suggestion is welcome.
Dear Julien ROPE,
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.