[Libreoffice-commits] core.git: 13 commits - basic/source drawinglayer/source framework/inc framework/source include/svtools include/vcl io/source stoc/source svl/source svtools/source toolkit/source UnoControls/source unotools/source vcl/generic vcl/inc vcl/source vcl/unx
Stephan Bergmann
sbergman at redhat.com
Tue Jan 21 10:25:22 PST 2014
UnoControls/source/base/basecontainercontrol.cxx | 6
UnoControls/source/base/basecontrol.cxx | 32 +-
UnoControls/source/base/multiplexer.cxx | 4
UnoControls/source/controls/OConnectionPointContainerHelper.cxx | 2
UnoControls/source/controls/OConnectionPointHelper.cxx | 2
UnoControls/source/controls/framecontrol.cxx | 4
UnoControls/source/controls/progressbar.cxx | 2
UnoControls/source/controls/progressmonitor.cxx | 2
UnoControls/source/controls/statusindicator.cxx | 10
basic/source/uno/dlgcont.cxx | 2
drawinglayer/source/primitive2d/baseprimitive2d.cxx | 4
drawinglayer/source/primitive3d/baseprimitive3d.cxx | 4
framework/inc/macros/registration.hxx | 2
framework/inc/macros/xinterface.hxx | 6
framework/source/dispatch/menudispatcher.cxx | 15 -
framework/source/fwe/classes/addonsoptions.cxx | 2
framework/source/helper/dockingareadefaultacceptor.cxx | 10
framework/source/helper/ocomponentaccess.cxx | 25 --
framework/source/helper/ocomponentenumeration.cxx | 13 -
framework/source/helper/oframes.cxx | 56 ----
framework/source/layoutmanager/layoutmanager.cxx | 2
framework/source/services/desktop.cxx | 27 --
framework/source/services/frame.cxx | 114 ++--------
framework/source/uielement/macrosmenucontroller.cxx | 2
include/svtools/editbrowsebox.hxx | 4
include/vcl/font.hxx | 2
include/vcl/window.hxx | 10
io/source/stm/odata.cxx | 2
stoc/source/servicemanager/servicemanager.cxx | 2
svl/source/fsstor/fsstorage.cxx | 2
svl/source/fsstor/oinputstreamcontainer.cxx | 2
svl/source/fsstor/ostreamcontainer.cxx | 12 -
svl/source/items/srchitem.cxx | 24 +-
svtools/source/brwbox/editbrowsebox.cxx | 6
svtools/source/config/menuoptions.cxx | 4
svtools/source/config/miscopt.cxx | 6
svtools/source/config/optionsdrawinglayer.cxx | 2
svtools/source/config/slidesorterbaropt.cxx | 4
svtools/source/config/toolpanelopt.cxx | 4
svtools/source/hatchwindow/hatchwindow.cxx | 2
svtools/source/misc/xwindowitem.cxx | 2
svtools/source/uno/treecontrolpeer.cxx | 4
toolkit/source/helper/unowrapper.cxx | 2
unotools/source/config/configitem.cxx | 2
unotools/source/config/eventcfg.cxx | 2
unotools/source/config/extendedsecurityoptions.cxx | 2
unotools/source/config/fontoptions.cxx | 2
unotools/source/config/printwarningoptions.cxx | 2
vcl/generic/print/glyphset.cxx | 2
vcl/generic/print/glyphset.hxx | 2
vcl/inc/window.h | 2
vcl/source/control/button.cxx | 4
vcl/source/gdi/font.cxx | 2
vcl/source/window/window.cxx | 10
vcl/unx/generic/printer/ppdparser.cxx | 2
vcl/unx/gtk/a11y/atkwindow.cxx | 2
vcl/unx/gtk/gdi/salprn-gtk.cxx | 2
vcl/unx/gtk/window/gtksalmenu.cxx | 4
58 files changed, 179 insertions(+), 307 deletions(-)
New commits:
commit 1115adbb5dc2dc05354f2a24a27cb37e522c92b4
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 21 18:22:24 2014 +0100
bool improvements
Change-Id: I1588e6dcbc095d8c5fcde3601eea9111fbae15fb
diff --git a/framework/inc/macros/registration.hxx b/framework/inc/macros/registration.hxx
index 74b5420..db2b95c 100644
--- a/framework/inc/macros/registration.hxx
+++ b/framework/inc/macros/registration.hxx
@@ -78,7 +78,7 @@ ________________________________________________________________________________
/* IF_NAME_CREATECOMPONENTFACTORY(z)" */ \
IFFACTORIES \
/* Factory is valid, if service was found. */ \
- if ( xFactory.is() == sal_True ) \
+ if ( xFactory.is() ) \
{ \
xFactory->acquire(); \
pReturn = xFactory.get(); \
diff --git a/framework/inc/macros/xinterface.hxx b/framework/inc/macros/xinterface.hxx
index c126696..9ce2bbc 100644
--- a/framework/inc/macros/xinterface.hxx
+++ b/framework/inc/macros/xinterface.hxx
@@ -88,7 +88,7 @@ ________________________________________________________________________________
::com::sun::star::uno::Any aReturn ( ::cppu::queryInterface INTERFACES \
); \
/* If searched interface not supported by this class ... */ \
- if ( aReturn.hasValue() == sal_False ) \
+ if ( !aReturn.hasValue() ) \
{ \
/* ... ask baseclass for interfaces! */ \
aReturn = BASECLASS::queryInterface( aType ); \
@@ -109,12 +109,12 @@ ________________________________________________________________________________
::com::sun::star::uno::Any aReturn ( ::cppu::queryInterface INTERFACES_FIRST \
); \
/* If searched interface not supported by first group ... */ \
- if ( aReturn.hasValue() == sal_False ) \
+ if ( !aReturn.hasValue() ) \
{ \
/* ... search in second group. (cppuhelper support 12 items only!) */ \
aReturn = ::cppu::queryInterface INTERFACES_SECOND ; \
/* If searched interface not supported by this class ... */ \
- if ( aReturn.hasValue() == sal_False ) \
+ if ( !aReturn.hasValue() ) \
{ \
/* ... ask baseclass for interfaces! */ \
aReturn = BASECLASS::queryInterface( aType ); \
diff --git a/framework/source/dispatch/menudispatcher.cxx b/framework/source/dispatch/menudispatcher.cxx
index fbf1ba1..6742625 100644
--- a/framework/source/dispatch/menudispatcher.cxx
+++ b/framework/source/dispatch/menudispatcher.cxx
@@ -315,20 +315,7 @@ sal_Bool MenuDispatcher::impl_setMenuBar( MenuBar* pMenuBar, sal_Bool bMenuFromR
static sal_Bool impldbg_checkParameter_MenuDispatcher( const uno::Reference< XComponentContext >& xContext ,
const uno::Reference< XFrame >& xOwner )
{
- // Set default return value.
- sal_Bool bOK = sal_True;
- // Check parameter.
- if (
- ( &xContext == NULL ) ||
- ( &xOwner == NULL ) ||
- ( xContext.is() == sal_False ) ||
- ( xOwner.is() == sal_False )
- )
- {
- bOK = sal_False ;
- }
- // Return result of check.
- return bOK ;
+ return xContext.is() && xOwner.is();
}
//*****************************************************************************************************************
diff --git a/framework/source/helper/dockingareadefaultacceptor.cxx b/framework/source/helper/dockingareadefaultacceptor.cxx
index 810c692..651f300 100644
--- a/framework/source/helper/dockingareadefaultacceptor.cxx
+++ b/framework/source/helper/dockingareadefaultacceptor.cxx
@@ -77,13 +77,12 @@ sal_Bool SAL_CALL DockingAreaDefaultAcceptor::requestDockingAreaSpace( const css
css::uno::Reference< XFrame > xFrame( m_xOwner.get(), UNO_QUERY );
aGuard.unlock();
- if ( xFrame.is() == sal_True )
+ if ( xFrame.is() )
{
css::uno::Reference< css::awt::XWindow > xContainerWindow( xFrame->getContainerWindow() );
css::uno::Reference< css::awt::XWindow > xComponentWindow( xFrame->getComponentWindow() );
- if (( xContainerWindow.is() == sal_True ) &&
- ( xComponentWindow.is() == sal_True ) )
+ if ( xContainerWindow.is() && xComponentWindow.is() )
{
css::uno::Reference< css::awt::XDevice > xDevice( xContainerWindow, css::uno::UNO_QUERY );
// Convert relativ size to output size.
@@ -113,13 +112,12 @@ void SAL_CALL DockingAreaDefaultAcceptor::setDockingAreaSpace( const css::awt::R
// Try to "lock" the frame for access to taskscontainer.
css::uno::Reference< XFrame > xFrame( m_xOwner.get(), UNO_QUERY );
- if ( xFrame.is() == sal_True )
+ if ( xFrame.is() )
{
css::uno::Reference< css::awt::XWindow > xContainerWindow( xFrame->getContainerWindow() );
css::uno::Reference< css::awt::XWindow > xComponentWindow( xFrame->getComponentWindow() );
- if (( xContainerWindow.is() == sal_True ) &&
- ( xComponentWindow.is() == sal_True ) )
+ if ( xContainerWindow.is() && xComponentWindow.is() )
{
css::uno::Reference< css::awt::XDevice > xDevice( xContainerWindow, css::uno::UNO_QUERY );
// Convert relativ size to output size.
diff --git a/framework/source/helper/ocomponentaccess.cxx b/framework/source/helper/ocomponentaccess.cxx
index 85e62cd..39894a8 100644
--- a/framework/source/helper/ocomponentaccess.cxx
+++ b/framework/source/helper/ocomponentaccess.cxx
@@ -70,7 +70,7 @@ css::uno::Reference< XEnumeration > SAL_CALL OComponentAccess::createEnumeration
// Try to "lock" the desktop for access to task container.
css::uno::Reference< XInterface > xLock = m_xOwner.get();
- if ( xLock.is() == sal_True )
+ if ( xLock.is() )
{
// Desktop exist => pointer to task container must be valid.
// Initialize a new enumeration ... if some tasks and his components exist!
@@ -109,7 +109,7 @@ sal_Bool SAL_CALL OComponentAccess::hasElements() throw( RuntimeException )
// Try to "lock" the desktop for access to task container.
css::uno::Reference< XFramesSupplier > xLock( m_xOwner.get(), UNO_QUERY );
- if ( xLock.is() == sal_True )
+ if ( xLock.is() )
{
// Ask container of owner for existing elements.
bReturn = xLock->getFrames()->hasElements();
@@ -126,7 +126,7 @@ void OComponentAccess::impl_collectAllChildComponents( const css::uno::Refere
Sequence< css::uno::Reference< XComponent > >& seqComponents )
{
// If valid node was given ...
- if( xNode.is() == sal_True )
+ if( xNode.is() )
{
// ... continue collection at these.
@@ -142,7 +142,7 @@ void OComponentAccess::impl_collectAllChildComponents( const css::uno::Refere
for( sal_Int32 nFrame=0; nFrame<nFrameCount; ++nFrame )
{
css::uno::Reference< XComponent > xComponent = impl_getFrameComponent( seqFrames[nFrame] );
- if( xComponent.is() == sal_True )
+ if( xComponent.is() )
{
nComponentCount++;
seqComponents.realloc( nComponentCount );
@@ -162,7 +162,7 @@ css::uno::Reference< XComponent > OComponentAccess::impl_getFrameComponent( cons
css::uno::Reference< XComponent > xComponent = css::uno::Reference< XComponent >();
// Does no controller exists?
css::uno::Reference< XController > xController = xFrame->getController();
- if ( xController.is() == sal_False )
+ if ( !xController.is() )
{
// Controller not exist - use the VCL-component.
xComponent = css::uno::Reference< XComponent >( xFrame->getComponentWindow(), UNO_QUERY );
@@ -171,7 +171,7 @@ css::uno::Reference< XComponent > OComponentAccess::impl_getFrameComponent( cons
{
// Does no model exists?
css::uno::Reference< XModel > xModel( xController->getModel(), UNO_QUERY );
- if ( xModel.is() == sal_True )
+ if ( xModel.is() )
{
// Model exist - use the model as component.
xComponent = css::uno::Reference< XComponent >( xModel, UNO_QUERY );
@@ -203,18 +203,7 @@ css::uno::Reference< XComponent > OComponentAccess::impl_getFrameComponent( cons
//*****************************************************************************************************************
sal_Bool OComponentAccess::impldbg_checkParameter_OComponentAccessCtor( const css::uno::Reference< XDesktop >& xOwner )
{
- // Set default return value.
- sal_Bool bOK = sal_True;
- // Check parameter.
- if (
- ( &xOwner == NULL ) ||
- ( xOwner.is() == sal_False )
- )
- {
- bOK = sal_False ;
- }
- // Return result of check.
- return bOK ;
+ return xOwner.is();
}
} // namespace framework
diff --git a/framework/source/helper/ocomponentenumeration.cxx b/framework/source/helper/ocomponentenumeration.cxx
index 2a3de3b..1ef3755 100644
--- a/framework/source/helper/ocomponentenumeration.cxx
+++ b/framework/source/helper/ocomponentenumeration.cxx
@@ -174,18 +174,7 @@ sal_Bool OComponentEnumeration::impldbg_checkParameter_OComponentEnumerationCtor
//*****************************************************************************************************************
sal_Bool OComponentEnumeration::impldbg_checkParameter_disposing( const EventObject& aEvent )
{
- // Set default return value.
- sal_Bool bOK = sal_True;
- // Check parameter.
- if (
- ( &aEvent == NULL ) ||
- ( aEvent.Source.is() == sal_False )
- )
- {
- bOK = sal_False ;
- }
- // Return result of check.
- return bOK ;
+ return aEvent.Source.is();
}
} // namespace framework
diff --git a/framework/source/helper/oframes.cxx b/framework/source/helper/oframes.cxx
index 73fa918..9ee7777 100644
--- a/framework/source/helper/oframes.cxx
+++ b/framework/source/helper/oframes.cxx
@@ -78,7 +78,7 @@ void SAL_CALL OFrames::append( const css::uno::Reference< XFrame >& xFrame ) thr
// Do the follow only, if owner instance valid!
// Lock owner for follow operations - make a "hard reference"!
css::uno::Reference< XFramesSupplier > xOwner( m_xOwner.get(), UNO_QUERY );
- if ( xOwner.is() == sal_True )
+ if ( xOwner.is() )
{
// Append frame to the end of the container ...
m_pFrameContainer->append( xFrame );
@@ -104,7 +104,7 @@ void SAL_CALL OFrames::remove( const css::uno::Reference< XFrame >& xFrame ) thr
// Do the follow only, if owner instance valid!
// Lock owner for follow operations - make a "hard reference"!
css::uno::Reference< XFramesSupplier > xOwner( m_xOwner.get(), UNO_QUERY );
- if ( xOwner.is() == sal_True )
+ if ( xOwner.is() )
{
// Search frame and remove it from container ...
m_pFrameContainer->remove( xFrame );
@@ -134,7 +134,7 @@ Sequence< css::uno::Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int
// Do the follow only, if owner instance valid.
// Lock owner for follow operations - make a "hard reference"!
css::uno::Reference< XFrame > xOwner( m_xOwner.get(), UNO_QUERY );
- if ( xOwner.is() == sal_True )
+ if ( xOwner.is() )
{
// Work only, if search was not started here ...!
if( m_bRecursiveSearchProtection == sal_False )
@@ -160,7 +160,7 @@ Sequence< css::uno::Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int
if( nSearchFlags & FrameSearchFlag::PARENT )
{
css::uno::Reference< XFrame > xParent( xOwner->getCreator(), UNO_QUERY );
- if( xParent.is() == sal_True )
+ if( xParent.is() )
{
Sequence< css::uno::Reference< XFrame > > seqParent( 1 );
seqParent[0] = xParent;
@@ -187,7 +187,7 @@ Sequence< css::uno::Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int
// Ask parent of my owner for frames and append results to return list.
css::uno::Reference< XFramesSupplier > xParent( xOwner->getCreator(), UNO_QUERY );
// If a parent exist ...
- if ( xParent.is() == sal_True )
+ if ( xParent.is() )
{
// ... ask him for right frames.
impl_appendSequence( seqFrames, xParent->getFrames()->queryFrames( nSearchFlags ) );
@@ -237,7 +237,7 @@ sal_Int32 SAL_CALL OFrames::getCount() throw( RuntimeException )
// Do the follow only, if owner instance valid.
// Lock owner for follow operations - make a "hard reference"!
css::uno::Reference< XFrame > xOwner( m_xOwner.get(), UNO_QUERY );
- if ( xOwner.is() == sal_True )
+ if ( xOwner.is() )
{
// Set CURRENT size of container for return.
nCount = m_pFrameContainer->getCount();
@@ -268,7 +268,7 @@ Any SAL_CALL OFrames::getByIndex( sal_Int32 nIndex ) throw( IndexOutOfBoundsExce
// Do the follow only, if owner instance valid.
// Lock owner for follow operations - make a "hard reference"!
css::uno::Reference< XFrame > xOwner( m_xOwner.get(), UNO_QUERY );
- if ( xOwner.is() == sal_True )
+ if ( xOwner.is() )
{
// Get element form container.
// (If index not valid, FrameContainer return NULL!)
@@ -301,7 +301,7 @@ sal_Bool SAL_CALL OFrames::hasElements() throw( RuntimeException )
// Do the follow only, if owner instance valid.
// Lock owner for follow operations - make a "hard reference"!
css::uno::Reference< XFrame > xOwner( m_xOwner.get(), UNO_QUERY );
- if ( xOwner.is() == sal_True )
+ if ( xOwner.is() )
{
// If some elements exist ...
if ( m_pFrameContainer->getCount() > 0 )
@@ -391,19 +391,7 @@ void OFrames::impl_appendSequence( Sequence< css::uno::Reference< XFram
sal_Bool OFrames::impldbg_checkParameter_OFramesCtor( const css::uno::Reference< XFrame >& xOwner ,
FrameContainer* pFrameContainer )
{
- // Set default return value.
- sal_Bool bOK = sal_True;
- // Check parameter.
- if (
- ( &xOwner == NULL ) ||
- ( xOwner.is() == sal_False ) ||
- ( pFrameContainer == NULL )
- )
- {
- bOK = sal_False ;
- }
- // Return result of check.
- return bOK ;
+ return xOwner.is() && pFrameContainer != 0;
}
//*****************************************************************************************************************
@@ -411,18 +399,7 @@ sal_Bool OFrames::impldbg_checkParameter_OFramesCtor( const css::uno::Refere
// AND - alle frames must support XFrames-interface!
sal_Bool OFrames::impldbg_checkParameter_append( const css::uno::Reference< XFrame >& xFrame )
{
- // Set default return value.
- sal_Bool bOK = sal_True;
- // Check parameter.
- if (
- ( &xFrame == NULL ) ||
- ( xFrame.is() == sal_False )
- )
- {
- bOK = sal_False ;
- }
- // Return result of check.
- return bOK ;
+ return xFrame.is();
}
//*****************************************************************************************************************
@@ -430,18 +407,7 @@ sal_Bool OFrames::impldbg_checkParameter_append( const css::uno::Reference< XFra
// ... => You can only delete valid references!
sal_Bool OFrames::impldbg_checkParameter_remove( const css::uno::Reference< XFrame >& xFrame )
{
- // Set default return value.
- sal_Bool bOK = sal_True;
- // Check parameter.
- if (
- ( &xFrame == NULL ) ||
- ( xFrame.is() == sal_False )
- )
- {
- bOK = sal_False ;
- }
- // Return result of check.
- return bOK ;
+ return xFrame.is();
}
//*****************************************************************************************************************
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 5fdcfdd..c3710c0 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -2706,7 +2706,7 @@ throw( uno::RuntimeException )
// the container window of my DockingAreaAcceptor is not the same as of my frame
// I still have to resize my frames' window as nobody else will do it
Reference< awt::XWindow > xComponentWindow( m_xFrame->getComponentWindow() );
- if( xComponentWindow.is() == sal_True )
+ if( xComponentWindow.is() )
{
uno::Reference< awt::XDevice > xDevice( m_xFrame->getContainerWindow(), uno::UNO_QUERY );
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx
index 2ab1d3a..d3715ed 100644
--- a/framework/source/services/desktop.cxx
+++ b/framework/source/services/desktop.cxx
@@ -530,7 +530,7 @@ css::uno::Reference< css::lang::XComponent > SAL_CALL Desktop::getCurrentCompone
// ... get component of this frame ... (It can be the window, the model or the controller.)
// ... and return the result.
css::uno::Reference< css::frame::XFrame > xCurrentFrame = getCurrentFrame();
- if( xCurrentFrame.is() == sal_True )
+ if( xCurrentFrame.is() )
{
xComponent = impl_getFrameComponent( xCurrentFrame );
}
@@ -564,10 +564,10 @@ css::uno::Reference< css::frame::XFrame > SAL_CALL Desktop::getCurrentFrame() th
// Search on his children for other active frames too.
// Stop if no one could be found and return last of found ones.
css::uno::Reference< css::frame::XFramesSupplier > xLast = css::uno::Reference< css::frame::XFramesSupplier >( getActiveFrame(), css::uno::UNO_QUERY );
- if( xLast.is() == sal_True )
+ if( xLast.is() )
{
css::uno::Reference< css::frame::XFramesSupplier > xNext = css::uno::Reference< css::frame::XFramesSupplier >( xLast->getActiveFrame(), css::uno::UNO_QUERY );
- while( xNext.is() == sal_True )
+ while( xNext.is() )
{
xLast = xNext;
xNext = css::uno::Reference< css::frame::XFramesSupplier >( xNext->getActiveFrame(), css::uno::UNO_QUERY );
@@ -811,7 +811,7 @@ void SAL_CALL Desktop::setActiveFrame( const css::uno::Reference< css::frame::XF
if( xLastActiveChild != xFrame )
{
m_aChildTaskContainer.setActive( xFrame );
- if( xLastActiveChild.is() == sal_True )
+ if( xLastActiveChild.is() )
{
xLastActiveChild->deactivate();
}
@@ -1688,7 +1688,7 @@ css::uno::Reference< css::lang::XComponent > Desktop::impl_getFrameComponent( co
css::uno::Reference< css::lang::XComponent > xComponent;
// Does no controller exists?
css::uno::Reference< css::frame::XController > xController = xFrame->getController();
- if( xController.is() == sal_False )
+ if( !xController.is() )
{
// Controller not exist - use the VCL-component.
xComponent = css::uno::Reference< css::lang::XComponent >( xFrame->getComponentWindow(), css::uno::UNO_QUERY );
@@ -1697,7 +1697,7 @@ css::uno::Reference< css::lang::XComponent > Desktop::impl_getFrameComponent( co
{
// Does no model exists?
css::uno::Reference< css::frame::XModel > xModel( xController->getModel(), css::uno::UNO_QUERY );
- if( xModel.is() == sal_True )
+ if( xModel.is() )
{
// Model exist - use the model as component.
xComponent = css::uno::Reference< css::lang::XComponent >( xModel, css::uno::UNO_QUERY );
@@ -1935,28 +1935,19 @@ void Desktop::impl_sendNotifyTerminationEvent()
// We work with valid servicemanager only.
sal_Bool Desktop::implcp_ctor( const css::uno::Reference< css::uno::XComponentContext >& xContext )
{
- return(
- ( &xContext == NULL ) ||
- ( xContext.is() == sal_False )
- );
+ return !xContext.is();
}
// We work with valid listener only.
sal_Bool Desktop::implcp_addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener )
{
- return(
- ( &xListener == NULL ) ||
- ( xListener.is() == sal_False )
- );
+ return !xListener.is();
}
// We work with valid listener only.
sal_Bool Desktop::implcp_removeEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener )
{
- return(
- ( &xListener == NULL ) ||
- ( xListener.is() == sal_False )
- );
+ return !xListener.is();
}
} // namespace framework
diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx
index 09fd420..590d411 100644
--- a/framework/source/services/frame.cxx
+++ b/framework/source/services/frame.cxx
@@ -807,14 +807,14 @@ void SAL_CALL Frame::setActiveFrame( const css::uno::Reference< css::frame::XFra
m_aChildFrameContainer.setActive( xFrame );
if (
( eActiveState != E_INACTIVE ) &&
- ( xActiveChild.is() == sal_True )
+ xActiveChild.is()
)
{
xActiveChild->deactivate();
}
}
- if( xFrame.is() == sal_True )
+ if( xFrame.is() )
{
// If last active frame had focus ...
// ... reset state to ACTIVE and send right FrameActionEvent for focus lost.
@@ -1447,7 +1447,7 @@ void SAL_CALL Frame::activate() throw( css::uno::RuntimeException )
m_eActiveState = eState;
aWriteLock.unlock();
// Deactivate sibling path and forward activation to parent ... if any parent exist!
- if( xParent.is() == sal_True )
+ if( xParent.is() )
{
// Everytime set THIS frame as active child of parent and activate it.
// We MUST have a valid path from bottom to top as active path!
@@ -1475,21 +1475,14 @@ void SAL_CALL Frame::activate() throw( css::uno::RuntimeException )
// But ouer direct child of path is not active yet.
// (It can be, if activation occur in the middle of a current path!)
// In these case we activate path to bottom to set focus on right frame!
- if (
- ( eState == E_ACTIVE ) &&
- ( xActiveChild.is() == sal_True ) &&
- ( xActiveChild->isActive() == sal_False )
- )
+ if ( eState == E_ACTIVE && xActiveChild.is() && !xActiveChild->isActive() )
{
xActiveChild->activate();
}
//_________________________________________________________________________________________________________
// 3) I was active before or current activated. But if I have no active child => I will get the focus!
- if (
- ( eState == E_ACTIVE ) &&
- ( xActiveChild.is() == sal_False )
- )
+ if ( eState == E_ACTIVE && !xActiveChild.is() )
{
aWriteLock.lock();
eState = E_FOCUS;
@@ -1537,10 +1530,7 @@ void SAL_CALL Frame::deactivate() throw( css::uno::RuntimeException )
{
//_____________________________________________________________________________________________________
// 1) Deactivate all active children.
- if (
- ( xActiveChild.is() == sal_True ) &&
- ( xActiveChild->isActive() == sal_True )
- )
+ if ( xActiveChild.is() && xActiveChild->isActive() )
{
xActiveChild->deactivate();
}
@@ -1575,10 +1565,7 @@ void SAL_CALL Frame::deactivate() throw( css::uno::RuntimeException )
// ... I'am on the top or in the middle of deactivated subtree and action was started here.
// I must deactivate all frames from here to top, which are members of current path.
// Stop, if THESE frame not the active frame of ouer parent!
- if (
- ( xParent.is() == sal_True ) &&
- ( xParent->getActiveFrame() == xThis )
- )
+ if ( xParent.is() && xParent->getActiveFrame() == xThis )
{
// We MUST break the path - otherwise we will get the focus - not ouer parent! ...
// Attention: Ouer parent don't call us again - WE ARE NOT ACTIVE YET!
@@ -2261,7 +2248,7 @@ void SAL_CALL Frame::dispose() throw( css::uno::RuntimeException )
// It's important to do that before we free some other internal structures.
// Because if our parent gets an activate and found us as last possible active frame
// he try to deactivate us ... and we run into some trouble (DisposedExceptions!).
- if( m_xParent.is() == sal_True )
+ if( m_xParent.is() )
{
m_xParent->getFrames()->remove( xThis );
m_xParent = css::uno::Reference< css::frame::XFramesSupplier >();
@@ -2582,7 +2569,7 @@ void SAL_CALL Frame::focusGained( const css::awt::FocusEvent& aEvent ) throw( cs
aReadLock.unlock();
/* UNSAFE AREA --------------------------------------------------------------------------------------------- */
- if( xComponentWindow.is() == sal_True )
+ if( xComponentWindow.is() )
{
xComponentWindow->setFocus();
}
@@ -2652,10 +2639,8 @@ void SAL_CALL Frame::windowDeactivated( const css::lang::EventObject& aEvent ) t
// is a parent window of the last active Window!
SolarMutexClearableGuard aSolarGuard;
Window* pFocusWindow = Application::GetFocusWindow();
- if (
- ( xContainerWindow.is() == sal_True ) &&
- ( xParent.is() == sal_True ) &&
- ( (css::uno::Reference< css::frame::XDesktop >( xParent, css::uno::UNO_QUERY )).is() == sal_False )
+ if ( xContainerWindow.is() && xParent.is() &&
+ !css::uno::Reference< css::frame::XDesktop >( xParent, css::uno::UNO_QUERY ).is()
)
{
css::uno::Reference< css::awt::XWindow > xParentWindow = xParent->getContainerWindow() ;
@@ -2668,7 +2653,7 @@ void SAL_CALL Frame::windowDeactivated( const css::lang::EventObject& aEvent ) t
if( pFocusWindow && pParentWindow->IsChild( pFocusWindow ) )
{
css::uno::Reference< css::frame::XFramesSupplier > xSupplier( xParent, css::uno::UNO_QUERY );
- if( xSupplier.is() == sal_True )
+ if( xSupplier.is() )
{
aSolarGuard.clear();
xSupplier->setActiveFrame( css::uno::Reference< css::frame::XFrame >() );
@@ -3071,7 +3056,7 @@ css::uno::Any SAL_CALL Frame::impl_getPropertyValue(const OUString& /*sProperty*
*//*-*****************************************************************************************************/
void Frame::impl_disposeContainerWindow( css::uno::Reference< css::awt::XWindow >& xWindow )
{
- if( xWindow.is() == sal_True )
+ if( xWindow.is() )
{
xWindow->setVisible( sal_False );
// All VclComponents are XComponents; so call dispose before discarding
@@ -3162,7 +3147,7 @@ void Frame::implts_resizeComponentWindow()
if ( !m_xLayoutManager.is() )
{
css::uno::Reference< css::awt::XWindow > xComponentWindow( getComponentWindow() );
- if( xComponentWindow.is() == sal_True )
+ if( xComponentWindow.is() )
{
css::uno::Reference< css::awt::XDevice > xDevice( getContainerWindow(), css::uno::UNO_QUERY );
@@ -3205,10 +3190,7 @@ void Frame::implts_setIconOnWindow()
aReadLock.unlock();
/* UNSAFE AREA --------------------------------------------------------------------------------------------- */
- if(
- ( xContainerWindow.is() == sal_True ) &&
- ( xController.is() == sal_True )
- )
+ if( xContainerWindow.is() && xController.is() )
{
//-------------------------------------------------------------------------------------------------------------
// a) set default value to an invalid one. So we can start further searches for right icon id, if
@@ -3220,7 +3202,7 @@ void Frame::implts_setIconOnWindow()
// b) try to find information on controller propertyset directly
// Don't forget to catch possible exceptions - because these property is an optional one!
css::uno::Reference< css::beans::XPropertySet > xSet( xController, css::uno::UNO_QUERY );
- if( xSet.is() == sal_True )
+ if( xSet.is() )
{
try
{
@@ -3240,7 +3222,7 @@ void Frame::implts_setIconOnWindow()
if( nIcon == -1 )
{
css::uno::Reference< css::frame::XModel > xModel = xController->getModel();
- if( xModel.is() == sal_True )
+ if( xModel.is() )
{
SvtModuleOptions::EFactory eFactory = SvtModuleOptions::ClassifyFactoryByModel(xModel);
if (eFactory != SvtModuleOptions::E_UNKNOWN_FACTORY)
@@ -3309,19 +3291,19 @@ void Frame::implts_startWindowListening()
aReadLock.unlock();
/* UNSAFE AREA --------------------------------------------------------------------------------------------- */
- if( xContainerWindow.is() == sal_True )
+ if( xContainerWindow.is() )
{
xContainerWindow->addWindowListener( xWindowListener);
xContainerWindow->addFocusListener ( xFocusListener );
css::uno::Reference< css::awt::XTopWindow > xTopWindow( xContainerWindow, css::uno::UNO_QUERY );
- if( xTopWindow.is() == sal_True )
+ if( xTopWindow.is() )
{
xTopWindow->addTopWindowListener( xTopWindowListener );
css::uno::Reference< css::awt::XToolkit2 > xToolkit = css::awt::Toolkit::create( xContext );
css::uno::Reference< css::datatransfer::dnd::XDropTarget > xDropTarget = xToolkit->getDropTarget( xContainerWindow );
- if( xDropTarget.is() == sal_True )
+ if( xDropTarget.is() )
{
xDropTarget->addDropTargetListener( xDragDropListener );
xDropTarget->setActive( sal_True );
@@ -3349,19 +3331,19 @@ void Frame::implts_stopWindowListening()
aReadLock.unlock();
/* UNSAFE AREA --------------------------------------------------------------------------------------------- */
- if( xContainerWindow.is() == sal_True )
+ if( xContainerWindow.is() )
{
xContainerWindow->removeWindowListener( xWindowListener);
xContainerWindow->removeFocusListener ( xFocusListener );
css::uno::Reference< css::awt::XTopWindow > xTopWindow( xContainerWindow, css::uno::UNO_QUERY );
- if( xTopWindow.is() == sal_True )
+ if( xTopWindow.is() )
{
xTopWindow->removeTopWindowListener( xTopWindowListener );
css::uno::Reference< css::awt::XToolkit2 > xToolkit = css::awt::Toolkit::create( xContext );
css::uno::Reference< css::datatransfer::dnd::XDropTarget > xDropTarget = xToolkit->getDropTarget( xContainerWindow );
- if( xDropTarget.is() == sal_True )
+ if( xDropTarget.is() )
{
xDropTarget->removeDropTargetListener( xDragDropListener );
xDropTarget->setActive( sal_False );
@@ -3540,90 +3522,60 @@ void Frame::impl_checkMenuCloser()
// And we accept frames only! No tasks and desktops!
sal_Bool Frame::implcp_setActiveFrame( const css::uno::Reference< css::frame::XFrame >& xFrame )
{
- return (
- ( &xFrame == NULL ) ||
- ( css::uno::Reference< css::frame::XDesktop >( xFrame, css::uno::UNO_QUERY ).is() == sal_True )
- );
+ return css::uno::Reference< css::frame::XDesktop >( xFrame, css::uno::UNO_QUERY ).is();
}
//*****************************************************************************************************************
sal_Bool Frame::implcp_addFrameActionListener( const css::uno::Reference< css::frame::XFrameActionListener >& xListener )
{
- return (
- ( &xListener == NULL ) ||
- ( xListener.is() == sal_False )
- );
+ return !xListener.is();
}
//*****************************************************************************************************************
sal_Bool Frame::implcp_removeFrameActionListener( const css::uno::Reference< css::frame::XFrameActionListener >& xListener )
{
- return (
- ( &xListener == NULL ) ||
- ( xListener.is() == sal_False )
- );
+ return !xListener.is();
}
//*****************************************************************************************************************
sal_Bool Frame::implcp_addEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener )
{
- return (
- ( &xListener == NULL ) ||
- ( xListener.is() == sal_False )
- );
+ return !xListener.is();
}
//*****************************************************************************************************************
sal_Bool Frame::implcp_removeEventListener( const css::uno::Reference< css::lang::XEventListener >& xListener )
{
- return (
- ( &xListener == NULL ) ||
- ( xListener.is() == sal_False )
- );
+ return !xListener.is();
}
//*****************************************************************************************************************
sal_Bool Frame::implcp_windowResized( const css::awt::WindowEvent& aEvent )
{
- return (
- ( &aEvent == NULL ) ||
- ( aEvent.Source.is() == sal_False )
- );
+ return !aEvent.Source.is();
}
//*****************************************************************************************************************
sal_Bool Frame::implcp_focusGained( const css::awt::FocusEvent& aEvent )
{
- return (
- ( &aEvent == NULL ) ||
- ( aEvent.Source.is() == sal_False )
- );
+ return !aEvent.Source.is();
}
//*****************************************************************************************************************
sal_Bool Frame::implcp_windowActivated( const css::lang::EventObject& aEvent )
{
- return (
- ( &aEvent == NULL ) ||
- ( aEvent.Source.is() == sal_False )
- );
+ return !aEvent.Source.is();
}
//*****************************************************************************************************************
sal_Bool Frame::implcp_windowDeactivated( const css::lang::EventObject& aEvent )
{
- return (
- ( &aEvent == NULL ) ||
- ( aEvent.Source.is() == sal_False )
- );
+ return !aEvent.Source.is();
}
sal_Bool Frame::implcp_disposing( const css::lang::EventObject& aEvent )
{
- return (
- ( &aEvent == NULL ) ||
- ( aEvent.Source.is() == sal_False )
- );
+ return !aEvent.Source.is();
}
}
diff --git a/framework/source/uielement/macrosmenucontroller.cxx b/framework/source/uielement/macrosmenucontroller.cxx
index 18c5460..99b3f57 100644
--- a/framework/source/uielement/macrosmenucontroller.cxx
+++ b/framework/source/uielement/macrosmenucontroller.cxx
@@ -176,7 +176,7 @@ void MacrosMenuController::addScriptItems( PopupMenu* pPopupMenu, sal_uInt16 sta
while ( xEnum->hasMoreElements() )
{
Reference< XServiceInfo > xServiceInfo;
- if ( sal_False == ( xEnum->nextElement() >>= xServiceInfo ) )
+ if ( !( xEnum->nextElement() >>= xServiceInfo ) )
{
break;
}
commit ce6b20442a8f848848e7bffb42346cc9925ad4c8
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 21 18:01:40 2014 +0100
bool improvements
Change-Id: I703c854efd0e3456bfdc2e9ec527283a04bd31aa
diff --git a/drawinglayer/source/primitive2d/baseprimitive2d.cxx b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
index 293f9fd..ec34807 100644
--- a/drawinglayer/source/primitive2d/baseprimitive2d.cxx
+++ b/drawinglayer/source/primitive2d/baseprimitive2d.cxx
@@ -175,7 +175,7 @@ namespace drawinglayer
bool arePrimitive2DReferencesEqual(const Primitive2DReference& rxA, const Primitive2DReference& rxB)
{
- const sal_Bool bAIs(rxA.is());
+ const bool bAIs(rxA.is());
if(bAIs != rxB.is())
{
@@ -206,7 +206,7 @@ namespace drawinglayer
bool arePrimitive2DSequencesEqual(const Primitive2DSequence& rA, const Primitive2DSequence& rB)
{
- const sal_Bool bAHasElements(rA.hasElements());
+ const bool bAHasElements(rA.hasElements());
if(bAHasElements != rB.hasElements())
{
diff --git a/drawinglayer/source/primitive3d/baseprimitive3d.cxx b/drawinglayer/source/primitive3d/baseprimitive3d.cxx
index ea6d657..2e888cd 100644
--- a/drawinglayer/source/primitive3d/baseprimitive3d.cxx
+++ b/drawinglayer/source/primitive3d/baseprimitive3d.cxx
@@ -154,7 +154,7 @@ namespace drawinglayer
bool arePrimitive3DReferencesEqual(const Primitive3DReference& rxA, const Primitive3DReference& rxB)
{
- const sal_Bool bAIs(rxA.is());
+ const bool bAIs(rxA.is());
if(bAIs != rxB.is())
{
@@ -185,7 +185,7 @@ namespace drawinglayer
bool arePrimitive3DSequencesEqual(const Primitive3DSequence& rA, const Primitive3DSequence& rB)
{
- const sal_Bool bAHasElements(rA.hasElements());
+ const bool bAHasElements(rA.hasElements());
if(bAHasElements != rB.hasElements())
{
commit 1246f374e6777a7f59574ea5ded7a5e1d812e802
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 21 17:59:02 2014 +0100
bool improvements
Change-Id: Id1a0df17a28372f9d7c3a88424cf7656fed46f9a
diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx
index 8089c5c..4c90a1e 100644
--- a/svtools/source/config/menuoptions.cxx
+++ b/svtools/source/config/menuoptions.cxx
@@ -237,7 +237,7 @@ SvtMenuOptions_Impl::SvtMenuOptions_Impl()
{
// Safe impossible cases.
// Check any for valid value.
- DBG_ASSERT( !(seqValues[nProperty].hasValue()==sal_False), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nInvalid property value for property detected!\n" );
+ DBG_ASSERT( seqValues[nProperty].hasValue(), "SvtMenuOptions_Impl::SvtMenuOptions_Impl()\nInvalid property value for property detected!\n" );
if (!seqValues[nProperty].hasValue())
continue;
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx
index 555a9d4..9a0b250 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -289,7 +289,7 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
sal_Int32 nPropertyCount = seqValues.getLength();
for( sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty )
{
- if (seqValues[nProperty].hasValue()==sal_False)
+ if (!seqValues[nProperty].hasValue())
continue;
switch( nProperty )
{
@@ -435,7 +435,7 @@ void SvtMiscOptions_Impl::Load( const Sequence< OUString >& rPropertyNames )
sal_Int32 nPropertyCount = seqValues.getLength();
for( sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty )
{
- if (seqValues[nProperty].hasValue()==sal_False)
+ if (!seqValues[nProperty].hasValue())
continue;
switch( lcl_MapPropertyName(rPropertyNames[nProperty], aInternalPropertyNames) )
{
diff --git a/svtools/source/config/optionsdrawinglayer.cxx b/svtools/source/config/optionsdrawinglayer.cxx
index 31a84c2..d3c4a55 100644
--- a/svtools/source/config/optionsdrawinglayer.cxx
+++ b/svtools/source/config/optionsdrawinglayer.cxx
@@ -339,7 +339,7 @@ SvtOptionsDrawinglayer_Impl::SvtOptionsDrawinglayer_Impl() :
sal_Int32 nPropertyCount = seqValues.getLength();
for(sal_Int32 nProperty=0; nProperty<nPropertyCount; ++nProperty )
{
- if (seqValues[nProperty].hasValue()==sal_False)
+ if (!seqValues[nProperty].hasValue())
continue;
switch( nProperty )
diff --git a/svtools/source/config/slidesorterbaropt.cxx b/svtools/source/config/slidesorterbaropt.cxx
index 9ef89c8..4ae14c4 100644
--- a/svtools/source/config/slidesorterbaropt.cxx
+++ b/svtools/source/config/slidesorterbaropt.cxx
@@ -129,7 +129,7 @@ SvtSlideSorterBarOptions_Impl::SvtSlideSorterBarOptions_Impl()
// Copy values from list in right order to our internal member.
for( sal_Int32 nProperty=0; nProperty<seqValues.getLength(); ++nProperty )
{
- if (seqValues[nProperty].hasValue()==sal_False)
+ if (!seqValues[nProperty].hasValue())
continue;
switch( nProperty )
{
@@ -207,7 +207,7 @@ void SvtSlideSorterBarOptions_Impl::Load( const Sequence< OUString >& rPropertyN
// Copy values from list in right order to our internal member.
for( sal_Int32 nProperty=0; nProperty<seqValues.getLength(); ++nProperty )
{
- if (seqValues[nProperty].hasValue()==sal_False)
+ if (!seqValues[nProperty].hasValue())
continue;
switch( lcl_MapPropertyName(rPropertyNames[nProperty], aInternalPropertyNames) )
{
diff --git a/svtools/source/config/toolpanelopt.cxx b/svtools/source/config/toolpanelopt.cxx
index 7c52735..ccc9755 100644
--- a/svtools/source/config/toolpanelopt.cxx
+++ b/svtools/source/config/toolpanelopt.cxx
@@ -133,7 +133,7 @@ SvtToolPanelOptions_Impl::SvtToolPanelOptions_Impl()
// Copy values from list in right order to our internal member.
for( sal_Int32 nProperty=0; nProperty<seqValues.getLength(); ++nProperty )
{
- if (seqValues[nProperty].hasValue()==sal_False)
+ if (!seqValues[nProperty].hasValue())
continue;
switch( nProperty )
{
@@ -205,7 +205,7 @@ void SvtToolPanelOptions_Impl::Load( const Sequence< OUString >& rPropertyNames
// Copy values from list in right order to our internal member.
for( sal_Int32 nProperty=0; nProperty<seqValues.getLength(); ++nProperty )
{
- if (seqValues[nProperty].hasValue()==sal_False)
+ if (!seqValues[nProperty].hasValue())
continue;
switch( lcl_MapPropertyName(rPropertyNames[nProperty], aInternalPropertyNames) )
{
diff --git a/svtools/source/hatchwindow/hatchwindow.cxx b/svtools/source/hatchwindow/hatchwindow.cxx
index 7ea016d..a2f6413 100644
--- a/svtools/source/hatchwindow/hatchwindow.cxx
+++ b/svtools/source/hatchwindow/hatchwindow.cxx
@@ -116,7 +116,7 @@ uno::Any SAL_CALL VCLXHatchWindow::queryInterface( const uno::Type & rType )
uno::Any aReturn( ::cppu::queryInterface( rType,
static_cast< embed::XHatchWindow* >( this ) ) );
- if ( aReturn.hasValue() == sal_True )
+ if ( aReturn.hasValue() )
{
return aReturn ;
}
diff --git a/svtools/source/misc/xwindowitem.cxx b/svtools/source/misc/xwindowitem.cxx
index ed81d04..a22a3f9 100644
--- a/svtools/source/misc/xwindowitem.cxx
+++ b/svtools/source/misc/xwindowitem.cxx
@@ -59,7 +59,7 @@ bool XWindowItem::operator == ( const SfxPoolItem & rAttr ) const
DBG_ASSERT( SfxPoolItem::operator==(rAttr), "unequal types" );
const XWindowItem * pItem = dynamic_cast< const XWindowItem * >(&rAttr);
- return pItem ? m_xWin == pItem->m_xWin : 0;
+ return pItem && m_xWin == pItem->m_xWin;
}
commit 60e6f9fc61cd4ade02c6771a5325e5ca6e05faf4
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 21 17:56:03 2014 +0100
bool improvements
Change-Id: I471bebacb036e3809cdef2be9e33891da37a3723
diff --git a/toolkit/source/helper/unowrapper.cxx b/toolkit/source/helper/unowrapper.cxx
index 84d87e4..9b74a3e 100644
--- a/toolkit/source/helper/unowrapper.cxx
+++ b/toolkit/source/helper/unowrapper.cxx
@@ -259,7 +259,7 @@ void UnoWrapper::WindowDestroyed( Window* pWindow )
VCLXWindow* pWindowPeer = pWindow->GetWindowPeer();
uno::Reference< lang::XComponent > xWindowPeerComp( pWindow->GetComponentInterface( sal_False ), uno::UNO_QUERY );
- OSL_ENSURE( ( pWindowPeer != NULL ) == ( xWindowPeerComp.is() == sal_True ),
+ OSL_ENSURE( ( pWindowPeer != NULL ) == xWindowPeerComp.is(),
"UnoWrapper::WindowDestroyed: inconsistency in the window's peers!" );
if ( pWindowPeer )
{
commit 5f755f0a62e150bf7c9857bac43ac6cc55ef3e45
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 21 17:51:25 2014 +0100
bool improvements
Change-Id: I5c72b0bc34d87312437ae32a506567c3fb3bfa19
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index f59ca36..00ba968 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -301,7 +301,7 @@ uno::Any SAL_CALL FSStorage::queryInterface( const uno::Type& rType )
, static_cast<lang::XComponent*> ( this )
, static_cast<beans::XPropertySet*> ( this ) );
- if ( aReturn.hasValue() == sal_True )
+ if ( aReturn.hasValue() )
return aReturn ;
return OWeakObject::queryInterface( rType );
diff --git a/svl/source/fsstor/oinputstreamcontainer.cxx b/svl/source/fsstor/oinputstreamcontainer.cxx
index 3c4caa6..05be278 100644
--- a/svl/source/fsstor/oinputstreamcontainer.cxx
+++ b/svl/source/fsstor/oinputstreamcontainer.cxx
@@ -94,7 +94,7 @@ uno::Any SAL_CALL OFSInputStreamContainer::queryInterface( const uno::Type& rTyp
static_cast< io::XStream* >( this ),
static_cast< io::XInputStream* >( this ) ) );
- if ( aReturn.hasValue() == sal_True )
+ if ( aReturn.hasValue() )
return aReturn ;
return ::cppu::OWeakObject::queryInterface( rType ) ;
diff --git a/svl/source/fsstor/ostreamcontainer.cxx b/svl/source/fsstor/ostreamcontainer.cxx
index 0089784..ce02f52 100644
--- a/svl/source/fsstor/ostreamcontainer.cxx
+++ b/svl/source/fsstor/ostreamcontainer.cxx
@@ -75,7 +75,7 @@ uno::Any SAL_CALL OFSStreamContainer::queryInterface( const uno::Type& rType )
, static_cast<embed::XExtendedStorageStream*> ( this )
, static_cast<lang::XComponent*> ( this ) );
- if ( aReturn.hasValue() == sal_True )
+ if ( aReturn.hasValue() )
return aReturn ;
if ( m_xSeekable.is() )
@@ -84,7 +84,7 @@ uno::Any SAL_CALL OFSStreamContainer::queryInterface( const uno::Type& rType )
( rType
, static_cast<io::XSeekable*> ( this ) );
- if ( aReturn.hasValue() == sal_True )
+ if ( aReturn.hasValue() )
return aReturn ;
}
@@ -94,7 +94,7 @@ uno::Any SAL_CALL OFSStreamContainer::queryInterface( const uno::Type& rType )
( rType
, static_cast<io::XInputStream*> ( this ) );
- if ( aReturn.hasValue() == sal_True )
+ if ( aReturn.hasValue() )
return aReturn ;
}
if ( m_xOutputStream.is() )
@@ -103,7 +103,7 @@ uno::Any SAL_CALL OFSStreamContainer::queryInterface( const uno::Type& rType )
( rType
, static_cast<io::XOutputStream*> ( this ) );
- if ( aReturn.hasValue() == sal_True )
+ if ( aReturn.hasValue() )
return aReturn ;
}
if ( m_xTruncate.is() )
@@ -112,7 +112,7 @@ uno::Any SAL_CALL OFSStreamContainer::queryInterface( const uno::Type& rType )
( rType
, static_cast<io::XTruncate*> ( this ) );
- if ( aReturn.hasValue() == sal_True )
+ if ( aReturn.hasValue() )
return aReturn ;
}
if ( m_xAsyncOutputMonitor.is() )
@@ -121,7 +121,7 @@ uno::Any SAL_CALL OFSStreamContainer::queryInterface( const uno::Type& rType )
( rType
, static_cast<io::XAsyncOutputMonitor*> ( this ) );
- if ( aReturn.hasValue() == sal_True )
+ if ( aReturn.hasValue() )
return aReturn ;
}
diff --git a/svl/source/items/srchitem.cxx b/svl/source/items/srchitem.cxx
index 3db3d80..8ab36d3 100644
--- a/svl/source/items/srchitem.cxx
+++ b/svl/source/items/srchitem.cxx
@@ -465,13 +465,13 @@ bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nM
{
if ( aSeq[i].Name == SRCH_PARA_OPTIONS )
{
- if ( ( aSeq[i].Value >>= aSearchOpt ) == sal_True )
+ if ( aSeq[i].Value >>= aSearchOpt )
++nConvertedCount;
}
else if ( aSeq[i].Name == SRCH_PARA_FAMILY )
{
sal_uInt16 nTemp( 0 );
- if ( ( aSeq[i].Value >>= nTemp ) == sal_True )
+ if ( aSeq[i].Value >>= nTemp )
{
eFamily = SfxStyleFamily( nTemp );
++nConvertedCount;
@@ -479,52 +479,52 @@ bool SvxSearchItem::PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nM
}
else if ( aSeq[i].Name == SRCH_PARA_COMMAND )
{
- if ( ( aSeq[i].Value >>= nCommand ) == sal_True )
+ if ( aSeq[i].Value >>= nCommand )
++nConvertedCount;
}
else if ( aSeq[i].Name == SRCH_PARA_CELLTYPE )
{
- if ( ( aSeq[i].Value >>= nCellType ) == sal_True )
+ if ( aSeq[i].Value >>= nCellType )
++nConvertedCount;
}
else if ( aSeq[i].Name == SRCH_PARA_APPFLAG )
{
- if ( ( aSeq[i].Value >>= nAppFlag ) == sal_True )
+ if ( aSeq[i].Value >>= nAppFlag )
++nConvertedCount;
}
else if ( aSeq[i].Name == SRCH_PARA_ROWDIR )
{
- if ( ( aSeq[i].Value >>= bRowDirection ) == sal_True )
+ if ( aSeq[i].Value >>= bRowDirection )
++nConvertedCount;
}
else if ( aSeq[i].Name == SRCH_PARA_ALLTABLES )
{
- if ( ( aSeq[i].Value >>= bAllTables ) == sal_True )
+ if ( aSeq[i].Value >>= bAllTables )
++nConvertedCount;
}
else if ( aSeq[i].Name == SRCH_PARA_SEARCHFILTERED )
{
- if ( ( aSeq[i].Value >>= bSearchFiltered ) == sal_True )
+ if ( aSeq[i].Value >>= bSearchFiltered )
++nConvertedCount;
}
else if ( aSeq[i].Name == SRCH_PARA_BACKWARD )
{
- if ( ( aSeq[i].Value >>= bBackward ) == sal_True )
+ if ( aSeq[i].Value >>= bBackward )
++nConvertedCount;
}
else if ( aSeq[i].Name == SRCH_PARA_PATTERN )
{
- if ( ( aSeq[i].Value >>= bPattern ) == sal_True )
+ if ( aSeq[i].Value >>= bPattern )
++nConvertedCount;
}
else if ( aSeq[i].Name == SRCH_PARA_CONTENT )
{
- if ( ( aSeq[i].Value >>= bContent ) == sal_True )
+ if ( aSeq[i].Value >>= bContent )
++nConvertedCount;
}
else if ( aSeq[i].Name == SRCH_PARA_ASIANOPT )
{
- if ( ( aSeq[i].Value >>= bAsianOptions ) == sal_True )
+ if ( aSeq[i].Value >>= bAsianOptions )
++nConvertedCount;
}
}
commit 9eefbbe5de26652566b7fc58521a0e9c44b53119
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 21 17:50:58 2014 +0100
bool improvements
Change-Id: I9e5e77ad2c29ccdae1a794b7a0223858d8a662a6
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index 9d206c4..3e7cb3d 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -138,7 +138,7 @@ struct hashRef_Impl
struct equaltoRef_Impl
{
- size_t operator()(const Reference<XInterface > & rName1, const Reference<XInterface > & rName2 ) const
+ bool operator()(const Reference<XInterface > & rName1, const Reference<XInterface > & rName2 ) const
{ return rName1 == rName2; }
};
commit 0ec840b1d98c5810731d975f7ea68239e6eff675
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 21 17:50:40 2014 +0100
bool improvements
Change-Id: Ia6f86e38cb46a5f7ac634ad0afb66701811e6758
diff --git a/io/source/stm/odata.cxx b/io/source/stm/odata.cxx
index b3601b5..adeb46d 100644
--- a/io/source/stm/odata.cxx
+++ b/io/source/stm/odata.cxx
@@ -897,7 +897,7 @@ Sequence<OUString> ODataOutputStream_getSupportedServiceNames(void)
//--------------------------------------
struct equalObjectContainer_Impl
{
- sal_Int32 operator()(const Reference< XInterface > & s1,
+ bool operator()(const Reference< XInterface > & s1,
const Reference< XInterface > & s2) const
{
return s1 == s2;
commit 436b10ce8a7919beedc2103114396e7892926c5b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 21 17:47:16 2014 +0100
bool improvements
Change-Id: Ie9951690fa99705d2083e0d1515261f2f99fd97a
diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index d3127c8..1f5ce94 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -234,7 +234,7 @@ void ConfigItem::impl_packLocalizedProperties( const Sequence< OUString >&
{
lInValues[nSourceCounter] >>= xLocalizedNode;
Reference< XNameContainer > xSetAccess( xLocalizedNode, UNO_QUERY );
- if( xSetAccess.is() == sal_True )
+ if( xSetAccess.is() )
{
lPropertyNames = xSetAccess->getElementNames() ;
nPropertiesSize = lPropertyNames.getLength() ;
diff --git a/unotools/source/config/eventcfg.cxx b/unotools/source/config/eventcfg.cxx
index a052613..c01af93 100644
--- a/unotools/source/config/eventcfg.cxx
+++ b/unotools/source/config/eventcfg.cxx
@@ -236,7 +236,7 @@ void SAL_CALL GlobalEventConfig_Impl::replaceByName( const OUString& aName, cons
{
Sequence< beans::PropertyValue > props;
//DF should we prepopulate the hash with a list of valid event Names?
- if( sal_False == ( aElement >>= props ) )
+ if( !( aElement >>= props ) )
{
throw lang::IllegalArgumentException( OUString(),
Reference< XInterface > (), 2);
diff --git a/unotools/source/config/extendedsecurityoptions.cxx b/unotools/source/config/extendedsecurityoptions.cxx
index 2b3674e..9e09757 100644
--- a/unotools/source/config/extendedsecurityoptions.cxx
+++ b/unotools/source/config/extendedsecurityoptions.cxx
@@ -159,7 +159,7 @@ SvtExtendedSecurityOptions_Impl::SvtExtendedSecurityOptions_Impl()
{
// Safe impossible cases.
// Check any for valid value.
- DBG_ASSERT( !(seqValues[nProperty].hasValue()==sal_False), "SvtExtendedSecurityOptions_Impl::SvtExtendedSecurityOptions_Impl()\nInvalid property value detected!\n" );
+ DBG_ASSERT( seqValues[nProperty].hasValue(), "SvtExtendedSecurityOptions_Impl::SvtExtendedSecurityOptions_Impl()\nInvalid property value detected!\n" );
switch( nProperty )
{
case PROPERTYHANDLE_HYPERLINKS_OPEN:
diff --git a/unotools/source/config/fontoptions.cxx b/unotools/source/config/fontoptions.cxx
index e823087..89b8bbb 100644
--- a/unotools/source/config/fontoptions.cxx
+++ b/unotools/source/config/fontoptions.cxx
@@ -152,7 +152,7 @@ SvtFontOptions_Impl::SvtFontOptions_Impl()
{
// Safe impossible cases.
// Check any for valid value.
- DBG_ASSERT( !(seqValues[nProperty].hasValue()==sal_False), "SvtFontOptions_Impl::SvtFontOptions_Impl()\nInvalid property value detected!\n" );
+ DBG_ASSERT( seqValues[nProperty].hasValue(), "SvtFontOptions_Impl::SvtFontOptions_Impl()\nInvalid property value detected!\n" );
switch( nProperty )
{
case PROPERTYHANDLE_REPLACEMENTTABLE : {
diff --git a/unotools/source/config/printwarningoptions.cxx b/unotools/source/config/printwarningoptions.cxx
index 471b4e1..73c1719 100644
--- a/unotools/source/config/printwarningoptions.cxx
+++ b/unotools/source/config/printwarningoptions.cxx
@@ -129,7 +129,7 @@ SvtPrintWarningOptions_Impl::SvtPrintWarningOptions_Impl() :
for( nProperty=0; nProperty<nPropertyCount; ++nProperty )
{
- DBG_ASSERT( !(seqValues[nProperty].hasValue()==sal_False), "SvtPrintWarningOptions_Impl::SvtPrintWarningOptions_Impl()\nInvalid property value for property detected!\n" );
+ DBG_ASSERT( seqValues[nProperty].hasValue(), "SvtPrintWarningOptions_Impl::SvtPrintWarningOptions_Impl()\nInvalid property value for property detected!\n" );
switch( nProperty )
{
commit d706527fd8377dfb43746529a59b2af0b40b6b6d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 21 17:43:50 2014 +0100
bool improvements
Change-Id: I24fae431d9e2b99cd6ac937956bb401ecfebc943
diff --git a/UnoControls/source/base/basecontainercontrol.cxx b/UnoControls/source/base/basecontainercontrol.cxx
index 7c1a968..93f7cc2 100644
--- a/UnoControls/source/base/basecontainercontrol.cxx
+++ b/UnoControls/source/base/basecontainercontrol.cxx
@@ -60,7 +60,7 @@ Any SAL_CALL BaseContainerControl::queryInterface( const Type& rType ) throw( Ru
// Don't use mutex or guard in this method!!! Is a method of XInterface.
Any aReturn ;
Reference< XInterface > xDel = BaseControl::impl_getDelegator();
- if ( xDel.is() == sal_True )
+ if ( xDel.is() )
{
// If an delegator exist, forward question to his queryInterface.
// Delegator will ask his own queryAggregation!
@@ -122,7 +122,7 @@ Any SAL_CALL BaseContainerControl::queryAggregation( const Type& aType ) throw(
);
// If searched interface supported by this class ...
- if ( aReturn.hasValue() == sal_True )
+ if ( aReturn.hasValue() )
{
// ... return this information.
return aReturn ;
@@ -141,7 +141,7 @@ Any SAL_CALL BaseContainerControl::queryAggregation( const Type& aType ) throw(
void SAL_CALL BaseContainerControl::createPeer( const Reference< XToolkit >& xToolkit ,
const Reference< XWindowPeer >& xParent ) throw( RuntimeException )
{
- if ( getPeer().is() == sal_False )
+ if ( !getPeer().is() )
{
// create own peer
BaseControl::createPeer( xToolkit, xParent );
diff --git a/UnoControls/source/base/basecontrol.cxx b/UnoControls/source/base/basecontrol.cxx
index b95f9d7..0ba3dd9 100644
--- a/UnoControls/source/base/basecontrol.cxx
+++ b/UnoControls/source/base/basecontrol.cxx
@@ -81,7 +81,7 @@ BaseControl::~BaseControl()
Any SAL_CALL BaseControl::queryInterface( const Type& rType ) throw( RuntimeException )
{
Any aReturn ;
- if ( m_xDelegator.is() == sal_True )
+ if ( m_xDelegator.is() )
{
// If an delegator exist, forward question to his queryInterface.
// Delegator will ask his own queryAggregation!
@@ -221,7 +221,7 @@ Any SAL_CALL BaseControl::queryAggregation( const Type& aType ) throw( RuntimeEx
);
// If searched interface supported by this class ...
- if ( aReturn.hasValue() == sal_True )
+ if ( aReturn.hasValue() )
{
// ... return this information.
return aReturn ;
@@ -283,7 +283,7 @@ void SAL_CALL BaseControl::dispose() throw( RuntimeException )
impl_releasePeer();
// release view
- if ( m_xGraphicsView.is() == sal_True )
+ if ( m_xGraphicsView.is() )
{
m_xGraphicsView.clear();
}
@@ -321,7 +321,7 @@ void SAL_CALL BaseControl::createPeer( const Reference< XToolkit >& xToo
// Ready for multithreading
MutexGuard aGuard( m_aMutex );
- if ( m_xPeer.is() == sal_False )
+ if ( !m_xPeer.is() )
{
// use method "BaseControl::getWindowDescriptor()" fot change window attributes !!!
WindowDescriptor* pDescriptor = impl_getWindowDescriptor( xParentPeer );
@@ -334,7 +334,7 @@ void SAL_CALL BaseControl::createPeer( const Reference< XToolkit >& xToo
// very slow under remote conditions!
// create the window on the server
Reference< XToolkit > xLocalToolkit = xToolkit ;
- if ( xLocalToolkit.is() == sal_False )
+ if ( !xLocalToolkit.is() )
{
// but first create well known toolkit, if it not exist
xLocalToolkit = Reference< XToolkit > ( Toolkit::create(m_xComponentContext), UNO_QUERY_THROW );
@@ -345,7 +345,7 @@ void SAL_CALL BaseControl::createPeer( const Reference< XToolkit >& xToo
// don't forget to release the memory!
delete pDescriptor ;
- if ( m_xPeerWindow.is() == sal_True )
+ if ( m_xPeerWindow.is() )
{
if ( m_pMultiplexer != NULL )
{
@@ -356,12 +356,12 @@ void SAL_CALL BaseControl::createPeer( const Reference< XToolkit >& xToo
// and add a paint listener
Reference< XDevice > xDevice( m_xPeerWindow, UNO_QUERY );
- if ( xDevice.is() == sal_True )
+ if ( xDevice.is() )
{
m_xGraphicsPeer = xDevice->createGraphics();
}
- if ( m_xGraphicsPeer.is() == sal_True )
+ if ( m_xGraphicsPeer.is() )
{
addPaintListener( this );
addWindowListener( this );
@@ -504,7 +504,7 @@ void SAL_CALL BaseControl::setVisible( sal_Bool bVisible ) throw( RuntimeExcepti
// Set new state of flag
m_bVisible = bVisible ;
- if ( m_xPeerWindow.is() == sal_True )
+ if ( m_xPeerWindow.is() )
{
// Set it also on peerwindow
m_xPeerWindow->setVisible( m_bVisible );
@@ -523,7 +523,7 @@ void SAL_CALL BaseControl::setEnable( sal_Bool bEnable ) throw( RuntimeException
// Set new state of flag
m_bEnable = bEnable ;
- if ( m_xPeerWindow.is() == sal_True )
+ if ( m_xPeerWindow.is() )
{
// Set it also on peerwindow
m_xPeerWindow->setEnable( m_bEnable );
@@ -539,7 +539,7 @@ void SAL_CALL BaseControl::setFocus() throw( RuntimeException )
// Ready for multithreading
MutexGuard aGuard( m_aMutex );
- if ( m_xPeerWindow.is() == sal_True )
+ if ( m_xPeerWindow.is() )
{
m_xPeerWindow->setFocus();
}
@@ -690,7 +690,7 @@ sal_Bool SAL_CALL BaseControl::setGraphics( const Reference< XGraphics >& xDevic
// - in this class exist 2 graphics-member ... one for peer[_xGraphicsPeer] and one for view[_xGraphicsView]
// - they are used by "windowPaint() and draw()", forwarded to "paint ()"
sal_Bool bReturn = sal_False ;
- if ( xDevice.is() == sal_True )
+ if ( xDevice.is() )
{
// Ready for multithreading
MutexGuard aGuard( m_aMutex );
@@ -745,14 +745,14 @@ void SAL_CALL BaseControl::disposing( const EventObject& /*aSource*/ ) throw( Ru
// - release ALL references
// - it must be !!!
- if ( m_xGraphicsPeer.is() == sal_True )
+ if ( m_xGraphicsPeer.is() )
{
removePaintListener( this );
removeWindowListener( this );
m_xGraphicsPeer.clear();
}
- if ( m_xGraphicsView.is() == sal_True )
+ if ( m_xGraphicsView.is() )
{
m_xGraphicsView.clear();
}
@@ -948,9 +948,9 @@ Reference< XInterface > BaseControl::impl_getDelegator()
void BaseControl::impl_releasePeer()
{
- if ( m_xPeer.is() == sal_True )
+ if ( m_xPeer.is() )
{
- if ( m_xGraphicsPeer.is() == sal_True )
+ if ( m_xGraphicsPeer.is() )
{
removePaintListener( this );
removeWindowListener( this );
diff --git a/UnoControls/source/base/multiplexer.cxx b/UnoControls/source/base/multiplexer.cxx
index 7757606..416042b 100644
--- a/UnoControls/source/base/multiplexer.cxx
+++ b/UnoControls/source/base/multiplexer.cxx
@@ -46,7 +46,7 @@ namespace unocontrols{
/* We must change the source of the event. */ \
aLocalEvent.Source = m_xControl ; \
/* Is the control not destroyed? */ \
- if( aLocalEvent.Source.is() == sal_True ) \
+ if( aLocalEvent.Source.is() ) \
{ \
if( aIterator.hasMoreElements() ) \
{ \
@@ -116,7 +116,7 @@ Any SAL_CALL OMRCListenerMultiplexerHelper::queryInterface( const Type& rType )
);
// If searched interface supported by this class ...
- if ( aReturn.hasValue() == sal_True )
+ if ( aReturn.hasValue() )
{
// ... return this information.
return aReturn ;
diff --git a/UnoControls/source/controls/OConnectionPointContainerHelper.cxx b/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
index 54f9370..b3e4f76 100644
--- a/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
+++ b/UnoControls/source/controls/OConnectionPointContainerHelper.cxx
@@ -63,7 +63,7 @@ Any SAL_CALL OConnectionPointContainerHelper::queryInterface( const Type& aType
);
// If searched interface not supported by this class ...
- if ( aReturn.hasValue() == sal_False )
+ if ( !aReturn.hasValue() )
{
// ... ask baseclasses.
aReturn = OWeakObject::queryInterface( aType );
diff --git a/UnoControls/source/controls/OConnectionPointHelper.cxx b/UnoControls/source/controls/OConnectionPointHelper.cxx
index 24eb001..af4410a 100644
--- a/UnoControls/source/controls/OConnectionPointHelper.cxx
+++ b/UnoControls/source/controls/OConnectionPointHelper.cxx
@@ -68,7 +68,7 @@ Any SAL_CALL OConnectionPointHelper::queryInterface( const Type& aType ) throw(
);
// If searched interface not supported by this class ...
- if ( aReturn.hasValue() == sal_False )
+ if ( !aReturn.hasValue() )
{
// ... ask baseclasses.
aReturn = OWeakObject::queryInterface( aType );
diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx
index 6c30ee8..8c9601b 100644
--- a/UnoControls/source/controls/framecontrol.cxx
+++ b/UnoControls/source/controls/framecontrol.cxx
@@ -162,11 +162,11 @@ Any SAL_CALL FrameControl::queryAggregation( const Type& aType ) throw( RuntimeE
);
// If searched interface not supported by this class ...
- if ( aReturn.hasValue() == sal_False )
+ if ( !aReturn.hasValue() )
{
// ... ask baseclasses.
aReturn = OPropertySetHelper::queryInterface( aType );
- if ( aReturn.hasValue() == sal_False )
+ if ( !aReturn.hasValue() )
{
aReturn = BaseControl::queryAggregation( aType );
}
diff --git a/UnoControls/source/controls/progressbar.cxx b/UnoControls/source/controls/progressbar.cxx
index aebf0f3..8df5d9a 100644
--- a/UnoControls/source/controls/progressbar.cxx
+++ b/UnoControls/source/controls/progressbar.cxx
@@ -157,7 +157,7 @@ Any SAL_CALL ProgressBar::queryAggregation( const Type& aType ) throw( RuntimeEx
);
// If searched interface not supported by this class ...
- if ( aReturn.hasValue() == sal_False )
+ if ( !aReturn.hasValue() )
{
// ... ask baseclasses.
aReturn = BaseControl::queryAggregation( aType );
diff --git a/UnoControls/source/controls/progressmonitor.cxx b/UnoControls/source/controls/progressmonitor.cxx
index ae1c2b9..ab4dd8a 100644
--- a/UnoControls/source/controls/progressmonitor.cxx
+++ b/UnoControls/source/controls/progressmonitor.cxx
@@ -207,7 +207,7 @@ Any SAL_CALL ProgressMonitor::queryAggregation( const Type& aType ) throw( Runti
);
// If searched interface not supported by this class ...
- if ( aReturn.hasValue() == sal_False )
+ if ( !aReturn.hasValue() )
{
// ... ask baseclasses.
aReturn = BaseControl::queryAggregation( aType );
diff --git a/UnoControls/source/controls/statusindicator.cxx b/UnoControls/source/controls/statusindicator.cxx
index 03f0a3b..49f7605 100644
--- a/UnoControls/source/controls/statusindicator.cxx
+++ b/UnoControls/source/controls/statusindicator.cxx
@@ -167,7 +167,7 @@ Any SAL_CALL StatusIndicator::queryAggregation( const Type& aType ) throw( Runti
);
// If searched interface not supported by this class ...
- if ( aReturn.hasValue() == sal_False )
+ if ( !aReturn.hasValue() )
{
// ... ask baseclasses.
aReturn = BaseControl::queryAggregation( aType );
@@ -308,7 +308,7 @@ void SAL_CALL StatusIndicator::createPeer (
const css::uno::Reference< XWindowPeer > & rParent
) throw( RuntimeException )
{
- if( getPeer().is() == sal_False )
+ if( !getPeer().is() )
{
BaseContainerControl::createPeer( rToolkit, rParent );
@@ -447,18 +447,18 @@ void StatusIndicator::impl_paint ( sal_Int32 nX, sal_Int32 nY, const css::uno::R
// background = gray
css::uno::Reference< XWindowPeer > xPeer( impl_getPeerWindow(), UNO_QUERY );
- if( xPeer.is() == sal_True )
+ if( xPeer.is() )
xPeer->setBackground( STATUSINDICATOR_BACKGROUNDCOLOR );
// FixedText background = gray
css::uno::Reference< XControl > xTextControl( m_xText, UNO_QUERY );
xPeer = xTextControl->getPeer();
- if( xPeer.is() == sal_True )
+ if( xPeer.is() )
xPeer->setBackground( STATUSINDICATOR_BACKGROUNDCOLOR );
// Progress background = gray
xPeer = m_xProgressBar->getPeer();
- if( xPeer.is() == sal_True )
+ if( xPeer.is() )
xPeer->setBackground( STATUSINDICATOR_BACKGROUNDCOLOR );
// paint shadow border
commit 4abe5e61ddc55fcfb0e230d898dd10d7f7e1f793
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 21 17:22:17 2014 +0100
bool improvements
Change-Id: Id91399027008ffbda26f3212bd3ddbba22044f2b
diff --git a/framework/source/fwe/classes/addonsoptions.cxx b/framework/source/fwe/classes/addonsoptions.cxx
index 6880357..a22ea22 100644
--- a/framework/source/fwe/classes/addonsoptions.cxx
+++ b/framework/source/fwe/classes/addonsoptions.cxx
@@ -477,7 +477,7 @@ AddonsOptions_Impl::AddonsOptions_Impl()
AddonsOptions_Impl::~AddonsOptions_Impl()
{
// We must save our current values .. if user forget it!
- if( IsModified() == sal_True )
+ if( IsModified() )
{
Commit();
}
commit 6cccf0f388e20408668e57d1931aba5c46d18185
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 21 17:19:40 2014 +0100
bool improvements
Change-Id: I64288207adb083e006b4acc5e7f26d647236a443
diff --git a/basic/source/uno/dlgcont.cxx b/basic/source/uno/dlgcont.cxx
index 1190f2d..5af135f 100644
--- a/basic/source/uno/dlgcont.cxx
+++ b/basic/source/uno/dlgcont.cxx
@@ -169,7 +169,7 @@ void SAL_CALL SfxDialogLibraryContainer::writeLibraryElement
bComplete = writeOasis2OOoLibraryElement( xInput, xOutput );
}
- if ( bComplete == sal_False )
+ if ( !bComplete )
{
Sequence< sal_Int8 > bytes;
sal_Int32 nRead = xInput->readBytes( bytes, xInput->available() );
commit 101e5cc49c413bede477c0f44b2256e087f7db8c
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 21 17:17:12 2014 +0100
bool improvements
Change-Id: I85faf4e3fcab6763af11eb6a4082820e88bea1ca
diff --git a/include/svtools/editbrowsebox.hxx b/include/svtools/editbrowsebox.hxx
index 6d36aea..900222d 100644
--- a/include/svtools/editbrowsebox.hxx
+++ b/include/svtools/editbrowsebox.hxx
@@ -87,7 +87,7 @@ namespace svt
protected:
Control* pWindow;
- sal_Bool bSuspended; // <sal_True> if the window is hidden and disabled
+ bool bSuspended; // <true> if the window is hidden and disabled
public:
TYPEINFO();
@@ -108,7 +108,7 @@ namespace svt
// suspending the controller is not culmulative!
void suspend( );
void resume( );
- inline sal_Bool isSuspended( ) const { return bSuspended; }
+ inline bool isSuspended( ) const { return bSuspended; }
protected:
virtual sal_Bool MoveAllowed(const KeyEvent& rEvt) const;
diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx
index 6488120..72cad0f 100644
--- a/svtools/source/brwbox/editbrowsebox.cxx
+++ b/svtools/source/brwbox/editbrowsebox.cxx
@@ -1339,7 +1339,7 @@ namespace svt
//------------------------------------------------------------------------------
CellController::CellController(Control* pW)
:pWindow( pW )
- ,bSuspended( sal_True )
+ ,bSuspended( true )
{
DBG_CTOR(CellController,NULL);
@@ -1363,7 +1363,7 @@ namespace svt
CommitModifications();
GetWindow().Hide( );
GetWindow().Disable( );
- bSuspended = sal_True;
+ bSuspended = true;
}
}
@@ -1375,7 +1375,7 @@ namespace svt
{
GetWindow().Enable( );
GetWindow().Show( );
- bSuspended = sal_False;
+ bSuspended = false;
}
}
diff --git a/svtools/source/config/menuoptions.cxx b/svtools/source/config/menuoptions.cxx
index 1a320b1..8089c5c 100644
--- a/svtools/source/config/menuoptions.cxx
+++ b/svtools/source/config/menuoptions.cxx
@@ -280,7 +280,7 @@ SvtMenuOptions_Impl::~SvtMenuOptions_Impl()
{
// Flush data to configuration!
// User has no chance to do that.
- if( IsModified() == sal_True )
+ if( IsModified() )
{
Commit();
}
diff --git a/svtools/source/config/miscopt.cxx b/svtools/source/config/miscopt.cxx
index 3a60033..555a9d4 100644
--- a/svtools/source/config/miscopt.cxx
+++ b/svtools/source/config/miscopt.cxx
@@ -404,7 +404,7 @@ SvtMiscOptions_Impl::SvtMiscOptions_Impl()
SvtMiscOptions_Impl::~SvtMiscOptions_Impl()
{
// We must save our current values .. if user forgets it!
- if( IsModified() == sal_True )
+ if( IsModified() )
{
Commit();
}
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index 16b260b..35df12b 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -296,9 +296,9 @@ bool TreeControlPeer::updateEntry( UnoTreeListEntry* pEntry )
}
}
- if( (pEntry->mxNode->hasChildrenOnDemand() == sal_True) != (pEntry->HasChildrenOnDemand() == sal_True) )
+ if( bool(pEntry->mxNode->hasChildrenOnDemand()) != pEntry->HasChildrenOnDemand() )
{
- pEntry->EnableChildrenOnDemand( pEntry->mxNode->hasChildrenOnDemand() ? sal_True : sal_False );
+ pEntry->EnableChildrenOnDemand( pEntry->mxNode->hasChildrenOnDemand() );
bChanged = true;
}
commit b184636e1ccbc6560430a6a3e44fe56d2014c8f7
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Tue Jan 21 17:07:05 2014 +0100
bool improvements
Change-Id: I714caa8dc3d34fd56e6a11f57db6723dcb7e6705
diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx
index 1aa1cd1..b597c11 100644
--- a/include/vcl/font.hxx
+++ b/include/vcl/font.hxx
@@ -94,7 +94,7 @@ public:
void SetOrientation( short nLineOrientation );
short GetOrientation() const;
void SetVertical( sal_Bool bVertical );
- sal_Bool IsVertical() const;
+ bool IsVertical() const;
void SetKerning( FontKerning nKerning );
FontKerning GetKerning() const;
sal_Bool IsKerning() const;
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index b2ef51c..ba37b8f 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -720,8 +720,8 @@ public:
// return the dialog we are contained in or NULL if un-contained
Dialog* GetParentDialog() const;
- void Show( sal_Bool bVisible = sal_True, sal_uInt16 nFlags = 0 );
- void Hide() { Show( sal_False ); }
+ void Show( bool bVisible = true, sal_uInt16 nFlags = 0 );
+ void Hide() { Show( false ); }
sal_Bool IsVisible() const;
sal_Bool IsReallyVisible() const;
sal_Bool IsReallyShown() const;
@@ -731,8 +731,8 @@ public:
void Disable( bool bChild = true ) { Enable( false, bChild ); }
sal_Bool IsEnabled() const;
- void EnableInput( sal_Bool bEnable = sal_True, sal_Bool bChild = sal_True );
- void EnableInput( sal_Bool bEnable, sal_Bool bChild, sal_Bool bSysWin,
+ void EnableInput( bool bEnable = true, sal_Bool bChild = sal_True );
+ void EnableInput( bool bEnable, sal_Bool bChild, sal_Bool bSysWin,
const Window* pExcludeWindow = NULL );
sal_Bool IsInputEnabled() const;
@@ -890,7 +890,7 @@ public:
void SetPointer( const Pointer& rPointer );
const Pointer& GetPointer() const;
- void EnableChildPointerOverwrite( sal_Bool bOverwrite = sal_True );
+ void EnableChildPointerOverwrite( bool bOverwrite );
void SetPointerPosPixel( const Point& rPos );
Point GetPointerPosPixel();
Point GetLastPointerPosPixel();
diff --git a/vcl/generic/print/glyphset.cxx b/vcl/generic/print/glyphset.cxx
index f5d8b03..96b9657 100644
--- a/vcl/generic/print/glyphset.cxx
+++ b/vcl/generic/print/glyphset.cxx
@@ -73,7 +73,7 @@ GlyphSet::GetFontType ()
return meBaseType;
}
-sal_Bool
+bool
GlyphSet::IsVertical ()
{
return mbVertical;
diff --git a/vcl/generic/print/glyphset.hxx b/vcl/generic/print/glyphset.hxx
index 8ceb121..934ff31 100644
--- a/vcl/generic/print/glyphset.hxx
+++ b/vcl/generic/print/glyphset.hxx
@@ -102,7 +102,7 @@ public:
static OString
GetGlyphSetEncodingName (rtl_TextEncoding nEnc,
const OString &rFontName);
- sal_Bool IsVertical ();
+ bool IsVertical ();
void DrawText (PrinterGfx &rGfx, const Point& rPoint,
const sal_Unicode* pStr, sal_Int16 nLen,
diff --git a/vcl/inc/window.h b/vcl/inc/window.h
index 00702c2..fddddb6 100644
--- a/vcl/inc/window.h
+++ b/vcl/inc/window.h
@@ -320,7 +320,7 @@ public:
sal_Int32 mnMarginRight;
sal_Int32 mnMarginTop;
sal_Int32 mnMarginBottom;
- sal_uInt8 mbFrame:1,
+ bool mbFrame:1,
mbBorderWin:1,
mbOverlapWin:1,
mbSysWin:1,
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 4c43db6..8d443c9 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -3239,7 +3239,7 @@ void CheckBox::ImplDrawCheckBoxState()
{
bool bNativeOK = sal_True;
- if ( (bNativeOK=IsNativeControlSupported(CTRL_CHECKBOX, PART_ENTIRE_CONTROL)) == sal_True )
+ if ( (bNativeOK=IsNativeControlSupported(CTRL_CHECKBOX, PART_ENTIRE_CONTROL)) )
{
ImplControlValue aControlValue( meState == STATE_CHECK ? BUTTONVALUE_ON : BUTTONVALUE_OFF );
Rectangle aCtrlRegion( maStateRect );
@@ -3262,7 +3262,7 @@ void CheckBox::ImplDrawCheckBoxState()
aControlValue, OUString() );
}
- if ( bNativeOK == sal_False )
+ if ( !bNativeOK )
{
sal_uInt16 nStyle = ImplGetButtonState();
if ( !IsEnabled() )
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index e37d309..70febab 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -996,7 +996,7 @@ LanguageType Font::GetCJKContextLanguage() const { return mpImplFont->maCJKLangu
short Font::GetOrientation() const { return mpImplFont->mnOrientation; }
-sal_Bool Font::IsVertical() const { return mpImplFont->mbVertical; }
+bool Font::IsVertical() const { return mpImplFont->mbVertical; }
FontKerning Font::GetKerning() const { return mpImplFont->mnKerning; }
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index a24819c..d29df4e 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -6192,7 +6192,7 @@ void Window::SetParent( Window* pNewParent )
// -----------------------------------------------------------------------
-void Window::Show( sal_Bool bVisible, sal_uInt16 nFlags )
+void Window::Show( bool bVisible, sal_uInt16 nFlags )
{
if ( mpWindowImpl->mbVisible == bVisible )
@@ -6201,7 +6201,7 @@ void Window::Show( sal_Bool bVisible, sal_uInt16 nFlags )
ImplDelData aDogTag( this );
sal_Bool bRealVisibilityChanged = sal_False;
- mpWindowImpl->mbVisible = (bVisible != 0);
+ mpWindowImpl->mbVisible = bVisible;
if ( !bVisible )
{
@@ -6561,7 +6561,7 @@ bool Window::IsCallHandlersOnInputDisabled() const
// -----------------------------------------------------------------------
-void Window::EnableInput( sal_Bool bEnable, sal_Bool bChild )
+void Window::EnableInput( bool bEnable, sal_Bool bChild )
{
sal_Bool bNotify = (bEnable != mpWindowImpl->mbInputDisabled);
@@ -6626,7 +6626,7 @@ void Window::EnableInput( sal_Bool bEnable, sal_Bool bChild )
// -----------------------------------------------------------------------
-void Window::EnableInput( sal_Bool bEnable, sal_Bool bChild, sal_Bool bSysWin,
+void Window::EnableInput( bool bEnable, sal_Bool bChild, sal_Bool bSysWin,
const Window* pExcludeWindow )
{
@@ -7604,7 +7604,7 @@ void Window::SetPointer( const Pointer& rPointer )
// -----------------------------------------------------------------------
-void Window::EnableChildPointerOverwrite( sal_Bool bOverwrite )
+void Window::EnableChildPointerOverwrite( bool bOverwrite )
{
if ( mpWindowImpl->mbChildPtrOverwrite == bOverwrite )
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index c09414c..83e8d4c 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -1162,7 +1162,7 @@ void PPDParser::parse( ::std::list< OString >& rLines )
m_pTranslator->insertValue( aUniKey, aOption, aValue, aValueTranslation, aTransLocale );
// eventually update query and remove from option list
- if( bQuery && pKey->m_bQueryValue == sal_False )
+ if( bQuery && !pKey->m_bQueryValue )
{
pKey->m_aQueryValue = *pValue;
pKey->m_bQueryValue = true;
diff --git a/vcl/unx/gtk/a11y/atkwindow.cxx b/vcl/unx/gtk/a11y/atkwindow.cxx
index a9e8375..e60ef0b 100644
--- a/vcl/unx/gtk/a11y/atkwindow.cxx
+++ b/vcl/unx/gtk/a11y/atkwindow.cxx
@@ -75,7 +75,7 @@ init_from_window( AtkObject *accessible, Window *pWindow )
Window *pParent = pWindow->GetParent();
if( pParent ) {
type = pParent->GetType();
- parentIsMenuFloatingWindow = ( TRUE == pParent->IsMenuFloatingWindow() );
+ parentIsMenuFloatingWindow = pParent->IsMenuFloatingWindow();
}
if( (WINDOW_LISTBOX != type) && (WINDOW_COMBOBOX != type) &&
diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx
index 60ccdc3..b0a6a9f 100644
--- a/vcl/unx/gtk/gdi/salprn-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx
@@ -1133,7 +1133,7 @@ GtkPrintDialog::impl_readFromSettings()
m_pWrapper->print_settings_set_n_copies(pSettings, sal::static_int_cast<gint>(nCopyCount));
}
- const gboolean bOldCollate(m_pWrapper->print_settings_get_collate(pSettings));
+ const bool bOldCollate(m_pWrapper->print_settings_get_collate(pSettings));
const bool bCollate(aCollate.equalsIgnoreAsciiCase("true"));
if (bOldCollate != bCollate)
{
diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx
index fe5d87a..976465e 100644
--- a/vcl/unx/gtk/window/gtksalmenu.cxx
+++ b/vcl/unx/gtk/window/gtksalmenu.cxx
@@ -679,7 +679,7 @@ void GtkSalMenu::DispatchCommand( gint itemId, const gchar *aCommand )
{
SolarMutexGuard aGuard;
// Only the menubar is allowed to dispatch commands.
- if ( mbMenuBar != TRUE )
+ if ( !mbMenuBar )
return;
GtkSalMenu* pSalSubMenu = GetMenuForItemCommand( (gchar*) aCommand, FALSE );
@@ -705,7 +705,7 @@ void GtkSalMenu::ActivateAllSubmenus(MenuBar* pMenuBar)
void GtkSalMenu::Activate()
{
- if ( mbMenuBar != TRUE )
+ if ( !mbMenuBar )
return;
ActivateAllSubmenus(static_cast<MenuBar*>(mpVCLMenu));
}
More information about the Libreoffice-commits
mailing list