incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r1172102 - in /incubator/ooo/trunk/main: desktop/source/deployment/manager/ scp2/source/ooo/
Date Sat, 17 Sep 2011 22:36:51 GMT
Author: mst
Date: Sat Sep 17 22:36:51 2011
New Revision: 1172102

URL: http://svn.apache.org/viewvc?rev=1172102&view=rev
Log:
imported patch extensions_i117681.patch

# HG changeset patch
# User Juergen Schmidt <jsc@openoffice.org>
# Date 1301918587 -7200
# Node ID 084b847c6cbbb3472be43cce34e2da0152a16494
# Parent  d77a8537e3454882a093ba4ca82b21cac06f9b98

Modified:
    incubator/ooo/trunk/main/desktop/source/deployment/manager/dp_extensionmanager.cxx
    incubator/ooo/trunk/main/desktop/source/deployment/manager/dp_extensionmanager.hxx
    incubator/ooo/trunk/main/desktop/source/deployment/manager/dp_manager.cxx
    incubator/ooo/trunk/main/scp2/source/ooo/common_brand.scp
    incubator/ooo/trunk/main/scp2/source/ooo/profileitem_ooo.scp

Modified: incubator/ooo/trunk/main/desktop/source/deployment/manager/dp_extensionmanager.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/desktop/source/deployment/manager/dp_extensionmanager.cxx?rev=1172102&r1=1172101&r2=1172102&view=diff
==============================================================================
--- incubator/ooo/trunk/main/desktop/source/deployment/manager/dp_extensionmanager.cxx (original)
+++ incubator/ooo/trunk/main/desktop/source/deployment/manager/dp_extensionmanager.cxx Sat
Sep 17 22:36:51 2011
@@ -146,20 +146,24 @@ class ExtensionRemoveGuard
     css::uno::Reference<css::deployment::XPackageManager> m_xPackageManager;
 
 public:
+    ExtensionRemoveGuard(){};
     ExtensionRemoveGuard(
         css::uno::Reference<css::deployment::XPackage> const & extension,
         css::uno::Reference<css::deployment::XPackageManager> const & xPackageManager):
         m_extension(extension), m_xPackageManager(xPackageManager) {}
     ~ExtensionRemoveGuard();
 
-    void reset(css::uno::Reference<css::deployment::XPackage> const & extension)
{
+    void set(css::uno::Reference<css::deployment::XPackage> const & extension,
+             css::uno::Reference<css::deployment::XPackageManager> const & xPackageManager)
{
         m_extension = extension;
+        m_xPackageManager = xPackageManager;
     }
 };
 
 ExtensionRemoveGuard::~ExtensionRemoveGuard()
 {
     try {
+        OSL_ASSERT(!(m_extension.is() && !m_xPackageManager.is()));
         if (m_xPackageManager.is() && m_extension.is())
             m_xPackageManager->removePackage(
                 dp_misc::getIdentifier(m_extension), ::rtl::OUString(),
@@ -213,6 +217,10 @@ Reference<deploy::XPackageManager>  Exte
 {
     return m_xPackageManagerFactory->getPackageManager(OUSTR("tmp"));
 }
+Reference<deploy::XPackageManager>  ExtensionManager::getBakRepository()
+{
+    return m_xPackageManagerFactory->getPackageManager(OUSTR("bak"));
+}
 
 Reference<task::XAbortChannel> ExtensionManager::createAbortChannel()
     throw (uno::RuntimeException)
@@ -678,6 +686,7 @@ Reference<deploy::XPackage> ExtensionMan
     //Make sure the extension is removed from the tmp repository in case
     //of an exception
     ExtensionRemoveGuard tmpExtensionRemoveGuard(xTmpExtension, getTmpRepository());
+    ExtensionRemoveGuard bakExtensionRemoveGuard;
     const OUString sIdentifier = dp_misc::getIdentifier(xTmpExtension);
     const OUString sFileName = xTmpExtension->getName();
     Reference<deploy::XPackage> xOldExtension;
@@ -714,22 +723,10 @@ Reference<deploy::XPackage> ExtensionMan
                         xOldExtension->revokePackage(
                             xAbortChannel, Reference<ucb::XCommandEnvironment>());
                         //save the old user extension in case the user aborts
-                        //store the extension in the tmp repository, this will overwrite

-                        //xTmpPackage (same identifier). Do not let the user abort or 
-                        //interact
-                        //importing the old extension in the tmp repository will remove
-                        //the xTmpExtension
-                        //no command environment supplied, only this class shall interact
-                        //with the user!
-                        xExtensionBackup = getTmpRepository()->importExtension(
+                        xExtensionBackup = getBakRepository()->importExtension(
                             xOldExtension, Reference<task::XAbortChannel>(), 
                             Reference<ucb::XCommandEnvironment>());
-                        tmpExtensionRemoveGuard.reset(xExtensionBackup);
-                        //xTmpExtension will later be used to check the dependencies
-                        //again. However, only xExtensionBackup will be later removed
-                        //from the tmp repository
-                        xTmpExtension = xExtensionBackup;
-                        OSL_ASSERT(xTmpExtension.is());
+                        bakExtensionRemoveGuard.set(xExtensionBackup, getBakRepository());
                     }
                     catch (lang::DisposedException &)
                     {

Modified: incubator/ooo/trunk/main/desktop/source/deployment/manager/dp_extensionmanager.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/desktop/source/deployment/manager/dp_extensionmanager.hxx?rev=1172102&r1=1172101&r2=1172102&view=diff
==============================================================================
--- incubator/ooo/trunk/main/desktop/source/deployment/manager/dp_extensionmanager.hxx (original)
+++ incubator/ooo/trunk/main/desktop/source/deployment/manager/dp_extensionmanager.hxx Sat
Sep 17 22:36:51 2011
@@ -249,6 +249,7 @@ private:
     css::uno::Reference<css::deployment::XPackageManager> getSharedRepository();
     css::uno::Reference<css::deployment::XPackageManager> getBundledRepository();
     css::uno::Reference<css::deployment::XPackageManager> getTmpRepository();
+    css::uno::Reference<css::deployment::XPackageManager> getBakRepository();
 
     bool isUserDisabled(::rtl::OUString const & identifier,
                         ::rtl::OUString const & filename);

Modified: incubator/ooo/trunk/main/desktop/source/deployment/manager/dp_manager.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/desktop/source/deployment/manager/dp_manager.cxx?rev=1172102&r1=1172101&r2=1172102&view=diff
==============================================================================
--- incubator/ooo/trunk/main/desktop/source/deployment/manager/dp_manager.cxx (original)
+++ incubator/ooo/trunk/main/desktop/source/deployment/manager/dp_manager.cxx Sat Sep 17 22:36:51
2011
@@ -399,6 +399,17 @@ Reference<deployment::XPackageManager> P
         stampURL = OUSTR(
             "vnd.sun.star.expand:$TMP_EXTENSIONS/stamp.sys");
     }
+    else if (context.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("bak") )) {
+        that->m_activePackages = OUSTR(
+            "vnd.sun.star.expand:$BAK_EXTENSIONS/extensions");
+        that->m_registrationData = OUSTR(
+            "vnd.sun.star.expand:$BAK_EXTENSIONS");
+        that->m_registryCache = OUSTR(
+            "vnd.sun.star.expand:$BAK_EXTENSIONS/registry");
+        stampURL = OUSTR(
+            "vnd.sun.star.expand:$BAK_EXTENSIONS/stamp.sys");
+    }
+
     else if (! context.matchAsciiL(
                  RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.tdoc:/") )) {
         throw lang::IllegalArgumentException(

Modified: incubator/ooo/trunk/main/scp2/source/ooo/common_brand.scp
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/scp2/source/ooo/common_brand.scp?rev=1172102&r1=1172101&r2=1172102&view=diff
==============================================================================
--- incubator/ooo/trunk/main/scp2/source/ooo/common_brand.scp (original)
+++ incubator/ooo/trunk/main/scp2/source/ooo/common_brand.scp Sat Sep 17 22:36:51 2011
@@ -1289,6 +1289,14 @@ ProfileItem gid_Brand_Profileitem_Fundam
     Value = "${${OOO_BASE_DIR}/program/" PROFILENAME(fundamentalbasis) ":TMP_EXTENSIONS}";
 End
 
+ProfileItem gid_Brand_Profileitem_Fundamental_Uno_Bak_Extensions
+    ModuleID = gid_Module_Root_Brand;
+    ProfileID = gid_Brand_Profile_Fundamental_Ini;
+    Section = "Bootstrap";
+    Key = "BAK_EXTENSIONS";
+    Value = "${${OOO_BASE_DIR}/program/" PROFILENAME(fundamentalbasis) ":BAK_EXTENSIONS}";
+End
+
 ProfileItem gid_Brand_Profileitem_Fundamental_Ure_More_Types
     ModuleID = gid_Module_Root_Brand;
     ProfileID = gid_Brand_Profile_Fundamental_Ini;

Modified: incubator/ooo/trunk/main/scp2/source/ooo/profileitem_ooo.scp
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/scp2/source/ooo/profileitem_ooo.scp?rev=1172102&r1=1172101&r2=1172102&view=diff
==============================================================================
--- incubator/ooo/trunk/main/scp2/source/ooo/profileitem_ooo.scp (original)
+++ incubator/ooo/trunk/main/scp2/source/ooo/profileitem_ooo.scp Sat Sep 17 22:36:51 2011
@@ -246,6 +246,15 @@ ProfileItem gid_Profileitem_Uno_Uno_Bund
     Value = "${$BRAND_BASE_DIR/program/" PROFILENAME(bootstrap) ":UserInstallation}/user/extensions/tmp";
 End
 
+ProfileItem gid_Profileitem_Uno_Uno_Bundled_Bak_Extensions
+    ProfileID = gid_Profile_Uno_Ini;
+    ModuleID = gid_Module_Root;
+    Section = "Bootstrap";
+    Order = 1;
+    Key = "BAK_EXTENSIONS";
+    Value = "${$BRAND_BASE_DIR/program/" PROFILENAME(bootstrap) ":UserInstallation}/user/extensions/bak";
+End
+
 ProfileItem gid_Profileitem_Uno_Uno_User_Packages_Cache
     ProfileID = gid_Profile_Uno_Ini;
     ModuleID = gid_Module_Root;
@@ -337,6 +346,14 @@ ProfileItem gid_Profileitem_Fundamentalb
     Value = "${$ORIGIN/" PROFILENAME(uno) ":TMP_EXTENSIONS}";
 End
 
+ProfileItem gid_Profileitem_Fundamentalbasis_Uno_Bak_Extensions
+    ModuleID = gid_Module_Root;
+    ProfileID = gid_Profile_Fundamentalbasis_Ini;
+    Section = "Bootstrap";
+    Key = "BAK_EXTENSIONS";
+    Value = "${$ORIGIN/" PROFILENAME(uno) ":BAK_EXTENSIONS}";
+End
+
 ProfileItem gid_Profileitem_Fundamentalbasis_Ure_More_Types
     ModuleID = gid_Module_Root;
     ProfileID = gid_Profile_Fundamentalbasis_Ini;



Mime
View raw message