Bug 134249 - Introduce per cell text overflow option (overflow, wrap, clip, shrink)
Summary: Introduce per cell text overflow option (overflow, wrap, clip, shrink)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/prevent...
Whiteboard:
Keywords:
: 139601 150514 (view as bug list)
Depends on:
Blocks: Calc-Cells
  Show dependency treegraph
 
Reported: 2020-06-23 08:51 UTC by Heiko Tietze
Modified: 2024-05-29 09:21 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
screenshot of Google Sheets text alignment options (42.66 KB, image/png)
2024-05-28 05:32 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2020-06-23 08:51:10 UTC
Text overflow means to show text exceeding the column width in the adjacent cells. Like "Hello brave new world" in A1 going into A2, if empty. If A2 contains any content a small triangle is shown. And per Tools > Options > Calc > View > Text Overflow only this triangle can be disabled. 

The request is to block overflow completely- expected this with the option. And actually I'd like to clock overflow per column respectively cell. In some cases you want to read the full text but there are as many situations where empty cells in the adjacent column are normal and you search for the few that have content. This workflow is not possible with the overflow mechanism.
Comment 1 Xisco Faulí 2020-08-03 15:25:03 UTC
Moving to NEW
Comment 2 Heiko Tietze 2020-08-03 16:00:35 UTC Comment hidden (noise)
Comment 3 Buovjaga 2021-12-01 09:42:04 UTC
*** Bug 139601 has been marked as a duplicate of this bug. ***
Comment 4 Heiko Tietze 2024-05-28 04:46:01 UTC
*** Bug 150514 has been marked as a duplicate of this bug. ***
Comment 5 Stéphane Guillou (stragu) 2024-05-28 05:27:32 UTC
Related Ask.LO questions:
- https://ask.libreoffice.org/t/prevent-text-overflow-in-other-cell/15329
- https://ask.libreoffice.org/t/libreoffice-refuses-to-hide-text-overflow/10787/7

Heiko, now that Text Overflow is only about the indicator and has moved to Options > LibreOffice > Application Colors (since 7.6 and the fix for bug 154080), where do you suggest to have such a setting?
In my opinion, best to have it as a cell formatting option in Format > Cells > Alignment. (Rather than a global setting.)
But that would require:
- checking with what ODF supports (I assume it would be an extension, Regina?)
- thinking about how it behaves in relation to other properties in that dialog. Another option in the Alignment drop down (probably easier), or orthogonal to Alignment as an extra option in the Properties section?

Google Sheets has three Text Alignment options available:
- overflow
- wrap
- clip (what we want)
But that clip property doesn't even seem to be written to XLSX or ODS in any way: export and import back into Google Sheets doesn't restore the property.
Comment 6 Stéphane Guillou (stragu) 2024-05-28 05:32:02 UTC
Created attachment 194391 [details]
screenshot of Google Sheets text alignment options
Comment 7 Regina Henschel 2024-05-28 09:48:17 UTC
It is related to cell property fo:wrap-option (20.230, part 3, ODF 1.3). It specifies, "If wrapping is disabled, it is implementation-defined whether the overflow text is visible or hidden." That means, LibreOffice can do what it wants. But we need do document it in https://wiki.documentfoundation.org/Development/ODF_Implementer_Notes/List_of_LibreOffice_ODF_implementation-defined_items

But it also means, that any solution cannot be written to file as cell style property but could only be written as general setting and would as such affect all cells.

To get a solution for individual cells, an extension to ODF is needed.

Remark: For any solution you have to consider, that the writing direction in cells need not be horizontal left-to-right and that we have additional options like "Shrink to fit cell size". And you need to consider interoperability with Excel.
Comment 8 Heiko Tietze 2024-05-29 09:19:57 UTC
(In reply to Stéphane Guillou (stragu) from comment #5)
> In my opinion, best to have it as a cell formatting option in Format > Cells
> > Alignment. (Rather than a global setting.)
In this tab we have "[ ] Wrap text automatically", and likewise GSheets we could enhance this into a multiple choice option. "Wrap on" disables "[ ] Shrink to fit", but shrink on does not prevent wrap on.

I could imagine to add shrink as another option to the proposed dropdown (or maybe bettwer radio buttons).

And I think it's needed as a per-cell option.