[Libreoffice-commits] core.git: sw/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jul 29 06:40:02 UTC 2021
sw/source/core/txtnode/ndtxt.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit ff1d4168dd8620431a4f9da64c8d25a7c8f69693
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Jul 28 20:00:46 2021 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Jul 29 08:39:28 2021 +0200
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 at collabora.com>
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();
}
More information about the Libreoffice-commits
mailing list