ooo-build r15333 - in trunk: . patches/dev300



Author: kyoshida
Date: Sat Feb 14 00:38:44 2009
New Revision: 15333
URL: http://svn.gnome.org/viewvc/ooo-build?rev=15333&view=rev

Log:
2009-02-13  Kohei Yoshida  <kyoshida novell com>

	* patches/dev300/desktop-config-migration.diff: fixed the issue with 
	config migration not being applied because the config tree was being
	reloaded from the disk. (n#466064)


Modified:
   trunk/ChangeLog
   trunk/patches/dev300/desktop-config-migration.diff

Modified: trunk/patches/dev300/desktop-config-migration.diff
==============================================================================
--- trunk/patches/dev300/desktop-config-migration.diff	(original)
+++ trunk/patches/dev300/desktop-config-migration.diff	Sat Feb 14 00:38:44 2009
@@ -13,7 +13,7 @@
  		pLanguageOptions.reset( new SvtLanguageOptions(sal_True));
  
 diff --git desktop/source/migration/migration.cxx desktop/source/migration/migration.cxx
-index bc6b168..c4a98ae 100644
+index bc6b168..65b63f9 100644
 --- desktop/source/migration/migration.cxx
 +++ desktop/source/migration/migration.cxx
 @@ -57,6 +57,10 @@
@@ -135,10 +135,10 @@
 +                                  MigrationImpl::VersionNumber& rAppVerNum)
 +{
 +    if (!splitVersionString(rConfVerStr, rConfVerNum))
-         return sal_False;
++        return sal_False;
 +
 +    if (!splitVersionString(rAppVerStr, rAppVerNum))
-+        return sal_False;
+         return sal_False;
 +
 +#if OSL_DEBUG_LEVEL > 0
 +    fprintf(stdout, "desktop::isMigrationNeeded: config ver = %d.%d.%d\n", 
@@ -200,31 +200,55 @@
  {
  }
  
-@@ -157,6 +296,10 @@ MigrationImpl::~MigrationImpl()
+@@ -157,29 +296,44 @@ MigrationImpl::~MigrationImpl()
  
  sal_Bool MigrationImpl::doMigration()
  {
+-    sal_Bool result = sal_False;
 +#if OSL_DEBUG_LEVEL > 0
 +    fprintf( stderr, "Migrating user configuration to newer OOo version.\n" );
 +#endif
 +
-     sal_Bool result = sal_False;
++    sal_Bool result = sal_True;
      try{
          copyFiles();
-@@ -164,6 +307,12 @@ sal_Bool MigrationImpl::doMigration()
+ 
  		// execute the migration items from Setup.xcu
  		// and refresh the cache
          copyConfig();
-+        
-+        // refresh pieces of the configuration
+-		refresh();
++        refresh();
+ 
+ 		// execute custom migration services from Setup.xcu
+ 		// and refresh the cache
+         runServices();
+         refresh();
+ 
+-        result = sal_True;
+     } catch (...)
+     {
+         OString aMsg("An unexpected exception was thrown during migration");
+         aMsg += "\nOldVersion: " + OUStringToOString(m_aInfo.productname, RTL_TEXTENCODING_ASCII_US);
+         aMsg += "\nDataPath  : " + OUStringToOString(m_aInfo.userdata, RTL_TEXTENCODING_ASCII_US);
+         OSL_ENSURE(sal_False, aMsg.getStr());
++        result = sal_False;
+     }
+ 
++    try
++    {
++        // migrate the configuration values.
 +        transCalcFormulaConfig();
 +        transKeyConfig();
 +        cleanCSVImportCharSet();
-+
- 		refresh();
- 
- 		// execute custom migration services from Setup.xcu
-@@ -196,31 +345,110 @@ void MigrationImpl::refresh()
++    }
++    catch (...)
++    {
++        result = sal_False;
++    }
+ 	// prevent running the migration multiple times
+ 	setMigrationCompleted();
+     return result;
+@@ -196,31 +350,110 @@ void MigrationImpl::refresh()
  
  }
  
@@ -353,7 +377,7 @@
  
  migrations_vr MigrationImpl::readMigrationSteps()
  {
-@@ -636,8 +864,19 @@ void MigrationImpl::runServices()
+@@ -636,8 +869,19 @@ void MigrationImpl::runServices()
      OUString aStratumSvc = OUString::createFromAscii("com.sun.star.configuration.backend.LocalSingleStratum");
      uno::Sequence< uno::Any > stratumArgs(1);
      stratumArgs[0] = uno::makeAny(aOldLayerURL);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]