Bug 104860 - Align to anchor should compensate for above / below indent in paragraph
Summary: Align to anchor should compensate for above / below indent in paragraph
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.2.3.2 rc
Hardware: x86-64 (AMD64) Linux (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Anchor-and-Text-Wrap
  Show dependency treegraph
 
Reported: 2016-12-22 14:19 UTC by Aaron
Modified: 2017-06-23 23:37 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
ODT example of register-true anchor bug (20.90 KB, application/vnd.oasis.opendocument.text)
2016-12-22 14:19 UTC, Aaron
Details
Example image register-true on (308.99 KB, image/jpeg)
2016-12-31 18:51 UTC, Aaron
Details
Example image register-true off (339.14 KB, image/jpeg)
2016-12-31 18:52 UTC, Aaron
Details
Clearer example image register-true on (154.29 KB, image/jpeg)
2016-12-31 19:07 UTC, Aaron
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aaron 2016-12-22 14:19:39 UTC
Created attachment 129866 [details]
ODT example of register-true anchor bug

When anchoring a frame or image to a register-true paragraph (or character) which either 1. has above paragraph spacing, or; 2. is preceded by a paragraph style which has below paragraph spacing, it often happens that the frame or image does not properly vertically align with the position of the paragraph. 

See attachment for examples.
Comment 1 Buovjaga 2016-12-31 16:13:48 UTC
Not sure I understand the vertical alignment issue. I am able to freely change the vertical alignment by dragging and dropping the objects. Is there something I am missing? Perhaps you need to provide step-by-step instructions.
Comment 2 Aaron 2016-12-31 18:51:34 UTC
Created attachment 130061 [details]
Example image register-true on

Sorry if I was unclear in my original post. I'll add a picture as an attachment to better show what I mean. When anchoring a frame or image to a paragraph and selecting the vertical position to be "from top by 0" or "top" to paragraph text area, you expect the top of the frame to be at the same height on the page as the top of the paragraph text area. This is how it normally behaves when register-true is turned off (see image register-true off), when register-true is turned on this doesn't work anymore and the top of the frame doesn't line up with the top of the paragraph ext area. (See image register-true on) I assume this is a bug because it makes documents which use both register-true and paragraph anchoring look ugly and wonky. Seeing as how I really want to use both these features for the layout of my master's thesis, I will gladly help anyway I can. 

P.s.: I know that in the files I sent you this difference in height might be rather subtle, but when using other fonts (which I couldn't use here since they aren't normally included with libreoffice) or using different amounts of spacing, the difference in vertical position can become a lot more noticeable. (You can try this for yourself by actually playing with the fonts and spacing.)
Comment 3 Aaron 2016-12-31 18:52:22 UTC
Created attachment 130062 [details]
Example image register-true off
Comment 4 Aaron 2016-12-31 19:07:09 UTC
Created attachment 130064 [details]
Clearer example image register-true on

A clearer example from a paper I'm writing (text replaced by dummy text ofc).
Comment 5 Buovjaga 2016-12-31 19:38:07 UTC
Ok, I think we now have the pieces to write out steps to reproduce, but register-true does not seem relevant.

1. New Writer document, type a 1-word paragraph and maybe create one empty paragraph
2. Insert dummy text to a new paragraph by typing dt and hitting F3
3. Drag'n'drop some small image to the right of the dummy text paragraph so it is anchored to it
4. Right-click image, Alignment - Align top to anchor
5. Change the paragraph style of the dummy text to Heading 1, 2 or 3..

Observe that the top of the image is not aligned to the top of the paragraph. Repeating alignment setting for image will not help.

I'm changing this to enhancement as this might just be seen as a lack of intelligence in the anchoring system.

Aaron: note that you can always manually position the images/frames. Maybe there is some workaround. You could do a search on the web or submit a question to http://ask.libreoffice.org/ as a last resort.