diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-07 14:21:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-02-08 07:37:58 +0100 |
commit | 8d762c146a79b5971541aa22217541c8aac017a4 (patch) | |
tree | a3d1ecf8e94568fcb5aff2ab73a155ed3ae7b614 /sw/source/core/docnode/node.cxx | |
parent | ce8b6f3426e55b6d09a52eb4a7d17614fc1a6c15 (diff) |
add template versions of SwContentNode::GetAttr
Change-Id: I62c0d54c9e1dc89c5684210075219c1eeee9f942
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129602
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/core/docnode/node.cxx')
-rw-r--r-- | sw/source/core/docnode/node.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/sw/source/core/docnode/node.cxx b/sw/source/core/docnode/node.cxx index 1995377f9a51..788ce19a177c 100644 --- a/sw/source/core/docnode/node.cxx +++ b/sw/source/core/docnode/node.cxx @@ -497,7 +497,7 @@ const SwPageDesc* SwNode::FindPageDesc( SwNodeOffset* pPgDescNdIdx ) const { pNode = GetContentNode(); if( pNode ) - pPgDesc = static_cast<const SwFormatPageDesc&>(pNode->GetAttr( RES_PAGEDESC )).GetPageDesc(); + pPgDesc = pNode->GetAttr( RES_PAGEDESC ).GetPageDesc(); } // Are we going through the layout? @@ -697,8 +697,7 @@ const SwPageDesc* SwNode::FindPageDesc( SwNodeOffset* pPgDescNdIdx ) const if( nullptr != pNd ) { if( pNd->IsContentNode() ) - pPgDesc = static_cast<const SwFormatPageDesc&>(pNd->GetContentNode()-> - GetAttr( RES_PAGEDESC )).GetPageDesc(); + pPgDesc = pNd->GetContentNode()->GetAttr( RES_PAGEDESC ).GetPageDesc(); else if( pNd->IsTableNode() ) pPgDesc = pNd->GetTableNode()->GetTable(). GetFrameFormat()->GetPageDesc().GetPageDesc(); @@ -1549,7 +1548,7 @@ bool SwContentNode::GetInfo( SfxPoolItem& rInfo ) const break; case RES_FINDNEARESTNODE: - if( static_cast<const SwFormatPageDesc&>(GetAttr( RES_PAGEDESC )).GetPageDesc() ) + if( GetAttr( RES_PAGEDESC ).GetPageDesc() ) static_cast<SwFindNearestNode&>(rInfo).CheckNode( *this ); return true; |