summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2021-07-28 20:00:46 +0200
committerMiklos Vajna <vmiklos@collabora.com>2021-07-29 08:39:28 +0200
commitff1d4168dd8620431a4f9da64c8d25a7c8f69693 (patch)
treef927bd10d75af4ac55c28ec6d7741d3b40b9c4e8
parent4c93b0eff4cd993adfd178b904eb05b3979b066a (diff)
sw: use more StaticWhichCast() in source/core/txtnode/
See commit 0025e80ba6d882f6f885499efaf37ab0e2ed699d (sw: use SfxPoolItem::StaticWhichCast() in SwTextBoxHelper, 2021-07-07) for motivation. Change-Id: I16c65845cdeabbd0a73f52b14dfbd1e29c7cf24d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119645 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index cbe797f08dcb..c65455722c85 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -4006,7 +4006,7 @@ void SwTextNode::UpdateOutlineState()
int SwTextNode::GetAttrOutlineLevel() const
{
- return static_cast<const SfxUInt16Item &>(GetAttr(RES_PARATR_OUTLINELEVEL)).GetValue();
+ return GetAttr(RES_PARATR_OUTLINELEVEL).StaticWhichCast(RES_PARATR_OUTLINELEVEL).GetValue();
}
void SwTextNode::SetAttrOutlineLevel(int nLevel)
@@ -4110,7 +4110,7 @@ void SwTextNode::SetListRestart( bool bRestart )
bool SwTextNode::IsListRestart() const
{
const SfxBoolItem& aIsRestartItem =
- static_cast<const SfxBoolItem&>(GetAttr( RES_PARATR_LIST_ISRESTART ));
+ GetAttr( RES_PARATR_LIST_ISRESTART ).StaticWhichCast(RES_PARATR_LIST_ISRESTART);
return aIsRestartItem.GetValue();
}
@@ -4225,7 +4225,7 @@ void SwTextNode::SetCountedInList( bool bCounted )
bool SwTextNode::IsCountedInList() const
{
const SfxBoolItem& aIsCountedInListItem =
- static_cast<const SfxBoolItem&>(GetAttr( RES_PARATR_LIST_ISCOUNTED ));
+ GetAttr( RES_PARATR_LIST_ISCOUNTED ).StaticWhichCast(RES_PARATR_LIST_ISCOUNTED);
return aIsCountedInListItem.GetValue();
}