From 8e3a77c0ef07c8dffb10a557560613f971a62a35 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 20 Apr 2016 17:16:24 +0200 Subject: loplugin:salbool: Automatic rewrite of sal_False/True Change-Id: Ie48c55954d479092ef0447711c442b760905a2b4 (cherry picked from commit f8ce00be4ea1b4f69dfe37c641001ec935f86792) --- desktop/source/app/app.cxx | 4 ++-- desktop/source/app/appinit.cxx | 2 +- desktop/source/app/dispatchwatcher.cxx | 24 +++++++++++----------- .../deployment/registry/component/dp_component.cxx | 4 ++-- .../registry/executable/dp_executable.cxx | 4 ++-- .../deployment/registry/package/dp_package.cxx | 2 +- desktop/source/lib/lokinteractionhandler.cxx | 2 +- desktop/source/migration/migration.cxx | 8 ++++---- 8 files changed, 25 insertions(+), 25 deletions(-) (limited to 'desktop/source') diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index cb5d5e01ad9e..543723b0e5d3 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -2529,7 +2529,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent ) // to true inside attachFrame(). But setComponent() reset this state every time ... xBackingFrame->setComponent(xBackingWin, xStartModule); xStartModule->attachFrame(xBackingFrame); - xContainerWindow->setVisible(sal_True); + xContainerWindow->setVisible(true); vcl::Window* pCompWindow = VCLUnoHelper::GetWindow(xBackingFrame->getComponentWindow()); if (pCompWindow) @@ -2775,7 +2775,7 @@ void Desktop::ShowBackingComponent(Desktop * progress) { progress->CloseSplashScreen(); } - xContainerWindow->setVisible(sal_True); + xContainerWindow->setVisible(true); } } diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx index 4f5b284d184e..105ade387159 100644 --- a/desktop/source/app/appinit.cxx +++ b/desktop/source/app/appinit.cxx @@ -175,7 +175,7 @@ class enable Sequence m_aSeq; public: enable() : m_aSeq(1) { - m_aSeq[0] <<= sal_True; + m_aSeq[0] <<= true; } void operator() (const AcceptorMap::value_type& val) { if (val.second.is()) { diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx index 38cd63620289..dd580ca0d017 100644 --- a/desktop/source/app/dispatchwatcher.cxx +++ b/desktop/source/app/dispatchwatcher.cxx @@ -299,16 +299,16 @@ bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ { // documents opened for printing are opened readonly because they must be opened as a new document and this // document could be open already - aArgs[1].Value <<= sal_True; + aArgs[1].Value <<= true; // always open a new document for printing, because it must be disposed afterwards - aArgs[2].Value <<= sal_True; + aArgs[2].Value <<= true; // printing is done in a hidden view - aArgs[3].Value <<= sal_True; + aArgs[3].Value <<= true; // load document for printing without user interaction - aArgs[4].Value <<= sal_True; + aArgs[4].Value <<= true; // hidden documents should never be put into open tasks aTarget = "_blank"; @@ -375,7 +375,7 @@ bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ // window!! Sequence < PropertyValue > aArgs2(1); aArgs2[0].Name = "SynchronMode"; - aArgs2[0].Value <<= sal_True; + aArgs2[0].Value <<= true; Reference < XNotifyingDispatch > xDisp( xDispatcher, UNO_QUERY ); if ( xDisp.is() ) xDisp->dispatchWithNotification( aURL, aArgs2, DispatchWatcher::GetDispatchWatcher() ); @@ -406,9 +406,9 @@ bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ aArgs.realloc( nIndex+1 ); aArgs[nIndex].Name = aAsTemplateArg; if ( aDispatchRequest.aRequestType == REQUEST_FORCENEW ) - aArgs[nIndex].Value <<= sal_True; + aArgs[nIndex].Value <<= true; else - aArgs[nIndex].Value <<= sal_False; + aArgs[nIndex].Value <<= false; } // if we are called in viewmode, open document read-only @@ -416,7 +416,7 @@ bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ sal_Int32 nIndex = aArgs.getLength(); aArgs.realloc(nIndex+1); aArgs[nIndex].Name = "ReadOnly"; - aArgs[nIndex].Value <<= sal_True; + aArgs[nIndex].Value <<= true; } // if we are called with -start set Start in mediadescriptor @@ -424,7 +424,7 @@ bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ sal_Int32 nIndex = aArgs.getLength(); aArgs.realloc(nIndex+1); aArgs[nIndex].Name = "StartPresentation"; - aArgs[nIndex].Value <<= sal_True; + aArgs[nIndex].Value <<= true; } // Force input filter, if possible @@ -546,7 +546,7 @@ bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ sal_Int32 nFilterOptionsIndex = aFilter.indexOf(':'); Sequence conversionProperties( 0 < nFilterOptionsIndex ? 3 : 2 ); conversionProperties[0].Name = "Overwrite"; - conversionProperties[0].Value <<= sal_True; + conversionProperties[0].Value <<= true; conversionProperties[1].Name = "FilterName"; if( 0 < nFilterOptionsIndex ) @@ -687,7 +687,7 @@ bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ { Reference < XCloseable > xClose( xDoc, UNO_QUERY ); if ( xClose.is() ) - xClose->close( sal_True ); + xClose->close( true ); else { Reference < XComponent > xComp( xDoc, UNO_QUERY ); @@ -712,7 +712,7 @@ bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ aArgs[0].Name = "Referer"; aArgs[0].Value <<= OUString("private:OpenEvent"); aArgs[1].Name = "SynchronMode"; - aArgs[1].Value <<= sal_True; + aArgs[1].Value <<= true; for ( size_t n = 0; n < aDispatches.size(); n++ ) { diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index f1859f92e236..4cee59d0d693 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -1630,8 +1630,8 @@ BackendImpl::OtherPlatformPackageImpl::isRegistered_( ::rtl::Reference const& /* abortChannel */, Reference const& /* xCmdEnv */ ) { - return beans::Optional >(sal_True, - beans::Ambiguous(sal_True, sal_False)); + return beans::Optional >(true, + beans::Ambiguous(true, false)); } void diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx index b0719d61196b..f4a9ad2f42ad 100644 --- a/desktop/source/deployment/registry/executable/dp_executable.cxx +++ b/desktop/source/deployment/registry/executable/dp_executable.cxx @@ -214,9 +214,9 @@ BackendImpl::ExecutablePackageImpl::isRegistered_( { bool registered = getMyBackend()->hasActiveEntry(getURL()); return beans::Optional< beans::Ambiguous >( - sal_True /* IsPresent */, + true /* IsPresent */, beans::Ambiguous( - registered, sal_False /* IsAmbiguous */ ) ); + registered, false /* IsAmbiguous */ ) ); } void BackendImpl::ExecutablePackageImpl::processPackage_( diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 51fc2ea6bd73..783026f40da7 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -765,7 +765,7 @@ sal_Bool BackendImpl::PackageImpl::checkDependencies( throw deployment::ExtensionRemovedException(); DescriptionInfoset info = getDescriptionInfoset(); if (!info.hasDescription()) - return sal_True; + return true; return checkDependencies(xCmdEnv, info); } diff --git a/desktop/source/lib/lokinteractionhandler.cxx b/desktop/source/lib/lokinteractionhandler.cxx index 8857b3fcd830..d37405b6c669 100644 --- a/desktop/source/lib/lokinteractionhandler.cxx +++ b/desktop/source/lib/lokinteractionhandler.cxx @@ -322,7 +322,7 @@ sal_Bool SAL_CALL LOKInteractionHandler::handleInteractionRequest( // TODO: perform more interactions 'for real' like the above selectApproved(rContinuations); - return sal_True; + return true; } void LOKInteractionHandler::SetPassword(char const*const pPassword) diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx index ce177087a227..a82e18355c33 100644 --- a/desktop/source/migration/migration.cxx +++ b/desktop/source/migration/migration.cxx @@ -293,7 +293,7 @@ bool MigrationImpl::doMigration() OUString sToolbarName = vModulesInfo[i].m_vToolbars[j]; OUString sToolbarResourceURL = sToolbarResourcePre + sToolbarName; - uno::Reference< container::XIndexContainer > xOldVersionToolbarSettings(xOldCfgManager->getSettings(sToolbarResourceURL, sal_True), uno::UNO_QUERY); + uno::Reference< container::XIndexContainer > xOldVersionToolbarSettings(xOldCfgManager->getSettings(sToolbarResourceURL, true), uno::UNO_QUERY); uno::Reference< container::XIndexContainer > xNewVersionToolbarSettings = aNewVersionUIInfo.getNewToolbarSettings(vModulesInfo[i].sModuleShortName, sToolbarName); OUString sParent; compareOldAndNewConfig(sParent, xOldVersionToolbarSettings, xNewVersionToolbarSettings, sToolbarResourceURL); @@ -340,7 +340,7 @@ void MigrationImpl::setMigrationCompleted() try { uno::Reference< XPropertySet > aPropertySet(getConfigAccess("org.openoffice.Setup/Office", true), uno::UNO_QUERY_THROW); - aPropertySet->setPropertyValue("MigrationCompleted", uno::makeAny(sal_True)); + aPropertySet->setPropertyValue("MigrationCompleted", uno::makeAny(true)); uno::Reference< XChangesBatch >(aPropertySet, uno::UNO_QUERY_THROW)->commitChanges(); } catch (...) @@ -1333,7 +1333,7 @@ void NewVersionUIInfo::init(const ::std::vector< MigrationModuleInfo >& vModules if (vModulesInfo[i].bHasMenubar) { m_lNewVersionMenubarSettingsSeq[i].Name = vModulesInfo[i].sModuleShortName; - m_lNewVersionMenubarSettingsSeq[i].Value <<= xCfgManager->getSettings(sMenubarResourceURL, sal_True); + m_lNewVersionMenubarSettingsSeq[i].Value <<= xCfgManager->getSettings(sMenubarResourceURL, true); } sal_Int32 nToolbars = vModulesInfo[i].m_vToolbars.size(); @@ -1346,7 +1346,7 @@ void NewVersionUIInfo::init(const ::std::vector< MigrationModuleInfo >& vModules OUString sToolbarResourceURL = sToolbarResourcePre + sToolbarName; lPropSeq[j].Name = sToolbarName; - lPropSeq[j].Value <<= xCfgManager->getSettings(sToolbarResourceURL, sal_True); + lPropSeq[j].Value <<= xCfgManager->getSettings(sToolbarResourceURL, true); } m_lNewVersionToolbarSettingsSeq[i].Name = vModulesInfo[i].sModuleShortName; -- cgit