Bug 34438 (Image-Group) - Group selection does not work with raster images in Writer (Shift + Click nor rectangle selection)
Summary: Group selection does not work with raster images in Writer (Shift + Click nor...
Status: NEW
Alias: Image-Group
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: highest enhancement
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/how-do-...
Whiteboard:
Keywords:
: 34442 45787 47056 49625 50644 68733 96129 101893 113461 113698 114214 121950 126740 133885 139817 150678 152437 153677 153889 (view as bug list)
Depends on:
Blocks: Writer-Images Writer-Enhancements Selection
  Show dependency treegraph
 
Reported: 2011-02-18 04:07 UTC by sasha.libreoffice
Modified: 2023-09-27 23:37 UTC (History)
39 users (show)

See Also:
Crash report or crash signature:


Attachments
odt for testing multiselect (3.83 MB, application/vnd.oasis.opendocument.text)
2017-04-20 00:01 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sasha.libreoffice 2011-02-18 04:07:32 UTC
Often I scan images, put it into document and put on raster images some arrows, other shapes, text. But while further edition image moves in one side and text and arrows in oter. I can not prevent it by grouping because I can not select nor images nor frames for grouping.

I propose new ability:

Grouping raster images with others graphics

Grouping frames with others graphics

In context menu for raster image add option to convert it to rectangle of same size with no borders and with raster image as texture (option Tile set off and option Autofit set on)
Comment 1 Michael Nagel 2011-11-09 03:10:04 UTC
I think you cannot even group together two raster images. For example if I start with a blank Writer document, then insert two jpg images via Drag&Drop from the Desktop, I cannot (via means of holding Shift/Ctrl/Alt/something else and clicking) select them both so I can move them both at the same time.
As I cannot select multiple images obviously I cannot group them.

Is this the issue/missing feature you are talking about?
Comment 2 sasha.libreoffice 2011-11-09 04:48:31 UTC
Yes
Comment 3 Björn Michaelsen 2011-12-23 11:52:33 UTC Comment hidden (obsolete)
Comment 4 sasha.libreoffice 2011-12-28 02:53:34 UTC
remains in LibO 3.5.0 beta 1
Comment 5 Nicolas Mailhot 2012-02-22 06:29:19 UTC
*** Bug 45787 has been marked as a duplicate of this bug. ***
Comment 6 sasha.libreoffice 2012-05-30 07:36:09 UTC
*** Bug 47056 has been marked as a duplicate of this bug. ***
Comment 7 Owen Genat (retired) 2013-11-14 23:40:34 UTC
*** Bug 50644 has been marked as a duplicate of this bug. ***
Comment 8 Owen Genat (retired) 2013-11-15 00:47:17 UTC
*** Bug 68733 has been marked as a duplicate of this bug. ***
Comment 9 Ben 2015-05-13 20:36:38 UTC
I just want to say we are a SMB (60+ employees) this this issue is a deal breaker for migrating.
Comment 10 ralf.krapf 2015-07-02 14:34:52 UTC
+1
I needed this feature today the first time, and i can not believe its not implemented...

I changed the importance to high...
Comment 11 Franklin Weng 2015-08-03 08:30:16 UTC
(In reply to Michael Nagel from comment #1)
> I think you cannot even group together two raster images. For example if I
> start with a blank Writer document, then insert two jpg images via Drag&Drop
> from the Desktop, I cannot (via means of holding Shift/Ctrl/Alt/something
> else and clicking) select them both so I can move them both at the same time.
> As I cannot select multiple images obviously I cannot group them.
> 
> Is this the issue/missing feature you are talking about?


This problem is also confirmed in LibreOffice Writer 4.4.1.2 (Linux version).
Comment 12 Norbert X 2015-08-05 15:22:59 UTC
Bug exists in LibreOffice 5.0 (Ubuntu 12.04.5 with PPA, 1:5.0.0~rc5-0ubuntu1~precise1).
Comment 13 Norbert X 2015-08-31 18:42:13 UTC
Bug exists in LibreOffice 5.0.1.2 (Ubuntu 12.04.5 with PPA, 1:5.0.1~rc2-0ubuntu1~precise1.1).
Comment 14 Regina Henschel 2016-09-04 20:16:54 UTC
*** Bug 101893 has been marked as a duplicate of this bug. ***
Comment 15 Norbert X 2017-04-19 20:40:34 UTC
Bug is not fixed. 
Still unable to group images.

Version: 5.1.6.2
Build ID: 1:5.1.6~rc2-0ubuntu1~xenial1
CPU Threads: 4; OS Version: Linux 4.4; UI Render: default; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 16 Regina Henschel 2017-04-19 21:34:24 UTC
*** Bug 96129 has been marked as a duplicate of this bug. ***
Comment 17 Regina Henschel 2017-04-19 21:37:35 UTC
*** Bug 49625 has been marked as a duplicate of this bug. ***
Comment 18 Regina Henschel 2017-04-19 21:41:25 UTC
*** Bug 34442 has been marked as a duplicate of this bug. ***
Comment 19 Regina Henschel 2017-04-19 21:47:06 UTC
Shift + Click does not work for selecting an image (or picture or bitmap) together with shapes or other images, because an image in Writer is no drawing object. So you can not make multiple selection with images.
[Added some more description to make it easier in search to find this bug.]
Comment 20 Stéphane Guillou (stragu) 2017-04-19 23:59:36 UTC
Confirmed in following version and config:

Version: 5.2.5.1
Build ID: 1:5.2.5~rc1-0ubuntu1~trusty0
CPU Threads: 2; OS Version: Linux 3.13; UI Render: default; VCL: gtk2; 
Locale: en-GB (en_GB.UTF-8); Calc: group
Comment 21 Stéphane Guillou (stragu) 2017-04-20 00:01:33 UTC
Created attachment 132703 [details]
odt for testing multiselect

Document for testing this bug:

- try dragging a select box around all three elements; or
- try adding the picture and a shape to the same selection by using the shift+click combination.
Comment 22 Norbert X 2017-09-01 16:56:18 UTC
Bug exists in 

Version: 5.4.1.2
Build ID: 1:5.4.1~rc2-0ubuntu0.16.04.1~lo0
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group

Ubuntu 16.04 LTS with PPA.
Comment 23 MiQ 2017-09-10 13:11:13 UTC Comment hidden (me-too)
Comment 24 Aron Budea 2017-10-27 02:17:05 UTC
*** Bug 113461 has been marked as a duplicate of this bug. ***
Comment 25 aflux 2017-11-02 13:56:45 UTC Comment hidden (me-too)
Comment 26 Regina Henschel 2017-11-07 20:54:51 UTC
*** Bug 113698 has been marked as a duplicate of this bug. ***
Comment 27 Buovjaga 2017-12-03 17:05:12 UTC
*** Bug 114214 has been marked as a duplicate of this bug. ***
Comment 28 Tony Chou 2018-11-29 08:48:53 UTC
Reproduced

Still exists in version

Version: 6.3.0.0.alpha0+ (x64)
Build ID: 0f25a3c36f27fd51453b9a9115f236b83c143684
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-27_20:06:55
Locale: zh-TW (zh_TW); UI-Language: en-US
Calc: threaded
Comment 29 Dieter 2018-12-07 06:52:01 UTC
*** Bug 121950 has been marked as a duplicate of this bug. ***
Comment 30 Marcin 2019-02-18 19:26:46 UTC
Do you wait until this bug can legally buy a beer?! It is already 8 years old...
Comment 31 Vasyĺ V. Vercynśkyj 2019-02-20 08:01:05 UTC
(In reply to Marcin from comment #30)
> Do you wait until this bug can legally buy a beer?! It is already 8 years
> old...

++ :)

6.1.5.2 still reproduces
Comment 32 Stéphane Guillou (stragu) 2019-04-05 13:10:26 UTC
For the sake of completeness: confirmed in LO 6.2 with original attachment.

Details:

Version: 6.2.2.2
Build ID: 1:6.2.2-0ubuntu0.18.04.1~lo1
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Comment 33 Regina Henschel 2019-08-07 23:51:50 UTC
*** Bug 126740 has been marked as a duplicate of this bug. ***
Comment 34 mattreecebentley 2019-08-08 22:12:22 UTC
I have a suggestion:

allow anything to be selected together, and grey-out or altogether remove possible right-click actions based on what those elements have in common.

But basic movement of images in sync with other elements of a document is absolute base-level functionality, and should be replicated across the board.
Comment 35 David 2019-09-13 09:18:06 UTC
Is there any update on this?

I can't believe this has not been a priority since the beginning, I'd say it was pretty essential to creating documents. A simple CTRL + click to select multiple objects and then group them has been in MS Office since donkeys years.
Comment 36 mattreecebentley 2019-09-16 01:25:33 UTC
Agreed,
what makes it worse is that the keyboard expansion modifiers for raster images and other page elements appear to be reversed. 
I forget which way round it is, but using the keyboard button to modify the resize so that it's proportional expansion on one, cause the expansion to be non-proportional on the other.

From a novice end-user POV this is insane behaviour.
Comment 37 Stéphane Guillou (stragu) 2019-10-22 14:00:42 UTC
Still the case in 6.4:

Version: 6.4.0.0.alpha1
Build ID: cc57df8f942f239d29cb575ea5a7cb01405db787
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: en-AU (en_AU.UTF-8); UI-Language: en-US
Calc: threaded
Comment 38 Yasunori Endo 2020-01-05 09:10:39 UTC
I will take this issue.
See comment on bug 37960 comment 64.
Comment 39 Yasunori Endo 2020-05-13 11:11:17 UTC
I noticed that selection by Ctr+A also doesn't work in test document.
There some be exclusive mechanism.
Also, this problem is not reproduced on Draw, Impress, etc.
sw module should have something about this issue?
Comment 40 Dieter 2020-05-13 11:54:58 UTC
(In reply to Yasunori Endo from comment #39)
> I noticed that selection by Ctr+A also doesn't work in test document.

It only works, if you add a new paragraph. But that's also the behaviour in other documents (don't know if this bug has been reported yet). 

Another question Yasnouri: You've assigned the bug to yourself. So that means you're going to fix it?
Comment 41 Dieter 2020-05-13 11:55:29 UTC
Still present in

Version: 7.0.0.0.alpha1+ (x64)
Build ID: 99c337d1d3831ce9d2c7dc1cbff713f4ac49d6ac
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: Skia/Raster; VCL: win; 
Locale: en-GB (de_DE); UI: en-GB
Calc: CL
Comment 42 Yasunori Endo 2020-05-13 12:02:05 UTC Comment hidden (obsolete)
Comment 43 Dieter 2020-05-13 12:03:34 UTC Comment hidden (obsolete)
Comment 44 Timur 2020-06-15 18:36:33 UTC
*** Bug 133885 has been marked as a duplicate of this bug. ***
Comment 45 Timur 2021-01-26 10:10:09 UTC
*** Bug 139817 has been marked as a duplicate of this bug. ***
Comment 46 Timur 2021-01-26 10:15:22 UTC
(In reply to Yasunori Endo from comment #42)
> > Another question Yasnouri: You've assigned the bug to yourself. So that means you're going to fix it?
> 
> Yes, I'm working on this issue.

I guess we can reset Assignee. Anyone who is willing can take it again.
Comment 47 Bayram Çiçek 2021-07-07 06:46:38 UTC
Code pointers:

- All CLICK and SHIFT+CLICK operations for grouping Drawing objects handled in ./sw/source/uibase/docvw/edtwin.cxx:2770 : https://opengrok.libreoffice.org/xref/core/sw/source/uibase/docvw/edtwin.cxx?r=216a43bc#2770

- SHIFT+CLICK occurs in: https://opengrok.libreoffice.org/xref/core/sw/source/uibase/docvw/edtwin.cxx?r=216a43bc#3470

- Select objects : SwFEShell::SelectObj: https://opengrok.libreoffice.org/xref/core/sw/source/core/frmedt/feshview.cxx?r=715797bc#177

- Marked object list: https://opengrok.libreoffice.org/xref/core/include/svx/svdmark.hxx?r=40595834#230

- Types of forms of content: https://opengrok.libreoffice.org/xref/core/sw/inc/editsh.hxx?r=1feb59c3#130

- Mark object: https://opengrok.libreoffice.org/xref/core/svx/source/svdraw/svdmrkv.cxx?r=8a850eed#1877

You can read the full-detailed blog post of my 2-week research on this bug: https://bayramcicek.com.tr/libreoffice-dev/2021/07/05/week-03-04-gsoc.html

(I don't want to write everything in the blog post here because it's too long), just want to point out:

All selected objects store in rMrkList list:
const SdrMarkList &rMrkList = pDView->GetMarkedObjectList(); 

Output of SAL_DEBUG( rMrkList.GetMarkDescription() ); (in SwFEShell::SelectObj):

For shapes: "shapes"
For 2+ shapes: "2 shapes"
For draw images: "Image with transparency"
For text box: "Text Frame"
For raster images: "[Drawing object]" (defined as #define STR_ObjNameSingulNONE)

rMrkList.GetMarkCount(); always increases by 1 when selecting drawing objects via SHIFT+CLICK. But always gives 1 when selecting raster images because pOldSelFly = ::GetFlyFromMarked( &rMrkList, this ); always return an address and this causes rMrkList doesn’t add the second selected raster image to itself and do unmark it. 
(if we force rMrkList to add raster images to itself by removing the pDView->UnmarkAll() line, this time, debugging warns "warn: /*...*/ frame is not accessible." )

I don't understand why images handled different in Writer and Draw/Calc/Impress.

IMHO, should we get rid of writer-images and convert them into drawing objects as like in the Draw? Otherwise, from my point of view, it seems a bit complicated to group raster images and raster&shapes. What do you think?

Thanks.
Comment 48 Regina Henschel 2021-07-07 12:02:17 UTC
(In reply to Bayram Çiçek from comment #47)
> 
> I don't understand why images handled different in Writer and
> Draw/Calc/Impress.
> 
> IMHO, should we get rid of Writer-images and convert them into drawing
> objects as like in the Draw? Otherwise, from my point of view, it seems a
> bit complicated to group raster images and raster&shapes. What do you think?

From ODF file format there is no difference. So from my point of view we should get rid of Writer-images. But that is a long way.

You see the differences, if you look at the supported services. You can use the "Development Tools" to easily get an overview.

From user point of view the main differences are:
Writer-images allow a wrap, which is determined by a user defined polygon. You get the wrap polygon via context menu -> Wrap > Edit Contour.
Writer-images have the feature "Image Map". You get the "Image Map" via menu Tools > Image Map.
Draw-images have no UI in Writer to crop them (bug 107843).

So to get rid of Writer-images it would be necessary to implement the services, which are provided by Writer-images for Draw-images too.


Converting a Writer-image to a Draw-image for grouping will work. But I would never do this silently, because it means, that the features of the image will be changed.
If an operation in Draw can only be done with a special kind of object, the user gets a warning, that the object will be converted, and an option to agree or cancel. Try command 'Distort' on a star-shape for example.
Comment 49 Luke 2021-07-11 20:03:12 UTC
Why is this listed as a "papercut"?  From Regina's analysis in Comment 48, the developer is going to have to be very careful to not break things worse than they fix. For a student developer new the codebase, this sounds like a standalone project  itself.
Comment 50 Telesto 2021-07-12 06:46:03 UTC
(In reply to Luke from comment #49)
> Why is this listed as a "papercut"?  From Regina's analysis in Comment 48,
> the developer is going to have to be very careful to not break things worse
> than they fix. For a student developer new the codebase, this sounds like a
> standalone project  itself.

Me to blame for being on the list. Only did suggestions on the 'papercut' without understanding of the complexity. Actually full change of Writer image handling was not something I did foresee. 

Change of image handling is not done at GSOC if I'm reading this correctly:
https://bayramcicek.com.tr/libreoffice-dev/2021/07/11/week-05-gsoc.html

"developer is going to have to be very careful to not break things."
Totally true. 

Sidenote: I personally prefer that changes are pushed into fresh master branch from nearly spin-off point. Which I call the Justin L strategy.

As changing Writer image handling will certainly break things, kind of convinced of that. Some bugs will be very noticeable, if something goes wrong (especially if it affects page layout/wrap). So long testing/ repairing period would really helpful.
Comment 51 Roman Jay Almaza 2021-08-16 23:42:09 UTC Comment hidden (spam)
Comment 52 Mehmet gelisin 2021-09-11 13:04:16 UTC Comment hidden (spam)
Comment 53 dirk.meilink 2022-06-17 02:22:44 UTC Comment hidden (no-value)
Comment 54 V Stuart Foote 2023-02-16 23:55:44 UTC
*** Bug 153677 has been marked as a duplicate of this bug. ***
Comment 55 V Stuart Foote 2023-02-16 23:55:53 UTC
*** Bug 150678 has been marked as a duplicate of this bug. ***
Comment 56 Stéphane Guillou (stragu) 2023-02-17 09:00:41 UTC
*** Bug 152437 has been marked as a duplicate of this bug. ***
Comment 57 Stéphane Guillou (stragu) 2023-02-17 10:37:36 UTC
inherited, as reproduced in:

OpenOffice.org 3.3.0
OOO330m20 (Build:9567)

Still current as of:

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: b52117c0be97c45824d2897657084f8ac7e9bf42
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded
Comment 58 V Stuart Foote 2023-03-01 01:59:16 UTC
*** Bug 153889 has been marked as a duplicate of this bug. ***