From 3edb4611b2314fa5c03e1b4f70c425d92c95ed16 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 9 Apr 2014 11:03:42 +0200 Subject: editeng: sal_Bool->bool Change-Id: I71ea2f0e48a6252832180872945b96a120f21907 --- editeng/source/uno/unoedprx.cxx | 36 ++++++++++++++++++------------------ editeng/source/uno/unofield.cxx | 32 ++++++++++++++++---------------- editeng/source/uno/unofored.cxx | 12 ++++++------ editeng/source/uno/unoipset.cxx | 4 ++-- editeng/source/uno/unotext.cxx | 24 ++++++++++++------------ 5 files changed, 54 insertions(+), 54 deletions(-) (limited to 'editeng/source/uno') diff --git a/editeng/source/uno/unoedprx.cxx b/editeng/source/uno/unoedprx.cxx index 1a2a13dea7d8..8a3eb5677d18 100644 --- a/editeng/source/uno/unoedprx.cxx +++ b/editeng/source/uno/unoedprx.cxx @@ -59,10 +59,10 @@ public: mnEEIndex(0), mnFieldOffset(0), mnFieldLen(0), - mbInField(sal_False), + mbInField(false), mnBulletOffset(0), mnBulletLen(0), - mbInBullet(sal_False) {}; + mbInBullet(false) {}; ~SvxAccessibleTextIndex() {}; // Get/Set current paragraph @@ -102,17 +102,17 @@ public: void SetFieldOffset( sal_Int32 nOffset, sal_Int32 nLen ) { mnFieldOffset = nOffset; mnFieldLen = nLen; } sal_Int32 GetFieldOffset() const { return mnFieldOffset; } sal_Int32 GetFieldLen() const { return mnFieldLen; } - void AreInField( sal_Bool bInField = sal_True ) { mbInField = bInField; } - sal_Bool InField() const { return mbInField; } + void AreInField( bool bInField = true ) { mbInField = bInField; } + bool InField() const { return mbInField; } void SetBulletOffset( sal_Int32 nOffset, sal_Int32 nLen ) { mnBulletOffset = nOffset; mnBulletLen = nLen; } sal_Int32 GetBulletOffset() const { return mnBulletOffset; } sal_Int32 GetBulletLen() const { return mnBulletLen; } - void AreInBullet( sal_Bool bInBullet = sal_True ) { mbInBullet = bInBullet; } - sal_Bool InBullet() const { return mbInBullet; } + void AreInBullet( bool bInBullet = true ) { mbInBullet = bInBullet; } + bool InBullet() const { return mbInBullet; } /// returns false if the given range is non-editable (e.g. contains bullets or _parts_ of fields) - sal_Bool IsEditableRange( const SvxAccessibleTextIndex& rEnd ) const; + bool IsEditableRange( const SvxAccessibleTextIndex& rEnd ) const; private: sal_Int32 mnPara; @@ -120,10 +120,10 @@ private: sal_Int32 mnEEIndex; sal_Int32 mnFieldOffset; sal_Int32 mnFieldLen; - sal_Bool mbInField; + bool mbInField; sal_Int32 mnBulletOffset; sal_Int32 mnBulletLen; - sal_Bool mbInBullet; + bool mbInBullet; }; ESelection MakeEESelection( const SvxAccessibleTextIndex& rStart, const SvxAccessibleTextIndex& rEnd ) @@ -177,10 +177,10 @@ void SvxAccessibleTextIndex::SetEEIndex( sal_uInt16 nEEIndex, const SvxTextForwa { // reset mnFieldOffset = 0; - mbInField = sal_False; + mbInField = false; mnFieldLen = 0; mnBulletOffset = 0; - mbInBullet = sal_False; + mbInBullet = false; mnBulletLen = 0; // set known values @@ -223,10 +223,10 @@ void SvxAccessibleTextIndex::SetIndex( sal_Int32 nIndex, const SvxTextForwarder& { // reset mnFieldOffset = 0; - mbInField = sal_False; + mbInField = false; mnFieldLen = 0; mnBulletOffset = 0; - mbInBullet = sal_False; + mbInBullet = false; mnBulletLen = 0; // set known values @@ -283,21 +283,21 @@ void SvxAccessibleTextIndex::SetIndex( sal_Int32 nIndex, const SvxTextForwarder& } } -sal_Bool SvxAccessibleTextIndex::IsEditableRange( const SvxAccessibleTextIndex& rEnd ) const +bool SvxAccessibleTextIndex::IsEditableRange( const SvxAccessibleTextIndex& rEnd ) const { if( GetIndex() > rEnd.GetIndex() ) return rEnd.IsEditableRange( *this ); if( InBullet() || rEnd.InBullet() ) - return sal_False; + return false; if( InField() && GetFieldOffset() ) - return sal_False; // within field + return false; // within field if( rEnd.InField() && rEnd.GetFieldOffset() >= rEnd.GetFieldLen() - 1 ) - return sal_False; // within field + return false; // within field - return sal_True; + return true; } diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx index f20cddae10d4..6e14f3c496d2 100644 --- a/editeng/source/uno/unofield.cxx +++ b/editeng/source/uno/unofield.cxx @@ -55,8 +55,8 @@ using namespace ::com::sun::star; class SvxUnoFieldData_Impl { public: - sal_Bool mbBoolean1; - sal_Bool mbBoolean2; + bool mbBoolean1; + bool mbBoolean2; sal_Int32 mnInt32; sal_Int16 mnInt16; OUString msString1; @@ -252,15 +252,15 @@ SvxUnoTextField::SvxUnoTextField( sal_Int32 nServiceId ) throw() switch( nServiceId ) { case text::textfield::Type::DATE: - mpImpl->mbBoolean2 = sal_True; + mpImpl->mbBoolean2 = true; mpImpl->mnInt32 = SVXDATEFORMAT_STDSMALL; - mpImpl->mbBoolean1 = sal_False; + mpImpl->mbBoolean1 = false; break; case text::textfield::Type::EXTENDED_TIME: case text::textfield::Type::TIME: - mpImpl->mbBoolean2 = sal_False; - mpImpl->mbBoolean1 = sal_False; + mpImpl->mbBoolean2 = false; + mpImpl->mbBoolean1 = false; mpImpl->mnInt32 = SVXTIMEFORMAT_STANDARD; break; @@ -269,14 +269,14 @@ SvxUnoTextField::SvxUnoTextField( sal_Int32 nServiceId ) throw() break; case text::textfield::Type::EXTENDED_FILE: - mpImpl->mbBoolean1 = sal_False; + mpImpl->mbBoolean1 = false; mpImpl->mnInt16 = text::FilenameDisplayFormat::FULL; break; case text::textfield::Type::AUTHOR: mpImpl->mnInt16 = SVXAUTHORFORMAT_FULLNAME; - mpImpl->mbBoolean1 = sal_False; - mpImpl->mbBoolean2 = sal_True; + mpImpl->mbBoolean1 = false; + mpImpl->mbBoolean2 = true; break; case text::textfield::Type::MEASURE: @@ -284,8 +284,8 @@ SvxUnoTextField::SvxUnoTextField( sal_Int32 nServiceId ) throw() break; default: - mpImpl->mbBoolean1 = sal_False; - mpImpl->mbBoolean2 = sal_False; + mpImpl->mbBoolean1 = false; + mpImpl->mbBoolean2 = false; mpImpl->mnInt32 = 0; mpImpl->mnInt16 = 0; @@ -314,10 +314,10 @@ SvxUnoTextField::SvxUnoTextField( uno::Reference< text::XTextRange > xAnchor, co { case text::textfield::Type::DATE: { - mpImpl->mbBoolean2 = sal_True; + mpImpl->mbBoolean2 = true; // #i35416# for variable date field, don't use invalid "0000-00-00" date, // use current date instead - sal_Bool bFixed = ((SvxDateField*)pData)->GetType() == SVXDATETYPE_FIX; + bool bFixed = ((SvxDateField*)pData)->GetType() == SVXDATETYPE_FIX; mpImpl->maDateTime = getDate( bFixed ? ((SvxDateField*)pData)->GetFixDate() : Date( Date::SYSTEM ).GetDate() ); @@ -327,13 +327,13 @@ SvxUnoTextField::SvxUnoTextField( uno::Reference< text::XTextRange > xAnchor, co break; case text::textfield::Type::TIME: - mpImpl->mbBoolean2 = sal_False; - mpImpl->mbBoolean1 = sal_False; + mpImpl->mbBoolean2 = false; + mpImpl->mbBoolean1 = false; mpImpl->mnInt32 = SVXTIMEFORMAT_STANDARD; break; case text::textfield::Type::EXTENDED_TIME: - mpImpl->mbBoolean2 = sal_False; + mpImpl->mbBoolean2 = false; mpImpl->maDateTime = getTime( ((SvxExtTimeField*)pData)->GetFixTime() ); mpImpl->mbBoolean1 = ((SvxExtTimeField*)pData)->GetType() == SVXTIMETYPE_FIX; mpImpl->mnInt32 = ((SvxExtTimeField*)pData)->GetFormat(); diff --git a/editeng/source/uno/unofored.cxx b/editeng/source/uno/unofored.cxx index f667432e05d5..32b0f9eeba31 100644 --- a/editeng/source/uno/unofored.cxx +++ b/editeng/source/uno/unofored.cxx @@ -190,8 +190,8 @@ sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& // get list of char attribs rEditEngine.GetCharAttribs( nPara, aAttribs ); - sal_Bool bEmpty = sal_True; // we found no item inside the selection of this paragraph - sal_Bool bGaps = sal_False; // we found items but theire gaps between them + bool bEmpty = true; // we found no item inside the selection of this paragraph + bool bGaps = false; // we found items but theire gaps between them sal_Int32 nLastEnd = nPos; const SfxPoolItem* pParaItem = NULL; @@ -200,7 +200,7 @@ sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& { DBG_ASSERT(i->pAttr, "GetCharAttribs gives corrupt data"); - const sal_Bool bEmptyPortion = i->nStart == i->nEnd; + const bool bEmptyPortion = i->nStart == i->nEnd; if((!bEmptyPortion && i->nStart >= nEndPos) || (bEmptyPortion && i->nStart > nEndPos)) break; // break if we are already behind our selection @@ -223,16 +223,16 @@ sal_uInt16 GetSvxEditEngineItemState( EditEngine& rEditEngine, const ESelection& pParaItem = i->pAttr; if( bEmpty ) - bEmpty = sal_False; + bEmpty = false; if(!bGaps && i->nStart > nLastEnd) - bGaps = sal_True; + bGaps = true; nLastEnd = i->nEnd; } if( !bEmpty && !bGaps && nLastEnd < ( nEndPos - 1 ) ) - bGaps = sal_True; + bGaps = true; if( bEmpty ) eParaState = SFX_ITEM_DEFAULT; diff --git a/editeng/source/uno/unoipset.cxx b/editeng/source/uno/unoipset.cxx index a051997c328e..84915f0b59f7 100644 --- a/editeng/source/uno/unoipset.cxx +++ b/editeng/source/uno/unoipset.cxx @@ -85,9 +85,9 @@ void SvxItemPropertySet::ClearAllUsrAny() -sal_Bool SvxUnoCheckForPositiveValue( const uno::Any& rVal ) +bool SvxUnoCheckForPositiveValue( const uno::Any& rVal ) { - sal_Bool bConvert = sal_True; // the default is that all metric items must be converted + bool bConvert = true; // the default is that all metric items must be converted sal_Int32 nValue = 0; if( rVal >>= nValue ) bConvert = (nValue > 0); diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx index 1c62b37d6ef0..659baec88cf4 100644 --- a/editeng/source/uno/unotext.cxx +++ b/editeng/source/uno/unotext.cxx @@ -444,7 +444,7 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValue( const OUString& PropertyNa if ( pMap ) { ESelection aSel( GetSelection() ); - sal_Bool bParaAttrib = (pMap->nWID >= EE_PARA_START) && ( pMap->nWID <= EE_PARA_END ); + bool bParaAttrib = (pMap->nWID >= EE_PARA_START) && ( pMap->nWID <= EE_PARA_END ); if( nPara == -1 && !bParaAttrib ) { @@ -561,7 +561,7 @@ bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const SfxIt SvxTextForwarder* pForwarder = pEditSource? pEditSource->GetTextForwarder() : NULL; if(pForwarder && pSelection) { - sal_Bool bParaIsNumberingRestart = sal_False; + bool bParaIsNumberingRestart = false; if( aValue >>= bParaIsNumberingRestart ) { pForwarder->SetParaIsNumberingRestart( pSelection->nStartPara, bParaIsNumberingRestart ); @@ -572,7 +572,7 @@ bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const SfxIt break; case EE_PARA_BULLETSTATE: { - sal_Bool bBullet = sal_True; + bool bBullet = true; if( aValue >>= bBullet ) { SfxBoolItem aItem( EE_PARA_BULLETSTATE, bBullet ); @@ -738,7 +738,7 @@ bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const SfxIt case EE_PARA_BULLETSTATE: { - sal_Bool bState = sal_False; + bool bState = false; if( rSet.GetItemState( EE_PARA_BULLETSTATE, true ) & (SFX_ITEM_SET|SFX_ITEM_DEFAULT)) { SfxBoolItem* pItem = (SfxBoolItem*)rSet.GetItem( EE_PARA_BULLETSTATE, true ); @@ -804,7 +804,7 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< OUSt if( pMap ) { - sal_Bool bParaAttrib = (pMap->nWID >= EE_PARA_START) && ( pMap->nWID <= EE_PARA_END ); + bool bParaAttrib = (pMap->nWID >= EE_PARA_START) && ( pMap->nWID <= EE_PARA_END ); if( (nPara == -1) && !bParaAttrib ) { @@ -850,7 +850,7 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< OUSt } } - sal_Bool bNeedsUpdate = sal_False; + bool bNeedsUpdate = false; if( pNewParaSet ) { @@ -863,7 +863,7 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< OUSt pForwarder->SetParaAttribs( nTempPara, aSet ); nTempPara++; } - bNeedsUpdate = sal_True; + bNeedsUpdate = true; } delete pNewParaSet; @@ -875,7 +875,7 @@ void SAL_CALL SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< OUSt if( pNewAttrSet->Count() ) { pForwarder->QuickSetAttribs( *pNewAttrSet, GetSelection() ); - bNeedsUpdate = sal_True; + bNeedsUpdate = true; } delete pNewAttrSet; delete pOldAttrSet; @@ -1083,13 +1083,13 @@ uno::Sequence< beans::PropertyState > SvxUnoTextRangeBase::_getPropertyStates(co pSet = new SfxItemSet( pForwarder->GetAttribs( aSel, EditEngineAttribs_OnlyHard ) ); } - sal_Bool bUnknownPropertyFound = sal_False; + bool bUnknownPropertyFound = false; for( sal_Int32 nIdx = 0; nIdx < nCount; nIdx++ ) { const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry( *pNames++ ); if( NULL == pMap ) { - bUnknownPropertyFound = sal_True; + bUnknownPropertyFound = true; break; } bUnknownPropertyFound = !_getOnePropertyStates(pSet, pMap, *pState++); @@ -1287,7 +1287,7 @@ uno::Any SAL_CALL SvxUnoTextRangeBase::getPropertyDefault( const OUString& aProp return uno::Any( (sal_Int16)-1 ); case WID_PARAISNUMBERINGRESTART: - return uno::Any( (sal_Bool)sal_False ); + return uno::Any( false ); default: { @@ -2104,7 +2104,7 @@ void SvxPropertyValuesToItemSet( { if( pForwarder ) { - sal_Bool bParaIsNumberingRestart = sal_False; + bool bParaIsNumberingRestart = false; if( !(pProps[i].Value >>= bParaIsNumberingRestart) ) throw lang::IllegalArgumentException(); -- cgit