From afd3ab436bf920ef80c642891e9e63133fca41a0 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 4 Apr 2016 10:33:59 +0200 Subject: loplugin:constantparam in sfx2 Change-Id: I9a5a9fd1f4f43e0b7ef13d14979cb231f6aa9d46 Reviewed-on: https://gerrit.libreoffice.org/23801 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sfx2/source/appl/appopen.cxx | 4 ++-- sfx2/source/bastyp/progress.cxx | 13 +++++-------- sfx2/source/dialog/tabdlg.cxx | 3 +-- sfx2/source/doc/iframe.cxx | 8 +++----- sfx2/source/view/impviewframe.hxx | 4 ++-- 5 files changed, 13 insertions(+), 19 deletions(-) (limited to 'sfx2') diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx index 9500ceb5af3c..9a685a00628a 100644 --- a/sfx2/source/appl/appopen.cxx +++ b/sfx2/source/appl/appopen.cxx @@ -1015,7 +1015,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) if ( !pView ) pView = SfxViewFrame::Current(); pView->GetViewShell()->JumpToMark( aFileName.copy(1) ); - rReq.SetReturnValue( SfxViewFrameItem( 0, pView ) ); + rReq.SetReturnValue( SfxViewFrameItem( pView ) ); return; } @@ -1093,7 +1093,7 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq ) SfxObjectShell* pSh = pCntrFrame->GetCurrentDocument(); DBG_ASSERT( pSh, "Controller without ObjectShell ?!" ); - rReq.SetReturnValue( SfxViewFrameItem( 0, pCntrFrame->GetCurrentViewFrame() ) ); + rReq.SetReturnValue( SfxViewFrameItem( pCntrFrame->GetCurrentViewFrame() ) ); if ( bHidden ) pSh->RestoreNoDelete(); diff --git a/sfx2/source/bastyp/progress.cxx b/sfx2/source/bastyp/progress.cxx index 644724f638a7..201bc0621d3a 100644 --- a/sfx2/source/bastyp/progress.cxx +++ b/sfx2/source/bastyp/progress.cxx @@ -56,7 +56,7 @@ struct SfxProgress_Impl sal_uIntPtr nMax; clock_t nCreate; clock_t nNextReschedule; - bool bLocked, bAllDocs; + bool bLocked; bool bWaitMode; bool bAllowRescheduling; bool bRunning; @@ -74,8 +74,8 @@ struct SfxProgress_Impl void SfxProgress_Impl::Enable_Impl() { - SfxObjectShell* pDoc = bAllDocs ? nullptr : static_cast(xObjSh); - SfxViewFrame *pFrame= SfxViewFrame::GetFirst(pDoc); + SfxObjectShell* pDoc = static_cast(xObjSh); + SfxViewFrame *pFrame = SfxViewFrame::GetFirst(pDoc); while ( pFrame ) { pFrame->Enable(true/*bEnable*/); @@ -99,7 +99,6 @@ SfxProgress_Impl::SfxProgress_Impl( const OUString &/*rTitle*/ ) , nCreate(0) , nNextReschedule(0) , bLocked(false) - , bAllDocs(false) , bWaitMode(false) , bAllowRescheduling(false) , bRunning(false) @@ -122,7 +121,6 @@ SfxProgress::SfxProgress sal_uIntPtr nRange, /* Max value for range */ - bool bAll, /* Disable all documents or only the document of the ViewFram */ bool bWait /* Activate the wait-Pointer initially (TRUE) */ ) @@ -153,7 +151,6 @@ SfxProgress::SfxProgress "sfx.bastyp", "SfxProgress: created for '" << rText << "' at " << pImp->nCreate << "ds"); - pImp->bAllDocs = bAll; pImp->pWorkWin = nullptr; pImp->pView = nullptr; @@ -333,7 +330,7 @@ void SfxProgress::Resume() if ( pImp->bWaitMode ) { - if ( pImp->xObjSh.Is() && !pImp->bAllDocs ) + if ( pImp->xObjSh.Is() ) { for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(pImp->xObjSh); pFrame; @@ -377,7 +374,7 @@ void SfxProgress::Suspend() pImp->xStatusInd->reset(); } - if ( pImp->xObjSh.Is() && !pImp->bAllDocs ) + if ( pImp->xObjSh.Is() ) { for ( SfxViewFrame *pFrame = SfxViewFrame::GetFirst(pImp->xObjSh); diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx index 1780f84de9c2..0e0cab947aee 100644 --- a/sfx2/source/dialog/tabdlg.cxx +++ b/sfx2/source/dialog/tabdlg.cxx @@ -631,7 +631,6 @@ void SfxTabDialog::AddTabPage const OUString& rRiderText, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc, - bool bItemsOnDemand, sal_uInt16 nPos ) { @@ -639,7 +638,7 @@ void SfxTabDialog::AddTabPage "Double Page-Ids in the Tabpage" ); m_pTabCtrl->InsertPage( nId, rRiderText, nPos ); pImpl->aData.push_back( - new Data_Impl( nId, pCreateFunc, pRangesFunc, bItemsOnDemand ) ); + new Data_Impl( nId, pCreateFunc, pRangesFunc, false/*bItemsOnDemand*/ ) ); } void SfxTabDialog::RemoveTabPage( sal_uInt16 nId ) diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx index 4b2d79d9703c..32c312e7e94f 100644 --- a/sfx2/source/doc/iframe.cxx +++ b/sfx2/source/doc/iframe.cxx @@ -107,13 +107,11 @@ public: class IFrameWindow_Impl : public vcl::Window { public: - IFrameWindow_Impl( vcl::Window *pParent, - bool bHasBorder, - WinBits nWinBits = 0 ); + IFrameWindow_Impl( vcl::Window *pParent, bool bHasBorder ); }; -IFrameWindow_Impl::IFrameWindow_Impl( vcl::Window *pParent, bool bHasBorder, WinBits nWinBits ) - : Window( pParent, nWinBits | WB_CLIPCHILDREN | WB_NODIALOGCONTROL | WB_DOCKBORDER ) +IFrameWindow_Impl::IFrameWindow_Impl( vcl::Window *pParent, bool bHasBorder ) + : Window( pParent, WB_CLIPCHILDREN | WB_NODIALOGCONTROL | WB_DOCKBORDER ) { if ( !bHasBorder ) SetBorderStyle( WindowBorderStyle::NOBORDER ); diff --git a/sfx2/source/view/impviewframe.hxx b/sfx2/source/view/impviewframe.hxx index d9c5e9bd25c1..6b128ea7b440 100644 --- a/sfx2/source/view/impviewframe.hxx +++ b/sfx2/source/view/impviewframe.hxx @@ -79,8 +79,8 @@ class SfxFrameViewWindow_Impl : public vcl::Window SfxViewFrame* pFrame; public: - SfxFrameViewWindow_Impl( SfxViewFrame* p, vcl::Window& rParent, WinBits nBits=0 ) : - Window( &rParent, nBits | WB_CLIPCHILDREN ), + SfxFrameViewWindow_Impl( SfxViewFrame* p, vcl::Window& rParent ) : + Window( &rParent, WB_CLIPCHILDREN ), pFrame( p ) { p->GetFrame().GetWindow().SetBorderStyle( WindowBorderStyle::NOBORDER ); -- cgit