Bug 141210 - SELECTION: Make it more visible, if a shape is not included into a selection (because its anchor is not included)
Summary: SELECTION: Make it more visible, if a shape is not included into a selection ...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
(earliest affected)
Hardware: All All
: medium enhancement
Assignee: Not Assigned
Depends on: 139668
Blocks: Selection
  Show dependency treegraph
Reported: 2021-03-23 18:48 UTC by Tor Lillqvist
Modified: 2022-06-16 15:43 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:
Regression By:

Trivial sample document. (8.96 KB, application/vnd.oasis.opendocument.text)
2021-03-23 18:48 UTC, Tor Lillqvist

Note You need to log in before you can comment on or make changes to this bug.
Description Tor Lillqvist 2021-03-23 18:48:00 UTC
Open the attached document. Select from "Text that..." until "And text that..." . (Do not use Edit > Select All.) To any user, it would seem that the box is included in the selection. But it isn't. Do Edit > Copy , and move to the end, hit a few Enters, and Edit > Paste. No box.

Steps to Reproduce:
See description.

Actual Results:
See description.

Expected Results:
Either the selection should highlight only the text, which is what actually is selected, or the selection should include the shape.

Reproducible: Always

User Profile Reset: No

Additional Info:
Appears in all versions as far as I know.
Comment 1 Tor Lillqvist 2021-03-23 18:48:25 UTC
Created attachment 170670 [details]
Trivial sample document.
Comment 2 Dieter 2021-04-07 08:31:37 UTC
I confirm the described behaviour with

Version: (x64) / LibreOffice Community
Build ID: f96004096268f5e71120678e32fc8c74055819aa
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Shape is copied, if the anchor of the shape is selected. I agree that it should be more visible, if a shape is selected or not (same for images and other objects). so I think it is an enhancement request.
cc: Design-Tea for further input and decision.
Comment 3 Heiko Tietze 2021-04-07 10:26:47 UTC
We could show the snap points if the object is part of the selection.
Comment 4 Heiko Tietze 2021-04-15 07:23:44 UTC
No further input, let's show the snap points.
Comment 5 Michael Stahl (allotropia) 2022-06-16 11:46:43 UTC
this is because the selection highlighting in Writer completely ignores drawing objects.

if you put Writer text frame/image/embedded object there, its area will be "cut out" of the selection - and if it is selected and positioned outside of the selected text rectangle, it will be highlighted separately.

this all happens in SwRootFrame::CalcFrameRects(), this check excludes drawing objects:

                if ( !pFly )

one obvious issue is that drawing objects can be rotated freely but Writer flys only in 90deg steps, so one rectangle isn't necessarily good way to highlight (or cut-out) a drawing object, this needs some extra stuff.