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
https://ask.libreoffice.org/t/unable-to-change-default-anchor-setting-of-images-frames-formulas-drawing-objects-to-as-character/130608/5
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
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?
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
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.
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
"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
[Automated Action] NeedInfo-To-Unconfirmed
(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.
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