summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/source/migration/migration.cxx129
-rw-r--r--desktop/source/migration/migration_impl.hxx38
-rwxr-xr-xdesktop/source/migration/services/cexportsoo3.cxx71
-rw-r--r--desktop/source/migration/services/makefile.mk48
-rwxr-xr-xdesktop/source/migration/services/migrationoo3.map8
-rwxr-xr-xdesktop/source/migration/services/oo3extensionmigration.cxx656
-rwxr-xr-xdesktop/source/migration/services/oo3extensionmigration.hxx171
-rw-r--r--officecfg/registry/data/org/openoffice/Setup.xcu422
-rw-r--r--officecfg/registry/schema/org/openoffice/Setup.xcs158
9 files changed, 1432 insertions, 269 deletions
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 250fe58841f8..d7043a5b1600 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -34,6 +34,7 @@
#include <unotools/textsearch.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/sequence.hxx>
#include <unotools/bootstrap.hxx>
#include <rtl/bootstrap.hxx>
#include <tools/config.hxx>
@@ -140,11 +141,11 @@ sal_Bool MigrationImpl::checkMigration()
MigrationImpl::MigrationImpl(const uno::Reference< XMultiServiceFactory >& xFactory)
: m_vrVersions(new strings_v)
, m_xFactory(xFactory)
- , m_vrMigrations(readMigrationSteps())
- , m_aInfo(findInstallation())
- , m_vrFileList(compileFileList())
- , m_vrServiceList(compileServiceList())
{
+ readAvailableMigrations(m_vMigrationsAvailable);
+ sal_Int32 nIndex = findPreferedMigrationProcess(m_vMigrationsAvailable);
+ if ( nIndex >= 0 )
+ m_vrMigrations = readMigrationSteps(m_vMigrationsAvailable[nIndex].name);
}
MigrationImpl::~MigrationImpl()
@@ -154,6 +155,10 @@ MigrationImpl::~MigrationImpl()
sal_Bool MigrationImpl::doMigration()
{
+ // compile file and service list for migration
+ m_vrFileList = compileFileList();
+ m_vrServiceList = compileServiceList();
+
sal_Bool result = sal_False;
try{
copyFiles();
@@ -218,20 +223,61 @@ sal_Bool MigrationImpl::checkMigrationCompleted()
return bMigrationCompleted;
}
-
-migrations_vr MigrationImpl::readMigrationSteps()
+static void insertSorted(migrations_available& rAvailableMigrations, supported_migration& aSupportedMigration)
{
+ bool bInserted( false );
+ migrations_available::iterator pIter = rAvailableMigrations.begin();
+ while ( !bInserted && pIter != rAvailableMigrations.end())
+ {
+ if ( pIter->nPriority < aSupportedMigration.nPriority )
+ {
+ rAvailableMigrations.insert(pIter, aSupportedMigration );
+ bInserted = true;
+ }
+ ++pIter;
+ }
+ if ( !bInserted )
+ rAvailableMigrations.push_back( aSupportedMigration );
+}
+bool MigrationImpl::readAvailableMigrations(migrations_available& rAvailableMigrations)
+{
// get supported version names
- uno::Reference< XNameAccess > aMigrationAccess(getConfigAccess("org.openoffice.Setup/Migration"), uno::UNO_QUERY_THROW);
- uno::Sequence< OUString > seqVersions;
- aMigrationAccess->getByName(OUString::createFromAscii("SupportedVersions")) >>= seqVersions;
- for (sal_Int32 i=0; i<seqVersions.getLength(); i++)
- m_vrVersions->push_back(seqVersions[i].trim());
+ uno::Reference< XNameAccess > aMigrationAccess(getConfigAccess("org.openoffice.Setup/Migration/SupportedVersions"), uno::UNO_QUERY_THROW);
+ uno::Sequence< OUString > seqSupportedVersions = aMigrationAccess->getElementNames();
+
+ const OUString aVersionIdentifiers( RTL_CONSTASCII_USTRINGPARAM( "VersionIdentifiers" ));
+ const OUString aPriorityIdentifier( RTL_CONSTASCII_USTRINGPARAM( "Priority" ));
+
+ for (sal_Int32 i=0; i<seqSupportedVersions.getLength(); i++)
+ {
+ sal_Int32 nPriority( 0 );
+ uno::Sequence< OUString > seqVersions;
+ uno::Reference< XNameAccess > xMigrationData( aMigrationAccess->getByName(seqSupportedVersions[i]), uno::UNO_QUERY_THROW );
+ xMigrationData->getByName( aVersionIdentifiers ) >>= seqVersions;
+ xMigrationData->getByName( aPriorityIdentifier ) >>= nPriority;
+
+ supported_migration aSupportedMigration;
+ aSupportedMigration.name = seqSupportedVersions[i];
+ aSupportedMigration.nPriority = nPriority;
+ for (sal_Int32 j=0; j<seqVersions.getLength(); j++)
+ aSupportedMigration.supported_versions.push_back(seqVersions[j].trim());
+ insertSorted( rAvailableMigrations, aSupportedMigration );
+ }
+
+ return true;
+}
+
+migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigrationName)
+{
+ // get migration access
+ uno::Reference< XNameAccess > aMigrationAccess(getConfigAccess("org.openoffice.Setup/Migration/SupportedVersions"), uno::UNO_QUERY_THROW);
+ uno::Reference< XNameAccess > xMigrationData( aMigrationAccess->getByName(rMigrationName), uno::UNO_QUERY_THROW );
// get migration description from from org.openoffice.Setup/Migration
// and build vector of migration steps
- uno::Reference< XNameAccess > theNameAccess(getConfigAccess("org.openoffice.Setup/Migration/MigrationSteps"), uno::UNO_QUERY_THROW);
+ OUString aMigrationSteps( RTL_CONSTASCII_USTRINGPARAM( "MigrationSteps" ));
+ uno::Reference< XNameAccess > theNameAccess(xMigrationData->getByName(aMigrationSteps), uno::UNO_QUERY_THROW);
uno::Sequence< OUString > seqMigrations = theNameAccess->getElementNames();
uno::Reference< XNameAccess > tmpAccess;
uno::Reference< XNameAccess > tmpAccess2;
@@ -273,6 +319,20 @@ migrations_vr MigrationImpl::readMigrationSteps()
tmpStep.excludeConfig.push_back(tmpSeq[j]);
}
+ // included extensions...
+ if (tmpAccess->getByName(OUString::createFromAscii("IncludedExtensions")) >>= tmpSeq)
+ {
+ for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
+ tmpStep.includeExtensions.push_back(tmpSeq[j]);
+ }
+
+ // excluded extensions...
+ if (tmpAccess->getByName(OUString::createFromAscii("ExcludedExtensions")) >>= tmpSeq)
+ {
+ for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
+ tmpStep.excludeExtensions.push_back(tmpSeq[j]);
+ }
+
// config components
if (tmpAccess->getByName(OUString::createFromAscii("ServiceConfigComponents")) >>= tmpSeq)
{
@@ -280,7 +340,6 @@ migrations_vr MigrationImpl::readMigrationSteps()
tmpStep.configComponents.push_back(tmpSeq[j]);
}
-
// generic service
tmpAccess->getByName(OUString::createFromAscii("MigrationService")) >>= tmpStep.service;
@@ -302,7 +361,7 @@ static FileBase::RC _checkAndCreateDirectory(INetURLObject& dirURL)
return result;
}
-install_info MigrationImpl::findInstallation()
+install_info MigrationImpl::findInstallation(const strings_v& rVersions)
{
rtl::OUString aProductName;
uno::Any aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTNAME );
@@ -310,9 +369,9 @@ install_info MigrationImpl::findInstallation()
aProductName = aProductName.toAsciiLowerCase();
install_info aInfo;
- strings_v::const_iterator i_ver = m_vrVersions->begin();
+ strings_v::const_iterator i_ver = rVersions.begin();
uno::Reference < util::XStringSubstitution > xSubst( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.PathSubstitution")), uno::UNO_QUERY );
- while (i_ver != m_vrVersions->end())
+ while (i_ver != rVersions.end())
{
::rtl::OUString aVersion, aProfileName;
sal_Int32 nSeparatorIndex = (*i_ver).indexOf('=');
@@ -351,6 +410,28 @@ install_info MigrationImpl::findInstallation()
return aInfo;
}
+sal_Int32 MigrationImpl::findPreferedMigrationProcess(const migrations_available& rAvailableMigrations)
+{
+ bool bFound( false );
+ sal_Int32 nIndex( -1 );
+ sal_Int32 i( 0 );
+
+ migrations_available::const_iterator rIter = rAvailableMigrations.begin();
+ while ( rIter != rAvailableMigrations.end() )
+ {
+ install_info aInstallInfo = findInstallation(rIter->supported_versions);
+ if (aInstallInfo.productname.getLength() > 0 )
+ {
+ m_aInfo = aInstallInfo;
+ nIndex = i;
+ break;
+ }
+ ++i;
+ }
+
+ return nIndex;
+}
+
strings_vr MigrationImpl::applyPatterns(const strings_v& vSet, const strings_v& vPatterns) const
{
using namespace utl;
@@ -517,8 +598,6 @@ void MigrationImpl::copyConfig()
aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
OSL_ENSURE(sal_False, aMsg.getStr());
}
-
-
}
// removes elements of vector 2 in vector 1
@@ -626,7 +705,6 @@ void MigrationImpl::copyFiles()
void MigrationImpl::runServices()
{
-
//create stratum for old user layer
OUString aOldLayerURL = m_aInfo.userdata;
aOldLayerURL += OUString::createFromAscii("/user/registry");
@@ -637,7 +715,7 @@ void MigrationImpl::runServices()
aStratumSvc, stratumArgs), uno::UNO_QUERY);
// Build argument array
- uno::Sequence< uno::Any > seqArguments(3);
+ uno::Sequence< uno::Any > seqArguments(4);
seqArguments[0] = uno::makeAny(NamedValue(
OUString::createFromAscii("Productname"),
uno::makeAny(m_aInfo.productname)));
@@ -673,11 +751,22 @@ void MigrationImpl::runServices()
i_comp++;
i++;
}
+
// set old config argument
seqArguments[2] = uno::makeAny(NamedValue(
OUString::createFromAscii("OldConfiguration"),
uno::makeAny(seqComponents)));
+ // set black list for extension migration
+ uno::Sequence< rtl::OUString > seqExtBlackList;
+ sal_uInt32 nSize = i_mig->excludeExtensions.size();
+ if ( nSize > 0 )
+ seqExtBlackList = comphelper::arrayToSequence< ::rtl::OUString >(
+ &i_mig->excludeExtensions[0], nSize );
+ seqArguments[3] = uno::makeAny(NamedValue(
+ OUString::createFromAscii("ExtensionBlackList"),
+ uno::makeAny( seqExtBlackList )));
+
xMigrationJob = uno::Reference< XJob >(m_xFactory->createInstanceWithArguments(
i_mig->service, seqArguments), uno::UNO_QUERY_THROW);
diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx
index 95b0c3535a80..b40de510261d 100644
--- a/desktop/source/migration/migration_impl.hxx
+++ b/desktop/source/migration/migration_impl.hxx
@@ -65,11 +65,21 @@ struct migration_step
strings_v includeConfig;
strings_v excludeConfig;
strings_v configComponents;
+ strings_v includeExtensions;
+ strings_v excludeExtensions;
rtl::OUString service;
};
+struct supported_migration
+{
+ rtl::OUString name;
+ sal_Int32 nPriority;
+ strings_v supported_versions;
+};
+
typedef std::vector< migration_step > migrations_v;
typedef std::auto_ptr< migrations_v > migrations_vr;
+typedef std::vector< supported_migration > migrations_available;
class MigrationImpl
{
@@ -77,18 +87,22 @@ class MigrationImpl
private:
strings_vr m_vrVersions;
NS_UNO::Reference< NS_CSS::lang::XMultiServiceFactory > m_xFactory;
- migrations_vr m_vrMigrations; // list of all migration specs from config
- install_info m_aInfo; // info about the version being migrated
- 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
-
- // initializer functions...
- migrations_vr readMigrationSteps();
- install_info findInstallation();
- strings_vr compileFileList();
- strings_vr compileConfigList();
- strings_vr compileServiceList();
+
+ migrations_available m_vMigrationsAvailable; // list of all available migrations
+ migrations_vr m_vrMigrations; // list of all migration specs from config
+ install_info m_aInfo; // info about the version being migrated
+ 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
+
+ // functions to control the migration process
+ bool readAvailableMigrations(migrations_available&);
+ migrations_vr readMigrationSteps(const ::rtl::OUString& rMigrationName);
+ sal_Int32 findPreferedMigrationProcess(const migrations_available&);
+ install_info findInstallation(const strings_v& rVersions);
+ strings_vr compileFileList();
+ strings_vr compileConfigList();
+ strings_vr compileServiceList();
// helpers
void substract(strings_v& va, const strings_v& vb_c) const;
diff --git a/desktop/source/migration/services/cexportsoo3.cxx b/desktop/source/migration/services/cexportsoo3.cxx
new file mode 100755
index 000000000000..20b8232044e9
--- /dev/null
+++ b/desktop/source/migration/services/cexportsoo3.cxx
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: cexports.cxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_desktop.hxx"
+
+#include "cppuhelper/implementationentry.hxx"
+#include "oo3extensionmigration.hxx"
+
+extern "C"
+{
+
+::cppu::ImplementationEntry entries [] =
+{
+ {
+ migration::OO3ExtensionMigration_create, migration::OO3ExtensionMigration_getImplementationName,
+ migration::OO3ExtensionMigration_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
+ { 0, 0, 0, 0, 0, 0 }
+};
+
+
+void SAL_CALL component_getImplementationEnvironment(
+ const sal_Char ** ppEnvTypeName, uno_Environment ** )
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
+sal_Bool SAL_CALL component_writeInfo(
+ void * pServiceManager, void * pRegistryKey )
+{
+ return ::cppu::component_writeInfoHelper(
+ pServiceManager, pRegistryKey, entries );
+}
+
+void * SAL_CALL component_getFactory(
+ const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
+{
+ return ::cppu::component_getFactoryHelper(
+ pImplName, pServiceManager, pRegistryKey, entries );
+}
+
+}
diff --git a/desktop/source/migration/services/makefile.mk b/desktop/source/migration/services/makefile.mk
index 323b823fe3b1..64adfe70b7b2 100644
--- a/desktop/source/migration/services/makefile.mk
+++ b/desktop/source/migration/services/makefile.mk
@@ -31,6 +31,7 @@ PRJNAME=desktop
TARGET = migrationoo2.uno
ENABLE_EXCEPTIONS=TRUE
COMP1TYPELIST = migrationoo2
+LIBTARGET=NO
# --- Settings -----------------------------------------------------
.INCLUDE : ..$/..$/deployment/inc/dp_misc.mk
@@ -50,7 +51,18 @@ SLOFILES= \
$(SLO)$/cexports.obj \
$(SLO)$/basicmigration.obj \
$(SLO)$/wordbookmigration.obj \
- $(SLO)$/extensionmigration.obj
+ $(SLO)$/extensionmigration.obj \
+ $(SLO)$/autocorrmigration.obj \
+ $(SLO)$/oo3extensionmigration.obj \
+ $(SLO)$/cexportsoo3.obj
+
+SHL1OBJS= \
+ $(SLO)$/jvmfwk.obj \
+ $(SLO)$/cexports.obj \
+ $(SLO)$/basicmigration.obj \
+ $(SLO)$/wordbookmigration.obj \
+ $(SLO)$/extensionmigration.obj \
+ $(SLO)$/autocorrmigration.obj
SHL1TARGET=$(TARGET)
SHL1VERSIONMAP = migrationoo2.map
@@ -67,16 +79,42 @@ SHL1STDLIBS= \
$(JVMFWKLIB) \
$(XMLSCRIPTLIB) \
$(BERKELEYLIB)
-
-
SHL1DEPN=
-SHL1IMPLIB=i$(TARGET)
-SHL1LIBS=$(SLB)$/$(TARGET).lib
+SHL1IMPLIB=imigrationoo2
+#SHL1LIBS=$(SLB)$/$(TARGET).lib
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
+COMP2TYPELIST = migrationoo3
+SHL2TARGET=migrationoo3.uno
+SHL2VERSIONMAP = migrationoo3.map
+
+SHL2OBJS= \
+ $(SLO)$/cexportsoo3.obj \
+ $(SLO)$/oo3extensionmigration.obj
+
+SHL2STDLIBS= \
+ $(DEPLOYMENTMISCLIB) \
+ $(CPPULIB) \
+ $(CPPUHELPERLIB) \
+ $(SALLIB) \
+ $(UCBHELPERLIB) \
+ $(UNOTOOLSLIB) \
+ $(TOOLSLIB) \
+ $(I18NISOLANGLIB) \
+ $(JVMFWKLIB) \
+ $(XMLSCRIPTLIB) \
+ $(BERKELEYLIB)
+
+SHL2DEPN=
+SHL2IMPLIB=imigrationoo3
+#SHL2LIBS=$(SLB)$/$(SHL2TARGET).lib
+SHL2DEF=$(MISC)$/$(SHL2TARGET).def
+
+DEF2NAME=$(SHL2TARGET)
+
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
diff --git a/desktop/source/migration/services/migrationoo3.map b/desktop/source/migration/services/migrationoo3.map
new file mode 100755
index 000000000000..ac2c3750bfe0
--- /dev/null
+++ b/desktop/source/migration/services/migrationoo3.map
@@ -0,0 +1,8 @@
+UDK_3_0_0 {
+ global:
+ component_getImplementationEnvironment;
+ component_writeInfo;
+ component_getFactory;
+ local:
+ *;
+};
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
new file mode 100755
index 000000000000..11bf8129cc04
--- /dev/null
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -0,0 +1,656 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: extensionmigration.cxx,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_desktop.hxx"
+
+#include "oo3extensionmigration.hxx"
+#include <rtl/instance.hxx>
+#include <osl/file.hxx>
+#include <osl/thread.h>
+#include <tools/urlobj.hxx>
+#include <unotools/bootstrap.hxx>
+#include <unotools/ucbstreamhelper.hxx>
+#include <unotools/textsearch.hxx>
+#include <comphelper/sequence.hxx>
+#include <comphelper/processfactory.hxx>
+#include <ucbhelper/content.hxx>
+
+#include <com/sun/star/deployment/thePackageManagerFactory.hpp>
+#include <com/sun/star/deployment/XPackageManagerFactory.hpp>
+#include <com/sun/star/task/XInteractionApprove.hpp>
+#include <com/sun/star/task/XInteractionAbort.hpp>
+#include <com/sun/star/ucb/XCommandInfo.hpp>
+#include <com/sun/star/ucb/TransferInfo.hpp>
+#include <com/sun/star/ucb/NameClash.hpp>
+#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#include <com/sun/star/xml/xpath/XXPathAPI.hpp>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+namespace migration
+{
+
+static ::rtl::OUString sExtensionSubDir = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/uno_packages/" ) );
+static ::rtl::OUString sSubDirName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "cache" ) );
+static ::rtl::OUString sConfigDir = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/registry/data" ) );
+static ::rtl::OUString sOrgDir = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/registry/data/org" ) );
+static ::rtl::OUString sExcludeDir1 = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/registry/data/org" ) );
+static ::rtl::OUString sExcludeDir2 = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/registry/data/org/openoffice" ) );
+static ::rtl::OUString sDescriptionXmlFile = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/description.xml" ) );
+static ::rtl::OUString sExtensionRootSubDirName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/uno_packages" ) );
+
+static ::rtl::OUString sConfigurationDataType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.star.configuration-data"));
+static ::rtl::OUString sConfigurationSchemaType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.star.configuration-schema"));
+
+// =============================================================================
+// component operations
+// =============================================================================
+
+::rtl::OUString OO3ExtensionMigration_getImplementationName()
+{
+ static ::rtl::OUString* pImplName = 0;
+ if ( !pImplName )
+ {
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ if ( !pImplName )
+ {
+ static ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.desktop.migration.OOo3Extensions" ) );
+ pImplName = &aImplName;
+ }
+ }
+ return *pImplName;
+}
+
+// -----------------------------------------------------------------------------
+
+Sequence< ::rtl::OUString > OO3ExtensionMigration_getSupportedServiceNames()
+{
+ static Sequence< ::rtl::OUString >* pNames = 0;
+ if ( !pNames )
+ {
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ if ( !pNames )
+ {
+ static Sequence< ::rtl::OUString > aNames(1);
+ aNames.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.migration.Extensions" ) );
+ pNames = &aNames;
+ }
+ }
+ return *pNames;
+}
+
+// =============================================================================
+// ExtensionMigration
+// =============================================================================
+
+OO3ExtensionMigration::OO3ExtensionMigration(Reference< XComponentContext > const & ctx) :
+m_ctx(ctx)
+{
+}
+
+// -----------------------------------------------------------------------------
+
+OO3ExtensionMigration::~OO3ExtensionMigration()
+{
+}
+
+::osl::FileBase::RC OO3ExtensionMigration::checkAndCreateDirectory( INetURLObject& rDirURL )
+{
+ ::osl::FileBase::RC aResult = ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
+ if ( aResult == ::osl::FileBase::E_NOENT )
+ {
+ INetURLObject aBaseURL( rDirURL );
+ aBaseURL.removeSegment();
+ checkAndCreateDirectory( aBaseURL );
+ return ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
+ }
+ else
+ {
+ return aResult;
+ }
+}
+
+void OO3ExtensionMigration::registerConfigurationPackage( const uno::Reference< deployment::XPackage > & xPkg)
+{
+ const ::rtl::OUString sMediaType = xPkg->getPackageType()->getMediaType();
+ if ( (sMediaType.equals(sConfigurationDataType) || sMediaType.equals(sConfigurationSchemaType) ) )
+ {
+ xPkg->revokePackage(uno::Reference< task::XAbortChannel >(), uno::Reference< ucb::XCommandEnvironment> ());
+ xPkg->registerPackage(uno::Reference< task::XAbortChannel >(), uno::Reference< ucb::XCommandEnvironment> ());
+ }
+}
+
+ void OO3ExtensionMigration::scanUserExtensions( const ::rtl::OUString& sSourceDir, TStringVector& aMigrateExtensions )
+{
+ osl::Directory aScanRootDir( sSourceDir );
+ osl::FileStatus fs(FileStatusMask_Type | FileStatusMask_FileURL);
+ osl::FileBase::RC nRetCode = aScanRootDir.open();
+ if ( nRetCode == osl::Directory::E_None )
+ {
+ sal_uInt32 nHint( 0 );
+ osl::DirectoryItem aItem;
+ while ( aScanRootDir.getNextItem( aItem, nHint ) == osl::Directory::E_None )
+ {
+ if (( aItem.getFileStatus(fs) == osl::FileBase::E_None ) &&
+ ( fs.getFileType() == osl::FileStatus::Directory ))
+ {
+ //Check next folder as the "real" extension folder is below a temp folder!
+ ::rtl::OUString sExtensionFolderURL = fs.getFileURL();
+
+ osl::DirectoryItem aExtDirItem;
+ osl::Directory aExtensionRootDir( sExtensionFolderURL );
+
+ nRetCode = aExtensionRootDir.open();
+ if (( nRetCode == osl::Directory::E_None ) &&
+ ( aExtensionRootDir.getNextItem( aExtDirItem, nHint ) == osl::Directory::E_None ))
+ {
+ bool bFileStatus = aExtDirItem.getFileStatus(fs) == osl::FileBase::E_None;
+ bool bIsDir = fs.getFileType() == osl::FileStatus::Directory;
+
+ if ( bFileStatus && bIsDir )
+ {
+ sExtensionFolderURL = fs.getFileURL();
+ ScanResult eResult = scanExtensionFolder( sExtensionFolderURL );
+ if ( eResult == SCANRESULT_MIGRATE_EXTENSION )
+ aMigrateExtensions.push_back( sExtensionFolderURL );
+ }
+ }
+ }
+ }
+ }
+}
+
+OO3ExtensionMigration::ScanResult OO3ExtensionMigration::scanExtensionFolder( const ::rtl::OUString& sExtFolder )
+{
+ ScanResult aResult = SCANRESULT_NOTFOUND;
+ osl::Directory aDir(sExtFolder);
+
+ // get sub dirs
+ if (aDir.open() == osl::FileBase::E_None)
+ {
+ // work through directory contents...
+ osl::DirectoryItem item;
+ osl::FileStatus fs(FileStatusMask_Type | FileStatusMask_FileURL);
+ TStringVector aDirectories;
+ while ((aDir.getNextItem(item) == osl::FileBase::E_None ) &&
+ ( aResult == SCANRESULT_NOTFOUND ))
+ {
+ if (item.getFileStatus(fs) == osl::FileBase::E_None)
+ {
+ ::rtl::OUString aDirEntryURL;
+ if (fs.getFileType() == osl::FileStatus::Directory)
+ aDirectories.push_back( fs.getFileURL() );
+ else
+ {
+ aDirEntryURL = fs.getFileURL();
+ if ( aDirEntryURL.indexOf( sDescriptionXmlFile ) > 0 )
+ aResult = scanDescriptionXml( aDirEntryURL ) ? SCANRESULT_MIGRATE_EXTENSION : SCANRESULT_DONTMIGRATE_EXTENSION;
+ }
+ }
+ }
+
+ TStringVector::const_iterator pIter = aDirectories.begin();
+ while ( pIter != aDirectories.end() && aResult == SCANRESULT_NOTFOUND )
+ {
+ aResult = scanExtensionFolder( *pIter );
+ ++pIter;
+ }
+ }
+ return aResult;
+}
+
+bool OO3ExtensionMigration::scanDescriptionXml( const ::rtl::OUString& sDescriptionXmlURL )
+{
+ if ( !m_xDocBuilder.is() )
+ {
+ m_xDocBuilder = uno::Reference< xml::dom::XDocumentBuilder >(
+ m_ctx->getServiceManager()->createInstanceWithContext(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.dom.DocumentBuilder")),
+ m_ctx ), uno::UNO_QUERY );
+ }
+
+ if ( !m_xSimpleFileAccess.is() )
+ {
+ m_xSimpleFileAccess = uno::Reference< ucb::XSimpleFileAccess >(
+ m_ctx->getServiceManager()->createInstanceWithContext(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")),
+ m_ctx ), uno::UNO_QUERY );
+ }
+
+ ::rtl::OUString aExtIdentifier;
+ if ( m_xDocBuilder.is() && m_xSimpleFileAccess.is() )
+ {
+ try
+ {
+ uno::Reference< io::XInputStream > xIn =
+ m_xSimpleFileAccess->openFileRead( sDescriptionXmlURL );
+
+ if ( xIn.is() )
+ {
+ uno::Reference< xml::dom::XDocument > xDoc = m_xDocBuilder->parse( xIn );
+ if ( xDoc.is() )
+ {
+ uno::Reference< xml::dom::XElement > xRoot = xDoc->getDocumentElement();
+ if ( xRoot.is() &&
+ xRoot->getTagName().equals(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("description"))) )
+ {
+ uno::Reference< xml::xpath::XXPathAPI > xPath(
+ m_ctx->getServiceManager()->createInstanceWithContext(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.xpath.XPathAPI")),
+ m_ctx),
+ uno::UNO_QUERY);
+
+ xPath->registerNS(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("desc")),
+ xRoot->getNamespaceURI());
+ xPath->registerNS(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("xlink")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http://www.w3.org/1999/xlink")));
+
+ try
+ {
+ uno::Reference< xml::dom::XNode > xRootNode( xRoot, uno::UNO_QUERY );
+ uno::Reference< xml::dom::XNode > xNode(
+ xPath->selectSingleNode(
+ xRootNode,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("desc:identifier/@value")) ));
+ if ( xNode.is() )
+ aExtIdentifier = xNode->getNodeValue();
+ }
+ catch ( xml::xpath::XPathException& )
+ {
+ }
+ catch ( xml::dom::DOMException& )
+ {
+ }
+ }
+ }
+ }
+
+ if ( aExtIdentifier.getLength() > 0 )
+ {
+ // scan extension identifier and try to match with our black list entries
+ for ( sal_uInt32 i = 0; i < m_aBlackList.size(); i++ )
+ {
+ utl::SearchParam param(m_aBlackList[i], utl::SearchParam::SRCH_REGEXP);
+ utl::TextSearch ts(param, LANGUAGE_DONTKNOW);
+
+ xub_StrLen start = 0;
+ xub_StrLen end = static_cast<USHORT>(aExtIdentifier.getLength());
+ if (ts.SearchFrwrd(aExtIdentifier, &start, &end))
+ return false;
+ }
+ }
+ }
+ catch ( ucb::CommandAbortedException& )
+ {
+ }
+ catch ( uno::RuntimeException& )
+ {
+ }
+
+ if ( aExtIdentifier.getLength() == 0 )
+ {
+ // Fallback:
+ // Try to use the folder name to match our black list
+ // as some extensions don't provide an identifier in the
+ // description.xml!
+ for ( sal_uInt32 i = 0; i < m_aBlackList.size(); i++ )
+ {
+ utl::SearchParam param(m_aBlackList[i], utl::SearchParam::SRCH_REGEXP);
+ utl::TextSearch ts(param, LANGUAGE_DONTKNOW);
+
+ xub_StrLen start = 0;
+ xub_StrLen end = static_cast<USHORT>(sDescriptionXmlURL.getLength());
+ if (ts.SearchFrwrd(sDescriptionXmlURL, &start, &end))
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+bool OO3ExtensionMigration::migrateExtension( const ::rtl::OUString& sSourceDir )
+{
+ if ( !m_xPackageManager.is() )
+ {
+ try
+ {
+ m_xPackageManager = deployment::thePackageManagerFactory::get( m_ctx )->getPackageManager(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "user" )) );
+ }
+ catch ( ucb::CommandFailedException & ){}
+ catch ( uno::RuntimeException & ) {}
+ }
+
+ if ( m_xPackageManager.is() )
+ {
+ try
+ {
+ TmpRepositoryCommandEnv* pCmdEnv = new TmpRepositoryCommandEnv();
+
+ uno::Reference< ucb::XCommandEnvironment > xCmdEnv(
+ static_cast< cppu::OWeakObject* >( pCmdEnv ), uno::UNO_QUERY );
+ uno::Reference< task::XAbortChannel > xAbortChannel;
+ uno::Reference< deployment::XPackage > xPackage =
+ m_xPackageManager->addPackage( sSourceDir, ::rtl::OUString(), xAbortChannel, xCmdEnv );
+
+ if ( xPackage.is() )
+ return true;
+ }
+ catch ( ucb::CommandFailedException& )
+ {
+ }
+ catch ( ucb::CommandAbortedException& )
+ {
+ }
+ catch ( lang::IllegalArgumentException& )
+ {
+ }
+ }
+
+ return false;
+}
+
+bool OO3ExtensionMigration::copy( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir )
+{
+ bool bRet = false;
+
+ INetURLObject aSourceObj( sSourceDir );
+ INetURLObject aDestObj( sTargetDir );
+ String aName = aDestObj.getName();
+ aDestObj.removeSegment();
+ aDestObj.setFinalSlash();
+
+ try
+ {
+ ::ucbhelper::Content aDestPath( aDestObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
+ uno::Reference< ucb::XCommandInfo > xInfo = aDestPath.getCommands();
+ ::rtl::OUString aTransferName = ::rtl::OUString::createFromAscii( "transfer" );
+ if ( xInfo->hasCommandByName( aTransferName ) )
+ {
+ aDestPath.executeCommand( aTransferName, uno::makeAny(
+ ucb::TransferInfo( sal_False, aSourceObj.GetMainURL( INetURLObject::NO_DECODE ), aName, ucb::NameClash::OVERWRITE ) ) );
+ bRet = true;
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+
+ return bRet;
+}
+
+
+// -----------------------------------------------------------------------------
+// XServiceInfo
+// -----------------------------------------------------------------------------
+
+::rtl::OUString OO3ExtensionMigration::getImplementationName() throw (RuntimeException)
+{
+ return OO3ExtensionMigration_getImplementationName();
+}
+
+// -----------------------------------------------------------------------------
+
+sal_Bool OO3ExtensionMigration::supportsService( const ::rtl::OUString& rServiceName ) throw (RuntimeException)
+{
+ Sequence< ::rtl::OUString > aNames( getSupportedServiceNames() );
+ const ::rtl::OUString* pNames = aNames.getConstArray();
+ const ::rtl::OUString* pEnd = pNames + aNames.getLength();
+ for ( ; pNames != pEnd && !pNames->equals( rServiceName ); ++pNames )
+ ;
+
+ return pNames != pEnd;
+}
+
+// -----------------------------------------------------------------------------
+
+Sequence< ::rtl::OUString > OO3ExtensionMigration::getSupportedServiceNames() throw (RuntimeException)
+{
+ return OO3ExtensionMigration_getSupportedServiceNames();
+}
+
+// -----------------------------------------------------------------------------
+// XInitialization
+// -----------------------------------------------------------------------------
+
+void OO3ExtensionMigration::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ const Any* pIter = aArguments.getConstArray();
+ const Any* pEnd = pIter + aArguments.getLength();
+ for ( ; pIter != pEnd ; ++pIter )
+ {
+ beans::NamedValue aValue;
+ *pIter >>= aValue;
+ if ( aValue.Name.equalsAscii( "UserData" ) )
+ {
+ if ( !(aValue.Value >>= m_sSourceDir) )
+ {
+ OSL_ENSURE( false, "ExtensionMigration::initialize: argument UserData has wrong type!" );
+ }
+ }
+ else if ( aValue.Name.equalsAscii( "ExtensionBlackList" ) )
+ {
+ Sequence< ::rtl::OUString > aBlackList;
+ if ( (aValue.Value >>= aBlackList ) && ( aBlackList.getLength() > 0 ))
+ {
+ m_aBlackList.resize( aBlackList.getLength() );
+ ::comphelper::sequenceToArray< ::rtl::OUString >( &m_aBlackList[0], aBlackList );
+ }
+ }
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+TStringVectorPtr getContent( const ::rtl::OUString& rBaseURL )
+{
+ TStringVectorPtr aResult( new TStringVector );
+ ::osl::Directory aDir( rBaseURL);
+ if ( aDir.open() == ::osl::FileBase::E_None )
+ {
+ // iterate over directory content
+ TStringVector aSubDirs;
+ ::osl::DirectoryItem aItem;
+ while ( aDir.getNextItem( aItem ) == ::osl::FileBase::E_None )
+ {
+ ::osl::FileStatus aFileStatus( FileStatusMask_Type | FileStatusMask_FileURL );
+ if ( aItem.getFileStatus( aFileStatus ) == ::osl::FileBase::E_None )
+ aResult->push_back( aFileStatus.getFileURL() );
+ }
+ }
+
+ return aResult;
+}
+
+// -----------------------------------------------------------------------------
+// XJob
+// -----------------------------------------------------------------------------
+
+void OO3ExtensionMigration::copyConfig( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir )
+{
+ ::rtl::OUString sEx1( m_sSourceDir );
+ sEx1 += sExcludeDir1;
+ ::rtl::OUString sEx2( m_sSourceDir );
+ sEx2 += sExcludeDir2;
+
+ TStringVectorPtr aList = getContent( sSourceDir );
+ TStringVector::const_iterator aI = aList->begin();
+ while ( aI != aList->end() )
+ {
+ ::rtl::OUString sSourceLocalName = aI->copy( sSourceDir.getLength() );
+ ::rtl::OUString aTemp = aI->copy( m_sSourceDir.getLength() );
+ if ( aTemp != sExcludeDir1 && aTemp != sExcludeDir2 )
+ {
+ ::rtl::OUString sTargetName = sTargetDir + sSourceLocalName;
+ copy( (*aI), sTargetName );
+ }
+ ++aI;
+ }
+}
+
+Any OO3ExtensionMigration::execute( const Sequence< beans::NamedValue >& )
+ throw (lang::IllegalArgumentException, Exception, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ::utl::Bootstrap::PathStatus aStatus = ::utl::Bootstrap::locateUserInstallation( m_sTargetDir );
+ if ( aStatus == ::utl::Bootstrap::PATH_EXISTS )
+ {
+ // copy all extensions
+ ::rtl::OUString sSourceDir( m_sSourceDir );
+ sSourceDir += sExtensionSubDir;
+ sSourceDir += sSubDirName;
+ sSourceDir += sExtensionRootSubDirName;
+ TStringVector aExtensionToMigrate;
+ scanUserExtensions( sSourceDir, aExtensionToMigrate );
+ if ( aExtensionToMigrate.size() > 0 )
+ {
+ TStringVector::iterator pIter = aExtensionToMigrate.begin();
+ while ( pIter != aExtensionToMigrate.end() )
+ {
+ migrateExtension( *pIter );
+ ++pIter;
+ }
+ }
+ }
+
+ return Any();
+}
+
+// -----------------------------------------------------------------------------
+// TmpRepositoryCommandEnv
+// -----------------------------------------------------------------------------
+
+TmpRepositoryCommandEnv::TmpRepositoryCommandEnv()
+{
+}
+
+TmpRepositoryCommandEnv::TmpRepositoryCommandEnv(
+ uno::Reference< task::XInteractionHandler> const & handler)
+ : m_forwardHandler(handler)
+{
+}
+
+TmpRepositoryCommandEnv::~TmpRepositoryCommandEnv()
+{
+}
+// XCommandEnvironment
+//______________________________________________________________________________
+uno::Reference< task::XInteractionHandler > TmpRepositoryCommandEnv::getInteractionHandler()
+throw ( uno::RuntimeException )
+{
+ return this;
+}
+
+//______________________________________________________________________________
+uno::Reference< ucb::XProgressHandler > TmpRepositoryCommandEnv::getProgressHandler()
+throw ( uno::RuntimeException )
+{
+ return this;
+}
+
+// XInteractionHandler
+void TmpRepositoryCommandEnv::handle(
+ uno::Reference< task::XInteractionRequest> const & xRequest )
+ throw ( uno::RuntimeException )
+{
+ uno::Any request( xRequest->getRequest() );
+ OSL_ASSERT( request.getValueTypeClass() == uno::TypeClass_EXCEPTION );
+
+ bool approve = true;
+ bool abort = false;
+
+ // select:
+ uno::Sequence< Reference< task::XInteractionContinuation > > conts(
+ xRequest->getContinuations() );
+ Reference< task::XInteractionContinuation > const * pConts =
+ conts.getConstArray();
+ sal_Int32 len = conts.getLength();
+ for ( sal_Int32 pos = 0; pos < len; ++pos )
+ {
+ if (approve) {
+ uno::Reference< task::XInteractionApprove > xInteractionApprove(
+ pConts[ pos ], uno::UNO_QUERY );
+ if (xInteractionApprove.is()) {
+ xInteractionApprove->select();
+ // don't query again for ongoing continuations:
+ approve = false;
+ }
+ }
+ else if (abort) {
+ uno::Reference< task::XInteractionAbort > xInteractionAbort(
+ pConts[ pos ], uno::UNO_QUERY );
+ if (xInteractionAbort.is()) {
+ xInteractionAbort->select();
+ // don't query again for ongoing continuations:
+ abort = false;
+ }
+ }
+ }
+}
+
+// XProgressHandler
+void TmpRepositoryCommandEnv::push( uno::Any const & /*Status*/ )
+throw (uno::RuntimeException)
+{
+}
+
+
+void TmpRepositoryCommandEnv::update( uno::Any const & /*Status */)
+throw (uno::RuntimeException)
+{
+}
+
+void TmpRepositoryCommandEnv::pop() throw (uno::RuntimeException)
+{
+}
+
+// =============================================================================
+// component operations
+// =============================================================================
+
+Reference< XInterface > SAL_CALL OO3ExtensionMigration_create(
+ Reference< XComponentContext > const & ctx )
+ SAL_THROW( () )
+{
+ return static_cast< lang::XTypeProvider * >( new OO3ExtensionMigration(
+ ctx) );
+}
+
+// -----------------------------------------------------------------------------
+
+} // namespace migration
diff --git a/desktop/source/migration/services/oo3extensionmigration.hxx b/desktop/source/migration/services/oo3extensionmigration.hxx
new file mode 100755
index 000000000000..a001f41d92c5
--- /dev/null
+++ b/desktop/source/migration/services/oo3extensionmigration.hxx
@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: extensionmigration.hxx,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DESKTOP_OO3EXTENSIONMIGRATION_HXX_
+#define _DESKTOP_OO3EXTENSIONMIGRATION_HXX_
+
+#include "misc.hxx"
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/task/XJob.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/xml/dom/XDocumentBuilder.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <com/sun/star/deployment/XPackageManager.hpp>
+
+#include <osl/mutex.hxx>
+#include <osl/file.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/compbase3.hxx>
+#include <ucbhelper/content.hxx>
+#include <xmlscript/xmllib_imexp.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace uno {
+ class XComponentContext;
+ }
+ namespace deployment {
+ class XPackage;
+ }
+}}}
+
+class INetURLObject;
+
+
+namespace migration
+{
+
+ ::rtl::OUString SAL_CALL OO3ExtensionMigration_getImplementationName();
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL OO3ExtensionMigration_getSupportedServiceNames();
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL OO3ExtensionMigration_create(
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext )
+ SAL_THROW( (::com::sun::star::uno::Exception) );
+
+
+ // =============================================================================
+ // class ExtensionMigration
+ // =============================================================================
+
+ typedef ::cppu::WeakImplHelper3<
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XInitialization,
+ ::com::sun::star::task::XJob > ExtensionMigration_BASE;
+
+ class OO3ExtensionMigration : public ExtensionMigration_BASE
+ {
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_ctx;
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::dom::XDocumentBuilder > m_xDocBuilder;
+ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > m_xSimpleFileAccess;
+ ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackageManager > m_xPackageManager;
+ ::osl::Mutex m_aMutex;
+ ::rtl::OUString m_sSourceDir;
+ ::rtl::OUString m_sTargetDir;
+ TStringVector m_aBlackList;
+
+ enum ScanResult
+ {
+ SCANRESULT_NOTFOUND,
+ SCANRESULT_MIGRATE_EXTENSION,
+ SCANRESULT_DONTMIGRATE_EXTENSION
+ };
+
+ ::osl::FileBase::RC checkAndCreateDirectory( INetURLObject& rDirURL );
+ void copyConfig( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir );
+ bool copy( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir );
+ ScanResult scanExtensionFolder( const ::rtl::OUString& sExtFolder );
+ void scanUserExtensions( const ::rtl::OUString& sSourceDir, TStringVector& aMigrateExtensions );
+ bool scanDescriptionXml( const ::rtl::OUString& sDescriptionXmlFilePath );
+ bool migrateExtension( const ::rtl::OUString& sSourceDir );
+ /* fills m_scriptElements and m_dialogElements
+ */
+ void registerConfigurationPackage(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > & xPkg);
+
+ public:
+ OO3ExtensionMigration(::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext > const & ctx);
+ virtual ~OO3ExtensionMigration();
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& rServiceName )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
+ throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+
+ // XJob
+ virtual ::com::sun::star::uno::Any SAL_CALL execute(
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Arguments )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::Exception,
+ ::com::sun::star::uno::RuntimeException);
+ };
+
+ class TmpRepositoryCommandEnv
+ : public ::cppu::WeakImplHelper3< ::com::sun::star::ucb::XCommandEnvironment,
+ ::com::sun::star::task::XInteractionHandler,
+ ::com::sun::star::ucb::XProgressHandler >
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler> m_forwardHandler;
+ public:
+ virtual ~TmpRepositoryCommandEnv();
+ TmpRepositoryCommandEnv();
+ TmpRepositoryCommandEnv(
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler> const & handler);
+
+ // XCommandEnvironment
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > SAL_CALL
+ getInteractionHandler() throw ( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XProgressHandler >
+ SAL_CALL getProgressHandler() throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XInteractionHandler
+ virtual void SAL_CALL handle(
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest > const & xRequest )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XProgressHandler
+ virtual void SAL_CALL push( ::com::sun::star::uno::Any const & Status )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL update( ::com::sun::star::uno::Any const & Status )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL pop() throw (::com::sun::star::uno::RuntimeException);
+ };
+
+//.........................................................................
+} // namespace migration
+//.........................................................................
+
+#endif // _DESKTOP_OO3EXTENSIONMIGRATION_HXX_
diff --git a/officecfg/registry/data/org/openoffice/Setup.xcu b/officecfg/registry/data/org/openoffice/Setup.xcu
index 40da9a062039..d13701b8202f 100644
--- a/officecfg/registry/data/org/openoffice/Setup.xcu
+++ b/officecfg/registry/data/org/openoffice/Setup.xcu
@@ -750,174 +750,274 @@
<value>true</value>
</prop>
</node>
- <node oor:name="Migration">
- <prop oor:name="SupportedVersions">
- <value oor:separator=",">OpenOffice.org 2=openoffice.org2,StarOffice 8=staroffice8,StarSuite 8=starsuite8</value>
+ <node oor:name="Migration">
+ <node oor:name="SupportedVersions">
+ <node oor:name="StarOffice9+StarSuite9" oor:op="replace">
+ <prop oor:name="Priority">
+ <value>100</value>
+ </prop>
+ <prop oor:name="VersionIdentifiers">
+ <value oor:separator=",">StarOffice 9=staroffice/9,StarSuite 9=starsuite/9</value>
</prop>
<node oor:name="MigrationSteps">
- <node oor:name="Datasources" oor:op="replace">
- <prop oor:name="IncludedFiles">
- <value>.*/database/biblio/biblio\.dbf</value>
- </prop>
- <prop oor:name="ExcludedFiles">
- </prop>
- <prop oor:name="IncludedNodes">
- <value>org.openoffice.Office.DataAccess</value>
- </prop>
- <prop oor:name="ExcludedNodes">
- <value>
- org.openoffice.Office.DataAccess/Bibliography
- org.openoffice.Office.DataAccess/ConnectionPool
- org.openoffice.Office.DataAccess/DataSources
- org.openoffice.Office.DataAccess/DriverManager
- </value>
- </prop>
- </node>
- <node oor:name="Deployment" oor:op="replace">
- <prop oor:name="MigrationService">
- <value>com.sun.star.migration.Extensions</value>
- </prop>
- </node>
- <node oor:name="Inet" oor:op="replace">
- <prop oor:name="IncludedNodes">
- <value>org.openoffice.Inet
- </value>
- </prop>
- </node>
- <node oor:name="Basic" oor:op="replace">
- <prop oor:name="MigrationService">
- <value>com.sun.star.migration.Basic</value>
- </prop>
- </node>
- <node oor:name="UserProfile" oor:op="replace">
- <prop oor:name="IncludedNodes">
- <value>org.openoffice.UserProfile</value>
- </prop>
- </node>
- <node oor:name="Common" oor:op="replace">
- <prop oor:name="IncludedFiles">
- <value>
- .*/autotext/.*
- .*/autocorr/.*
- .*/config/.*\.so[bcdegh]
- .*/config/soffice.cfg/modules/.*/toolbar/custom.*\.xml
- .*/config/soffice.cfg/modules/.*/images/.*
- .*/gallery/.*
- .*/template/.*
- </value>
- </prop>
- <prop oor:name="IncludedNodes">
- <value>
- org.openoffice.Office.Compatibility
- org.openoffice.Office.Custom
- org.openoffice.Office.Embedding
- org.openoffice.Office.Events
- org.openoffice.Office.ExtendedColorScheme
- org.openoffice.Office.Common/Accessibility
- org.openoffice.Office.Common/Accessibility/AutoDetectSystemHC
- org.openoffice.Office.Common/AsianLayout
- org.openoffice.Office.Common/AutoCorrect
- org.openoffice.Office.Common/Cache
- org.openoffice.Office.Common/DateFormat
- org.openoffice.Office.Common/ExternalMailer/Program
- org.openoffice.Office.Common/Filter
- org.openoffice.Office.Common/Font
- org.openoffice.Office.Common/Forms
- org.openoffice.Office.Common/Gallery
- org.openoffice.Office.Common/Help
- org.openoffice.Office.Common/History
- org.openoffice.Office.Common/I18N
- org.openoffice.Office.Common/InternalMSExport
- org.openoffice.Office.Common/Load
- org.openoffice.Office.Common/Misc/FormControlPilotsEnabled
- org.openoffice.Office.Common/Misc/PluginsEnabled
- org.openoffice.Office.Common/Misc/SymbolSet
- org.openoffice.Office.Common/Misc/UseSystemFileDialog
- org.openoffice.Office.Common/Misc/UseSystemPrintDialog
- org.openoffice.Office.Common/Misc/SymbolStyle
- org.openoffice.Office.Common/Passwords
- org.openoffice.Office.Common/Print/PrintingModifiesDocument
- org.openoffice.Office.Common/Print/Warning
- org.openoffice.Office.Common/Vectorize
- org.openoffice.Office.Common/Save
- org.openoffice.Office.Common/SearchOptions
- org.openoffice.Office.Common/Undo
- org.openoffice.Office.Common/View/Dialog/Dialog/MiddleMouseButton
- org.openoffice.Office.Common/View/Dialog/MousePositioning
- org.openoffice.Office.Common/View/Localization
- org.openoffice.Office.Common/View/Menu
- org.openoffice.Office.Common/_3D_Engine
- </value>
+ <node oor:name="Common" oor:op="replace">
+ <prop oor:name="IncludedFiles">
+ <value>
+ user/autocorr/.*
+ user/autotext/.*
+ user/backup/.*
+ user/basic/.*
+ user/config/.*\.so[bcdegh]
+ user/config/.*\.fmt
+ user/config/.*\.dat
+ user/config/javasettings_.*\.xml
+ user/config/soffice\.cfg/modules/[^/]*/toolbar/custom.*\.xml
+ user/config/soffice\.cfg/modules/[^/]*/images/.*
+ user/crashdata/.*
+ user/database/.*
+ user/gallery/.*
+ user/registry/.*
+ user/Scripts/.*
+ user/store/.*
+ user/template/.*
+ user/wordbook/.*
+ </value>
+ </prop>
+ </node>
+ <node oor:name="Extensions" oor:op="replace">
+ <prop oor:name="MigrationService">
+ <value>com.sun.star.comp.desktop.migration.OOo3Extensions</value>
+ </prop>
+ <prop oor:name="ExcludedExtensions">
+ <value>
+ com.sun.star.PDFImport.*
+ com.sun.star.PresentationMinimizer.*
+ com.sun.PresenterScreen.*
+ </value>
+ </prop>
+ </node>
+ </node>
+ </node>
+ <node oor:name="OpenOffice.org3" oor:op="replace">
+ <prop oor:name="Priority">
+ <value>90</value>
</prop>
- <prop oor:name="ExcludedNodes">
- <value>
- org.openoffice.Office.Common/_3D_Engine/OpenGL
- org.openoffice.Office.Common/Help/Registration
- </value>
- </prop>
- </node>
- <node oor:name="Calc" oor:op="replace">
- <prop oor:name="IncludedNodes">
- <value>org.openoffice.Office.Calc</value>
- </prop>
- </node>
- <node oor:name="Chart" oor:op="replace">
- <prop oor:name="IncludedNodes">
- <value>org.openoffice.Office.Chart</value>
- </prop>
- </node>
- <node oor:name="Draw" oor:op="replace">
- <prop oor:name="IncludedNodes">
- <value>org.openoffice.Office.Draw</value>
- </prop>
- </node>
- <node oor:name="Impress" oor:op="replace">
- <prop oor:name="IncludedNodes">
- <value>org.openoffice.Office.Impress</value>
- </prop>
- </node>
- <node oor:name="Labels" oor:op="replace">
- <prop oor:name="IncludedNodes">
- <value>org.openoffice.Office.Labels</value>
- </prop>
- </node>
- <node oor:name="Linguistic" oor:op="replace">
- <prop oor:name="MigrationService">
- <value>com.sun.star.migration.Wordbooks</value>
+ <prop oor:name="VersionIdentifiers">
+ <value oor:separator=",">OpenOffice.org 3=openoffice.org/3</value>
</prop>
- <prop oor:name="IncludedNodes">
- <value>org.openoffice.Office.Linguistic</value>
- </prop>
- <prop oor:name="ExcludedNodes">
- <value>org.openoffice.Office.Linguistic/ServiceManager</value>
+ <node oor:name="MigrationSteps">
+ <node oor:name="Common" oor:op="replace">
+ <prop oor:name="IncludedFiles">
+ <value>
+ user/autocorr/.*
+ user/autotext/.*
+ user/backup/.*
+ user/basic/.*
+ user/config/.*\.so[bcdegh]
+ user/config/.*\.fmt
+ user/config/.*\.dat
+ user/config/javasettings_.*\.xml
+ user/config/soffice\.cfg/modules/[^/]*/toolbar/custom.*\.xml
+ user/config/soffice\.cfg/modules/[^/]*/images/.*
+ user/crashdata/.*
+ user/database/.*
+ user/gallery/.*
+ user/registry/.*
+ user/Scripts/.*
+ user/store/.*
+ user/template/.*
+ user/wordbook/.*
+ </value>
+ </prop>
+ </node>
+ <node oor:name="Extensions" oor:op="replace">
+ <prop oor:name="MigrationService">
+ <value>com.sun.star.comp.desktop.migration.OOo3Extensions</value>
+ </prop>
+ <prop oor:name="ExcludedExtensions">
+ <value>
+ com.sun.star.PDFImport.*
+ com.sun.star.PresentationMinimizer.*
+ com.sun.PresenterScreen.*
+ </value>
+ </prop>
+ </node>
+ </node>
+ </node>
+ <node oor:name="OpenOffice.org2+StarOffice8+StarSuite8" oor:op="replace">
+ <prop oor:name="Priority">
+ <value>10</value>
</prop>
- </node>
- <node oor:name="Math" oor:op="replace">
- <prop oor:name="IncludedNodes">
- <value>org.openoffice.Office.Math</value>
- </prop>
- </node>
- <node oor:name="Security" oor:op="replace">
- <prop oor:name="IncludedNodes">
- <value>org.openoffice.Office.Security</value>
- </prop>
- </node>
- <node oor:name="UI" oor:op="replace">
- <prop oor:name="IncludedNodes">
- <value>org.openoffice.Office.UI/ColorScheme</value>
- </prop>
- </node>
- <node oor:name="Writer" oor:op="replace">
- <prop oor:name="IncludedNodes">
- <value>
- org.openoffice.Office.Writer
- org.openoffice.Office.WriterWeb
- </value>
- </prop>
- <prop oor:name="ExcludedNodes">
- <value>org.openoffice.Office.Writer/Wizard</value>
+ <prop oor:name="VersionIdentifiers">
+ <value oor:separator=",">OpenOffice.org 2=openoffice.org2,StarOffice 8=staroffice8,StarSuite 8=starsuite8</value>
</prop>
+ <node oor:name="MigrationSteps">
+ <node oor:name="Datasources" oor:op="replace">
+ <prop oor:name="IncludedFiles">
+ <value>.*/database/biblio/biblio\.dbf</value>
+ </prop>
+ <prop oor:name="ExcludedFiles">
+ </prop>
+ <prop oor:name="IncludedNodes">
+ <value>org.openoffice.Office.DataAccess</value>
+ </prop>
+ <prop oor:name="ExcludedNodes">
+ <value>
+ org.openoffice.Office.DataAccess/Bibliography
+ org.openoffice.Office.DataAccess/ConnectionPool
+ org.openoffice.Office.DataAccess/DataSources
+ org.openoffice.Office.DataAccess/DriverManager
+ </value>
+ </prop>
+ </node>
+ <node oor:name="Deployment" oor:op="replace">
+ <prop oor:name="MigrationService">
+ <value>com.sun.star.migration.Extensions</value>
+ </prop>
+ </node>
+ <node oor:name="Inet" oor:op="replace">
+ <prop oor:name="IncludedNodes">
+ <value>
+ org.openoffice.Inet
+ </value>
+ </prop>
+ </node>
+ <node oor:name="Basic" oor:op="replace">
+ <prop oor:name="MigrationService">
+ <value>com.sun.star.migration.Basic</value>
+ </prop>
+ </node>
+ <node oor:name="UserProfile" oor:op="replace">
+ <prop oor:name="IncludedNodes">
+ <value>org.openoffice.UserProfile</value>
+ </prop>
+ </node>
+ <node oor:name="Common" oor:op="replace">
+ <prop oor:name="IncludedFiles">
+ <value>
+ .*/autotext/.*
+ .*/autocorr/.*
+ .*/config/.*\.so[bcdegh]
+ .*/config/soffice.cfg/modules/.*/toolbar/custom.*\.xml
+ .*/config/soffice.cfg/modules/.*/images/.*
+ .*/gallery/.*
+ .*/template/.*
+ </value>
+ </prop>
+ <prop oor:name="IncludedNodes">
+ <value>
+ org.openoffice.Office.Compatibility
+ org.openoffice.Office.Custom
+ org.openoffice.Office.Embedding
+ org.openoffice.Office.Events
+ org.openoffice.Office.ExtendedColorScheme
+ org.openoffice.Office.Common/Accessibility
+ org.openoffice.Office.Common/Accessibility/AutoDetectSystemHC
+ org.openoffice.Office.Common/AsianLayout
+ org.openoffice.Office.Common/AutoCorrect
+ org.openoffice.Office.Common/Cache
+ org.openoffice.Office.Common/DateFormat
+ org.openoffice.Office.Common/ExternalMailer/Program
+ org.openoffice.Office.Common/Filter
+ org.openoffice.Office.Common/Font
+ org.openoffice.Office.Common/Forms
+ org.openoffice.Office.Common/Gallery
+ org.openoffice.Office.Common/Help
+ org.openoffice.Office.Common/History
+ org.openoffice.Office.Common/I18N
+ org.openoffice.Office.Common/InternalMSExport
+ org.openoffice.Office.Common/Load
+ org.openoffice.Office.Common/Misc/FormControlPilotsEnabled
+ org.openoffice.Office.Common/Misc/PluginsEnabled
+ org.openoffice.Office.Common/Misc/SymbolSet
+ org.openoffice.Office.Common/Misc/UseSystemFileDialog
+ org.openoffice.Office.Common/Misc/UseSystemPrintDialog
+ org.openoffice.Office.Common/Misc/SymbolStyle
+ org.openoffice.Office.Common/Passwords
+ org.openoffice.Office.Common/Print/PrintingModifiesDocument
+ org.openoffice.Office.Common/Print/Warning
+ org.openoffice.Office.Common/Vectorize
+ org.openoffice.Office.Common/Save
+ org.openoffice.Office.Common/SearchOptions
+ org.openoffice.Office.Common/Undo
+ org.openoffice.Office.Common/View/Dialog/Dialog/MiddleMouseButton
+ org.openoffice.Office.Common/View/Dialog/MousePositioning
+ org.openoffice.Office.Common/View/Localization
+ org.openoffice.Office.Common/View/Menu
+ org.openoffice.Office.Common/_3D_Engine
+ </value>
+ </prop>
+ <prop oor:name="ExcludedNodes">
+ <value>
+ org.openoffice.Office.Common/_3D_Engine/OpenGL
+ org.openoffice.Office.Common/Help/Registration
+ </value>
+ </prop>
+ </node>
+ <node oor:name="Calc" oor:op="replace">
+ <prop oor:name="IncludedNodes">
+ <value>org.openoffice.Office.Calc</value>
+ </prop>
+ </node>
+ <node oor:name="Chart" oor:op="replace">
+ <prop oor:name="IncludedNodes">
+ <value>org.openoffice.Office.Chart</value>
+ </prop>
+ </node>
+ <node oor:name="Draw" oor:op="replace">
+ <prop oor:name="IncludedNodes">
+ <value>org.openoffice.Office.Draw</value>
+ </prop>
+ </node>
+ <node oor:name="Impress" oor:op="replace">
+ <prop oor:name="IncludedNodes">
+ <value>org.openoffice.Office.Impress</value>
+ </prop>
+ </node>
+ <node oor:name="Labels" oor:op="replace">
+ <prop oor:name="IncludedNodes">
+ <value>org.openoffice.Office.Labels</value>
+ </prop>
+ </node>
+ <node oor:name="Linguistic" oor:op="replace">
+ <prop oor:name="MigrationService">
+ <value>com.sun.star.migration.Wordbooks</value>
+ </prop>
+ <prop oor:name="IncludedNodes">
+ <value>org.openoffice.Office.Linguistic</value>
+ </prop>
+ <prop oor:name="ExcludedNodes">
+ <value>org.openoffice.Office.Linguistic/ServiceManager</value>
+ </prop>
+ </node>
+ <node oor:name="Math" oor:op="replace">
+ <prop oor:name="IncludedNodes">
+ <value>org.openoffice.Office.Math</value>
+ </prop>
+ </node>
+ <node oor:name="Security" oor:op="replace">
+ <prop oor:name="IncludedNodes">
+ <value>org.openoffice.Office.Security</value>
+ </prop>
+ </node>
+ <node oor:name="UI" oor:op="replace">
+ <prop oor:name="IncludedNodes">
+ <value>org.openoffice.Office.UI/ColorScheme</value>
+ </prop>
+ </node>
+ <node oor:name="Writer" oor:op="replace">
+ <prop oor:name="IncludedNodes">
+ <value>
+ org.openoffice.Office.Writer
+ org.openoffice.Office.WriterWeb
+ </value>
+ </prop>
+ <prop oor:name="ExcludedNodes">
+ <value>org.openoffice.Office.Writer/Wizard</value>
+ </prop>
</node>
</node>
+ </node>
+ </node>
</node>
</oor:component-data>
diff --git a/officecfg/registry/schema/org/openoffice/Setup.xcs b/officecfg/registry/schema/org/openoffice/Setup.xcs
index 9e5551bda18a..de8a64e2b0d8 100644
--- a/officecfg/registry/schema/org/openoffice/Setup.xcs
+++ b/officecfg/registry/schema/org/openoffice/Setup.xcs
@@ -34,61 +34,86 @@
<templates>
<group oor:name="InstalledLocale">
<info>
- <author>JB</author>
+ <author>JB</author>
<desc>Describes a language pack that is installed to provide a localized office UI.</desc>
</info>
<prop oor:name="Origin" oor:type="xs:string">
- <info>
- <author>JB</author>
- <desc>Identifies the organization, group or person that provided this language pack.</desc>
- </info>
+ <info>
+ <author>JB</author>
+ <desc>Identifies the organization, group or person that provided this language pack.</desc>
+ </info>
</prop>
</group>
- <group oor:name="MigrationStep">
+ <group oor:name="MigrationStep">
+ <info>
+ <desc>Describes one step of migration</desc>
+ </info>
+ <prop oor:name="MigrationService" oor:type="xs:string">
+ <info>
+ <desc>an optional uno service that is called after files and nodes have been copied in order to perform custom migration actions. The service needs to support XInitializable and XJob interfaces according do http://specs.openoffice.org/appwide/migration/spec_migration.sxw</desc>
+ </info>
+ </prop>
+ <prop oor:name="ServiceConfigComponents" oor:type="oor:string-list">
+ <info>
+ <desc>a list of config components that are to be passed to service</desc>
+ </info>
+ </prop>
+ <prop oor:name="IncludedFiles" oor:type="oor:string-list">
+ <info>
+ <desc>a list of wildcards relative to the old userdata origin that are to be copied</desc>
+ </info>
+ </prop>
+ <prop oor:name="ExcludedFiles" oor:type="oor:string-list">
+ <info>
+ <desc>a list of wildcards relative to the old userdata origin that are to be copied</desc>
+ </info>
+ </prop>
+ <prop oor:name="IncludedNodes" oor:type="oor:string-list">
+ <info>
+ <desc>a list of configuration node paths that are to be moved from the old user layer to the new user layer</desc>
+ </info>
+ </prop>
+ <prop oor:name="ExcludedNodes" oor:type="oor:string-list">
+ <info>
+ <desc>a list of configuration node paths that are not to be moved from the old user layer to the new user layer</desc>
+ </info>
+ </prop>
+ <prop oor:name="IncludedExtensions" oor:type="oor:string-list">
+ <info>
+ <desc>a list of extension identifiers that are to be copied from the old user layer to the new user layer</desc>
+ </info>
+ </prop>
+ <prop oor:name="ExcludedExtensions" oor:type="oor:string-list">
+ <info>
+ <desc>a list of extension identifiers that are not to be copied from the old user layer to the new user layer</desc>
+ </info>
+ </prop>
+ </group>
+ <group oor:name="MigrateVersion">
+ <info>
+ <desc>Describes migration steps specific for certain version(s)</desc>
+ </info>
+ <prop oor:name="VersionIdentifiers" oor:type="oor:string-list">
+ <info>
+ <desc>version identifiers, that are supported for migration</desc>
+ </info>
+ <value/>
+ </prop>
+ <prop oor:name="Priority" oor:type="xs:int">
+ <info>
+ <desc>Contains the priority value to specify which migration should be prefered. Higher values are prefered.</desc>
+ </info>
+ <value/>
+ </prop>
+ <set oor:name="MigrationSteps" oor:node-type="MigrationStep">
+ <info>
+ <desc>Contains necessary migration steps for specific versions</desc>
+ </info>
+ </set>
+ </group>
+ <group oor:name="Factory">
<info>
- <author>LO</author>
- <desc>Describes one step of migration</desc>
- </info>
- <prop oor:name="MigrationService" oor:type="xs:string">
- <info>
- <author>LO</author>
- <desc>an optional uno service that is called after files and nodes have been copied in order to perform custom migration actions. The service needs to support XInitializable and XJob interfaces according do http://specs.openoffice.org/appwide/migration/spec_migration.sxw</desc>
- </info>
- </prop>
- <prop oor:name="ServiceConfigComponents" oor:type="oor:string-list">
- <info>
- <author>LO</author>
- <desc>a list of config components that are to be passed to service</desc>
- </info>
- </prop>
- <prop oor:name="IncludedFiles" oor:type="oor:string-list">
- <info>
- <author>LO</author>
- <desc>a list of wildcards relative to the old userdata origin that are to be copied</desc>
- </info>
- </prop>
- <prop oor:name="ExcludedFiles" oor:type="oor:string-list">
- <info>
- <author>LO</author>
- <desc>a list of wildcards relative to the old userdata origin that are to be copied</desc>
- </info>
- </prop>
- <prop oor:name="IncludedNodes" oor:type="oor:string-list">
- <info>
- <author>LO</author>
- <desc>a list of configuration node paths that are to be moved from the old user layer to the new user layer</desc>
- </info>
- </prop>
- <prop oor:name="ExcludedNodes" oor:type="oor:string-list">
- <info>
- <author>LO</author>
- <desc>a list of configuration node paths that are not to be moved from the old user layer to the new user layer</desc>
- </info>
- </prop>
- </group>
- <group oor:name="Factory">
- <info>
- <author>AS</author>
+ <author>AS</author>
<desc>Describes an application module (a document factory, such as Writer).</desc>
</info>
<prop oor:name="ooSetupFactoryActualFilter" oor:type="xs:string">
@@ -416,30 +441,21 @@
</info>
<prop oor:name="TransferUserSettingsOnce" oor:type="xs:boolean" oor:nillable="false">
<info>
- <deprecated>This feature is not supported any more since OOo 2.0</deprecated>
+ <deprecated>This feature is not supported any more since OOo 2.0</deprecated>
<author>JB</author>
- <desc>Deprecated</desc>
- </info>
- </prop>
- </group>
- <group oor:name="Migration">
- <info>
- <author>LO</author>
- <desc>Contains settings that control configuration data access.</desc>
- </info>
- <set oor:name="MigrationSteps" oor:node-type="MigrationStep">
- <info>
- <author>LO</author>
- <desc>The enumeration of migration steps that are to be applied on first start</desc>
- </info>
- </set>
- <prop oor:name="SupportedVersions" oor:type="oor:string-list">
- <info>
- <author>LO</author>
- <desc>version identifiers, that are supported for migration</desc>
+ <desc>Deprecated</desc>
</info>
- <value/>
</prop>
</group>
- </component>
+ <group oor:name="Migration">
+ <info>
+ <desc>Contains settings that control the migration process for certain versions.</desc>
+ </info>
+ <set oor:name="SupportedVersions" oor:node-type="MigrateVersion">
+ <info>
+ <desc>Define migration steps for supported versions</desc>
+ </info>
+ </set>
+ </group>
+ </component>
</oor:component-schema>