summaryrefslogtreecommitdiffstats
path: root/sw/source/core/inc/frame.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2017-06-19 15:24:12 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2017-08-24 11:21:27 +0200
commit3d0240c93a2edf27eff849e622a1cd2a8020198c (patch)
tree988627dfe5126379be5dd27bde6ec408cec45c21 /sw/source/core/inc/frame.hxx
parenttdf#108524 sw: allow move of frame inside section without columns (diff)
downloadcore-3d0240c93a2edf27eff849e622a1cd2a8020198c.tar.gz
core-3d0240c93a2edf27eff849e622a1cd2a8020198c.zip
tdf#108524 sw: attempt to split section frames inside table cells
Tables-in-sections were already split across multiple pages, but not secions-in-tables. To be safe still don't allow sections-in-tables-in-sections, so you can combine these in both orders now, but not recursively. To achieve this, relax two "not in table" conditions to just require "not in a table that is already in a section", and define that in case a section-in-table is to be split, the follow section frame should be inserted under the follow of its cell. With this, finally the section frame in the bugdoc is split into two, and the second section frame is moved to the second page as expected. Change-Id: I16ebb2d30870b145a2378d46603324ab267b0dd3 Reviewed-on: https://gerrit.libreoffice.org/38965 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit f991b842addddeada6dc45c4054deeca5aa7f17b)
Diffstat (limited to 'sw/source/core/inc/frame.hxx')
-rw-r--r--sw/source/core/inc/frame.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index df85c55ae326..37bc0c08f09c 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -42,6 +42,7 @@ class SwFootnoteFrame;
class SwFootnoteBossFrame;
class SwTabFrame;
class SwRowFrame;
+class SwCellFrame;
class SwFlowFrame;
class SwContentFrame;
class SfxPoolItem;
@@ -227,6 +228,7 @@ class SW_DLLPUBLIC SwFrame: public SwClient, public SfxBroadcaster
const SwLayoutFrame* ImplGetNextLayoutLeaf( bool bFwd ) const;
SwPageFrame* ImplFindPageFrame();
+ SwCellFrame* ImplFindCellFrame();
protected:
SwSortedObjs* mpDrawObjs; // draw objects, can be 0
@@ -770,6 +772,12 @@ public:
virtual void dumpAsXmlAttributes(xmlTextWriterPtr writer) const;
void dumpChildrenAsXml(xmlTextWriterPtr writer) const;
bool IsCollapse() const;
+
+ /// Find the nearest table cell frame that contains us, if any.
+ SwCellFrame* FindCellFrame()
+ {
+ return IsInTab() ? ImplFindCellFrame() : nullptr;
+ }
};
inline bool SwFrame::IsInDocBody() const