Bug 163088 - Optimal column width differs depending on the presence or absence of line breaks in the cell
Summary: Optimal column width differs depending on the presence or absence of line bre...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
24.2.6.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Cell-Management
  Show dependency treegraph
 
Reported: 2024-09-22 05:41 UTC by nobu
Modified: 2025-01-24 17:43 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
6 sample in sample file (23.92 KB, application/vnd.oasis.opendocument.spreadsheet)
2024-09-22 05:43 UTC, nobu
Details
sample mp4 (11.11 MB, video/mp4)
2024-12-03 22:41 UTC, nobu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nobu 2024-09-22 05:41:02 UTC
Description:
The optimal column width differs depending on whether there is a line break in the cell or not.

Steps to Reproduce:
1. Open a new Calc.
2. Enter the two examples in the same column for comparison.
   Enter [ =REPT("A",50) ] in  Cell [A1] and
         [ =REPT("A",50)&CHAR(10) ] in  Cell [A2].
3. If cell formatting is set to automatic line breaks, cancel it.
4. Try setting the optimal column width for [A1] and [A2] respectively.

Actual Results:
5. [A1] and [A2] will have different column widths.

Expected Results:
5. [A1] and [A2] will have same column widths.


Reproducible: Always


User Profile Reset: No

Additional Info:

Not Reproduced with
Version: 7.6.7.2 (X86_64) / LibreOffice Community
Build ID: dd47e4b30cb7dab30588d6c79c651f218165e3c5
CPU threads: 4; OS: Windows 10.0 Build 10240; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded

Reproducible with
Version: 24.2.6.2 (X86_64) / LibreOffice Community
Build ID: ef66aa7e36a1bb8e65bfbc63aba53045a14d0871
CPU threads: 4; OS: Windows 10.0 Build 10240; UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: threaded

Reproducible with
Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 5b54f68599d9a9b6f4d21fd8c0cdac746ea71ecb
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 10240); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: threaded
Comment 1 nobu 2024-09-22 05:43:08 UTC
Created attachment 196598 [details]
6 sample in sample file
Comment 2 nobu 2024-09-22 06:08:48 UTC
6 samples in sample file
Comment 3 nobu 2024-09-28 22:12:47 UTC
2. Enter the two examples in the same column for comparison.
   Enter [ =REPT("A";50) ] in  Cell [A1] and
         [ =REPT("A";50)&CHAR(10) ] in  Cell [A2].
Comment 4 viktoriia.strekalovskaia 2024-12-03 21:55:39 UTC
Thank you for reporting the bug. Can you add a screenshot that shows what you mean?
Comment 5 nobu 2024-12-03 22:41:25 UTC
Created attachment 197924 [details]
sample mp4
Comment 6 nobu 2024-12-03 22:42:27 UTC
(In reply to viktoriia.strekalovskaia from comment #4)
> Thank you for reporting the bug. Can you add a screenshot that shows what
> you mean?

I have already attached an explanatory file.
If you don't understand the problem with this file, the screenshots won't make sense.

For those who don't understand the meaning of this bug, a video is attached.
Just move the cursor to a cell in the attached file and press the shortcut [ Shift Alt + Right-Arrow ].

---
Reproducible with
Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: threaded

Reproducible with
Version: 24.8.4.1 (X86_64) / LibreOffice Community
Build ID: 1be9007f5d86a3741c366527d13e2970cbeef057
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: threaded


Reproducible with
Version: 25.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 94afced0195ef824e575176e33c79ca57484cd5c
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: default

Reproducible with
Version: 25.2.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: 94afced0195ef824e575176e33c79ca57484cd5c
CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/Vulkan; VCL: win
Locale: en-US (ja_JP); UI: en-US
Calc: CL threaded
Comment 7 nobu 2024-12-03 22:44:15 UTC
Just move the cursor to a cell in the attached file and press the shortcut [ Shift + Alt + Right-Arrow ].
Comment 8 QA Administrators 2024-12-04 03:12:15 UTC Comment hidden (obsolete)
Comment 9 viktoriia.strekalovskaia 2024-12-04 09:48:38 UTC
(In reply to nobu from comment #6)
> (In reply to viktoriia.strekalovskaia from comment #4)
> > Thank you for reporting the bug. Can you add a screenshot that shows what
> > you mean?
> 
> I have already attached an explanatory file.
> If you don't understand the problem with this file, the screenshots won't
> make sense.
> 
> For those who don't understand the meaning of this bug, a video is attached.
> Just move the cursor to a cell in the attached file and press the shortcut [
> Shift Alt + Right-Arrow ].
> 
> ---
> Reproducible with
> Version: 24.8.3.2 (X86_64) / LibreOffice Community
> Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
> CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render:
> Skia/Vulkan; VCL: win
> Locale: ja-JP (ja_JP); UI: ja-JP
> Calc: threaded
> 
> Reproducible with
> Version: 24.8.4.1 (X86_64) / LibreOffice Community
> Build ID: 1be9007f5d86a3741c366527d13e2970cbeef057
> CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render:
> Skia/Vulkan; VCL: win
> Locale: ja-JP (ja_JP); UI: ja-JP
> Calc: threaded
> 
> 
> Reproducible with
> Version: 25.2.0.0.alpha1+ (X86_64) / LibreOffice Community
> Build ID: 94afced0195ef824e575176e33c79ca57484cd5c
> CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render:
> Skia/Raster; VCL: win
> Locale: ja-JP (ja_JP); UI: ja-JP
> Calc: default
> 
> Reproducible with
> Version: 25.2.0.0.alpha1+ (X86_64) / LibreOffice Community
> Build ID: 94afced0195ef824e575176e33c79ca57484cd5c
> CPU threads: 4; OS: Windows 10 X86_64 (10.0 build 19045); UI render:
> Skia/Vulkan; VCL: win
> Locale: en-US (ja_JP); UI: en-US
> Calc: CL threaded


I was just trying to help you confirm your bug, you don't have to talk to me like that.
Comment 10 viktoriia.strekalovskaia 2024-12-04 13:55:59 UTC
I can reproduce with


Version: 24.8.2.1 (X86_64) / LibreOffice Community
Build ID: 0f794b6e29741098670a3b95d60478a65d05ef13
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win


Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 8dd533aa2c71e80f50a292b07660fb5021716f38
CPU threads: 8; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Vulkan; VCL: win

can not reproduce with

Version: 24.8.3.2 (AARCH64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 8; OS: macOS 14.5; UI render: Skia/Metal; VCL: osx

Version: 25.2.0.0.alpha0+ (AARCH64) / LibreOffice Community
Build ID: 7713d916e06a8388f849a758f928cbcfded6c0ae
CPU threads: 8; OS: macOS 14.5; UI render: Skia/Metal; VCL: osx
Comment 11 Saburo 2025-01-24 08:03:38 UTC
bisected
first bad commit
source 4b743de97fc133623e46827869c4ea3eb845ad47
Comment 12 BogdanB 2025-01-24 17:43:26 UTC
Khaled, can you take a looK?

commit 4b743de97fc133623e46827869c4ea3eb845ad47	[log]
author	Khaled Hosny <khaled@libreoffice.org>	Mon Jul 17 12:38:41 2023 +0300
committer	خالد حسني <khaled@libreoffice.org>	Sun Jul 23 06:01:56 2023 +0200
tree 6386636517576c81502367819996972877adc544
parent ea0f9776ed8e7e9809853d292923b86756274564 [diff]
tdf#156234: Don’t round glyph coordinates when doing subpixel positioning

When doing subpixel positioning (i.e. OutputDevice is in map mode),
delay the rounding of the glyph coordinates after converting from pixel
to logical units to minimize the loss of precision as much as possible.

Some test expectations, expectedly, changes due to the improved
positioning precision.

Change-Id: I2591e3c7d4923ba7886a35bf53db759273354e24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154292
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: خالد حسني <khaled@libreoffice.org>