Bug 113381 - text:anchor-type from style is not used
Summary: text:anchor-type from style is not used
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.0.alpha0+
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2017-10-23 15:39 UTC by Regina Henschel
Modified: 2023-03-04 11:56 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Document with removed hard anchored settings (42.80 KB, application/vnd.oasis.opendocument.text)
2017-10-23 15:39 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Regina Henschel 2017-10-23 15:39:25 UTC
Created attachment 137238 [details]
Document with removed hard anchored settings

The attribute text:anchor-type (values as-char, char, frame, page, paragraph) exists as attribute of the <draw:frame> element (ODF 19.754) and as attribute of a <style:style> element of style family graphic (ODF 20.408).

If an element does not have an own value for a property, then the value from the assigned style should be used. But LibreOffice sets "as-char" instead using the value from the graphic style.

Unpack the attached document and notice, that the <draw:frame> elements have no own attribute text:anchor-type, but the assigned styles have text:anchor-type="paragraph".

Open the file in LibreOffice. Notice that the images are anchored as character.

Because LibreOffice always writes the text:anchor-type attribute to the <draw:frame> element the problem is not directly obvious in daily use. But it prevents a proper handling of styles as requested in bug 113376 or bug 32484.
Comment 1 Buovjaga 2017-11-07 16:08:06 UTC
Setting to NEW
Comment 2 QA Administrators 2019-03-18 03:45:11 UTC Comment hidden (obsolete)
Comment 3 Regina Henschel 2019-03-18 14:44:42 UTC
The error is still in Version: 6.3.0.0.alpha0+ (x64)
Build ID: 9c5dbbe4b0a62ff1af009beb00f1fc45318dad79
CPU threads: 8; OS: Windows 10.0; UI render: default; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-02-27_20:03:12
Locale: de-DE (en_US); UI-Language: en-US
Calc: threaded
Comment 4 Stefano 2020-03-16 21:08:59 UTC
with latest version 6.4.1.2 the anchor-type default to-char (text:anchor-type="char")

I find this behavior extremely annoying, even taunting, since with this version it is finally been added the option to don't allow overlap of image/frame objects.

it's impossible to set up a proper default setting for importing image, which anchor need to be manually changed for every single one.
Comment 5 jd 2020-04-14 22:20:52 UTC
With 6.4.4.2, I set style:graphic-properties text:anchor-type="as-char" in the styles.xml file. When I paste an image, the real anchor-type affected by LibreOffice to the image is "char"... 

It's work fine with 6.3.5.2
Comment 6 Regina Henschel 2021-03-03 14:45:49 UTC
The error still exists in Version: 7.2.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: e60bebd4c5257b0f592d27c74399de1498ac725b
CPU threads: 8; OS: Windows 10.0 Build 19041; UI render: Skia/Raster; VCL: win
Locale: de-DE (en_US); UI: en-US
Calc: CL
Comment 7 QA Administrators 2023-03-04 03:32:51 UTC Comment hidden (obsolete)
Comment 8 Regina Henschel 2023-03-04 11:56:18 UTC
The error still exists in Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1309e6332d7ff2bd1f9b6bf87385b8b570e59158
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded