[ooo-build-commit] .: patches/dev300 patches/vba

Petr Mladek pmladek at kemper.freedesktop.org
Wed Apr 14 01:13:35 PDT 2010


 patches/dev300/apply                                  |   10 
 patches/dev300/desktop-config-migration-m13.diff      |  478 ++++++++++++++++++
 patches/dev300/desktop-config-migration.diff          |  132 ++--
 patches/dev300/ooo83878.unopkg.enablelinking-m13.diff |  372 ++++++++++++++
 patches/dev300/ooo83878.unopkg.enablelinking.diff     |   89 +--
 patches/vba/cws-vbasupportdev300.diff                 |   76 ++
 6 files changed, 1055 insertions(+), 102 deletions(-)

New commits:
commit 4bd19c2663aef98715f41ae4f3090ea0d4fa2d11
Author: Petr Mladek <pmladek at suse.cz>
Date:   Wed Apr 14 10:11:39 2010 +0200

    more build fixes for ooo320-m14
    
    * patches/dev300/desktop-config-migration-m13.diff:
    * patches/dev300/desktop-config-migration.diff:
    * patches/dev300/ooo83878.unopkg.enablelinking-m13.diff:
    * patches/dev300/ooo83878.unopkg.enablelinking.diff:
    * patches/dev300/apply: update for ooo320-m14
    * patches/vba/cws-vbasupportdev300.diff: add missing hunk

diff --git a/patches/dev300/apply b/patches/dev300/apply
index 4542d04..409f5e7 100644
--- a/patches/dev300/apply
+++ b/patches/dev300/apply
@@ -1120,9 +1120,14 @@ SectionOwner => kohei
 # Swap the delete and backspace key bindings but leave the menus alone.
 sc-default-delete-backspace-key.diff, i#17965, kohei
 
+[ CustomUserConfig < ooo320-m14 ]
+# migrate keyboard shortcuts & reset character set for CSV import dialog.
+desktop-config-migration-m13.diff n#367160, n#376473, n#421070, n#466064, kohei/jholesov
+[ CustomUserConfig >= ooo320-m14 ]
 # migrate keyboard shortcuts & reset character set for CSV import dialog.
 desktop-config-migration.diff n#367160, n#376473, n#421070, n#466064, kohei/jholesov
 
+
 [ GlobalNSPluginSupport ]
 # more intelligent nsplugin seeking
 nsplugin-path.diff, i#49590, michael
@@ -2480,6 +2485,11 @@ ooo86080.unopkg.bodge.diff
 
 oooXXXX.partial-revert-ooo95118.diff
 
+[ FedoraCommonFixes < ooo320-m14 ]
+# add unopkg add --link option to register uncompressed extensions
+# it helps to get automatic depencies when packaging extensions in RPMs
+ooo83878.unopkg.enablelinking-m13.diff, i#83878, bnc#493994, caolan
+[ FedoraCommonFixes >= ooo320-m14 ]
 # add unopkg add --link option to register uncompressed extensions
 # it helps to get automatic depencies when packaging extensions in RPMs
 ooo83878.unopkg.enablelinking.diff, i#83878, bnc#493994, caolan
diff --git a/patches/dev300/desktop-config-migration-m13.diff b/patches/dev300/desktop-config-migration-m13.diff
new file mode 100644
index 0000000..c0fae90
--- /dev/null
+++ b/patches/dev300/desktop-config-migration-m13.diff
@@ -0,0 +1,478 @@
+diff --git desktop/source/app/app.cxx desktop/source/app/app.cxx
+index 38c3220..d3a3fc8 100644
+--- desktop/source/app/app.cxx
++++ desktop/source/app/app.cxx
+@@ -1429,6 +1429,9 @@ void Desktop::Main()
+         }
+ #endif
+ 
++        if (Migration::checkMigration())
++            Migration::doMigration();
++
+ 		// keep a language options instance...
+ 		pLanguageOptions.reset( new SvtLanguageOptions(sal_True));
+ 
+diff --git desktop/source/migration/migration.cxx desktop/source/migration/migration.cxx
+index bc6b168..21ac07d 100644
+--- desktop/source/migration/migration.cxx
++++ desktop/source/migration/migration.cxx
+@@ -57,6 +57,10 @@
+ #include <com/sun/star/util/XRefreshable.hpp>
+ #include <com/sun/star/util/XChangesBatch.hpp>
+ #include <com/sun/star/util/XStringSubstitution.hpp>
++#include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp>
++#include <com/sun/star/ui/XAcceleratorConfiguration.hpp>
++#include <com/sun/star/awt/Key.hpp>
++#include <com/sun/star/awt/KeyEvent.hpp>
+ 
+ using namespace rtl;
+ using namespace osl;
+@@ -71,6 +75,9 @@ using namespace com::sun::star::configuration::backend;
+ using com::sun::star::uno::Exception;
+ using namespace com::sun::star;
+ 
++#define ascii( asc ) \
++    ::rtl::OUString::intern( RTL_CONSTASCII_USTRINGPARAM( asc ) )
++
+ namespace desktop {
+ 
+ 
+@@ -127,26 +134,154 @@ OUString Migration::getOldVersionName()
+     return getImpl()->getOldVersionName();
+ }
+ 
++MigrationImpl::VersionNumber::VersionNumber() :
++    mnMajor(0), mnMinor(0), mnMicro(0)
++{
++}
++
++MigrationImpl::VersionNumber::VersionNumber(sal_Int32 nMajor, sal_Int32 nMinor, sal_Int32 nMicro) :
++    mnMajor(nMajor), mnMinor(nMinor), mnMicro(nMicro)
++{
++}
++
+ OUString MigrationImpl::getOldVersionName()
+ {
+     return m_aInfo.productname;
+ }
+ 
+-sal_Bool MigrationImpl::checkMigration()
++static bool splitVersionString(const OUString& rVer, MigrationImpl::VersionNumber& rVerNum)
+ {
+-    if (m_aInfo.userdata.getLength() > 0 && ! checkMigrationCompleted())
+-        return sal_True;
+-    else
++    rVerNum.mnMajor = 0;
++    rVerNum.mnMinor = 0;
++    rVerNum.mnMicro = 0;
++
++    sal_Int32 nLen = rVer.getLength();
++    const sal_Unicode* pStr = rVer.getStr();
++    OUStringBuffer buf;
++    sal_uInt8 nPos = 0; // 0 = major; 1 = minor; 2 = micro
++    for (sal_Int32 i = 0; i < nLen; ++i)
++    {
++        const sal_Unicode c = pStr[i];
++        if (c >= sal_Unicode('0') && c <= sal_Unicode('9'))
++            buf.append(c);
++        else if (c == sal_Unicode('.'))
++        {
++            if (buf.getLength() == 0)
++                // no numbers.
++                return false;
++
++            sal_Int32 nTmp = buf.makeStringAndClear().toInt32();
++            if (nTmp < 0 || nTmp > 255)
++                // only 0 - 255 allowed in a version number.
++                return false;
++
++            switch (nPos)
++            {
++                case 0: rVerNum.mnMajor = static_cast<sal_uInt8>(nTmp); break;
++                case 1: rVerNum.mnMinor = static_cast<sal_uInt8>(nTmp); break;
++                case 2: rVerNum.mnMicro = static_cast<sal_uInt8>(nTmp); break;
++            }
++
++            nPos += 1;
++            if (nPos > 2)
++                return true;
++        }
++        else
++            return false;
++    }
++
++    return true;
++}
++
++/** returns -1 if rVer1 < rVer2, 0 if rVer1 == rVer2, or 1 if rVer1 >
++    rVer2. */
++static short compareVersion(const MigrationImpl::VersionNumber& rVer1, 
++                            const MigrationImpl::VersionNumber& rVer2)
++{
++    // major version
++    if (rVer1.mnMajor < rVer2.mnMajor)
++        return -1;
++    if (rVer1.mnMajor > rVer2.mnMajor)
++        return 1;
++
++    // minor version
++    if (rVer1.mnMinor < rVer2.mnMinor)
++        return -1;
++    if (rVer1.mnMinor > rVer2.mnMinor)
++        return 1;
++
++    // micro version
++    if (rVer1.mnMicro < rVer2.mnMicro)
++        return -1;
++    if (rVer1.mnMicro > rVer2.mnMicro)
++        return 1;
++
++    return 0;
++}
++
++static sal_Bool isMigrationNeeded(const OUString& rConfVerStr, const OUString& rAppVerStr, 
++                                  MigrationImpl::VersionNumber& rConfVerNum, 
++                                  MigrationImpl::VersionNumber& rAppVerNum)
++{
++    if (!splitVersionString(rConfVerStr, rConfVerNum))
++        return sal_False;
++
++    if (!splitVersionString(rAppVerStr, rAppVerNum))
+         return sal_False;
++
++#if OSL_DEBUG_LEVEL > 0
++    fprintf(stdout, "desktop::isMigrationNeeded: config ver = %d.%d.%d\n", 
++            rConfVerNum.mnMajor,rConfVerNum.mnMinor,rConfVerNum.mnMicro);
++
++    fprintf(stdout, "desktop::isMigrationNeeded: app ver = %d.%d.%d\n", 
++            rAppVerNum.mnMajor,rAppVerNum.mnMinor,rAppVerNum.mnMicro);
++#endif    
++
++    if (compareVersion(rConfVerNum, rAppVerNum) < 0)
++        return sal_True;
++
++    return sal_False;
+ }
+ 
++sal_Bool MigrationImpl::checkMigration()
++{
++    if (m_bMigrationCompleted)
++        // migration is already complete.
++        return sal_False;
++
++    try
++    {
++        uno::Reference< XPropertySet > aPropSet(getConfigAccess("org.openoffice.Setup/Product"), uno::UNO_QUERY_THROW);
++        uno::Any any = aPropSet->getPropertyValue(ascii("ooSetupVersionAboutBox"));
++        if (!(any >>= m_aAppVerStr))
++            // Current version unknown.  Don't do migration (this should not happen).
++            return sal_False;
++
++        aPropSet.set(getConfigAccess("org.openoffice.Setup/Configuration"), uno::UNO_QUERY_THROW);    
++        any = aPropSet->getPropertyValue(ascii("ooLastVersionTouched"));
++        OUString aLastVersion;
++        if (!(any >>= aLastVersion))
++        {
++            // last touched version unknown.  Do the migration.
++            splitVersionString(m_aAppVerStr, m_aAppVerNum);
++            m_aConfigVerNum.mnMajor = 0;
++            m_aConfigVerNum.mnMinor = 0;
++            m_aConfigVerNum.mnMicro = 0;
++            return sal_True;
++        }
++
++        return isMigrationNeeded(aLastVersion, m_aAppVerStr, m_aConfigVerNum, m_aAppVerNum);
++    }
++    catch (const Exception&)
++    {
++    }
++    return sal_True;
++}
++ 
+ MigrationImpl::MigrationImpl(const uno::Reference< XMultiServiceFactory >& xFactory)
+-    : m_vrVersions(new strings_v)
++    : m_vrVersions(NULL)
+     , m_xFactory(xFactory)
+-    , m_vrMigrations(readMigrationSteps())
+-    , m_aInfo(findInstallation())
+-    , m_vrFileList(compileFileList())
+-    , m_vrServiceList(compileServiceList())
++    , m_bMigrationCompleted(false)
+ {
+ }
+ 
+@@ -157,29 +292,52 @@ MigrationImpl::~MigrationImpl()
+ 
+ sal_Bool MigrationImpl::doMigration()
+ {
+-    sal_Bool result = sal_False;
+-    try{
+-        copyFiles();
+-
+-		// execute the migration items from Setup.xcu
+-		// and refresh the cache
+-        copyConfig();
+-		refresh();
++#if OSL_DEBUG_LEVEL > 0
++    fprintf( stderr, "Migrating user configuration to newer OOo version.\n" );
++#endif
+ 
+-		// execute custom migration services from Setup.xcu
+-		// and refresh the cache
+-        runServices();
+-        refresh();
++    sal_Bool result = sal_True;
+ 
+-        result = sal_True;
+-    } catch (...)
++    if (compareVersion(m_aConfigVerNum, VersionNumber(3,0,0)) < 0)
+     {
+-        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());
++        try
++        {
++            initDirectoryMigration();
++
++            copyFiles();
++    
++            // execute the migration items from Setup.xcu
++            // and refresh the cache
++            copyConfig();
++            refresh();
++    
++            // execute custom migration services from Setup.xcu
++            // and refresh the cache
++            runServices();
++            refresh();
++    
++        }
++        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();
++    }
++    catch (...)
++    {
++        result = sal_False;
++    }
+ 	// prevent running the migration multiple times
+ 	setMigrationCompleted();
+     return result;
+@@ -196,31 +354,119 @@ void MigrationImpl::refresh()
+ 
+ }
+ 
+-void MigrationImpl::setMigrationCompleted()
++void MigrationImpl::transKeyConfig()
+ {
+-	try {
+-		uno::Reference< XPropertySet > aPropertySet(getConfigAccess("org.openoffice.Setup/Office", true), uno::UNO_QUERY_THROW);
+-		aPropertySet->setPropertyValue(OUString::createFromAscii("MigrationCompleted"), uno::makeAny(sal_True));
+-		uno::Reference< XChangesBatch >(aPropertySet, uno::UNO_QUERY_THROW)->commitChanges();
+-	} catch (...) {
+-		// fail silently
+-	}
++    using namespace ::com::sun::star;
++    using namespace ::com::sun::star::ui;
++
++#if OSL_DEBUG_LEVEL > 0
++    fprintf(stdout, "MigrationImpl::transKeyConfig:   config ver = %ld.%ld.%ld\n",
++            long(m_aConfigVerNum.mnMajor), long(m_aConfigVerNum.mnMinor), long(m_aConfigVerNum.mnMicro));
++
++    fprintf(stdout, "MigrationImpl::transKeyConfig:   app ver = %ld.%ld.%ld\n",
++            long(m_aAppVerNum.mnMajor), long(m_aAppVerNum.mnMinor), long(m_aAppVerNum.mnMicro));
++#endif
++
++    if (compareVersion(m_aConfigVerNum, VersionNumber(2,4,0)) < 0)
++    {
++        // For config versions older than 2.4.0 only.
++
++        uno::Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier(
++            m_xFactory->createInstance(
++                ascii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier")), uno::UNO_QUERY_THROW);
++    
++        // Grab the Calc configuration.
++        uno::Reference< XUIConfigurationManager > xConfigMgr = 
++            xModuleCfgSupplier->getUIConfigurationManager(
++                ascii("com.sun.star.sheet.SpreadsheetDocument"));
++    
++        if (xConfigMgr.is())
++        {
++            uno::Reference< XAcceleratorConfiguration > xScAccel(
++                xConfigMgr->getShortCutManager(), uno::UNO_QUERY_THROW);
++        
++            // Backsapce key
++            awt::KeyEvent aBackEv;
++            aBackEv.KeyCode = awt::Key::BACKSPACE;
++            aBackEv.Modifiers = 0;
++            xScAccel->setKeyEvent(aBackEv, ascii(".uno:Delete"));
++        
++            // Delete key
++            awt::KeyEvent aDeleteEv;
++            aDeleteEv.KeyCode = awt::Key::DELETE;
++            aDeleteEv.Modifiers = 0;
++            xScAccel->setKeyEvent(aDeleteEv, ascii(".uno:ClearContents"));
++        
++            xScAccel->store();
++        }
++    }
+ }
+ 
+-sal_Bool MigrationImpl::checkMigrationCompleted()
++void MigrationImpl::cleanCSVImportCharSet()
+ {
+-    sal_Bool bMigrationCompleted = sal_False;
+-    try {
+-        uno::Reference< XPropertySet > aPropertySet(
+-            getConfigAccess("org.openoffice.Setup/Office"), uno::UNO_QUERY_THROW);    
+-        aPropertySet->getPropertyValue(
+-            OUString::createFromAscii("MigrationCompleted")) >>= bMigrationCompleted;
+-    } catch (Exception&) {
+-        // just return false...
++    // Overwrite the character set value for CSV import to -1 (unset) on every 
++    // upgrade, to prevent it from being incorrectly set to Unicode. (n#376473)
++
++    uno::Reference< XPropertySet > aPropSet;
++    aPropSet.set(getConfigAccess("org.openoffice.Office.Calc/Dialogs/CSVImport", true), uno::UNO_QUERY_THROW);
++    aPropSet->setPropertyValue(ascii("CharSet"), uno::makeAny(static_cast<sal_Int32>(-1)));
++    uno::Reference< XChangesBatch >(aPropSet, uno::UNO_QUERY_THROW)->commitChanges();
++}
++
++void MigrationImpl::transCalcFormulaConfig()
++{
++    // Prior to 3.1.0, formula settings were stored in
++    // Calc/Calculate/FormulaSyntax.  Migrate that to
++    // Calc/Formula/Syntax/Grammar.
++
++    if (compareVersion(m_aConfigVerNum, VersionNumber(3,1,0)) >= 0)
++        return;
++
++    try
++    {
++        uno::Reference<XPropertySet> xPropSet1(
++            getConfigAccess("org.openoffice.Office.Calc/Calculate/Other", true), uno::UNO_QUERY_THROW);
++
++        sal_Int32 nFormulaSyntax = 0;
++        xPropSet1->getPropertyValue(ascii("FormulaSyntax")) >>= nFormulaSyntax;
++
++        uno::Reference<XPropertySet> xPropSet2(
++            getConfigAccess("org.openoffice.Office.Calc/Formula/Syntax", true), uno::UNO_QUERY_THROW);
++        xPropSet2->setPropertyValue(ascii("Grammar"), uno::makeAny(nFormulaSyntax));
++        uno::Reference<XChangesBatch>(xPropSet2, uno::UNO_QUERY_THROW)->commitChanges();
++    }
++    catch (const Exception&)
++    {
+     }
+-    return bMigrationCompleted;
+ }
+ 
++void MigrationImpl::setMigrationCompleted()
++{
++    try
++    {
++        uno::Reference< XPropertySet > aPropSet;
++        if (m_aAppVerStr.getLength() > 0)
++        {
++            aPropSet.set(getConfigAccess("org.openoffice.Setup/Configuration", true), uno::UNO_QUERY_THROW);
++            aPropSet->setPropertyValue(ascii("ooLastVersionTouched"), uno::makeAny(m_aAppVerStr));
++            uno::Reference< XChangesBatch >(aPropSet, uno::UNO_QUERY_THROW)->commitChanges();
++        }
++
++        m_bMigrationCompleted = true;
++    } 
++    catch (const Exception&)
++    {
++    }
++}
++
++void MigrationImpl::initDirectoryMigration()
++{
++    m_vrVersions.reset(new strings_v);
++    m_vrMigrations = readMigrationSteps();
++    m_aInfo = findInstallation();
++    m_vrFileList = compileFileList();
++    m_vrServiceList = compileServiceList();
++}
+ 
+ migrations_vr MigrationImpl::readMigrationSteps()
+ {
+diff --git desktop/source/migration/migration_impl.hxx desktop/source/migration/migration_impl.hxx
+index e07847a..34ba8bd 100644
+--- desktop/source/migration/migration_impl.hxx
++++ desktop/source/migration/migration_impl.hxx
+@@ -76,6 +76,16 @@ typedef std::auto_ptr< migrations_v > migrations_vr;
+ 
+ class MigrationImpl
+ {
++public:
++    struct VersionNumber
++    {
++        sal_Int32 mnMajor;
++        sal_Int32 mnMinor;
++        sal_Int32 mnMicro;
++
++        explicit VersionNumber();
++        explicit VersionNumber(sal_Int32 nMajor, sal_Int32 nMinor, sal_Int32 nMicro);
++    };
+ 
+ private:
+     strings_vr m_vrVersions;
+@@ -85,6 +95,12 @@ private:
+     strings_vr m_vrFileList;      // final list of files to be copied
+     strings_vr m_vrConfigList;    // final list of nodes to be copied
+     strings_vr m_vrServiceList;   // final list of services to be called
++    ::rtl::OUString m_aAppVerStr;
++    bool m_bMigrationCompleted;
++    VersionNumber m_aAppVerNum;
++    VersionNumber m_aConfigVerNum;
++
++    void initDirectoryMigration();
+ 
+     // initializer functions...
+     migrations_vr readMigrationSteps();
+@@ -104,9 +120,11 @@ private:
+     void copyConfig();
+     void runServices();
+     void refresh();
++    void transKeyConfig();
++    void cleanCSVImportCharSet();
++    void transCalcFormulaConfig();
+ 
+     void setMigrationCompleted();
+-    sal_Bool checkMigrationCompleted();
+     
+ public:
+     MigrationImpl(const NS_UNO::Reference< NS_CSS::lang::XMultiServiceFactory >&);
+diff --git officecfg/registry/schema/org/openoffice/Setup.xcs officecfg/registry/schema/org/openoffice/Setup.xcs
+index 7572879..339a7a4 100644
+--- officecfg/registry/schema/org/openoffice/Setup.xcs
++++ officecfg/registry/schema/org/openoffice/Setup.xcs
+@@ -417,6 +417,14 @@
+                     <desc>Deprecated</desc>
+ 				</info>
+ 			</prop>
++            <prop oor:name="ooLastVersionTouched" oor:type="xs:string">
++                <info>
++                    <author>Kohei Yoshida</author>
++                    <desc>Specifies the version of OOo that touched the configration for the last time.  The format must 
++                    be in the form of major.minor.micro (e.g. 2.3.1).  Note that this value may not always be present if the 
++                    last touched version is very old.</desc>
++                </info>
++            </prop>
+ 		</group>
+ 		<group oor:name="Migration">
+ 			<info>
diff --git a/patches/dev300/desktop-config-migration.diff b/patches/dev300/desktop-config-migration.diff
index c0fae90..1dc66a5 100644
--- a/patches/dev300/desktop-config-migration.diff
+++ b/patches/dev300/desktop-config-migration.diff
@@ -1,8 +1,6 @@
-diff --git desktop/source/app/app.cxx desktop/source/app/app.cxx
-index 38c3220..d3a3fc8 100644
---- desktop/source/app/app.cxx
-+++ desktop/source/app/app.cxx
-@@ -1429,6 +1429,9 @@ void Desktop::Main()
+--- desktop/source/app/app.cxx.old	2010-04-13 14:30:50.000000000 +0200
++++ desktop/source/app/app.cxx	2010-04-13 15:30:18.000000000 +0200
+@@ -1457,6 +1457,9 @@ void Desktop::Main()
          }
  #endif
  
@@ -12,11 +10,9 @@ index 38c3220..d3a3fc8 100644
  		// keep a language options instance...
  		pLanguageOptions.reset( new SvtLanguageOptions(sal_True));
  
-diff --git desktop/source/migration/migration.cxx desktop/source/migration/migration.cxx
-index bc6b168..21ac07d 100644
---- desktop/source/migration/migration.cxx
-+++ desktop/source/migration/migration.cxx
-@@ -57,6 +57,10 @@
+--- desktop/source/migration/migration.cxx.old	2010-04-01 16:31:14.000000000 +0200
++++ desktop/source/migration/migration.cxx	2010-04-13 15:30:18.000000000 +0200
+@@ -55,6 +55,10 @@
  #include <com/sun/star/util/XRefreshable.hpp>
  #include <com/sun/star/util/XChangesBatch.hpp>
  #include <com/sun/star/util/XStringSubstitution.hpp>
@@ -27,7 +23,7 @@ index bc6b168..21ac07d 100644
  
  using namespace rtl;
  using namespace osl;
-@@ -71,6 +75,9 @@ using namespace com::sun::star::configuration::backend;
+@@ -69,6 +73,9 @@ using namespace com::sun::star::configur
  using com::sun::star::uno::Exception;
  using namespace com::sun::star;
  
@@ -37,7 +33,7 @@ index bc6b168..21ac07d 100644
  namespace desktop {
  
  
-@@ -127,26 +134,154 @@ OUString Migration::getOldVersionName()
+@@ -124,27 +131,155 @@ OUString Migration::getOldVersionName()
      return getImpl()->getOldVersionName();
  }
  
@@ -193,18 +189,36 @@ index bc6b168..21ac07d 100644
 -    : m_vrVersions(new strings_v)
 +    : m_vrVersions(NULL)
      , m_xFactory(xFactory)
--    , m_vrMigrations(readMigrationSteps())
--    , m_aInfo(findInstallation())
--    , m_vrFileList(compileFileList())
--    , m_vrServiceList(compileServiceList())
 +    , m_bMigrationCompleted(false)
  {
+-    readAvailableMigrations(m_vMigrationsAvailable);
+-    sal_Int32 nIndex = findPreferedMigrationProcess(m_vMigrationsAvailable);
+-    if ( nIndex >= 0 )
+-        m_vrMigrations = readMigrationSteps(m_vMigrationsAvailable[nIndex].name);
  }
  
-@@ -157,29 +292,52 @@ MigrationImpl::~MigrationImpl()
+ MigrationImpl::~MigrationImpl()
+@@ -154,33 +289,52 @@ MigrationImpl::~MigrationImpl()
  
  sal_Bool MigrationImpl::doMigration()
  {
+-    // compile file and service list for migration
+-    m_vrFileList    = compileFileList();
+-    m_vrServiceList = compileServiceList();
++#if OSL_DEBUG_LEVEL > 0
++    fprintf( stderr, "Migrating user configuration to newer OOo version.\n" );
++#endif
++
++    sal_Bool result = sal_True;
++
++    if (compareVersion(m_aConfigVerNum, VersionNumber(3,0,0)) < 0)
++    {
++        try
++        {
++            initDirectoryMigration();
++
++            copyFiles();
+     
 -    sal_Bool result = sal_False;
 -    try{
 -        copyFiles();
@@ -213,30 +227,19 @@ index bc6b168..21ac07d 100644
 -		// and refresh the cache
 -        copyConfig();
 -		refresh();
-+#if OSL_DEBUG_LEVEL > 0
-+    fprintf( stderr, "Migrating user configuration to newer OOo version.\n" );
-+#endif
- 
+-
 -		// execute custom migration services from Setup.xcu
 -		// and refresh the cache
 -        runServices();
 -        refresh();
-+    sal_Bool result = sal_True;
- 
+-
 -        result = sal_True;
 -    } catch (...)
-+    if (compareVersion(m_aConfigVerNum, VersionNumber(3,0,0)) < 0)
-     {
+-    {
 -        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());
-+        try
-+        {
-+            initDirectoryMigration();
-+
-+            copyFiles();
-+    
 +            // execute the migration items from Setup.xcu
 +            // and refresh the cache
 +            copyConfig();
@@ -272,7 +275,7 @@ index bc6b168..21ac07d 100644
  	// prevent running the migration multiple times
  	setMigrationCompleted();
      return result;
-@@ -196,31 +354,119 @@ void MigrationImpl::refresh()
+@@ -197,31 +351,122 @@ void MigrationImpl::refresh()
  
  }
  
@@ -337,8 +340,8 @@ index bc6b168..21ac07d 100644
  {
 -    sal_Bool bMigrationCompleted = sal_False;
 -    try {
--        uno::Reference< XPropertySet > aPropertySet(
--            getConfigAccess("org.openoffice.Setup/Office"), uno::UNO_QUERY_THROW);    
+-		uno::Reference< XPropertySet > aPropertySet(
+-            getConfigAccess("org.openoffice.Setup/Office"), uno::UNO_QUERY_THROW);
 -        aPropertySet->getPropertyValue(
 -            OUString::createFromAscii("MigrationCompleted")) >>= bMigrationCompleted;
 -    } catch (Exception&) {
@@ -376,10 +379,9 @@ index bc6b168..21ac07d 100644
 +    }
 +    catch (const Exception&)
 +    {
-     }
--    return bMigrationCompleted;
- }
- 
++    }
++}
++
 +void MigrationImpl::setMigrationCompleted()
 +{
 +    try
@@ -396,25 +398,27 @@ index bc6b168..21ac07d 100644
 +    } 
 +    catch (const Exception&)
 +    {
-+    }
-+}
-+
+     }
+-    return bMigrationCompleted;
+ }
+ 
 +void MigrationImpl::initDirectoryMigration()
 +{
 +    m_vrVersions.reset(new strings_v);
-+    m_vrMigrations = readMigrationSteps();
-+    m_aInfo = findInstallation();
++    readAvailableMigrations(m_vMigrationsAvailable);
++    sal_Int32 nIndex = findPreferedMigrationProcess(m_vMigrationsAvailable);
++    if ( nIndex >= 0 )
++        m_vrMigrations = readMigrationSteps(m_vMigrationsAvailable[nIndex].name);
++    // compile file and service list for migration
 +    m_vrFileList = compileFileList();
 +    m_vrServiceList = compileServiceList();
 +}
- 
- migrations_vr MigrationImpl::readMigrationSteps()
+ static void insertSorted(migrations_available& rAvailableMigrations, supported_migration& aSupportedMigration)
  {
-diff --git desktop/source/migration/migration_impl.hxx desktop/source/migration/migration_impl.hxx
-index e07847a..34ba8bd 100644
---- desktop/source/migration/migration_impl.hxx
-+++ desktop/source/migration/migration_impl.hxx
-@@ -76,6 +76,16 @@ typedef std::auto_ptr< migrations_v > migrations_vr;
+     bool                           bInserted( false );
+--- desktop/source/migration/migration_impl.hxx.old	2010-04-01 16:31:14.000000000 +0200
++++ desktop/source/migration/migration_impl.hxx	2010-04-13 15:30:18.000000000 +0200
+@@ -83,6 +83,16 @@ typedef std::vector< supported_migration
  
  class MigrationImpl
  {
@@ -431,10 +435,10 @@ index e07847a..34ba8bd 100644
  
  private:
      strings_vr m_vrVersions;
-@@ -85,6 +95,12 @@ private:
-     strings_vr m_vrFileList;      // final list of files to be copied
-     strings_vr m_vrConfigList;    // final list of nodes to be copied
-     strings_vr m_vrServiceList;   // final list of services to be called
+@@ -94,6 +104,12 @@ private:
+     strings_vr           m_vrFileList;           // final list of files to be copied
+     strings_vr           m_vrConfigList;         // final list of nodes to be copied
+     strings_vr           m_vrServiceList;        // final list of services to be called
 +    ::rtl::OUString m_aAppVerStr;
 +    bool m_bMigrationCompleted;
 +    VersionNumber m_aAppVerNum;
@@ -442,9 +446,9 @@ index e07847a..34ba8bd 100644
 +
 +    void initDirectoryMigration();
  
-     // initializer functions...
-     migrations_vr readMigrationSteps();
-@@ -104,9 +120,11 @@ private:
+     // functions to control the migration process
+     bool          readAvailableMigrations(migrations_available&);
+@@ -115,9 +131,11 @@ private:
      void copyConfig();
      void runServices();
      void refresh();
@@ -457,12 +461,10 @@ index e07847a..34ba8bd 100644
      
  public:
      MigrationImpl(const NS_UNO::Reference< NS_CSS::lang::XMultiServiceFactory >&);
-diff --git officecfg/registry/schema/org/openoffice/Setup.xcs officecfg/registry/schema/org/openoffice/Setup.xcs
-index 7572879..339a7a4 100644
---- officecfg/registry/schema/org/openoffice/Setup.xcs
-+++ officecfg/registry/schema/org/openoffice/Setup.xcs
-@@ -417,6 +417,14 @@
-                     <desc>Deprecated</desc>
+--- officecfg/registry/schema/org/openoffice/Setup.xcs.old	2010-04-01 16:35:33.000000000 +0200
++++ officecfg/registry/schema/org/openoffice/Setup.xcs	2010-04-13 15:30:18.000000000 +0200
+@@ -446,6 +446,14 @@
+           <desc>Deprecated</desc>
  				</info>
  			</prop>
 +            <prop oor:name="ooLastVersionTouched" oor:type="xs:string">
@@ -474,5 +476,5 @@ index 7572879..339a7a4 100644
 +                </info>
 +            </prop>
  		</group>
- 		<group oor:name="Migration">
- 			<info>
+     <group oor:name="Migration">
+       <info>
diff --git a/patches/dev300/ooo83878.unopkg.enablelinking-m13.diff b/patches/dev300/ooo83878.unopkg.enablelinking-m13.diff
new file mode 100644
index 0000000..fcc0402
--- /dev/null
+++ b/patches/dev300/ooo83878.unopkg.enablelinking-m13.diff
@@ -0,0 +1,372 @@
+Index: com/sun/star/deployment/makefile.mk
+===================================================================
+RCS file: /cvs/api/offapi/com/sun/star/deployment/makefile.mk,v
+retrieving revision 1.15
+diff -u -r1.15 makefile.mk
+--- offapi/com/sun/star/deployment/makefile.mk	6 Jul 2007 14:32:11 -0000	1.15
++++ offapi/com/sun/star/deployment/makefile.mk	22 Nov 2007 14:43:47 -0000
+@@ -55,6 +55,7 @@
+ 	    LicenseException.idl                    \
+         VersionException.idl                    \
+ 	    InstallException.idl                    \
++	    LinkException.idl                    \
+ 		UpdateInformationEntry.idl				\
+ 	    XUpdateInformationProvider.idl          \
+ 		UpdateInformationProvider.idl           \
+--- /dev/null	2007-10-09 17:51:18.611015998 +0100
++++ offapi/com/sun/star/deployment/LinkException.idl	2007-11-22 13:45:04.000000000 +0000
+@@ -0,0 +1,66 @@
++/*************************************************************************
++ *
++ *  OpenOffice.org - a multi-platform office productivity suite
++ *
++ *  $RCSfile$
++ *
++ *  $Revision$
++ *
++ *  last change: $Author$ $Date$
++ *
++ *  The Contents of this file are made available subject to
++ *  the terms of GNU Lesser General Public License Version 2.1.
++ *
++ *
++ *    GNU Lesser General Public License Version 2.1
++ *    =============================================
++ *    Copyright 2006 by Sun Microsystems, Inc.
++ *    901 San Antonio Road, Palo Alto, CA 94303, USA
++ *
++ *    This library is free software; you can redistribute it and/or
++ *    modify it under the terms of the GNU Lesser General Public
++ *    License version 2.1, as published by the Free Software Foundation.
++ *
++ *    This library is distributed in the hope that it will be useful,
++ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
++ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
++ *    Lesser General Public License for more details.
++ *
++ *    You should have received a copy of the GNU Lesser General Public
++ *    License along with this library; if not, write to the Free Software
++ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
++ *    MA  02111-1307  USA
++ *
++ ************************************************************************/
++
++#ifndef INCLUDED_COM_SUN_STAR_DEPLOYMENT_LINKEXCEPTION_IDL
++#define INCLUDED_COM_SUN_STAR_DEPLOYMENT_LINKEXCEPTION_IDL
++
++#include "com/sun/star/uno/Exception.idl"
++
++module com { module sun { module star { module deployment {
++
++interface XPackage;
++
++/**
++   describes the fact that deployment unit is  about to be linked.
++
++   <p>This exception is intended to be used with an
++   <type scope="com::sun::star::task">XInteractionHandler</type>.</p>
++
++   @since OOo 2.4
++*/
++exception LinkException: com::sun::star::uno::Exception {
++    /**
++       represents the new deployment unit.
++
++       <p>Must not be <NULL/>.</p>
++    */
++    XPackage New;
++
++
++};
++
++}; }; }; };
++
++#endif
+Index: source/deployment/manager/dp_manager.cxx
+===================================================================
+RCS file: /cvs/framework/desktop/source/deployment/manager/dp_manager.cxx,v
+retrieving revision 1.26
+diff -u -r1.26 dp_manager.cxx
+--- desktop/source/deployment/manager/dp_manager.cxx	26 Jul 2007 08:54:34 -0000	1.26
++++ desktop/source/deployment/manager/dp_manager.cxx	22 Nov 2007 14:45:05 -0000
+@@ -64,6 +64,7 @@
+ #include "com/sun/star/ucb/NameClash.hpp"
+ #include "com/sun/star/deployment/VersionException.hpp"
+ #include "com/sun/star/deployment/InstallException.hpp"
++#include "com/sun/star/deployment/LinkException.hpp"
+ #include "com/sun/star/task/XInteractionApprove.hpp"
+ #include "com/sun/star/ucb/UnsupportedCommandException.hpp"
+ #include "boost/bind.hpp"
+@@ -512,6 +513,40 @@
+     return mediaType;
+ }
+ 
++oslFileError dp_linkFile( rtl_uString* ustrFileURL, rtl_uString* ustrDestURL )
++{
++    oslFileError eRet = osl_File_E_invalidError;
++#ifdef UNX
++    OSL_ASSERT( ustrFileURL );
++    OSL_ASSERT( ustrDestURL );
++
++    /* convert source url to system path */
++    rtl::OUString aSrc;
++    eRet = osl_getSystemPathFromFileURL( ustrFileURL, &aSrc.pData );
++    if( eRet != osl_File_E_None )
++        return eRet;
++    rtl::OString aSrcPath = rtl::OUStringToOString( aSrc, osl_getThreadTextEncoding() );
++
++    /* convert destination url to system path */
++    rtl::OUString aDest;
++    osl_getSystemPathFromFileURL( ustrDestURL, &aDest.pData );
++    if( eRet != osl_File_E_None )
++        return eRet;
++    rtl::OString aDestPath = rtl::OUStringToOString( aDest, osl_getThreadTextEncoding() );
++
++    rtl::OString sName = aSrcPath;
++    sal_Int32 nEnd = sName.getLength()-1;
++    if (sName.pData->buffer[nEnd] == '/')
++        --nEnd;
++    sal_Int32 nStart = sName.lastIndexOf( '/', nEnd );
++    sName = sName.copy(nStart, nEnd - nStart + 1);
++
++    int nRet = symlink(aSrcPath.getStr(), (aDestPath + sName).getStr());
++    eRet = nRet != 0 ? osl_File_E_invalidError : osl_File_E_None;
++#endif
++    return eRet;
++}
++
+ //______________________________________________________________________________
+ OUString PackageManagerImpl::insertToActivationLayer(
+     OUString const & mediaType, ::ucbhelper::Content const & sourceContent_,
+@@ -536,11 +571,11 @@
+         destFolder = makeURL( m_activePackages, tempEntry );
+     }
+     destFolder += OUSTR("_");
+-    
++
+     // prepare activation folder:
+     ::ucbhelper::Content destFolderContent;
+     create_folder( &destFolderContent, destFolder, xCmdEnv );
+-    
++   
+     // copy content into activation temp dir:
+     if (mediaType.matchIgnoreAsciiCaseAsciiL(
+             RTL_CONSTASCII_STRINGPARAM(
+@@ -552,19 +587,49 @@
+     {
+         // inflate content:
+         ::rtl::OUStringBuffer buf;
+-        buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.zip://") );
+-        buf.append( ::rtl::Uri::encode( sourceContent.getURL(),
++        if (!sourceContent.isFolder())
++        {
++            buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.zip://") );
++            buf.append( ::rtl::Uri::encode( sourceContent.getURL(),
+                                         rtl_UriCharClassRegName,
+                                         rtl_UriEncodeIgnoreEscapes,
+                                         RTL_TEXTENCODING_UTF8 ) );
++        }
++        else
++            buf.append( sourceContent.getURL() );
++
+         buf.append( static_cast<sal_Unicode>('/') );
+-        sourceContent = ::ucbhelper::Content( 
+-            buf.makeStringAndClear(), xCmdEnv );
++         sourceContent = ::ucbhelper::Content( buf.makeStringAndClear(), xCmdEnv );
++    }
++
++    bool bLink = false;
++    Any request( (deployment::LinkException()) );
++    bool approve = false, abort = false;
++    interactContinuation( request, task::XInteractionApprove::static_type(),
++        xCmdEnv, &approve, &abort );
++
++    if (!abort && approve)
++        bLink = true;
++
++    if (bLink)
++    {
++        if (
++            (!sourceContent.isFolder()) || 
++            (osl_File_E_None != dp_linkFile(sourceContent.getURL().pData, destFolderContent.getURL().pData))
++           )
++        {
++            throw RuntimeException( OUSTR("dp_linkFile() failed!"), 0 );
++        }
++    }
++    else
++    {
++        if (! destFolderContent.transferContent(
++                sourceContent, ::ucbhelper::InsertOperation_COPY,
++                title, NameClash::OVERWRITE ))
++        {
++            throw RuntimeException( OUSTR("UCB transferContent() failed!"), 0 );
++        }
+     }
+-    if (! destFolderContent.transferContent(
+-            sourceContent, ::ucbhelper::InsertOperation_COPY,
+-            title, NameClash::OVERWRITE ))
+-        throw RuntimeException( OUSTR("UCB transferContent() failed!"), 0 );
+     
+     // write to DB:
+     dbData->temporaryName = tempEntry;
+Index: source/pkgchk/unopkg/unopkg_app.cxx
+===================================================================
+RCS file: /cvs/framework/desktop/source/pkgchk/unopkg/unopkg_app.cxx,v
+retrieving revision 1.6.84.1
+diff -u -r1.6.84.1 unopkg_app.cxx
+--- desktop/source/pkgchk/unopkg/unopkg_app.cxx	10 Aug 2007 15:03:53 -0000	1.6.84.1
++++ desktop/source/pkgchk/unopkg/unopkg_app.cxx	10 Aug 2007 15:03:53 -0000	1.6.84.1
+@@ -86,6 +86,9 @@
+ " -V, --version           version information\n"
+ " -v, --verbose           verbose output to stdout\n"
+ " -f, --force             force overwriting existing extensions\n"
++#ifdef UNX
++" -l, --link              attempt to link to instead of copying extensions\n"
++#endif
+ " --log-file <file>       custom log file; default: <cache-dir>/log.txt\n"
+ " --shared                expert feature: operate on shared installation\n"
+ "                                         deployment context;\n"
+@@ -103,6 +106,9 @@
+     { RTL_CONSTASCII_STRINGPARAM("version"), 'V', false },
+     { RTL_CONSTASCII_STRINGPARAM("verbose"), 'v', false },
+     { RTL_CONSTASCII_STRINGPARAM("force"), 'f', false },
++#ifdef UNX
++    { RTL_CONSTASCII_STRINGPARAM("link"), 'l', false },
++#endif
+     { RTL_CONSTASCII_STRINGPARAM("log-file"), '\0', true },
+     { RTL_CONSTASCII_STRINGPARAM("shared"), '\0', false },
+     { RTL_CONSTASCII_STRINGPARAM("deployment-context"), '\0', true },
+@@ -210,6 +216,7 @@
+     OUString subCommand;
+     bool option_shared = false;
+     bool option_force = false;
++    bool option_link = false;
+     bool option_verbose = false;
+     bool option_bundled = false;
+     bool subcmd_add = false;
+@@ -218,11 +225,13 @@
+     OUString deploymentContext;
+     OUString cmdArg;
+     ::std::vector<OUString> cmdPackages;
+-    
++
+     OptionInfo const * info_shared = getOptionInfo(
+         s_option_infos, OUSTR("shared") );
+     OptionInfo const * info_force = getOptionInfo(
+         s_option_infos, OUSTR("force") );
++    OptionInfo const * info_link = getOptionInfo(
++        s_option_infos, OUSTR("link") );
+     OptionInfo const * info_verbose = getOptionInfo(
+         s_option_infos, OUSTR("verbose") );
+     OptionInfo const * info_log = getOptionInfo(
+@@ -276,6 +285,7 @@
+                      !readOption( &option_shared, info_shared, &nPos ) &&
+                      !readOption( &option_force, info_force, &nPos ) &&
+                      !readOption( &option_bundled, info_bundled, &nPos ) &&
++                     !readOption( &option_link, info_link, &nPos ) &&
+                      !readArgument( &deploymentContext, info_context, &nPos ) &&
+                      !isBootstrapVariable(&nPos))
+             {
+@@ -346,7 +356,7 @@
+         
+         Reference< ::com::sun::star::ucb::XCommandEnvironment > xCmdEnv(
+             createCmdEnv( xComponentContext, logFile,
+-                          option_force, option_verbose, option_bundled) );
++                          option_force, option_link, option_verbose, option_bundled) );
+         
+         if (subcmd_add ||
+             subCommand.equalsAsciiL(
++++ openoffice.org/desktop/source/pkgchk/unopkg/unopkg_app.cxx	22 Nov 2007 14:46:24 -0000
+Index: source/pkgchk/unopkg/unopkg_cmdenv.cxx
+===================================================================
+RCS file: /cvs/framework/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx,v
+retrieving revision 1.8
+diff -u -r1.8 unopkg_cmdenv.cxx
+--- desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx	26 Jun 2007 11:13:26 -0000	1.8
++++ desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx	22 Nov 2007 14:46:24 -0000
+@@ -46,6 +46,7 @@
+ #include "com/sun/star/task/XInteractionAbort.hpp"
+ #include "com/sun/star/task/XInteractionApprove.hpp"
+ #include "com/sun/star/deployment/InstallException.hpp"
++#include "com/sun/star/deployment/LinkException.hpp"
+ #include "com/sun/star/container/ElementExistException.hpp"
+ #include "com/sun/star/deployment/LicenseException.hpp"
+ #include "com/sun/star/deployment/VersionException.hpp"
+@@ -98,6 +99,7 @@
+ {
+     sal_Int32 m_logLevel;
+     bool m_option_force_overwrite;
++    bool m_option_link;
+     bool m_option_verbose;
+     bool m_option_bundled;
+ 	Reference< XComponentContext > m_xComponentContext;
+@@ -112,6 +114,7 @@
+         Reference<XComponentContext> const & xComponentContext,
+         OUString const & log_file,
+         bool option_force_overwrite,
++        bool option_link,
+         bool option_verbose,
+         bool option_bundled);
+     
+@@ -137,10 +140,12 @@
+     Reference<XComponentContext> const & xComponentContext,
+     OUString const & log_file,
+     bool option_force_overwrite,
++    bool option_link,
+     bool option_verbose,
+     bool option_bundled)
+     : m_logLevel(0),
+       m_option_force_overwrite( option_force_overwrite ),
++      m_option_link( option_link ),
+       m_option_verbose( option_verbose ),
+       m_option_bundled( option_bundled),
+ 	  m_xComponentContext(xComponentContext)
+@@ -270,6 +275,7 @@
+     lang::WrappedTargetException wtExc;
+ 	deployment::LicenseException licExc;
+     deployment::InstallException instExc;
++    deployment::LinkException linkExc;
+     deployment::LicenseIndividualAgreementException licAgreementExc;
+     deployment::PlatformException platExc;
+     deployment::VersionException verExc;
+@@ -318,6 +324,10 @@
+         bLicenseException = true;
+         printLicense(licExc.Text, approve, abort);
+ 	}
++   	else if (request >>= linkExc)
++	{
++		approve = m_option_link;
++	}
+    	else if (request >>= instExc)
+ 	{
+ 		//Only if the unopgk was started with gui + extension then we user is asked.
+@@ -457,11 +467,12 @@
+     Reference< XComponentContext > const & xContext,
+     OUString const & logFile,
+     bool option_force_overwrite,
++    bool option_link,
+     bool option_verbose,
+     bool option_bundled)
+ {
+     return new CommandEnvironmentImpl(
+-        xContext, logFile, option_force_overwrite, option_verbose, option_bundled);
++        xContext, logFile, option_force_overwrite, option_link, option_verbose, option_bundled);
+ }
+ 
+ } // unopkg
+Index: source/pkgchk/unopkg/unopkg_shared.h
+===================================================================
+RCS file: /cvs/framework/desktop/source/pkgchk/unopkg/unopkg_shared.h,v
+retrieving revision 1.2.130.1
+diff -u -r1.2.130.1 unopkg_shared.h
+--- desktop/source/pkgchk/unopkg/unopkg_shared.h	10 Aug 2007 15:04:16 -0000	1.2.130.1
++++ desktop/source/pkgchk/unopkg/unopkg_shared.h	22 Nov 2007 14:46:24 -0000
+@@ -131,6 +131,7 @@
+     css::uno::Reference<css::uno::XComponentContext> const & xContext,
+     ::rtl::OUString const & logFile,
+     bool option_force_overwrite,
++    bool option_link,
+     bool option_verbose,
+     bool option_bundled);
+ 
diff --git a/patches/dev300/ooo83878.unopkg.enablelinking.diff b/patches/dev300/ooo83878.unopkg.enablelinking.diff
index fcc0402..b96ab66 100644
--- a/patches/dev300/ooo83878.unopkg.enablelinking.diff
+++ b/patches/dev300/ooo83878.unopkg.enablelinking.diff
@@ -152,23 +152,9 @@ diff -u -r1.26 dp_manager.cxx
      // copy content into activation temp dir:
      if (mediaType.matchIgnoreAsciiCaseAsciiL(
              RTL_CONSTASCII_STRINGPARAM(
-@@ -552,19 +587,49 @@
-     {
-         // inflate content:
-         ::rtl::OUStringBuffer buf;
--        buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.zip://") );
--        buf.append( ::rtl::Uri::encode( sourceContent.getURL(),
-+        if (!sourceContent.isFolder())
-+        {
-+            buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("vnd.sun.star.zip://") );
-+            buf.append( ::rtl::Uri::encode( sourceContent.getURL(),
-                                         rtl_UriCharClassRegName,
-                                         rtl_UriEncodeIgnoreEscapes,
-                                         RTL_TEXTENCODING_UTF8 ) );
-+        }
-+        else
-+            buf.append( sourceContent.getURL() );
-+
+@@ -552,13 +587,37 @@
+             buf.append(sourceContent.getURL());
+         }
          buf.append( static_cast<sal_Unicode>('/') );
 -        sourceContent = ::ucbhelper::Content( 
 -            buf.makeStringAndClear(), xCmdEnv );
@@ -218,9 +204,9 @@ diff -u -r1.6.84.1 unopkg_app.cxx
 --- desktop/source/pkgchk/unopkg/unopkg_app.cxx	10 Aug 2007 15:03:53 -0000	1.6.84.1
 +++ desktop/source/pkgchk/unopkg/unopkg_app.cxx	10 Aug 2007 15:03:53 -0000	1.6.84.1
 @@ -86,6 +86,9 @@
- " -V, --version           version information\n"
- " -v, --verbose           verbose output to stdout\n"
  " -f, --force             force overwriting existing extensions\n"
+ " -s, --suppress-license  prevents showing the license provided that\n"
+ "                         the extension allows it\n"
 +#ifdef UNX
 +" -l, --link              attempt to link to instead of copying extensions\n"
 +#endif
@@ -244,7 +230,7 @@ diff -u -r1.6.84.1 unopkg_app.cxx
 +    bool option_link = false;
      bool option_verbose = false;
      bool option_bundled = false;
-     bool subcmd_add = false;
+     bool option_suppressLicense = false;
 @@ -218,11 +225,13 @@
      OUString deploymentContext;
      OUString cmdArg;
@@ -261,19 +247,19 @@ diff -u -r1.6.84.1 unopkg_app.cxx
          s_option_infos, OUSTR("verbose") );
      OptionInfo const * info_log = getOptionInfo(
 @@ -276,6 +285,7 @@
-                      !readOption( &option_shared, info_shared, &nPos ) &&
                       !readOption( &option_force, info_force, &nPos ) &&
                       !readOption( &option_bundled, info_bundled, &nPos ) &&
+                      !readOption( &option_suppressLicense, info_suppressLicense, &nPos ) &&
 +                     !readOption( &option_link, info_link, &nPos ) &&
                       !readArgument( &deploymentContext, info_context, &nPos ) &&
                       !isBootstrapVariable(&nPos))
              {
 @@ -346,7 +356,7 @@
-         
          Reference< ::com::sun::star::ucb::XCommandEnvironment > xCmdEnv(
              createCmdEnv( xComponentContext, logFile,
--                          option_force, option_verbose, option_bundled) );
-+                          option_force, option_link, option_verbose, option_bundled) );
+                           option_force, option_verbose, option_bundled, 
+-                          option_suppressLicense) );
++                          option_suppressLicense, option_link) );
          
          if (subcmd_add ||
              subCommand.equalsAsciiL(
@@ -300,28 +286,29 @@ diff -u -r1.8 unopkg_cmdenv.cxx
 +    bool m_option_link;
      bool m_option_verbose;
      bool m_option_bundled;
- 	Reference< XComponentContext > m_xComponentContext;
+     bool m_option_suppressLicense;
 @@ -112,6 +114,7 @@
          Reference<XComponentContext> const & xComponentContext,
          OUString const & log_file,
          bool option_force_overwrite,
 +        bool option_link,
          bool option_verbose,
-         bool option_bundled);
-     
-@@ -137,10 +140,12 @@
+         bool option_bundled,
+         bool option_suppressLicense);
+@@ -137,11 +140,13 @@
      Reference<XComponentContext> const & xComponentContext,
      OUString const & log_file,
      bool option_force_overwrite,
 +    bool option_link,
      bool option_verbose,
-     bool option_bundled)
+     bool option_bundled,
+     bool option_suppressLicense)
      : m_logLevel(0),
        m_option_force_overwrite( option_force_overwrite ),
 +      m_option_link( option_link ),
        m_option_verbose( option_verbose ),
        m_option_bundled( option_bundled),
- 	  m_xComponentContext(xComponentContext)
+       m_option_suppressLicense( option_suppressLicense),
 @@ -270,6 +275,7 @@
      lang::WrappedTargetException wtExc;
  	deployment::LicenseException licExc;
@@ -331,8 +318,8 @@ diff -u -r1.8 unopkg_cmdenv.cxx
      deployment::PlatformException platExc;
      deployment::VersionException verExc;
 @@ -318,6 +324,10 @@
-         bLicenseException = true;
-         printLicense(licExc.Text, approve, abort);
+         else
+             printLicense(licExc.Text, approve, abort);
  	}
 +   	else if (request >>= linkExc)
 +	{
@@ -341,17 +328,19 @@ diff -u -r1.8 unopkg_cmdenv.cxx
     	else if (request >>= instExc)
  	{
  		//Only if the unopgk was started with gui + extension then we user is asked.
-@@ -457,11 +467,12 @@
+@@ -457,13 +467,14 @@
      Reference< XComponentContext > const & xContext,
      OUString const & logFile,
      bool option_force_overwrite,
 +    bool option_link,
      bool option_verbose,
-     bool option_bundled)
+     bool option_bundled,
+     bool option_suppressLicense)
  {
      return new CommandEnvironmentImpl(
--        xContext, logFile, option_force_overwrite, option_verbose, option_bundled);
-+        xContext, logFile, option_force_overwrite, option_link, option_verbose, option_bundled);
+         xContext, logFile, option_force_overwrite, option_verbose, option_bundled,
+-        option_suppressLicense);
++        option_suppressLicense, option_link);
  }
  
  } // unopkg
@@ -368,5 +357,31 @@ diff -u -r1.2.130.1 unopkg_shared.h
      bool option_force_overwrite,
 +    bool option_link,
      bool option_verbose,
-     bool option_bundled);
+     bool option_bundled,
+     bool option_suppressLicense);
+--- javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment.java	2010-02-11 13:42:37.000000000 +0000
++++ javaunohelper/com/sun/star/comp/juhtest/SmoketestCommandEnvironment.java	2010-02-22 15:43:34.000000000 +0000
+@@ -35,6 +35,7 @@
+ import com.sun.star.uno.XComponentContext;
+ import com.sun.star.lang.XServiceInfo;
+ import com.sun.star.ucb.XCommandEnvironment;
++import com.sun.star.uno.AnyConverter;
+ 
+ /** This service is for use by the smoketest which checks the installation of
+  * extensions. The service provides the XCommandEnvironment interface, which
+@@ -113,6 +114,15 @@
+ //                 approve = true;
+ //             }
  
++        try {
++            Object link_Exception =
++                AnyConverter.toObject(
++                    com.sun.star.deployment.LinkException.class, request);
++            if (link_Exception != null)
++                approve = false;
++        } catch( Exception e ) {
++        }
++
+         com.sun.star.task.XInteractionContinuation[] conts = xRequest.getContinuations();
+         for (int i = 0; i < conts.length; i++)
+         {
diff --git a/patches/vba/cws-vbasupportdev300.diff b/patches/vba/cws-vbasupportdev300.diff
index 71323d0..8775d05 100644
--- a/patches/vba/cws-vbasupportdev300.diff
+++ b/patches/vba/cws-vbasupportdev300.diff
@@ -7121,6 +7121,82 @@ diff --git forms/source/misc/InterfaceContainer.cxx forms/source/misc/InterfaceC
 index 5a82464..8722bff 100644
 --- forms/source/misc/InterfaceContainer.cxx
 +++ forms/source/misc/InterfaceContainer.cxx
+@@ -28,42 +28,49 @@
+ // MARKER(update_precomp.py): autogen include statement, do not remove
+ #include "precompiled_forms.hxx"
+ 
+-#include "frm_resource.hrc"
+-#include "frm_resource.hxx"
+-#include "InterfaceContainer.hxx"
+-#include "property.hrc"
+-#include "services.hxx"
+-
+-#include <com/sun/star/beans/XPropertySet.hpp>
+-#include <com/sun/star/container/XNamed.hpp>
+-#include <com/sun/star/io/WrongFormatException.hpp>
+-#include <com/sun/star/io/XMarkableStream.hpp>
+-#include <com/sun/star/lang/XComponent.hpp>
+-#include <com/sun/star/util/XCloneable.hpp>
+-
+-#include <comphelper/container.hxx>
+-#include <comphelper/enumhelper.hxx>
+-#include <comphelper/eventattachermgr.hxx>
+-#include <comphelper/property.hxx>
+-#include <comphelper/sequence.hxx>
+-#include <comphelper/types.hxx>
+-#include <cppuhelper/exc_hlp.hxx>
+-#include <cppuhelper/queryinterface.hxx>
+-#include <rtl/logfile.hxx>
+-#include <tools/debug.hxx>
+-#include <tools/diagnose_ex.h>
++#include "frm_resource.hrc"
++#include "frm_resource.hxx"
++#include "InterfaceContainer.hxx"
++#include "property.hrc"
++#include "services.hxx"
++
++#include <com/sun/star/beans/XPropertySet.hpp>
++#include <com/sun/star/container/XNamed.hpp>
++#include <com/sun/star/io/WrongFormatException.hpp>
++#include <com/sun/star/io/XMarkableStream.hpp>
++#include <com/sun/star/lang/XComponent.hpp>
++#include <com/sun/star/util/XCloneable.hpp>
++
++#include <comphelper/container.hxx>
++#include <comphelper/enumhelper.hxx>
++#include <comphelper/eventattachermgr.hxx>
++#include <comphelper/property.hxx>
++#include <comphelper/sequence.hxx>
++#include <comphelper/types.hxx>
++#include <cppuhelper/exc_hlp.hxx>
++#include <cppuhelper/queryinterface.hxx>
++#include <rtl/logfile.hxx>
++#include <tools/debug.hxx>
++#include <tools/diagnose_ex.h>
+ 
+-#include <algorithm>
+-#include <memory>
++#include <algorithm>
++#include <memory>
+ 
+ //.........................................................................
++#include <com/sun/star/frame/XModel.hpp>
++#include <com/sun/star/document/XCodeNameQuery.hpp>
++#include <ooo/vba/XVBAToOOEventDescGen.hpp>
++#include <comphelper/processfactory.hxx>
++
+ namespace frm
+ {
+ //.........................................................................
+ 
++using namespace ::com::sun::star::frame;
+ using namespace ::com::sun::star::lang;
+ using namespace ::com::sun::star::uno;
+ using namespace ::com::sun::star::beans;
++using namespace ::com::sun::star::document;
+ using namespace ::com::sun::star::container;
+ using namespace ::com::sun::star::script;
+ using namespace ::com::sun::star::io;
 @@ -79,6 +79,89 @@ namespace
  	}
  }


More information about the ooo-build-commit mailing list