From 03ab4a1945ccf5f4e194bcaf64e88c1680018b9a Mon Sep 17 00:00:00 2001 From: Andrzej Hunt Date: Thu, 6 Aug 2015 09:20:40 +0100 Subject: Remove redundant parameters. Change-Id: I0230fdd69d4f60058ca4f0258c5098f77099a3e4 --- sc/source/ui/inc/viewfunc.hxx | 3 +-- sc/source/ui/view/viewfunc.cxx | 17 ++++++++--------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/sc/source/ui/inc/viewfunc.hxx b/sc/source/ui/inc/viewfunc.hxx index c6311d175397..259bcf014757 100644 --- a/sc/source/ui/inc/viewfunc.hxx +++ b/sc/source/ui/inc/viewfunc.hxx @@ -377,8 +377,7 @@ private: ScDocument* pDoc, const OUString& sHeaderUnit, const ScAddress& rHeaderAddress, - const OUString& sCellUnit, - ScDocShell* pDocSh ); + const OUString& sCellUnit ); DECL_LINK( UnitConversionRecommendedHandler, UnitConversionPushButton* ); }; diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx index 125fe9d0c7a9..cd3a0ba3c2ab 100644 --- a/sc/source/ui/view/viewfunc.cxx +++ b/sc/source/ui/view/viewfunc.cxx @@ -596,7 +596,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab, ScAddress aHeaderAddress; if ( pUnits->isCellConversionRecommended( aAddress, pDoc, sHeaderUnit, aHeaderAddress, sCellUnit ) ) - NotifyUnitConversionRecommended( aAddress, pDoc, sHeaderUnit, aHeaderAddress, sCellUnit, pDocSh ); + NotifyUnitConversionRecommended( aAddress, pDoc, sHeaderUnit, aHeaderAddress, sCellUnit ); else { SfxViewFrame* pViewFrame = GetViewData().GetViewShell()->GetFrame(); @@ -2940,21 +2940,18 @@ struct UnitConversionPushButton: public PushButton ScDocument* mpDoc; const OUString sHeaderUnit; const OUString sCellUnit; - ScDocShell* mpDocSh; UnitConversionPushButton( vcl::Window* pParent, const ResId& rResId, const ScAddress& rCellAddress, ScDocument* pDoc, const OUString& rsHeaderUnit, - const OUString& rsCellUnit, - ScDocShell* pDocSh ): + const OUString& rsCellUnit ): PushButton( pParent, rResId ), aCellAddress( rCellAddress ), mpDoc( pDoc ), sHeaderUnit( rsHeaderUnit ), - sCellUnit( rsCellUnit ), - mpDocSh( pDocSh ) + sCellUnit( rsCellUnit ) {} }; @@ -2962,8 +2959,8 @@ void ScViewFunc::NotifyUnitConversionRecommended( const ScAddress& rCellAddress, ScDocument* pDoc, const OUString& rsHeaderUnit, const ScAddress& rHeaderAddress, - const OUString& rsCellUnit, - ScDocShell* pDocSh ) { + const OUString& rsCellUnit ) +{ SfxViewFrame* pViewFrame = GetViewData().GetViewShell()->GetFrame(); // As with NotifyUnitErrorInFormula we use the cell address as the infobar id. @@ -3005,7 +3002,9 @@ IMPL_LINK( ScViewFunc, UnitConversionRecommendedHandler, UnitConversionPushButto #ifdef ENABLE_CALC_UNITVERIFICATION boost::shared_ptr< Units > pUnits = Units::GetUnits(); - ScDocShellModificator aModificator( *pButton->mpDocSh ); + ScDocShell* pDocShell = static_cast(pButton->mpDoc->GetDocumentShell()); + + ScDocShellModificator aModificator( *pDocShell ); OUString sOriginalValue = pButton->mpDoc->GetString( pButton->aCellAddress ); -- cgit