diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-09 15:32:41 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-09-10 11:22:53 +0000 |
commit | 78ea29d51a23bf75f5753fae68ab8abe1072bbef (patch) | |
tree | 07197f526f98497f893574c5f81eba52adf5135f /sc/source/ui | |
parent | 6ebca1d1094d8fd85e485e504e810a1954befcc3 (diff) |
loplugin:constantparam in sc
Change-Id: I82c78dd880c98532db407b0183a43705be2de67c
Reviewed-on: https://gerrit.libreoffice.org/28777
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'sc/source/ui')
27 files changed, 73 insertions, 133 deletions
diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index b9388e254c69..91258f78754e 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -628,22 +628,10 @@ AbstractScSortWarningDlg* ScAbstractDialogFactory_Impl::CreateScSortWarningDlg( return new AbstractScSortWarningDlg_Impl( pDlg ); } -AbstractScCondFormatManagerDlg* ScAbstractDialogFactory_Impl::CreateScCondFormatMgrDlg(vcl::Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList, - int nId ) +AbstractScCondFormatManagerDlg* ScAbstractDialogFactory_Impl::CreateScCondFormatMgrDlg(vcl::Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList ) { - VclPtr<ScCondFormatManagerDlg> pDlg; - switch( nId ) - { - case RID_SCDLG_COND_FORMAT_MANAGER: - pDlg = VclPtr<ScCondFormatManagerDlg>::Create( pParent, pDoc, pFormatList ); - break; - default: - break; - } - if(pDlg) - return new AbstractScCondFormatManagerDlg_Impl( pDlg ); - - return nullptr; + VclPtr<ScCondFormatManagerDlg> pDlg = VclPtr<ScCondFormatManagerDlg>::Create( pParent, pDoc, pFormatList ); + return new AbstractScCondFormatManagerDlg_Impl( pDlg ); } AbstractScDataPilotDatabaseDlg * ScAbstractDialogFactory_Impl::CreateScDataPilotDatabaseDlg(vcl::Window* pParent) @@ -660,22 +648,10 @@ AbstractScDataPilotSourceTypeDlg* ScAbstractDialogFactory_Impl::CreateScDataPilo } AbstractScDataPilotServiceDlg* ScAbstractDialogFactory_Impl::CreateScDataPilotServiceDlg( vcl::Window* pParent, - const std::vector<OUString>& rServices, - int nId ) + const std::vector<OUString>& rServices ) { - VclPtr<ScDataPilotServiceDlg> pDlg; - switch ( nId ) - { - case RID_SCDLG_DAPISERVICE : - pDlg = VclPtr<ScDataPilotServiceDlg>::Create( pParent, rServices ); - break; - default: - break; - } - - if ( pDlg ) - return new AbstractScDataPilotServiceDlg_Impl( pDlg ); - return nullptr; + VclPtr<ScDataPilotServiceDlg> pDlg = VclPtr<ScDataPilotServiceDlg>::Create( pParent, rServices ); + return new AbstractScDataPilotServiceDlg_Impl( pDlg ); } AbstractScDeleteCellDlg* ScAbstractDialogFactory_Impl::CreateScDeleteCellDlg(vcl::Window* pParent, @@ -720,22 +696,10 @@ AbstractScGroupDlg* ScAbstractDialogFactory_Impl::CreateAbstractScGroupDlg( vcl: } AbstractScInsertCellDlg * ScAbstractDialogFactory_Impl::CreateScInsertCellDlg( vcl::Window* pParent, - int nId, bool bDisallowCellMove ) { - VclPtr<ScInsertCellDlg> pDlg; - switch ( nId ) - { - case RID_SCDLG_INSCELL : - pDlg = VclPtr<ScInsertCellDlg>::Create( pParent, bDisallowCellMove); - break; - default: - break; - } - - if ( pDlg ) - return new AbstractScInsertCellDlg_Impl( pDlg ); - return nullptr; + VclPtr<ScInsertCellDlg> pDlg = VclPtr<ScInsertCellDlg>::Create( pParent, bDisallowCellMove); + return new AbstractScInsertCellDlg_Impl( pDlg ); } AbstractScInsertContentsDlg * ScAbstractDialogFactory_Impl::CreateScInsertContentsDlg( vcl::Window* pParent, @@ -772,12 +736,10 @@ AbstractScMetricInputDlg * ScAbstractDialogFactory_Impl::CreateScMetricInputDlg FieldUnit eFUnit, sal_uInt16 nDecimals, long nMaximum , - long nMinimum, - long nFirst, - long nLast ) + long nMinimum ) { VclPtr<ScMetricInputDlg> pDlg = VclPtr<ScMetricInputDlg>::Create(pParent, sDialogName, nCurrent ,nDefault, eFUnit, - nDecimals, nMaximum , nMinimum , nFirst, nLast); + nDecimals, nMaximum , nMinimum , 1, 100); return new AbstractScMetricInputDlg_Impl( pDlg ); } @@ -827,28 +789,22 @@ AbstractScDPSubtotalDlg * ScAbstractDialogFactory_Impl::CreateScDPSubtotalDlg ( } AbstractScDPNumGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPNumGroupDlg( - vcl::Window* pParent, int nId, const ScDPNumGroupInfo& rInfo ) + vcl::Window* pParent, const ScDPNumGroupInfo& rInfo ) { - if( nId == RID_SCDLG_DPNUMGROUP ) - return new AbstractScDPNumGroupDlg_Impl( VclPtr<ScDPNumGroupDlg>::Create( pParent, rInfo ) ); - return nullptr; + return new AbstractScDPNumGroupDlg_Impl( VclPtr<ScDPNumGroupDlg>::Create( pParent, rInfo ) ); } AbstractScDPDateGroupDlg * ScAbstractDialogFactory_Impl::CreateScDPDateGroupDlg( - vcl::Window* pParent, int nId, + vcl::Window* pParent, const ScDPNumGroupInfo& rInfo, sal_Int32 nDatePart, const Date& rNullDate ) { - if( nId == RID_SCDLG_DPDATEGROUP ) - return new AbstractScDPDateGroupDlg_Impl( VclPtr<ScDPDateGroupDlg>::Create( pParent, rInfo, nDatePart, rNullDate ) ); - return nullptr; + return new AbstractScDPDateGroupDlg_Impl( VclPtr<ScDPDateGroupDlg>::Create( pParent, rInfo, nDatePart, rNullDate ) ); } AbstractScDPShowDetailDlg * ScAbstractDialogFactory_Impl::CreateScDPShowDetailDlg ( - vcl::Window* pParent, int nId, ScDPObject& rDPObj, sal_uInt16 nOrient ) + vcl::Window* pParent, ScDPObject& rDPObj, sal_uInt16 nOrient ) { - if( nId == RID_SCDLG_DPSHOWDETAIL ) - return new AbstractScDPShowDetailDlg_Impl( VclPtr<ScDPShowDetailDlg>::Create( pParent, rDPObj, nOrient ) ); - return nullptr; + return new AbstractScDPShowDetailDlg_Impl( VclPtr<ScDPShowDetailDlg>::Create( pParent, rDPObj, nOrient ) ); } AbstractScNewScenarioDlg * ScAbstractDialogFactory_Impl::CreateScNewScenarioDlg(vcl::Window* pParent, const OUString& rName, diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index f48771faf6a2..3955053c2ca6 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -423,8 +423,7 @@ public: virtual AbstractScSortWarningDlg * CreateScSortWarningDlg(vcl::Window* pParent, const OUString& rExtendText, const OUString& rCurrentText ) override; - virtual AbstractScCondFormatManagerDlg* CreateScCondFormatMgrDlg(vcl::Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList, - int nId ) override; + virtual AbstractScCondFormatManagerDlg* CreateScCondFormatMgrDlg(vcl::Window* pParent, ScDocument* pDoc, const ScConditionalFormatList* pFormatList ) override; virtual AbstractScDataPilotDatabaseDlg * CreateScDataPilotDatabaseDlg(vcl::Window* pParent) override; @@ -432,8 +431,7 @@ public: bool bEnableExternal) override; virtual AbstractScDataPilotServiceDlg * CreateScDataPilotServiceDlg( vcl::Window* pParent, - const std::vector<OUString>& rServices, - int nId ) override; + const std::vector<OUString>& rServices ) override; virtual AbstractScDeleteCellDlg * CreateScDeleteCellDlg(vcl::Window* pParent, bool bDisallowCellMove ) override; //for dataform @@ -455,7 +453,6 @@ public: bool bUnGroup = false) override; virtual AbstractScInsertCellDlg * CreateScInsertCellDlg( vcl::Window* pParent, - int nId, bool bDisallowCellMove ) override; virtual AbstractScInsertContentsDlg * CreateScInsertContentsDlg( vcl::Window* pParent, @@ -476,9 +473,7 @@ public: FieldUnit eFUnit, sal_uInt16 nDecimals = 2, long nMaximum = 1000, - long nMinimum = 0, - long nFirst = 1, - long nLast = 100 ) override; + long nMinimum = 0 ) override; virtual AbstractScMoveTableDlg * CreateScMoveTableDlg(vcl::Window * pParent, const OUString& rDefault) override; @@ -503,16 +498,14 @@ public: const ScDPNameVec& rDataFields ) override; virtual AbstractScDPNumGroupDlg * CreateScDPNumGroupDlg( vcl::Window* pParent, - int nId, const ScDPNumGroupInfo& rInfo ) override; virtual AbstractScDPDateGroupDlg * CreateScDPDateGroupDlg( vcl::Window* pParent, - int nId, const ScDPNumGroupInfo& rInfo, sal_Int32 nDatePart, const Date& rNullDate ) override; - virtual AbstractScDPShowDetailDlg * CreateScDPShowDetailDlg( vcl::Window* pParent, int nId, + virtual AbstractScDPShowDetailDlg * CreateScDPShowDetailDlg( vcl::Window* pParent, ScDPObject& rDPObj, sal_uInt16 nOrient ) override; diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx index 8f0d621c0af1..d75bb340aff9 100644 --- a/sc/source/ui/condformat/condformatdlg.cxx +++ b/sc/source/ui/condformat/condformatdlg.cxx @@ -557,7 +557,7 @@ ScConditionalFormat* ScCondFormatDlg::GetConditionalFormat() const ScRangeList aRange; ScRefFlags nFlags = aRange.Parse(aRangeStr, mpViewData->GetDocument(), - ScRefFlags::VALID, mpViewData->GetDocument()->GetAddressConvention(), maPos.Tab()); + mpViewData->GetDocument()->GetAddressConvention(), maPos.Tab()); ScConditionalFormat* pFormat = mpCondFormList->GetConditionalFormat(); if((nFlags & ScRefFlags::VALID) && !aRange.empty() && pFormat) @@ -761,7 +761,7 @@ IMPL_LINK_TYPED( ScCondFormatDlg, EdRangeModifyHdl, Edit&, rEdit, void ) OUString aRangeStr = rEdit.GetText(); ScRangeList aRange; ScRefFlags nFlags = aRange.Parse(aRangeStr, mpViewData->GetDocument(), - ScRefFlags::VALID, mpViewData->GetDocument()->GetAddressConvention()); + mpViewData->GetDocument()->GetAddressConvention()); if(nFlags & ScRefFlags::VALID) rEdit.SetControlBackground(GetSettings().GetStyleSettings().GetWindowColor()); else diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index 43c8cbe6ef1d..7a504b87cc06 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -82,9 +82,9 @@ const sal_uInt16 ScTPValidationValue::pValueRanges[] = }; ScValidationDlg::ScValidationDlg(vcl::Window* pParent, const SfxItemSet* pArgSet, - ScTabViewShell *pTabViewSh, SfxBindings *pB /*= NULL*/) + ScTabViewShell *pTabViewSh) : ScValidationDlgBase(pParent ? pParent : SfxGetpApp()->GetTopWindow(), - "ValidationDialog", "modules/scalc/ui/validationdialog.ui", pArgSet, pB) + "ValidationDialog", "modules/scalc/ui/validationdialog.ui", pArgSet, nullptr) , m_pTabVwSh(pTabViewSh) , m_nValuePageId(0) , m_bOwnRefHdlr(false) diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx index 628b26cc0d71..1e5ce4c12c70 100644 --- a/sc/source/ui/docshell/dbdocfun.cxx +++ b/sc/source/ui/docshell/dbdocfun.cxx @@ -388,7 +388,7 @@ bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bApi, bool bIsUnnamed, // Sortieren ohne SubTotals aSubTotalParam.bRemoveOnly = true; // wird unten wieder zurueckgesetzt - DoSubTotals( nTab, aSubTotalParam, nullptr, false, bApi ); + DoSubTotals( nTab, aSubTotalParam, false, bApi ); } if (bSort) @@ -413,7 +413,7 @@ bool ScDBDocFunc::RepeatDB( const OUString& rDBName, bool bApi, bool bIsUnnamed, { pDBData->GetSubTotalParam( aSubTotalParam ); // Bereich kann sich geaendert haben aSubTotalParam.bRemoveOnly = false; - DoSubTotals( nTab, aSubTotalParam, nullptr, false, bApi ); + DoSubTotals( nTab, aSubTotalParam, false, bApi ); } if (bRecord) @@ -950,7 +950,7 @@ bool ScDBDocFunc::Query( SCTAB nTab, const ScQueryParam& rQueryParam, } void ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, - const ScSortParam* pForceNewSort, bool bRecord, bool bApi ) + bool bRecord, bool bApi ) { //! auch fuer ScDBFunc::DoSubTotals benutzen! // dann bleibt aussen: @@ -1060,7 +1060,7 @@ void ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, if (bDo) { // Sortieren - if ( rParam.bDoSort || pForceNewSort ) + if ( rParam.bDoSort ) { pDBData->SetArea( nTab, aNewParam.nCol1,aNewParam.nRow1, aNewParam.nCol2,aNewParam.nRow2 ); @@ -1069,7 +1069,7 @@ void ScDBDocFunc::DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, ScSortParam aOldSort; pDBData->GetSortParam( aOldSort ); - ScSortParam aSortParam( aNewParam, pForceNewSort ? *pForceNewSort : aOldSort ); + ScSortParam aSortParam( aNewParam, aOldSort ); Sort( nTab, aSortParam, false, false, bApi ); } diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index ccbbe56d5fc2..877faddac2e1 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -2824,7 +2824,7 @@ bool ScDocFunc::MoveBlock( const ScRange& rSource, const ScAddress& rDestPos, nStartCol, nStartRow, nStartTab, nOldEndCol, nOldEndRow, nEndTab ), ScAddress( nDestCol, nDestRow, nDestTab ), - bCut, pUndoDoc, nullptr, bScenariosAdded ) ); + bCut, pUndoDoc, bScenariosAdded ) ); } SCCOL nDestPaintEndCol = nDestEndCol; diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 0c203013a5dc..9d3fcb3b08b7 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -586,7 +586,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) if (pChangeTrack) { if ( pChangeTrack->IsProtected() ) - bDo = ExecuteChangeProtectionDialog( nullptr ); + bDo = ExecuteChangeProtectionDialog(); } if ( bDo ) { @@ -621,7 +621,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) case SID_CHG_PROTECT : { - if ( ExecuteChangeProtectionDialog( nullptr ) ) + if ( ExecuteChangeProtectionDialog() ) { rReq.Done(); SetDocumentModified(); @@ -644,12 +644,12 @@ void ScDocShell::Execute( SfxRequest& rReq ) WinBits(WB_YES_NO | WB_DEF_NO), ScGlobal::GetRscString( STR_END_REDLINING ) ); if( aBox->Execute() == RET_YES ) - bDo = ExecuteChangeProtectionDialog( nullptr, true ); + bDo = ExecuteChangeProtectionDialog( true ); else bDo = false; } else // merge might reject some actions - bDo = ExecuteChangeProtectionDialog( nullptr, true ); + bDo = ExecuteChangeProtectionDialog( true ); } if ( !bDo ) { @@ -1132,7 +1132,7 @@ void UpdateAcceptChangesDialog() } } -bool ScDocShell::ExecuteChangeProtectionDialog( vcl::Window* _pParent, bool bJustQueryIfProtected ) +bool ScDocShell::ExecuteChangeProtectionDialog( bool bJustQueryIfProtected ) { bool bDone = false; ScChangeTrack* pChangeTrack = aDocument.GetChangeTrack(); @@ -1147,7 +1147,7 @@ bool ScDocShell::ExecuteChangeProtectionDialog( vcl::Window* _pParent, bool bJus OUString aPassword; ScopedVclPtrInstance<SfxPasswordDialog> pDlg( - _pParent ? _pParent : GetActiveDialogParent(), &aText ); + GetActiveDialogParent(), &aText ); pDlg->SetText( aTitle ); pDlg->SetMinLen( 1 ); pDlg->SetHelpId( GetStaticInterface()->GetSlot(SID_CHG_PROTECT)->GetCommand() ); diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index f23346ce0ebd..bb949ce08ae2 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -143,7 +143,7 @@ void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScVie // use ScChartPositioner to auto-detect column/row headers (like ScChartArray in old version) ScRangeListRef aRangeListRef( new ScRangeList ); - aRangeListRef->Parse( aRangeString, &rScDoc, ScRefFlags::VALID, rScDoc.GetAddressConvention() ); + aRangeListRef->Parse( aRangeString, &rScDoc, rScDoc.GetAddressConvention() ); if ( !aRangeListRef->empty() ) { rScDoc.LimitChartIfAll( aRangeListRef ); // limit whole columns/rows to used area diff --git a/sc/source/ui/inc/dbdocfun.hxx b/sc/source/ui/inc/dbdocfun.hxx index 5a538ca12ab8..bebf5d7f54dd 100644 --- a/sc/source/ui/inc/dbdocfun.hxx +++ b/sc/source/ui/inc/dbdocfun.hxx @@ -75,7 +75,6 @@ public: const ScRange* pAdvSource, bool bRecord, bool bApi ); void DoSubTotals( SCTAB nTab, const ScSubTotalParam& rParam, - const ScSortParam* pForceNewSort, bool bRecord, bool bApi ); bool AddDBRange( const OUString& rName, const ScRange& rRange, bool bApi ); diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 2f09dde27fd5..f53209bfd4b3 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -255,7 +255,7 @@ public: /// If bJustQueryIfProtected==sal_True protection is not /// changed and <TRUE/> is returned if not protected or /// password was entered correctly. - bool ExecuteChangeProtectionDialog( vcl::Window* _pParent, bool bJustQueryIfProtected = false ); + bool ExecuteChangeProtectionDialog( bool bJustQueryIfProtected = false ); void SetPrintZoom( SCTAB nTab, sal_uInt16 nScale, sal_uInt16 nPages ); bool AdjustPrintZoom( const ScRange& rRange ); diff --git a/sc/source/ui/inc/undobase.hxx b/sc/source/ui/inc/undobase.hxx index 522bf63bf043..de3ae5f238a1 100644 --- a/sc/source/ui/inc/undobase.hxx +++ b/sc/source/ui/inc/undobase.hxx @@ -127,10 +127,9 @@ class ScDBFuncUndo: public ScSimpleUndo protected: ScDBData* pAutoDBRange; ScRange aOriginalRange; - SdrUndoAction* mpDrawUndo; public: - ScDBFuncUndo( ScDocShell* pDocSh, const ScRange& rOriginal, SdrUndoAction* pDrawUndo = nullptr ); + ScDBFuncUndo( ScDocShell* pDocSh, const ScRange& rOriginal ); virtual ~ScDBFuncUndo(); void BeginUndo(); diff --git a/sc/source/ui/inc/undoblk.hxx b/sc/source/ui/inc/undoblk.hxx index 3187163aefd3..8fc8432b7bb9 100644 --- a/sc/source/ui/inc/undoblk.hxx +++ b/sc/source/ui/inc/undoblk.hxx @@ -214,7 +214,7 @@ class ScUndoDragDrop: public ScMoveUndo public: ScUndoDragDrop( ScDocShell* pNewDocShell, const ScRange& rRange, ScAddress aNewDestPos, bool bNewCut, - ScDocument* pUndoDocument, ScRefUndoData* pRefData, + ScDocument* pUndoDocument, bool bScenario ); virtual ~ScUndoDragDrop(); @@ -561,7 +561,7 @@ class ScUndoRefConversion: public ScSimpleUndo public: ScUndoRefConversion( ScDocShell* pNewDocShell, const ScRange& aMarkRange, const ScMarkData& rMark, - ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, bool bNewMulti, InsertDeleteFlags nNewFlag); + ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, bool bNewMulti); virtual ~ScUndoRefConversion(); virtual void Undo() override; @@ -577,7 +577,6 @@ private: ScDocument* pRedoDoc; ScRange aRange; bool bMulti; - InsertDeleteFlags nFlags; sal_uLong nStartChangeAction; sal_uLong nEndChangeAction; diff --git a/sc/source/ui/inc/undodat.hxx b/sc/source/ui/inc/undodat.hxx index 8270dda2568e..564e8979de92 100644 --- a/sc/source/ui/inc/undodat.hxx +++ b/sc/source/ui/inc/undodat.hxx @@ -440,7 +440,7 @@ public: const ScMarkData& rMark, ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, InsertDeleteFlags nNewFlags, - ScRefUndoData* pRefData, void* pFill1, void* pFill2, void* pFill3 + ScRefUndoData* pRefData ); virtual ~ScUndoDataForm(); diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx index 460947e192e3..905b250fc258 100644 --- a/sc/source/ui/inc/validate.hxx +++ b/sc/source/ui/inc/validate.hxx @@ -175,7 +175,7 @@ class ScValidationDlg bool LeaveRefStatus(); public: - explicit ScValidationDlg( vcl::Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell * pTabViewSh, SfxBindings *pB = nullptr ); + explicit ScValidationDlg( vcl::Window* pParent, const SfxItemSet* pArgSet, ScTabViewShell * pTabViewSh ); virtual ~ScValidationDlg(); virtual void dispose() override { diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx index 5602bed8c6ef..da2358a354b8 100644 --- a/sc/source/ui/undo/undobase.cxx +++ b/sc/source/ui/undo/undobase.cxx @@ -507,24 +507,23 @@ void ScMoveUndo::EndUndo() ScSimpleUndo::EndUndo(); } -ScDBFuncUndo::ScDBFuncUndo( ScDocShell* pDocSh, const ScRange& rOriginal, SdrUndoAction* pDrawUndo ) : +ScDBFuncUndo::ScDBFuncUndo( ScDocShell* pDocSh, const ScRange& rOriginal ) : ScSimpleUndo( pDocSh ), - aOriginalRange( rOriginal ), - mpDrawUndo( pDrawUndo ) + aOriginalRange( rOriginal ) { pAutoDBRange = pDocSh->GetOldAutoDBRange(); } ScDBFuncUndo::~ScDBFuncUndo() { - DeleteSdrUndoAction( mpDrawUndo ); + DeleteSdrUndoAction( nullptr ); delete pAutoDBRange; } void ScDBFuncUndo::BeginUndo() { ScSimpleUndo::BeginUndo(); - DoSdrUndoAction( mpDrawUndo, &pDocShell->GetDocument() ); + DoSdrUndoAction( nullptr, &pDocShell->GetDocument() ); } void ScDBFuncUndo::EndUndo() @@ -561,7 +560,7 @@ void ScDBFuncUndo::EndUndo() void ScDBFuncUndo::BeginRedo() { - RedoSdrUndoAction( mpDrawUndo ); + RedoSdrUndoAction( nullptr ); if ( pAutoDBRange ) { // move the database range to this function's position again (see ScDocShell::GetDBData) diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx index a79c621287af..a11065eb6701 100644 --- a/sc/source/ui/undo/undoblk.cxx +++ b/sc/source/ui/undo/undoblk.cxx @@ -1101,8 +1101,8 @@ bool ScUndoPaste::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoDragDrop::ScUndoDragDrop( ScDocShell* pNewDocShell, const ScRange& rRange, ScAddress aNewDestPos, bool bNewCut, - ScDocument* pUndoDocument, ScRefUndoData* pRefData, bool bScenario ) : - ScMoveUndo( pNewDocShell, pUndoDocument, pRefData, SC_UNDO_REFFIRST ), + ScDocument* pUndoDocument, bool bScenario ) : + ScMoveUndo( pNewDocShell, pUndoDocument, nullptr, SC_UNDO_REFFIRST ), mnPaintExtFlags( 0 ), aSrcRange( rRange ), bCut( bNewCut ), diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx index 2c7fa64bc6d2..2f88c2995fb7 100644 --- a/sc/source/ui/undo/undoblk3.cxx +++ b/sc/source/ui/undo/undoblk3.cxx @@ -1273,14 +1273,13 @@ bool ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const ScUndoRefConversion::ScUndoRefConversion( ScDocShell* pNewDocShell, const ScRange& aMarkRange, const ScMarkData& rMark, - ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, bool bNewMulti, InsertDeleteFlags nNewFlag) : + ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, bool bNewMulti) : ScSimpleUndo( pNewDocShell ), aMarkData ( rMark ), pUndoDoc ( pNewUndoDoc ), pRedoDoc ( pNewRedoDoc ), aRange ( aMarkRange ), -bMulti ( bNewMulti ), -nFlags ( nNewFlag ) +bMulti ( bNewMulti ) { SetChangeTrack(); } @@ -1299,7 +1298,7 @@ OUString ScUndoRefConversion::GetComment() const void ScUndoRefConversion::SetChangeTrack() { ScChangeTrack* pChangeTrack = pDocShell->GetDocument().GetChangeTrack(); - if ( pChangeTrack && (nFlags & InsertDeleteFlags::FORMULA) ) + if ( pChangeTrack ) pChangeTrack->AppendContentsIfInRefDoc( pUndoDoc, nStartChangeAction, nEndChangeAction ); else @@ -1318,7 +1317,7 @@ void ScUndoRefConversion::DoChange( ScDocument* pRefDoc) SCTAB nTabCount = rDoc.GetTableCount(); aCopyRange.aStart.SetTab(0); aCopyRange.aEnd.SetTab(nTabCount-1); - pRefDoc->CopyToDocument( aCopyRange, nFlags, bMulti, rDoc, &aMarkData ); + pRefDoc->CopyToDocument( aCopyRange, InsertDeleteFlags::ALL, bMulti, rDoc, &aMarkData ); pDocShell->PostPaint( aRange, PAINT_GRID); pDocShell->PostDataChanged(); ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell(); diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx index c23439899b3b..28d5dcf0d603 100644 --- a/sc/source/ui/undo/undodat.cxx +++ b/sc/source/ui/undo/undodat.cxx @@ -1790,8 +1790,7 @@ ScUndoDataForm::ScUndoDataForm( ScDocShell* pNewDocShell, const ScMarkData& rMark, ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, InsertDeleteFlags nNewFlags, - ScRefUndoData* pRefData, - void* /*pFill1*/, void* /*pFill2*/, void* /*pFill3*/ ) : + ScRefUndoData* pRefData ) : ScBlockUndo( pNewDocShell, ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), SC_UNDO_SIMPLE ), mpMarkData(new ScMarkData(rMark)), pUndoDoc( pNewUndoDoc ), diff --git a/sc/source/ui/undo/undosort.cxx b/sc/source/ui/undo/undosort.cxx index 7ca1aa485f2a..ec29bb2ace6e 100644 --- a/sc/source/ui/undo/undosort.cxx +++ b/sc/source/ui/undo/undosort.cxx @@ -42,7 +42,7 @@ void UndoSort::Execute( bool bUndo ) sc::ReorderParam aParam = maParam; if (bUndo) aParam.reverse(); - rDoc.Reorder(aParam, nullptr); + rDoc.Reorder(aParam); if (maParam.mbHasHeaders) { diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index d4f2318ffb88..7fb5029ce5f2 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -5860,7 +5860,7 @@ void SAL_CALL ScCellRangeObj::applySubTotals( pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen ScDBDocFunc aFunc(*pDocSh); - aFunc.DoSubTotals( nTab, aParam, nullptr, true, true ); // Bereich muss angelegt sein + aFunc.DoSubTotals( nTab, aParam, true, true ); // Bereich muss angelegt sein } } @@ -5887,7 +5887,7 @@ void SAL_CALL ScCellRangeObj::removeSubTotals() throw(uno::RuntimeException, std pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen ScDBDocFunc aFunc(*pDocSh); - aFunc.DoSubTotals( nTab, aParam, nullptr, true, true ); // Bereich muss angelegt sein + aFunc.DoSubTotals( nTab, aParam, true, true ); // Bereich muss angelegt sein } } diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index a28f0c970212..a27ebbcce24e 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -1037,7 +1037,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotDescriptorBase::getDataLayoutFi { if( pSaveData->GetDataLayoutDimension() ) { - ScFieldIdentifier aFieldId( OUString( SC_DATALAYOUT_NAME ), 0, true ); + ScFieldIdentifier aFieldId( OUString( SC_DATALAYOUT_NAME ), true ); return new ScDataPilotFieldObj( *this, aFieldId ); } } diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index 4e7fe86bc02d..dfc6dcac94b2 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -1148,7 +1148,7 @@ ScVbaRange::getCellRangesForAddress( ScRefFlags& rResFlags, const OUString& sAdd if ( pDocSh ) { ScDocument& rDoc = pDocSh->GetDocument(); - rResFlags = rCellRanges.Parse( sAddress, &rDoc, ScRefFlags::VALID, eConv, 0, cDelimiter ); + rResFlags = rCellRanges.Parse( sAddress, &rDoc, eConv, 0, cDelimiter ); if ( rResFlags & ScRefFlags::VALID ) { return true; diff --git a/sc/source/ui/vba/vbasheetobjects.cxx b/sc/source/ui/vba/vbasheetobjects.cxx index 5c52886efc0d..0c6d36d35d5d 100644 --- a/sc/source/ui/vba/vbasheetobjects.cxx +++ b/sc/source/ui/vba/vbasheetobjects.cxx @@ -340,8 +340,7 @@ public: const uno::Reference< frame::XModel >& rxModel, const uno::Reference< sheet::XSpreadsheet >& rxSheet, const uno::Type& rVbaType, - const OUString& rModelServiceName, - sal_Int16 nComponentType ) throw (uno::RuntimeException); + const OUString& rModelServiceName ) throw (uno::RuntimeException); protected: uno::Reference< container::XIndexContainer > const & createForm() throw (uno::RuntimeException); @@ -364,11 +363,10 @@ ScVbaControlContainer::ScVbaControlContainer( const uno::Reference< frame::XModel >& rxModel, const uno::Reference< sheet::XSpreadsheet >& rxSheet, const uno::Type& rVbaType, - const OUString& rModelServiceName, - sal_Int16 nComponentType ) throw (uno::RuntimeException) : + const OUString& rModelServiceName ) throw (uno::RuntimeException) : ScVbaObjectContainer( rxParent, rxContext, rxModel, rxSheet, rVbaType ), maModelServiceName( rModelServiceName ), - mnComponentType( nComponentType ) + mnComponentType( form::FormComponentType::COMMANDBUTTON ) { } @@ -464,8 +462,7 @@ ScVbaButtonContainer::ScVbaButtonContainer( ScVbaControlContainer( rxParent, rxContext, rxModel, rxSheet, cppu::UnoType<excel::XButton>::get(), - "com.sun.star.form.component.CommandButton", - form::FormComponentType::COMMANDBUTTON ) + "com.sun.star.form.component.CommandButton" ) { } diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx index 2f331a28d9f0..d44f759f501a 100644 --- a/sc/source/ui/view/cellsh1.cxx +++ b/sc/source/ui/view/cellsh1.cxx @@ -220,7 +220,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); - std::unique_ptr<AbstractScInsertCellDlg> pDlg(pFact->CreateScInsertCellDlg( pTabViewShell->GetDialogParent(), RID_SCDLG_INSCELL, bTheFlag)); + std::unique_ptr<AbstractScInsertCellDlg> pDlg(pFact->CreateScInsertCellDlg( pTabViewShell->GetDialogParent(), bTheFlag)); OSL_ENSURE(pDlg, "Dialog create fail!"); if (pDlg->Execute() == RET_OK) eCmd = pDlg->GetInsCellCmd(); @@ -1079,7 +1079,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) OSL_ENSURE(pFact, "ScAbstractFactory create fail!"); AbstractScDPShowDetailDlg* pDlg = pFact->CreateScDPShowDetailDlg( - pTabViewShell->GetDialogParent(), RID_SCDLG_DPSHOWDETAIL, *pDPObj, nOrientation ); + pTabViewShell->GetDialogParent(), *pDPObj, nOrientation ); OSL_ENSURE(pDlg, "Dialog create fail!"); if ( pDlg->Execute() == RET_OK ) { @@ -1120,7 +1120,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) OSL_ENSURE( pFact, "ScAbstractFactory create fail!" ); Date aNullDate( *GetViewData()->GetDocument()->GetFormatTable()->GetNullDate() ); AbstractScDPDateGroupDlg* pDlg = pFact->CreateScDPDateGroupDlg( - pTabViewShell->GetDialogParent(), RID_SCDLG_DPDATEGROUP, + pTabViewShell->GetDialogParent(), aNumInfo, nParts, aNullDate ); OSL_ENSURE( pDlg, "Dialog create fail!" ); if( pDlg->Execute() == RET_OK ) @@ -1134,7 +1134,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create(); OSL_ENSURE( pFact, "ScAbstractFactory create fail!" ); AbstractScDPNumGroupDlg* pDlg = pFact->CreateScDPNumGroupDlg( - pTabViewShell->GetDialogParent(), RID_SCDLG_DPNUMGROUP, aNumInfo ); + pTabViewShell->GetDialogParent(), aNumInfo ); OSL_ENSURE( pDlg, "Dialog create fail!" ); if( pDlg->Execute() == RET_OK ) pTabViewShell->NumGroupDataPilot( pDlg->GetGroupInfo() ); @@ -2440,7 +2440,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq ) ScConditionalFormatList* pList = pDoc->GetCondFormList( aPos.Tab() ); std::unique_ptr<AbstractScCondFormatManagerDlg> pDlg(pFact->CreateScCondFormatMgrDlg( - pTabViewShell->GetDialogParent(), pDoc, pList, RID_SCDLG_COND_FORMAT_MANAGER)); + pTabViewShell->GetDialogParent(), pDoc, pList)); short nRet = pDlg->Execute(); if(nRet == RET_OK && pDlg->CondFormatsChanged()) { @@ -2658,7 +2658,7 @@ void ScCellShell::ExecuteDataPilotDialog() std::vector<OUString> aSources = ScDPObject::GetRegisteredSources(); std::unique_ptr<AbstractScDataPilotServiceDlg> pServDlg( pFact->CreateScDataPilotServiceDlg( - pTabViewShell->GetDialogParent(), aSources, RID_SCDLG_DAPISERVICE)); + pTabViewShell->GetDialogParent(), aSources)); OSL_ENSURE(pServDlg, "Dialog create fail!"); if ( pServDlg->Execute() == RET_OK ) diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx index 0fafd4d34b2a..d0f51dfeb725 100644 --- a/sc/source/ui/view/drawvie4.cxx +++ b/sc/source/ui/view/drawvie4.cxx @@ -273,7 +273,7 @@ void getChartSourceRanges(ScDocument* pDoc, const SdrMarkList& rObjs, std::vecto { ScRangeList aRange; ScAddress aAddr; - if (aRange.Parse(*it, pDoc, ScRefFlags::VALID, pDoc->GetAddressConvention()) & ScRefFlags::VALID) + if (aRange.Parse(*it, pDoc, pDoc->GetAddressConvention()) & ScRefFlags::VALID) { for(size_t i = 0; i < aRange.size(); ++i) rRanges.push_back(*aRange[i]); diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx index b1db59642e1c..88d1f14e071b 100644 --- a/sc/source/ui/view/viewfun3.cxx +++ b/sc/source/ui/view/viewfun3.cxx @@ -1973,7 +1973,7 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow , nStartCol, nCurrentRow, nStartTab, nUndoEndCol, nUndoEndRow, nEndTab, rMark, pUndoDoc, pRedoDoc, nUndoFlags, - pUndoData, nullptr, nullptr, nullptr ); + pUndoData ); pUndoMgr->AddUndoAction( new ScUndoWrapper( pUndo ), true ); sal_uInt16 nPaint = PAINT_GRID; diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx index 96d77357e466..8204bff05e68 100644 --- a/sc/source/ui/view/viewfun4.cxx +++ b/sc/source/ui/view/viewfun4.cxx @@ -286,7 +286,7 @@ void ScViewFunc::DoRefConversion() pDocSh->GetUndoManager()->AddUndoAction( new ScUndoRefConversion( pDocSh, - aMarkRange, rMark, pUndoDoc, pRedoDoc, bMulti, InsertDeleteFlags::ALL) ); + aMarkRange, rMark, pUndoDoc, pRedoDoc, bMulti) ); } pDocSh->PostPaint( aMarkRange, PAINT_GRID ); |