summaryrefslogtreecommitdiff
path: root/sw/source/core/inc/frame.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2021-08-28 08:35:29 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-08-28 15:13:20 +0200
commit426930d0c4bd6f782a04a92e8a36e92cd65e186f (patch)
tree18a08e3cfe139e6e780a246e68cc1c4216b7db78 /sw/source/core/inc/frame.hxx
parent69e0567e118f00f299b6aac645c249521eb0629f (diff)
speedup dynamic_cast to SwTextFrame
which is a hotspot in loading some documents Change-Id: I7f1c48305cd40bcd9bee4baf219228f10cc297b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121184 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/inc/frame.hxx')
-rw-r--r--sw/source/core/inc/frame.hxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx
index a6504b25cdc0..3b1414002140 100644
--- a/sw/source/core/inc/frame.hxx
+++ b/sw/source/core/inc/frame.hxx
@@ -65,6 +65,7 @@ class SwSortedObjs;
class SwAnchoredObject;
enum class SvxFrameDirection;
class IDocumentDrawModelAccess;
+class SwTextFrame;
// Each FrameType is represented here as a bit.
// The bits must be set in a way that it can be determined with masking of
@@ -866,6 +867,8 @@ public:
inline bool IsCellFrame() const;
inline bool IsContentFrame() const;
inline bool IsTextFrame() const;
+ SwTextFrame* DynCastTextFrame();
+ const SwTextFrame* DynCastTextFrame() const;
inline bool IsNoTextFrame() const;
// Frames where its PrtArea depends on their neighbors and that are
// positioned in the content flow