[Libreoffice-commits] core.git: sw/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Thu Sep 9 06:56:56 UTC 2021
sw/source/core/layout/fly.cxx | 2 +-
sw/source/core/tox/ToxTabStopTokenHandler.cxx | 2 +-
sw/source/core/txtnode/ndtxt.cxx | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
New commits:
commit 1e8127dcff14e2c50c839f5d9c2969a7b21bee9e
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Wed Sep 8 20:17:53 2021 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Thu Sep 9 08:56:24 2021 +0200
sw: use more StaticWhichCast() in source/core/
See commit 0025e80ba6d882f6f885499efaf37ab0e2ed699d (sw: use
SfxPoolItem::StaticWhichCast() in SwTextBoxHelper, 2021-07-07) for
motivation.
Change-Id: I2214fb9a6942551088f44b1882897f7849518203
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121827
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index ffe664b42898..e5588ed10f7a 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -2950,7 +2950,7 @@ const SwFormatAnchor* SwFlyFrame::GetAnchorFromPoolItem(const SfxPoolItem& rItem
switch(rItem.Which())
{
case RES_ATTRSET_CHG:
- return static_cast<const SwAttrSetChg*>(&rItem)->GetChgSet()->GetItem(RES_ANCHOR, false);
+ return rItem.StaticWhichCast(RES_ATTRSET_CHG).GetChgSet()->GetItem(RES_ANCHOR, false);
case RES_ANCHOR:
return static_cast<const SwFormatAnchor*>(&rItem);
default:
diff --git a/sw/source/core/tox/ToxTabStopTokenHandler.cxx b/sw/source/core/tox/ToxTabStopTokenHandler.cxx
index 685a8f173d66..06e351c5b48e 100644
--- a/sw/source/core/tox/ToxTabStopTokenHandler.cxx
+++ b/sw/source/core/tox/ToxTabStopTokenHandler.cxx
@@ -50,7 +50,7 @@ DefaultToxTabStopTokenHandler::HandleTabStopToken(
// check whether a tab adjustment has been specified.
if (SvxTabAdjust::End > aToken.eTabAlign) {
- const SvxLRSpaceItem& rLR = static_cast<const SvxLRSpaceItem&>( targetNode.SwContentNode::GetAttr(RES_LR_SPACE) );
+ const SvxLRSpaceItem& rLR = targetNode.SwContentNode::GetAttr(RES_LR_SPACE).StaticWhichCast(RES_LR_SPACE);
tools::Long nTabPosition = aToken.nTabStopPosition;
if (!mTabPositionIsRelativeToParagraphIndent && rLR.GetTextLeft()) {
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index daa016423bb6..47d495fef56d 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -5180,7 +5180,7 @@ void SwTextNode::dumpAsXml(xmlTextWriterPtr pWriter) const
sal_uInt32 SwTextNode::GetRsid( sal_Int32 nStt, sal_Int32 nEnd ) const
{
- SfxItemSet aSet( const_cast<SfxItemPool&>(static_cast<SfxItemPool const &>(GetDoc().GetAttrPool())), svl::Items<RES_CHRATR_RSID, RES_CHRATR_RSID> );
+ SfxItemSet aSet( const_cast<SwAttrPool&>((GetDoc().GetAttrPool())), svl::Items<RES_CHRATR_RSID, RES_CHRATR_RSID> );
if (GetParaAttr(aSet, nStt, nEnd))
{
const SvxRsidItem* pRsid = aSet.GetItem<SvxRsidItem>(RES_CHRATR_RSID);
More information about the Libreoffice-commits
mailing list