diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2024-02-09 11:56:19 +0600 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2024-02-19 12:39:35 +0100 |
commit | ff7f1b59e22092d8548459e75fe912db852f056f (patch) | |
tree | 99e24fe2b05211a35ca7dcbf0833185f769ac965 /sw/inc | |
parent | 71954c821b41c0e4c2eb617d9d2a7afa0435c2b6 (diff) |
tdf#159565 prerequisite: make hidden sections have zero-height frames
As mentioned in commit bb733957dd39e6f0b9d80bb59eb0177188794797 (tdf#114973
sw: enable SelectAll with hidden para at start/end, 2023-01-27), the hidden
sections didn't have frames. That prevented correct handling of the case
when such a frame was in the beginning of the document.
This change re-implements the hidden section to use 0-height frames, like
hidden paragraphs, as a pre-requisite for a follow-up change.
Some layout breakages noticed while working on this are unit-tested now.
This change needed to handle the case when the first section is hidden, and
then goes a page break with page style. In this case, the page style must
apply to the very first page of the document. Implementing this now, when
the frame that defines the page style is not the first in the document, I
accidentally fixed also the previously broken case when the first paragraph
was hidden. Now the page style defined in the second paragraph's page break
will apply correctly.
This change makes hidden sections break outer section's frames. This means
that when text borders are shown, there will be an artifact in the place of
the hidden sections (a horizontal line breaking outer frame). I suppose
it's not a problem, actually helping to see the layout better, so in line
with the "show text borders" helper functionality. If this proves to be
problematic, this can be handled specially in a follow-up.
Change-Id: I14ebf0559b463186aba28902cd10c5cc978ba456
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163151
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163477
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Diffstat (limited to 'sw/inc')
-rw-r--r-- | sw/inc/crsrsh.hxx | 2 | ||||
-rw-r--r-- | sw/inc/node.hxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx index 20636648c794..bddea2b87cb6 100644 --- a/sw/inc/crsrsh.hxx +++ b/sw/inc/crsrsh.hxx @@ -267,7 +267,7 @@ private: SAL_DLLPRIVATE bool LRMargin( bool, bool bAPI = false ); SAL_DLLPRIVATE bool IsAtLRMargin( bool, bool bAPI = false ) const; - SAL_DLLPRIVATE bool isInHiddenTextFrame(SwShellCursor* pShellCursor); + SAL_DLLPRIVATE bool isInHiddenFrame(SwShellCursor* pShellCursor); SAL_DLLPRIVATE bool GoStartWordImpl(); SAL_DLLPRIVATE bool GoEndWordImpl(); diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx index de7e24a0b152..b1e3309d596f 100644 --- a/sw/inc/node.hxx +++ b/sw/inc/node.hxx @@ -590,7 +590,7 @@ public: const SwSection& GetSection() const { return *m_pSection; } SwSection& GetSection() { return *m_pSection; } - SwFrame *MakeFrame( SwFrame* ); + SwFrame* MakeFrame(SwFrame* pSib, bool bHidden); /** Creates the frms for the SectionNode (i.e. the SectionFrames). On default the frames are created until the end of the range. |