summaryrefslogtreecommitdiff
path: root/sw/source/core/inc/frame.hxx
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2019-01-03 12:23:18 +0100
committerTamás Zolnai <tamas.zolnai@collabora.com>2019-01-03 13:41:56 +0100
commit484867ec5e716a1828a41b2535f7a1e10e8f3fe7 (patch)
tree0b4569f503334804fda8a9d287021b591030ce60 /sw/source/core/inc/frame.hxx
parent9937e0b53c5cfd6e5bfa7187b637642ab7d78e58 (diff)
Move FindBodyFrame from SwTextFrame to SwFrame
So we can call it on other type of frames too. Change-Id: I74e80eb831ba1fc00abb8db1ffa3728758e68376 Reviewed-on: https://gerrit.libreoffice.org/65817 Tested-by: Jenkins Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
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 920bd621fff4..0a9a1ea823c0 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -38,6 +38,7 @@
class SwLayoutFrame;
class SwRootFrame;
class SwPageFrame;
+class SwBodyFrame;
class SwFlyFrame;
class SwSectionFrame;
class SwFootnoteFrame;
@@ -661,6 +662,7 @@ public:
SwFootnoteFrame *ImplFindFootnoteFrame();
SwFlyFrame *ImplFindFlyFrame();
SwSectionFrame *ImplFindSctFrame();
+ const SwBodyFrame *ImplFindBodyFrame() const;
SwFrame *FindFooterOrHeader();
SwFrame *GetLower();
const SwFrame *GetNext() const { return mpNext; }
@@ -683,6 +685,7 @@ public:
inline const SwFootnoteFrame *FindFootnoteFrame() const;
inline const SwFlyFrame *FindFlyFrame() const;
inline const SwSectionFrame *FindSctFrame() const;
+ inline const SwBodyFrame *FindBodyFrame() const;
inline const SwFrame *FindNext() const;
// #i27138# - add parameter <_bInSameFootnote>
const SwContentFrame* FindNextCnt( const bool _bInSameFootnote = false ) const;
@@ -1085,6 +1088,11 @@ inline SwSectionFrame *SwFrame::FindSctFrame()
return IsInSct() ? ImplFindSctFrame() : nullptr;
}
+inline const SwBodyFrame *SwFrame::FindBodyFrame() const
+{
+ return IsInDocBody() ? ImplFindBodyFrame() : nullptr;
+}
+
inline const SwTabFrame *SwFrame::FindTabFrame() const
{
return IsInTab() ? const_cast<SwFrame*>(this)->ImplFindTabFrame() : nullptr;