summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
authorJoachim Lingner <jl@openoffice.org>2010-03-25 10:45:08 +0100
committerJoachim Lingner <jl@openoffice.org>2010-03-25 10:45:08 +0100
commit72506215f8419786691277f2936b9298ddadd925 (patch)
treef213d2ccc9079a4f617e3ef99b9103b261bbaaca /desktop/source
parente955e6941dcf5784f44d64ec753041a4dc6cf37e (diff)
jl152 import 263443 from native0jl:#i77196# merging
Diffstat (limited to 'desktop/source')
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx32
1 files changed, 24 insertions, 8 deletions
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index 7519ab8a1dc8..a45affcb2c08 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -34,7 +34,6 @@
#include "vos/mutex.hxx"
#include "toolkit/helper/vclunohelper.hxx"
-
#include "com/sun/star/beans/XPropertySet.hpp"
#include "com/sun/star/deployment/XPackageManagerFactory.hpp"
#include "com/sun/star/deployment/thePackageManagerFactory.hpp"
@@ -51,6 +50,10 @@
#define SHARED_PACKAGE_MANAGER OUSTR("shared")
#define BUNDLED_PACKAGE_MANAGER OUSTR("bundled")
+#define USER_PACKAGE_MANAGER OUSTR("user")
+#define SHARED_PACKAGE_MANAGER OUSTR("shared")
+#define BUNDLED_PACKAGE_MANAGER OUSTR("bundled")
+
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -329,16 +332,14 @@ void TheExtensionManager::terminateDialog()
//------------------------------------------------------------------------------
bool TheExtensionManager::createPackageList( const uno::Reference< deployment::XPackageManager > &xPackageManager )
{
- uno::Sequence< uno::Reference< deployment::XPackage > > packages;
+ uno::Sequence< uno::Sequence< uno::Reference< deployment::XPackage > > > xAllPackages;
try {
- packages = xPackageManager->getDeployedPackages( uno::Reference< task::XAbortChannel >(),
- uno::Reference< ucb::XCommandEnvironment >() );
+ xAllPackages = m_xExtensionManager->getAllExtensions( uno::Reference< task::XAbortChannel >(),
+ uno::Reference< ucb::XCommandEnvironment >() );
} catch ( deployment::DeploymentException & ) {
- //handleGeneralError(e.Cause);
return true;
} catch ( ucb::CommandFailedException & ) {
- //handleGeneralError(e.Reason);
return true;
} catch ( ucb::CommandAbortedException & ) {
return false;
@@ -346,9 +347,24 @@ bool TheExtensionManager::createPackageList( const uno::Reference< deployment::X
throw uno::RuntimeException( e.Message, e.Context );
}
- for ( sal_Int32 j = 0; j < packages.getLength(); ++j )
+ for ( sal_Int32 i = 0; i < xAllPackages.getLength(); ++i )
{
- getDialogHelper()->addPackageToList( packages[j], xPackageManager );
+ uno::Sequence< uno::Reference< deployment::XPackage > > xPackageList = xAllPackages[i];
+
+ for ( sal_Int32 j = 0; j < xPackageList.getLength(); ++j )
+ {
+ uno::Reference< deployment::XPackage > xPackage = xPackageList[j];
+ if ( xPackage.is() )
+ {
+ PackageState eState = getPackageState( xPackage );
+ getDialogHelper()->addPackageToList( xPackage, m_sPackageManagers[j] );
+ // When the package is enabled, we can stop here, otherwise we have to look for
+ // another version of this package
+ if ( ( eState == REGISTERED ) || ( eState == NOT_AVAILABLE ) )
+ break;
+ }
+ }
+
}
return true;