[Libreoffice-commits] core.git: sw/source
Justin Luth (via logerrit)
logerrit at kemper.freedesktop.org
Wed May 6 17:09:44 UTC 2020
sw/source/core/layout/flowfrm.cxx | 9 ++++++---
sw/source/core/layout/ftnfrm.cxx | 1 +
2 files changed, 7 insertions(+), 3 deletions(-)
New commits:
commit 58b57bce7927dfd0ff35cd3dffafa1ed4d0cced7
Author: Justin Luth <justin.luth at collabora.com>
AuthorDate: Wed Apr 29 13:55:23 2020 +0300
Commit: Justin Luth <justin_luth at sil.org>
CommitDate: Wed May 6 19:09:07 2020 +0200
sw layout comments: clarify return value for MoveFwd etc.
Although MoveFwd and MoveBwd sound like mirror functions,
their return values have different meanings, so clarify
those distinctions and hint at the complexities of
what move Fwd/Bwd mean in terms of pages/columns/sections/frames.
Change-Id: Ie173fa3d6234c8dd466c32678134945c21f75dfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93442
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
Reviewed-by: Justin Luth <justin_luth at sil.org>
Tested-by: Jenkins
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index b4c8aeb27931..e33cb736ce19 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1826,7 +1826,9 @@ bool SwFlowFrame::ForbiddenForFootnoteCntFwd() const
return m_rThis.IsTabFrame() || m_rThis.IsInTab();
}
-/// Return value tells us whether the Frame has changed the page.
+/// Return value guarantees that a new page was not created,
+/// although false does not NECESSARILY indicate that a new page was created.
+/// Either false or true(MoveFootnoteCntFwd) can be returned if no changes were made
bool SwFlowFrame::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
{
//!!!!MoveFootnoteCntFwd might need to be updated as well.
@@ -2025,10 +2027,11 @@ bool SwFlowFrame::MoveFwd( bool bMakePage, bool bPageBreak, bool bMoveAlways )
return bSamePage;
}
-/** Return value tells whether the Frame should change the page.
+/** Return value tells whether any changes have been made.
+ * If true, the frame has moved backwards to an earlier column/section/frame/page etc.
*
* @note This should be called by derived classes.
- * @note The actual moving must be implemented in the subclasses.
+ * @note The actual moving must be implemented in the subclasses via Cut()/Paste().
*/
bool SwFlowFrame::MoveBwd( bool &rbReformat )
{
diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 274c3ef159d5..1b143e7d7b87 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -2722,6 +2722,7 @@ bool SwLayoutFrame::MoveLowerFootnotes( SwContentFrame *pStart, SwFootnoteBossFr
return bMoved;
}
+/// Return value guarantees that a new page was not created. See SwFlowFrame::MoveFwd.
bool SwContentFrame::MoveFootnoteCntFwd( bool bMakePage, SwFootnoteBossFrame *pOldBoss )
{
OSL_ENSURE( IsInFootnote(), "no footnote." );
More information about the Libreoffice-commits
mailing list