diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-25 15:55:48 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-11-27 15:11:08 +0100 |
commit | 8bb1e1e1beee149af21b9a28ede62c987c85bd9a (patch) | |
tree | 4e3cbcd1fd0f055e720e734438afb27d35adf05c /sw/source/core/layout | |
parent | f4b128f0d607fa74c9a62744753beff497dd0fc3 (diff) |
tdf#108642 remove dynamic_cast
use virtual method instead.
Takes the opening time from 10.5s to 9.2s for me.
Change-Id: I015c05b112dd7e8b7ea3ef722e082d25a3062cce
Reviewed-on: https://gerrit.libreoffice.org/83847
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit b4494f276795d1bb419d258ed0b2ec33c92c7290)
Reviewed-on: https://gerrit.libreoffice.org/83886
Diffstat (limited to 'sw/source/core/layout')
-rw-r--r-- | sw/source/core/layout/tabfrm.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx index b7ffcceabdd5..1327dfbbe755 100644 --- a/sw/source/core/layout/tabfrm.cxx +++ b/sw/source/core/layout/tabfrm.cxx @@ -5694,14 +5694,22 @@ SwTwips SwTabFrame::CalcHeightOfFirstContentLine() const bool SwFrame::IsLeaveUpperAllowed() const { - const SwCellFrame* pThisCell = dynamic_cast<const SwCellFrame*>(this); - return pThisCell && pThisCell->GetLayoutRowSpan() > 1; + return false; +} + +bool SwCellFrame::IsLeaveUpperAllowed() const +{ + return GetLayoutRowSpan() > 1; } bool SwFrame::IsCoveredCell() const { - const SwCellFrame* pThisCell = dynamic_cast<const SwCellFrame*>(this); - return pThisCell && pThisCell->GetLayoutRowSpan() < 1; + return false; +} + +bool SwCellFrame::IsCoveredCell() const +{ + return GetLayoutRowSpan() < 1; } bool SwFrame::IsInCoveredCell() const |