Bug 114973 - Ctrl+A and Select All don't work when paragraph at the start or end of document body is hidden
Summary: Ctrl+A and Select All don't work when paragraph at the start or end of docume...
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.0 release
Hardware: x86-64 (AMD64) All
: medium minor
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: target:7.6.0 target:7.5.2
Keywords:
Depends on:
Blocks: Writer-Styles Selection
  Show dependency treegraph
 
Reported: 2018-01-12 09:42 UTC by Lafricain
Modified: 2024-02-05 13:22 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
ODT from LibreOffice with hidden paragraph style (8.11 KB, application/vnd.oasis.opendocument.text)
2018-02-11 12:30 UTC, Buovjaga
Details
Odt where select all is impossilble (13.76 KB, application/vnd.oasis.opendocument.text)
2018-02-11 16:15 UTC, Lafricain
Details
Test case reduced to minimum (8.44 KB, application/vnd.oasis.opendocument.text)
2018-02-11 16:51 UTC, Buovjaga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lafricain 2018-01-12 09:42:01 UTC
Using a file with more than 900 pages, I would like to use columns, but impossible to select all! 
The workaround was to untick the "hide" option in the character effect tab in the hidden style "Header_20_1".
An issue on github give mor information about this Header_20_1 style: https://github.com/bibledit/cloud/issues/111
Comment 1 Buovjaga 2018-02-11 12:30:22 UTC
Created attachment 139781 [details]
ODT from LibreOffice with hidden paragraph style

I am able to select all in this file I just created. It has a paragraph style called Hidden and a paragraph in the middle that is using it. Please test.

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: c6a23023150c164a19236139fa413d43006ce21c
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on February 11th 2018
Comment 2 Buovjaga 2018-02-11 12:34:34 UTC
Now I tested with https://github.com/bibledit/cloud/blob/master/odf/template.odt but it does not contain any styles named like you say or that the readme at https://github.com/bibledit/cloud/tree/master/odf says.
Comment 3 Lafricain 2018-02-11 16:15:48 UTC
Created attachment 139788 [details]
Odt where select all is impossilble
Comment 4 Lafricain 2018-02-11 16:16:25 UTC
Hello,
I tested your file, and yes I can select all. Please test the attach file as exemple of a file with the problem. I was exported from bibledit.
Comment 5 Lafricain 2018-02-11 16:19:24 UTC
I don't know if it is linked but the hidden style is the one displayed on the header: "Rute number" in the attached file.
Comment 6 Buovjaga 2018-02-11 16:51:07 UTC
Created attachment 139789 [details]
Test case reduced to minimum

Ok, in LibreOffice 3.3 I can select all, but already in 3.5 it is broken.

I unzipped the .odt, edited content.xml and removed this:
<text:h text:style-name="Heading_5f_20_5f_1" text:outline-level="1">Rute</text:h>

Then it worked (when I re-zipped the files).

So the problematic style is named Header_20_1 like you said in the description, but it is not yet in the template.odt (it is apparently generated by bibledit later).
Comment 7 Buovjaga 2018-02-11 16:57:44 UTC
I have no other ideas. The style entry in styles.xml is

> <style:style style:name="Heading_5f_20_5f_1" style:display-name="Heading_20_1" > style:family="paragraph" style:parent-style-name="Heading" style:next-style-name="Text_20_body" style:default-outline-level="1" style:class="text">
>    <style:text-properties fo:font-size="115%" fo:font-weight="bold" text:display="none" />
> </style:style>

Compared with the one I created from scratch:

> <style:style style:name="hidden" style:family="paragraph" style:parent-style-name="Standard">
>     <style:text-properties text:display="none" />
> </style:style>
Comment 8 Lafricain 2018-02-11 18:28:00 UTC
If I delete the header I can select all. Then the problem appears when you choose to add the hidden style to the header.
Comment 9 Lafricain 2018-02-11 18:41:22 UTC Comment hidden (obsolete)
Comment 10 Lafricain 2018-02-11 18:41:52 UTC Comment hidden (obsolete)
Comment 11 Lafricain 2018-02-11 18:47:04 UTC
Ok your reduced file is not the same as mine.
Comment 12 Buovjaga 2018-02-11 19:03:39 UTC
(In reply to Lafricain from comment #9)
> It's really strange, I can't find this line <text:h
> text:style-name="Heading_5f_20_5f_1" text:outline-level="1">Rute</text:h> in
> my unzipped content.xml??

Hmm, yep it's true. In the original it is
<text:h text:style-name="Heading_20_1" text:outline-level="1">Rute</text:h>
Comment 13 QA Administrators 2019-06-03 02:50:11 UTC Comment hidden (obsolete)
Comment 14 Lafricain 2019-06-03 09:29:21 UTC
Yes the bug is still present, see the version of LO and Linux:

Versione: 6.2.3.2
Build ID: 1:6.2.3-0ubuntu0.18.04.1~lo1
Thread CPU: 4; SO: Linux 4.15; Resa interfaccia: predefinito; VCL: gtk2; 
Versione locale: it-IT (it_IT.UTF-8); UI-Language: it-IT
Calc: threaded
Comment 15 Lafricain 2019-08-07 11:30:01 UTC
I noticed something new. I add columns in the page style, I can do CTRL+A without problem...
Comment 16 QA Administrators 2021-08-07 03:39:55 UTC Comment hidden (obsolete)
Comment 17 Lafricain 2021-08-07 08:09:22 UTC
Bug still present in:
Version: 7.1.5.2 / LibreOffice Community
Build ID: 10(Build:2)
CPU threads: 4; OS: Linux 5.8; UI render: default; VCL: gtk3
Locale: fr-FR (fr_FR.UTF-8); UI: fr-FR
Ubuntu package version: 1:7.1.5~rc2-0ubuntu0.20.04.1~lo1
Calc: threaded
Comment 18 Commit Notification 2023-01-27 17:15:51 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5aeee226479427062ac885be407671981d6940ef

tdf#114973 sw: IsSelOvr() should not leave the text

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 19 Commit Notification 2023-01-27 17:15:53 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/bb733957dd39e6f0b9d80bb59eb0177188794797

tdf#114973 sw: enable SelectAll with hidden para at start/end

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 20 Michael Stahl (allotropia) 2023-01-27 18:19:00 UTC
fixed on master.

for hidden sections there is bug 119460 and it's much more difficult to fix because in that case there are no layout frames for the hidden paragraphs (no idea why it was implemented that way).
Comment 21 Commit Notification 2023-02-09 13:44:00 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/0590cd2857f68f48b8847071a9c1a7dbef135721

tdf#114973 sw: enable SelectAll with hidden para at start/end

It will be available in 7.5.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2023-02-20 20:40:50 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/b1814b7cc851c4346f6cfa81c5be74c46f42e90f

tdf#114973 sw: don't allow every body SwTextFrame to be hidden

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 23 Commit Notification 2023-03-02 09:12:37 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/6f077add4f8c9ca909374dcd45c21d87eb3c0938

tdf#114973 sw: don't allow every body SwTextFrame to be hidden

It will be available in 7.5.2.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 24 Lafricain 2023-04-12 11:38:13 UTC
Works well with LO 7.5.2 on Ubuntu 22.04.
Comment 25 Duffey O. 2024-01-26 11:03:24 UTC
We have the same problem with LO 7.5.8.3 (can't "Select All" in a document containing hidden section).
Was Ok with 7.3.5.
Comment 26 Lafricain 2024-02-05 13:22:43 UTC
Please try with LibreOfficie 7.6. I tried with 7.6.4.1 on Ubuntu 22.04 and it's working well.