Kaydet (Commit) ec960fd3 authored tarafından Noel Grandin's avatar Noel Grandin

editeng: sal_Bool->bool

Change-Id: I767aa3d25f6d18e8a6e23b4d3f8d038d581ac292
üst 0f60ab5e
...@@ -405,7 +405,7 @@ void SAL_CALL SvxUnoTextRangeBase::setString(const OUString& aString) ...@@ -405,7 +405,7 @@ void SAL_CALL SvxUnoTextRangeBase::setString(const OUString& aString)
sal_Int32 nLen = aConverted.getLength(); sal_Int32 nLen = aConverted.getLength();
if (nLen) if (nLen)
GoRight( nLen, sal_True ); GoRight( nLen, true );
} }
} }
...@@ -501,7 +501,7 @@ void SvxUnoTextRangeBase::setPropertyValue( const SfxItemPropertySimpleEntry* pM ...@@ -501,7 +501,7 @@ void SvxUnoTextRangeBase::setPropertyValue( const SfxItemPropertySimpleEntry* pM
} }
} }
sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const SfxItemPropertySimpleEntry* pMap, const uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection /* = NULL */, SvxEditSource* pEditSource /* = NULL*/ ) bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const SfxItemPropertySimpleEntry* pMap, const uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection /* = NULL */, SvxEditSource* pEditSource /* = NULL*/ )
{ {
switch( pMap->nWID ) switch( pMap->nWID )
{ {
...@@ -511,7 +511,7 @@ sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const S ...@@ -511,7 +511,7 @@ sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const S
if(aValue >>= aDesc) if(aValue >>= aDesc)
{ {
SvxUnoFontDescriptor::FillItemSet( aDesc, rNewSet ); SvxUnoFontDescriptor::FillItemSet( aDesc, rNewSet );
return sal_True; return true;
} }
} }
break; break;
...@@ -520,9 +520,9 @@ sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const S ...@@ -520,9 +520,9 @@ sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const S
{ {
uno::Reference< container::XIndexReplace > xRule; uno::Reference< container::XIndexReplace > xRule;
if( !aValue.hasValue() || ((aValue >>= xRule) && !xRule.is()) ) if( !aValue.hasValue() || ((aValue >>= xRule) && !xRule.is()) )
return sal_True; return true;
return sal_False; return false;
} }
case WID_NUMLEVEL: case WID_NUMLEVEL:
...@@ -537,7 +537,7 @@ sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const S ...@@ -537,7 +537,7 @@ sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const S
if(! pForwarder->SetDepth( pSelection->nStartPara, nLevel ) ) if(! pForwarder->SetDepth( pSelection->nStartPara, nLevel ) )
throw lang::IllegalArgumentException(); throw lang::IllegalArgumentException();
return sal_True; return true;
} }
} }
} }
...@@ -551,7 +551,7 @@ sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const S ...@@ -551,7 +551,7 @@ sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const S
if( aValue >>= nStartValue ) if( aValue >>= nStartValue )
{ {
pForwarder->SetNumberingStartValue( pSelection->nStartPara, nStartValue ); pForwarder->SetNumberingStartValue( pSelection->nStartPara, nStartValue );
return sal_True; return true;
} }
} }
} }
...@@ -565,7 +565,7 @@ sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const S ...@@ -565,7 +565,7 @@ sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const S
if( aValue >>= bParaIsNumberingRestart ) if( aValue >>= bParaIsNumberingRestart )
{ {
pForwarder->SetParaIsNumberingRestart( pSelection->nStartPara, bParaIsNumberingRestart ); pForwarder->SetParaIsNumberingRestart( pSelection->nStartPara, bParaIsNumberingRestart );
return sal_True; return true;
} }
} }
} }
...@@ -577,13 +577,13 @@ sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const S ...@@ -577,13 +577,13 @@ sal_Bool SvxUnoTextRangeBase::SetPropertyValueHelper( const SfxItemSet&, const S
{ {
SfxBoolItem aItem( EE_PARA_BULLETSTATE, bBullet ); SfxBoolItem aItem( EE_PARA_BULLETSTATE, bBullet );
rNewSet.Put(aItem); rNewSet.Put(aItem);
return sal_True; return true;
} }
} }
break; break;
default: default:
return sal_False; return false;
} }
throw lang::IllegalArgumentException(); throw lang::IllegalArgumentException();
...@@ -683,7 +683,7 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertySimpleEntry* pM ...@@ -683,7 +683,7 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertySimpleEntry* pM
} }
} }
sal_Bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const SfxItemPropertySimpleEntry* pMap, uno::Any& aAny, const ESelection* pSelection /* = NULL */, SvxEditSource* pEditSource /* = NULL */ ) bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const SfxItemPropertySimpleEntry* pMap, uno::Any& aAny, const ESelection* pSelection /* = NULL */, SvxEditSource* pEditSource /* = NULL */ )
throw( uno::RuntimeException ) throw( uno::RuntimeException )
{ {
switch( pMap->nWID ) switch( pMap->nWID )
...@@ -750,10 +750,10 @@ sal_Bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const S ...@@ -750,10 +750,10 @@ sal_Bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet& rSet, const S
break; break;
default: default:
return sal_False; return false;
} }
return sal_True; return true;
} }
// is not (yet) supported // is not (yet) supported
...@@ -1104,9 +1104,9 @@ uno::Sequence< beans::PropertyState > SvxUnoTextRangeBase::_getPropertyStates(co ...@@ -1104,9 +1104,9 @@ uno::Sequence< beans::PropertyState > SvxUnoTextRangeBase::_getPropertyStates(co
return aRet; return aRet;
} }
sal_Bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertySimpleEntry* pMap, beans::PropertyState& rState) bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertySimpleEntry* pMap, beans::PropertyState& rState)
{ {
sal_Bool bUnknownPropertyFound = sal_False; bool bUnknownPropertyFound = false;
if(pSet && pMap) if(pSet && pMap)
{ {
SfxItemState eItemState = SFX_ITEM_UNKNOWN; SfxItemState eItemState = SFX_ITEM_UNKNOWN;
...@@ -1146,7 +1146,7 @@ sal_Bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, cons ...@@ -1146,7 +1146,7 @@ sal_Bool SvxUnoTextRangeBase::_getOnePropertyStates(const SfxItemSet* pSet, cons
} }
break; break;
default: default:
bUnknownPropertyFound = sal_True; bUnknownPropertyFound = true;
break; break;
} }
...@@ -1365,7 +1365,7 @@ void SvxUnoTextRangeBase::CollapseToEnd(void) throw() ...@@ -1365,7 +1365,7 @@ void SvxUnoTextRangeBase::CollapseToEnd(void) throw()
maSelection.nStartPos = maSelection.nEndPos; maSelection.nStartPos = maSelection.nEndPos;
} }
sal_Bool SvxUnoTextRangeBase::IsCollapsed(void) throw() bool SvxUnoTextRangeBase::IsCollapsed(void) throw()
{ {
CheckSelection( maSelection, mpEditSource ); CheckSelection( maSelection, mpEditSource );
...@@ -1373,7 +1373,7 @@ sal_Bool SvxUnoTextRangeBase::IsCollapsed(void) throw() ...@@ -1373,7 +1373,7 @@ sal_Bool SvxUnoTextRangeBase::IsCollapsed(void) throw()
maSelection.nStartPos == maSelection.nEndPos ); maSelection.nStartPos == maSelection.nEndPos );
} }
sal_Bool SvxUnoTextRangeBase::GoLeft(sal_Int16 nCount, sal_Bool Expand) throw() bool SvxUnoTextRangeBase::GoLeft(sal_Int16 nCount, bool Expand) throw()
{ {
CheckSelection( maSelection, mpEditSource ); CheckSelection( maSelection, mpEditSource );
...@@ -1381,12 +1381,12 @@ sal_Bool SvxUnoTextRangeBase::GoLeft(sal_Int16 nCount, sal_Bool Expand) throw() ...@@ -1381,12 +1381,12 @@ sal_Bool SvxUnoTextRangeBase::GoLeft(sal_Int16 nCount, sal_Bool Expand) throw()
sal_uInt16 nNewPos = maSelection.nEndPos; sal_uInt16 nNewPos = maSelection.nEndPos;
sal_Int32 nNewPar = maSelection.nEndPara; sal_Int32 nNewPar = maSelection.nEndPara;
sal_Bool bOk = sal_True; bool bOk = true;
SvxTextForwarder* pForwarder = NULL; SvxTextForwarder* pForwarder = NULL;
while ( nCount > nNewPos && bOk ) while ( nCount > nNewPos && bOk )
{ {
if ( nNewPar == 0 ) if ( nNewPar == 0 )
bOk = sal_False; bOk = false;
else else
{ {
if ( !pForwarder ) if ( !pForwarder )
...@@ -1411,7 +1411,7 @@ sal_Bool SvxUnoTextRangeBase::GoLeft(sal_Int16 nCount, sal_Bool Expand) throw() ...@@ -1411,7 +1411,7 @@ sal_Bool SvxUnoTextRangeBase::GoLeft(sal_Int16 nCount, sal_Bool Expand) throw()
return bOk; return bOk;
} }
sal_Bool SvxUnoTextRangeBase::GoRight(sal_Int16 nCount, sal_Bool Expand) throw() bool SvxUnoTextRangeBase::GoRight(sal_Int16 nCount, bool Expand) throw()
{ {
SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL; SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL;
if( pForwarder ) if( pForwarder )
...@@ -1421,13 +1421,13 @@ sal_Bool SvxUnoTextRangeBase::GoRight(sal_Int16 nCount, sal_Bool Expand) throw( ...@@ -1421,13 +1421,13 @@ sal_Bool SvxUnoTextRangeBase::GoRight(sal_Int16 nCount, sal_Bool Expand) throw(
sal_Int32 nNewPos = maSelection.nEndPos + nCount; //! Overflow??? sal_Int32 nNewPos = maSelection.nEndPos + nCount; //! Overflow???
sal_Int32 nNewPar = maSelection.nEndPara; sal_Int32 nNewPar = maSelection.nEndPara;
sal_Bool bOk = sal_True; bool bOk = true;
sal_Int32 nParCount = pForwarder->GetParagraphCount(); sal_Int32 nParCount = pForwarder->GetParagraphCount();
sal_Int32 nThisLen = pForwarder->GetTextLen( nNewPar ); sal_Int32 nThisLen = pForwarder->GetTextLen( nNewPar );
while ( nNewPos > nThisLen && bOk ) while ( nNewPos > nThisLen && bOk )
{ {
if ( nNewPar + 1 >= nParCount ) if ( nNewPar + 1 >= nParCount )
bOk = sal_False; bOk = false;
else else
{ {
nNewPos -= nThisLen+1; nNewPos -= nThisLen+1;
...@@ -1447,10 +1447,10 @@ sal_Bool SvxUnoTextRangeBase::GoRight(sal_Int16 nCount, sal_Bool Expand) throw( ...@@ -1447,10 +1447,10 @@ sal_Bool SvxUnoTextRangeBase::GoRight(sal_Int16 nCount, sal_Bool Expand) throw(
return bOk; return bOk;
} }
return sal_False; return false;
} }
void SvxUnoTextRangeBase::GotoStart(sal_Bool Expand) throw() void SvxUnoTextRangeBase::GotoStart(bool Expand) throw()
{ {
maSelection.nStartPara = 0; maSelection.nStartPara = 0;
maSelection.nStartPos = 0; maSelection.nStartPos = 0;
...@@ -1459,7 +1459,7 @@ void SvxUnoTextRangeBase::GotoStart(sal_Bool Expand) throw() ...@@ -1459,7 +1459,7 @@ void SvxUnoTextRangeBase::GotoStart(sal_Bool Expand) throw()
CollapseToStart(); CollapseToStart();
} }
void SvxUnoTextRangeBase::GotoEnd(sal_Bool Expand) throw() void SvxUnoTextRangeBase::GotoEnd(bool Expand) throw()
{ {
CheckSelection( maSelection, mpEditSource ); CheckSelection( maSelection, mpEditSource );
...@@ -1566,7 +1566,7 @@ uno::Reference< uno::XInterface > SvxUnoTextRange_NewInstance() ...@@ -1566,7 +1566,7 @@ uno::Reference< uno::XInterface > SvxUnoTextRange_NewInstance()
#endif #endif
} }
SvxUnoTextRange::SvxUnoTextRange( const SvxUnoTextBase& rParent, sal_Bool bPortion /* = sal_False */ ) throw() SvxUnoTextRange::SvxUnoTextRange( const SvxUnoTextBase& rParent, bool bPortion /* = false */ ) throw()
:SvxUnoTextRangeBase( rParent.GetEditSource(), bPortion ? ImplGetSvxTextPortionSvxPropertySet() : rParent.getPropertySet() ), :SvxUnoTextRangeBase( rParent.GetEditSource(), bPortion ? ImplGetSvxTextPortionSvxPropertySet() : rParent.getPropertySet() ),
mbPortion( bPortion ) mbPortion( bPortion )
{ {
......
...@@ -450,7 +450,7 @@ uno::Any SAL_CALL SvxUnoTextRangeEnumeration::nextElement() ...@@ -450,7 +450,7 @@ uno::Any SAL_CALL SvxUnoTextRangeEnumeration::nextElement()
if( pRange == 0 ) if( pRange == 0 )
{ {
pRange = new SvxUnoTextRange( mrParentText, sal_True ); pRange = new SvxUnoTextRange( mrParentText, true );
pRange->SetSelection(aSel); pRange->SetSelection(aSel);
} }
......
...@@ -262,7 +262,7 @@ protected: ...@@ -262,7 +262,7 @@ protected:
virtual ::com::sun::star::beans::PropertyState SAL_CALL _getPropertyState( const OUString& PropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::beans::PropertyState SAL_CALL _getPropertyState( const OUString& PropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL _getPropertyStates( const ::com::sun::star::uno::Sequence< OUString >& aPropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyState > SAL_CALL _getPropertyStates( const ::com::sun::star::uno::Sequence< OUString >& aPropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
// returns true if property found or false if unknown property // returns true if property found or false if unknown property
virtual sal_Bool _getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertySimpleEntry* pMap, ::com::sun::star::beans::PropertyState& rState); virtual bool _getOnePropertyStates(const SfxItemSet* pSet, const SfxItemPropertySimpleEntry* pMap, ::com::sun::star::beans::PropertyState& rState);
virtual void SAL_CALL _setPropertyToDefault( const OUString& PropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL _setPropertyToDefault( const OUString& PropertyName, sal_Int32 nPara = -1 ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException);
virtual void _setPropertyToDefault( SvxTextForwarder* pForwarder, const SfxItemPropertySimpleEntry* pMap, sal_Int32 nPara ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException ); virtual void _setPropertyToDefault( SvxTextForwarder* pForwarder, const SfxItemPropertySimpleEntry* pMap, sal_Int32 nPara ) throw( ::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException );
...@@ -283,18 +283,18 @@ public: ...@@ -283,18 +283,18 @@ public:
virtual void CollapseToStart(void) throw(); virtual void CollapseToStart(void) throw();
virtual void CollapseToEnd(void) throw(); virtual void CollapseToEnd(void) throw();
virtual sal_Bool IsCollapsed(void) throw(); virtual bool IsCollapsed(void) throw();
virtual sal_Bool GoLeft(sal_Int16 nCount, sal_Bool Expand) throw(); virtual bool GoLeft(sal_Int16 nCount, bool Expand) throw();
virtual sal_Bool GoRight(sal_Int16 nCount, sal_Bool Expand) throw(); virtual bool GoRight(sal_Int16 nCount, bool Expand) throw();
virtual void GotoStart(sal_Bool Expand) throw(); virtual void GotoStart(bool Expand) throw();
virtual void GotoEnd(sal_Bool Expand) throw(); virtual void GotoEnd(bool Expand) throw();
//const SfxItemPropertyMapEntry* getPropertyMapEntries() const throw() { return maPropSet.getPropertyMapEntries(); } //const SfxItemPropertyMapEntry* getPropertyMapEntries() const throw() { return maPropSet.getPropertyMapEntries(); }
const SvxItemPropertySet* getPropertySet() const throw() { return mpPropSet; } const SvxItemPropertySet* getPropertySet() const throw() { return mpPropSet; }
SvxEditSource* GetEditSource() const throw() { return mpEditSource; } SvxEditSource* GetEditSource() const throw() { return mpEditSource; }
static sal_Bool SetPropertyValueHelper( const SfxItemSet& rOldSet, const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection = NULL, SvxEditSource* pEditSource = NULL ); static bool SetPropertyValueHelper( const SfxItemSet& rOldSet, const SfxItemPropertySimpleEntry* pMap, const ::com::sun::star::uno::Any& aValue, SfxItemSet& rNewSet, const ESelection* pSelection = NULL, SvxEditSource* pEditSource = NULL );
static sal_Bool GetPropertyValueHelper( SfxItemSet& rSet, const SfxItemPropertySimpleEntry* pMap, ::com::sun::star::uno::Any& aAny, const ESelection* pSelection = NULL, SvxEditSource* pEditSource = NULL ) throw( ::com::sun::star::uno::RuntimeException ); static bool GetPropertyValueHelper( SfxItemSet& rSet, const SfxItemPropertySimpleEntry* pMap, ::com::sun::star::uno::Any& aAny, const ESelection* pSelection = NULL, SvxEditSource* pEditSource = NULL ) throw( ::com::sun::star::uno::RuntimeException );
void attachField( const SvxFieldData* pData ) throw(); void attachField( const SvxFieldData* pData ) throw();
...@@ -356,10 +356,10 @@ class EDITENG_DLLPUBLIC SvxUnoTextRange : public SvxUnoTextRangeBase, ...@@ -356,10 +356,10 @@ class EDITENG_DLLPUBLIC SvxUnoTextRange : public SvxUnoTextRangeBase,
friend class SvxUnoTextRangeEnumeration; friend class SvxUnoTextRangeEnumeration;
private: private:
::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText; ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > xParentText;
sal_Bool mbPortion; bool mbPortion;
public: public:
SvxUnoTextRange( const SvxUnoTextBase& rParent, sal_Bool bPortion = sal_False ) throw(); SvxUnoTextRange( const SvxUnoTextBase& rParent, bool bPortion = false ) throw();
virtual ~SvxUnoTextRange() throw(); virtual ~SvxUnoTextRange() throw();
// ::com::sun::star::uno::XInterface // ::com::sun::star::uno::XInterface
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment