Download it now!
Bug 133291 - Graphic style default anchor should be to character
Summary: Graphic style default anchor should be to character
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on: 87720
Blocks: Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2020-05-22 20:27 UTC by Telesto
Modified: 2020-11-21 16:07 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (454.43 KB, application/vnd.oasis.opendocument.text)
2020-05-22 20:27 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2020-05-22 20:27:07 UTC
Description:
Applying Graphic style to an image can enable the Paragraph anchoring

Steps to Reproduce:
1. Open the attached file
2. Select the image
3. Apply the Graphic style -> Look at the anchor -> Changed to paragraph

https://gerrit.libreoffice.org/c/core/+/90495/1/sw/source/core/doc/DocumentStylePoolManager.cxx

Actual Results:
The anchor style is changed to paragraph

Expected Results:
Default changed


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.0.0.alpha1+ (x64)
Build ID: 9a7c5d38a7a43c75c0f3d2f0c725196e916d0260
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win; 
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2020-05-22 20:27:20 UTC
Created attachment 161166 [details]
Example file
Comment 2 Telesto 2020-05-22 20:30:50 UTC
Adding UX pro forma, related to bug 133293
Comment 3 Heiko Tietze 2020-05-25 10:33:59 UTC
From the OASIS standard:

16.37 Graphic Styles
Graphic styles are <style:style> elements that have the family graphic.
In addition to graphic properties, graphic styles may define paragraph and text properties. These are applied to paragraphs contained in drawing objects unless they are overwritten by paragraph styles that are specified by the paragraph elements themselves.

=> NAB

(What bothers me, however, is the fact that users cannot edit this style property except from creating a style as new based on the current selection.)
Comment 4 Heiko Tietze 2020-05-25 11:24:33 UTC
Duplicate of bug 32484?
Comment 5 Telesto 2020-05-25 11:38:14 UTC

*** This bug has been marked as a duplicate of bug 32484 ***
Comment 6 Regina Henschel 2020-05-25 12:02:33 UTC
The anchor is determined by the text:anchor-type attribute of the object. It is not part of a <style:style> element.

Our Frame-'Styles' do not contain only settings from <style:style> elements, but they contain object attributes too. For such attributes our 'style' works as a stamp, that sets the attribute on the object when applying the 'style'.
So if a 'Frame Style' contains the anchor attribute 'to paragraph' it will be set to the object.

I see a bug here. The default anchoring for images was changed to "to character" and the default style is "Graphics". But "Graphics" contains "to paragraph". Therefore default anchoring and default style no longer match in regard to anchoring for images.

BTW: For width and height exists a similar problem. They are object attributes too.
Comment 7 Telesto 2020-05-25 13:21:26 UTC
FIXED seems of.. should be NEW i think?
Comment 8 Heiko Tietze 2020-05-25 15:05:23 UTC
(In reply to Regina Henschel from comment #6)
> character" and the default style is "Graphics". But "Graphics" contains "to
> paragraph". Therefore default anchoring and default style no longer match in
> regard to anchoring for images.

How do we deal with this situation in respect to bug 99646
Comment 9 Regina Henschel 2020-05-25 16:13:34 UTC
(In reply to Heiko Tietze from comment #8)
> How do we deal with this situation in respect to bug 99646

I see these problems:
(1) The user cannot set the anchor type, which is stored in the style. Neither the dialog works (bug 99646) nor changing via "Update from selection" works.
(2) Objects are inserted with an individual anchor type, which is not derived from the associated "Frame Style". That results in mismatch in case of "Graphics" (to character <-> to paragraph) and "Formula" (as character <-> to character).
(3) Currently the only way to get an own style, which contains the desired anchor, is, to inherit it from an existing, predefined style. But currently no predefined style exists for "as character".

A different approach than allowing to set anchor type directly in the dialog might be this: Provide a set a basis styles, one for each anchor type. Inherit the predefined styles from them. And a user can get his favorite anchor for the predefined and for his own styles be using the matching basis style.

I think (2) [this issue] can be solved by changing the default styles, independent of a solution for bug 99646.
Comment 10 Telesto 2020-05-25 16:37:51 UTC
(In reply to Heiko Tietze from comment #8)
> (In reply to Regina Henschel from comment #6)
> > character" and the default style is "Graphics". But "Graphics" contains "to
> > paragraph". Therefore default anchoring and default style no longer match in
> > regard to anchoring for images.
> 
> How do we deal with this situation in respect to bug 99646

WARNING: Typed before Regina answered...

Changing the anchor from to paragraph to to character 'Graphic Style' is no help for bug 99646. And you can apply Graphic Style to image anchored 'to character' but doesn't change the anchoring at all (no clue why). However if an image is anchored to character and the Graphic Style is applied the anchor changes 'to paragraph

---

@Drifting a little off..
The ultimate/ideal solution is fixing bug 32484. Multiple styles, with different anchors and wrap settings (and aligning; left/right).. And a way to define so select a (temporally) default when importing images.. so the same style is applied over and over.. (but also be able to change that)

And the mouse over info popup should be renamed from 'Frame styles' to "Frame & Image styles". The caption is not clear. And some more differentiation within the dialog wouldn't hurt either.. Frame <-> Image <-> OLE are different objects, IMHO. The technically be the same thing.. but from user perspective totally different. I'm still not sure where the style label is used for.. [not saying it has no purpose.. but frame style feel like a bunch of total different items added together. I actually never considered the formula a frame with a frame style attached to it.. but that's what you get with a Benjamin.. 

And the caption 'Graphic' for Image style still but dubious to me; I personally find it confusing name. [I'm willing to report everything in separate bugs reports, but needs more an integral UX to do list/ minor improvement mock-up , instead of me splitting up every detail in 5-10 separate bug reports, and disuse every point one by one
Comment 11 Robert Großkopf 2020-10-20 08:02:33 UTC
When reading the title of this bug I'm irritated. The default seems to be set to character in LO 6.4.6.2 an LO 7.0.2.2. So this seems to be changed. But the default style for Graphic shows "to paragraph" instead. Is this a new bug?

Best will be to allow changing the anchor in the style ( bug 32484 ).
Comment 12 Robert Großkopf 2020-10-20 08:07:31 UTC
Have tested this a little bit more: The anchor has changed since LO 6.4.0.3 but the style doens't show this.
Comment 13 Werner 2020-11-21 14:30:50 UTC
Is there somebody feeling able to solve this bug, giving the user the possibility to change the default behavior for anchor inserting images (and other objects)?
I could make a donation for that.
Comment 14 Telesto 2020-11-21 16:07:32 UTC
(In reply to Werner from comment #13)
> Is there somebody feeling able to solve this bug, giving the user the
> possibility to change the default behavior for anchor inserting images (and
> other objects)?
> I could make a donation for that.

They most effective donation would be they donation of the needed code. But I assume this about a financial contribution :P

They issue with financial contribution being that developers are expensive people (and maybe even pricier as employee instead of contractor), so mostly a large sum is needed. Which obviously far to much for what a normal user would be willingly to pay. While aggregating a large sum (crowd funding) failing as they targeted amount not being met; mostly not even close (they few attempt there where floundered)

At that point we are back at square one :-(. 

I personally tend more to they license model. Where they development is funded out of license fee's instead of donations and trying to sell bugfixes/features to (mostly) company's. 
A license model would generate more stable, continuous flow of revenue. At maybe some customer pressure (if you pay license fee you XYZ functioning). And you have argument for that (I paid X). It's broken, disfunctional, fix it :-). 

However currently there is nobody 'responsible'. Developers are happy to solve you're problem, please pay 10.000-100.000$ and we will solve that specific issue for you (and they rest of they would will get it for free). So in fact they eco-system partner/developer is moving their investment risk (without return, because 'shipped for free) to some company/NGO with deeps pockets. But those people not being really inclined to pay.

End result desired features can take for ever.. :-(. Note: stuff is as always more nuanced. And only giving my personal view here. 

Point being: suggestions how to make solve this issue are welcome ;-). There s a fine line/balance between freely available open source office and they commercial interest are here (are large share (3/4) of the code is donated/contributed by (commercial) eco-system partners). 
And there is they problem of cannibalization. LibreOffice free is again so good, so people/company's/NGO can avoid paying (financially or code)

LibreOffice isn't not as good as it could be simply because of money or instead of money bunch of (mostly) C++ developers