diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-09-20 09:11:25 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2012-09-20 09:15:44 +0900 |
commit | 53f7f2a3e4269677d57d2ec2c7560a9524c3e692 (patch) | |
tree | d696444861c37937d1dad31d539500aec3dab625 | |
parent | 25f935bfb44b87271eb11e719c4d1fb8624bdd02 (diff) |
sal_Bool to bool
Change-Id: Id29032b3f2f228141e37f713c798d61cc20584c0
-rw-r--r-- | sw/inc/accmap.hxx | 8 | ||||
-rw-r--r-- | sw/source/core/access/accfrmobjmap.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/access/accfrmobjmap.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/access/accfrmobjslist.hxx | 10 | ||||
-rw-r--r-- | sw/source/core/access/accmap.cxx | 85 |
5 files changed, 53 insertions, 54 deletions
diff --git a/sw/inc/accmap.hxx b/sw/inc/accmap.hxx index 5fb1d32167b9..1134b6d52923 100644 --- a/sw/inc/accmap.hxx +++ b/sw/inc/accmap.hxx @@ -103,7 +103,7 @@ class SwAccessibleMap : public accessibility::IAccessibleViewForwarder, sal_Int32 mnEndnote; - sal_Bool mbShapeSelected; + bool mbShapeSelected; void FireEvent( const SwAccessibleEvent_Impl& rEvent ); @@ -116,11 +116,11 @@ class SwAccessibleMap : public accessibility::IAccessibleViewForwarder, void DoInvalidateShapeFocus(); void InvalidateShapeSelection(); - void _InvalidateRelationSet( const SwFrm* pFrm, sal_Bool bFrom ); + void _InvalidateRelationSet( const SwFrm* pFrm, bool bFrom ); ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible> - _GetDocumentView( sal_Bool bPagePreview ); + _GetDocumentView( bool bPagePreview ); /** method to build up a new data structure of the accessible pararaphs, which have a selection @@ -250,7 +250,7 @@ public: const Size& _rPrevwWinSize ); void InvalidatePreViewSelection( sal_uInt16 nSelPage ); - sal_Bool IsPageSelected( const SwPageFrm *pPageFrm ) const; + bool IsPageSelected( const SwPageFrm *pPageFrm ) const; void FireEvents(); diff --git a/sw/source/core/access/accfrmobjmap.cxx b/sw/source/core/access/accfrmobjmap.cxx index dc6e8622e9f7..5b75d59a0874 100644 --- a/sw/source/core/access/accfrmobjmap.cxx +++ b/sw/source/core/access/accfrmobjmap.cxx @@ -158,7 +158,7 @@ SwAccessibleChildMap::SwAccessibleChildMap( const SwRect& rVisArea, return _SwAccessibleChildMap::insert( aEntry ); } -/* static */ sal_Bool SwAccessibleChildMap::IsSortingRequired( const SwFrm& rFrm ) +/* static */ bool SwAccessibleChildMap::IsSortingRequired( const SwFrm& rFrm ) { return ( rFrm.IsPageFrm() && static_cast< const SwPageFrm& >( rFrm ).GetSortedObjs() ) || diff --git a/sw/source/core/access/accfrmobjmap.hxx b/sw/source/core/access/accfrmobjmap.hxx index 9b1907699c37..e324b335b656 100644 --- a/sw/source/core/access/accfrmobjmap.hxx +++ b/sw/source/core/access/accfrmobjmap.hxx @@ -80,7 +80,7 @@ public: const SwFrm& rFrm, SwAccessibleMap& rAccMap ); - static sal_Bool IsSortingRequired( const SwFrm& rFrm ); + static bool IsSortingRequired( const SwFrm& rFrm ); }; #endif diff --git a/sw/source/core/access/accfrmobjslist.hxx b/sw/source/core/access/accfrmobjslist.hxx index 13885cbc85d5..d7ce57d4f164 100644 --- a/sw/source/core/access/accfrmobjslist.hxx +++ b/sw/source/core/access/accfrmobjslist.hxx @@ -54,12 +54,12 @@ public: , nNextObj( rIter.nNextObj ) {} - inline sal_Bool operator==( const SwAccessibleChildSList_const_iterator& r ) const + inline bool operator==( const SwAccessibleChildSList_const_iterator& r ) const { return aCurr == r.aCurr; } - inline sal_Bool operator!=( + inline bool operator!=( const SwAccessibleChildSList_const_iterator& r ) const { return !(*this == r); @@ -78,7 +78,7 @@ class SwAccessibleChildSList { const SwRect maVisArea; const SwFrm& mrFrm; - const sal_Bool mbVisibleChildrenOnly; + const bool mbVisibleChildrenOnly; SwAccessibleMap& mrAccMap; public: @@ -89,7 +89,7 @@ public: SwAccessibleMap& rAccMap ) : maVisArea() , mrFrm( rFrm ) - , mbVisibleChildrenOnly( sal_False ) + , mbVisibleChildrenOnly( false ) , mrAccMap( rAccMap ) {} @@ -118,7 +118,7 @@ public: return mrFrm; } - inline sal_Bool IsVisibleChildrenOnly() const + inline bool IsVisibleChildrenOnly() const { return mbVisibleChildrenOnly; } diff --git a/sw/source/core/access/accmap.cxx b/sw/source/core/access/accmap.cxx index fd40aea6a0e1..f47346cb6d80 100644 --- a/sw/source/core/access/accmap.cxx +++ b/sw/source/core/access/accmap.cxx @@ -78,7 +78,7 @@ using namespace ::sw::access; struct SwFrmFunc { - sal_Bool operator()( const SwFrm * p1, + bool operator()( const SwFrm * p1, const SwFrm * p2) const { return p1 < p2; @@ -92,12 +92,12 @@ class SwAccessibleContextMap_Impl: public _SwAccessibleContextMap_Impl public: #if OSL_DEBUG_LEVEL > 0 - sal_Bool mbLocked; + bool mbLocked; #endif SwAccessibleContextMap_Impl() #if OSL_DEBUG_LEVEL > 0 - : mbLocked( sal_False ) + : mbLocked( false ) #endif {} @@ -198,7 +198,7 @@ void SwDrawModellListener_Impl::Dispose() //------------------------------------------------------------------------------ struct SwShapeFunc { - sal_Bool operator()( const SdrObject * p1, + bool operator()( const SdrObject * p1, const SdrObject * p2) const { return p1 < p2; @@ -215,11 +215,11 @@ class SwAccessibleShapeMap_Impl: public _SwAccessibleShapeMap_Impl public: #if OSL_DEBUG_LEVEL > 0 - sal_Bool mbLocked; + bool mbLocked; #endif SwAccessibleShapeMap_Impl( SwAccessibleMap *pMap ) #if OSL_DEBUG_LEVEL > 0 - : mbLocked( sal_False ) + : mbLocked( false ) #endif { maInfo.SetSdrView( pMap->GetShell()->GetDrawView() ); @@ -421,24 +421,24 @@ public: mnStates |= _nStates; } - inline sal_Bool IsUpdateCursorPos() const + inline bool IsUpdateCursorPos() const { return (mnStates & ACC_STATE_CARET) != 0; } - inline sal_Bool IsInvalidateStates() const + inline bool IsInvalidateStates() const { return (mnStates & ACC_STATE_MASK) != 0; } - inline sal_Bool IsInvalidateRelation() const + inline bool IsInvalidateRelation() const { return (mnStates & ACC_STATE_RELATION_MASK) != 0; } - inline sal_Bool IsInvalidateTextSelection() const + inline bool IsInvalidateTextSelection() const { return ( mnStates & ACC_STATE_TEXT_SELECTION_CHANGED ) != 0; } - inline sal_Bool IsInvalidateTextAttrs() const + inline bool IsInvalidateTextAttrs() const { return ( mnStates & ACC_STATE_TEXT_ATTRIBUTE_CHANGED ) != 0; } @@ -460,19 +460,19 @@ typedef ::std::list < SwAccessibleEvent_Impl > _SwAccessibleEventList_Impl; class SwAccessibleEventList_Impl: public _SwAccessibleEventList_Impl { - sal_Bool mbFiring; + bool mbFiring; public: SwAccessibleEventList_Impl() - : mbFiring( sal_False ) + : mbFiring( false ) {} inline void SetFiring() { - mbFiring = sal_True; + mbFiring = true; } - inline sal_Bool IsFiring() const + inline bool IsFiring() const { return mbFiring; } @@ -503,7 +503,7 @@ public: //------------------------------------------------------------------------------ struct SwAccessibleChildFunc { - sal_Bool operator()( const SwAccessibleChild& r1, + bool operator()( const SwAccessibleChild& r1, const SwAccessibleChild& r2 ) const { const void *p1 = r1.GetSwFrm() @@ -542,7 +542,7 @@ struct SwAccessibleParaSelection struct SwXAccWeakRefComp { - sal_Bool operator()( const uno::WeakReference<XAccessible>& _rXAccWeakRef1, + bool operator()( const uno::WeakReference<XAccessible>& _rXAccWeakRef1, const uno::WeakReference<XAccessible>& _rXAccWeakRef2 ) const { return _rXAccWeakRef1.get() < _rXAccWeakRef2.get(); @@ -754,10 +754,10 @@ void SwAccPreviewData::AdjustLogicPgRectToVisibleArea( } //------------------------------------------------------------------------------ -static sal_Bool AreInSameTable( const uno::Reference< XAccessible >& rAcc, +static bool AreInSameTable( const uno::Reference< XAccessible >& rAcc, const SwFrm *pFrm ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( pFrm && pFrm->IsCellFrm() && rAcc.is() ) { @@ -877,7 +877,7 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent ) SwAccessibleEvent_Impl aEvent( *(*aIter).second ); OSL_ENSURE( aEvent.GetType() != SwAccessibleEvent_Impl::DISPOSE, "dispose events should not be stored" ); - sal_Bool bAppendEvent = sal_True; + bool bAppendEvent = true; switch( rEvent.GetType() ) { case SwAccessibleEvent_Impl::CARET_OR_STATES: @@ -927,7 +927,7 @@ void SwAccessibleMap::AppendEvent( const SwAccessibleEvent_Impl& rEvent ) // but executed immediatly to avoid broadcasting of // defunctional objects. So what needs to be done here is to // remove all events for the frame in question. - bAppendEvent = sal_False; + bAppendEvent = false; break; case SwAccessibleEvent_Impl::INVALID_ATTR: OSL_ENSURE( aEvent.GetType() == SwAccessibleEvent_Impl::INVALID_ATTR, @@ -1017,7 +1017,7 @@ void SwAccessibleMap::DoInvalidateShapeSelection() { ::std::list< const SwFrm * > aParents; Window *pWin = GetShell()->GetWin(); - sal_Bool bFocused = pWin && pWin->HasFocus(); + bool bFocused = pWin && pWin->HasFocus(); SwAccessibleObjShape_Impl *pShape = pShapes; while( nShapes ) { @@ -1111,7 +1111,7 @@ void SwAccessibleMap::DoInvalidateShapeFocus() if( pShapes ) { Window *pWin = GetShell()->GetWin(); - sal_Bool bFocused = pWin && pWin->HasFocus(); + bool bFocused = pWin && pWin->HasFocus(); SwAccessibleObjShape_Impl *pShape = pShapes; while( nShapes ) { @@ -1144,7 +1144,7 @@ SwAccessibleMap::SwAccessibleMap( ViewShell *pSh ) : mnPara( 1 ), mnFootnote( 1 ), mnEndnote( 1 ), - mbShapeSelected( sal_False ) + mbShapeSelected( false ) { pSh->GetLayout()->AddAccessibleShell(); } @@ -1250,10 +1250,10 @@ SwAccessibleMap::~SwAccessibleMap() } uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView( - sal_Bool bPagePreview ) + bool bPagePreview ) { uno::Reference < XAccessible > xAcc; - sal_Bool bSetVisArea = sal_False; + bool bSetVisArea = false; { osl::MutexGuard aGuard( maMutex ); @@ -1262,13 +1262,13 @@ uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView( { mpFrmMap = new SwAccessibleContextMap_Impl; #if OSL_DEBUG_LEVEL > 0 - mpFrmMap->mbLocked = sal_False; + mpFrmMap->mbLocked = false; #endif } #if OSL_DEBUG_LEVEL > 0 OSL_ENSURE( !mpFrmMap->mbLocked, "Map is locked" ); - mpFrmMap->mbLocked = sal_True; + mpFrmMap->mbLocked = true; #endif const SwRootFrm *pRootFrm = GetShell()->GetLayout(); @@ -1277,8 +1277,7 @@ uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView( xAcc = (*aIter).second; if( xAcc.is() ) { - bSetVisArea = sal_True; // Set VisArea when map mutex is not - // locked + bSetVisArea = true; // Set VisArea when map mutex is not locked } else { @@ -1299,7 +1298,7 @@ uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView( } #if OSL_DEBUG_LEVEL > 0 - mpFrmMap->mbLocked = sal_False; + mpFrmMap->mbLocked = false; #endif } @@ -1315,7 +1314,7 @@ uno::Reference< XAccessible > SwAccessibleMap::_GetDocumentView( uno::Reference< XAccessible > SwAccessibleMap::GetDocumentView( ) { - return _GetDocumentView( sal_False ); + return _GetDocumentView( false ); } uno::Reference<XAccessible> SwAccessibleMap::GetDocumentPreview( @@ -1329,7 +1328,7 @@ uno::Reference<XAccessible> SwAccessibleMap::GetDocumentPreview( mpPreview = new SwAccPreviewData(); mpPreview->Update( *this, _rPrevwPages, _rScale, _pSelectedPageFrm, _rPrevwWinSize ); - uno::Reference<XAccessible> xAcc = _GetDocumentView( sal_True ); + uno::Reference<XAccessible> xAcc = _GetDocumentView( true ); return xAcc; } @@ -1338,7 +1337,7 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm, { uno::Reference < XAccessible > xAcc; uno::Reference < XAccessible > xOldCursorAcc; - sal_Bool bOldShapeSelected = sal_False; + bool bOldShapeSelected = false; { osl::MutexGuard aGuard( maMutex ); @@ -1448,7 +1447,7 @@ uno::Reference< XAccessible> SwAccessibleMap::GetContext( const SwFrm *pFrm, mxCursorContext = xAcc; bOldShapeSelected = mbShapeSelected; - mbShapeSelected = sal_False; + mbShapeSelected = false; } } } @@ -1910,7 +1909,7 @@ void SwAccessibleMap::InvalidateAttr( const SwTxtFrm& rTxtFrm ) void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) { SwAccessibleChild aFrmOrObj( pFrm ); - sal_Bool bShapeSelected = sal_False; + bool bShapeSelected = false; const ViewShell *pVSh = GetShell(); if( pVSh->ISA( SwCrsrShell ) ) { @@ -1932,7 +1931,7 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) } else if( pFESh->IsObjSelected() > 0 ) { - bShapeSelected = sal_True; + bShapeSelected = true; aFrmOrObj = static_cast<const SwFrm *>( 0 ); } } @@ -1943,7 +1942,7 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) uno::Reference < XAccessible > xOldAcc; uno::Reference < XAccessible > xAcc; - sal_Bool bOldShapeSelected = sal_False; + bool bOldShapeSelected = false; { osl::MutexGuard aGuard( maMutex ); @@ -2001,7 +2000,7 @@ void SwAccessibleMap::InvalidateCursorPosition( const SwFrm *pFrm ) void SwAccessibleMap::InvalidateFocus() { uno::Reference < XAccessible > xAcc; - sal_Bool bShapeSelected; + bool bShapeSelected; { osl::MutexGuard aGuard( maMutex ); @@ -2059,7 +2058,7 @@ void SwAccessibleMap::InvalidateStates( tAccessibleStates _nStates, } void SwAccessibleMap::_InvalidateRelationSet( const SwFrm* pFrm, - sal_Bool bFrom ) + bool bFrom ) { // first, see if this frame is accessible, and if so, get the respective SwAccessibleChild aFrmOrObj( pFrm ); @@ -2108,8 +2107,8 @@ void SwAccessibleMap::_InvalidateRelationSet( const SwFrm* pFrm, void SwAccessibleMap::InvalidateRelationSet( const SwFrm* pMaster, const SwFrm* pFollow ) { - _InvalidateRelationSet( pMaster, sal_False ); - _InvalidateRelationSet( pFollow, sal_True ); + _InvalidateRelationSet( pMaster, false ); + _InvalidateRelationSet( pFollow, true ); } // invalidation of CONTENT_FLOW_FROM/_TO relation of a paragraph @@ -2271,7 +2270,7 @@ void SwAccessibleMap::InvalidatePreViewSelection( sal_uInt16 nSelPage ) } -sal_Bool SwAccessibleMap::IsPageSelected( const SwPageFrm *pPageFrm ) const +bool SwAccessibleMap::IsPageSelected( const SwPageFrm *pPageFrm ) const { return mpPreview && mpPreview->GetSelPage() == pPageFrm; } |