Changing the Style of a line immediately after a Textbox causes the textbox to disappear and at times the application crashes

I’m editing a document that I originally started in an earlier version of Libreoffice Writer (sometime in 2019?) Someone else edited the document using MS Office. My current work is to attempt to correct some differences in formatting and styles from where the person who edited the document in Office. One of the style issues is that they added some text directly in the document that should actually be surrounded in a textbox. So I’ll add a text box and add the text. Get it looking correct, add a border around the text box, then create a caption with a numbering. Then when I attempt to adjust the style of the line immediately after the text box, the entire text box disappears. When I attempt use the “Undo” to revert the change and hopefully get my text box back, the entire GUI freezes and crashes.

My OS is Windows 10 1904, and I’m using LibreOffice 7.0.x. I have attempted to run this in Safe Mode and it still occurs while in “safe mode”. When restarted in Safe Mode I told it to reset my profile to factory settings, which apparently didn’t correct the issue.

A common misconception is to consider text boxes to be “textual” elements. They aren’t. Text boxes are graphical shapes intended to contain a string. It doesn’t coexist peacefully with text.

Text boxes are convenient “decorations” when dealing with forms, not with document where text is supposed to flow harmoniously.

Usually what you need is a frame. A frame is a rectangular area set aside to hold a secondary text flow, what could be qualified a “secondary document”. A frame can be styled, i.e. have a border, a padding space around it and wrapping property telling how it interact with surrounding text in the main flow.

Your description is also ambiguous. You may not need frames at all. A paragraph may have a border. Or even a word may also have a border thanks to character styles.

You didn’t mention in which format your document is saved. If it is .doc(x), you won’t benefit of the advanced features of Writer such as frame or character styles because this format does not allow to record such primitives. Also conversion to and from this format messes totally the structure of your document which becomes a collection of pages instead of a neat flow.

If your document is saved .odt (which M$ Word claims to be able to read, though it somehow degrades it), you can play with styles and auto-captioning (with cross-referenceable auto-numbering).

To show the community your question has been answered, click the ✓ next to the correct answer, and “upvote” by clicking on the ^ arrow of any helpful answers. These are the mechanisms for communicating the quality of the Q&A on this site. Thanks!

In case you need clarification, edit your question (not an answer which is reserved for solutions) or comment the relevant answer.

Thanks for your quick reply. I used Textboxes as it seemed the correct item. What I need for the styling is to encase some formatted source code so that it I can also caption it and allow it to be included in a table of contents/tables/lists etc. The source code would also be specifically styled to use a different font and font size than the rest of the document. The document was originally created using with the standard odt filetype. One user edited it using Word, so I am unsure if this could cause any corruption. If your suggestion is to use a Frame that is something I could do. I was unsure if this was a true bug that’s why I posted here instead of sending it to the issue tracker.

No need of frames to “encase” formatted source code. Frames (or worse, text boxes) will give you trouble with page boundaries. It is much better to create a dedicated paragraph style (which can have background and border, thus visually resembling a text box). Your source code then flows “naturally” with the rest of the text.

Don’t bother with Insert>Caption. You can have exactly the same feature and more versatility with field insertion (use an independent number range for your code snippets). Create also a dedicated paragraph style for your captions. This dedicated paragraph style can be automatically collected in a “Table of snippets”.

If you’re interested, I can send you privately an example of a user manual I made based on these recommendations.

Hi thanks that would be most helpful.

Contact me on ajlittoz (at) users (dot) sourceforge (dot) net

After mail exchange, you’ll have my real mail address.