summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-02-14 19:22:42 +0600
committerMike Kaganski <mike.kaganski@collabora.com>2024-02-15 14:53:56 +0100
commit691cfd22c6351416d8c758e040c7534383494f90 (patch)
treed99bb9b067cecac8825d8350a32a6c04f32807e7 /sw/inc
parentffc1ab15ae358315516aab319778a254688afbd3 (diff)
tdf#159565: make sure to handle leading hidden section correctly
Change-Id: I41c7d2b6e765f03c72a968fd05e8de7047f1ce41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163371 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/crsrsh.hxx2
-rw-r--r--sw/inc/ndarr.hxx9
2 files changed, 8 insertions, 3 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index eafc6a0c31e4..ecf253281205 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -334,7 +334,7 @@ public:
void ExtendedSelectAll(bool bFootnotes = true);
/// If ExtendedSelectAll() was called and selection didn't change since then.
::std::optional<::std::pair<SwNode const*, ::std::vector<SwTableNode*>>> ExtendedSelectedAll() const;
- enum class StartsWith { None, Table, HiddenPara };
+ enum class StartsWith { None, Table, HiddenPara, HiddenSection };
/// If document body starts with a table or starts/ends with hidden paragraph.
StartsWith StartsWith_();
diff --git a/sw/inc/ndarr.hxx b/sw/inc/ndarr.hxx
index 7afe8d2bce46..7383c253a2e8 100644
--- a/sw/inc/ndarr.hxx
+++ b/sw/inc/ndarr.hxx
@@ -131,6 +131,11 @@ class SW_DLLPUBLIC SwNodes final
SwNodes(SwDoc& rDoc);
+ // Returns start of the document section (PostIts/Inserts/Autotext/Redlines/Content),
+ // or of a specific fly / header / footer / footnote, where this node is, which must not
+ // be crossed when moving backwards
+ SwNodeOffset StartOfGlobalSection(const SwNode& node) const;
+
public:
~SwNodes();
@@ -188,8 +193,8 @@ public:
SwContentNode* GoNext(SwNodeIndex *) const;
SwContentNode* GoNext(SwPosition *) const;
- static SwContentNode* GoPrevious(SwNodeIndex *);
- static SwContentNode* GoPrevious(SwPosition *);
+ static SwContentNode* GoPrevious(SwNodeIndex *, bool canCrossBoundary = false);
+ static SwContentNode* GoPrevious(SwPosition *, bool canCrossBoundary = false);
/** Go to next content-node that is not protected or hidden
(Both set FALSE ==> GoNext/GoPrevious!!!). */