desktop: sal_Bool->bool

Change-Id: Id2606a2024d62de1882da18a1e438fb626655ff4
This commit is contained in:
Noel Grandin
2014-04-17 11:33:18 +02:00
parent 9b0a75c7b1
commit 133b4d9729
10 changed files with 36 additions and 36 deletions

View File

@@ -50,7 +50,7 @@ namespace dp_gui {
class LicenseView : public MultiLineEdit, public SfxListener class LicenseView : public MultiLineEdit, public SfxListener
{ {
sal_Bool mbEndReached; bool mbEndReached;
Link maEndReachedHdl; Link maEndReachedHdl;
Link maScrolledHdl; Link maScrolledHdl;
@@ -60,8 +60,8 @@ public:
void ScrollDown( ScrollType eScroll ); void ScrollDown( ScrollType eScroll );
sal_Bool IsEndReached() const; bool IsEndReached() const;
sal_Bool EndReached() const { return mbEndReached; } bool EndReached() const { return mbEndReached; }
void SetEndReachedHdl( const Link& rHdl ) { maEndReachedHdl = rHdl; } void SetEndReachedHdl( const Link& rHdl ) { maEndReachedHdl = rHdl; }
@@ -134,9 +134,9 @@ void LicenseView::ScrollDown( ScrollType eScroll )
pScroll->DoScrollAction( eScroll ); pScroll->DoScrollAction( eScroll );
} }
sal_Bool LicenseView::IsEndReached() const bool LicenseView::IsEndReached() const
{ {
sal_Bool bEndReached; bool bEndReached;
ExtTextView* pView = GetTextView(); ExtTextView* pView = GetTextView();
ExtTextEngine* pEdit = GetTextEngine(); ExtTextEngine* pEdit = GetTextEngine();
@@ -145,9 +145,9 @@ sal_Bool LicenseView::IsEndReached() const
Point aBottom( 0, aOutSize.Height() ); Point aBottom( 0, aOutSize.Height() );
if ( (sal_uLong) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 ) if ( (sal_uLong) pView->GetDocPos( aBottom ).Y() >= nHeight - 1 )
bEndReached = sal_True; bEndReached = true;
else else
bEndReached = sal_False; bEndReached = false;
return bEndReached; return bEndReached;
} }
@@ -156,7 +156,7 @@ void LicenseView::Notify( SfxBroadcaster&, const SfxHint& rHint )
{ {
if ( rHint.IsA( TYPE(TextHint) ) ) if ( rHint.IsA( TYPE(TextHint) ) )
{ {
sal_Bool bLastVal = EndReached(); bool bLastVal = EndReached();
sal_uLong nId = ((const TextHint&)rHint).GetId(); sal_uLong nId = ((const TextHint&)rHint).GetId();
if ( nId == TEXT_HINT_PARAINSERTED ) if ( nId == TEXT_HINT_PARAINSERTED )

View File

@@ -205,7 +205,7 @@ public:
/** /**
Returns the URL for the icon image. Returns the URL for the icon image.
*/ */
OUString getIconURL( sal_Bool bHighContrast ) const; OUString getIconURL( bool bHighContrast ) const;
bool hasDescription() const; bool hasDescription() const;

View File

@@ -63,7 +63,7 @@ namespace desktop {
// checks the lockfile, asks user when lockfile is // checks the lockfile, asks user when lockfile is
// found (iff gui) and returns false when we may not continue // found (iff gui) and returns false when we may not continue
sal_Bool check( fpExecWarning execWarning ); bool check( fpExecWarning execWarning );
// removes the lockfile // removes the lockfile
~Lockfile(void); ~Lockfile(void);
@@ -73,14 +73,14 @@ namespace desktop {
// full qualified name (file://-url) of the lockfile // full qualified name (file://-url) of the lockfile
OUString m_aLockname; OUString m_aLockname;
// flag whether the d'tor should delete the lock // flag whether the d'tor should delete the lock
sal_Bool m_bRemove; bool m_bRemove;
sal_Bool m_bIsLocked; bool m_bIsLocked;
// ID // ID
OUString m_aId; OUString m_aId;
OUString m_aDate; OUString m_aDate;
// access to data in file // access to data in file
void syncToFile(void) const; void syncToFile(void) const;
sal_Bool isStale(void) const; bool isStale(void) const;
friend bool Lockfile_execWarning( Lockfile * that ); friend bool Lockfile_execWarning( Lockfile * that );
}; };

View File

@@ -1309,13 +1309,13 @@ sal_Bool ExtensionManager::synchronize(
OUString sSynchronizingShared(StrSyncRepository::get()); OUString sSynchronizingShared(StrSyncRepository::get());
sSynchronizingShared = sSynchronizingShared.replaceAll("%NAME", "shared"); sSynchronizingShared = sSynchronizingShared.replaceAll("%NAME", "shared");
dp_misc::ProgressLevel progressShared(xCmdEnv, sSynchronizingShared); dp_misc::ProgressLevel progressShared(xCmdEnv, sSynchronizingShared);
sal_Bool bModified = getSharedRepository()->synchronize(xAbortChannel, xCmdEnv); bool bModified = getSharedRepository()->synchronize(xAbortChannel, xCmdEnv);
progressShared.update("\n\n"); progressShared.update("\n\n");
OUString sSynchronizingBundled(StrSyncRepository::get()); OUString sSynchronizingBundled(StrSyncRepository::get());
sSynchronizingBundled = sSynchronizingBundled.replaceAll("%NAME", "bundled"); sSynchronizingBundled = sSynchronizingBundled.replaceAll("%NAME", "bundled");
dp_misc::ProgressLevel progressBundled(xCmdEnv, sSynchronizingBundled); dp_misc::ProgressLevel progressBundled(xCmdEnv, sSynchronizingBundled);
bModified |= getBundledRepository()->synchronize(xAbortChannel, xCmdEnv); bModified |= (bool)getBundledRepository()->synchronize(xAbortChannel, xCmdEnv);
progressBundled.update("\n\n"); progressBundled.update("\n\n");
//Always determine the active extension. //Always determine the active extension.

View File

@@ -530,7 +530,7 @@ DescriptionInfoset::getUpdateDownloadUrls() const
return getUrls("desc:update-download/desc:src/@xlink:href"); return getUrls("desc:update-download/desc:src/@xlink:href");
} }
OUString DescriptionInfoset::getIconURL( sal_Bool bHighContrast ) const OUString DescriptionInfoset::getIconURL( bool bHighContrast ) const
{ {
css::uno::Sequence< OUString > aStrList = getUrls( "desc:icon/desc:default/@xlink:href" ); css::uno::Sequence< OUString > aStrList = getUrls( "desc:icon/desc:default/@xlink:href" );
css::uno::Sequence< OUString > aStrListHC = getUrls( "desc:icon/desc:high-contrast/@xlink:href" ); css::uno::Sequence< OUString > aStrListHC = getUrls( "desc:icon/desc:high-contrast/@xlink:href" );

View File

@@ -547,7 +547,7 @@ void syncRepositories(
Reference<deployment::XExtensionManager> xExtensionManager; Reference<deployment::XExtensionManager> xExtensionManager;
//synchronize shared before bundled otherewise there are //synchronize shared before bundled otherewise there are
//more revoke and registration calls. //more revoke and registration calls.
sal_Bool bModified = false; bool bModified = false;
if (force || needToSyncRepository("shared") || needToSyncRepository("bundled")) if (force || needToSyncRepository("shared") || needToSyncRepository("bundled"))
{ {
xExtensionManager = xExtensionManager =

View File

@@ -74,8 +74,8 @@ namespace desktop {
Lockfile::Lockfile( bool bIPCserver ) Lockfile::Lockfile( bool bIPCserver )
:m_bIPCserver(bIPCserver) :m_bIPCserver(bIPCserver)
,m_bRemove(sal_False) ,m_bRemove(false)
,m_bIsLocked(sal_False) ,m_bIsLocked(false)
{ {
// build the file-url to use for the lock // build the file-url to use for the lock
OUString aUserPath; OUString aUserPath;
@@ -108,16 +108,16 @@ namespace desktop {
// try to create file // try to create file
File aFile(m_aLockname); File aFile(m_aLockname);
if (aFile.open( osl_File_OpenFlag_Create ) == File::E_EXIST) { if (aFile.open( osl_File_OpenFlag_Create ) == File::E_EXIST) {
m_bIsLocked = sal_True; m_bIsLocked = true;
} else { } else {
// new lock created // new lock created
aFile.close( ); aFile.close( );
syncToFile( ); syncToFile( );
m_bRemove = sal_True; m_bRemove = true;
} }
} }
sal_Bool Lockfile::check( fpExecWarning execWarning ) bool Lockfile::check( fpExecWarning execWarning )
{ {
if (m_bIsLocked) { if (m_bIsLocked) {
@@ -130,20 +130,20 @@ namespace desktop {
aFile.open( osl_File_OpenFlag_Create ); aFile.open( osl_File_OpenFlag_Create );
aFile.close( ); aFile.close( );
syncToFile( ); syncToFile( );
m_bRemove = sal_True; m_bRemove = true;
return sal_True; return true;
} else { } else {
//leave alone and return false //leave alone and return false
m_bRemove = sal_False; m_bRemove = false;
return sal_False; return false;
} }
} else { } else {
// lock was created by us // lock was created by us
return sal_True; return true;
} }
} }
sal_Bool Lockfile::isStale( void ) const bool Lockfile::isStale( void ) const
{ {
// this checks whether the lockfile was created on the same // this checks whether the lockfile was created on the same
// host by the same user. Should this be the case it is safe // host by the same user. Should this be the case it is safe
@@ -167,9 +167,9 @@ namespace desktop {
aSecurity.getUserName( myUserName ); aSecurity.getUserName( myUserName );
OString myUser(OUStringToOString(myUserName, RTL_TEXTENCODING_ASCII_US)); OString myUser(OUStringToOString(myUserName, RTL_TEXTENCODING_ASCII_US));
if (aUser == myUser) if (aUser == myUser)
return sal_True; return true;
} }
return sal_False; return false;
} }
void Lockfile::syncToFile( void ) const void Lockfile::syncToFile( void ) const

View File

@@ -74,7 +74,7 @@ void ComponentBackendDb::addEntry(OUString const & url, Data const & data)
{ {
Reference<css::xml::dom::XNode> componentNode = writeKeyElement(url); Reference<css::xml::dom::XNode> componentNode = writeKeyElement(url);
writeSimpleElement("java-type-library", writeSimpleElement("java-type-library",
OUString::boolean((sal_Bool) data.javaTypeLibrary), OUString::boolean(data.javaTypeLibrary),
componentNode); componentNode);
writeSimpleList( writeSimpleList(

View File

@@ -1367,7 +1367,7 @@ BackendImpl::ComponentPackageImpl::isRegistered_(
//the rest of the path is different). //the rest of the path is different).
//If the caller cannot precisely determine that this package was registered, then it must //If the caller cannot precisely determine that this package was registered, then it must
//call registerPackage. //call registerPackage.
sal_Bool bAmbiguous = m_registered == REG_VOID // REG_VOID == we are in the progress of unregistration bool bAmbiguous = m_registered == REG_VOID // REG_VOID == we are in the progress of unregistration
|| m_registered == REG_MAYBE_REGISTERED; || m_registered == REG_MAYBE_REGISTERED;
return beans::Optional< beans::Ambiguous<sal_Bool> >( return beans::Optional< beans::Ambiguous<sal_Bool> >(
true /* IsPresent */, true /* IsPresent */,

View File

@@ -100,7 +100,7 @@ class BackendImpl : public ImplBaseT
Reference<deployment::XPackage> bindBundleItem( Reference<deployment::XPackage> bindBundleItem(
OUString const & url, OUString const & mediaType, OUString const & url, OUString const & mediaType,
sal_Bool bRemoved, //that is, using data base information bool bRemoved, //that is, using data base information
OUString const & identifier, OUString const & identifier,
Reference<ucb::XCommandEnvironment> const & xCmdEnv, Reference<ucb::XCommandEnvironment> const & xCmdEnv,
bool notifyDetectionError = true ); bool notifyDetectionError = true );
@@ -128,7 +128,7 @@ class BackendImpl : public ImplBaseT
// throws css::uno::RuntimeException, // throws css::uno::RuntimeException,
// css::deployment::DeploymentException // css::deployment::DeploymentException
sal_Bool checkLicense( bool checkLicense(
Reference< ucb::XCommandEnvironment > const & xCmdEnv, Reference< ucb::XCommandEnvironment > const & xCmdEnv,
DescriptionInfoset const & description, bool bNoLicenseChecking) DescriptionInfoset const & description, bool bNoLicenseChecking)
throw (deployment::DeploymentException, throw (deployment::DeploymentException,
@@ -651,7 +651,7 @@ bool BackendImpl::PackageImpl::checkDependencies(
} }
} }
sal_Bool BackendImpl::PackageImpl::checkLicense( bool BackendImpl::PackageImpl::checkLicense(
css::uno::Reference< css::ucb::XCommandEnvironment > const & xCmdEnv, css::uno::Reference< css::ucb::XCommandEnvironment > const & xCmdEnv,
DescriptionInfoset const & info, bool alreadyInstalled) DescriptionInfoset const & info, bool alreadyInstalled)
throw (css::deployment::DeploymentException, throw (css::deployment::DeploymentException,
@@ -1348,7 +1348,7 @@ inline bool isBundle_( OUString const & mediaType )
Reference<deployment::XPackage> BackendImpl::PackageImpl::bindBundleItem( Reference<deployment::XPackage> BackendImpl::PackageImpl::bindBundleItem(
OUString const & url, OUString const & mediaType, OUString const & url, OUString const & mediaType,
sal_Bool bRemoved, OUString const & identifier, bool bRemoved, OUString const & identifier,
Reference<ucb::XCommandEnvironment> const & xCmdEnv, Reference<ucb::XCommandEnvironment> const & xCmdEnv,
bool notifyDetectionError ) bool notifyDetectionError )
{ {