Bug 75439 - Objects in header area are REALLY hard to select
Summary: Objects in header area are REALLY hard to select
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.0.alpha0+ Master
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 97387 (view as bug list)
Depends on:
Blocks: Writer-Header-Footer
  Show dependency treegraph
 
Reported: 2014-02-24 12:11 UTC by Rajashri
Modified: 2022-11-27 17:51 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Optimized File (179.54 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-02-24 12:11 UTC, Rajashri
Details
RoundTripped file 6 may 2014 build (243.94 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2014-05-06 09:59 UTC, Tushar Bende
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rajashri 2014-02-24 12:11:34 UTC
Created attachment 94645 [details]
Optimized File

The problem here is that some of the text boxes are getting exported in header.xml therefore they appear as water mark/not editable.
There is no repetition of text-boxes. The problem seems to be with the section breaks. Attaching the optimized file.
Comment 1 Tushar Bende 2014-05-06 09:59:59 UTC
Created attachment 98547 [details]
RoundTripped file 6 may 2014 build
Comment 2 mahfiaz 2016-08-04 17:16:32 UTC
The actual problem most likely is that it is hard to select objects which are in the header area (as clicking would make you edit header instead).

As a workaround you could:
1) select any of the boxes in the usual text area (page 2 in example file)
2) now select any object in the header by double-clicking

The step 1 makes Writer to to "selection tool" mode or something.
Comment 3 Xisco Faulí 2016-09-14 22:59:39 UTC
Hi Tushar,
I'm setting this ticket back to NEW as it has been inactive for more than 3
months.
Feel free to assign it back to you if you're still working on this.
Regards
Comment 4 Xisco Faulí 2017-09-29 08:49:12 UTC Comment hidden (obsolete)
Comment 5 Thomas Lendo 2019-08-31 23:19:57 UTC
Still valid with Version: 6.4.0.0.alpha0+
Build ID: 4e527f55d74e3220873075a8ec2799e2206fdb2d
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2019-08-31_02:35:57
Locale: de-AT (de_AT.UTF-8); UI-Language: en-US

But I think it's the same cause as described in bug 50195 'EDITING: Can't Select Image in Header when outside margins' therefore maybe a duplicate?
Comment 6 Peter Gervai 2021-03-04 10:32:22 UTC
*Still* valid with 
Version: 7.0.4.2
Build ID: 00(Build:2)
CPU threads: 8; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF8); UI: en-US
Debian package version: 1:7.0.4_rc2-1+b1
Calc: threaded

Repoduction: 
1. open a new document
2. add header
3. import (small logo-like) image (which fit into the header area)
4. move image into the header; the anchor stays at the top left document
5. select anything else
6. you cannot select the image any longer

Workaround: 
As mahfiaz wrote: you have to import another image, put it in the text body, click-select it _then_ you can select the images in the header.

This bug is extremely annoying, especially when you don't know the workaround. Since headers very often contain small logos and stuff and many documents only contain text there is no obvious way to select the images for the innocent user.
Comment 7 Peter Gervai 2021-03-04 13:44:39 UTC
Still valid in:
Version: 7.1.1.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 8; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: hu-HU (hu_HU.UTF8); UI: en-US
Debian package version: 1:7.1.1~rc2-2
Calc: threaded

And it is possibly related to the position and kind of the anchor, probably another workaround is to change the anchor type manually.
Comment 8 Peter Gervai 2021-03-04 15:58:52 UTC
Additionally even when someone uses the workaround to be able to select the image there is no context menu on rightclick, on have to use the top menu for properties.

(Not _strictly_ but related is that changing the anchor into the header is also a horrible experience: I believe the process is:
1. move image into header, anchor is at text body top
2. enter dialog (through top menu), select page relative anchor for image, OK
3. enter dialog again, select paragraph relative, which may or may not be within header.

Possibly can't move it out the normal way either.)
Comment 9 Mike Kaganski 2021-03-04 16:08:59 UTC
To select such objects:

1. Show Draw Functions toolbar (e.g., View->Toolbars->Drawing; or respective button on Standard toolbar).
2. Click "Select" button on the toolbar (the first button, with arrow icon).
3. Click and draw a rectangle selection around the needed object.
Comment 10 Mike Kaganski 2021-03-04 20:12:12 UTC
Code pointer: SwEditWin::MouseButtonDown.

Near the start of the function, starting on line 2861 [1], it checks if the click is over the header/footer area, and if it is, a call to rSh.ToggleHeaderFooterEdit switches to those. The check for graphic object under the cursor happens later at line 3212 [2]. If we already switched to header/footer, then this check will return false.

The function does a lot of stuff, and I have no idea if it is possible to reverse the checks, or postpone the decisions. However, if this is to be fixed, this is the place.

[1] https://opengrok.libreoffice.org/xref/core/sw/source/uibase/docvw/edtwin.cxx?r=899a73a3#2861

[2] https://opengrok.libreoffice.org/xref/core/sw/source/uibase/docvw/edtwin.cxx?r=899a73a3#3212
Comment 11 Buovjaga 2021-09-25 07:12:36 UTC
*** Bug 97387 has been marked as a duplicate of this bug. ***