summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-03-08 16:21:26 +0200
committerNoel Grandin <noel@peralex.com>2016-03-09 10:07:46 +0200
commit435d6d50c3cdb6711942ee40dc2fae1865361845 (patch)
treeae76659dca1dfb867c99ae7ca66add9cf3c8ac2d /sfx2
parent96a2aa94b2a68e12ab74cb6d8f4a16f6c63e4ccf (diff)
loplugin:constantparam in sfx2
Change-Id: I50a2d8221f907f0e844e558f3dbdd0346c010201
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appserv.cxx2
-rw-r--r--sfx2/source/appl/newhelp.cxx25
-rw-r--r--sfx2/source/appl/newhelp.hxx2
-rw-r--r--sfx2/source/dialog/templdlg.cxx22
-rw-r--r--sfx2/source/doc/docfile.cxx8
-rw-r--r--sfx2/source/doc/doctemplates.cxx18
-rw-r--r--sfx2/source/doc/iframe.cxx2
-rw-r--r--sfx2/source/doc/objcont.cxx3
-rw-r--r--sfx2/source/doc/objmisc.cxx2
-rw-r--r--sfx2/source/doc/objserv.cxx2
-rw-r--r--sfx2/source/doc/objstor.cxx12
-rw-r--r--sfx2/source/doc/sfxbasemodel.cxx2
-rw-r--r--sfx2/source/inc/templdgi.hxx10
-rw-r--r--sfx2/source/view/viewfrm.cxx4
14 files changed, 52 insertions, 62 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index f29288ed0408..25fb7729cb33 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -973,7 +973,7 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq )
if ( pFact )
{
VclAbstractDialog* pDlg =
- pFact->CreateFrameDialog( nullptr, xFrame, rReq.GetSlot(), sPageURL );
+ pFact->CreateFrameDialog( xFrame, rReq.GetSlot(), sPageURL );
short nRet = pDlg->Execute();
delete pDlg;
SfxViewFrame* pView = SfxViewFrame::GetFirst();
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index da3da96d60ee..2ab9ab8b762e 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -1905,7 +1905,7 @@ SfxHelpTextWindow_Impl::SfxHelpTextWindow_Impl( SfxHelpWindow_Impl* pParent ) :
InitToolBoxImages();
aToolBox->Show();
- InitOnStartupBox( false );
+ InitOnStartupBox();
aOnStartupCB->SetClickHdl( LINK( this, SfxHelpTextWindow_Impl, CheckHdl ) );
aSelectIdle.SetIdleHdl( LINK( this, SfxHelpTextWindow_Impl, SelectHdl ) );
@@ -2001,7 +2001,7 @@ void SfxHelpTextWindow_Impl::InitToolBoxImages()
}
-void SfxHelpTextWindow_Impl::InitOnStartupBox( bool bOnlyText )
+void SfxHelpTextWindow_Impl::InitOnStartupBox()
{
sCurrentFactory = SfxHelp::GetCurrentModuleIdentifier();
@@ -2078,18 +2078,15 @@ void SfxHelpTextWindow_Impl::InitOnStartupBox( bool bOnlyText )
SetOnStartupBoxPosition();
}
- if ( !bOnlyText )
- {
- // set position of the checkbox
- Size a3Size = LogicToPixel( Size( 3, 3 ), MAP_APPFONT );
- Size aTBSize = aToolBox->GetSizePixel();
- Size aCBSize = aOnStartupCB->GetSizePixel();
- Point aPnt = aToolBox->GetPosPixel();
- aPnt.X() += aTBSize.Width() + a3Size.Width();
- aPnt.Y() += ( ( aTBSize.Height() - aCBSize.Height() ) / 2 );
- aOnStartupCB->SetPosPixel( aPnt );
- nMinPos = aPnt.X();
- }
+ // set position of the checkbox
+ Size a3Size = LogicToPixel( Size( 3, 3 ), MAP_APPFONT );
+ Size aTBSize = aToolBox->GetSizePixel();
+ Size aCBSize = aOnStartupCB->GetSizePixel();
+ Point aPnt = aToolBox->GetPosPixel();
+ aPnt.X() += aTBSize.Width() + a3Size.Width();
+ aPnt.Y() += ( ( aTBSize.Height() - aCBSize.Height() ) / 2 );
+ aOnStartupCB->SetPosPixel( aPnt );
+ nMinPos = aPnt.X();
}
}
diff --git a/sfx2/source/appl/newhelp.hxx b/sfx2/source/appl/newhelp.hxx
index 464e2b36ee43..9b9d43495a68 100644
--- a/sfx2/source/appl/newhelp.hxx
+++ b/sfx2/source/appl/newhelp.hxx
@@ -444,7 +444,7 @@ private:
bool HasSelection() const;
void InitToolBoxImages();
- void InitOnStartupBox( bool bOnlyText );
+ void InitOnStartupBox();
void SetOnStartupBoxPosition();
css::uno::Reference< css::i18n::XBreakIterator >
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 89601b84317c..b343050e65ea 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -295,7 +295,7 @@ bool DropListBox_Impl::Notify( NotifyEvent& rNEvt )
{
if( pDialog->bCanDel && KEY_DELETE == rKeyCode.GetCode())
{
- pDialog->DeleteHdl( nullptr );
+ pDialog->DeleteHdl();
bRet = true;
}
else if( KEY_RETURN == rKeyCode.GetCode())
@@ -1857,7 +1857,7 @@ IMPL_LINK_TYPED( SfxCommonTemplateDialog_Impl, DropHdl, StyleTreeListBox_Impl&,
}
// Handler for the New-Buttons
-void SfxCommonTemplateDialog_Impl::NewHdl(void *)
+void SfxCommonTemplateDialog_Impl::NewHdl()
{
if ( nActFamily != 0xffff && (pTreeBox || aFmtLb->GetSelectionCount() <= 1))
{
@@ -1892,7 +1892,7 @@ void SfxCommonTemplateDialog_Impl::NewHdl(void *)
}
// Handler for the edit-Buttons
-void SfxCommonTemplateDialog_Impl::EditHdl(void *)
+void SfxCommonTemplateDialog_Impl::EditHdl()
{
if(IsInitialized() && HasSelectedStyle())
{
@@ -1915,7 +1915,7 @@ void SfxCommonTemplateDialog_Impl::EditHdl(void *)
}
// Handler for the Delete-Buttons
-void SfxCommonTemplateDialog_Impl::DeleteHdl(void *)
+void SfxCommonTemplateDialog_Impl::DeleteHdl()
{
if ( IsInitialized() && HasSelectedStyle() )
{
@@ -1986,7 +1986,7 @@ void SfxCommonTemplateDialog_Impl::DeleteHdl(void *)
}
}
-void SfxCommonTemplateDialog_Impl::HideHdl(void *)
+void SfxCommonTemplateDialog_Impl::HideHdl()
{
if ( IsInitialized() && HasSelectedStyle() )
{
@@ -2004,7 +2004,7 @@ void SfxCommonTemplateDialog_Impl::HideHdl(void *)
}
}
-void SfxCommonTemplateDialog_Impl::ShowHdl(void *)
+void SfxCommonTemplateDialog_Impl::ShowHdl()
{
if ( IsInitialized() && HasSelectedStyle() )
@@ -2145,11 +2145,11 @@ IMPL_LINK_TYPED( SfxCommonTemplateDialog_Impl, MenuSelectHdl, Menu*, pMenu, bool
IMPL_LINK_NOARG_TYPED( SfxCommonTemplateDialog_Impl, MenuSelectAsyncHdl, void*, void )
{
switch(nLastItemId) {
- case ID_NEW: NewHdl(nullptr); break;
- case ID_EDIT: EditHdl(nullptr); break;
- case ID_DELETE: DeleteHdl(nullptr); break;
- case ID_HIDE: HideHdl(nullptr); break;
- case ID_SHOW: ShowHdl(nullptr); break;
+ case ID_NEW: NewHdl(); break;
+ case ID_EDIT: EditHdl(); break;
+ case ID_DELETE: DeleteHdl(); break;
+ case ID_HIDE: HideHdl(); break;
+ case ID_SHOW: ShowHdl(); break;
}
}
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index a10bf5bc7cbd..df0d7c96c62e 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -637,7 +637,7 @@ const OUString& SfxMedium::GetPhysicalName() const
void SfxMedium::CreateFileStream()
{
- ForceSynchronStream_Impl( true );
+ ForceSynchronStream_Impl();
GetInStream();
if( pImp->m_pInStream )
{
@@ -3131,13 +3131,13 @@ bool SfxMedium::IsExpired() const
}
-void SfxMedium::ForceSynchronStream_Impl( bool bForce )
+void SfxMedium::ForceSynchronStream_Impl()
{
if( pImp->m_pInStream )
{
SvLockBytes* pBytes = pImp->m_pInStream->GetLockBytes();
if( pBytes )
- pBytes->SetSynchronMode( bForce );
+ pBytes->SetSynchronMode( true/*bForce*/ );
}
}
@@ -3303,7 +3303,7 @@ bool SfxMedium::TransferVersionList_Impl( SfxMedium& rMedium )
return false;
}
-void SfxMedium::SaveVersionList_Impl( bool /*bUseXML*/ )
+void SfxMedium::SaveVersionList_Impl()
{
if ( GetStorage().is() )
{
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index a6dad472493d..7f6d50c9eeb8 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -302,7 +302,7 @@ public:
bool renameGroup( const OUString& rOldName,
const OUString& rNewName );
- void update( bool bUpdateNow );
+ void update();
void doUpdate();
void finished() { mpUpdater = nullptr; }
};
@@ -465,7 +465,7 @@ void SfxDocTplService_Impl::init_Impl()
aSolarGuard.clear();
::osl::ClearableMutexGuard anotherGuard( maMutex );
- update( true );
+ update();
anotherGuard.clear();
SolarMutexGuard aSecondSolarGuard;
@@ -474,7 +474,7 @@ void SfxDocTplService_Impl::init_Impl()
}
else if ( needsUpdate() )
// the UI should be shown only on the first update
- update( true );
+ update();
}
else
{
@@ -1146,17 +1146,11 @@ void SfxDocTplService_Impl::setLocale( const lang::Locale &rLocale )
}
-void SfxDocTplService_Impl::update( bool bUpdateNow )
+void SfxDocTplService_Impl::update()
{
::osl::MutexGuard aGuard( maMutex );
- if ( bUpdateNow )
- doUpdate();
- else
- {
- mpUpdater = new Updater_Impl( this );
- mpUpdater->create();
- }
+ doUpdate();
}
@@ -2378,7 +2372,7 @@ void SAL_CALL SfxDocTplService::update()
throw( uno::RuntimeException, std::exception )
{
if ( pImp->init() )
- pImp->update( true );
+ pImp->update();
}
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 4d8b48607ca3..4b2d79d9703c 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -405,7 +405,7 @@ void SAL_CALL IFrameObject::removeVetoableChangeListener(const OUString&, const
::sal_Int16 SAL_CALL IFrameObject::execute() throw (css::uno::RuntimeException, std::exception)
{
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
- VclAbstractDialog* pDlg = pFact->CreateEditObjectDialog( nullptr, ".uno:InsertObjectFloatingFrame", mxObj );
+ VclAbstractDialog* pDlg = pFact->CreateEditObjectDialog( ".uno:InsertObjectFloatingFrame", mxObj );
if ( pDlg )
pDlg->Execute();
return 0;
diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx
index 1024dadf5687..28d972eef333 100644
--- a/sfx2/source/doc/objcont.cxx
+++ b/sfx2/source/doc/objcont.cxx
@@ -284,11 +284,10 @@ void SfxObjectShell::UpdateTime_Impl(
VclPtr<SfxDocumentInfoDialog> SfxObjectShell::CreateDocumentInfoDialog
(
- vcl::Window* pParent,
const SfxItemSet& rSet
)
{
- return VclPtr<SfxDocumentInfoDialog>::Create(pParent, rSet);
+ return VclPtr<SfxDocumentInfoDialog>::Create(nullptr, rSet);
}
diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx
index 6a291cbf2fa3..a8dd86db683f 100644
--- a/sfx2/source/doc/objmisc.cxx
+++ b/sfx2/source/doc/objmisc.cxx
@@ -1531,7 +1531,7 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon
std::unique_ptr< VclAbstractDialog > pScriptErrDlg;
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
if ( pFact )
- pScriptErrDlg.reset( pFact->CreateScriptErrorDialog( nullptr, aException ) );
+ pScriptErrDlg.reset( pFact->CreateScriptErrorDialog( aException ) );
OSL_ENSURE( pScriptErrDlg.get(), "SfxObjectShell::CallXScript: no script error dialog!" );
if ( pScriptErrDlg.get() )
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 8880f48de430..19b1072eca30 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -490,7 +490,7 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
// creating dialog is done via virtual method; application will
// add its own statistics page
- ScopedVclPtr<SfxDocumentInfoDialog> pDlg(CreateDocumentInfoDialog(nullptr, aSet));
+ ScopedVclPtr<SfxDocumentInfoDialog> pDlg(CreateDocumentInfoDialog(aSet));
if ( RET_OK == pDlg->Execute() )
{
const SfxDocumentInfoItem* pDocInfoItem = SfxItemSet::GetItem<SfxDocumentInfoItem>(pDlg->GetOutputItemSet(), SID_DOCINFO, false);
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 07a3c6dbe5c0..cfc8710804e6 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1519,13 +1519,13 @@ bool SfxObjectShell::SaveTo_Impl
// add new version information into the versionlist and save the versionlist
// the version list must have been transferred from the "old" medium before
rMedium.AddVersion_Impl( aInfo );
- rMedium.SaveVersionList_Impl( true );
+ rMedium.SaveVersionList_Impl();
bOk = PutURLContentsToVersionStream_Impl( aTmpVersionURL, xMedStorage, aInfo.Identifier );
}
}
else if ( bOk && ( pImp->bIsSaving || pImp->bPreserveVersions ) )
{
- rMedium.SaveVersionList_Impl( true );
+ rMedium.SaveVersionList_Impl();
}
}
@@ -2035,7 +2035,7 @@ bool SfxObjectShell::DoSaveCompleted( SfxMedium* pNewMed )
if( pFilter && !IsPackageStorageFormat_Impl( *pMedium ) && (pMedium->GetOpenMode() & StreamMode::WRITE ))
{
pMedium->ReOpen();
- bOk = SaveCompletedChildren( false );
+ bOk = SaveCompletedChildren();
}
else
bOk = SaveCompleted( nullptr );
@@ -3144,7 +3144,7 @@ bool SfxObjectShell::SaveAsChildren( SfxMedium& rMedium )
return bResult;
}
-bool SfxObjectShell::SaveCompletedChildren( bool bSuccess )
+bool SfxObjectShell::SaveCompletedChildren()
{
bool bResult = true;
@@ -3162,7 +3162,7 @@ bool SfxObjectShell::SaveCompletedChildren( bool bSuccess )
{
try
{
- xPersist->saveCompleted( bSuccess );
+ xPersist->saveCompleted( false/*bSuccess*/ );
}
catch( uno::Exception& )
{
@@ -3208,7 +3208,7 @@ bool SfxObjectShell::SaveCompleted( const uno::Reference< embed::XStorage >& xSt
if ( !xStorage.is() || xStorage == GetStorage() )
{
// no persistence change
- bResult = SaveCompletedChildren( false );
+ bResult = SaveCompletedChildren();
}
else
{
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index e4d949dc7aea..0535db0e0074 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -4304,7 +4304,7 @@ Reference< frame::XController2 > SAL_CALL SfxBaseModel::createViewController(
const sal_Int16 nPluginMode = aDocumentLoadArgs.getOrDefault( "PluginMode", sal_Int16( 0 ) );
if ( nPluginMode == 1 )
{
- pViewFrame->ForceOuterResize_Impl( false );
+ pViewFrame->ForceOuterResize_Impl();
pViewFrame->GetBindings().HidePopups();
SfxFrame& rFrame = pViewFrame->GetFrame();
diff --git a/sfx2/source/inc/templdgi.hxx b/sfx2/source/inc/templdgi.hxx
index d3b6deb2e096..d21d5835b766 100644
--- a/sfx2/source/inc/templdgi.hxx
+++ b/sfx2/source/inc/templdgi.hxx
@@ -237,11 +237,11 @@ protected:
virtual void ClearFamilyList() = 0;
virtual void ReplaceUpdateButtonByMenu();
- void NewHdl( void* );
- void EditHdl( void* );
- void DeleteHdl( void* );
- void HideHdl( void* );
- void ShowHdl( void* );
+ void NewHdl();
+ void EditHdl();
+ void DeleteHdl();
+ void HideHdl();
+ void ShowHdl();
bool Execute_Impl(sal_uInt16 nId, const OUString& rStr, const OUString& rRefStr,
sal_uInt16 nFamily, sal_uInt16 nMask = 0,
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index b19470bf1583..bea3126630c1 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1611,10 +1611,10 @@ SfxViewFrame* SfxViewFrame::GetParentViewFrame_Impl() const
return nullptr;
}
-void SfxViewFrame::ForceOuterResize_Impl(bool bOn)
+void SfxViewFrame::ForceOuterResize_Impl()
{
if ( !pImp->bDontOverwriteResizeInToOut )
- pImp->bResizeInToOut = !bOn;
+ pImp->bResizeInToOut = true;
}
bool SfxViewFrame::IsResizeInToOut_Impl() const