summaryrefslogtreecommitdiff
path: root/framework/source/helper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-04-04 15:53:21 +0200
committerNoel Grandin <noel@peralex.com>2014-04-07 13:53:49 +0200
commita6287e21f1dab6ae382c24ceeb4c0212b7cad2d7 (patch)
treef0bb68a88c56647fc9165ec69cc05cd5bc441ea6 /framework/source/helper
parentc2e98d3cc9e2642d746a9933fcd91230a7378aa1 (diff)
framework: sal_Bool->bool
Change-Id: Ia6e87e2b382bd4005637e14088bde9e809996a25
Diffstat (limited to 'framework/source/helper')
-rw-r--r--framework/source/helper/ocomponentaccess.cxx4
-rw-r--r--framework/source/helper/ocomponentenumeration.cxx8
-rw-r--r--framework/source/helper/oframes.cxx26
-rw-r--r--framework/source/helper/persistentwindowstate.cxx10
-rw-r--r--framework/source/helper/statusindicatorfactory.cxx34
-rw-r--r--framework/source/helper/tagwindowasmodified.cxx6
-rw-r--r--framework/source/helper/titlebarupdate.cxx10
-rw-r--r--framework/source/helper/uiconfigelementwrapperbase.cxx6
-rw-r--r--framework/source/helper/uielementwrapperbase.cxx6
9 files changed, 55 insertions, 55 deletions
diff --git a/framework/source/helper/ocomponentaccess.cxx b/framework/source/helper/ocomponentaccess.cxx
index c1acf844d02f..85b65cfc7c32 100644
--- a/framework/source/helper/ocomponentaccess.cxx
+++ b/framework/source/helper/ocomponentaccess.cxx
@@ -90,7 +90,7 @@ sal_Bool SAL_CALL OComponentAccess::hasElements() throw( RuntimeException, std::
SolarMutexGuard g;
// Set default return value, if method failed.
- sal_Bool bReturn = sal_False;
+ bool bReturn = false;
// Try to "lock" the desktop for access to task container.
css::uno::Reference< XFramesSupplier > xLock( m_xOwner.get(), UNO_QUERY );
@@ -181,7 +181,7 @@ css::uno::Reference< XComponent > OComponentAccess::impl_getFrameComponent( cons
But ... look for right testing! See using of this methods!
-----------------------------------------------------------------------------------------------------------------*/
-sal_Bool OComponentAccess::impldbg_checkParameter_OComponentAccessCtor( const css::uno::Reference< XDesktop >& xOwner )
+bool OComponentAccess::impldbg_checkParameter_OComponentAccessCtor( const css::uno::Reference< XDesktop >& xOwner )
{
return xOwner.is();
}
diff --git a/framework/source/helper/ocomponentenumeration.cxx b/framework/source/helper/ocomponentenumeration.cxx
index e92c06593868..84d57565c9c1 100644
--- a/framework/source/helper/ocomponentenumeration.cxx
+++ b/framework/source/helper/ocomponentenumeration.cxx
@@ -132,22 +132,22 @@ void OComponentEnumeration::impl_resetObject()
-----------------------------------------------------------------------------------------------------------------*/
// An empty list is allowed ... hasMoreElements() will return false then!
-sal_Bool OComponentEnumeration::impldbg_checkParameter_OComponentEnumerationCtor( const Sequence< css::uno::Reference< XComponent > >& seqComponents )
+bool OComponentEnumeration::impldbg_checkParameter_OComponentEnumerationCtor( const Sequence< css::uno::Reference< XComponent > >& seqComponents )
{
// Set default return value.
- sal_Bool bOK = sal_True;
+ bool bOK = true;
// Check parameter.
if (
( &seqComponents == NULL )
)
{
- bOK = sal_False;
+ bOK = false;
}
// Return result of check.
return bOK;
}
-sal_Bool OComponentEnumeration::impldbg_checkParameter_disposing( const EventObject& aEvent )
+bool OComponentEnumeration::impldbg_checkParameter_disposing( const EventObject& aEvent )
{
return aEvent.Source.is();
}
diff --git a/framework/source/helper/oframes.cxx b/framework/source/helper/oframes.cxx
index 9c41a190ea73..70b6a17304b4 100644
--- a/framework/source/helper/oframes.cxx
+++ b/framework/source/helper/oframes.cxx
@@ -40,7 +40,7 @@ OFrames::OFrames( const css::uno::Reference< XFrame >& xOwner
FrameContainer* pFrameContainer )
: m_xOwner ( xOwner )
, m_pFrameContainer ( pFrameContainer )
- , m_bRecursiveSearchProtection( sal_False )
+ , m_bRecursiveSearchProtection( false )
{
// Safe impossible cases
// Method is not defined for ALL incoming parameters!
@@ -120,7 +120,7 @@ Sequence< css::uno::Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int
if ( xOwner.is() )
{
// Work only, if search was not started here ...!
- if( m_bRecursiveSearchProtection == sal_False )
+ if( m_bRecursiveSearchProtection == false )
{
// This class is a helper for services, which must implement XFrames.
// His parent and children are MY parent and children to.
@@ -161,7 +161,7 @@ Sequence< css::uno::Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int
{
// Else; start a new search.
// Protect this instance against recursive calls from parents.
- m_bRecursiveSearchProtection = sal_True;
+ m_bRecursiveSearchProtection = true;
// 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 ...
@@ -172,7 +172,7 @@ Sequence< css::uno::Reference< XFrame > > SAL_CALL OFrames::queryFrames( sal_Int
}
// We have all searched information.
// Reset protection-mode.
- m_bRecursiveSearchProtection = sal_False;
+ m_bRecursiveSearchProtection = false;
}
// If searched for children, step over all elements in container and collect the information.
@@ -264,7 +264,7 @@ sal_Bool SAL_CALL OFrames::hasElements() throw( RuntimeException, std::exception
SolarMutexGuard g;
// Set default return value.
- sal_Bool bHasElements = sal_False;
+ bool bHasElements = false;
// 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 );
@@ -274,7 +274,7 @@ sal_Bool SAL_CALL OFrames::hasElements() throw( RuntimeException, std::exception
if ( m_pFrameContainer->getCount() > 0 )
{
// ... change this state value!
- bHasElements = sal_True;
+ bHasElements = true;
}
}
// Return result of this operation.
@@ -350,32 +350,32 @@ void OFrames::impl_appendSequence( Sequence< css::uno::Reference< XFram
// An instance of this class can only work with valid initialization.
// We share the mutex with our owner class, need a valid factory to instanciate new services and
// use the access to our owner for some operations.
-sal_Bool OFrames::impldbg_checkParameter_OFramesCtor( const css::uno::Reference< XFrame >& xOwner ,
- FrameContainer* pFrameContainer )
+bool OFrames::impldbg_checkParameter_OFramesCtor( const css::uno::Reference< XFrame >& xOwner ,
+ FrameContainer* pFrameContainer )
{
return xOwner.is() && pFrameContainer != 0;
}
// Its only allowed to add valid references to container.
// AND - alle frames must support XFrames-interface!
-sal_Bool OFrames::impldbg_checkParameter_append( const css::uno::Reference< XFrame >& xFrame )
+bool OFrames::impldbg_checkParameter_append( const css::uno::Reference< XFrame >& xFrame )
{
return xFrame.is();
}
// Its only allowed to add valid references to container...
// ... => You can only delete valid references!
-sal_Bool OFrames::impldbg_checkParameter_remove( const css::uno::Reference< XFrame >& xFrame )
+bool OFrames::impldbg_checkParameter_remove( const css::uno::Reference< XFrame >& xFrame )
{
return xFrame.is();
}
// A search for frames must initiate with right flags.
// Some one are superflous and not supported yet. But here we control only the range of incoming parameter!
-sal_Bool OFrames::impldbg_checkParameter_queryFrames( sal_Int32 nSearchFlags )
+bool OFrames::impldbg_checkParameter_queryFrames( sal_Int32 nSearchFlags )
{
// Set default return value.
- sal_Bool bOK = sal_True;
+ bool bOK = true;
// Check parameter.
if (
( nSearchFlags != FrameSearchFlag::AUTO ) &&
@@ -389,7 +389,7 @@ sal_Bool OFrames::impldbg_checkParameter_queryFrames( sal_Int32 nSearchFlags )
( !( nSearchFlags & FrameSearchFlag::GLOBAL ) )
)
{
- bOK = sal_False;
+ bOK = false;
}
// Return result of check.
return bOK;
diff --git a/framework/source/helper/persistentwindowstate.cxx b/framework/source/helper/persistentwindowstate.cxx
index 411e3dbf03a1..1a9e07e2173b 100644
--- a/framework/source/helper/persistentwindowstate.cxx
+++ b/framework/source/helper/persistentwindowstate.cxx
@@ -42,7 +42,7 @@ namespace framework{
PersistentWindowState::PersistentWindowState(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: m_xContext (xContext )
- , m_bWindowStateAlreadySet(sal_False )
+ , m_bWindowStateAlreadySet(false )
{
}
@@ -83,7 +83,7 @@ void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEv
{
css::uno::Reference< css::uno::XComponentContext > xContext;
css::uno::Reference< css::frame::XFrame > xFrame;
- sal_Bool bRestoreWindowState;
+ bool bRestoreWindowState;
{
SolarMutexGuard g;
xContext = m_xContext;
@@ -114,7 +114,7 @@ void SAL_CALL PersistentWindowState::frameAction(const css::frame::FrameActionEv
OUString sWindowState = PersistentWindowState::implst_getWindowStateFromConfig(xContext, sModuleName);
PersistentWindowState::implst_setWindowStateOnWindow(xWindow,sWindowState);
SolarMutexGuard g;
- m_bWindowStateAlreadySet = sal_True;
+ m_bWindowStateAlreadySet = true;
}
}
break;
@@ -266,8 +266,8 @@ void PersistentWindowState::implst_setWindowStateOnWindow(const css::uno::Refere
return;
// check for system and work window - its necessary to guarantee correct pointer cast!
- sal_Bool bSystemWindow = pWindow->IsSystemWindow();
- sal_Bool bWorkWindow = (pWindow->GetType() == WINDOW_WORKWINDOW);
+ bool bSystemWindow = pWindow->IsSystemWindow();
+ bool bWorkWindow = (pWindow->GetType() == WINDOW_WORKWINDOW);
if (!bSystemWindow && !bWorkWindow)
return;
diff --git a/framework/source/helper/statusindicatorfactory.cxx b/framework/source/helper/statusindicatorfactory.cxx
index 101039e1be29..b1e10a5f8383 100644
--- a/framework/source/helper/statusindicatorfactory.cxx
+++ b/framework/source/helper/statusindicatorfactory.cxx
@@ -55,9 +55,9 @@ const char PROGRESS_RESOURCE[] = "private:resource/progressbar/progressbar";
StatusIndicatorFactory::StatusIndicatorFactory(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: m_xContext (xContext )
, m_pWakeUp (0 )
- , m_bAllowReschedule (sal_False)
- , m_bAllowParentShow (sal_False)
- , m_bDisableReschedule(sal_False)
+ , m_bAllowReschedule (false)
+ , m_bAllowParentShow (false)
+ , m_bDisableReschedule(false)
{
}
@@ -93,8 +93,8 @@ void SAL_CALL StatusIndicatorFactory::initialize(const css::uno::Sequence< css::
m_xFrame = lArgs.getUnpackedValueOrDefault("Frame" , css::uno::Reference< css::frame::XFrame >());
m_xPluggWindow = lArgs.getUnpackedValueOrDefault("Window" , css::uno::Reference< css::awt::XWindow >() );
- m_bAllowParentShow = lArgs.getUnpackedValueOrDefault("AllowParentShow" , (sal_Bool)sal_False );
- m_bDisableReschedule = lArgs.getUnpackedValueOrDefault("DisableReschedule", (sal_Bool)sal_False );
+ m_bAllowParentShow = lArgs.getUnpackedValueOrDefault("AllowParentShow" , sal_False );
+ m_bDisableReschedule = lArgs.getUnpackedValueOrDefault("DisableReschedule", sal_False );
}
}
@@ -114,7 +114,7 @@ void SAL_CALL StatusIndicatorFactory::update()
throw(css::uno::RuntimeException, std::exception)
{
osl::MutexGuard g(m_mutex);
- m_bAllowReschedule = sal_True;
+ m_bAllowReschedule = true;
}
void StatusIndicatorFactory::start(const css::uno::Reference< css::task::XStatusIndicator >& xChild,
@@ -143,7 +143,7 @@ void StatusIndicatorFactory::start(const css::uno::Reference< css::task::XStatus
xProgress->start(sText, nRange);
impl_startWakeUpThread();
- impl_reschedule(sal_True);
+ impl_reschedule(true);
}
void StatusIndicatorFactory::reset(const css::uno::Reference< css::task::XStatusIndicator >& xChild)
@@ -173,7 +173,7 @@ void StatusIndicatorFactory::reset(const css::uno::Reference< css::task::XStatus
)
xProgress->reset();
- impl_reschedule(sal_True);
+ impl_reschedule(true);
}
void StatusIndicatorFactory::end(const css::uno::Reference< css::task::XStatusIndicator >& xChild)
@@ -226,7 +226,7 @@ void StatusIndicatorFactory::end(const css::uno::Reference< css::task::XStatusIn
impl_stopWakeUpThread();
}
- impl_reschedule(sal_True);
+ impl_reschedule(true);
}
void StatusIndicatorFactory::setText(const css::uno::Reference< css::task::XStatusIndicator >& xChild,
@@ -255,7 +255,7 @@ void StatusIndicatorFactory::setText(const css::uno::Reference< css::task::XStat
xProgress->setText(sText);
}
- impl_reschedule(sal_True);
+ impl_reschedule(true);
}
void StatusIndicatorFactory::setValue( const css::uno::Reference< css::task::XStatusIndicator >& xChild ,
@@ -287,7 +287,7 @@ void StatusIndicatorFactory::setValue( const css::uno::Reference< css::task::XSt
xProgress->setValue(nValue);
}
- impl_reschedule(sal_False);
+ impl_reschedule(false);
}
void StatusIndicatorFactory::implts_makeParentVisibleIfAllowed()
@@ -315,7 +315,7 @@ void StatusIndicatorFactory::implts_makeParentVisibleIfAllowed()
// Supress any setVisible() or toFront() call in case the initial show was
// already made.
css::uno::Reference< css::awt::XWindow2 > xVisibleCheck(xParentWindow, css::uno::UNO_QUERY);
- sal_Bool bIsVisible = sal_False;
+ bool bIsVisible = false;
if (xVisibleCheck.is())
bIsVisible = xVisibleCheck->isVisible();
@@ -345,7 +345,7 @@ void StatusIndicatorFactory::implts_makeParentVisibleIfAllowed()
// on saving documents. Because there is no progress set on the MediaDescriptor.
// But that's wrong. In case the document was opened hidden, they should not use any progress .-(
// They only possible workaround: dont show the parent window here, if the document was opened hidden.
- sal_Bool bHiddenDoc = sal_False;
+ bool bHiddenDoc = false;
if (xFrame.is())
{
css::uno::Reference< css::frame::XController > xController;
@@ -358,7 +358,7 @@ void StatusIndicatorFactory::implts_makeParentVisibleIfAllowed()
utl::MediaDescriptor lDocArgs(xModel->getArgs());
bHiddenDoc = lDocArgs.getUnpackedValueOrDefault(
utl::MediaDescriptor::PROP_HIDDEN(),
- (sal_Bool)sal_False);
+ sal_False);
}
}
@@ -494,7 +494,7 @@ void StatusIndicatorFactory::impl_hideProgress()
}
}
-void StatusIndicatorFactory::impl_reschedule(sal_Bool bForce)
+void StatusIndicatorFactory::impl_reschedule(bool bForce)
{
// SAFE ->
osl::ClearableMutexGuard aReadLock(m_mutex);
@@ -503,12 +503,12 @@ void StatusIndicatorFactory::impl_reschedule(sal_Bool bForce)
aReadLock.clear();
// <- SAFE
- sal_Bool bReschedule = bForce;
+ bool bReschedule = bForce;
if (!bReschedule)
{
osl::MutexGuard g(m_mutex);
bReschedule = m_bAllowReschedule;
- m_bAllowReschedule = sal_False;
+ m_bAllowReschedule = false;
}
if (!bReschedule)
diff --git a/framework/source/helper/tagwindowasmodified.cxx b/framework/source/helper/tagwindowasmodified.cxx
index 69802119989e..4200de514b30 100644
--- a/framework/source/helper/tagwindowasmodified.cxx
+++ b/framework/source/helper/tagwindowasmodified.cxx
@@ -84,7 +84,7 @@ void SAL_CALL TagWindowAsModified::modified(const css::lang::EventObject& aEvent
return;
}
- sal_Bool bModified = xModel->isModified ();
+ bool bModified = xModel->isModified ();
// SYNCHRONIZED ->
SolarMutexGuard aSolarGuard;
@@ -93,8 +93,8 @@ void SAL_CALL TagWindowAsModified::modified(const css::lang::EventObject& aEvent
if ( ! pWindow)
return;
- sal_Bool bSystemWindow = pWindow->IsSystemWindow();
- sal_Bool bWorkWindow = (pWindow->GetType() == WINDOW_WORKWINDOW);
+ bool bSystemWindow = pWindow->IsSystemWindow();
+ bool bWorkWindow = (pWindow->GetType() == WINDOW_WORKWINDOW);
if (!bSystemWindow && !bWorkWindow)
return;
diff --git a/framework/source/helper/titlebarupdate.cxx b/framework/source/helper/titlebarupdate.cxx
index 5f6791cff4bf..cd7ef0f3a9ea 100644
--- a/framework/source/helper/titlebarupdate.cxx
+++ b/framework/source/helper/titlebarupdate.cxx
@@ -191,11 +191,11 @@ void TitleBarUpdate::impl_updateApplicationID(const css::uno::Reference< css::fr
// <- VCL SYNCHRONIZED
}
-sal_Bool TitleBarUpdate::implst_getModuleInfo(const css::uno::Reference< css::frame::XFrame >& xFrame,
- TModuleInfo& rInfo )
+bool TitleBarUpdate::implst_getModuleInfo(const css::uno::Reference< css::frame::XFrame >& xFrame,
+ TModuleInfo& rInfo )
{
if ( ! xFrame.is ())
- return sal_False;
+ return false;
try
{
@@ -210,13 +210,13 @@ sal_Bool TitleBarUpdate::implst_getModuleInfo(const css::uno::Reference< css::fr
// Note: If we could retrieve a module id ... everything is OK.
// UIName and Icon ID are optional values !
- sal_Bool bSuccess = !rInfo.sID.isEmpty();
+ bool bSuccess = !rInfo.sID.isEmpty();
return bSuccess;
}
catch(const css::uno::Exception&)
{}
- return sal_False;
+ return false;
}
void TitleBarUpdate::impl_forceUpdate()
diff --git a/framework/source/helper/uiconfigelementwrapperbase.cxx b/framework/source/helper/uiconfigelementwrapperbase.cxx
index e93535c41e08..2ed6c60d2bc7 100644
--- a/framework/source/helper/uiconfigelementwrapperbase.cxx
+++ b/framework/source/helper/uiconfigelementwrapperbase.cxx
@@ -173,7 +173,7 @@ sal_Bool SAL_CALL UIConfigElementWrapperBase::convertFastPropertyValue( Any&
{
// Initialize state with sal_False !!!
// (Handle can be invalid)
- sal_Bool bReturn = sal_False;
+ bool bReturn = false;
switch( nHandle )
{
@@ -314,7 +314,7 @@ void SAL_CALL UIConfigElementWrapperBase::setFastPropertyValue_NoBroadcast( sa
}
case UIELEMENT_PROPHANDLE_PERSISTENT:
{
- sal_Bool bBool( m_bPersistent );
+ bool bBool( m_bPersistent );
aValue >>= bBool;
m_bPersistent = bBool;
break;
@@ -330,7 +330,7 @@ void SAL_CALL UIConfigElementWrapperBase::setFastPropertyValue_NoBroadcast( sa
break;
case UIELEMENT_PROPHANDLE_NOCLOSE:
{
- sal_Bool bBool( m_bNoClose );
+ bool bBool( m_bNoClose );
aValue >>= bBool;
m_bNoClose = bBool;
break;
diff --git a/framework/source/helper/uielementwrapperbase.cxx b/framework/source/helper/uielementwrapperbase.cxx
index 90c150a861f7..df5f7a4300e2 100644
--- a/framework/source/helper/uielementwrapperbase.cxx
+++ b/framework/source/helper/uielementwrapperbase.cxx
@@ -48,8 +48,8 @@ UIElementWrapperBase::UIElementWrapperBase( sal_Int16 nType )
, ::cppu::OPropertySetHelper ( *(static_cast< ::cppu::OBroadcastHelper* >(this)) )
, m_aListenerContainer ( m_aMutex )
, m_nType ( nType )
- , m_bInitialized ( sal_False )
- , m_bDisposed ( sal_False )
+ , m_bInitialized ( false )
+ , m_bDisposed ( false )
{
}
@@ -106,7 +106,7 @@ throw ( Exception, RuntimeException, std::exception )
}
}
- m_bInitialized = sal_True;
+ m_bInitialized = true;
}
}