Frame styles question and captioned image resizing.

Hi

I am making some adjustments in images for the Base Guide and found "inconsistencies" in frame styling.

Applying a frame style to a graphic object in a text document does not mean that all style properties listed in the frame style dialog are applied.

In particular, the "anchoring", “keep ratio”, “auto size”, “relative to”, “width” and “height” found in the Type tab of a frame style are not applied to the object.

Which is rather confusing, unless it’s a bug.

The Writer guide mentions anchoring as a manual setting, but not the other settings above.

Also, the Writer guide mention captioning how-to topics but not one use case we find so often: resizing captioned images.

https://books.libreoffice.org/en/WG73/WG7308-IntroStyles.html#toc25
https://books.libreoffice.org/en/WG73/WG7311-ImagesAndGraphics.html#toc18

Ideally I would like to resize the frame and get the internal image/screenshot resized accordingly (or vice-versa). It is not clear to me how the frame properties relates to the image (also a frame) inside, and if there are parameters to set to bind the 2.

A clear instructions on this use case will go into the guides, Help and wiki.

https://wiki.documentfoundation.org/Documentation/DocumentationTeamInfo/ProducingLibreOfficeUserGuides

https://help.libreoffice.org/7.4/en-US/text/swriter/01/05060100.html?&DbPAR=SHARED&System=UNIX

Kind regards

Part of the issue is answered by Regina

https://bugs.documentfoundation.org/show_bug.cgi?id=32484#c22

<quote>
One reason of the problem is, that ODF allows the setting "anchor-type" as direct attribute of an object and as part of a style. If both are present, the object attribute "wins". Currently LibreOffice writes it as direct attribute and do not include it in custom defined style. Only the predefined styles have set the anchor-type as part of the style.

If you derive your custom style from an predefined style, it will inherit the setting. Currently there is Watermark with anchored to page, and Frame, Graphics, Marginalia and OLE anchored to paragraph, and Formula and Labels anchored as-char.
</quote>

Hello Olivier

If you adjust frame size for a figure, the image inside the frame automatically adjusts its size to fit the frame. However, you have to select “Keep ratio” option to maintain the correct image size. I do this adding figures to the user guide.

Regards

Peter Schofield

Hi Olivier,

Applying a frame style to a graphic object in a text document does not mean that all style properties listed in the frame style dialog are applied.

In particular, the "anchoring", “keep ratio”, “auto size”, “relative to”, “width” and “height” found in the Type tab of a frame style are not applied to the object.

Which is rather confusing, unless it’s a bug.

Maybe I'm adding confusion, but it might also help understanding what settings work in frame styles and what not..

I've experienced that when you create a custom object style from an image/object that you gave some properties, there is no way to exclude the width & height òr to make sure that the aspect ratio is preserved when the style is applied to an object. Also changing the style's definition in the xml-styles file, didn't help.

Cheers,
Cor