From 7af7023a42aee17c4be0966117b389d1b4319ceb Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 8 Nov 2013 18:08:46 +0100 Subject: [PATCH] Unwind confusing namespace alias Change-Id: I08d3e5f71278c7f96adb2db546da5602df84aad8 --- .../manager/dp_extensionmanager.cxx | 237 +++++++++--------- 1 file changed, 118 insertions(+), 119 deletions(-) diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index 7811aabb270a..5457a32b0316 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -58,7 +58,6 @@ #include #include -namespace deploy = com::sun::star::deployment; namespace lang = com::sun::star::lang; namespace registry = com::sun::star::registry; namespace task = com::sun::star::task; @@ -73,23 +72,23 @@ namespace { struct CompIdentifiers { - bool operator() (::std::vector > const & a, - ::std::vector > const & b) + bool operator() (::std::vector > const & a, + ::std::vector > const & b) { if (getName(a).compareTo(getName(b)) < 0) return true; return false; } - OUString getName(::std::vector > const & a); + OUString getName(::std::vector > const & a); }; -OUString CompIdentifiers::getName(::std::vector > const & a) +OUString CompIdentifiers::getName(::std::vector > const & a) { OSL_ASSERT(a.size() == 3); //get the first non-null reference - Reference extension; - ::std::vector >::const_iterator it = a.begin(); + Reference extension; + ::std::vector >::const_iterator it = a.begin(); for (; it != a.end(); ++it) { if (it->is()) @@ -120,7 +119,7 @@ void writeLastModified(OUString & url, Reference const catch(...) { uno::Any exc(::cppu::getCaughtException()); - throw deploy::DeploymentException("Failed to update" + url, 0, exc); + throw css::deployment::DeploymentException("Failed to update" + url, 0, exc); } } @@ -169,7 +168,7 @@ ExtensionManager::ExtensionManager( Reference< uno::XComponentContext > const& x ::cppu::WeakComponentImplHelper1< css::deployment::XExtensionManager >(getMutex()), m_xContext( xContext ) { - m_xPackageManagerFactory = deploy::thePackageManagerFactory::get(m_xContext); + m_xPackageManagerFactory = css::deployment::thePackageManagerFactory::get(m_xContext); OSL_ASSERT(m_xPackageManagerFactory.is()); m_repositoryNames.push_back("user"); @@ -183,23 +182,23 @@ ExtensionManager::~ExtensionManager() { } -Reference ExtensionManager::getUserRepository() +Reference ExtensionManager::getUserRepository() { return m_xPackageManagerFactory->getPackageManager("user"); } -Reference ExtensionManager::getSharedRepository() +Reference ExtensionManager::getSharedRepository() { return m_xPackageManagerFactory->getPackageManager("shared"); } -Reference ExtensionManager::getBundledRepository() +Reference ExtensionManager::getBundledRepository() { return m_xPackageManagerFactory->getPackageManager("bundled"); } -Reference ExtensionManager::getTmpRepository() +Reference ExtensionManager::getTmpRepository() { return m_xPackageManagerFactory->getPackageManager("tmp"); } -Reference ExtensionManager::getBakRepository() +Reference ExtensionManager::getBakRepository() { return m_xPackageManagerFactory->getPackageManager("bak"); } @@ -214,7 +213,7 @@ css::uno::Reference ExtensionManager::getPackageManager(OUString const & repository) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException) { - Reference xPackageManager; + Reference xPackageManager; if (repository == "user") xPackageManager = getUserRepository(); else if (repository == "shared") @@ -241,7 +240,7 @@ ExtensionManager::getPackageManager(OUString const & repository) */ void ExtensionManager::addExtensionsToMap( id2extensions & mapExt, - uno::Sequence > const & seqExt, + uno::Sequence > const & seqExt, OUString const & repository) { //Determine the index in the vector where these extensions are to be @@ -257,12 +256,12 @@ void ExtensionManager::addExtensionsToMap( for (int i = 0; i < seqExt.getLength(); ++i) { - Reference const & xExtension = seqExt[i]; + Reference const & xExtension = seqExt[i]; OUString id = dp_misc::getIdentifier(xExtension); id2extensions::iterator ivec = mapExt.find(id); if (ivec == mapExt.end()) { - ::std::vector > vec(3); + ::std::vector > vec(3); vec[index] = xExtension; mapExt[id] = vec; } @@ -285,18 +284,18 @@ void ExtensionManager::addExtensionsToMap( The number of elements is always three, unless the number of repository changes. */ -::std::list > +::std::list > ExtensionManager::getExtensionsWithSameId( OUString const & identifier, OUString const & fileName, Reference< ucb::XCommandEnvironment> const & /*xCmdEnv*/) { - ::std::list > extensionList; - Reference lRepos[] = { + ::std::list > extensionList; + Reference lRepos[] = { getUserRepository(), getSharedRepository(), getBundledRepository() }; for (int i(0); i != SAL_N_ELEMENTS(lRepos); ++i) { - Reference xPackage; + Reference xPackage; try { xPackage = lRepos[i]->getDeployedPackage( @@ -312,26 +311,26 @@ void ExtensionManager::addExtensionsToMap( return extensionList; } -uno::Sequence > +uno::Sequence > ExtensionManager::getExtensionsWithSameIdentifier( OUString const & identifier, OUString const & fileName, Reference< ucb::XCommandEnvironment> const & xCmdEnv ) throw ( - deploy::DeploymentException, + css::deployment::DeploymentException, ucb::CommandFailedException, lang::IllegalArgumentException, uno::RuntimeException) { try { - ::std::list > listExtensions = + ::std::list > listExtensions = getExtensionsWithSameId( identifier, fileName, xCmdEnv); sal_Bool bHasExtension = false; //throw an IllegalArgumentException if there is no extension at all. - typedef ::std::list >::const_iterator CIT; + typedef ::std::list >::const_iterator CIT; for (CIT i = listExtensions.begin(); i != listExtensions.end(); ++i) bHasExtension |= i->is(); if (!bHasExtension) @@ -340,11 +339,11 @@ ExtensionManager::getExtensionsWithSameIdentifier( static_cast(this), -1); return comphelper::containerToSequence< - Reference, - ::std::list > + Reference, + ::std::list > > (listExtensions); } - catch ( const deploy::DeploymentException & ) + catch ( const css::deployment::DeploymentException & ) { throw; } @@ -359,7 +358,7 @@ ExtensionManager::getExtensionsWithSameIdentifier( catch (...) { uno::Any exc = ::cppu::getCaughtException(); - throw deploy::DeploymentException( + throw css::deployment::DeploymentException( "Extension Manager: exception during getExtensionsWithSameIdentifier", static_cast(this), exc); } @@ -368,7 +367,7 @@ ExtensionManager::getExtensionsWithSameIdentifier( bool ExtensionManager::isUserDisabled( OUString const & identifier, OUString const & fileName) { - ::std::list > listExtensions; + ::std::list > listExtensions; try { listExtensions = getExtensionsWithSameId(identifier, fileName); @@ -377,16 +376,16 @@ bool ExtensionManager::isUserDisabled( OSL_ASSERT(listExtensions.size() == 3); return isUserDisabled( ::comphelper::containerToSequence< - Reference, - ::std::list > + Reference, + ::std::list > > (listExtensions)); } bool ExtensionManager::isUserDisabled( - uno::Sequence > const & seqExtSameId) + uno::Sequence > const & seqExtSameId) { OSL_ASSERT(seqExtSameId.getLength() == 3); - Reference const & userExtension = seqExtSameId[0]; + Reference const & userExtension = seqExtSameId[0]; if (userExtension.is()) { beans::Optional > reg = @@ -424,7 +423,7 @@ void ExtensionManager::activateExtension( Reference const & xAbortChannel, Reference const & xCmdEnv ) { - ::std::list > listExtensions; + ::std::list > listExtensions; try { listExtensions = getExtensionsWithSameId(identifier, fileName); } catch (const lang::IllegalArgumentException &) { @@ -433,8 +432,8 @@ void ExtensionManager::activateExtension( activateExtension( ::comphelper::containerToSequence< - Reference, - ::std::list > + Reference, + ::std::list > > (listExtensions), bUserDisabled, bStartup, xAbortChannel, xCmdEnv); @@ -442,7 +441,7 @@ void ExtensionManager::activateExtension( } void ExtensionManager::activateExtension( - uno::Sequence > const & seqExt, + uno::Sequence > const & seqExt, bool bUserDisabled, bool bStartup, Reference const & xAbortChannel, @@ -452,7 +451,7 @@ void ExtensionManager::activateExtension( sal_Int32 len = seqExt.getLength(); for (sal_Int32 i = 0; i < len; i++) { - Reference const & aExt = seqExt[i]; + Reference const & aExt = seqExt[i]; if (aExt.is()) { //get the registration value of the current iteration @@ -490,15 +489,15 @@ void ExtensionManager::activateExtension( } } -Reference ExtensionManager::backupExtension( +Reference ExtensionManager::backupExtension( OUString const & identifier, OUString const & fileName, - Reference const & xPackageManager, + Reference const & xPackageManager, Reference const & xCmdEnv ) { - Reference xBackup; + Reference xBackup; Reference tmpCmdEnv( new TmpRepositoryCommandEnv(xCmdEnv->getInteractionHandler())); - Reference xOldExtension; + Reference xOldExtension; xOldExtension = xPackageManager->getDeployedPackage( identifier, fileName, tmpCmdEnv); @@ -521,7 +520,7 @@ Reference ExtensionManager::backupExtension( //all the subfolders for the respective backends. //Because all repositories support the same backends, we can just delegate this //call to one of the repositories. -uno::Sequence< Reference > +uno::Sequence< Reference > ExtensionManager::getSupportedPackageTypes() throw (uno::RuntimeException) { @@ -533,13 +532,13 @@ ExtensionManager::getSupportedPackageTypes() //user interactions which may require aquiring the solar mutex. //Returns true if the extension can be installed. bool ExtensionManager::doChecksForAddExtension( - Reference const & xPackageMgr, + Reference const & xPackageMgr, uno::Sequence const & properties, css::uno::Reference const & xTmpExtension, Reference const & xAbortChannel, Reference const & xCmdEnv, - Reference & out_existingExtension ) - throw (deploy::DeploymentException, + Reference & out_existingExtension ) + throw (css::deployment::DeploymentException, ucb::CommandFailedException, ucb::CommandAbortedException, lang::IllegalArgumentException, @@ -547,7 +546,7 @@ bool ExtensionManager::doChecksForAddExtension( { try { - Reference xOldExtension; + Reference xOldExtension; const OUString sIdentifier = dp_misc::getIdentifier(xTmpExtension); const OUString sFileName = xTmpExtension->getName(); const OUString sDisplayName = xTmpExtension->getDisplayName(); @@ -606,7 +605,7 @@ bool ExtensionManager::doChecksForAddExtension( return bCanInstall; } - catch ( const deploy::DeploymentException& ) { + catch ( const css::deployment::DeploymentException& ) { throw; } catch ( const ucb::CommandFailedException & ) { throw; @@ -618,7 +617,7 @@ bool ExtensionManager::doChecksForAddExtension( throw; } catch (const uno::Exception &) { uno::Any excOccurred = ::cppu::getCaughtException(); - deploy::DeploymentException exc( + css::deployment::DeploymentException exc( "Extension Manager: exception in doChecksForAddExtension", static_cast(this), excOccurred); throw exc; @@ -630,20 +629,20 @@ bool ExtensionManager::doChecksForAddExtension( } // Only add to shared and user repository -Reference ExtensionManager::addExtension( +Reference ExtensionManager::addExtension( OUString const & url, uno::Sequence const & properties, OUString const & repository, Reference const & xAbortChannel, Reference const & xCmdEnv ) - throw (deploy::DeploymentException, + throw (css::deployment::DeploymentException, ucb::CommandFailedException, ucb::CommandAbortedException, lang::IllegalArgumentException, uno::RuntimeException) { - Reference xNewExtension; + Reference xNewExtension; //Determine the repository to use - Reference xPackageManager; + Reference xPackageManager; if (repository == "user") xPackageManager = getUserRepository(); else if (repository == "shared") @@ -656,17 +655,17 @@ Reference ExtensionManager::addExtension( //would remove the first one. ::osl::MutexGuard addGuard(m_addMutex); - Reference xTmpRepository(getTmpRepository()); + Reference xTmpRepository(getTmpRepository()); // make sure xTmpRepository is alive as long as xTmpExtension is; as // the "tmp" manager is only held weakly by m_xPackageManagerFactory, it // could otherwise be disposed early, which would in turn dispose // xTmpExtension's PackageRegistryBackend behind its back - Reference xTmpExtension( + Reference xTmpExtension( xTmpRepository->addPackage( url, uno::Sequence(), OUString(), xAbortChannel, new TmpRepositoryCommandEnv())); if (!xTmpExtension.is()) { - throw deploy::DeploymentException( + throw css::deployment::DeploymentException( ("Extension Manager: Failed to create temporary XPackage for url: " + url), static_cast(this), uno::Any()); @@ -678,8 +677,8 @@ Reference ExtensionManager::addExtension( ExtensionRemoveGuard bakExtensionRemoveGuard; const OUString sIdentifier = dp_misc::getIdentifier(xTmpExtension); const OUString sFileName = xTmpExtension->getName(); - Reference xOldExtension; - Reference xExtensionBackup; + Reference xOldExtension; + Reference xExtensionBackup; uno::Any excOccurred2; bool bUserDisabled = false; @@ -760,12 +759,12 @@ Reference ExtensionManager::addExtension( else if ( pSilentCommandEnv->m_UnknownException.hasValue()) ::cppu::throwException(pSilentCommandEnv->m_UnknownException); else - throw deploy::DeploymentException ( + throw css::deployment::DeploymentException ( "Extension Manager: exception during addExtension, ckeckPrerequisites failed", static_cast(this), uno::Any()); } } - catch ( const deploy::DeploymentException& ) { + catch ( const css::deployment::DeploymentException& ) { excOccurred2 = ::cppu::getCaughtException(); } catch ( const ucb::CommandFailedException & ) { excOccurred2 = ::cppu::getCaughtException(); @@ -777,7 +776,7 @@ Reference ExtensionManager::addExtension( excOccurred2 = ::cppu::getCaughtException(); } catch (...) { excOccurred2 = ::cppu::getCaughtException(); - deploy::DeploymentException exc( + css::deployment::DeploymentException exc( "Extension Manager: exception during addExtension, url: " + url, static_cast(this), excOccurred2); excOccurred2 <<= exc; @@ -795,7 +794,7 @@ Reference ExtensionManager::addExtension( { if (xExtensionBackup.is()) { - Reference xRestored = + Reference xRestored = xPackageManager->importExtension( xExtensionBackup, Reference(), Reference()); @@ -815,7 +814,7 @@ Reference ExtensionManager::addExtension( { fireModified(); - }catch ( const deploy::DeploymentException& ) { + }catch ( const css::deployment::DeploymentException& ) { throw; } catch ( const ucb::CommandFailedException & ) { throw; @@ -827,7 +826,7 @@ Reference ExtensionManager::addExtension( throw; } catch (const uno::Exception &) { uno::Any excOccurred = ::cppu::getCaughtException(); - deploy::DeploymentException exc( + css::deployment::DeploymentException exc( "Extension Manager: exception in doChecksForAddExtension", static_cast(this), excOccurred); throw exc; @@ -845,15 +844,15 @@ void ExtensionManager::removeExtension( OUString const & repository, Reference const & xAbortChannel, Reference const & xCmdEnv ) - throw (deploy::DeploymentException, + throw (css::deployment::DeploymentException, ucb::CommandFailedException, ucb::CommandAbortedException, lang::IllegalArgumentException, uno::RuntimeException) { uno::Any excOccurred1; - Reference xExtensionBackup; - Reference xPackageManager; + Reference xExtensionBackup; + Reference xPackageManager; bool bUserDisabled = false; ::osl::MutexGuard guard(getMutex()); try @@ -874,7 +873,7 @@ void ExtensionManager::removeExtension( identifier, fileName, xPackageManager, xCmdEnv); //revoke the extension if it is active - Reference xOldExtension = + Reference xOldExtension = xPackageManager->getDeployedPackage( identifier, fileName, xCmdEnv); xOldExtension->revokePackage(false, xAbortChannel, xCmdEnv); @@ -885,7 +884,7 @@ void ExtensionManager::removeExtension( xAbortChannel, xCmdEnv); fireModified(); } - catch ( const deploy::DeploymentException& ) { + catch ( const css::deployment::DeploymentException& ) { excOccurred1 = ::cppu::getCaughtException(); } catch ( const ucb::CommandFailedException & ) { excOccurred1 = ::cppu::getCaughtException(); @@ -897,7 +896,7 @@ void ExtensionManager::removeExtension( excOccurred1 = ::cppu::getCaughtException(); } catch (...) { excOccurred1 = ::cppu::getCaughtException(); - deploy::DeploymentException exc( + css::deployment::DeploymentException exc( "Extension Manager: exception during removeEtension", static_cast(this), excOccurred1); excOccurred1 <<= exc; @@ -913,7 +912,7 @@ void ExtensionManager::removeExtension( new TmpRepositoryCommandEnv(xCmdEnv->getInteractionHandler())); if (xExtensionBackup.is()) { - Reference xRestored = + Reference xRestored = xPackageManager->importExtension( xExtensionBackup, Reference(), tmpCmdEnv); @@ -942,10 +941,10 @@ void ExtensionManager::removeExtension( // Only enable extensions from shared and user repository void ExtensionManager::enableExtension( - Reference const & extension, + Reference const & extension, Reference const & xAbortChannel, Reference const & xCmdEnv) - throw (deploy::DeploymentException, + throw (css::deployment::DeploymentException, ucb::CommandFailedException, ucb::CommandAbortedException, lang::IllegalArgumentException, @@ -971,7 +970,7 @@ void ExtensionManager::enableExtension( extension->getName(), false, false, xAbortChannel, xCmdEnv); } - catch ( const deploy::DeploymentException& ) { + catch ( const css::deployment::DeploymentException& ) { excOccurred = ::cppu::getCaughtException(); } catch ( const ucb::CommandFailedException & ) { excOccurred = ::cppu::getCaughtException(); @@ -983,7 +982,7 @@ void ExtensionManager::enableExtension( excOccurred = ::cppu::getCaughtException(); } catch (...) { excOccurred = ::cppu::getCaughtException(); - deploy::DeploymentException exc( + css::deployment::DeploymentException exc( "Extension Manager: exception during enableExtension", static_cast(this), excOccurred); excOccurred <<= exc; @@ -1007,10 +1006,10 @@ void ExtensionManager::enableExtension( /** */ sal_Int32 ExtensionManager::checkPrerequisitesAndEnable( - Reference const & extension, + Reference const & extension, Reference const & xAbortChannel, Reference const & xCmdEnv) - throw (deploy::DeploymentException, + throw (css::deployment::DeploymentException, ucb::CommandFailedException, ucb::CommandAbortedException, lang::IllegalArgumentException, @@ -1022,7 +1021,7 @@ sal_Int32 ExtensionManager::checkPrerequisitesAndEnable( return 0; ::osl::MutexGuard guard(getMutex()); sal_Int32 ret = 0; - Reference mgr = + Reference mgr = getPackageManager(extension->getRepositoryName()); ret = mgr->checkPrerequisites(extension, xAbortChannel, xCmdEnv); if (ret) @@ -1036,7 +1035,7 @@ sal_Int32 ExtensionManager::checkPrerequisitesAndEnable( xAbortChannel, xCmdEnv); return ret; } - catch ( const deploy::DeploymentException& ) { + catch ( const css::deployment::DeploymentException& ) { throw; } catch ( const ucb::CommandFailedException & ) { throw; @@ -1048,7 +1047,7 @@ sal_Int32 ExtensionManager::checkPrerequisitesAndEnable( throw; } catch (...) { uno::Any excOccurred = ::cppu::getCaughtException(); - deploy::DeploymentException exc( + css::deployment::DeploymentException exc( "Extension Manager: exception during disableExtension", static_cast(this), excOccurred); throw exc; @@ -1056,10 +1055,10 @@ sal_Int32 ExtensionManager::checkPrerequisitesAndEnable( } void ExtensionManager::disableExtension( - Reference const & extension, + Reference const & extension, Reference const & xAbortChannel, Reference const & xCmdEnv ) - throw (deploy::DeploymentException, + throw (css::deployment::DeploymentException, ucb::CommandFailedException, ucb::CommandAbortedException, lang::IllegalArgumentException, @@ -1084,7 +1083,7 @@ void ExtensionManager::disableExtension( activateExtension(id, extension->getName(), true, false, xAbortChannel, xCmdEnv); } - catch ( const deploy::DeploymentException& ) { + catch ( const css::deployment::DeploymentException& ) { excOccurred = ::cppu::getCaughtException(); } catch ( const ucb::CommandFailedException & ) { excOccurred = ::cppu::getCaughtException(); @@ -1096,7 +1095,7 @@ void ExtensionManager::disableExtension( excOccurred = ::cppu::getCaughtException(); } catch (...) { excOccurred = ::cppu::getCaughtException(); - deploy::DeploymentException exc( + css::deployment::DeploymentException exc( "Extension Manager: exception during disableExtension", static_cast(this), excOccurred); excOccurred <<= exc; @@ -1117,12 +1116,12 @@ void ExtensionManager::disableExtension( } } -uno::Sequence< Reference > +uno::Sequence< Reference > ExtensionManager::getDeployedExtensions( OUString const & repository, Reference const &xAbort, Reference const & xCmdEnv ) - throw (deploy::DeploymentException, + throw (css::deployment::DeploymentException, ucb::CommandFailedException, ucb::CommandAbortedException, lang::IllegalArgumentException, @@ -1132,13 +1131,13 @@ uno::Sequence< Reference > xAbort, xCmdEnv); } -Reference +Reference ExtensionManager::getDeployedExtension( OUString const & repository, OUString const & identifier, OUString const & filename, Reference const & xCmdEnv ) - throw (deploy::DeploymentException, + throw (css::deployment::DeploymentException, ucb::CommandFailedException, lang::IllegalArgumentException, uno::RuntimeException) @@ -1147,11 +1146,11 @@ Reference identifier, filename, xCmdEnv); } -uno::Sequence< uno::Sequence > > +uno::Sequence< uno::Sequence > > ExtensionManager::getAllExtensions( Reference const & xAbort, Reference const & xCmdEnv ) - throw (deploy::DeploymentException, + throw (css::deployment::DeploymentException, ucb::CommandFailedException, ucb::CommandAbortedException, lang::IllegalArgumentException, @@ -1161,13 +1160,13 @@ uno::Sequence< uno::Sequence > > { id2extensions mapExt; - uno::Sequence > userExt = + uno::Sequence > userExt = getUserRepository()->getDeployedPackages(xAbort, xCmdEnv); addExtensionsToMap(mapExt, userExt, "user"); - uno::Sequence > sharedExt = + uno::Sequence > sharedExt = getSharedRepository()->getDeployedPackages(xAbort, xCmdEnv); addExtensionsToMap(mapExt, sharedExt, "shared"); - uno::Sequence > bundledExt = + uno::Sequence > bundledExt = getBundledRepository()->getDeployedPackages(xAbort, xCmdEnv); addExtensionsToMap(mapExt, bundledExt, "bundled"); @@ -1176,7 +1175,7 @@ uno::Sequence< uno::Sequence > > getTmpRepository(); //copy the values of the map to a vector for sorting - ::std::vector< ::std::vector > > + ::std::vector< ::std::vector > > vecExtensions; id2extensions::const_iterator mapIt = mapExt.begin(); for (;mapIt != mapExt.end(); ++mapIt) @@ -1185,17 +1184,17 @@ uno::Sequence< uno::Sequence > > //sort the element according to the identifier ::std::sort(vecExtensions.begin(), vecExtensions.end(), CompIdentifiers()); - ::std::vector< ::std::vector > >::const_iterator + ::std::vector< ::std::vector > >::const_iterator citVecVec = vecExtensions.begin(); sal_Int32 j = 0; - uno::Sequence< uno::Sequence > > seqSeq(vecExtensions.size()); + uno::Sequence< uno::Sequence > > seqSeq(vecExtensions.size()); for (;citVecVec != vecExtensions.end(); ++citVecVec, j++) { seqSeq[j] = comphelper::containerToSequence(*citVecVec); } return seqSeq; - } catch ( const deploy::DeploymentException& ) { + } catch ( const css::deployment::DeploymentException& ) { throw; } catch ( const ucb::CommandFailedException & ) { throw; @@ -1207,7 +1206,7 @@ uno::Sequence< uno::Sequence > > throw; } catch (...) { uno::Any exc = ::cppu::getCaughtException(); - throw deploy::DeploymentException( + throw css::deployment::DeploymentException( "Extension Manager: exception during enableExtension", static_cast(this), exc); } @@ -1219,18 +1218,18 @@ void ExtensionManager::reinstallDeployedExtensions( sal_Bool force, OUString const & repository, Reference const & xAbortChannel, Reference const & xCmdEnv ) - throw (deploy::DeploymentException, + throw (css::deployment::DeploymentException, ucb::CommandFailedException, ucb::CommandAbortedException, lang::IllegalArgumentException, uno::RuntimeException) { try { - Reference + Reference xPackageManager = getPackageManager(repository); std::set< OUString > disabledExts; { - const uno::Sequence< Reference > extensions( + const uno::Sequence< Reference > extensions( xPackageManager->getDeployedPackages(xAbortChannel, xCmdEnv)); for ( sal_Int32 pos = 0; pos < extensions.getLength(); ++pos ) { @@ -1259,7 +1258,7 @@ void ExtensionManager::reinstallDeployedExtensions( //We must sync here, otherwise we will get exceptions when extensions //are removed. dp_misc::syncRepositories(force, xCmdEnv); - const uno::Sequence< Reference > extensions( + const uno::Sequence< Reference > extensions( xPackageManager->getDeployedPackages(xAbortChannel, xCmdEnv)); for ( sal_Int32 pos = 0; pos < extensions.getLength(); ++pos ) @@ -1277,7 +1276,7 @@ void ExtensionManager::reinstallDeployedExtensions( { } } - } catch ( const deploy::DeploymentException& ) { + } catch ( const css::deployment::DeploymentException& ) { throw; } catch ( const ucb::CommandFailedException & ) { throw; @@ -1289,7 +1288,7 @@ void ExtensionManager::reinstallDeployedExtensions( throw; } catch (...) { uno::Any exc = ::cppu::getCaughtException(); - throw deploy::DeploymentException( + throw css::deployment::DeploymentException( "Extension Manager: exception during enableExtension", static_cast(this), exc); } @@ -1298,7 +1297,7 @@ void ExtensionManager::reinstallDeployedExtensions( sal_Bool ExtensionManager::synchronize( Reference const & xAbortChannel, Reference const & xCmdEnv ) - throw (deploy::DeploymentException, + throw (css::deployment::DeploymentException, ucb::CommandFailedException, ucb::CommandAbortedException, lang::IllegalArgumentException, @@ -1330,11 +1329,11 @@ sal_Bool ExtensionManager::synchronize( // extensions had to be revoked.) try { - const uno::Sequence > > + const uno::Sequence > > seqSeqExt = getAllExtensions(xAbortChannel, xCmdEnv); for (sal_Int32 i = 0; i < seqSeqExt.getLength(); i++) { - uno::Sequence > const & seqExt = + uno::Sequence > const & seqExt = seqSeqExt[i]; activateExtension(seqExt, isUserDisabled(seqExt), true, xAbortChannel, xCmdEnv); @@ -1351,7 +1350,7 @@ sal_Bool ExtensionManager::synchronize( OUString lastSyncShared("$SHARED_EXTENSIONS_USER/lastsynchronized"); writeLastModified(lastSyncShared, xCmdEnv, m_xContext); return bModified; - } catch ( const deploy::DeploymentException& ) { + } catch ( const css::deployment::DeploymentException& ) { throw; } catch ( const ucb::CommandFailedException & ) { throw; @@ -1363,7 +1362,7 @@ sal_Bool ExtensionManager::synchronize( throw; } catch (...) { uno::Any exc = ::cppu::getCaughtException(); - throw deploy::DeploymentException( + throw css::deployment::DeploymentException( "Extension Manager: exception in synchronize", static_cast(this), exc); } @@ -1381,7 +1380,7 @@ void ExtensionManager::checkInstall( Reference const & cmdEnv) { uno::Any request( - deploy::InstallException( + css::deployment::InstallException( "Extension " + displayName + " is about to be installed.", static_cast(this), displayName)); @@ -1391,7 +1390,7 @@ void ExtensionManager::checkInstall( cmdEnv, &approve, &abort )) { OSL_ASSERT( !approve && !abort ); - throw deploy::DeploymentException( + throw css::deployment::DeploymentException( dp_misc::getResourceString(RID_STR_ERROR_WHILE_ADDING) + displayName, static_cast(this), request ); } @@ -1408,12 +1407,12 @@ an extension. void ExtensionManager::checkUpdate( OUString const & newVersion, OUString const & newDisplayName, - Reference const & oldExtension, + Reference const & oldExtension, Reference const & xCmdEnv ) { // package already deployed, interact --force: uno::Any request( - (deploy::VersionException( + (css::deployment::VersionException( dp_misc::getResourceString( RID_STR_PACKAGE_ALREADY_ADDED ) + newDisplayName, static_cast(this), newVersion, newDisplayName, @@ -1423,7 +1422,7 @@ void ExtensionManager::checkUpdate( request, task::XInteractionApprove::static_type(), xCmdEnv, &replace, &abort )) { OSL_ASSERT( !replace && !abort ); - throw deploy::DeploymentException( + throw css::deployment::DeploymentException( dp_misc::getResourceString( RID_STR_ERROR_WHILE_ADDING) + newDisplayName, static_cast(this), request ); @@ -1435,14 +1434,14 @@ void ExtensionManager::checkUpdate( static_cast(this), request ); } -uno::Sequence > SAL_CALL +uno::Sequence > SAL_CALL ExtensionManager::getExtensionsWithUnacceptedLicenses( OUString const & repository, Reference const & xCmdEnv) - throw (deploy::DeploymentException, + throw (css::deployment::DeploymentException, uno::RuntimeException) { - Reference + Reference xPackageManager = getPackageManager(repository); ::osl::MutexGuard guard(getMutex()); return xPackageManager->getExtensionsWithUnacceptedLicenses(xCmdEnv);