summaryrefslogtreecommitdiff
path: root/sw/inc
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/inc
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/inc')
-rw-r--r--sw/inc/crsrsh.hxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 31cad2cd6e71..689a354fffc7 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -332,8 +332,9 @@ public:
void ExtendedSelectAll(bool bFootnotes = true);
/// If ExtendedSelectAll() was called and selection didn't change since then.
bool ExtendedSelectedAll();
- /// If document body starts with a table.
- bool StartsWithTable();
+ enum class StartsWith { None, Table, HiddenPara };
+ /// If document body starts with a table or starts/ends with hidden paragraph.
+ StartsWith StartsWith_();
SwCursor* GetCursor( bool bMakeTableCursor = true ) const;
// return only the current cursor