sw/source/core/inc/flyfrms.hxx   |    1 +
 sw/source/core/layout/flycnt.cxx |    8 ++++++++
 2 files changed, 9 insertions(+)

New commits:
commit a6b64d02843d186485ff5c82106e6f9268a539c7
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Fri Jan 27 09:25:44 2023 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Fri Jan 27 13:01:25 2023 +0000

    sw: add an SwFlyAtContentFrame ctor that creates a follow fly frame
    
    This is meant to be a called by a future SwFrame::GetNextFlyLeaf()
    (similar to the existing SwFrame::GetNextSctLeaf()), which still has to
    be added.
    
    What an anchor should be for a follow fly frame is a bit unclear to me,
    let's go with an explicit nullptr for now and we can clarify that later.
    
    Towards an initial layout for multi-page fly frames.
    
    Change-Id: I2429f47aef90dfe61340bfe244353dcefeb4ef1f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146244
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index 063ce72610c7..4f6bc91922f2 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -178,6 +178,7 @@ public:
     // #i28701#
 
     SwFlyAtContentFrame( SwFlyFrameFormat*, SwFrame*, SwFrame *pAnchor );
+    SwFlyAtContentFrame(SwFlyAtContentFrame& rPrecede);
 
     void SetAbsPos( const Point &rNew );
 
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index c24a3a1e908a..afe01a91897f 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -50,6 +50,7 @@
 #include <textboxhelper.hxx>
 #include <fmtfollowtextflow.hxx>
 #include <unoprnms.hxx>
+#include <rootfrm.hxx>
 
 using namespace ::com::sun::star;
 
@@ -81,6 +82,13 @@ SwFlyAtContentFrame::SwFlyAtContentFrame( SwFlyFrameFormat 
*pFormat, SwFrame* pS
     m_bAutoPosition = (RndStdIds::FLY_AT_CHAR == 
pFormat->GetAnchor().GetAnchorId());
 }
 
+SwFlyAtContentFrame::SwFlyAtContentFrame(SwFlyAtContentFrame& rPrecede)
+    : SwFlyAtContentFrame(rPrecede.GetFormat(), rPrecede.getRootFrame(), 
/*pAnchor=*/nullptr)
+{
+    SetFollow(rPrecede.GetFollow());
+    rPrecede.SetFollow(this);
+}
+
 // #i28701#
 
 void SwFlyAtContentFrame::SwClientNotify(const SwModify& rMod, const SfxHint& 
rHint)

Reply via email to