From f1639b21507c04a4dfe152776224370eef7088df Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 11 Aug 2015 08:42:00 +0200 Subject: loplugin: defaultparams Change-Id: I44772f7c26568353d02278486a8e960f40af6354 --- framework/source/fwe/helper/undomanagerhelper.cxx | 8 ++++---- framework/source/jobs/joburl.cxx | 4 ++-- framework/source/layoutmanager/layoutmanager.cxx | 2 +- framework/source/layoutmanager/toolbarlayoutmanager.cxx | 10 +++++----- framework/source/services/autorecovery.cxx | 2 +- framework/source/uielement/addonstoolbarwrapper.cxx | 2 +- framework/source/uielement/complextoolbarcontroller.cxx | 10 +++++----- framework/source/uielement/generictoolbarcontroller.cxx | 8 ++++---- framework/source/uielement/menubarmanager.cxx | 6 +++--- framework/source/uielement/menubarmerger.cxx | 2 +- framework/source/uielement/recentfilesmenucontroller.cxx | 2 +- framework/source/uielement/togglebuttontoolbarcontroller.cxx | 2 +- framework/source/uielement/toolbarmanager.cxx | 6 +++--- framework/source/uielement/toolbarmerger.cxx | 2 +- framework/source/uielement/toolbarwrapper.cxx | 4 ++-- 15 files changed, 35 insertions(+), 35 deletions(-) diff --git a/framework/source/fwe/helper/undomanagerhelper.cxx b/framework/source/fwe/helper/undomanagerhelper.cxx index 07b911233234..61482e9a808e 100644 --- a/framework/source/fwe/helper/undomanagerhelper.cxx +++ b/framework/source/fwe/helper/undomanagerhelper.cxx @@ -544,7 +544,7 @@ namespace framework // ignore this request if the manager is locked return; - if ( i_hidden && ( rUndoManager.GetUndoActionCount( IUndoManager::CurrentLevel ) == 0 ) ) + if ( i_hidden && ( rUndoManager.GetUndoActionCount() == 0 ) ) throw EmptyUndoStackException( "can't enter a hidden context without a previous Undo action", m_rUndoManagerImplementation.getThis() @@ -611,7 +611,7 @@ namespace framework } else { - aContextEvent.UndoActionTitle = rUndoManager.GetUndoActionComment( 0, IUndoManager::CurrentLevel ); + aContextEvent.UndoActionTitle = rUndoManager.GetUndoActionComment( 0 ); notificationMethod = &XUndoManagerListener::leftContext; } @@ -684,12 +684,12 @@ namespace framework const UndoManagerEvent aEventAdd( buildEvent( i_action->getTitle() ) ); const EventObject aEventClear( getXUndoManager() ); - const bool bHadRedoActions = ( rUndoManager.GetRedoActionCount( IUndoManager::CurrentLevel ) > 0 ); + const bool bHadRedoActions = ( rUndoManager.GetRedoActionCount() > 0 ); { ::comphelper::FlagGuard aNotificationGuard( m_bAPIActionRunning ); rUndoManager.AddUndoAction( new UndoActionWrapper( i_action ) ); } - const bool bHasRedoActions = ( rUndoManager.GetRedoActionCount( IUndoManager::CurrentLevel ) > 0 ); + const bool bHasRedoActions = ( rUndoManager.GetRedoActionCount() > 0 ); aGuard.clear(); // <--- SYNCHRONIZED diff --git a/framework/source/jobs/joburl.cxx b/framework/source/jobs/joburl.cxx index 0eb7d171939c..e8a0b87d86ef 100644 --- a/framework/source/jobs/joburl.cxx +++ b/framework/source/jobs/joburl.cxx @@ -228,7 +228,7 @@ bool JobURL::implst_split( /*IN*/ const OUString& sPart , /*OUT*/ OUString& rPartArguments ) { // first search for the given identifier - bool bPartFound = (sPart.matchIgnoreAsciiCaseAsciiL(pPartIdentifier,nPartLength,0)); + bool bPartFound = (sPart.matchIgnoreAsciiCaseAsciiL(pPartIdentifier,nPartLength)); // If it exist - we can split the part and return sal_True. // Otherwhise we do nothing and return sal_False. @@ -242,7 +242,7 @@ bool JobURL::implst_split( /*IN*/ const OUString& sPart , OUString sValue = sValueAndArguments; OUString sArguments; - sal_Int32 nArgStart = sValueAndArguments.indexOf('?',0); + sal_Int32 nArgStart = sValueAndArguments.indexOf('?'); if (nArgStart!=-1) { sValue = sValueAndArguments.copy(0,nArgStart); diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index fa868d6e9a32..2cf7fb05f1e0 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -939,7 +939,7 @@ void LayoutManager::implts_backupProgressBarWrapper() { ProgressBarWrapper* pWrapper = static_cast(m_xProgressBarBackup.get()); if ( pWrapper ) - pWrapper->setStatusBar( Reference< awt::XWindow >(), false ); + pWrapper->setStatusBar( Reference< awt::XWindow >() ); } // prevent us from dispose() the m_aProgressBarElement.m_xUIElement inside implts_reset() diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 6eb25c055194..b9f2ebc70312 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -468,7 +468,7 @@ bool ToolbarLayoutManager::createToolbar( const OUString& rResourceURL ) uno::Reference< ui::XUIElementFactory > xUIElementFactory( m_xUIElementFactoryManager ); aReadLock.clear(); - implts_setToolbarCreation( true ); + implts_setToolbarCreation(); try { if ( xUIElementFactory.is() ) @@ -3540,7 +3540,7 @@ throw (uno::RuntimeException, std::exception) if( e.bFloating ) { if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal ) - pToolBox->SetAlign( WindowAlign::Top ); + pToolBox->SetAlign(); else pToolBox->SetAlign( WindowAlign::Left ); } @@ -3647,7 +3647,7 @@ throw (uno::RuntimeException, std::exception) aUIDockingElement.m_bFloating = !aUIDockingElement.m_bFloating; aUIDockingElement.m_bUserActive = true; - implts_setLayoutInProgress( true ); + implts_setLayoutInProgress(); if ( aUIDockingElement.m_bFloating ) { SolarMutexGuard aGuard; @@ -3655,7 +3655,7 @@ throw (uno::RuntimeException, std::exception) { pToolBox->SetLineCount( aUIDockingElement.m_aFloatingData.m_nLines ); if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal ) - pToolBox->SetAlign( WindowAlign::Top ); + pToolBox->SetAlign(); else pToolBox->SetAlign( WindowAlign::Left ); } @@ -3734,7 +3734,7 @@ throw (uno::RuntimeException, std::exception) if ( aUIDockingElement.m_bFloating ) { if ( aUIDockingElement.m_aFloatingData.m_bIsHorizontal ) - pToolBox->SetAlign( WindowAlign::Top ); + pToolBox->SetAlign(); else pToolBox->SetAlign( WindowAlign::Left ); } diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index bfdbcda14176..05d2fc603f44 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -1653,7 +1653,7 @@ void SAL_CALL AutoRecovery::documentEventOccured(const css::document::DocumentEv // document closed => remove temp. files and configuration entries else if ( aEvent.EventName == EVENT_ON_UNLOAD ) { - implts_deregisterDocument(xDocument, true); // sal_True => stop listening for disposing() ! + implts_deregisterDocument(xDocument); // sal_True => stop listening for disposing() ! } } diff --git a/framework/source/uielement/addonstoolbarwrapper.cxx b/framework/source/uielement/addonstoolbarwrapper.cxx index 18d3d8d32e0e..9d14b3a11a3a 100644 --- a/framework/source/uielement/addonstoolbarwrapper.cxx +++ b/framework/source/uielement/addonstoolbarwrapper.cxx @@ -127,7 +127,7 @@ void SAL_CALL AddonsToolBarWrapper::initialize( const Sequence< Any >& aArgument // Fill toolbar with container contents pToolBarManager->FillToolbar( m_aConfigData ); pToolBar->SetOutStyle( SvtMiscOptions().GetToolboxStyle() ); - pToolBar->EnableCustomize( true ); + pToolBar->EnableCustomize(); ::Size aActSize( pToolBar->GetSizePixel() ); ::Size aSize( pToolBar->CalcWindowSizePixel() ); aSize.Width() = aActSize.Width(); diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx index 9d013f4021a7..8542eb626bfb 100644 --- a/framework/source/uielement/complextoolbarcontroller.cxx +++ b/framework/source/uielement/complextoolbarcontroller.cxx @@ -154,7 +154,7 @@ throw ( RuntimeException, std::exception ) { // Boolean, treat it as checked/unchecked if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, true ); + m_pToolbar->ShowItem( m_nID ); m_pToolbar->CheckItem( m_nID, bValue ); if ( bValue ) eTri = TRISTATE_TRUE; @@ -167,14 +167,14 @@ throw ( RuntimeException, std::exception ) m_pToolbar->SetQuickHelpText( m_nID, aText ); if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, true ); + m_pToolbar->ShowItem( m_nID ); } else if ( Event.State >>= aItemState ) { eTri = TRISTATE_INDET; nItemBits |= ToolBoxItemBits::CHECKABLE; if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, true ); + m_pToolbar->ShowItem( m_nID ); } else if ( Event.State >>= aItemVisibility ) { @@ -185,11 +185,11 @@ throw ( RuntimeException, std::exception ) { executeControlCommand( aControlCommand ); if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, true ); + m_pToolbar->ShowItem( m_nID ); } else if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, true ); + m_pToolbar->ShowItem( m_nID ); m_pToolbar->SetItemState( m_nID, eTri ); m_pToolbar->SetItemBits( m_nID, nItemBits ); diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index 8b372826a869..8c578e257cfc 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -201,7 +201,7 @@ throw ( RuntimeException, std::exception ) { // Boolean, treat it as checked/unchecked if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, true ); + m_pToolbar->ShowItem( m_nID ); m_pToolbar->CheckItem( m_nID, bValue ); if ( bValue ) eTri = TRISTATE_TRUE; @@ -247,14 +247,14 @@ throw ( RuntimeException, std::exception ) } if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, true ); + m_pToolbar->ShowItem( m_nID ); } else if (( Event.State >>= aItemState ) && !m_bEnumCommand ) { eTri = TRISTATE_INDET; nItemBits |= ToolBoxItemBits::CHECKABLE; if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, true ); + m_pToolbar->ShowItem( m_nID ); } else if ( Event.State >>= aItemVisibility ) { @@ -262,7 +262,7 @@ throw ( RuntimeException, std::exception ) m_bMadeInvisible = !aItemVisibility.bVisible; } else if ( m_bMadeInvisible ) - m_pToolbar->ShowItem( m_nID, true ); + m_pToolbar->ShowItem( m_nID ); m_pToolbar->SetItemState( m_nID, eTri ); m_pToolbar->SetItemBits( m_nID, nItemBits ); diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index e28deb3eea33..a7f6c949f1ad 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -426,7 +426,7 @@ throw ( RuntimeException, std::exception ) if ( Event.State >>= bCheckmark ) { // Checkmark or RadioButton - m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, true ); + m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId ); m_pVCLMenu->CheckItem( pMenuItemHandler->nItemId, bCheckmark ); MenuItemBits nBits = m_pVCLMenu->GetItemBits( pMenuItemHandler->nItemId ); @@ -457,7 +457,7 @@ throw ( RuntimeException, std::exception ) aItemText = aTmp; } - m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, true ); + m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId ); m_pVCLMenu->SetItemText( pMenuItemHandler->nItemId, aItemText ); } else if ( Event.State >>= aVisibilityStatus ) @@ -466,7 +466,7 @@ throw ( RuntimeException, std::exception ) m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, aVisibilityStatus.bVisible ); } else - m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, true ); + m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId ); } if ( Event.Requery ) diff --git a/framework/source/uielement/menubarmerger.cxx b/framework/source/uielement/menubarmerger.cxx index 464b302d169c..e4260952a734 100644 --- a/framework/source/uielement/menubarmerger.cxx +++ b/framework/source/uielement/menubarmerger.cxx @@ -337,7 +337,7 @@ bool MenuBarMerger::ProcessFallbackOperation( if ( IsCorrectContext( rMenuItem.aContext, rModuleIdentifier )) { if ( rMenuItem.aURL == SEPARATOR_STRING ) - pCurrMenu->InsertSeparator(OString(), MENU_APPEND); + pCurrMenu->InsertSeparator(OString()); else { pCurrMenu->InsertItem(rItemId, rMenuItem.aTitle); diff --git a/framework/source/uielement/recentfilesmenucontroller.cxx b/framework/source/uielement/recentfilesmenucontroller.cxx index 61d2f0281b37..7f8cbb3d4e08 100644 --- a/framework/source/uielement/recentfilesmenucontroller.cxx +++ b/framework/source/uielement/recentfilesmenucontroller.cxx @@ -216,7 +216,7 @@ void RecentFilesMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu > if ( aURL.GetProtocol() == INetProtocol::File ) { // Do handle file URL differently: don't show the protocol, just the file name - aMenuTitle = aURL.GetLastName(INetURLObject::DECODE_WITH_CHARSET, RTL_TEXTENCODING_UTF8); + aMenuTitle = aURL.GetLastName(INetURLObject::DECODE_WITH_CHARSET); } else { diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx index 3ee98ab91f24..48f9e1ccc8ef 100644 --- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx @@ -109,7 +109,7 @@ throw (::com::sun::star::uno::RuntimeException, std::exception) OUString aLabel( m_aDropdownMenuList[i] ); aPopup.InsertItem( sal_uInt16( i+1 ), aLabel ); if ( aLabel == m_aCurrentSelection ) - aPopup.CheckItem( sal_uInt16( i+1 ), true ); + aPopup.CheckItem( sal_uInt16( i+1 ) ); else aPopup.CheckItem( sal_uInt16( i+1 ), false ); } diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 11192ed4740f..ce06e6cc3fc9 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -1304,7 +1304,7 @@ void ToolBarManager::FillToolbar( const Reference< XIndexAccess >& rItemContaine { m_pToolBar->SetItemText( nId, aString ); } - m_pToolBar->EnableItem( nId, true ); + m_pToolBar->EnableItem( nId ); m_pToolBar->SetItemState( nId, TRISTATE_FALSE ); // Fill command map. It stores all our commands and from what @@ -1773,7 +1773,7 @@ bool ToolBarManager::MenuItemAllowed( sal_uInt16 ) const { sal_uInt16 nId = aQuickCustomizationMenu.GetItemId( i ); if ( MenuItemAllowed( nId )) - pMenu->CopyItem( aQuickCustomizationMenu, i, MENU_APPEND ); + pMenu->CopyItem( aQuickCustomizationMenu, i ); } // set submenu to toolbar menu @@ -1783,7 +1783,7 @@ bool ToolBarManager::MenuItemAllowed( sal_uInt16 ) const ::PopupMenu *pItemMenu = new ::PopupMenu(); for( i=0; i< aQuickCustomizationMenu.GetPopupMenu( 1 )->GetItemCount(); i++) - pItemMenu->CopyItem( *aQuickCustomizationMenu.GetPopupMenu( 1 ), i, MENU_APPEND ); + pItemMenu->CopyItem( *aQuickCustomizationMenu.GetPopupMenu( 1 ), i ); pMenu->SetPopupMenu( 1, pItemMenu ); } diff --git a/framework/source/uielement/toolbarmerger.cxx b/framework/source/uielement/toolbarmerger.cxx index 798b76cdbec5..60c49168769d 100644 --- a/framework/source/uielement/toolbarmerger.cxx +++ b/framework/source/uielement/toolbarmerger.cxx @@ -666,7 +666,7 @@ void ToolBarMerger::CreateToolbarItem( ToolBox* pToolbar, CommandToInfoMap& rCom pToolbar->SetItemCommand( nItemId, rItem.aCommandURL ); pToolbar->SetQuickHelpText( nItemId, rItem.aLabel ); pToolbar->SetItemText( nItemId, rItem.aLabel ); - pToolbar->EnableItem( nItemId, true ); + pToolbar->EnableItem( nItemId ); pToolbar->SetItemState( nItemId, TRISTATE_FALSE ); CommandToInfoMap::iterator pIter = rCommandMap.find( rItem.aCommandURL ); diff --git a/framework/source/uielement/toolbarwrapper.cxx b/framework/source/uielement/toolbarwrapper.cxx index d1baf5c1f9ab..2456f32632e1 100644 --- a/framework/source/uielement/toolbarwrapper.cxx +++ b/framework/source/uielement/toolbarwrapper.cxx @@ -165,7 +165,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th // Fill toolbar with container contents pToolBarManager->FillToolbar( m_xConfigData ); pToolBar->SetOutStyle( SvtMiscOptions().GetToolboxStyle() ); - pToolBar->EnableCustomize( true ); + pToolBar->EnableCustomize(); ::Size aActSize( pToolBar->GetSizePixel() ); ::Size aSize( pToolBar->CalcWindowSizePixel() ); aSize.Width() = aActSize.Width(); @@ -180,7 +180,7 @@ void SAL_CALL ToolBarWrapper::initialize( const Sequence< Any >& aArguments ) th if ( pToolBar && pToolBarManager ) { pToolBar->SetOutStyle( SvtMiscOptions().GetToolboxStyle() ); - pToolBar->EnableCustomize( true ); + pToolBar->EnableCustomize(); ::Size aActSize( pToolBar->GetSizePixel() ); ::Size aSize( pToolBar->CalcWindowSizePixel() ); aSize.Width() = aActSize.Width(); -- cgit