summaryrefslogtreecommitdiff
path: root/sw/source/uibase/wrtsh
diff options
context:
space:
mode:
authorMichael Stahl <michael.stahl@allotropia.de>2023-01-27 16:06:08 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2023-01-27 17:15:44 +0000
commitbb733957dd39e6f0b9d80bb59eb0177188794797 (patch)
treeec5fa04b542019d98b798605abd1705f0efbbe7e /sw/source/uibase/wrtsh
parent5aeee226479427062ac885be407671981d6940ef (diff)
tdf#114973 sw: enable SelectAll with hidden para at start/end
If there's a hidden para the shell cursor can't be positioned in it ordinarily, so SelectAll will exclude these at the start or end of the document. There is already special code to handle a table at the start of the document body, and it's relatively simple to adapt it to handle hidden paragraphs as well. This appears to work surprisingly well, the point is at the start of the first node of the document, and moving it right immediately puts it to the first non-hidden paragraph. But it only works for paragraphs hidden by character formatting or hidden paragraph field, not if there's a hidden section - there are no (not even 0-height) SwTextFrames in hidden sections. Change-Id: Ifd3c11f4169a037fdae2c2b376d0138bec46774f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146257 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/source/uibase/wrtsh')
-rw-r--r--sw/source/uibase/wrtsh/select.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/wrtsh/select.cxx b/sw/source/uibase/wrtsh/select.cxx
index 11e84409941c..4cf35eb7d992 100644
--- a/sw/source/uibase/wrtsh/select.cxx
+++ b/sw/source/uibase/wrtsh/select.cxx
@@ -162,7 +162,7 @@ void SwWrtShell::SelAll()
SttSelect();
GoEnd(true, &bMoveTable);
- bool bNeedsExtendedSelectAll = StartsWithTable();
+ bool bNeedsExtendedSelectAll = StartsWith_() != StartsWith::None;
// If the cursor was in a table, then we only need the extended select
// all if the whole table is already selected, to still allow selecting