summaryrefslogtreecommitdiff
path: root/framework/source/jobs
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/jobs
parentc2e98d3cc9e2642d746a9933fcd91230a7378aa1 (diff)
framework: sal_Bool->bool
Change-Id: Ia6e87e2b382bd4005637e14088bde9e809996a25
Diffstat (limited to 'framework/source/jobs')
-rw-r--r--framework/source/jobs/helponstartup.cxx20
-rw-r--r--framework/source/jobs/job.cxx50
-rw-r--r--framework/source/jobs/jobdata.cxx14
-rw-r--r--framework/source/jobs/jobresult.cxx2
-rw-r--r--framework/source/jobs/joburl.cxx18
-rw-r--r--framework/source/jobs/shelljob.cxx20
6 files changed, 62 insertions, 62 deletions
diff --git a/framework/source/jobs/helponstartup.cxx b/framework/source/jobs/helponstartup.cxx
index b5cc8c70c0af..a09acbe647d2 100644
--- a/framework/source/jobs/helponstartup.cxx
+++ b/framework/source/jobs/helponstartup.cxx
@@ -122,15 +122,15 @@ css::uno::Any SAL_CALL HelpOnStartup::execute(const css::uno::Sequence< css::bea
// b) help shows any other default page(!) => show default page for the detected module
// c) help shows any other content => do nothing (user travelled to any other content and leaved the set of default pages)
OUString sCurrentHelpURL = its_getCurrentHelpURL();
- sal_Bool bCurrentHelpURLIsAnyDefaultURL = its_isHelpUrlADefaultOne(sCurrentHelpURL);
- sal_Bool bShowIt = sal_False;
+ bool bCurrentHelpURLIsAnyDefaultURL = its_isHelpUrlADefaultOne(sCurrentHelpURL);
+ bool bShowIt = false;
// a)
if (sCurrentHelpURL.isEmpty())
- bShowIt = sal_True;
+ bShowIt = true;
// b)
else if (bCurrentHelpURLIsAnyDefaultURL)
- bShowIt = sal_True;
+ bShowIt = true;
if (bShowIt)
{
@@ -253,10 +253,10 @@ OUString HelpOnStartup::its_getCurrentHelpURL()
return sCurrentHelpURL;
}
-sal_Bool HelpOnStartup::its_isHelpUrlADefaultOne(const OUString& sHelpURL)
+bool HelpOnStartup::its_isHelpUrlADefaultOne(const OUString& sHelpURL)
{
if (sHelpURL.isEmpty())
- return sal_False;
+ return false;
// SAFE ->
osl::ClearableMutexGuard aLock(m_mutex);
@@ -267,7 +267,7 @@ sal_Bool HelpOnStartup::its_isHelpUrlADefaultOne(const OUString& sHelpURL)
// <- SAFE
if (!xConfig.is())
- return sal_False;
+ return false;
// check given help url against all default ones
const css::uno::Sequence< OUString > lModules = xConfig->getElementNames();
@@ -288,7 +288,7 @@ sal_Bool HelpOnStartup::its_isHelpUrlADefaultOne(const OUString& sHelpURL)
xModuleConfig->getByName("ooSetupFactoryHelpBaseURL") >>= sHelpBaseURL;
OUString sHelpURLForModule = HelpOnStartup::ist_createHelpURL(sHelpBaseURL, sLocale, sSystem);
if (sHelpURL.equals(sHelpURLForModule))
- return sal_True;
+ return true;
}
catch(const css::uno::RuntimeException&)
{ throw; }
@@ -296,7 +296,7 @@ sal_Bool HelpOnStartup::its_isHelpUrlADefaultOne(const OUString& sHelpURL)
{}
}
- return sal_False;
+ return false;
}
OUString HelpOnStartup::its_checkIfHelpEnabledAndGetURL(const OUString& sModule)
@@ -317,7 +317,7 @@ OUString HelpOnStartup::its_checkIfHelpEnabledAndGetURL(const OUString& sModule)
if (xConfig.is())
xConfig->getByName(sModule) >>= xModuleConfig;
- sal_Bool bHelpEnabled = sal_False;
+ bool bHelpEnabled = false;
if (xModuleConfig.is())
xModuleConfig->getByName("ooSetupFactoryHelpOnOpen") >>= bHelpEnabled;
diff --git a/framework/source/jobs/job.cxx b/framework/source/jobs/job.cxx
index ac85b4409609..8058431e708c 100644
--- a/framework/source/jobs/job.cxx
+++ b/framework/source/jobs/job.cxx
@@ -52,11 +52,11 @@ Job::Job( /*IN*/ const css::uno::Reference< css::uno::XComponentContext >& xCont
: m_aJobCfg (xContext )
, m_xContext (xContext )
, m_xFrame (xFrame )
- , m_bListenOnDesktop (sal_False )
- , m_bListenOnFrame (sal_False )
- , m_bListenOnModel (sal_False )
- , m_bPendingCloseFrame (sal_False )
- , m_bPendingCloseModel (sal_False )
+ , m_bListenOnDesktop (false )
+ , m_bListenOnFrame (false )
+ , m_bListenOnModel (false )
+ , m_bPendingCloseFrame (false )
+ , m_bPendingCloseModel (false )
, m_eRunState (E_NEW )
{
}
@@ -79,11 +79,11 @@ Job::Job( /*IN*/ const css::uno::Reference< css::uno::XComponentContext >& xCont
: m_aJobCfg (xContext )
, m_xContext (xContext )
, m_xModel (xModel )
- , m_bListenOnDesktop (sal_False )
- , m_bListenOnFrame (sal_False )
- , m_bListenOnModel (sal_False )
- , m_bPendingCloseFrame (sal_False )
- , m_bPendingCloseModel (sal_False )
+ , m_bListenOnDesktop (false )
+ , m_bListenOnFrame (false )
+ , m_bListenOnModel (false )
+ , m_bPendingCloseFrame (false )
+ , m_bPendingCloseModel (false )
, m_eRunState (E_NEW )
{
}
@@ -233,7 +233,7 @@ void Job::execute( /*IN*/ const css::uno::Sequence< css::beans::NamedValue >& lD
// and to disable ourself!
if (m_bPendingCloseFrame)
{
- m_bPendingCloseFrame = sal_False;
+ m_bPendingCloseFrame = false;
css::uno::Reference< css::util::XCloseable > xClose(m_xFrame, css::uno::UNO_QUERY);
if (xClose.is())
{
@@ -247,7 +247,7 @@ void Job::execute( /*IN*/ const css::uno::Sequence< css::beans::NamedValue >& lD
if (m_bPendingCloseModel)
{
- m_bPendingCloseModel = sal_False;
+ m_bPendingCloseModel = false;
css::uno::Reference< css::util::XCloseable > xClose(m_xModel, css::uno::UNO_QUERY);
if (xClose.is())
{
@@ -303,8 +303,8 @@ void Job::die()
m_xDesktop = css::uno::Reference< css::frame::XDesktop2 >();
m_xResultListener = css::uno::Reference< css::frame::XDispatchResultListener >();
m_xResultSourceFake = css::uno::Reference< css::uno::XInterface >();
- m_bPendingCloseFrame = sal_False;
- m_bPendingCloseModel = sal_False;
+ m_bPendingCloseFrame = false;
+ m_bPendingCloseModel = false;
}
/**
@@ -496,7 +496,7 @@ void Job::impl_startListening()
m_xDesktop = css::frame::Desktop::create( m_xContext );
css::uno::Reference< css::frame::XTerminateListener > xThis(static_cast< ::cppu::OWeakObject* >(this), css::uno::UNO_QUERY);
m_xDesktop->addTerminateListener(xThis);
- m_bListenOnDesktop = sal_True;
+ m_bListenOnDesktop = true;
}
catch(const css::uno::Exception&)
{
@@ -514,12 +514,12 @@ void Job::impl_startListening()
if (xCloseable.is())
{
xCloseable->addCloseListener(xThis);
- m_bListenOnFrame = sal_True;
+ m_bListenOnFrame = true;
}
}
catch(const css::uno::Exception&)
{
- m_bListenOnFrame = sal_False;
+ m_bListenOnFrame = false;
}
}
@@ -533,12 +533,12 @@ void Job::impl_startListening()
if (xCloseable.is())
{
xCloseable->addCloseListener(xThis);
- m_bListenOnModel = sal_True;
+ m_bListenOnModel = true;
}
}
catch(const css::uno::Exception&)
{
- m_bListenOnModel = sal_False;
+ m_bListenOnModel = false;
}
}
}
@@ -559,7 +559,7 @@ void Job::impl_stopListening()
css::uno::Reference< css::frame::XTerminateListener > xThis(static_cast< ::cppu::OWeakObject* >(this) , css::uno::UNO_QUERY);
m_xDesktop->removeTerminateListener(xThis);
m_xDesktop.clear();
- m_bListenOnDesktop = sal_False;
+ m_bListenOnDesktop = false;
}
catch(const css::uno::Exception&)
{
@@ -576,7 +576,7 @@ void Job::impl_stopListening()
if (xCloseable.is())
{
xCloseable->removeCloseListener(xThis);
- m_bListenOnFrame = sal_False;
+ m_bListenOnFrame = false;
}
}
catch(const css::uno::Exception&)
@@ -594,7 +594,7 @@ void Job::impl_stopListening()
if (xCloseable.is())
{
xCloseable->removeCloseListener(xThis);
- m_bListenOnModel = sal_False;
+ m_bListenOnModel = false;
}
}
catch(const css::uno::Exception&)
@@ -809,17 +809,17 @@ void SAL_CALL Job::disposing( const css::lang::EventObject& aEvent ) throw(css::
if (m_xDesktop.is() && aEvent.Source == m_xDesktop)
{
m_xDesktop.clear();
- m_bListenOnDesktop = sal_False;
+ m_bListenOnDesktop = false;
}
else if (m_xFrame.is() && aEvent.Source == m_xFrame)
{
m_xFrame = css::uno::Reference< css::frame::XFrame >();
- m_bListenOnFrame = sal_False;
+ m_bListenOnFrame = false;
}
else if (m_xModel.is() && aEvent.Source == m_xModel)
{
m_xModel = css::uno::Reference< css::frame::XModel >();
- m_bListenOnModel = sal_False;
+ m_bListenOnModel = false;
}
aWriteLock.clear();
diff --git a/framework/source/jobs/jobdata.cxx b/framework/source/jobs/jobdata.cxx
index 55270fc1f058..0e96805fa15d 100644
--- a/framework/source/jobs/jobdata.cxx
+++ b/framework/source/jobs/jobdata.cxx
@@ -391,7 +391,7 @@ css::uno::Sequence< css::beans::NamedValue > JobData::getConfig() const
@return sal_True if the represented job is part of the underlying configuration package.
*/
-sal_Bool JobData::hasConfig() const
+bool JobData::hasConfig() const
{
SolarMutexGuard g;
return (m_eMode==E_ALIAS || m_eMode==E_EVENT);
@@ -442,7 +442,7 @@ void JobData::disableJob()
/**
*/
-sal_Bool isEnabled( const OUString& sAdminTime ,
+bool isEnabled( const OUString& sAdminTime ,
const OUString& sUserTime )
{
/*Attention!
@@ -453,8 +453,8 @@ sal_Bool isEnabled( const OUString& sAdminTime ,
static OUString PATTERN_ISO8601("\?\?\?\?-\?\?-\?\?*");
WildCard aISOPattern(PATTERN_ISO8601);
- sal_Bool bValidAdmin = aISOPattern.Matches(sAdminTime);
- sal_Bool bValidUser = aISOPattern.Matches(sUserTime );
+ bool bValidAdmin = aISOPattern.Matches(sAdminTime);
+ bool bValidUser = aISOPattern.Matches(sUserTime );
// We check for "isEnabled()" here only.
// Note further: ISO8601 formated strings can be compared as strings directly!
@@ -484,13 +484,13 @@ void JobData::appendEnabledJobsForEvent( const css::uno::Reference< css::uno::XC
/**
*/
-sal_Bool JobData::hasCorrectContext(const OUString& rModuleIdent) const
+bool JobData::hasCorrectContext(const OUString& rModuleIdent) const
{
sal_Int32 nContextLen = m_sContext.getLength();
sal_Int32 nModuleIdLen = rModuleIdent.getLength();
if ( nContextLen == 0 )
- return sal_True;
+ return true;
if ( nModuleIdLen > 0 )
{
@@ -502,7 +502,7 @@ sal_Bool JobData::hasCorrectContext(const OUString& rModuleIdent) const
}
}
- return sal_False;
+ return false;
}
/**
diff --git a/framework/source/jobs/jobresult.cxx b/framework/source/jobs/jobresult.cxx
index 8544172a3f06..eef4ff59b463 100644
--- a/framework/source/jobs/jobresult.cxx
+++ b/framework/source/jobs/jobresult.cxx
@@ -176,7 +176,7 @@ void JobResult::operator=( const JobResult& rCopy )
@return We return true only, if any set flag of the given mask match.
*/
-sal_Bool JobResult::existPart( sal_uInt32 eParts ) const
+bool JobResult::existPart( sal_uInt32 eParts ) const
{
SolarMutexGuard g;
return ((m_eParts & eParts) == eParts);
diff --git a/framework/source/jobs/joburl.cxx b/framework/source/jobs/joburl.cxx
index 4dad4fb8f285..3f163e47cb76 100644
--- a/framework/source/jobs/joburl.cxx
+++ b/framework/source/jobs/joburl.cxx
@@ -102,7 +102,7 @@ JobURL::JobURL( /*IN*/ const OUString& sURL )
@return <TRUE/> if it represent a valid job URL.
*/
-sal_Bool JobURL::isValid() const
+bool JobURL::isValid() const
{
SolarMutexGuard g;
return (m_eRequest!=E_UNKNOWN);
@@ -124,12 +124,12 @@ sal_Bool JobURL::isValid() const
@attention The out parameter will be reseted everytime. Don't use it if method returns <FALSE/>!
*/
-sal_Bool JobURL::getEvent( /*OUT*/ OUString& sEvent ) const
+bool JobURL::getEvent( /*OUT*/ OUString& sEvent ) const
{
SolarMutexGuard g;
sEvent = OUString();
- sal_Bool bSet = ((m_eRequest & E_EVENT) == E_EVENT);
+ bool bSet = ((m_eRequest & E_EVENT) == E_EVENT);
if (bSet)
sEvent = m_sEvent;
@@ -152,12 +152,12 @@ sal_Bool JobURL::getEvent( /*OUT*/ OUString& sEvent ) const
@attention The out parameter will be reseted everytime. Don't use it if method returns <FALSE/>!
*/
-sal_Bool JobURL::getAlias( /*OUT*/ OUString& sAlias ) const
+bool JobURL::getAlias( /*OUT*/ OUString& sAlias ) const
{
SolarMutexGuard g;
sAlias = OUString();
- sal_Bool bSet = ((m_eRequest & E_ALIAS) == E_ALIAS);
+ bool bSet = ((m_eRequest & E_ALIAS) == E_ALIAS);
if (bSet)
sAlias = m_sAlias;
@@ -180,12 +180,12 @@ sal_Bool JobURL::getAlias( /*OUT*/ OUString& sAlias ) const
@attention The out parameter will be reseted everytime. Don't use it if method returns <FALSE/>!
*/
-sal_Bool JobURL::getService( /*OUT*/ OUString& sService ) const
+bool JobURL::getService( /*OUT*/ OUString& sService ) const
{
SolarMutexGuard g;
sService = OUString();
- sal_Bool bSet = ((m_eRequest & E_SERVICE) == E_SERVICE);
+ bool bSet = ((m_eRequest & E_SERVICE) == E_SERVICE);
if (bSet)
sService = m_sService;
@@ -217,14 +217,14 @@ sal_Bool JobURL::getService( /*OUT*/ OUString& sService ) const
@return <TRUE/> if the identifier could be found and the string was splitted.
<FALSE/> otherwise.
*/
-sal_Bool JobURL::implst_split( /*IN*/ const OUString& sPart ,
+bool JobURL::implst_split( /*IN*/ const OUString& sPart ,
/*IN*/ const sal_Char* pPartIdentifier ,
/*IN*/ sal_Int32 nPartLength ,
/*OUT*/ OUString& rPartValue ,
/*OUT*/ OUString& rPartArguments )
{
// first search for the given identifier
- sal_Bool bPartFound = (sPart.matchIgnoreAsciiCaseAsciiL(pPartIdentifier,nPartLength,0));
+ bool bPartFound = (sPart.matchIgnoreAsciiCaseAsciiL(pPartIdentifier,nPartLength,0));
// If it exist - we can split the part and return sal_True.
// Otherwhise we do nothing and return sal_False.
diff --git a/framework/source/jobs/shelljob.cxx b/framework/source/jobs/shelljob.cxx
index 0653be8e7e83..d9a2fb5a61a3 100644
--- a/framework/source/jobs/shelljob.cxx
+++ b/framework/source/jobs/shelljob.cxx
@@ -88,8 +88,8 @@ css::uno::Any SAL_CALL ShellJob::execute(const css::uno::Sequence< css::beans::N
const OUString sCommand = lOwnCfg.getUnpackedValueOrDefault(PROP_COMMAND , OUString());
const css::uno::Sequence< OUString > lCommandArguments = lOwnCfg.getUnpackedValueOrDefault(PROP_ARGUMENTS , css::uno::Sequence< OUString >());
- const sal_Bool bDeactivateJobIfDone = lOwnCfg.getUnpackedValueOrDefault(PROP_DEACTIVATEJOBIFDONE , sal_True );
- const sal_Bool bCheckExitCode = lOwnCfg.getUnpackedValueOrDefault(PROP_CHECKEXITCODE , sal_True );
+ const bool bDeactivateJobIfDone = lOwnCfg.getUnpackedValueOrDefault(PROP_DEACTIVATEJOBIFDONE , sal_True );
+ const bool bCheckExitCode = lOwnCfg.getUnpackedValueOrDefault(PROP_CHECKEXITCODE , sal_True );
// replace all might existing place holder.
OUString sRealCommand = impl_substituteCommandVariables(sCommand);
@@ -101,7 +101,7 @@ css::uno::Any SAL_CALL ShellJob::execute(const css::uno::Sequence< css::beans::N
return ShellJob::impl_generateAnswer4Deactivation();
// do it
- sal_Bool bDone = impl_execute(sRealCommand, lCommandArguments, bCheckExitCode);
+ bool bDone = impl_execute(sRealCommand, lCommandArguments, bCheckExitCode);
if (! bDone)
return css::uno::Any();
@@ -129,7 +129,7 @@ OUString ShellJob::impl_substituteCommandVariables(const OUString& sCommand)
try
{
css::uno::Reference< css::util::XStringSubstitution > xSubst( css::util::PathSubstitution::create(m_xContext) );
- const sal_Bool bSubstRequired = sal_True;
+ const bool bSubstRequired = true;
const OUString sCompleteCommand = xSubst->substituteVariables(sCommand, bSubstRequired);
return sCompleteCommand;
@@ -140,9 +140,9 @@ OUString ShellJob::impl_substituteCommandVariables(const OUString& sCommand)
return OUString();
}
-sal_Bool ShellJob::impl_execute(const OUString& sCommand ,
- const css::uno::Sequence< OUString >& lArguments ,
- sal_Bool bCheckExitCode)
+bool ShellJob::impl_execute(const OUString& sCommand ,
+ const css::uno::Sequence< OUString >& lArguments ,
+ bool bCheckExitCode)
{
::rtl_uString** pArgs = NULL;
const ::sal_Int32 nArgs = lArguments.getLength ();
@@ -156,9 +156,9 @@ sal_Bool ShellJob::impl_execute(const OUString& sCommand
// executable not found or couldnt be started
if (eError != osl_Process_E_None)
- return sal_False;
+ return false;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
if (bCheckExitCode)
{
// check its return codes ...
@@ -167,7 +167,7 @@ sal_Bool ShellJob::impl_execute(const OUString& sCommand
eError = osl_getProcessInfo(hProcess, osl_Process_EXITCODE, &aInfo);
if (eError != osl_Process_E_None)
- bRet = sal_False;
+ bRet = false;
else
bRet = (aInfo.Code == 0);
}