summaryrefslogtreecommitdiff
path: root/sw/source/core/text/porrst.cxx
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-13 09:45:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-13 10:34:24 +0200
commitc93cdd4e2416c81ccc4b90fd96421d7e45cecd70 (patch)
tree7be3b0f61ffb1900ea3be238d1849be02fcb1bc6 /sw/source/core/text/porrst.cxx
parente360269e8e217359e131ca4ae33a5668a2efab78 (diff)
static_cast after dynamic_cast
Change-Id: If1194bd3364fef8b2d0c26c22854745d0fb7b412 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104223 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/text/porrst.cxx')
-rw-r--r--sw/source/core/text/porrst.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index c37e03e7b3a4..ec7d14e5e605 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -205,8 +205,7 @@ SwTwips SwTextFrame::EmptyHeight() const
{
if (IsCollapse()) {
SwViewShell *pSh = getRootFrame()->GetCurrShell();
- if ( dynamic_cast<const SwCursorShell*>( pSh ) != nullptr ) {
- SwCursorShell *pCrSh = static_cast<SwCursorShell*>(pSh);
+ if ( auto pCrSh = dynamic_cast<SwCursorShell*>( pSh ) ) {
// this is called during formatting so avoid recursive layout
SwContentFrame const*const pCurrFrame = pCrSh->GetCurrFrame(false);
if (pCurrFrame==static_cast<SwContentFrame const *>(this)) {