editeng: sal_Bool->bool

Change-Id: I7a7b5e9ae1762cace1f87b379b32398b231745fd
This commit is contained in:
Noel Grandin
2014-03-03 11:46:22 +02:00
parent 7ad8e33c0f
commit 050d7fc852
11 changed files with 34 additions and 34 deletions

View File

@@ -94,7 +94,7 @@ AccessibleContextBase::~AccessibleContextBase(void)
sal_Bool AccessibleContextBase::SetState (sal_Int16 aState) bool AccessibleContextBase::SetState (sal_Int16 aState)
{ {
::osl::ClearableMutexGuard aGuard (maMutex); ::osl::ClearableMutexGuard aGuard (maMutex);
::utl::AccessibleStateSetHelper* pStateSet = ::utl::AccessibleStateSetHelper* pStateSet =
@@ -116,16 +116,16 @@ sal_Bool AccessibleContextBase::SetState (sal_Int16 aState)
aNewValue, aNewValue,
uno::Any()); uno::Any());
} }
return sal_True; return true;
} }
else else
return sal_False; return false;
} }
sal_Bool AccessibleContextBase::ResetState (sal_Int16 aState) bool AccessibleContextBase::ResetState (sal_Int16 aState)
{ {
::osl::ClearableMutexGuard aGuard (maMutex); ::osl::ClearableMutexGuard aGuard (maMutex);
::utl::AccessibleStateSetHelper* pStateSet = ::utl::AccessibleStateSetHelper* pStateSet =
@@ -142,16 +142,16 @@ sal_Bool AccessibleContextBase::ResetState (sal_Int16 aState)
AccessibleEventId::STATE_CHANGED, AccessibleEventId::STATE_CHANGED,
uno::Any(), uno::Any(),
aOldValue); aOldValue);
return sal_True; return true;
} }
else else
return sal_False; return false;
} }
sal_Bool AccessibleContextBase::GetState (sal_Int16 aState) bool AccessibleContextBase::GetState (sal_Int16 aState)
{ {
::osl::MutexGuard aGuard (maMutex); ::osl::MutexGuard aGuard (maMutex);
::utl::AccessibleStateSetHelper* pStateSet = ::utl::AccessibleStateSetHelper* pStateSet =
@@ -160,7 +160,7 @@ sal_Bool AccessibleContextBase::GetState (sal_Int16 aState)
return pStateSet->contains(aState); return pStateSet->contains(aState);
else else
// If there is no state set then return false as a default value. // If there is no state set then return false as a default value.
return sal_False; return false;
} }
@@ -647,7 +647,7 @@ void AccessibleContextBase::ThrowIfDisposed (void)
sal_Bool AccessibleContextBase::IsDisposed (void) bool AccessibleContextBase::IsDisposed (void)
{ {
return (rBHelper.bDisposed || rBHelper.bInDispose); return (rBHelper.bDisposed || rBHelper.bInDispose);
} }

View File

@@ -133,7 +133,7 @@ public:
If the specified state changed its value due to this call If the specified state changed its value due to this call
<TRUE/> is returned, otherwise <FALSE/>. <TRUE/> is returned, otherwise <FALSE/>.
*/ */
virtual sal_Bool SetState (sal_Int16 aState); virtual bool SetState (sal_Int16 aState);
/** Reset the specified state (turn it off) and send events to all /** Reset the specified state (turn it off) and send events to all
listeners to inform them of the change. listeners to inform them of the change.
@@ -145,7 +145,7 @@ public:
If the specified state changed its value due to this call If the specified state changed its value due to this call
<TRUE/> is returned, otherwise <FALSE/>. <TRUE/> is returned, otherwise <FALSE/>.
*/ */
virtual sal_Bool ResetState (sal_Int16 aState); virtual bool ResetState (sal_Int16 aState);
/** Return the state of the specified state. /** Return the state of the specified state.
@@ -156,7 +156,7 @@ public:
A value of <TRUE/> indicates that the state is set. A <FALSE/> A value of <TRUE/> indicates that the state is set. A <FALSE/>
value indicates an unset state. value indicates an unset state.
*/ */
sal_Bool GetState (sal_Int16 aState); bool GetState (sal_Int16 aState);
/** Replace the current relation set with the specified one. Send /** Replace the current relation set with the specified one. Send
events for relations that are not in both sets. events for relations that are not in both sets.
@@ -334,7 +334,7 @@ protected:
@return TRUE, if the object is disposed or in the course @return TRUE, if the object is disposed or in the course
of being disposed. Otherwise, FALSE is returned. of being disposed. Otherwise, FALSE is returned.
*/ */
sal_Bool IsDisposed (void); bool IsDisposed (void);
/** sets the role as returned by XaccessibleContext::getAccessibleRole /** sets the role as returned by XaccessibleContext::getAccessibleRole

View File

@@ -131,7 +131,7 @@ protected:
#ifdef DBG_UTIL #ifdef DBG_UTIL
/// Set the specified state /// Set the specified state
virtual sal_Bool SetState( sal_Int16 _nState ); virtual bool SetState( sal_Int16 _nState );
#endif // DBG_UTIL #endif // DBG_UTIL
/// (safely) reads the given property from the model of the UNO control /// (safely) reads the given property from the model of the UNO control

View File

@@ -181,7 +181,7 @@ public:
The returned flag indicates whether the specified state has been The returned flag indicates whether the specified state has been
changed (<TRUE/>), i.e. it has formerly not been set. changed (<TRUE/>), i.e. it has formerly not been set.
*/ */
virtual sal_Bool SetState (sal_Int16 aState); virtual bool SetState (sal_Int16 aState);
/** Reset the specified state. If the state is <const>FOCUSED</const> /** Reset the specified state. If the state is <const>FOCUSED</const>
then, additionally to the inherited functionality, the focus then, additionally to the inherited functionality, the focus
@@ -195,7 +195,7 @@ public:
The returned flag indicates whether the specified state has been The returned flag indicates whether the specified state has been
changed (<TRUE/>), i.e. it has formerly been set. changed (<TRUE/>), i.e. it has formerly been set.
*/ */
virtual sal_Bool ResetState (sal_Int16 aState); virtual bool ResetState (sal_Int16 aState);
/** Return the state of the specified state. Take the /** Return the state of the specified state. Take the
<const>FOCUSED</const> state from the accessible edit engine. <const>FOCUSED</const> state from the accessible edit engine.

View File

@@ -131,8 +131,8 @@ public:
void getColumnAndRow( sal_Int32 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException ); void getColumnAndRow( sal_Int32 nChildIndex, sal_Int32& rnColumn, sal_Int32& rnRow ) throw (::com::sun::star::lang::IndexOutOfBoundsException );
// overwrite the SetState & ResetState to do special operation for table cell's internal text // overwrite the SetState & ResetState to do special operation for table cell's internal text
virtual sal_Bool SetState (sal_Int16 aState); virtual bool SetState (sal_Int16 aState);
virtual sal_Bool ResetState (sal_Int16 aState); virtual bool ResetState (sal_Int16 aState);
// The following two methods are used to set state directly on table object, instread of the internal cell or paragraph. // The following two methods are used to set state directly on table object, instread of the internal cell or paragraph.
sal_Bool SetStateDirectly (sal_Int16 aState); sal_Bool SetStateDirectly (sal_Int16 aState);
sal_Bool ResetStateDirectly (sal_Int16 aState); sal_Bool ResetStateDirectly (sal_Int16 aState);

View File

@@ -790,7 +790,7 @@ void AccessibleControlShape::adjustAccessibleRole( )
#ifdef DBG_UTIL #ifdef DBG_UTIL
sal_Bool AccessibleControlShape::SetState( sal_Int16 _nState ) bool AccessibleControlShape::SetState( sal_Int16 _nState )
{ {
OSL_ENSURE( !isAliveMode( m_xUnoControl ) || !isComposedState( _nState ), OSL_ENSURE( !isAliveMode( m_xUnoControl ) || !isComposedState( _nState ),
"AccessibleControlShape::SetState: a state which should be determined by the control context is set from outside!" ); "AccessibleControlShape::SetState: a state which should be determined by the control context is set from outside!" );

View File

@@ -263,9 +263,9 @@ bool AccessibleShape::operator== (const AccessibleShape& rShape)
sal_Bool AccessibleShape::SetState (sal_Int16 aState) bool AccessibleShape::SetState (sal_Int16 aState)
{ {
sal_Bool bStateHasChanged = sal_False; bool bStateHasChanged = false;
if (aState == AccessibleStateType::FOCUSED && mpText != NULL) if (aState == AccessibleStateType::FOCUSED && mpText != NULL)
{ {
@@ -284,9 +284,9 @@ sal_Bool AccessibleShape::SetState (sal_Int16 aState)
sal_Bool AccessibleShape::ResetState (sal_Int16 aState) bool AccessibleShape::ResetState (sal_Int16 aState)
{ {
sal_Bool bStateHasChanged = sal_False; bool bStateHasChanged = false;
if (aState == AccessibleStateType::FOCUSED && mpText != NULL) if (aState == AccessibleStateType::FOCUSED && mpText != NULL)
{ {

View File

@@ -97,9 +97,9 @@ void AccessibleCell::Init (void)
sal_Bool AccessibleCell::SetState (sal_Int16 aState) bool AccessibleCell::SetState (sal_Int16 aState)
{ {
sal_Bool bStateHasChanged = sal_False; bool bStateHasChanged = false;
if (aState == AccessibleStateType::FOCUSED && mpText != NULL) if (aState == AccessibleStateType::FOCUSED && mpText != NULL)
{ {
@@ -117,9 +117,9 @@ sal_Bool AccessibleCell::SetState (sal_Int16 aState)
sal_Bool AccessibleCell::ResetState (sal_Int16 aState) bool AccessibleCell::ResetState (sal_Int16 aState)
{ {
sal_Bool bStateHasChanged = sal_False; bool bStateHasChanged = false;
if (aState == AccessibleStateType::FOCUSED && mpText != NULL) if (aState == AccessibleStateType::FOCUSED && mpText != NULL)
{ {

View File

@@ -58,8 +58,8 @@ public:
virtual bool operator== (const AccessibleCell& rAccessibleCell); virtual bool operator== (const AccessibleCell& rAccessibleCell);
virtual sal_Bool SetState (sal_Int16 aState); virtual bool SetState (sal_Int16 aState);
virtual sal_Bool ResetState (sal_Int16 aState); virtual bool ResetState (sal_Int16 aState);
// XInterface // XInterface
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException, std::exception); virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException, std::exception);

View File

@@ -997,10 +997,10 @@ AccessibleCell* AccessibleTableShape::GetActiveAccessibleCell()
} }
//If current active cell is in editing, the focus state should be set to internal text //If current active cell is in editing, the focus state should be set to internal text
sal_Bool AccessibleTableShape::SetState (sal_Int16 aState) bool AccessibleTableShape::SetState (sal_Int16 aState)
{ {
AccessibleCell* pActiveAccessibleCell = GetActiveAccessibleCell(); AccessibleCell* pActiveAccessibleCell = GetActiveAccessibleCell();
sal_Bool bStateHasChanged = sal_False; bool bStateHasChanged = false;
if (aState == AccessibleStateType::FOCUSED && pActiveAccessibleCell != NULL) if (aState == AccessibleStateType::FOCUSED && pActiveAccessibleCell != NULL)
{ {
return pActiveAccessibleCell->SetState(aState); return pActiveAccessibleCell->SetState(aState);
@@ -1011,10 +1011,10 @@ sal_Bool AccessibleTableShape::SetState (sal_Int16 aState)
} }
//If current active cell is in editing, the focus state should be reset to internal text //If current active cell is in editing, the focus state should be reset to internal text
sal_Bool AccessibleTableShape::ResetState (sal_Int16 aState) bool AccessibleTableShape::ResetState (sal_Int16 aState)
{ {
AccessibleCell* pActiveAccessibleCell = GetActiveAccessibleCell(); AccessibleCell* pActiveAccessibleCell = GetActiveAccessibleCell();
sal_Bool bStateHasChanged = sal_False; bool bStateHasChanged = false;
if (aState == AccessibleStateType::FOCUSED && pActiveAccessibleCell != NULL) if (aState == AccessibleStateType::FOCUSED && pActiveAccessibleCell != NULL)
{ {
return pActiveAccessibleCell->ResetState(aState); return pActiveAccessibleCell->ResetState(aState);

View File

@@ -362,7 +362,7 @@ SwViewShell::~SwViewShell()
sal_Bool SwViewShell::HasDrawView() const sal_Bool SwViewShell::HasDrawView() const
{ {
return Imp() && Imp()->HasDrawView(); return (Imp() && Imp()->HasDrawView()) ? 1 : 0;
} }
void SwViewShell::MakeDrawView() void SwViewShell::MakeDrawView()