Bug 106249 - Expose OLE draw:frame draw:text-box to selectively control overwriting of OLE objects, e.g. an OLE Formula in Impress opened with F2
Summary: Expose OLE draw:frame draw:text-box to selectively control overwriting of OLE...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
(earliest affected) release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
Depends on:
Blocks: OLE-Object-Interoperability
  Show dependency treegraph
Reported: 2017-03-01 07:23 UTC by john
Modified: 2018-03-19 22:34 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description john 2017-03-01 07:23:28 UTC
When I create a formula in Impress, I can type F2 and start typing text on top of the formula, as though it were a text box.

This is strange behaviour and would certainly confuse a newbie, since they can't double-click the formula to edit/remove that overlaid text.

I think it should be set to be impossible to edit the text on a formula object, in general.

Steps to Reproduce:
1. Insert Formula
2. Add some formula text eg "E = m c^2"
3. Exit the formula
4. Highlight the formula and type F2 (edit)
5. Type 'xxx'
6. Type Escape. The formula is now a mess.
7. Type enter. You can edit the formula but not the 'xxx'
8. Type F2. You can edit the 'xxx' but not the formula.

Actual Results:  
Nasty mess, best avoided! But the F2 keystroke is an easy habit eg after using Spreadsheets for a while.

Expected Results:
To me, 'enter' and F2 should both have the same effect when an object is a formula. I think there is no benefit at all in being able to edit the text on top of a Formula. Additionally, I am surprised that the OpenDocument specification allows this...

Reproducible: Always

User Profile Reset: No

Additional Info:

User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:51.0) Gecko/20100101 Firefox/51.0
Comment 1 Regina Henschel 2017-03-01 14:23:35 UTC
An OLE object (Math and charts are OLE objects) is always child of a <draw:frame>. And such element can have a <draw:text-box> element. The UI needs a method to access this <draw:text-box>. So a solution cannot be to remove the access, but a solution would be to implement an access to <draw:text-box> which is not confused with uses of key F2 in other modules and other situations. Because the feature is seldom used, it does not need a predefined key, but a menu item would be sufficient.

But the feature itself has bugs. I'll write an additional report for it.

Not sure, whether this one is a bug or better an enhancement request.
Comment 2 V Stuart Foote 2017-03-01 15:15:38 UTC
Agree. To enhancement.
Comment 3 john 2017-03-16 06:00:16 UTC
So to me 'F2' means 'edit the contents of this'. It works with cells in Calc, and it works with text boxes in Impress, and it works with text boxed in Writer. It makes total sense to me that it should do the same for Formulas, wherever they appear. If it is somehow necessary to continue to be able to write normal text-box text over the top of a formula (heaven knows who) then I agree, bury it in menu somewhere (context menu 'Edit as text box' might be good?). There is already an undo action 'Edit text of frame' that shows in the Undo menu. The only place that editing a Formula seems to appear in the UI is in the context menu "Edit". That is where the F2 binding should be made, I think. (note that the F2 shortcut doesn't seem to appear anywhere on the menus. In the keyboard bindings the action associated with 'F2' is "Formula" (which I can't see anywhere on the menus).
Comment 4 john 2017-03-16 06:02:08 UTC
Sorry another note: in Writer, F2 does *not* allow text to be written over Formulas. So is it true that this problem has already been fixed somehow in Writer, but not in Impress?
Comment 5 Regina Henschel 2017-10-22 16:03:08 UTC
(In reply to john from comment #4)
> Sorry another note: in Writer, F2 does *not* allow text to be written over
> Formulas. So is it true that this problem has already been fixed somehow in
> Writer, but not in Impress?

No. In Writer formulas and charts are handled different from Draw/Impress/Calc. Therefore their text has no UI in Writer.

If you like to have F2 to switch to open the OLE, you can customize your UI to do it.
Comment 6 john 2018-03-19 22:34:19 UTC
@Regina: Can I do that though? I would still want F2 to retain the normal edit behaviour for text boxes. Why should I use 'enter' to edit formulas, but F2 to edit text boxes?

I agree with Regina, this kind of text is seldom deliberately used (only ever used by me accidentally!) so it would be best if F2 is redirected for editing the OLE content for equations, if possible.