[Libreoffice-commits] core.git: svx/inc svx/source

Takeshi Abe tabe at fixedpoint.jp
Sat Mar 9 02:49:14 PST 2013


 svx/inc/svx/AccessibleControlShape.hxx                  |   12 ++--
 svx/source/accessibility/AccessibleControlShape.cxx     |   40 ++++++++--------
 svx/source/accessibility/AccessibleFrameSelector.cxx    |    2 
 svx/source/accessibility/AccessibleTextHelper.cxx       |   10 ++--
 svx/source/accessibility/svxrectctaccessiblecontext.cxx |   14 ++---
 svx/source/inc/svxrectctaccessiblecontext.hxx           |   22 ++++----
 6 files changed, 50 insertions(+), 50 deletions(-)

New commits:
commit 95184c4c45b69915cd78e10c7f0b6fcd1245d738
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Sat Mar 9 19:43:50 2013 +0900

    sal_Bool to bool
    
    Change-Id: I76139eb5878deebefcf20efaa3be78e800a85c01

diff --git a/svx/inc/svx/AccessibleControlShape.hxx b/svx/inc/svx/AccessibleControlShape.hxx
index 79a5475..a1df3ff 100644
--- a/svx/inc/svx/AccessibleControlShape.hxx
+++ b/svx/inc/svx/AccessibleControlShape.hxx
@@ -139,7 +139,7 @@ protected:
     sal_Bool ensureControlModelAccess( ) SAL_THROW(( ));
 
     /// ensures that we're listening for the given property if(and only if!) necessary
-    sal_Bool ensureListeningState( const sal_Bool _bCurrentlyListening, const sal_Bool _bNeedNewListening,
+    bool ensureListeningState( const bool _bCurrentlyListening, const bool _bNeedNewListening,
                 const ::rtl::OUString& _rPropertyName );
 
     /// starts multiplexing the state changes of our aggregate context
@@ -184,11 +184,11 @@ private:
     ::comphelper::OWrappedAccessibleChildrenManager*
                     m_pChildManager;
 
-    sal_Bool        m_bListeningForName     : 1;    // are we currently listening for changes of the "Name" property?
-    sal_Bool        m_bListeningForDesc     : 1;    // are we currently listening for changes of the "HelpText" property?
-    sal_Bool        m_bMultiplexingStates   : 1;    // are we currently multiplexing state changes of the native context?
-    sal_Bool        m_bDisposeNativeContext : 1;    // do we need to dispose mxNativeContextComponent?
-    sal_Bool        m_bWaitingForControl    : 1;    // if we are created before our control exists, we need to wait for it to appear ...
+    bool        m_bListeningForName     : 1;    // are we currently listening for changes of the "Name" property?
+    bool        m_bListeningForDesc     : 1;    // are we currently listening for changes of the "HelpText" property?
+    bool        m_bMultiplexingStates   : 1;    // are we currently multiplexing state changes of the native context?
+    bool        m_bDisposeNativeContext : 1;    // do we need to dispose mxNativeContextComponent?
+    bool        m_bWaitingForControl    : 1;    // if we are created before our control exists, we need to wait for it to appear ...
 
 private:
     /** Don't use the default constructor.  Use the public constructor that
diff --git a/svx/source/accessibility/AccessibleControlShape.cxx b/svx/source/accessibility/AccessibleControlShape.cxx
index 17084fe..536967f 100644
--- a/svx/source/accessibility/AccessibleControlShape.cxx
+++ b/svx/source/accessibility/AccessibleControlShape.cxx
@@ -85,7 +85,7 @@ namespace
     //................................................................
     // determines whether or not a state which belongs to the inner context needs to be forwarded to the "composed"
     // context
-    sal_Bool    isComposedState( const sal_Int16 _nState )
+    bool    isComposedState( const sal_Int16 _nState )
     {
         return  (   ( AccessibleStateType::INVALID != _nState )
                 &&  ( AccessibleStateType::DEFUNC != _nState )
@@ -101,7 +101,7 @@ namespace
     //................................................................
     /** determines whether the given control is in alive mode
     */
-    inline  sal_Bool    isAliveMode( const Reference< XControl >& _rxControl )
+    inline  bool    isAliveMode( const Reference< XControl >& _rxControl )
     {
         OSL_PRECOND( _rxControl.is(), "AccessibleControlShape::isAliveMode: invalid control" );
         return _rxControl.is() && !_rxControl->isDesignMode();
@@ -117,11 +117,11 @@ AccessibleControlShape::AccessibleControlShape (
     const AccessibleShapeInfo& rShapeInfo,
     const AccessibleShapeTreeInfo& rShapeTreeInfo)
     :      AccessibleShape (rShapeInfo, rShapeTreeInfo)
-    ,   m_bListeningForName( sal_False )
-    ,   m_bListeningForDesc( sal_False )
-    ,   m_bMultiplexingStates( sal_False )
-    ,   m_bDisposeNativeContext( sal_False )
-    ,   m_bWaitingForControl( sal_False )
+    ,   m_bListeningForName( false )
+    ,   m_bListeningForDesc( false )
+    ,   m_bMultiplexingStates( false )
+    ,   m_bDisposeNativeContext( false )
+    ,   m_bWaitingForControl( false )
 {
     m_pChildManager = new OWrappedAccessibleChildrenManager( getProcessComponentContext() );
     m_pChildManager->acquire();
@@ -225,7 +225,7 @@ void AccessibleControlShape::Init()
                 if ( xControlContainer.is() )
                 {
                     xControlContainer->addContainerListener( this );
-                    m_bWaitingForControl = sal_True;
+                    m_bWaitingForControl = true;
                 }
             }
             else
@@ -278,7 +278,7 @@ void AccessibleControlShape::Init()
                     }
                     osl_atomic_decrement( &m_refCount );
 
-                    m_bDisposeNativeContext = sal_True;
+                    m_bDisposeNativeContext = true;
 
                     // Finally, we need to add ourself as mode listener to the control. In case the mode switches,
                     // we need to dispose ourself.
@@ -367,7 +367,7 @@ void SAL_CALL AccessibleControlShape::grabFocus(void)  throw (RuntimeException)
                 aDG.AddProperty ( "ControlBorder", DescriptionGenerator::INTEGER, "");
             }
             // ensure that we are listening to the Name property
-            m_bListeningForDesc = ensureListeningState( m_bListeningForDesc, sal_True, lcl_getDescPropertyName() );
+            m_bListeningForDesc = ensureListeningState( m_bListeningForDesc, true, lcl_getDescPropertyName() );
         }
         break;
 
@@ -522,8 +522,8 @@ void SAL_CALL AccessibleControlShape::disposing (const EventObject& _rSource) th
 }
 
 //--------------------------------------------------------------------
-sal_Bool AccessibleControlShape::ensureListeningState(
-        const sal_Bool _bCurrentlyListening, const sal_Bool _bNeedNewListening,
+bool AccessibleControlShape::ensureListeningState(
+        const bool _bCurrentlyListening, const bool _bNeedNewListening,
         const ::rtl::OUString& _rPropertyName )
 {
     if ( ( _bCurrentlyListening == _bNeedNewListening ) || !ensureControlModelAccess() )
@@ -636,7 +636,7 @@ Reference< XAccessibleRelationSet > SAL_CALL AccessibleControlShape::getAccessib
     }
 
     // now that somebody first asked us for our name, ensure that we are listening to name changes on the model
-    m_bListeningForName = ensureListeningState( m_bListeningForName, sal_True, lcl_getPreferredAccNameProperty( m_xModelPropsMeta ) );
+    m_bListeningForName = ensureListeningState( m_bListeningForName, true, lcl_getPreferredAccNameProperty( m_xModelPropsMeta ) );
 
     return sName;
 }
@@ -645,8 +645,8 @@ Reference< XAccessibleRelationSet > SAL_CALL AccessibleControlShape::getAccessib
 void SAL_CALL AccessibleControlShape::disposing (void)
 {
     // ensure we're not listening
-    m_bListeningForName = ensureListeningState( m_bListeningForName, sal_False, lcl_getPreferredAccNameProperty( m_xModelPropsMeta ) );
-    m_bListeningForDesc = ensureListeningState( m_bListeningForDesc, sal_False, lcl_getDescPropertyName() );
+    m_bListeningForName = ensureListeningState( m_bListeningForName, false, lcl_getPreferredAccNameProperty( m_xModelPropsMeta ) );
+    m_bListeningForDesc = ensureListeningState( m_bListeningForDesc, false, lcl_getDescPropertyName() );
 
     if ( m_bMultiplexingStates )
         stopStateMultiplexing( );
@@ -666,7 +666,7 @@ void SAL_CALL AccessibleControlShape::disposing (void)
         Reference< XContainer > xContainer = lcl_getControlContainer( maShapeTreeInfo.GetWindow(), maShapeTreeInfo.GetSdrView() );
         if ( xContainer.is() )
         {
-            m_bWaitingForControl = sal_False;
+            m_bWaitingForControl = false;
             xContainer->removeContainerListener( this );
         }
     }
@@ -685,7 +685,7 @@ void SAL_CALL AccessibleControlShape::disposing (void)
         // do _not_ clear m_xControlContextProxy! This has to be done in the dtor for correct ref-count handling
 
         // no need to dispose the proxy/inner context anymore
-        m_bDisposeNativeContext = sal_False;
+        m_bDisposeNativeContext = false;
     }
 
     m_xUnoControl.clear();
@@ -735,7 +735,7 @@ void AccessibleControlShape::startStateMultiplexing()
     if ( xBroadcaster.is() )
     {
         xBroadcaster->addAccessibleEventListener( this );
-        m_bMultiplexingStates = sal_True;
+        m_bMultiplexingStates = true;
     }
 }
 
@@ -751,7 +751,7 @@ void AccessibleControlShape::stopStateMultiplexing()
     if ( xBroadcaster.is() )
     {
         xBroadcaster->removeAccessibleEventListener( this );
-        m_bMultiplexingStates = sal_False;
+        m_bMultiplexingStates = false;
     }
 }
 
@@ -878,7 +878,7 @@ void SAL_CALL AccessibleControlShape::elementInserted( const ::com::sun::star::c
         if ( xContainer.is() )
         {
             xContainer->removeContainerListener( this );
-            m_bWaitingForControl = sal_False;
+            m_bWaitingForControl = false;
         }
 
         // second, we need to replace ourself with a new version, which now can be based on the
diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx
index 7c60da1..ad36a0d 100644
--- a/svx/source/accessibility/AccessibleFrameSelector.cxx
+++ b/svx/source/accessibility/AccessibleFrameSelector.cxx
@@ -263,7 +263,7 @@ Reference< XAccessibleStateSet > AccFrameSelector::getAccessibleStateSet(  )
             pStateSetHelper->AddState(AccessibleStateType::SENSITIVE);
         }
 
-        sal_Bool bIsParent = meBorder == FRAMEBORDER_NONE;
+        bool bIsParent = meBorder == FRAMEBORDER_NONE;
         if(mpFrameSel->HasFocus() &&
             (bIsParent || mpFrameSel->IsBorderSelected(meBorder)))
         {
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx
index 6694a8f..179acb9 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -232,7 +232,7 @@ namespace accessibility
         AccessibleTextEventQueue maEventQueue;
 
         // spin lock to prevent notify in notify (guarded by solar mutex)
-        sal_Bool mbInNotify;
+        bool mbInNotify;
 
         // whether the object or it's children has the focus set (guarded by solar mutex)
         sal_Bool mbGroupHasFocus;
@@ -262,7 +262,7 @@ namespace accessibility
         mnLastVisibleChild( -2 ),
         mnStartIndex( 0 ),
         maEventOpenFrames( 0 ),
-        mbInNotify( sal_False ),
+        mbInNotify( false ),
         mbGroupHasFocus( sal_False ),
         mbThisHasFocus( sal_False ),
         maOffset(0,0),
@@ -1422,7 +1422,7 @@ namespace accessibility
         if( mbInNotify )
             return;
 
-        mbInNotify = sal_True;
+        mbInNotify = true;
 
         // determine hint type
         const SdrHint* pSdrHint = PTR_CAST( SdrHint, &rHint );
@@ -1535,10 +1535,10 @@ namespace accessibility
 #ifdef DBG_UTIL
             OSL_TRACE("AccessibleTextHelper_Impl::Notify: Unhandled exception.");
 #endif
-            mbInNotify = sal_False;
+            mbInNotify = false;
         }
 
-        mbInNotify = sal_False;
+        mbInNotify = false;
     }
 
     void AccessibleTextHelper_Impl::Dispose()
diff --git a/svx/source/accessibility/svxrectctaccessiblecontext.cxx b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
index 2d240b6..97898ea 100644
--- a/svx/source/accessibility/svxrectctaccessiblecontext.cxx
+++ b/svx/source/accessibility/svxrectctaccessiblecontext.cxx
@@ -66,7 +66,7 @@ namespace
 }
 
 
-static const ChildIndexToPointData* IndexToPoint( long nIndex, sal_Bool bAngleControl )
+static const ChildIndexToPointData* IndexToPoint( long nIndex, bool bAngleControl )
 {
     DBG_ASSERT( nIndex < ( bAngleControl? 8 : 9 ) && nIndex >= 0, "-IndexToPoint(): invalid child index! You have been warned..." );
 
@@ -101,7 +101,7 @@ static const ChildIndexToPointData* IndexToPoint( long nIndex, sal_Bool bAngleCo
 }
 
 
-static long PointToIndex( RECT_POINT ePoint, sal_Bool bAngleControl )
+static long PointToIndex( RECT_POINT ePoint, bool bAngleControl )
 {
     long    nRet( (long) ePoint );
     if( bAngleControl )
@@ -301,7 +301,7 @@ Reference< XAccessible > SAL_CALL SvxRectCtlAccessibleContext::getAccessibleChil
 
             // set actual state
             if( mnSelectedChild == nIndex )
-                pChild->setStateChecked( sal_True );
+                pChild->setStateChecked( true );
         }
     }
 
@@ -633,7 +633,7 @@ void SvxRectCtlAccessibleContext::selectChild( long nNew )
             {   // deselect old selected child if one is selected
                 pChild = mpChildren[ mnSelectedChild ];
                 if( pChild )
-                    pChild->setStateChecked( sal_False );
+                    pChild->setStateChecked( false );
             }
 
             // select new child
@@ -643,7 +643,7 @@ void SvxRectCtlAccessibleContext::selectChild( long nNew )
             {
                 pChild = mpChildren[ nNew ];
                 if( pChild )
-                    pChild->setStateChecked( sal_True );
+                    pChild->setStateChecked( true );
             }
         }
         else
@@ -759,7 +759,7 @@ SvxRectCtlChildAccessibleContext::SvxRectCtlChildAccessibleContext(
     mrParentWindow( rParentWindow ),
     mnClientId( 0 ),
     mnIndexInParent( nIndexInParent ),
-    mbIsChecked( sal_False )
+    mbIsChecked( false )
 {
     DBG_CTOR( SvxRectCtlChildAccessibleContext, NULL );
 }
@@ -1128,7 +1128,7 @@ Rectangle SvxRectCtlChildAccessibleContext::GetBoundingBox( void ) throw( Runtim
     return *mpBoundingBox;
 }
 
-void SvxRectCtlChildAccessibleContext::setStateChecked( sal_Bool bChecked )
+void SvxRectCtlChildAccessibleContext::setStateChecked( bool bChecked )
 {
     if( mbIsChecked != bChecked )
     {
diff --git a/svx/source/inc/svxrectctaccessiblecontext.hxx b/svx/source/inc/svxrectctaccessiblecontext.hxx
index ca77957..7575d76 100644
--- a/svx/source/inc/svxrectctaccessiblecontext.hxx
+++ b/svx/source/inc/svxrectctaccessiblecontext.hxx
@@ -264,10 +264,10 @@ protected:
     virtual void SAL_CALL disposing();
 
     /// @returns true if it's disposed or in disposing
-    inline sal_Bool IsAlive( void ) const;
+    inline bool IsAlive( void ) const;
 
     /// @returns true if it's not disposed and no in disposing
-    inline sal_Bool IsNotAlive( void ) const;
+    inline bool IsNotAlive( void ) const;
 
     /// throws the exception DisposedException if it's not alive
     void ThrowExceptionIfNotAlive( void ) throw( ::com::sun::star::lang::DisposedException );
@@ -299,15 +299,15 @@ private:
     long                                mnSelectedChild;
 
     /// mode of control (true -> 8 points, false -> 9 points)
-    sal_Bool                            mbAngleMode;
+    bool                            mbAngleMode;
 };
 
-inline sal_Bool SvxRectCtlAccessibleContext::IsAlive( void ) const
+inline bool SvxRectCtlAccessibleContext::IsAlive( void ) const
 {
     return !rBHelper.bDisposed && !rBHelper.bInDispose;
 }
 
-inline sal_Bool SvxRectCtlAccessibleContext::IsNotAlive( void ) const
+inline bool SvxRectCtlAccessibleContext::IsNotAlive( void ) const
 {
     return rBHelper.bDisposed || rBHelper.bInDispose;
 }
@@ -467,7 +467,7 @@ public:
     //===== internal ==========================================================
 
     /// Sets the checked status
-    void setStateChecked( sal_Bool bChecked );
+    void setStateChecked( bool bChecked );
 
 protected:
     virtual Rectangle GetBoundingBoxOnScreen( void ) throw( ::com::sun::star::uno::RuntimeException );
@@ -479,10 +479,10 @@ protected:
     virtual void SAL_CALL disposing();
 
     /// @returns true if it's disposed or in disposing
-    inline sal_Bool IsAlive( void ) const;
+    inline bool IsAlive( void ) const;
 
     /// @returns true if it's not disposed and no in disposing
-    inline sal_Bool IsNotAlive( void ) const;
+    inline bool IsNotAlive( void ) const;
 
     /// throws the exception DisposedException if it's not alive
     void ThrowExceptionIfNotAlive( void ) throw( ::com::sun::star::lang::DisposedException );
@@ -520,15 +520,15 @@ private:
     long                                mnIndexInParent;
 
     /// Indicates, if object is checked
-    sal_Bool                            mbIsChecked;
+    bool                            mbIsChecked;
 };
 
-inline sal_Bool SvxRectCtlChildAccessibleContext::IsAlive( void ) const
+inline bool SvxRectCtlChildAccessibleContext::IsAlive( void ) const
 {
     return !rBHelper.bDisposed && !rBHelper.bInDispose;
 }
 
-inline sal_Bool SvxRectCtlChildAccessibleContext::IsNotAlive( void ) const
+inline bool SvxRectCtlChildAccessibleContext::IsNotAlive( void ) const
 {
     return rBHelper.bDisposed || rBHelper.bInDispose;
 }


More information about the Libreoffice-commits mailing list