diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-27 14:56:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-01-27 20:05:46 +0100 |
commit | 12be8dadfad2167ff4317935d30782626afa3eaf (patch) | |
tree | eb04c03fa883c953e7464fa9f67577611d21ddef /sc | |
parent | 0e570fafd319c6567d798ff9e5530099c53312ee (diff) |
no need to call GetWhich on these SID_ values
none of them are remapped (via the SfxItemEntryInfo stuff in the pool)
Change-Id: Ic7b5f2c3cc75a65bdf9c45f9522cc53954b4ba38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129040
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/drawfunc/drtxtob.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/tpcalc.hxx | 1 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpcalc.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/optdlg/tpformula.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/cellsh1.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/editsh.cxx | 2 |
6 files changed, 7 insertions, 10 deletions
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx index 2643fefc208a..f2af9e93be22 100644 --- a/sc/source/ui/drawfunc/drtxtob.cxx +++ b/sc/source/ui/drawfunc/drtxtob.cxx @@ -213,7 +213,7 @@ void ScDrawTextObjectBar::Execute( SfxRequest &rReq ) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = nullptr; if( pArgs ) - pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem); + pArgs->GetItemState(SID_CHARMAP, false, &pItem); if ( pItem ) { diff --git a/sc/source/ui/inc/tpcalc.hxx b/sc/source/ui/inc/tpcalc.hxx index b7c4989a0c20..558eec388480 100644 --- a/sc/source/ui/inc/tpcalc.hxx +++ b/sc/source/ui/inc/tpcalc.hxx @@ -37,7 +37,6 @@ public: private: std::unique_ptr<ScDocOptions> pOldOptions; std::unique_ptr<ScDocOptions> pLocalOptions; - sal_uInt16 nWhichCalc; std::unique_ptr<weld::CheckButton> m_xBtnIterate; std::unique_ptr<weld::Label> m_xFtSteps; diff --git a/sc/source/ui/optdlg/tpcalc.cxx b/sc/source/ui/optdlg/tpcalc.cxx index df8d827ef670..6ab3baaa70c9 100644 --- a/sc/source/ui/optdlg/tpcalc.cxx +++ b/sc/source/ui/optdlg/tpcalc.cxx @@ -36,10 +36,8 @@ ScTpCalcOptions::ScTpCalcOptions(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rCoreAttrs) : SfxTabPage(pPage, pController, "modules/scalc/ui/optcalculatepage.ui", "OptCalculatePage", &rCoreAttrs) , pOldOptions(new ScDocOptions( - static_cast<const ScTpCalcItem&>(rCoreAttrs.Get( - GetWhich(SID_SCDOCOPTIONS))).GetDocOptions())) + static_cast<const ScTpCalcItem&>(rCoreAttrs.Get(SID_SCDOCOPTIONS)).GetDocOptions())) , pLocalOptions(new ScDocOptions) - , nWhichCalc(GetWhich(SID_SCDOCOPTIONS)) , m_xBtnIterate(m_xBuilder->weld_check_button("iterate")) , m_xFtSteps(m_xBuilder->weld_label("stepsft")) , m_xEdSteps(m_xBuilder->weld_spin_button("steps")) @@ -90,7 +88,7 @@ void ScTpCalcOptions::Reset(const SfxItemSet* rCoreAttrs) pOldOptions.reset(new ScDocOptions( static_cast<const ScTpCalcItem&>(rCoreAttrs->Get( - GetWhich(SID_SCDOCOPTIONS))).GetDocOptions())); + SID_SCDOCOPTIONS)).GetDocOptions())); *pLocalOptions = *pOldOptions; @@ -193,7 +191,7 @@ bool ScTpCalcOptions::FillItemSet( SfxItemSet* rCoreAttrs ) } if ( *pLocalOptions != *pOldOptions ) { - rCoreAttrs->Put( ScTpCalcItem( nWhichCalc, *pLocalOptions ) ); + rCoreAttrs->Put( ScTpCalcItem( SID_SCDOCOPTIONS, *pLocalOptions ) ); return true; } else diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx index 10a4b407c796..0656c03948c7 100644 --- a/sc/source/ui/optdlg/tpformula.cxx +++ b/sc/source/ui/optdlg/tpformula.cxx @@ -77,7 +77,7 @@ ScTpFormulaOptions::ScTpFormulaOptions(weld::Container* pPage, weld::DialogContr mnDecSep = aSep.isEmpty() ? u'.' : aSep[0]; maSavedDocOptions = static_cast<const ScTpCalcItem&>(rCoreAttrs.Get( - GetWhich(SID_SCDOCOPTIONS))).GetDocOptions(); + SID_SCDOCOPTIONS)).GetDocOptions(); } ScTpFormulaOptions::~ScTpFormulaOptions() diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index c1eb2ed66583..8d342d0d2c4e 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -2534,7 +2534,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = nullptr; if ( pArgs ) - pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem); + pArgs->GetItemState(SID_CHARMAP, false, &pItem); if ( pItem ) { const SfxStringItem* pStringItem = dynamic_cast<const SfxStringItem*>( pItem ); diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx index 7f0a6d9ef080..559f4a539a83 100644 --- a/sc/source/ui/view/editsh.cxx +++ b/sc/source/ui/view/editsh.cxx @@ -392,7 +392,7 @@ void ScEditShell::Execute( SfxRequest& rReq ) const SfxItemSet *pArgs = rReq.GetArgs(); const SfxPoolItem* pItem = nullptr; if( pArgs ) - pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem); + pArgs->GetItemState(SID_CHARMAP, false, &pItem); if ( pItem ) { |