loplugin:constantparam in sfx2
Change-Id: I9a5a9fd1f4f43e0b7ef13d14979cb231f6aa9d46 Reviewed-on: https://gerrit.libreoffice.org/23801 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
committed by
Noel Grandin
parent
8372d8532b
commit
afd3ab436b
@@ -159,7 +159,7 @@ void ODbAdminDialog::impl_selectDataSource(const css::uno::Any& _aDataSourceName
|
||||
case ::dbaccess::DST_USERDEFINE10:
|
||||
{
|
||||
OUString aTitle(ModuleRes(STR_PAGETITLE_ADVANCED));
|
||||
AddTabPage(PAGE_USERDRIVER, aTitle, ODriversSettings::CreateUser, nullptr, false, 1);
|
||||
AddTabPage(PAGE_USERDRIVER, aTitle, ODriversSettings::CreateUser, nullptr, 1);
|
||||
m_aCurrentDetailPages.push(PAGE_USERDRIVER);
|
||||
}
|
||||
break;
|
||||
|
@@ -42,8 +42,8 @@ class SFX2_DLLPUBLIC SfxProgress
|
||||
public:
|
||||
SfxProgress( SfxObjectShell* pObjSh,
|
||||
const rtl::OUString& rText,
|
||||
sal_uIntPtr nRange, bool bAllDocs = false,
|
||||
bool bWait = true );
|
||||
sal_uIntPtr nRange,
|
||||
bool bWait = true);
|
||||
virtual ~SfxProgress();
|
||||
|
||||
bool SetStateText( sal_uIntPtr nVal, const rtl::OUString &rVal );
|
||||
|
@@ -136,7 +136,6 @@ public:
|
||||
const OUString &rRiderText,
|
||||
CreateTabPage pCreateFunc, // != 0
|
||||
GetTabPageRanges pRangesFunc, // can be 0
|
||||
bool bItemsOnDemand = false,
|
||||
sal_uInt16 nPos = TAB_APPEND);
|
||||
|
||||
void AddTabPage( sal_uInt16 nId,
|
||||
|
@@ -283,10 +283,6 @@ public:
|
||||
SfxPoolItem( 0 ),
|
||||
pFrame( pViewFrame)
|
||||
{}
|
||||
SfxViewFrameItem( sal_uInt16 nWhichId, SfxViewFrame *pViewFrame ):
|
||||
SfxPoolItem( nWhichId ),
|
||||
pFrame( pViewFrame)
|
||||
{}
|
||||
|
||||
virtual bool operator==( const SfxPoolItem& ) const override;
|
||||
virtual SfxPoolItem* Clone( SfxItemPool *pPool = nullptr ) const override;
|
||||
|
@@ -107,7 +107,7 @@ ScProgress::ScProgress(SfxObjectShell* pObjSh, const OUString& rText,
|
||||
}
|
||||
else
|
||||
{
|
||||
pProgress = new SfxProgress( pObjSh, rText, nRange, false/*bAllDocs*/, bWait );
|
||||
pProgress = new SfxProgress( pObjSh, rText, nRange, bWait );
|
||||
pGlobalProgress = pProgress;
|
||||
nGlobalRange = nRange;
|
||||
nGlobalPercent = 0;
|
||||
|
@@ -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();
|
||||
|
@@ -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<SfxObjectShell*>(xObjSh);
|
||||
SfxViewFrame *pFrame= SfxViewFrame::GetFirst(pDoc);
|
||||
SfxObjectShell* pDoc = static_cast<SfxObjectShell*>(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);
|
||||
|
@@ -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 )
|
||||
|
@@ -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 );
|
||||
|
@@ -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 );
|
||||
|
@@ -66,9 +66,7 @@ void StartProgress( sal_uInt16 nMessResId, long nStartValue, long nEndValue,
|
||||
pProgress = new SwProgress;
|
||||
pProgress->pProgress = new SfxProgress( pDocShell,
|
||||
SW_RESSTR(nMessResId),
|
||||
nEndValue - nStartValue,
|
||||
false,
|
||||
true );
|
||||
nEndValue - nStartValue );
|
||||
pProgress->nStartCount = 1;
|
||||
pProgress->pDocShell = pDocShell;
|
||||
pProgressContainer->insert( pProgressContainer->begin(), pProgress );
|
||||
|
Reference in New Issue
Block a user