Bug 149460 - Lines and Shadows in Shapes are positioned outside their selected region
Summary: Lines and Shadows in Shapes are positioned outside their selected region
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Shapes
  Show dependency treegraph
 
Reported: 2022-06-05 01:44 UTC by sdc.blanco
Modified: 2022-06-16 15:08 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Examples of lines and shadows going past positioning region (43.61 KB, application/vnd.oasis.opendocument.text)
2022-06-05 01:44 UTC, sdc.blanco
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sdc.blanco 2022-06-05 01:44:54 UTC
Created attachment 180571 [details]
Examples of lines and shadows going past positioning region

The attachment demonstrates the problem.  

Basic issue.

For shapes, it is possible to add a "line" or a "shadow"
For images, it is possible to add a "border" or a "shadow"

Actual: When positioning shapes and images, which are anchored "to paragraph" and positioned horizontally with Horizontal: Left  to: Entire Paragraph Area (or Paragraph Text Area), then 
  line and shadow for shape are positioned outside of the Entire Paragraph Area/Paragraph Text Area 
 while for images, they are "inside".

Expected: Images and Shapes behave the same.
Expected: Shapes would follow the behavior of Images.

Question:  Is this difference in behavior by design, in which case this ticket is a documentation report, or is this an implementation bug?

Additional information: 
The attachment only looked at "Left" and "Entire Paragraph Area" and "Paragraph Text Area".  There are many other variations that could be checked, but there are enough examples in the attachment to show that there is an issue.

Version: 7.4.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: bbec710bd25fc5da27636cde73fe4ab23c76904f
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: da-DK (da_DK); UI: en-US
Calc: CL
Comment 1 Regina Henschel 2022-06-05 12:31:40 UTC
Reason is, that Writer images are treated as frames and not as shapes.
This has a lot of other consequences too, see https://wiki.documentfoundation.org/Development/Budget2022#Unify_Writer_and_Draw_Images 

The border problem is already tracked in bug 90070. I do not find a similar report for shadow. Therefore I suggest to take this report for the shadow problem.
Comment 2 Regina Henschel 2022-06-05 12:39:49 UTC
see also discussion https://listarchives.documentfoundation.org/www/board-discuss/2022/msg00486.html
Comment 3 sdc.blanco 2022-06-06 10:03:24 UTC
(In reply to Regina Henschel from comment #1)
> The border problem is already tracked in bug 90070. 
But 90070 is about "image shrinking" when a border is added. 

comment 1 and comment 2 imply that the intention is to make "Shape" (Draw-Image) be the "default" (expected) behavior. 

In relation to the OP -- the issue is about positioning (not shrinking).
I would consider "Shape" (Draw-Image) to "violate" the positioning dialog, because it places "Line" and "Shadow" outside of the positioning regions.

Have now also tested/confirmed same problem with: 

   Horizontal: Left  to: {Page text area, Entire page}

This issue is especially visible with "to: Entire page"  because the line (on the left side of the shape) and the shadow (on the left side) are not shown on the canvas.

Have made bug summary more general.
Comment 4 Heiko Tietze 2022-06-07 09:02:26 UTC
Maybe bug 90070 is not the same but essentially asks for exactly the opposite. If you expect borders and shadows to become cut off at the area boundary it would be the same for borders around the object.

And as always, we wont make everybody happy. To me the implemented solution is more natural and easier to deal with (you can cover the extended objects).

My take => NAB/DUP (removing the confirmation for now)
Comment 5 sdc.blanco 2022-06-07 09:39:06 UTC
(In reply to Heiko Tietze from comment #4)
> As always, we wont make everybody happy. 
fwiw, the OP is not promoting any particular solution, just noting a difference between Shapes (Draw-Images) and Frames (Writer-Images), and suggesting either consistency or a good documented reason for the difference in positioning behavior.

> To me the implemented solution
> is more natural and easier to deal with (you can cover the extended objects).
Two or more different issues may be conflated here -- so just to lay them out a little more explicitly.

Issue 1.  Whether a shape/image is shrunk when it is positioned at the edge of a region AND a border is added.  (n.b., bug 90070 is about image, where, iiuc, it does not necessarily have to shrink, so that issue could be addressed independently of the OP here (by not shrinking the image).  (comment 4 seems to imply that shape should not get the shrinking behavior, with which I agree.)

Issue 2.  Whether the line and shadow of a shape should be positioned within the region selected in the Position and Size dialog  (independent of shrinking).  (comment 4 does not address that issue).
Comment 6 Heiko Tietze 2022-06-16 15:08:31 UTC
Topic was on the agenda of the design meeting but didn't receive further input. Writer images are treated as frames and not as shapes, which is unfortunate. Let's keep this ticket open for reference.