diff options
author | Noel Grandin <noel@peralex.com> | 2014-03-03 14:06:44 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-03-11 08:18:14 +0200 |
commit | d442a6460f5f1c897358a0e51727c90cd6746ae2 (patch) | |
tree | a3e46551b4664ef057f4ee420690ce8172dd1373 /svx | |
parent | ea2fb5f8f9ea44d7da5f9d34760e470d696f587d (diff) |
svx: sal_Bool->bool
and optimise some methods in bmpmask.hxx - they were unconditionally
returning true, so convert them to void return type.
Change-Id: If8b092a857ab80ead93112b0d627e41d5ccb3cf9
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/accessibility/ChildrenManagerImpl.cxx | 6 | ||||
-rw-r--r-- | svx/source/accessibility/ChildrenManagerImpl.hxx | 2 | ||||
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShape2d.cxx | 18 | ||||
-rw-r--r-- | svx/source/customshapes/EnhancedCustomShapeGeometry.cxx | 12 | ||||
-rw-r--r-- | svx/source/dialog/_bmpmask.cxx | 6 | ||||
-rw-r--r-- | svx/source/items/algitem.cxx | 18 | ||||
-rw-r--r-- | svx/source/svdraw/svdoashp.cxx | 2 |
7 files changed, 30 insertions, 34 deletions
diff --git a/svx/source/accessibility/ChildrenManagerImpl.cxx b/svx/source/accessibility/ChildrenManagerImpl.cxx index b1642a08eb0d..048db6dcd78a 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.cxx +++ b/svx/source/accessibility/ChildrenManagerImpl.cxx @@ -801,7 +801,7 @@ void ChildrenManagerImpl::ViewForwarderChanged (ChangeType aChangeType, //===== IAccessibleParent =================================================== -sal_Bool ChildrenManagerImpl::ReplaceChild ( +bool ChildrenManagerImpl::ReplaceChild ( AccessibleShape* pCurrentChild, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _rxShape, const long _nIndex, @@ -818,7 +818,7 @@ sal_Bool ChildrenManagerImpl::ReplaceChild ( if ( pNewChild ) pNewChild->Init(); - sal_Bool bResult = sal_False; + bool bResult = false; // Iterate over the visible children. If one of them has an already // created accessible object that matches pCurrentChild then replace @@ -844,7 +844,7 @@ sal_Bool ChildrenManagerImpl::ReplaceChild ( AccessibleEventId::CHILD, uno::makeAny (I->mxAccessibleShape), uno::Any()); - bResult = sal_True; + bResult = true; break; } } diff --git a/svx/source/accessibility/ChildrenManagerImpl.hxx b/svx/source/accessibility/ChildrenManagerImpl.hxx index e3ed8d5ddc05..4ef53b974fbc 100644 --- a/svx/source/accessibility/ChildrenManagerImpl.hxx +++ b/svx/source/accessibility/ChildrenManagerImpl.hxx @@ -290,7 +290,7 @@ public: The returned value indicates whether the replacement has been finished successfully. */ - virtual sal_Bool ReplaceChild ( + virtual bool ReplaceChild ( AccessibleShape* pCurrentChild, const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& _rxShape, const long _nIndex, diff --git a/svx/source/customshapes/EnhancedCustomShape2d.cxx b/svx/source/customshapes/EnhancedCustomShape2d.cxx index 3ed260501b66..6289eddbea26 100644 --- a/svx/source/customshapes/EnhancedCustomShape2d.cxx +++ b/svx/source/customshapes/EnhancedCustomShape2d.cxx @@ -727,16 +727,16 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) : nCoordTop ( 0 ), nCoordWidthG ( 21600 ), nCoordHeightG ( 21600 ), - bOOXMLShape ( sal_False ), + bOOXMLShape ( false ), nXRef ( 0x80000000 ), nYRef ( 0x80000000 ), nFlags ( 0 ), nColorData ( 0 ), - bTextFlow ( sal_False ), + bTextFlow ( false ), bFilled ( ((const XFillStyleItem&)pAObj->GetMergedItem( XATTR_FILLSTYLE )).GetValue() != XFILL_NONE ), bStroked ( ((const XLineStyleItem&)pAObj->GetMergedItem( XATTR_LINESTYLE )).GetValue() != XLINE_NONE ), - bFlipH ( sal_False ), - bFlipV ( sal_False ) + bFlipH ( false ), + bFlipV ( false ) { // bTextFlow needs to be set before clearing the TextDirection Item @@ -841,7 +841,7 @@ EnhancedCustomShape2d::EnhancedCustomShape2d( SdrObject* pAObj ) : vEquationResults.resize( nLength ); for ( i = 0; i < seqEquations.getLength(); i++ ) { - vEquationResults[ i ].bReady = sal_False; + vEquationResults[ i ].bReady = false; try { vNodesSharedPtr[ i ] = EnhancedCustomShape::FunctionParser::parseFunction( seqEquations[ i ], *this ); @@ -1456,8 +1456,8 @@ static basegfx::B2DPolygon CreateArc( const Rectangle& rRect, const Point& rStar } void EnhancedCustomShape2d::CreateSubPath( sal_uInt16& rSrcPt, sal_uInt16& rSegmentInd, std::vector< SdrPathObj* >& rObjectList, - const sal_Bool bLineGeometryNeededOnly, - const sal_Bool bSortFilledObjectsToBack, + const bool bLineGeometryNeededOnly, + const bool bSortFilledObjectsToBack, sal_Int32 nIndex ) { bool bNoFill = false; @@ -2209,7 +2209,7 @@ void EnhancedCustomShape2d::AdaptObjColor(SdrPathObj& rObj, const SfxItemSet& rC } } -SdrObject* EnhancedCustomShape2d::CreatePathObj( sal_Bool bLineGeometryNeededOnly ) +SdrObject* EnhancedCustomShape2d::CreatePathObj( bool bLineGeometryNeededOnly ) { sal_Int32 nCoordSize = seqCoordinates.getLength(); if ( !nCoordSize ) @@ -2351,7 +2351,7 @@ SdrObject* EnhancedCustomShape2d::CreatePathObj( sal_Bool bLineGeometryNeededOnl return pRet; } -SdrObject* EnhancedCustomShape2d::CreateObject( sal_Bool bLineGeometryNeededOnly ) +SdrObject* EnhancedCustomShape2d::CreateObject( bool bLineGeometryNeededOnly ) { SdrObject* pRet = NULL; diff --git a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx index d090cfe089bf..8dd6a0482e34 100644 --- a/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeGeometry.cxx @@ -6194,9 +6194,9 @@ static const sal_uInt16 mso_DefaultFillingTable[] = { 0x0000, 0x0018, 0x01ff, 0x0000, 0x0c00, 0x01e0, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0600, 0x0000, 0x0000, 0x0000, 0x0000 }; -sal_Bool IsCustomShapeFilledByDefault( MSO_SPT eSpType ) +bool IsCustomShapeFilledByDefault( MSO_SPT eSpType ) { - sal_Bool bIsFilledByDefault = sal_True; + bool bIsFilledByDefault = true; sal_uInt32 i = (sal_uInt32)eSpType; if ( i < 0x100 ) bIsFilledByDefault = ( mso_DefaultFillingTable[ i >> 4 ] & ( 1 << ( i & 0xf ) ) ) == 0; @@ -6239,9 +6239,9 @@ static const sal_uInt16 mso_DefaultStrokingTable[] = 0x0000, 0x0000, 0x0000, 0x0000 }; // #i28269# -sal_Bool IsCustomShapeStrokedByDefault( MSO_SPT eSpType ) +bool IsCustomShapeStrokedByDefault( MSO_SPT eSpType ) { - sal_Bool bIsStrokedByDefault = sal_True; + bool bIsStrokedByDefault = true; sal_uInt32 i = (sal_uInt32)eSpType; if ( i < 0x100 ) bIsStrokedByDefault = ( mso_DefaultStrokingTable[ i >> 4 ] & ( 1 << ( i & 0xf ) ) ) == 0; @@ -6252,9 +6252,9 @@ static const sal_uInt16 msoSortFilledObjectsToBackTable[] = { 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0010, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000 }; -sal_Bool SortFilledObjectsToBackByDefault( MSO_SPT eSpType ) +bool SortFilledObjectsToBackByDefault( MSO_SPT eSpType ) { - sal_Bool bSortFilledObjectsToBackByDefault = sal_True; + bool bSortFilledObjectsToBackByDefault = true; sal_uInt32 i = (sal_uInt32)eSpType; if ( i < 0x100 ) bSortFilledObjectsToBackByDefault = ( msoSortFilledObjectsToBackTable[ i >> 4 ] & ( 1 << ( i & 0xf ) ) ) != 0; diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index 5d4a38625143..a1f926a1a582 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -577,7 +577,7 @@ bool SvxBmpMask::Close() -sal_Bool SvxBmpMask::NeedsColorList() const +bool SvxBmpMask::NeedsColorList() const { return ( aLbColor1.GetEntryCount() == 0 ); } @@ -656,7 +656,7 @@ void SvxBmpMask::PipetteClicked() -void SvxBmpMask::SetExecState( sal_Bool bEnable ) +void SvxBmpMask::SetExecState( bool bEnable ) { pData->SetExecState( bEnable ); @@ -1199,7 +1199,7 @@ Graphic SvxBmpMask::Mask( const Graphic& rGraphic ) -sal_Bool SvxBmpMask::IsEyedropping() const +bool SvxBmpMask::IsEyedropping() const { return aTbxPipette.IsItemChecked( TBI_PIPETTE ); } diff --git a/svx/source/items/algitem.cxx b/svx/source/items/algitem.cxx index 74d1a423ca66..8f9f5056d940 100644 --- a/svx/source/items/algitem.cxx +++ b/svx/source/items/algitem.cxx @@ -60,7 +60,7 @@ SvxOrientationItem::SvxOrientationItem( const SvxCellOrientation eOrientation, { } -SvxOrientationItem::SvxOrientationItem( sal_Int32 nRotation, sal_Bool bStacked, const sal_uInt16 nId ) : +SvxOrientationItem::SvxOrientationItem( sal_Int32 nRotation, bool bStacked, const sal_uInt16 nId ) : SfxEnumItem( nId ) { SetFromRotation( nRotation, bStacked ); @@ -161,7 +161,7 @@ sal_uInt16 SvxOrientationItem::GetValueCount() const -sal_Bool SvxOrientationItem::IsStacked() const +bool SvxOrientationItem::IsStacked() const { return static_cast< SvxCellOrientation >( GetValue() ) == SVX_ORIENTATION_STACKED; } @@ -178,7 +178,7 @@ sal_Int32 SvxOrientationItem::GetRotation( sal_Int32 nStdAngle ) const return nAngle; } -void SvxOrientationItem::SetFromRotation( sal_Int32 nRotation, sal_Bool bStacked ) +void SvxOrientationItem::SetFromRotation( sal_Int32 nRotation, bool bStacked ) { if( bStacked ) { @@ -393,34 +393,30 @@ bool SvxMarginItem::PutValue( const uno::Any& rVal, sal_uInt8 nMemberId ) -sal_Bool SvxMarginItem::SetLeftMargin( sal_Int16 nLeft ) +void SvxMarginItem::SetLeftMargin( sal_Int16 nLeft ) { nLeftMargin = nLeft; - return sal_True; } -sal_Bool SvxMarginItem::SetTopMargin( sal_Int16 nTop ) +void SvxMarginItem::SetTopMargin( sal_Int16 nTop ) { nTopMargin = nTop; - return sal_True; } -sal_Bool SvxMarginItem::SetRightMargin( sal_Int16 nRight ) +void SvxMarginItem::SetRightMargin( sal_Int16 nRight ) { nRightMargin = nRight; - return sal_True; } -sal_Bool SvxMarginItem::SetBottomMargin( sal_Int16 nBottom ) +void SvxMarginItem::SetBottomMargin( sal_Int16 nBottom ) { nBottomMargin = nBottom; - return sal_True; } diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx index 0ae93339113d..2562697f6c42 100644 --- a/svx/source/svdraw/svdoashp.cxx +++ b/svx/source/svdraw/svdoashp.cxx @@ -492,7 +492,7 @@ sal_Bool SdrObjCustomShape::UseNoFillStyle() const Any* pAny = rGeometryItem.GetPropertyValueByName( sType ); if ( pAny ) *pAny >>= sShapeType; - bRet = IsCustomShapeFilledByDefault( EnhancedCustomShapeTypeNames::Get( sType ) ) == 0; + bRet = IsCustomShapeFilledByDefault( EnhancedCustomShapeTypeNames::Get( sType ) ) == false; return bRet; } |