diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-04-20 17:16:42 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-04-20 17:25:40 +0200 |
commit | bc9047540a9c6c961bd686c61bed13ce18a28edb (patch) | |
tree | 99a6cadc2fc2273d368e3f4dde86f00afa2b2359 | |
parent | 9ad66e5ae924b22c589601085c0a7355073a1daf (diff) |
loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I8542bfaf9e27792369617c44258ddcc393e490a2
-rw-r--r-- | embeddedobj/source/commonembedding/embedobj.cxx | 6 | ||||
-rw-r--r-- | embeddedobj/source/commonembedding/persistence.cxx | 32 | ||||
-rw-r--r-- | embeddedobj/source/general/docholder.cxx | 26 | ||||
-rw-r--r-- | embeddedobj/source/general/dummyobject.cxx | 6 | ||||
-rw-r--r-- | embeddedobj/source/general/intercept.cxx | 16 | ||||
-rw-r--r-- | embeddedobj/source/msole/oleembed.cxx | 16 | ||||
-rw-r--r-- | embeddedobj/source/msole/olepersist.cxx | 6 | ||||
-rw-r--r-- | embeddedobj/source/msole/ownview.cxx | 10 |
8 files changed, 59 insertions, 59 deletions
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx index ce2549eb7711..0d96af96518e 100644 --- a/embeddedobj/source/commonembedding/embedobj.cxx +++ b/embeddedobj/source/commonembedding/embedobj.cxx @@ -110,7 +110,7 @@ void OCommonEmbeddedObject::Deactivate() m_pDocHolder->CloseFrame(); - xClientSite->visibilityChanged( sal_False ); + xClientSite->visibilityChanged( false ); } @@ -269,7 +269,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) // create frame and load document in the frame m_pDocHolder->Show(); - m_xClientSite->visibilityChanged( sal_True ); + m_xClientSite->visibilityChanged( true ); m_nObjectState = nNextState; } else @@ -287,7 +287,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState ) if ( !xInplaceClient.is() ) throw uno::RuntimeException(); - m_xClientSite->visibilityChanged( sal_True ); + m_xClientSite->visibilityChanged( true ); xInplaceClient->deactivatedInplace(); Deactivate(); diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx index 525b49c76ac8..036dc026735d 100644 --- a/embeddedobj/source/commonembedding/persistence.cxx +++ b/embeddedobj/source/commonembedding/persistence.cxx @@ -96,7 +96,7 @@ uno::Sequence< beans::PropertyValue > addAsTemplate( const uno::Sequence< beans: aResult[nInd].Name = aOrig[nInd].Name; if ( aResult[nInd].Name == "AsTemplate" ) { - aResult[nInd].Value <<= sal_True; + aResult[nInd].Value <<= true; bAsTemplateSet = true; } else @@ -107,7 +107,7 @@ uno::Sequence< beans::PropertyValue > addAsTemplate( const uno::Sequence< beans: { aResult.realloc( nLength + 1 ); aResult[nLength].Name = "AsTemplate"; - aResult[nLength].Value <<= sal_True; + aResult[nLength].Value <<= true; } return aResult; @@ -222,7 +222,7 @@ static void SetDocToEmbedded( const uno::Reference< frame::XModel >& rDocument, { uno::Sequence< beans::PropertyValue > aSeq( 1 ); aSeq[0].Name = "SetEmbedded"; - aSeq[0].Value <<= sal_True; + aSeq[0].Value <<= true; rDocument->attachResource( OUString(), aSeq ); if ( !aModuleName.isEmpty() ) @@ -352,7 +352,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::InitNewDocument_Impl() { try { - xCloseable->close( sal_True ); + xCloseable->close( true ); } catch( const uno::Exception& ) { @@ -423,7 +423,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadLink_Impl() { try { - xCloseable->close( sal_True ); + xCloseable->close( true ); } catch( const uno::Exception& ) { @@ -549,7 +549,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::LoadDocumentFromStorag { try { - xCloseable->close( sal_True ); + xCloseable->close( true ); } catch( const uno::Exception& ) { @@ -718,7 +718,7 @@ void OCommonEmbeddedObject::SwitchDocToStorage_Impl( const uno::Reference< docum uno::Reference< util::XModifiable > xModif( xDoc, uno::UNO_QUERY ); if ( xModif.is() ) - xModif->setModified( sal_False ); + xModif->setModified( false ); if ( m_xRecoveryStorage.is() ) m_xRecoveryStorage.clear(); @@ -841,7 +841,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateDocFromMediaDesc { try { - xCloseable->close( sal_True ); + xCloseable->close( true ); } catch( const uno::Exception& ) { @@ -905,7 +905,7 @@ uno::Reference< util::XCloseable > OCommonEmbeddedObject::CreateTempDocFromLink_ aTempMediaDescr[2].Name = "FilterName"; aTempMediaDescr[2].Value <<= GetFilterName( nStorageFormat ); aTempMediaDescr[3].Name = "AsTemplate"; - aTempMediaDescr[3].Value <<= sal_True; + aTempMediaDescr[3].Value <<= true; } else { @@ -973,14 +973,14 @@ void SAL_CALL OCommonEmbeddedObject::setPersistentEntry( // saveCompleted is expected, handle it accordingly if ( m_xNewParentStorage == xStorage && m_aNewEntryName.equals( sEntName ) ) { - saveCompleted( sal_True ); + saveCompleted( true ); return; } // if a completely different entry is provided, switch first back to the old persistence in saveCompleted // and then switch to the target persistence bool bSwitchFurther = ( m_xParentStorage != xStorage || !m_aEntryName.equals( sEntName ) ); - saveCompleted( sal_False ); + saveCompleted( false ); if ( !bSwitchFurther ) return; } @@ -1474,7 +1474,7 @@ void SAL_CALL OCommonEmbeddedObject::saveCompleted( sal_Bool bUseNew ) uno::Reference< util::XModifiable > xModif( m_pDocHolder->GetComponent(), uno::UNO_QUERY ); if ( xModif.is() ) - xModif->setModified( sal_False ); + xModif->setModified( false ); PostEvent_Impl( "OnSaveAsDone"); } @@ -1523,9 +1523,9 @@ sal_Bool SAL_CALL OCommonEmbeddedObject::hasEntry() static_cast< ::cppu::OWeakObject* >(this) ); if ( m_xObjectStorage.is() ) - return sal_True; + return true; - return sal_False; + return false; } @@ -1643,7 +1643,7 @@ void SAL_CALL OCommonEmbeddedObject::storeOwn() uno::Reference< util::XModifiable > xModif( m_pDocHolder->GetComponent(), uno::UNO_QUERY ); if ( xModif.is() ) - xModif->setModified( sal_False ); + xModif->setModified( false ); PostEvent_Impl( "OnSaveDone" ); } @@ -1875,7 +1875,7 @@ void SAL_CALL OCommonEmbeddedObject::breakLink( const uno::Reference< embed::XSt throw uno::RuntimeException(); try { - xModif->setModified( sal_True ); + xModif->setModified( true ); } catch( const uno::Exception& ) {} diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx index 843106ad74b5..f8b46766037f 100644 --- a/embeddedobj/source/general/docholder.cxx +++ b/embeddedobj/source/general/docholder.cxx @@ -162,11 +162,11 @@ DocumentHolder::DocumentHolder( const uno::Reference< uno::XComponentContext >& beans::NamedValue aArg; aArg.Name = "TopWindow"; - aArg.Value <<= sal_True; + aArg.Value <<= true; m_aOutplaceFrameProps[0] <<= aArg; aArg.Name = "MakeVisible"; - aArg.Value <<= sal_False; + aArg.Value <<= false; m_aOutplaceFrameProps[1] <<= aArg; uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create( m_xContext ); @@ -221,7 +221,7 @@ void DocumentHolder::CloseFrame() m_xFrame,uno::UNO_QUERY ); if( xCloseable.is() ) try { - xCloseable->close( sal_True ); + xCloseable->close( true ); } catch( const uno::Exception& ) { } @@ -503,7 +503,7 @@ bool DocumentHolder::ShowInplace( const uno::Reference< awt::XWindowPeer >& xPar PlaceFrame( aRectangleToShow ); if ( m_xHatchWindow.is() ) - m_xHatchWindow->setVisible( sal_True ); + m_xHatchWindow->setVisible( true ); return true; } @@ -533,7 +533,7 @@ uno::Reference< container::XIndexAccess > DocumentHolder::RetrieveOwnMenu_Impl() { xResult = xUIConfigManager->getSettings( "private:resource/menubar/menubar", - sal_False ); + false ); } } catch( const uno::Exception& ) @@ -555,7 +555,7 @@ uno::Reference< container::XIndexAccess > DocumentHolder::RetrieveOwnMenu_Impl() uno::UNO_QUERY_THROW ); xResult = xModUIConfMan->getSettings( "private:resource/menubar/menubar", - sal_False ); + false ); } } @@ -654,7 +654,7 @@ bool DocumentHolder::MergeMenus_Impl( const uno::Reference< css::frame::XLayoutM uno::Reference< css::ui::XUIElementSettings > xUISettings( xContLM->getElement( "private:resource/menubar/menubar" ), uno::UNO_QUERY_THROW ); - uno::Reference< container::XIndexAccess > xContMenu = xUISettings->getSettings( sal_True ); + uno::Reference< container::XIndexAccess > xContMenu = xUISettings->getSettings( true ); if ( !xContMenu.is() ) throw uno::RuntimeException(); @@ -716,7 +716,7 @@ bool DocumentHolder::ShowUI( const uno::Reference< css::frame::XLayoutManager >& bUnlock = true; // by unlocking the LM each layout change will now resize the containers window; pending layouts will be processed now - xOwnLM->setVisible( sal_True ); + xOwnLM->setVisible( true ); uno::Reference< frame::XFramesSupplier > xSupp( m_xFrame->getCreator(), uno::UNO_QUERY ); if ( xSupp.is() ) @@ -744,7 +744,7 @@ bool DocumentHolder::ShowUI( const uno::Reference< css::frame::XLayoutManager >& // remove control about containers window from own LM if ( bLock ) xOwnLM->lock(); - xOwnLM->setVisible( sal_False ); + xOwnLM->setVisible( false ); xOwnLM->setDockingAreaAcceptor( uno::Reference< css::ui::XDockingAreaAcceptor >() ); // unmerge menu @@ -757,7 +757,7 @@ bool DocumentHolder::ShowUI( const uno::Reference< css::frame::XLayoutManager >& { // reestablish control of containers window xContainerLM->setDockingAreaAcceptor( xDocAreaAcc ); - xContainerLM->setVisible( sal_True ); + xContainerLM->setVisible( true ); if ( bUnlock ) xContainerLM->unlock(); } @@ -795,13 +795,13 @@ bool DocumentHolder::HideUI( const uno::Reference< css::frame::XLayoutManager >& xOwnLM->setDockingAreaAcceptor( uno::Reference < ui::XDockingAreaAcceptor >() ); xOwnLM->lock(); - xOwnLM->setVisible( sal_False ); + xOwnLM->setVisible( false ); uno::Reference< css::frame::XMenuBarMergingAcceptor > xMerge( xOwnLM, uno::UNO_QUERY_THROW ); xMerge->removeMergedMenuBar(); xContainerLM->setDockingAreaAcceptor( xDocAreaAcc ); - xContainerLM->setVisible( sal_True ); + xContainerLM->setVisible( true ); xContainerLM->unlock(); xContainerLM->doLayout(); @@ -903,7 +903,7 @@ uno::Reference< frame::XFrame > DocumentHolder::GetDocFrame() xHWindow->setPosSize( aWorkRect.Left(), aWorkRect.Top(), aWorkRect.GetWidth(), aWorkRect.GetHeight(), awt::PosSize::POSSIZE ); } - xHWindow->setVisible( sal_True ); + xHWindow->setVisible( true ); } } catch ( const uno::Exception& ) diff --git a/embeddedobj/source/general/dummyobject.cxx b/embeddedobj/source/general/dummyobject.cxx index 9af31b67c495..8566ebbdca45 100644 --- a/embeddedobj/source/general/dummyobject.cxx +++ b/embeddedobj/source/general/dummyobject.cxx @@ -463,9 +463,9 @@ sal_Bool SAL_CALL ODummyEmbeddedObject::hasEntry() static_cast< ::cppu::OWeakObject* >(this) ); if ( !m_aEntryName.isEmpty() ) - return sal_True; + return true; - return sal_False; + return false; } @@ -517,7 +517,7 @@ sal_Bool SAL_CALL ODummyEmbeddedObject::isReadonly() static_cast< ::cppu::OWeakObject* >(this) ); // this object can not be changed - return sal_True; + return true; } diff --git a/embeddedobj/source/general/intercept.cxx b/embeddedobj/source/general/intercept.cxx index 7e77d3735c18..807502c1a8a0 100644 --- a/embeddedobj/source/general/intercept.cxx +++ b/embeddedobj/source/general/intercept.cxx @@ -100,7 +100,7 @@ Interceptor::dispatch( { if ( aNewArgs[nInd].Name == "SaveTo" ) { - aNewArgs[nInd].Value <<= sal_True; + aNewArgs[nInd].Value <<= true; break; } nInd++; @@ -110,7 +110,7 @@ Interceptor::dispatch( { aNewArgs.realloc( nInd + 1 ); aNewArgs[nInd].Name = "SaveTo"; - aNewArgs[nInd].Value <<= sal_True; + aNewArgs[nInd].Value <<= true; } uno::Reference< frame::XDispatch > xDispatch = m_xSlaveDispatchProvider->queryDispatch( @@ -138,8 +138,8 @@ Interceptor::addStatusListener( frame::FeatureStateEvent aStateEvent; aStateEvent.FeatureURL.Complete = m_aInterceptedURL[0]; aStateEvent.FeatureDescriptor = "Update"; - aStateEvent.IsEnabled = sal_True; - aStateEvent.Requery = sal_False; + aStateEvent.IsEnabled = true; + aStateEvent.Requery = false; aStateEvent.State <<= ( "($1) " + m_pDocHolder->GetTitle() ); Control->statusChanged(aStateEvent); @@ -162,8 +162,8 @@ Interceptor::addStatusListener( frame::FeatureStateEvent aStateEvent; aStateEvent.FeatureURL.Complete = m_aInterceptedURL[i]; aStateEvent.FeatureDescriptor = "Close and Return"; - aStateEvent.IsEnabled = sal_True; - aStateEvent.Requery = sal_False; + aStateEvent.IsEnabled = true; + aStateEvent.Requery = false; aStateEvent.State <<= ( "($2) " + m_pDocHolder->GetTitle() ); Control->statusChanged(aStateEvent); @@ -184,8 +184,8 @@ Interceptor::addStatusListener( frame::FeatureStateEvent aStateEvent; aStateEvent.FeatureURL.Complete = m_aInterceptedURL[5]; aStateEvent.FeatureDescriptor = "SaveCopyTo"; - aStateEvent.IsEnabled = sal_True; - aStateEvent.Requery = sal_False; + aStateEvent.IsEnabled = true; + aStateEvent.Requery = false; aStateEvent.State <<= (OUString( "($3)")); Control->statusChanged(aStateEvent); diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 6d42cabcebdd..ee78fae1c858 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -299,7 +299,7 @@ bool OleEmbeddedObject::TryToConvertToOOo() uno::Reference< frame::XModel > xModel( xDocument, uno::UNO_QUERY_THROW ); uno::Sequence< beans::PropertyValue > aSeq( 1 ); aSeq[0].Name = "SetEmbedded"; - aSeq[0].Value <<= sal_True; + aSeq[0].Value <<= true; xModel->attachResource( OUString(), aSeq ); // load the model from the stream @@ -307,7 +307,7 @@ bool OleEmbeddedObject::TryToConvertToOOo() aArgs[0].Name = "HierarchicalDocumentName"; aArgs[0].Value <<= m_aEntryName; aArgs[1].Name = "ReadOnly"; - aArgs[1].Value <<= sal_True; + aArgs[1].Value <<= true; aArgs[2].Name = "FilterName"; aArgs[2].Value <<= m_aFilterName; aArgs[3].Name = "URL"; @@ -321,7 +321,7 @@ bool OleEmbeddedObject::TryToConvertToOOo() // the model is successfully loaded, create a new storage and store the model to the storage uno::Reference< embed::XStorage > xTmpStorage = CreateTemporarySubstorage( aStorageName ); xStorDoc->storeToStorage( xTmpStorage, uno::Sequence< beans::PropertyValue >() ); - xDocument->close( sal_True ); + xDocument->close( true ); uno::Reference< beans::XPropertySet > xStorProps( xTmpStorage, uno::UNO_QUERY_THROW ); OUString aMediaType; xStorProps->getPropertyValue("MediaType") >>= aMediaType; @@ -385,7 +385,7 @@ bool OleEmbeddedObject::TryToConvertToOOo() catch ( const uno::Exception& ) { try { - close( sal_True ); + close( true ); } catch( const uno::Exception& ) {} m_xParentStorage->dispose(); // ??? the storage has information loss, it should be closed without committing! @@ -400,7 +400,7 @@ bool OleEmbeddedObject::TryToConvertToOOo() catch( const uno::Exception& ) { try { - close( sal_True ); + close( true ); } catch( const uno::Exception& ) {} throw uno::RuntimeException(); // the repairing is not possible @@ -725,7 +725,7 @@ namespace if (bCopied) { xNativeTempFile->setPropertyValue("RemoveFile", - uno::makeAny(sal_False)); + uno::makeAny(false)); uno::Any aUrl = xNativeTempFile->getPropertyValue("Uri"); aUrl >>= sUrl; @@ -734,12 +734,12 @@ namespace uno::Reference < ucb::XSimpleFileAccess3 > xSimpleFileAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(xFactory) ) ); - xSimpleFileAccess->setReadOnly(sUrl, sal_True); + xSimpleFileAccess->setReadOnly(sUrl, true); } else { xNativeTempFile->setPropertyValue("RemoveFile", - uno::makeAny(sal_True)); + uno::makeAny(true)); } #else (void) xFactory; diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index fd705ae028fa..f713f97ea54a 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.cxx @@ -89,7 +89,7 @@ OUString GetNewTempFileURL_Impl( const uno::Reference< lang::XMultiServiceFactor uno::UNO_QUERY_THROW ); try { - xTempFile->setPropertyValue("RemoveFile", uno::makeAny( sal_False ) ); + xTempFile->setPropertyValue("RemoveFile", uno::makeAny( false ) ); uno::Any aUrl = xTempFile->getPropertyValue("Uri"); aUrl >>= aResult; } @@ -1672,9 +1672,9 @@ sal_Bool SAL_CALL OleEmbeddedObject::hasEntry() static_cast< ::cppu::OWeakObject* >(this) ); if ( m_xObjectStream.is() ) - return sal_True; + return true; - return sal_False; + return false; } diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx index 53e2d0b20225..b81627ff224a 100644 --- a/embeddedobj/source/msole/ownview.cxx +++ b/embeddedobj/source/msole/ownview.cxx @@ -116,14 +116,14 @@ bool OwnView_Impl::CreateModelFromURL( const OUString& aFileURL ) aArgs[0].Value <<= aFileURL; aArgs[1].Name = "ReadOnly"; - aArgs[1].Value <<= sal_True; + aArgs[1].Value <<= true; aArgs[2].Name = "InteractionHandler"; aArgs[2].Value <<= uno::Reference< task::XInteractionHandler >( static_cast< ::cppu::OWeakObject* >( new DummyHandler_Impl() ), uno::UNO_QUERY ); aArgs[3].Name = "DontEdit"; - aArgs[3].Value <<= sal_True; + aArgs[3].Value <<= true; if ( !m_aFilterName.isEmpty() ) { @@ -216,7 +216,7 @@ OUString OwnView_Impl::GetFilterNameFromExtentionAndInStream( aArgs[2].Value <<= aTypeName; } - aTypeName = xTypeDetection->queryTypeByDescriptor( aArgs, sal_True ); + aTypeName = xTypeDetection->queryTypeByDescriptor( aArgs, true ); OUString aFilterName; for ( sal_Int32 nInd = 0; nInd < aArgs.getLength(); nInd++ ) @@ -264,7 +264,7 @@ bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io::XI throw uno::RuntimeException(); try { - xNativeTempFile->setPropertyValue("RemoveFile", uno::makeAny( sal_False ) ); + xNativeTempFile->setPropertyValue("RemoveFile", uno::makeAny( false ) ); uno::Any aUrl = xNativeTempFile->getPropertyValue("Uri"); aUrl >>= aNativeTempURL; } @@ -562,7 +562,7 @@ void OwnView_Impl::Close() xCloseable->removeCloseListener( uno::Reference< util::XCloseListener >( static_cast< ::cppu::OWeakObject* >( this ), uno::UNO_QUERY ) ); - xCloseable->close( sal_True ); + xCloseable->close( true ); } } catch( uno::Exception& ) |