[Libreoffice-commits] core.git: 2 commits - desktop/source sw/source
Emircan Agac (via logerrit)
logerrit at kemper.freedesktop.org
Sat Aug 14 06:37:12 UTC 2021
desktop/source/lib/init.cxx | 6 +++---
sw/source/core/undo/unattr.cxx | 2 +-
sw/source/filter/ww8/ww8atr.cxx | 40 ++++++++++++++++++++--------------------
3 files changed, 24 insertions(+), 24 deletions(-)
New commits:
commit d5eceef8e02886edc142267ee8d74f7adb198a1b
Author: Emircan Agac <thesadson at gmail.com>
AuthorDate: Fri Aug 13 16:46:29 2021 +0300
Commit: Ilmari Lauhakangas <ilmari.lauhakangas at libreoffice.org>
CommitDate: Sat Aug 14 08:36:45 2021 +0200
tdf#140226: use StaticWhichCast
Change-Id: I5eb25fdfd629e397582cd49e3fa4acab32c05bbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120456
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas at libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas at libreoffice.org>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 024a65c6c9b1..9ca61d6c0a4d 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -823,17 +823,17 @@ void ExecuteOrientationChange()
SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_SIZE, pItem);
- pPageSizeItem.reset( static_cast<SvxSizeItem*>(pItem->Clone()) );
+ pPageSizeItem.reset(&pItem->Clone()->StaticWhichCast(SID_ATTR_PAGE_SIZE));
SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_LRSPACE, pItem);
- pPageLRMarginItem.reset( static_cast<SvxLongLRSpaceItem*>(pItem->Clone()) );
+ pPageLRMarginItem.reset(&pItem->Clone()->StaticWhichCast(SID_ATTR_PAGE_LRSPACE));
SfxViewFrame::Current()->GetBindings().GetDispatcher()->QueryState(SID_ATTR_PAGE_ULSPACE, pItem);
- pPageULMarginItem.reset( static_cast<SvxLongULSpaceItem*>(pItem->Clone()) );
+ pPageULMarginItem.reset(&pItem->Clone()->StaticWhichCast(SID_ATTR_PAGE_ULSPACE));
{
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 5329f1c00c59..3c3f05ac1895 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -846,7 +846,7 @@ SwUndoDefaultAttr::SwUndoDefaultAttr( const SfxItemSet& rSet, const SwDoc& rDoc
const SfxPoolItem* pItem;
if( SfxItemState::SET == rSet.GetItemState( RES_PARATR_TABSTOP, false, &pItem ) ) {
// store separately, because it may change!
- m_pTabStop.reset( static_cast<SvxTabStopItem*>(pItem->Clone()) );
+ m_pTabStop.reset(&pItem->Clone()->StaticWhichCast(RES_PARATR_TABSTOP));
if ( 1 != rSet.Count() ) { // are there more attributes?
m_pOldSet.reset( new SfxItemSet( rSet ) );
}
commit 1fdb3f98590532705be9972d031eb09027795760
Author: Emircan Agac <thesadson at gmail.com>
AuthorDate: Thu Aug 12 19:55:50 2021 +0300
Commit: Ilmari Lauhakangas <ilmari.lauhakangas at libreoffice.org>
CommitDate: Sat Aug 14 08:36:32 2021 +0200
tdf#140226: use StaticWhichCast
Change-Id: I54f898d3341155d88b6b9599995b9e5001de71c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120406
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas at libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas at libreoffice.org>
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index ab73216a78aa..0783784cce46 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -5361,40 +5361,40 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt )
CharCrossedOut(rHt.StaticWhichCast(RES_CHRATR_CROSSEDOUT));
break;
case RES_CHRATR_ESCAPEMENT:
- CharEscapement( static_cast< const SvxEscapementItem& >( rHt ) );
+ CharEscapement(rHt.StaticWhichCast(RES_CHRATR_ESCAPEMENT));
break;
case RES_CHRATR_FONT:
- CharFont( static_cast< const SvxFontItem& >( rHt ) );
+ CharFont(rHt.StaticWhichCast(RES_CHRATR_FONT));
break;
case RES_CHRATR_FONTSIZE:
- CharFontSize( static_cast< const SvxFontHeightItem& >( rHt ) );
+ CharFontSize(rHt.StaticWhichCast(RES_CHRATR_FONTSIZE));
break;
case RES_CHRATR_KERNING:
- CharKerning( static_cast< const SvxKerningItem& >( rHt ) );
+ CharKerning(rHt.StaticWhichCast(RES_CHRATR_KERNING));
break;
case RES_CHRATR_LANGUAGE:
- CharLanguage( static_cast< const SvxLanguageItem& >( rHt ) );
+ CharLanguage(rHt.StaticWhichCast(RES_CHRATR_LANGUAGE));
break;
case RES_CHRATR_POSTURE:
- CharPosture( static_cast< const SvxPostureItem& >( rHt ) );
+ CharPosture(rHt.StaticWhichCast(RES_CHRATR_POSTURE));
break;
case RES_CHRATR_SHADOWED:
- CharShadow( static_cast< const SvxShadowedItem& >( rHt ) );
+ CharShadow(rHt.StaticWhichCast(RES_CHRATR_SHADOWED));
break;
case RES_CHRATR_UNDERLINE:
- CharUnderline( static_cast< const SvxUnderlineItem& >( rHt ) );
+ CharUnderline(rHt.StaticWhichCast(RES_CHRATR_UNDERLINE));
break;
case RES_CHRATR_WEIGHT:
- CharWeight( static_cast< const SvxWeightItem& >( rHt ) );
+ CharWeight(rHt.StaticWhichCast(RES_CHRATR_WEIGHT));
break;
case RES_CHRATR_AUTOKERN:
- CharAutoKern( static_cast< const SvxAutoKernItem& >( rHt ) );
+ CharAutoKern(rHt.StaticWhichCast(RES_CHRATR_AUTOKERN));
break;
case RES_CHRATR_BLINK:
- CharAnimatedText( static_cast< const SvxBlinkItem& >( rHt ) );
+ CharAnimatedText(rHt.StaticWhichCast(RES_CHRATR_BLINK));
break;
case RES_CHRATR_BACKGROUND:
- CharBackgroundBase( static_cast< const SvxBrushItem& >( rHt ) );
+ CharBackgroundBase(rHt.StaticWhichCast(RES_CHRATR_BACKGROUND));
break;
case RES_CHRATR_CJK_FONT:
@@ -5430,28 +5430,28 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt )
break;
case RES_CHRATR_ROTATE:
- CharRotate( static_cast< const SvxCharRotateItem& >( rHt ) );
+ CharRotate(rHt.StaticWhichCast(RES_CHRATR_ROTATE));
break;
case RES_CHRATR_EMPHASIS_MARK:
- CharEmphasisMark( static_cast< const SvxEmphasisMarkItem& >( rHt ) );
+ CharEmphasisMark(rHt.StaticWhichCast(RES_CHRATR_EMPHASIS_MARK));
break;
case RES_CHRATR_TWO_LINES:
- CharTwoLines( static_cast< const SvxTwoLinesItem& >( rHt ) );
+ CharTwoLines(rHt.StaticWhichCast(RES_CHRATR_TWO_LINES));
break;
case RES_CHRATR_SCALEW:
- CharScaleWidth( static_cast< const SvxCharScaleWidthItem& >( rHt ) );
+ CharScaleWidth(rHt.StaticWhichCast(RES_CHRATR_SCALEW));
break;
case RES_CHRATR_RELIEF:
- CharRelief( static_cast< const SvxCharReliefItem& >( rHt ) );
+ CharRelief(rHt.StaticWhichCast(RES_CHRATR_RELIEF));
break;
case RES_CHRATR_HIDDEN:
- CharHidden( static_cast< const SvxCharHiddenItem& >( rHt ) );
+ CharHidden(rHt.StaticWhichCast(RES_CHRATR_HIDDEN));
break;
case RES_CHRATR_BOX:
- FormatCharBorder( static_cast< const SvxBoxItem& >( rHt ) );
+ FormatCharBorder(rHt.StaticWhichCast(RES_CHRATR_BOX));
break;
case RES_CHRATR_HIGHLIGHT:
- CharHighlight( static_cast< const SvxBrushItem& >( rHt ) );
+ CharHighlight(rHt.StaticWhichCast(RES_CHRATR_HIGHLIGHT));
break;
case RES_CHRATR_BIDIRTL:
CharBidiRTL( rHt );
More information about the Libreoffice-commits
mailing list