From e1dc859bebc0ce9ec0d61ce7948aff60f94cb0e8 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 28 Jan 2014 20:02:28 +0100 Subject: bool improvements Change-Id: Ie4c9d7f01fef2604d80d8e465ce30daab7481eed --- desktop/source/app/app.cxx | 2 +- desktop/source/app/check_ext_deps.cxx | 2 +- desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx | 2 +- desktop/source/deployment/gui/dp_gui_updatedialog.cxx | 6 +++--- desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx | 2 +- desktop/source/deployment/manager/dp_extensionmanager.cxx | 2 +- desktop/source/deployment/manager/dp_informationprovider.cxx | 4 ++-- desktop/source/deployment/misc/dp_misc.cxx | 6 +++--- desktop/source/deployment/misc/dp_update.cxx | 2 +- .../source/deployment/registry/configuration/dp_configuration.cxx | 2 +- desktop/source/deployment/registry/dp_backenddb.cxx | 2 +- desktop/source/deployment/registry/executable/dp_executable.cxx | 6 +++--- desktop/source/deployment/registry/help/dp_help.cxx | 4 ++-- desktop/source/deployment/registry/sfwk/dp_sfwk.cxx | 2 +- desktop/source/migration/services/jvmfwk.cxx | 2 +- desktop/source/pkgchk/unopkg/unopkg_app.cxx | 2 +- 16 files changed, 24 insertions(+), 24 deletions(-) diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 3715e72d0cba..88c7fbfd3926 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -616,7 +616,7 @@ void Desktop::Init() } } - if ( 1 ) + if ( true ) { const CommandLineArgs& rCmdLineArgs = GetCommandLineArgs(); diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx index d98fceb1da24..30c2946586ac 100644 --- a/desktop/source/app/check_ext_deps.cxx +++ b/desktop/source/app/check_ext_deps.cxx @@ -152,7 +152,7 @@ void SilentCommandEnv::handle( Reference< task::XInteractionRequest> const & xRe bApprove = true; else { - OSL_ASSERT(0); + OSL_ASSERT(false); } } diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx index 706c48538160..61ef5f95512a 100644 --- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx +++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx @@ -427,7 +427,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & approve = true; else { - OSL_ASSERT(0); + OSL_ASSERT(false); } } else if (request >>= verExc) diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 178946a8ad0e..435666006860 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -330,10 +330,10 @@ void UpdateDialog::Thread::execute() dp_misc::getIdentifier(info.extension), info.extension->getName(), uno::Reference()); } catch ( const lang::IllegalArgumentException& ) { - OSL_ASSERT(0); + OSL_ASSERT(false); continue; } catch ( const css::ucb::CommandFailedException& ) { - OSL_ASSERT(0); + OSL_ASSERT(false); continue; } OSL_ASSERT(extensions.getLength() == 3); @@ -705,7 +705,7 @@ sal_uInt16 UpdateDialog::insertItem( UpdateDialog::Index *pEntry, SvLBoxButtonKi if ( p == pEntry ) return i; } - OSL_ASSERT(0); + OSL_ASSERT(false); return 0; } diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx index 149591031c8c..1a715b6e0a9a 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx @@ -289,7 +289,7 @@ void UpdateInstallDialog::setError(INSTALL_ERROR err, OUString const & sExtensio break; default: - OSL_ASSERT(0); + OSL_ASSERT(false); } sError = sError.replaceFirst("%NAME", sExtension); diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index d569723b995f..d900b2d5ba59 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -153,7 +153,7 @@ ExtensionRemoveGuard::~ExtensionRemoveGuard() css::uno::Reference(), css::uno::Reference()); } catch (...) { - OSL_ASSERT(0); + OSL_ASSERT(false); } } diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx index bae1ef4df408..f6f71643c21a 100644 --- a/desktop/source/deployment/manager/dp_informationprovider.cxx +++ b/desktop/source/deployment/manager/dp_informationprovider.cxx @@ -171,7 +171,7 @@ PackageInformationProvider::isUpdateAvailable( const OUString& _sExtensionId ) if (!extMgr.is()) { - OSL_ASSERT(0); + OSL_ASSERT(false); return aList; } std::vector, uno::Any > > errors; @@ -189,7 +189,7 @@ PackageInformationProvider::isUpdateAvailable( const OUString& _sExtensionId ) } catch (lang::IllegalArgumentException &) { - OSL_ASSERT(0); + OSL_ASSERT(false); } updateInfoMap = dp_misc::getOnlineUpdateInfos( mxContext, extMgr, mxUpdateInformation, &vecExtensions, errors); diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx index 49ba7f50dfcf..e92d2b39b494 100644 --- a/desktop/source/deployment/misc/dp_misc.cxx +++ b/desktop/source/deployment/misc/dp_misc.cxx @@ -191,13 +191,13 @@ bool compareExtensionFolderWithLastSynchronizedFile( } else { - OSL_ASSERT(0); + OSL_ASSERT(false); bNeedsSync = true; } } else { - OSL_ASSERT(0); + OSL_ASSERT(false); bNeedsSync = true; } @@ -220,7 +220,7 @@ bool needToSyncRepository(OUString const & name) } else { - OSL_ASSERT(0); + OSL_ASSERT(false); return true; } ::rtl::Bootstrap::expandMacros(folder); diff --git a/desktop/source/deployment/misc/dp_update.cxx b/desktop/source/deployment/misc/dp_update.cxx index fd4a76a8f9ea..970544f1f055 100644 --- a/desktop/source/deployment/misc/dp_update.cxx +++ b/desktop/source/deployment/misc/dp_update.cxx @@ -401,7 +401,7 @@ OUString getHighestVersion( case 1: return sharedVersion; case 2: return bundledVersion; case 3: return onlineVersion; - default: OSL_ASSERT(0); + default: OSL_ASSERT(false); } return OUString(); diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 41c23ff9e9ae..d3bee88724a9 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -790,7 +790,7 @@ void BackendImpl::PackageImpl::processPackage_( } catch(const Exception&) { - OSL_ASSERT(0); + OSL_ASSERT(false); } } #endif diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx index 927c47dc8070..378a1add24dd 100644 --- a/desktop/source/deployment/registry/dp_backenddb.cxx +++ b/desktop/source/deployment/registry/dp_backenddb.cxx @@ -485,7 +485,7 @@ Reference BackendDb::writeKeyElement( getXPathAPI()->selectSingleNode(root, sExpression); if (existingNode.is()) { - OSL_ASSERT(0); + OSL_ASSERT(false); //replace the existing entry. removeEntry(url); } diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx index 927aa4f0c1c4..ead5dd23c7fd 100644 --- a/desktop/source/deployment/registry/executable/dp_executable.cxx +++ b/desktop/source/deployment/registry/executable/dp_executable.cxx @@ -232,7 +232,7 @@ void BackendImpl::ExecutablePackageImpl::processPackage_( { if (!isUrlTargetInExtension()) { - OSL_ASSERT(0); + OSL_ASSERT(false); return; } sal_uInt64 attributes = 0; @@ -247,7 +247,7 @@ void BackendImpl::ExecutablePackageImpl::processPackage_( else if (!(getMyBackend()->m_context == "bundled")) //Bundled extension are required to be in the properly //installed. That is an executable must have the right flags - OSL_ASSERT(0); + OSL_ASSERT(false); //This won't have affect on Windows osl::File::setAttributes( @@ -276,7 +276,7 @@ bool BackendImpl::ExecutablePackageImpl::isUrlTargetInExtension() else if (getMyBackend()->m_context == "bundled") sExtensionDir = dp_misc::expandUnoRcTerm("$BUNDLED_EXTENSIONS"); else - OSL_ASSERT(0); + OSL_ASSERT(false); //remove file ellipses if (osl::File::E_None == osl::File::getAbsoluteFileURL(OUString(), sExtensionDir, sExtensionDir)) { diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx index 47dfc2dd6c3b..bdcafdd63cfa 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -307,7 +307,7 @@ bool BackendImpl::PackageImpl::extensionContainsCompiledHelp() else { //Error - OSL_ASSERT(0); + OSL_ASSERT(false); bCompiled = false; break; } @@ -316,7 +316,7 @@ bool BackendImpl::PackageImpl::extensionContainsCompiledHelp() && errorNext != ::osl::File::E_None) { //Error - OSL_ASSERT(0); + OSL_ASSERT(false); bCompiled = false; } } diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx index 80510373effe..318980191d77 100644 --- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx +++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx @@ -299,7 +299,7 @@ void BackendImpl::PackageImpl:: initPackageHandler() } else { - OSL_ASSERT( 0 ); + OSL_ASSERT( false ); // NOT supported at the momemtn // TODO } diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx index da5fff42141b..849bb8863e41 100644 --- a/desktop/source/migration/services/jvmfwk.cxx +++ b/desktop/source/migration/services/jvmfwk.cxx @@ -444,7 +444,7 @@ void SAL_CALL JavaMigration::setPropertyValue( break; } default: - OSL_ASSERT(0); + OSL_ASSERT(false); } } } diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx index c57b24a9c9b3..9b4ec1acb5d1 100644 --- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx +++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx @@ -320,7 +320,7 @@ extern "C" DESKTOP_DLLPUBLIC int unopkg_main() else if (repository == "bundled") extensionUnorc = "$BUNDLED_EXTENSIONS_USER/registry/com.sun.star.comp.deployment.component.PackageRegistryBackend/unorc"; else - OSL_ASSERT(0); + OSL_ASSERT(false); ::rtl::Bootstrap::expandMacros(extensionUnorc); oslFileError e = osl_removeFile(extensionUnorc.pData); -- cgit