summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-02-09 11:56:19 +0600
committerMike Kaganski <mike.kaganski@collabora.com>2024-02-14 21:54:55 +0100
commit0c96119895b347f8eb5bb89f393351bd3c02b9f1 (patch)
tree00523cee811e15bd688452453c5590301cca756d /sw/inc
parent3a0807b08f0254e89d361322bce1ef13df3427f2 (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>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/crsrsh.hxx2
-rw-r--r--sw/inc/node.hxx2
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 5823a49a1599..eafc6a0c31e4 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.