Bug 170218 - Unable to change default Anchor setting of Frames/Formulas/Drawing Objects to “As Character”
Summary: Unable to change default Anchor setting of Frames/Formulas/Drawing Objects to...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
25.8.3.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Anchor-and-Text-Wrap Options-Dialog-Writer
  Show dependency treegraph
 
Reported: 2026-01-03 21:10 UTC by Farid
Modified: 2026-06-15 08:42 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Farid 2026-01-03 21:10:15 UTC
Description:
For scientific writing I need to set the default Anchor setting of Images/Frames/Formulas/Drawing Objects to “As Character”. Below is a summary of Writer’s behavior with different types of objects
    • Formula: changing Frame Style > Formula > Type > Anchor is effective and new Formulas are inserted with “As Character” anchor setting.
    • Image: Changing default “Frame Styles > Graphics > Type > Anchor” is not effective
      Tools > Options > LibreWriter > Formatting Aids > Anchor  is effective but only for images.
    • Frames : changing the “Frame Style > Frame > Type > Anchor” is not effective.
      There is no global options for Frames like Images
    • Shapes (drawing objects): has not associated para/frame style. Only appears in the Navigation panel.

Steps to Reproduce:
For each type of object, change the default style and set the Anchor to "As Character". Then insert a new object (frame/formula/drawing object/image) and check its Anchor type.

Actual Results:
The Anchor type is the Writer default "To Paragraph"

Expected Results:
The Anchor type to "As Character"


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 25.8.3.2 (X86_64) / LibreOffice Community
Build ID: 580(Build:2)
CPU threads: 20; OS: Linux 6.17; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Debian package version: 4:25.8.3-1+b1
Calc: threaded
Comment 2 Dieter 2026-01-31 17:06:55 UTC
I confirm thr actual behaviour. So for some objects it is possible to set default anchor, for some objects not and methods are different. So I would treat it as enhancement request like "Make setting of default anchor more consistant and available for all kind of objects"

Let's ask design-team
Comment 3 Heiko Tietze 2026-02-04 10:31:59 UTC
We have Tools > Options > Writer > Formatting Aids > Image: Anchor [To Character], added for bug 99646.

Shall we use the same option for all types of floating objects or better have different options?
Comment 4 Farid 2026-02-05 13:43:29 UTC
I think the Formula object behaviour which inherits from the corresponding style is ideal. The same approach could be adopted for Grpahics (Images) and Frames. 

For Drawing Objects (DO): Even though we have styles for them in Draw and Impress, Writer lack these DO styles. For the ultimate consistency, we are better off to add their Style to Writer and make the anchor setting follow this style options like the above mentioned objects.

thanks
Comment 5 Heiko Tietze 2026-02-09 10:11:59 UTC
The patch for bug 99646 added a drop down with the anchoring options to tools > options > writer > formatting aid.

It works for Frmmgr_Type::GRF, the full list of enums is

    NONE    = 0x00,
    TEXT    = 0x01,
    GRF     = 0x02,
    OLE     = 0x04,
    ENVELP  = 0x10

Need to investigate what we can do, but more fine-tuning is desirable.
Comment 6 Heiko Tietze 2026-02-19 09:46:55 UTC
The SwFlyFrameAttrMgr() [1] knows three types: frames, OLE objects, and graphics. OLE (such as formula) and graphics are handled together and take the default from Options > Formatting Aids. Frames are limited to the dialog workflow via Insert > Frame > Frame... where you can specify the anchor.

Even if we could set the anchor for interactively drawn frames- it is pointless to make it jump to some fix position (As/To Character). And there is always the option to change the default frame style or to apply one with a different anchor after inserting. (This is also true for images, and I slightly regret the implementation of the option in bug 99646.)

Can you agree with WF?

Shapes, text boxes, and barcodes are different objects. Having a drawing style (bug 89369) would allow anchoring per style as well. However, I think this has a low priority as those objects are typically floating.

[1] https://opengrok.libreoffice.org/xref/core/sw/source/uibase/frmdlg/frmmgr.cxx?r=d11198b7bd6659647e491dbbdc17a13f3ef93611#77
Comment 7 Farid 2026-02-20 21:35:02 UTC
"The SwFlyFrameAttrMgr() [1] knows three types: frames, OLE objects, and graphics. OLE (such as formula) and graphics are handled together and take the default from Options > Formatting Aids."

I don't think this is true. I have set Formatting Aids > Image > Anchor to As character: 

1. New inserted images, either from the Insert > Image, or by copy/pasting, honor this option.
2. OLE > Formulas honor their corresponding Frame style (Formula) anchor type option. If I change the style option, it affects the default anchor option of new formulas inserted from Insert > OLE > Formula.
3. Insert > OLE > Barcode always anchor to paragraph and no Frame style is associated with them!
4. Insert > OLE > OLE object (e.g. a Draw object) is similar to Formula and it honors the corresponding Frame style (i.e. OLE) anchor option.

"Frames are limited to the dialog workflow via Insert > Frame > Frame... where you can specify the anchor."

I personally insert Frame when captioning my figures i.e. by right clicking a Figure/Formula and then Insert Caption.

"Even if we could set the anchor for interactively drawn frames- it is pointless to make it jump to some fix position (As/To Character)."

In the scenario I mentioned, particularly for scientific writing, I always expect the inserted frame around the figure be anchored as character. We need just to trigger the function which sets the anchor to "as character" and the fix position depends on the bounding box of the frame.

Anchor to para/char has unpredictable side effects. In my odt to docx workflows, the situation is more dire and undesired repositioning of the frames may happen.

"And there is always the option to change the default frame style or to apply one with a different anchor after inserting."

If i select a frame and change the "Frame styles > Frame" anchor option to As Character, it won't affect the selected or newly inserted frames! Perhaps a bug!

thanks you
Farid
Comment 8 QA Administrators 2026-02-21 03:17:19 UTC Comment hidden (obsolete)
Comment 9 Heiko Tietze 2026-02-23 09:00:58 UTC
(In reply to Farid from comment #7)
> Formulas honor their corresponding Frame style (Formula) anchor
True, formula have an internal "fly style" but will always follow layout of the surrounding frame.

> We need just to trigger the function which sets the anchor to "as character"...
Frames are used in different scenarios. "Fixing" your use case breaks other.

> If i select a frame and change the "Frame styles > Frame" anchor option to
> As Character, it won't affect the selected or newly inserted frames!
Really? Works for me. 

Do you know the "Unfloat Frame Content" function? It's in the context menu.
Comment 10 Johnathan Dean 2026-05-22 07:40:41 UTC
Thanks for the detailed breakdown and reproducible test cases. This does seem inconsistent from a UX perspective — especially since formulas already respect the style-based anchor setting while images, frames, and drawing objects either ignore it or require separate global options. The current behavior makes document formatting workflows unnecessarily fragmented, particularly for academic and scientific writing where “As Character” anchoring is often preferred for layout stability.
It would definitely make sense for Writer to apply anchor defaults consistently across all insertable object types through their associated styles or through a unified global setting.
Related documentation about anchoring behavior in Writer:
https://help.libreoffice.org/latest/en-US/text/swriter/guide/anchor_object.html https://geometrylite22.io