Kaydet (Commit) 79853113 authored tarafından Noel Grandin's avatar Noel Grandin

desktop: sal_Bool->bool

Change-Id: I3462a9d4c23c9bc858c1a9d91caa58d87b204ee0
üst 79cf53cb
......@@ -114,10 +114,10 @@ class Desktop : public Application
return m_aBootstrapStatus;
}
static sal_Bool isCrashReporterEnabled();
static bool isCrashReporterEnabled();
// first-start (ever) related methods
static sal_Bool CheckExtensionDependencies();
static bool CheckExtensionDependencies();
void SynchronizeExtensionRepositories();
void SetSplashScreenText( const OUString& rText );
......@@ -136,10 +136,10 @@ class Desktop : public Application
void CreateTemporaryDirectory();
void RemoveTemporaryDirectory();
sal_Bool InitializeInstallation( const OUString& rAppFilename );
bool InitializeInstallation( const OUString& rAppFilename );
bool InitializeConfiguration();
void FlushConfiguration();
sal_Bool InitializeQuickstartMode( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
bool InitializeQuickstartMode( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
void HandleBootstrapPathErrors( ::utl::Bootstrap::Status, const OUString& aMsg );
void StartSetup( const OUString& aParameters );
......@@ -169,9 +169,9 @@ class Desktop : public Application
static void ShowBackingComponent(Desktop * progress);
static sal_Bool SaveTasks();
static bool SaveTasks();
static sal_Bool isUIOnSessionShutdownAllowed();
static bool isUIOnSessionShutdownAllowed();
// on-demand acceptors
static void createAcceptor(const OUString& aDescription);
......
This diff is collapsed.
......@@ -129,7 +129,7 @@ void Desktop::RegisterServices(Reference< XComponentContext > const & context)
CommandLineArgs& rCmdLine = GetCommandLineArgs();
// Headless mode for FAT Office
sal_Bool bHeadlessMode = rCmdLine.IsHeadless();
bool bHeadlessMode = rCmdLine.IsHeadless();
if ( bHeadlessMode )
Application::EnableHeadlessMode(false);
......@@ -160,7 +160,7 @@ namespace
struct CurrentTempURL : public rtl::Static< OUString, CurrentTempURL > {};
}
static sal_Bool bAccept = sal_False;
static bool bAccept = false;
void Desktop::createAcceptor(const OUString& aAcceptString)
{
......@@ -219,7 +219,7 @@ void Desktop::enableAcceptors()
if (!bAccept)
{
// from now on, all new acceptors are enabled
bAccept = sal_True;
bAccept = true;
// enable existing acceptors by calling initialize(true)
// on all existing acceptors
AcceptorMap &rMap = acceptorMap::get();
......
......@@ -384,7 +384,7 @@ static bool impl_needsCompatCheck()
// Do we need to check the dependencies of the extensions?
// When there are unresolved issues, we can't continue with startup
sal_Bool Desktop::CheckExtensionDependencies()
bool Desktop::CheckExtensionDependencies()
{
if (!impl_needsCompatCheck())
{
......
......@@ -159,14 +159,14 @@ DispatchWatcher::~DispatchWatcher()
}
sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequestsList, bool bNoTerminate )
bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequestsList, bool bNoTerminate )
{
Reference< XDesktop2 > xDesktop = css::frame::Desktop::create( ::comphelper::getProcessComponentContext() );
DispatchList::const_iterator p;
std::vector< DispatchHolder > aDispatches;
OUString aAsTemplateArg( "AsTemplate" );
sal_Bool bSetInputFilter = sal_False;
bool bSetInputFilter = false;
OUString aForcedInputFilter;
for ( p = aDispatchRequestsList.begin(); p != aDispatchRequestsList.end(); ++p )
......@@ -181,7 +181,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
// Set Input Filter
if ( aDispatchRequest.aRequestType == REQUEST_INFILTER )
{
bSetInputFilter = sal_True;
bSetInputFilter = true;
aForcedInputFilter = aDispatchRequest.aURL;
OfficeIPCThread::RequestsCompleted( 1 );
continue;
......@@ -424,7 +424,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
OUString aFilterOut=aParam.copy( nPathIndex+1 );
OUString aFilter;
OUString aFilterExt;
sal_Bool bGuess = sal_False;
bool bGuess = false;
if( nFilterIndex >= 0 )
{
......@@ -434,7 +434,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
else
{
// Guess
bGuess = sal_True;
bGuess = true;
aFilterExt = aParam.copy( 0, nPathIndex );
}
INetURLObject aOutFilename( aObj );
......@@ -515,7 +515,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
aPrinterArgs[0].Name = "FileName";
aPrinterArgs[0].Value <<= aOutFile;
aPrinterArgs[1].Name = "Wait";
aPrinterArgs[1].Value <<= ( sal_Bool ) sal_True;
aPrinterArgs[1].Value <<= true;
xDoc->print( aPrinterArgs );
} else {
if ( aDispatchRequest.aRequestType == REQUEST_PRINTTO )
......@@ -530,7 +530,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
// print ( also without user interaction )
Sequence < PropertyValue > aPrinterArgs( 1 );
aPrinterArgs[0].Name = "Wait";
aPrinterArgs[0].Value <<= ( sal_Bool ) sal_True;
aPrinterArgs[0].Value <<= true;
xDoc->print( aPrinterArgs );
}
}
......@@ -607,7 +607,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
}
}
return sal_False;
return false;
}
......
......@@ -92,7 +92,7 @@ class DispatchWatcher : public ::cppu::WeakImplHelper1< ::com::sun::star::frame:
static DispatchWatcher* GetDispatchWatcher();
// execute new dispatch request
sal_Bool executeDispatchRequests( const DispatchList& aDispatches, bool bNoTerminate = false );
bool executeDispatchRequests( const DispatchList& aDispatches, bool bNoTerminate = false );
private:
DispatchWatcher();
......
......@@ -425,14 +425,14 @@ void OfficeIPCThread::EnableRequests( bool i_bEnable )
}
}
sal_Bool OfficeIPCThread::AreRequestsPending()
bool OfficeIPCThread::AreRequestsPending()
{
// Give info about pending requests
::osl::MutexGuard aGuard( GetMutex() );
if ( pGlobalOfficeIPCThread.is() )
return ( pGlobalOfficeIPCThread->mnPendingRequests > 0 );
else
return sal_False;
return false;
}
void OfficeIPCThread::RequestsCompleted( int nCount )
......@@ -840,28 +840,28 @@ void OfficeIPCThread::execute()
}
if ( !aCmdLineArgs->IsQuickstart() ) {
sal_Bool bShowHelp = sal_False;
bool bShowHelp = false;
OUStringBuffer aHelpURLBuffer;
if (aCmdLineArgs->IsHelpWriter()) {
bShowHelp = sal_True;
bShowHelp = true;
aHelpURLBuffer.appendAscii("vnd.sun.star.help://swriter/start");
} else if (aCmdLineArgs->IsHelpCalc()) {
bShowHelp = sal_True;
bShowHelp = true;
aHelpURLBuffer.appendAscii("vnd.sun.star.help://scalc/start");
} else if (aCmdLineArgs->IsHelpDraw()) {
bShowHelp = sal_True;
bShowHelp = true;
aHelpURLBuffer.appendAscii("vnd.sun.star.help://sdraw/start");
} else if (aCmdLineArgs->IsHelpImpress()) {
bShowHelp = sal_True;
bShowHelp = true;
aHelpURLBuffer.appendAscii("vnd.sun.star.help://simpress/start");
} else if (aCmdLineArgs->IsHelpBase()) {
bShowHelp = sal_True;
bShowHelp = true;
aHelpURLBuffer.appendAscii("vnd.sun.star.help://sdatabase/start");
} else if (aCmdLineArgs->IsHelpBasic()) {
bShowHelp = sal_True;
bShowHelp = true;
aHelpURLBuffer.appendAscii("vnd.sun.star.help://sbasic/start");
} else if (aCmdLineArgs->IsHelpMath()) {
bShowHelp = sal_True;
bShowHelp = true;
aHelpURLBuffer.appendAscii("vnd.sun.star.help://smath/start");
}
if (bShowHelp) {
......@@ -1018,7 +1018,7 @@ static void AddConversionsToDispatchList(
}
sal_Bool OfficeIPCThread::ExecuteCmdLineRequests( ProcessDocumentsRequest& aRequest )
bool OfficeIPCThread::ExecuteCmdLineRequests( ProcessDocumentsRequest& aRequest )
{
// protect the dispatch list
osl::ClearableMutexGuard aGuard( GetMutex() );
......@@ -1036,7 +1036,7 @@ sal_Bool OfficeIPCThread::ExecuteCmdLineRequests( ProcessDocumentsRequest& aRequ
AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aForceOpenList, DispatchWatcher::REQUEST_FORCEOPEN, aEmpty, aRequest.aModule );
AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aForceNewList, DispatchWatcher::REQUEST_FORCENEW, aEmpty, aRequest.aModule );
AddConversionsToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aConversionList, aRequest.aConversionParams, aRequest.aPrinterName, aRequest.aModule, aRequest.aConversionOut );
sal_Bool bShutdown( sal_False );
bool bShutdown( false );
if ( pGlobalOfficeIPCThread.is() )
{
......
......@@ -114,9 +114,9 @@ class OfficeIPCThread : public salhelper::Thread
// controlling pipe communication during shutdown
static void SetDowning();
static void EnableRequests( bool i_bEnable = true );
static sal_Bool AreRequestsPending();
static bool AreRequestsPending();
static void RequestsCompleted( int n = 1 );
static sal_Bool ExecuteCmdLineRequests( ProcessDocumentsRequest& );
static bool ExecuteCmdLineRequests( ProcessDocumentsRequest& );
// return sal_False if second office
static Status EnableOfficeIPCThread();
......
......@@ -211,7 +211,7 @@ void Migration::migrateSettingsIfNecessary()
if (! aImpl.initializeMigration() )
return;
sal_Bool bResult = sal_False;
bool bResult = false;
try
{
bResult = aImpl.doMigration();
......@@ -236,12 +236,12 @@ MigrationImpl::~MigrationImpl()
}
// The main entry point for migrating settings
sal_Bool MigrationImpl::doMigration()
bool MigrationImpl::doMigration()
{
// compile file list for migration
m_vrFileList = compileFileList();
sal_Bool result = sal_False;
bool result = false;
try
{
NewVersionUIInfo aNewVersionUIInfo;
......@@ -313,7 +313,7 @@ sal_Bool MigrationImpl::doMigration()
runServices();
refresh();
result = sal_True;
result = true;
}
catch (css::uno::Exception & e)
{
......@@ -352,7 +352,7 @@ void MigrationImpl::setMigrationCompleted()
bool MigrationImpl::checkMigrationCompleted()
{
sal_Bool bMigrationCompleted = sal_False;
bool bMigrationCompleted = false;
try {
uno::Reference< XPropertySet > aPropertySet(
getConfigAccess("org.openoffice.Setup/Office"), uno::UNO_QUERY_THROW);
......@@ -362,7 +362,7 @@ bool MigrationImpl::checkMigrationCompleted()
{
// migration prevented - fake it's success
setMigrationCompleted();
bMigrationCompleted = sal_True;
bMigrationCompleted = true;
}
}
catch (const Exception&)
......@@ -859,7 +859,7 @@ void MigrationImpl::copyConfig() {
}
}
uno::Reference< XNameAccess > MigrationImpl::getConfigAccess(const sal_Char* pPath, sal_Bool bUpdate)
uno::Reference< XNameAccess > MigrationImpl::getConfigAccess(const sal_Char* pPath, bool bUpdate)
{
uno::Reference< XNameAccess > xNameAccess;
try{
......@@ -1030,7 +1030,7 @@ void MigrationImpl::runServices()
if (xNameAccess->getElementNames().getLength() > 0)
{
aModuleInfo.sModuleShortName = sModuleShortName;
aModuleInfo.bHasMenubar = sal_True;
aModuleInfo.bHasMenubar = true;
}
}
......
......@@ -114,7 +114,7 @@ struct MigrationItem
return *this;
}
sal_Bool operator==(const MigrationItem& aMigrationItem)
bool operator==(const MigrationItem& aMigrationItem)
{
return ( aMigrationItem.m_sParentNodeName == m_sParentNodeName &&
aMigrationItem.m_sPrevSibling == m_sPrevSibling &&
......@@ -150,10 +150,10 @@ struct MigrationItemInfo
struct MigrationModuleInfo
{
OUString sModuleShortName;
sal_Bool bHasMenubar;
bool bHasMenubar;
::std::vector< OUString > m_vToolbars;
MigrationModuleInfo():bHasMenubar(sal_False){};
MigrationModuleInfo() : bHasMenubar(false) {};
};
......@@ -205,7 +205,7 @@ private:
// helpers
strings_vr getAllFiles(const OUString& baseURL) const;
strings_vr applyPatterns(const strings_v& vSet, const strings_v& vPatterns) const;
css::uno::Reference< css::container::XNameAccess > getConfigAccess(const sal_Char* path, sal_Bool rw=sal_False);
css::uno::Reference< css::container::XNameAccess > getConfigAccess(const sal_Char* path, bool rw=false);
::std::vector< MigrationModuleInfo > dectectUIChangesForAllModules() const;
void compareOldAndNewConfig(const OUString& sParentNodeName,
......@@ -230,7 +230,7 @@ public:
MigrationImpl();
~MigrationImpl();
bool initializeMigration();
sal_Bool doMigration();
bool doMigration();
OUString getOldVersionName();
};
}
......
......@@ -257,8 +257,8 @@ void SAL_CALL JavaMigration::initialize( const css::uno::Sequence< css::uno::Any
*pIter >>= aValue;
if ( aValue.Name == "OldConfiguration" )
{
sal_Bool bSuccess = aValue.Value >>= aOldConfigValues;
OSL_ENSURE(bSuccess == sal_True, "[Service implementation " IMPL_NAME
bool bSuccess = aValue.Value >>= aOldConfigValues;
OSL_ENSURE(bSuccess, "[Service implementation " IMPL_NAME
"] XInitialization::initialize: Argument OldConfiguration has wrong type.");
if (bSuccess)
{
......@@ -307,10 +307,10 @@ void JavaMigration::migrateJavarc()
OUString sValue;
rtl::Bootstrap javaini(m_sUserDir + "/user/config/" + SAL_CONFIGFILE("java"));
sal_Bool bSuccess = javaini.getFrom("Home", sValue);
bool bSuccess = javaini.getFrom("Home", sValue);
OSL_ENSURE(bSuccess, "[Service implementation " IMPL_NAME
"] XJob::execute: Could not get Home entry from java.ini/javarc.");
if (bSuccess == sal_True && !sValue.isEmpty())
if (bSuccess && !sValue.isEmpty())
{
//get the directory
CJavaInfo aInfo;
......@@ -416,7 +416,7 @@ void SAL_CALL JavaMigration::setPropertyValue(
{
case ENABLE_JAVA:
{
sal_Bool val = sal_Bool();
bool val;
if (!(aValue >>= val))
throw MalformedDataException(
OUString("[Service implementation ") + IMPL_NAME +
......
......@@ -75,17 +75,17 @@ private:
sal_Int32 _iMax;
sal_Int32 _iProgress;
BitmapMode _eBitmapMode;
sal_Bool _bPaintBitmap;
sal_Bool _bPaintProgress;
sal_Bool _bVisible;
sal_Bool _bShowLogo;
sal_Bool _bFullScreenSplash;
sal_Bool _bProgressEnd;
long _height, _width, _tlx, _tly, _barwidth;
long _barheight, _barspace, _textBaseline;
double _fXPos, _fYPos;
double _fWidth, _fHeight;
const long _xoffset, _yoffset;
bool _bPaintBitmap;
bool _bPaintProgress;
bool _bVisible;
bool _bShowLogo;
bool _bFullScreenSplash;
bool _bProgressEnd;
long _height, _width, _tlx, _tly, _barwidth;
long _barheight, _barspace, _textBaseline;
double _fXPos, _fYPos;
double _fWidth, _fHeight;
const long _xoffset, _yoffset;
public:
SplashScreen();
......@@ -128,12 +128,12 @@ SplashScreen::SplashScreen()
, _iMax(100)
, _iProgress(0)
, _eBitmapMode(BM_DEFAULTMODE)
, _bPaintBitmap(sal_True)
, _bPaintProgress(sal_False)
, _bPaintBitmap(true)
, _bPaintProgress(false)
, _bVisible(true)
, _bShowLogo(sal_True)
, _bFullScreenSplash(sal_False)
, _bProgressEnd(sal_False)
, _bShowLogo(true)
, _bFullScreenSplash(false)
, _bProgressEnd(false)
, _height(0)
, _width(0)
, _tlx(NOT_LOADED)
......@@ -166,7 +166,7 @@ void SAL_CALL SplashScreen::start(const OUString&, sal_Int32 nRange)
{
_iMax = nRange;
if (_bVisible) {
_bProgressEnd = sal_False;
_bProgressEnd = false;
SolarMutexGuard aSolarGuard;
if ( _eBitmapMode == BM_FULLSCREEN )
ShowFullScreenMode( true );
......@@ -186,7 +186,7 @@ void SAL_CALL SplashScreen::end()
EndFullScreenMode();
Hide();
}
_bProgressEnd = sal_True;
_bProgressEnd = true;
}
void SAL_CALL SplashScreen::reset()
......@@ -325,7 +325,7 @@ SplashScreen::initialize( const ::com::sun::star::uno::Sequence< ::com::sun::sta
void SplashScreen::updateStatus()
{
if (!_bVisible || _bProgressEnd) return;
if (!_bPaintProgress) _bPaintProgress = sal_True;
if (!_bPaintProgress) _bPaintProgress = true;
Paint(Rectangle());
Flush();
}
......@@ -584,7 +584,7 @@ void SplashScreen::Paint( const Rectangle&)
if(!_bVisible) return;
//native drawing
sal_Bool bNativeOK = sal_False;
bool bNativeOK = false;
// in case of native controls we need to draw directly to the window
if( _bNativeProgress && IsNativeControlSupported( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL ) )
......@@ -605,7 +605,7 @@ void SplashScreen::Paint( const Rectangle&)
}
if( (bNativeOK = DrawNativeControl( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL, aDrawRect,
CTRL_STATE_ENABLED, aValue, _sProgressText )) != sal_False )
CTRL_STATE_ENABLED, aValue, _sProgressText )) )
{
return;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment