diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-04-23 18:30:45 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-04-23 18:39:07 +0200 |
commit | 22401181774dfb3882e7ad0335f1267d7885ff48 (patch) | |
tree | cc31d4ef17eef1e76458e47cef8675458c8719ea /sfx2 | |
parent | 6425f7ff616f9aaad8b4e279385ed3f5ab65bfe2 (diff) |
Improved loplugin:literaltoboolconversion looking into cond. exprs.
...automatic rewriter fixes
Change-Id: I6b04ca80f08f8a71ff94e309fd52f44d736751ee
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/appl/opengrf.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/filtergrouping.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 10 | ||||
-rw-r--r-- | sfx2/source/dialog/tplcitem.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/SfxDocumentMetaData.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/doctemplates.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/oleprops.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/inc/statcach.hxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/SidebarController.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/view/viewfrm2.cxx | 2 |
12 files changed, 20 insertions, 20 deletions
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 3f90d2d381e4..6a949d021a98 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -633,7 +633,7 @@ void IndexTabPage_Impl::InitializeIndex() DBG_ASSERT( aRefList.getLength() == aAnchorList.getLength(),"reference list and title list of different length" ); - const bool insert = ( ( ndx = aKeywordPair.indexOf( ';' ) ) == -1 ? sal_False : sal_True ); + const bool insert = ( ( ndx = aKeywordPair.indexOf( ';' ) ) == -1 ? false : true ); if ( insert ) { @@ -927,9 +927,9 @@ SearchTabPage_Impl::SearchTabPage_Impl(vcl::Window* pParent, SfxHelpIndexWindow_ Any aUserItem = aViewOpt.GetUserItem( USERITEM_NAME ); if ( aUserItem >>= aUserData ) { - bool bChecked = ( 1 == aUserData.getToken(0, ';').toInt32() ) ? sal_True : sal_False; + bool bChecked = ( 1 == aUserData.getToken(0, ';').toInt32() ) ? true : false; m_pFullWordsCB->Check( bChecked ); - bChecked = ( 1 == aUserData.getToken(1, ';').toInt32() ) ? sal_True : sal_False; + bChecked = ( 1 == aUserData.getToken(1, ';').toInt32() ) ? true : false; m_pScopeCB->Check( bChecked ); for ( sal_uInt16 i = 2; i < comphelper::string::getTokenCount(aUserData, ';'); ++i ) diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx index 2a533bb29ed8..f1f275dcaedd 100644 --- a/sfx2/source/appl/opengrf.cxx +++ b/sfx2/source/appl/opengrf.cxx @@ -159,7 +159,7 @@ short SvxOpenGraphicDialog::Execute() if ( nFound == USHRT_MAX ) { WarningBox aWarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, SfxResId( SvxOpenGrfErr2ResId(nImpRet) ).toString() ); - bQuitLoop = aWarningBox.Execute()==RET_RETRY ? sal_False : sal_True; + bQuitLoop = aWarningBox.Execute()==RET_RETRY ? false : true; } else { diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx index 0fd1dbcc4e6a..aa8be183d7e5 100644 --- a/sfx2/source/dialog/filtergrouping.cxx +++ b/sfx2/source/dialog/filtergrouping.cxx @@ -537,7 +537,7 @@ namespace sfx2 bool operator() ( const MapGroupEntry2GroupEntry::value_type& _rMapEntry ) { - return _rMapEntry.first == aLookingFor ? sal_True : sal_False; + return _rMapEntry.first == aLookingFor ? true : false; } }; diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 8de5c55b9ab5..cfb62890540e 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1262,7 +1262,7 @@ void SfxCommonTemplateDialog_Impl::SetWaterCanState(const SfxBoolItem *pItem) if(!bWaterDisabled) //make sure the watercan is only activated when there is (only) one selection - bWaterDisabled = (pTreeBox || aFmtLb.GetSelectionCount() <= 1) ? sal_False : sal_True; + bWaterDisabled = (pTreeBox || aFmtLb.GetSelectionCount() <= 1) ? false : true; if(pItem && !bWaterDisabled) { @@ -1805,7 +1805,7 @@ sal_Int32 SfxCommonTemplateDialog_Impl::LoadFactoryStyleFilter( SfxObjectShell* nFilter = aFactoryProps.getUnpackedValueOrDefault( "ooSetupFactoryStyleFilter", nDefault ); m_bWantHierarchical = - (nFilter & SFXSTYLEBIT_HIERARCHY) ? sal_True : sal_False; + (nFilter & SFXSTYLEBIT_HIERARCHY) ? true : false; nFilter &= ~SFXSTYLEBIT_HIERARCHY; // clear it return nFilter; @@ -2155,10 +2155,10 @@ void SfxCommonTemplateDialog_Impl::EnableExample_Impl(sal_uInt16 nId, bool bEnab { if( nId == SID_STYLE_NEW_BY_EXAMPLE ) { - bNewByExampleDisabled = (pTreeBox || aFmtLb.GetSelectionCount() <= 1) ? !bEnable : sal_True; + bNewByExampleDisabled = (pTreeBox || aFmtLb.GetSelectionCount() <= 1) ? !bEnable : true; } else if( nId == SID_STYLE_UPDATE_BY_EXAMPLE ) - bUpdateByExampleDisabled = (pTreeBox || aFmtLb.GetSelectionCount() <= 1) ? !bEnable : sal_True; + bUpdateByExampleDisabled = (pTreeBox || aFmtLb.GetSelectionCount() <= 1) ? !bEnable : true; EnableItem(nId, bEnable); } @@ -2542,7 +2542,7 @@ void SfxCommonTemplateDialog_Impl::UpdateFamily_Impl() } bWaterDisabled = false; - bCanNew = (pTreeBox || aFmtLb.GetSelectionCount() <= 1) ? sal_True : sal_False; + bCanNew = (pTreeBox || aFmtLb.GetSelectionCount() <= 1) ? true : false; bTreeDrag = true; bUpdateByExampleDisabled = false; diff --git a/sfx2/source/dialog/tplcitem.cxx b/sfx2/source/dialog/tplcitem.cxx index 3d07fb25dcc4..320d967e15a5 100644 --- a/sfx2/source/dialog/tplcitem.cxx +++ b/sfx2/source/dialog/tplcitem.cxx @@ -163,7 +163,7 @@ IMPL_STATIC_LINK(SfxTemplateControllerItem, SetWaterCanStateHdl_Impl, { case 0 : case 1 : - pState = new SfxBoolItem(SID_STYLE_WATERCAN, pThis->nWaterCanState ? sal_True : sal_False); + pState = new SfxBoolItem(SID_STYLE_WATERCAN, pThis->nWaterCanState ? true : false); break; } pThis->rTemplateDlg.SetWaterCanState(pState); diff --git a/sfx2/source/doc/SfxDocumentMetaData.cxx b/sfx2/source/doc/SfxDocumentMetaData.cxx index 8730b67812c5..52be422929ff 100644 --- a/sfx2/source/doc/SfxDocumentMetaData.cxx +++ b/sfx2/source/doc/SfxDocumentMetaData.cxx @@ -2172,7 +2172,7 @@ sal_Bool SAL_CALL SfxDocumentMetaData::isModified( ) checkInit(); css::uno::Reference<css::util::XModifiable> xMB(m_xUserDefined, css::uno::UNO_QUERY); - return m_isModified || (xMB.is() ? xMB->isModified() : sal_False); + return m_isModified || (xMB.is() ? xMB->isModified() : false); } void SAL_CALL SfxDocumentMetaData::setModified( sal_Bool bModified ) diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx index ac24da5bfaf1..15c992f8a9d7 100644 --- a/sfx2/source/doc/doctemplates.cxx +++ b/sfx2/source/doc/doctemplates.cxx @@ -1351,7 +1351,7 @@ bool SfxDocTplService_Impl::RemoveUINamesForTemplateDir_Impl( const OUString& aU aNewUINames.realloc( nNewLen ); - return bChanged ? WriteUINamesForTemplateDir_Impl( aUserPath, aNewUINames ) : sal_True; + return bChanged ? WriteUINamesForTemplateDir_Impl( aUserPath, aNewUINames ) : true; } diff --git a/sfx2/source/doc/oleprops.cxx b/sfx2/source/doc/oleprops.cxx index af5192e38a83..4800187f2553 100644 --- a/sfx2/source/doc/oleprops.cxx +++ b/sfx2/source/doc/oleprops.cxx @@ -931,7 +931,7 @@ Any SfxOleSection::GetAnyValue( sal_Int32 nPropId ) const else if( GetDoubleValue( fDouble, nPropId ) ) aValue <<= fDouble; else if( GetBoolValue( bBool, nPropId ) ) - ::comphelper::setBOOL( aValue, bBool ? sal_True : sal_False ); + ::comphelper::setBOOL( aValue, bBool ? true : false ); else if( GetStringValue( aString, nPropId ) ) aValue <<= aString; else if( GetFileTimeValue( aApiDateTime, nPropId ) ) diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 7ff72bc51530..c51aab017fb5 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -1853,7 +1853,7 @@ void SAL_CALL SfxBaseModel::load( const Sequence< beans::PropertyValue >& seqA } SFX_ITEMSET_ARG( pMedium->GetItemSet(), pSalvageItem, SfxStringItem, SID_DOC_SALVAGE, false ); - bool bSalvage = pSalvageItem ? sal_True : sal_False; + bool bSalvage = pSalvageItem ? true : false; // load document if ( !m_pData->m_pObjectShell->DoLoad(pMedium) ) diff --git a/sfx2/source/inc/statcach.hxx b/sfx2/source/inc/statcach.hxx index 3b8acbce85f6..a08023149483 100644 --- a/sfx2/source/inc/statcach.hxx +++ b/sfx2/source/inc/statcach.hxx @@ -91,7 +91,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > GetDispatch() const; void Dispatch( const SfxItemSet* pSet, bool bForceSynchron = false ); bool IsControllerDirty() const - { return bCtrlDirty ? sal_True : sal_False; } + { return bCtrlDirty ? true : false; } SfxPoolItem* GetItem() const { return pLastItem; } void ClearCache(); diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index af144a19e510..973875b61e72 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -866,8 +866,8 @@ void SidebarController::ShowPopupMenu ( { const sal_Int32 nMenuIndex (nIndex+MID_FIRST_PANEL); pMenu->InsertItem(nMenuIndex, iItem->msDisplayName, MenuItemBits::RADIOCHECK); - pMenu->CheckItem(nMenuIndex, iItem->mbIsCurrentDeck ? sal_True : sal_False); - pMenu->EnableItem(nMenuIndex, (iItem->mbIsEnabled&&iItem->mbIsActive) ? sal_True : sal_False); + pMenu->CheckItem(nMenuIndex, iItem->mbIsCurrentDeck ? true : false); + pMenu->EnableItem(nMenuIndex, (iItem->mbIsEnabled&&iItem->mbIsActive) ? true : false); const sal_Int32 nSubMenuIndex (nIndex+MID_FIRST_HIDE); if (iItem->mbIsCurrentDeck) @@ -879,7 +879,7 @@ void SidebarController::ShowPopupMenu ( else { pCustomizationMenu->InsertItem(nSubMenuIndex, iItem->msDisplayName, MenuItemBits::CHECKABLE); - pCustomizationMenu->CheckItem(nSubMenuIndex, iItem->mbIsActive ? sal_True : sal_False); + pCustomizationMenu->CheckItem(nSubMenuIndex, iItem->mbIsActive ? true : false); } } diff --git a/sfx2/source/view/viewfrm2.cxx b/sfx2/source/view/viewfrm2.cxx index bdc0dee0bb50..86ff4288aac1 100644 --- a/sfx2/source/view/viewfrm2.cxx +++ b/sfx2/source/view/viewfrm2.cxx @@ -164,7 +164,7 @@ void SfxViewFrame::Exec_Impl(SfxRequest &rReq ) case SID_SHOWPOPUPS : { SFX_REQUEST_ARG(rReq, pShowItem, SfxBoolItem, SID_SHOWPOPUPS, false); - bool bShow = pShowItem ? pShowItem->GetValue() : sal_True; + bool bShow = pShowItem ? pShowItem->GetValue() : true; SFX_REQUEST_ARG(rReq, pIdItem, SfxUInt16Item, SID_CONFIGITEMID, false); sal_uInt16 nId = pIdItem ? pIdItem->GetValue() : 0; |