Bug 141841 - Suppress edit mode for chart objects to avoid accidentally adding a text box
Summary: Suppress edit mode for chart objects to avoid accidentally adding a text box
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:
Whiteboard:
Keywords:
Depends on:
Blocks: Chart
  Show dependency treegraph
 
Reported: 2021-04-23 00:28 UTC by Reinhard Buchholz
Modified: 2023-10-05 15:31 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
calc-document with a carret on an diagram (35.80 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-04-23 00:28 UTC, Reinhard Buchholz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Reinhard Buchholz 2021-04-23 00:28:17 UTC
Created attachment 171364 [details]
calc-document with a carret on an diagram

I managed several times (I don't know how) to put a carret in the middle of diagrams.
I is very difficult, to get rid of this extra "text" on then chart area.
I couldn't find anything in the context menu of any component of the diagram.

Coincidentally I discovered, that there are two hidden possibiblities.

You have to activate the diagram, by clicking once (no doubleclick) on the diagram to get the 8 small rectangles in Windows (or the 8 green solid squares in linux). 

If you press Backspace, the diagram will be deleted.

Instead, after klicking on the diagram, you must type any character, or press F2 to switch to the Edit-/Replace-Mode.

Thereupon you can edit your input and delete it e.g. with backspace.

I think, there should be a possibility to reach this edit-mode via the context-menu of the Diagram, at least via the context-menu of the chart area.
Comment 1 laurent combe 2021-04-25 14:49:11 UTC
i can reproduce that

without explanation delete the '^' character is a non intuitive task

my version :

Version: 7.1.2.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Ubuntu package version: 1:7.1.2~rc2-0ubuntu0.20.04.1~lo3
Calc: threaded
Comment 2 Buovjaga 2023-04-20 16:16:28 UTC
This is about editing the text box associated with an object, in this case a chart.
Comment 3 Heiko Tietze 2023-04-21 08:24:20 UTC
Either use F2 or select the chart and press any key. Once you are in the edit mode you can delete the caret. 

I don't see why we need the object's text edit mode for charts and suggest to suppress it completely (if that doesn't break compatibility). Otherwise we could show Text (.uno:TextAttributes) in the chart's context menu for positioning along with "Edit Chart Text (F2)" (.uno:SetInputMode).
Comment 4 Heiko Tietze 2023-05-04 12:28:25 UTC
The topic was on the agenda at the design meeting but did not receive further input.

Let's suppress the edit mode for charts as a solution.
Comment 5 Stéphane Guillou (stragu) 2023-05-04 13:13:17 UTC
(In reply to Heiko Tietze from comment #4)
> The topic was on the agenda at the design meeting but did not receive
> further input.
> 
> Let's suppress the edit mode for charts as a solution.

Does this mean not even allowing edit mode with F2?
Worried we'd end up with users not able to remove existing text from files created with older versions.
Comment 6 Heiko Tietze 2023-05-04 14:08:07 UTC
(In reply to Stéphane Guillou (stragu) from comment #5)
> Does this mean not even allowing edit mode with F2?
F2 goes into the text edit mode not the chart data content. This was surprising for the OP and should be changed. It's a good idea to bend F2 to work like double click and edit the chart content.
Comment 7 Eike Rathke 2023-05-22 11:36:20 UTC
Still that would mean to not being able to remove text that was accidentally entered in a previous version then.
Also, that feature may be used to willingly place text in the chart, so completely disabling it is not a solution.
Comment 8 Heiko Tietze 2023-05-22 12:31:32 UTC
How about some fallback, thinking of <mod>+f2?

(In reply to Eike Rathke from comment #7)
> ...willingly place text in the chart...
Doubt this requirement.
Comment 9 Eike Rathke 2023-05-23 10:21:39 UTC
Shrug.. find out whether it's used or not. It's possible and one may add story text positioned anywhere on the chart canvas (not just centered).
Comment 10 Stéphane Guillou (stragu) 2023-05-23 11:51:23 UTC
I'd prefer not to make it disappear entirely, ending up with people reporting bugs about not being able to edit / remove it anymore, and telling them as a workaround to go back to a previous version to do so.

(In reply to Heiko Tietze from comment #3)
> [...] Otherwise
> we could show Text (.uno:TextAttributes) in the chart's context menu for
> positioning along with "Edit Chart Text (F2)" (.uno:SetInputMode).

Agree with this solution to make it more discoverable. Maybe even with different wording, like "Edit text overlay". And bend F2 to edit the chart instead, as you suggested.
Another object who could get the same treatment is the formula object, which behaves in the same way.

One issue with this text is that the horizontal alignment options have no effect (whereas the vertical alignment does work). If we decide to keep the feature, we can track this in a new report.