Bug 117308 - EDITING Comment box is not resized after Font size change after Save and Open
Summary: EDITING Comment box is not resized after Font size change after Save and Open
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, regression
Depends on:
Blocks: Calc-Comments
  Show dependency treegraph
 
Reported: 2018-04-28 08:18 UTC by Emil Tanev
Modified: 2024-01-10 22:38 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (11.05 KB, application/vnd.oasis.opendocument.spreadsheet)
2018-06-16 12:58 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Emil Tanev 2018-04-28 08:18:12 UTC
Open Calc
Click in cell A1 and Insert comment with some text
Right-click - Show comment
Double click in the Comment box
Select All and change Font size to 60
Click outside the comment
Save the file and Close it
Open the file
Double click in the Comment box
Select All and change Font size to 13

Issue: Comment is correctly resized but the Comment box is not. Saving and Reopening the file is key.

https://screencast-o-matic.com/watch/cFfujXbDVC

Version: 6.0.5.0.0+
Build ID: e58dc868a6ac0df24adf88f32f90a9e4fc6fdae9
CPU threads: 4; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86@42, Branch:libreoffice-6-0, Time: 2018-04-19_23:05:52
Locale: en-US (en_US); Calc: group
Comment 1 raal 2018-04-28 14:13:46 UTC
Version: 6.1.0.0.alpha0+
Build ID: 930a3cbaeeaf6bca594f8651c4d5dffc1e5391d4
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3; 

after save and reopen is comment box still big - not resized.
Comment 2 Emil Tanev 2018-04-29 12:14:47 UTC
I meant line 7 in the steps is important to reproduce the bug. I can't seem to reproduce it without saving and reopening the file.
Comment 3 Buovjaga 2018-06-07 14:16:55 UTC
To be clear: you want the comment box to shrink, when you change the font size to 13? I don't know, if this is something we should do automatically...
Comment 4 Emil Tanev 2018-06-16 11:22:42 UTC
Well, we seem to be able to do it in the scenario when the file is not saved, so why should it be different?

Replayed the steps just in case
Version: 6.1.0.0.beta2+
Build ID: 5e58b203e03fbcf6ca1399954bc01871474c973e
CPU threads: 1; OS: Windows 10.0; UI render: default; 
TinderBox: Win-x86@42, Branch:libreoffice-6-1, Time: 2018-06-16_04:07:37
Locale: ja-JP (ja_JP); Calc: group threaded
Comment 5 Buovjaga 2018-06-16 12:58:39 UTC
Created attachment 142792 [details]
Example file

(In reply to Emil Tanev from comment #4)
> Well, we seem to be able to do it in the scenario when the file is not
> saved, so why should it be different?

Right, sorry about that. Skipping the "Save the file and Close it" step indeed lets us see it shrink.

Already in 4.3.0 (on Win), but yet in 3.6.7

Arch Linux 64-bit
Version 3.6.7.2 (Build ID: e183d5b)
Comment 6 malboarg 2018-06-16 18:45:17 UTC
This bug is still present in
Version: 6.1.0.0.beta1
Build ID: 8c76dfe1284e211954c30f219b3a38dcdd82f8a0
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 

This bug is not present in Libreoffice 4.0.0.1 thus it's a regression
Version 4.0.0.1 (Build ID: 527dba6f6e0cfbbc71bd6e7b88a52699bb48799)
Linux Ubuntu 64 bits
Comment 7 Marina Latini (SUSE) 2018-06-16 19:29:26 UTC
repro in 
Version: 6.2.0.0.alpha0+
Build ID: e79dd394deedaeed122717700077b77d94360c12
CPU threads: 4; OS: Linux 4.16; UI render: default; VCL: kde4; 
Locale: it-IT (it_IT.UTF-8); Calc: group threaded
Comment 8 Buovjaga 2018-07-10 19:46:11 UTC
Bibisected with 43max. The blamed commit is sort of suspicious, if the resizing is indeed used by Calc comments as well.

commit 47e19757622969e3de29d64f027bde82741159fa
Author: Matthew Francis <mjay.francis@gmail.com>
Date:   Thu May 28 20:31:43 2015 +0800

    source-hash-9ee0cf63a1dafebb673fbee9ccfc82a56fd050d4
    
    commit 9ee0cf63a1dafebb673fbee9ccfc82a56fd050d4
    Author:     Armin Le Grand <alg@apache.org>
    AuthorDate: Thu Sep 19 11:34:41 2013 +0000
    Commit:     David Tardon <dtardon@redhat.com>
    CommitDate: Tue Mar 25 09:29:56 2014 +0100
    
        i115391 corected from isLocked to IsPasteResize which was used in modifiers for CustomShape and TextShape

Adding Cc: to Armin Le Grand
Apologies, if this turns out to be wrong blame.

The current form of the code snippet is

void SdrTextObj::AdaptTextMinSize()
{
    if (!bTextFrame)
        // Only do this for text frame.
        return;

    if (getSdrModelFromSdrObject().IsPasteResize())
        // Don't do this during paste resize.
        return;
Comment 9 QA Administrators 2019-07-11 02:54:32 UTC Comment hidden (obsolete)
Comment 10 QA Administrators 2021-07-11 03:39:31 UTC Comment hidden (obsolete)
Comment 11 Armin Le Grand (allotropia) 2022-01-05 10:02:05 UTC
This commit was developed for another code base, and not merged by me. For complex changes like this, side-effects are to be expected; sadly I dont't have the cycles to deal with all the fallout. Un-Ccing myself for the while.
Comment 12 QA Administrators 2024-01-06 03:13:36 UTC Comment hidden (obsolete)
Comment 13 Stéphane Guillou (stragu) 2024-01-10 22:38:22 UTC
reproduced in recent trunk build:

Version: 24.8.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: a2ccc25ccb2e94f5990d6d413541dbcdd3a72338
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded