From 0e0175629fd0c6a99bb286f155e7a4855b8473d6 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 28 Jan 2022 09:52:17 +0200 Subject: no need to call GetWhich on these SID_ values none of them are remapped (via the SfxItemfo stuff in the pool) Change-Id: Iefd38f1aac55e6059e2c57d102efb508bd1572b0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129090 Tested-by: Jenkins Reviewed-by: Noel Grandin --- svx/source/dialog/optgrid.cxx | 6 ++---- svx/source/sidebar/paragraph/ParaSpacingWindow.cxx | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'svx') diff --git a/svx/source/dialog/optgrid.cxx b/svx/source/dialog/optgrid.cxx index 3262e7819abf..b836a042c03d 100644 --- a/svx/source/dialog/optgrid.cxx +++ b/svx/source/dialog/optgrid.cxx @@ -159,8 +159,7 @@ bool SvxGridTabPage::FillItemSet( SfxItemSet* rCoreSet ) aGridItem.bSynchronize = m_xCbxSynchronize->get_active(); aGridItem.bGridVisible = m_xCbxGridVisible->get_active(); - MapUnit eUnit = - rCoreSet->GetPool()->GetMetric( GetWhich( SID_ATTR_GRID_OPTIONS ) ); + MapUnit eUnit = rCoreSet->GetPool()->GetMetric( SID_ATTR_GRID_OPTIONS ); tools::Long nX = GetCoreValue( *m_xMtrFldDrawX, eUnit ); tools::Long nY = GetCoreValue( *m_xMtrFldDrawY, eUnit ); @@ -186,8 +185,7 @@ void SvxGridTabPage::Reset( const SfxItemSet* rSet ) m_xCbxSynchronize->set_active(pGridAttr->bSynchronize); m_xCbxGridVisible->set_active(pGridAttr->bGridVisible); - MapUnit eUnit = - rSet->GetPool()->GetMetric( GetWhich( SID_ATTR_GRID_OPTIONS ) ); + MapUnit eUnit = rSet->GetPool()->GetMetric( SID_ATTR_GRID_OPTIONS ); SetMetricValue( *m_xMtrFldDrawX , pGridAttr->nFldDrawX, eUnit ); SetMetricValue( *m_xMtrFldDrawY , pGridAttr->nFldDrawY, eUnit ); diff --git a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx index fdfbf6fd0b1f..8c48de0e0761 100644 --- a/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx +++ b/svx/source/sidebar/paragraph/ParaSpacingWindow.cxx @@ -74,8 +74,7 @@ void ParaULSpacingWindow::SetUnit(FieldUnit eUnit) m_xBelowSpacing->SetFieldUnit(eUnit); SfxItemPool &rPool = SfxGetpApp()->GetPool(); - sal_uInt16 nWhich = rPool.GetWhich(SID_ATTR_PARA_ULSPACE); - m_eUnit = rPool.GetMetric(nWhich); + m_eUnit = rPool.GetMetric(SID_ATTR_PARA_ULSPACE); m_xAboveSpacing->set_max(m_xAboveSpacing->normalize(MAX_DURCH), MapToFieldUnit(m_eUnit)); m_xBelowSpacing->set_max(m_xBelowSpacing->normalize(MAX_DURCH), MapToFieldUnit(m_eUnit)); @@ -277,8 +276,7 @@ void ParaLRSpacingWindow::SetUnit(FieldUnit eUnit) m_xFLSpacing->SetFieldUnit(eUnit); SfxItemPool &rPool = SfxGetpApp()->GetPool(); - sal_uInt16 nWhich = rPool.GetWhich(SID_ATTR_PARA_LRSPACE); - m_eUnit = rPool.GetMetric(nWhich); + m_eUnit = rPool.GetMetric(SID_ATTR_PARA_LRSPACE); } IMPL_LINK_NOARG(ParaLRSpacingWindow, ModifySpacingHdl, weld::MetricSpinButton&, void) -- cgit