Undo Drag textFrame with form and controls inside disappear controls

The attached file contains a textframe anchored to a paragraph containing a form containing two controls, a textbox and a button, both anchored to the textframe
If I drag the textframe anchoring it to another paragraph, the controls and the contained form maintain their positions with respect to the textFrame
But when I undo (Menu-Modify-Undo) for try to bring the textframe back to its previous position, the two contained controls disappear.
Restoring (Menu-Modify-Redo) does NOT make the controls visible.
However, the two controls remain visible in the form navigator, with the related control properties window
Sometimes, but not always, changing the anchor of the controls (using form navigator) multiple times (for example switching the anchor of the control to paragraph and then restoring it to the frame) and the position the textbox reappears, but not for the button it seems almost impossible.
It didn’t help to bring the two controls to the foreground or protect their position
What does this situation depend on?

textFrame.odt (10.9 KB)

Edit: libreoffice 7.4.3.2 Ubuntu 16.04 LTS

Instead of d"escribing your solution and asking why it is wrong, describe what you what to achieve as author’s purpose. Form are good for Forms but if you goal is to selectively display some data related to a paragraph, heading or other object, forms usually mess up the document. Form items are “graphical” objects external to the main flow (or frame flow) and have behaviou of their own.

Please update your question.

I use textframe with internal forms as an interface between me and my code to perform dedicated functions in some odt file
Textframes are convenient both to move, with mouse drag or code, and to hide when not needed (eg by moving them to the bottom of the document), and to resize.
Of each of these forms included in textframe I have only one version in a file shared between all file writers
When I open a file writer, upon request I call up my code from the context menu which performs a copy-paste of the latest version of these textframes, deleting previous versions and setting all the required parameters
This procedure, so far in the prototype stage, has never given me any problems, except for this undo problem.
With the dialog boxes in modal and non-modal mode I didn’t find myself equally well, hence the choice to use the textFrame with internal forms (one for each textframe)
What do you mean by “forms usually mess up the document” ?
What does it actually entail?

I can follow your description in my case.
You can report the problem (undo) as a bug.


But if I drag the anchor with the mouse to another paragraph and then back it works without problems.

85828 textFrame


Version: 7.4.3.2 (x64) / LibreOffice Community
Build ID: 1048a8393ae2eeec98dff31b5c133c5f1d08b890
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL

I’ve already experienced that using only the mouse or a macro there is no visible problem in moving, at least for the tests I’ve done.
The problem is only with the undo and that’s all my question was about
However, I solve the problem by rewriting the textframe by reloading it from code from a file shared between all my applications.
But I also run these experiments to get to know all aspects of libreoffice programming and functionality, trying to understand what is a bug and what is my procedural error

1 Like