Bug 168263 - Bug in Calc when text cells are vertically oriented and “shrink to fit” is selected
Summary: Bug in Calc when text cells are vertically oriented and “shrink to fit” is se...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
25.8.0.4 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Jonathan Clark
URL:
Whiteboard: target:26.2.0 target:25.8.2
Keywords: bibisected, bisected, regression
Depends on:
Blocks: Spell-Checking Calc-Cells
  Show dependency treegraph
 
Reported: 2025-09-03 07:49 UTC by Frank Schoefisch
Modified: 2025-09-12 11:56 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
sample gif (251.94 KB, image/gif)
2025-09-04 07:03 UTC, nobu
Details
sample file (15.41 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-09-04 07:04 UTC, nobu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Frank Schoefisch 2025-09-03 07:49:53 UTC
Description:
If cells formatted as text are defined as “shrink to fit” in Calc 25.8.1.1, an error occurs in the vertical alignment. Although 'top' or 'centered' is specified, the text is displayed shifted downwards.

Steps to Reproduce:
1. set cell in calc 25.8.1.1. as text format and "shrink to fit" single-line cell height
2. fill in text longer then the cell size (text will shrink)
3. change vertical align (top, centered, bottom)

Actual Results:
The ‘top’ alignment shifts the content downwards, almost outside the visible cell area.
The ‘centred’ alignment shifts the content downwards, almost outside the visible cell area, but not quite as far as ‘top’.
'bottom' seems ok

Expected Results:
Orientation as defined:
'top' ... text is orientated to the top ...
'centered' ... same distance to top and bottom border


Reproducible: Always


User Profile Reset: Yes

Additional Info:
Version: 25.8.1.1 (X86_64)
Build ID: 54047653041915e595ad4e45cccea684809c77b5
CPU threads: 8; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: threaded
Comment 1 m_a_riosv 2025-09-03 23:51:33 UTC
Please attach a sample file, reduce the size as much as possible without private information.
Comment 2 nobu 2025-09-04 06:28:25 UTC
Not Reproduced with
Version: 25.2.5.2 (X86_64) / LibreOffice Community
Build ID: 03d19516eb2e1dd5d4ccd751a0d6f35f35e08022
CPU threads: 2; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded

Reproducible with
Version: 25.8.0.4 (X86_64)
Build ID: 48f00303701489684e67c38c28aff00cd5929e67
CPU threads: 2; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded

Reproducible with
[2025_08_27]
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 09a48f45d9a3e72ab761e6808701362c9c0b2e51
CPU threads: 2; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP
Calc: threaded
Comment 3 nobu 2025-09-04 06:46:45 UTC
This problem occurs when "Automatic spell checking" is "ON".
Comment 4 nobu 2025-09-04 07:03:24 UTC
Created attachment 202687 [details]
sample gif

Repeat "Automatic spell checking" to "ON" and "OFF".
Comment 5 nobu 2025-09-04 07:04:10 UTC
Created attachment 202688 [details]
sample file
Comment 6 nobu 2025-09-04 08:03:00 UTC
Not Reproduced with
Version: 25.8.0.0.alpha1 (X86_64) / LibreOffice Community
Build ID: a2896e060b54ce6ce36e3e29218fac40d2919c74
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded

Reproducible with
Version: 25.8.0.0.beta1 (X86_64) / LibreOffice Community
Build ID: 1b25e37a63c5a6f16bdcb365ed3da80ac419e6e4
CPU threads: 4; OS: Windows 10 X86_64 (build 19045); UI render: Skia/Vulkan; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded
Comment 7 Saburo 2025-09-04 09:51:02 UTC
bibisected with linux-64-25.8 ebbbfe6014102be07871b0cb09f462eff90ae204 is the first bad commit
source f08a984a94f5b504c75f4f4ce8a98d0bc074e0ee

Version: 25.8.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: f08a984a94f5b504c75f4f4ce8a98d0bc074e0ee
CPU threads: 4; OS: Linux 6.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: ja-JP (ja_JP.UTF-8); UI: en-US
Calc: threaded

commit f08a984a94f5b504c75f4f4ce8a98d0bc074e0ee
author	Jonathan Clark <jonathan@libreoffice.org>	Thu May 01 10:02:55 2025 -0600

editeng: Initial ruby character implementation

Implements a minimal functional version of ruby character layout and
rendering in Edit Engine. Many features are missing from this
implementation, and will be added in future commits.

Currently, ruby characters cannot be created via the user interface.
Ruby character styles are also currently hard-coded.

Change-Id: Ia7c18ccae6c37cd320acc214574ba3123c18ddb0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185210

---
adding CC: Jonathan Clark
Comment 8 Commit Notification 2025-09-11 20:47:23 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/f166009a3b62e680c993d033a97e4a24a65ceaa1

tdf#168263 editeng: Fix wrong max ascent for text without ruby

It will be available in 26.2.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 9 Commit Notification 2025-09-12 11:56:59 UTC
Jonathan Clark committed a patch related to this issue.
It has been pushed to "libreoffice-25-8":

https://git.libreoffice.org/core/commit/01c95615899fbcf33b49b2833e709dec9de71632

tdf#168263 editeng: Fix wrong max ascent for text without ruby

It will be available in 25.8.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.