diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-26 11:18:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-05-26 13:49:54 +0200 |
commit | 5315e6069e425aad88873beb5344bb8ea31e0c55 (patch) | |
tree | ee8928e3fb00e52a04faa1cc5a3424b3ed0f8ff2 /cui/source | |
parent | a82e7cc9ed17a2500ad8cb9ffe54c412b0d8063f (diff) |
use more TypedWhichId
which flushed out an inconsistency in how SID_NUMBER_TYPE_FORMAT was being used
Change-Id: Ib59ae4c4950136703d18d7485db432a39e3dc39c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152300
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'cui/source')
-rw-r--r-- | cui/source/options/optgenrl.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/chardlg.cxx | 8 | ||||
-rw-r--r-- | cui/source/tabpages/tpline.cxx | 2 | ||||
-rw-r--r-- | cui/source/tabpages/tptrans.cxx | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/cui/source/options/optgenrl.cxx b/cui/source/options/optgenrl.cxx index b3fb5cb02baf..474eaa5b0feb 100644 --- a/cui/source/options/optgenrl.cxx +++ b/cui/source/options/optgenrl.cxx @@ -365,7 +365,7 @@ void SvxGeneralTabPage::Reset( const SfxItemSet* rSet ) if (rSet->GetItemState(SID_FIELD_GRABFOCUS) == SfxItemState::SET) { - EditPosition nField = static_cast<EditPosition>(static_cast<const SfxUInt16Item&>(rSet->Get(SID_FIELD_GRABFOCUS)).GetValue()); + EditPosition nField = static_cast<EditPosition>(rSet->Get(SID_FIELD_GRABFOCUS).GetValue()); if (nField != EditPosition::UNKNOWN) { for (auto const & i: vFields) diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 87984d573281..7a8788728b46 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -2241,7 +2241,7 @@ bool SvxCharEffectsPage::FillItemSet( SfxItemSet* rSet ) if (bChanged) { - rSet->Put( SvxEmphasisMarkItem( eMark, nWhich ) ); + rSet->Put( SvxEmphasisMarkItem( eMark, TypedWhichId<SvxEmphasisMarkItem>(nWhich) ) ); bModified = true; } else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) @@ -2810,7 +2810,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet* rSet ) m_xScaleWidthMF->set_value(100, FieldUnit::PERCENT); if ( rSet->GetItemState( SID_ATTR_CHAR_WIDTH_FIT_TO_LINE ) >= SfxItemState::DEFAULT ) - m_nScaleWidthItemSetVal = static_cast<const SfxUInt16Item&>( rSet->Get( SID_ATTR_CHAR_WIDTH_FIT_TO_LINE )).GetValue(); + m_nScaleWidthItemSetVal = rSet->Get( SID_ATTR_CHAR_WIDTH_FIT_TO_LINE ).GetValue(); // Rotation nWhich = GetWhich( SID_ATTR_CHAR_ROTATED ); @@ -2971,7 +2971,7 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet ) nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); if (m_xScaleWidthMF->get_value_changed_from_saved()) { - rSet->Put(SvxCharScaleWidthItem(static_cast<sal_uInt16>(m_xScaleWidthMF->get_value(FieldUnit::PERCENT)), nWhich)); + rSet->Put(SvxCharScaleWidthItem(static_cast<sal_uInt16>(m_xScaleWidthMF->get_value(FieldUnit::PERCENT)), TypedWhichId<SvxCharScaleWidthItem>(nWhich))); bModified = true; } else if ( SfxItemState::DEFAULT == rOldSet.GetItemState( nWhich, false ) ) @@ -2984,7 +2984,7 @@ bool SvxCharPositionPage::FillItemSet( SfxItemSet* rSet ) m_x270degRB->get_state_changed_from_saved() || m_xFitToLineCB->get_state_changed_from_saved() ) { - SvxCharRotateItem aItem( 0_deg10, m_xFitToLineCB->get_active(), nWhich ); + SvxCharRotateItem aItem( 0_deg10, m_xFitToLineCB->get_active(), TypedWhichId<SvxCharRotateItem>(nWhich) ); if (m_x90degRB->get_active()) aItem.SetBottomToTop(); else if (m_x270degRB->get_active()) diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index d150767daf37..cbb6a6c1a6d1 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -242,7 +242,7 @@ void SvxLineTabPage::FillListboxes() void SvxLineTabPage::ActivatePage( const SfxItemSet& rSet ) { - const CntUInt16Item* pPageTypeItem = rSet.GetItem<CntUInt16Item>(SID_PAGE_TYPE, false); + const SfxUInt16Item* pPageTypeItem = rSet.GetItem<SfxUInt16Item>(SID_PAGE_TYPE, false); if (pPageTypeItem) SetPageType(static_cast<PageType>(pPageTypeItem->GetValue())); if( m_nDlgType == 0 && m_pDashList.is() ) diff --git a/cui/source/tabpages/tptrans.cxx b/cui/source/tabpages/tptrans.cxx index ce77d61d2fc7..1dc675613d12 100644 --- a/cui/source/tabpages/tptrans.cxx +++ b/cui/source/tabpages/tptrans.cxx @@ -419,7 +419,7 @@ void SvxTransparenceTabPage::ChangesApplied() void SvxTransparenceTabPage::ActivatePage(const SfxItemSet& rSet) { - const CntUInt16Item* pPageTypeItem = rSet.GetItem<CntUInt16Item>(SID_PAGE_TYPE, false); + const CntUInt16Item* pPageTypeItem = rSet.GetItem<SfxUInt16Item>(SID_PAGE_TYPE, false); if (pPageTypeItem) SetPageType(static_cast<PageType>(pPageTypeItem->GetValue())); |