diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 17:03:35 +1000 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-05-07 17:03:35 +1000 |
commit | 97eb00c75e173d4c8d0b483a7941ad3d2f23783e (patch) | |
tree | 7974a8b9423c56982646366b0859dfb2a1a88d50 /desktop/source/deployment/registry | |
parent | d0a99cc2ed76be220f7e868e332ba19f6e48a440 (diff) |
revert OSL_ASSERT changes
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
Diffstat (limited to 'desktop/source/deployment/registry')
9 files changed, 35 insertions, 35 deletions
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index b8fe7478e10a..2b04a5c5c94e 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -1051,7 +1051,7 @@ Reference<XComponentContext> raise_uno_process( Reference<XComponentContext> const & xContext, ::rtl::Reference<AbortChannel> const & abortChannel ) { - assert( xContext.is() ); + OSL_ASSERT( xContext.is() ); OUString url( util::theMacroExpander::get(xContext)->expandMacros( "$URE_BIN_DIR/uno" ) ); @@ -1095,7 +1095,7 @@ Reference<XComponentContext> raise_uno_process( // try to terminate process: if ( osl_terminateProcess( hProcess ) != osl_Process_E_None ) { - assert( false ); + OSL_ASSERT( false ); } throw; } @@ -1113,7 +1113,7 @@ void extractComponentData( componentLoader, OUString const & componentUrl) { - assert( + OSL_ASSERT( context.is() && registry.is() && data != nullptr && componentLoader.is()); OUString registryName(registry->getKeyName()); sal_Int32 prefix = registryName.getLength(); @@ -1588,7 +1588,7 @@ BackendImpl::OtherPlatformPackageImpl::impl_createInstance(OUString const& rServ const { Reference<XComponentContext> const xContext(getMyBackend()->getComponentContext()); - assert(xContext.is()); + OSL_ASSERT(xContext.is()); Reference<XInterface> xService; if (xContext.is()) xService.set(xContext->getServiceManager()->createInstanceWithContext(rService, xContext)); diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx index 110d3ed87563..a7906c3694e1 100644 --- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx +++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx @@ -691,7 +691,7 @@ void BackendImpl::PackageImpl::processPackage_( if (getMyBackend()->activateEntry(getURL())) { ::boost::optional<ConfigurationBackendDb::Data> data = that->readDataFromDb(url); - assert(data); + OSL_ASSERT(data); that->addToConfigmgrIni( m_isSchema, false, data->iniEntry, xCmdEnv ); } else @@ -779,7 +779,7 @@ void BackendImpl::PackageImpl::processPackage_( } catch(const Exception&) { - assert(false); + OSL_ASSERT(false); } } #endif diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx index 118029d058a5..f44b1d7ac2f1 100644 --- a/desktop/source/deployment/registry/dp_backenddb.cxx +++ b/desktop/source/deployment/registry/dp_backenddb.cxx @@ -140,7 +140,7 @@ void BackendDb::removeElement(OUString const & sXPathExpression) //There must not be any other entry with the same url const Reference<css::xml::dom::XNode> nextNode = xpathApi->selectSingleNode(root, sXPathExpression); - assert(! nextNode.is()); + OSL_ASSERT(! nextNode.is()); #endif } catch(const css::uno::Exception &) @@ -277,7 +277,7 @@ void BackendDb::writeVectorOfPair( if (vecPairs.empty()) return; const OUString sNameSpace = getDbNSName(); - assert(!sNameSpace.isEmpty()); + OSL_ASSERT(!sNameSpace.isEmpty()); const OUString sPrefix(getNSPrefix() + ":"); const Reference<css::xml::dom::XDocument> doc = getDocument(); const Reference<css::xml::dom::XNode> root = doc->getFirstChild(); @@ -346,7 +346,7 @@ BackendDb::readVectorOfPair( { try { - assert(parent.is()); + OSL_ASSERT(parent.is()); const OUString sPrefix(getNSPrefix() + ":"); const Reference<css::xml::xpath::XXPathAPI> xpathApi = getXPathAPI(); const OUString sExprPairs( @@ -366,7 +366,7 @@ BackendDb::readVectorOfPair( const OUString sExprSecond(sPrefix + sSecondTagName + "/text()"); const Reference<css::xml::dom::XNode> second = xpathApi->selectSingleNode(aPair, sExprSecond); - assert(first.is() && second.is()); + OSL_ASSERT(first.is() && second.is()); retVector.push_back(std::make_pair( first->getNodeValue(), second->getNodeValue())); @@ -484,7 +484,7 @@ Reference<css::xml::dom::XNode> BackendDb::writeKeyElement( getXPathAPI()->selectSingleNode(root, sExpression); if (existingNode.is()) { - assert(false); + OSL_ASSERT(false); //replace the existing entry. removeEntry(url); } @@ -539,7 +539,7 @@ std::list< OUString> BackendDb::readList( { try { - assert(parent.is()); + OSL_ASSERT(parent.is()); const OUString sPrefix(getNSPrefix() + ":"); const Reference<css::xml::xpath::XXPathAPI> xpathApi = getXPathAPI(); const OUString sExprList( @@ -635,7 +635,7 @@ void RegisteredDb::addEntry(OUString const & url) sPrefix + ":" + sEntry + "[@url = \"" + url + "\"]"); Reference<css::xml::dom::XNode> _extensionNode = getXPathAPI()->selectSingleNode(root, sExpression); - assert(! _extensionNode.is()); + OSL_ASSERT(! _extensionNode.is()); #endif Reference<css::xml::dom::XElement> helpElement( doc->createElementNS(sNameSpace, sPrefix + ":" + sEntry)); diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx index 27fa7acb75f6..d0b4211691ee 100644 --- a/desktop/source/deployment/registry/dp_registry.cxx +++ b/desktop/source/deployment/registry/dp_registry.cxx @@ -239,7 +239,7 @@ void PackageRegistryImpl::insertBackend( m_mediaType2backend.find( /* media-type of pr. added backend */ ins.first->second ) ); - assert( + OSL_ASSERT( iFind != m_mediaType2backend.end() ); if (iFind != m_mediaType2backend.end()) m_ambiguousBackends.insert( iFind->second ); @@ -358,7 +358,7 @@ Reference<deployment::XPackageRegistry> PackageRegistryImpl::create( Reference<lang::XServiceInfo> xServiceInfo( extensionBackend, UNO_QUERY_THROW ); - assert(xServiceInfo.is()); + OSL_ASSERT(xServiceInfo.is()); OUString registryCachePath( makeURL( cachePath, ::rtl::Uri::encode( @@ -421,7 +421,7 @@ Reference<deployment::XPackageRegistry> PackageRegistryImpl::create( } allBackends.insert( that->m_ambiguousBackends.begin(), that->m_ambiguousBackends.end() ); - assert( allBackends == that->m_allBackends ); + OSL_ASSERT( allBackends == that->m_allBackends ); } #endif diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx index 777469fd8415..a5bac639d480 100644 --- a/desktop/source/deployment/registry/executable/dp_executable.cxx +++ b/desktop/source/deployment/registry/executable/dp_executable.cxx @@ -228,7 +228,7 @@ void BackendImpl::ExecutablePackageImpl::processPackage_( { if (!isUrlTargetInExtension()) { - assert(false); + OSL_ASSERT(false); return; } sal_uInt64 attributes = 0; @@ -243,7 +243,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 - assert(false); + OSL_ASSERT(false); //This won't have affect on Windows osl::File::setAttributes( @@ -272,7 +272,7 @@ bool BackendImpl::ExecutablePackageImpl::isUrlTargetInExtension() else if (getMyBackend()->m_context == "bundled") sExtensionDir = dp_misc::expandUnoRcTerm("$BUNDLED_EXTENSIONS"); else - assert(false); + 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 a3bcef271497..4eba37cf3243 100644 --- a/desktop/source/deployment/registry/help/dp_help.cxx +++ b/desktop/source/deployment/registry/help/dp_help.cxx @@ -291,7 +291,7 @@ bool BackendImpl::PackageImpl::extensionContainsCompiledHelp() else { //Error - assert(false); + OSL_ASSERT(false); bCompiled = false; break; } @@ -300,7 +300,7 @@ bool BackendImpl::PackageImpl::extensionContainsCompiledHelp() && errorNext != ::osl::File::E_None) { //Error - assert(false); + OSL_ASSERT(false); bCompiled = false; } } @@ -358,7 +358,7 @@ void BackendImpl::implProcessHelp( Reference<ucb::XCommandEnvironment> const & xCmdEnv) { Reference< deployment::XPackage > xPackage(package); - assert(xPackage.is()); + OSL_ASSERT(xPackage.is()); if (doRegisterPackage) { //revive already processed help if possible diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index 906c8bc60767..cda1f56de4c4 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -821,7 +821,7 @@ void BackendImpl::PackageImpl::processPackage_( static_cast<OWeakObject *>(this), exc ) ), cppu::UnoType<task::XInteractionApprove>::get(), xCmdEnv, &approve, &abort )) { - assert( !approve && !abort ); + OSL_ASSERT( !approve && !abort ); if (m_legacyBundle) // default for legacy packages: ignore continue; // no selection at all, so rethrow; @@ -900,7 +900,7 @@ void BackendImpl::PackageImpl::processPackage_( static_cast<OWeakObject *>(this), exc ) ), cppu::UnoType<task::XInteractionApprove>::get(), xCmdEnv, &approve, &abort )) { - assert( !approve && !abort ); + OSL_ASSERT( !approve && !abort ); if (m_legacyBundle) // default for legacy packages: ignore continue; // no selection at all, so rethrow @@ -1080,7 +1080,7 @@ void BackendImpl::PackageImpl::exportTo( { Reference<deployment::XPackage> const & xPackage = pbundle[ pos ]; OUString url_( expandUnoRcUrl( xPackage->getURL() ) ); - assert( url_.getLength() >= baseURLlen ); + OSL_ASSERT( url_.getLength() >= baseURLlen ); OUString fullPath; if (url_.getLength() > baseURLlen) fullPath = url_.copy( baseURLlen + 1 ); @@ -1096,7 +1096,7 @@ void BackendImpl::PackageImpl::exportTo( const Reference<deployment::XPackageTypeInfo> xPackageType( xPackage->getPackageType() ); OUString mediaType; - assert( xPackageType.is() ); + OSL_ASSERT( xPackageType.is() ); if (xPackageType.is()) mediaType = xPackageType->getMediaType(); else @@ -1252,7 +1252,7 @@ Sequence< Reference<deployment::XPackage> > BackendImpl::PackageImpl::getBundle( { const Reference<deployment::XPackageTypeInfo> xPackageType( (*iPos)->getPackageType() ); - assert( xPackageType.is() ); + OSL_ASSERT( xPackageType.is() ); if (xPackageType.is()) { const OUString mediaType( xPackageType->getMediaType() ); @@ -1271,7 +1271,7 @@ Sequence< Reference<deployment::XPackage> > BackendImpl::PackageImpl::getBundle( pret[ lower_end ] = *iPos; ++lower_end; } - assert( lower_end == upper_end ); + OSL_ASSERT( lower_end == upper_end ); const ::osl::MutexGuard guard( getMutex() ); pBundle = m_pBundle; @@ -1312,7 +1312,7 @@ Reference<deployment::XPackage> BackendImpl::PackageImpl::bindBundleItem( try { xPackage.set( getMyBackend()->m_xRootRegistry->bindPackage( url, mediaType, bRemoved, identifier, xCmdEnv ) ); - assert( xPackage.is() ); + OSL_ASSERT( xPackage.is() ); } catch (css::lang::IllegalArgumentException & e) { css::uno::Any exc(cppu::getCaughtException()); throw css::lang::WrappedTargetException( @@ -1340,7 +1340,7 @@ Reference<deployment::XPackage> BackendImpl::PackageImpl::bindBundleItem( if (xPackage.is()) { const Reference<deployment::XPackageTypeInfo> xPackageType( xPackage->getPackageType() ); - assert( xPackageType.is() ); + OSL_ASSERT( xPackageType.is() ); // ignore any nested bundles: if (xPackageType.is() && isBundle_( xPackageType->getMediaType() )) xPackage.clear(); @@ -1354,7 +1354,7 @@ void BackendImpl::PackageImpl::scanBundle( ::rtl::Reference<AbortChannel> const & abortChannel, Reference<ucb::XCommandEnvironment> const & xCmdEnv ) { - assert( !m_legacyBundle ); + OSL_ASSERT( !m_legacyBundle ); OUString mfUrl( makeURL( m_url_expanded, "META-INF/manifest.xml" ) ); ::ucbhelper::Content manifestContent; @@ -1540,7 +1540,7 @@ void BackendImpl::PackageImpl::scanLegacyBundle( if (xPackage.is()) { const Reference<deployment::XPackageTypeInfo> xPackageType( xPackage->getPackageType() ); - assert( xPackageType.is() ); + OSL_ASSERT( xPackageType.is() ); if (xPackageType.is()) mediaType = xPackageType->getMediaType(); @@ -1588,7 +1588,7 @@ BackendImpl::PackageImpl::getPackagesFromDb( { Reference<deployment::XPackage> xExtension = bindBundleItem(i->first, i->second, true, m_identifier, xCmdEnv); - assert(xExtension.is()); + OSL_ASSERT(xExtension.is()); if (xExtension.is()) retVector.push_back(xExtension); } diff --git a/desktop/source/deployment/registry/script/dp_script.cxx b/desktop/source/deployment/registry/script/dp_script.cxx index 7424294acab3..3c59f781a049 100644 --- a/desktop/source/deployment/registry/script/dp_script.cxx +++ b/desktop/source/deployment/registry/script/dp_script.cxx @@ -157,7 +157,7 @@ BackendImpl::BackendImpl( m_typeInfos[ 0 ] = m_xBasicLibTypeInfo; m_typeInfos[ 1 ] = m_xDialogLibTypeInfo; - assert( ! transientMode() ); + OSL_ASSERT( ! transientMode() ); if (!transientMode()) { diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx index 0b6bc0404651..274ee2f827c2 100644 --- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx +++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx @@ -294,7 +294,7 @@ void BackendImpl::PackageImpl:: initPackageHandler() } else { - assert( false ); + OSL_ASSERT( false ); // NOT supported at the moment // TODO } |