Kaydet (Commit) 8f9af2d0 authored tarafından Oliver-Rainer Wittmann's avatar Oliver-Rainer Wittmann

122397: activate migration of AOO 3.4.x/OOo 3.x user profiles (incl. migration…

122397: activate migration of AOO 3.4.x/OOo 3.x user profiles (incl. migration of wordbooks, basic macros and user-installed extensions)
üst ce829e86
...@@ -5,7 +5,7 @@ dt desktop\prj get - all dt_prj NULL ...@@ -5,7 +5,7 @@ dt desktop\prj get - all dt_prj NULL
dt desktop\res get - all dt_res NULL dt desktop\res get - all dt_res NULL
dt desktop\source\app nmake - all dt_app dt_migr dt_inc dt_dp_misc dt_dp_gui NULL dt desktop\source\app nmake - all dt_app dt_migr dt_inc dt_dp_misc dt_dp_gui NULL
dt desktop\source\migration nmake - all dt_migr dt_inc NULL dt desktop\source\migration nmake - all dt_migr dt_inc NULL
dt desktop\source\migration\services nmake - all dt_services dt_inc dt_dp_misc NULL dt desktop\source\migration\services nmake - all dt_services dt_inc dt_dp_misc dt_dp_gui NULL
dt desktop\source\so_comp nmake - all dt_so_comp dt_inc NULL dt desktop\source\so_comp nmake - all dt_so_comp dt_inc NULL
dt desktop\source\offacc nmake - all dt_offac dt_inc NULL dt desktop\source\offacc nmake - all dt_offac dt_inc NULL
dt desktop\source\splash nmake - all dt_spl dt_migr dt_inc NULL dt desktop\source\splash nmake - all dt_spl dt_migr dt_inc NULL
......
...@@ -143,7 +143,6 @@ mkdir: %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office\Jobs ...@@ -143,7 +143,6 @@ mkdir: %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office\Jobs
..\%__SRC%\misc\deployment.component %_DEST%\xml%_EXT%\deployment.component ..\%__SRC%\misc\deployment.component %_DEST%\xml%_EXT%\deployment.component
..\%__SRC%\misc\deploymentgui.component %_DEST%\xml%_EXT%\deploymentgui.component ..\%__SRC%\misc\deploymentgui.component %_DEST%\xml%_EXT%\deploymentgui.component
..\%__SRC%\misc\migrationoo2.component %_DEST%\xml%_EXT%\migrationoo2.component ..\%__SRC%\misc\migrationoo2.component %_DEST%\xml%_EXT%\migrationoo2.component
..\%__SRC%\misc\migrationoo3.component %_DEST%\xml%_EXT%\migrationoo3.component
..\%__SRC%\misc\offacc.component %_DEST%\xml%_EXT%\offacc.component ..\%__SRC%\misc\offacc.component %_DEST%\xml%_EXT%\offacc.component
..\%__SRC%\misc\socomp.component %_DEST%\xml%_EXT%\socomp.component ..\%__SRC%\misc\socomp.component %_DEST%\xml%_EXT%\socomp.component
..\%__SRC%\misc\spl.component %_DEST%\xml%_EXT%\spl.component ..\%__SRC%\misc\spl.component %_DEST%\xml%_EXT%\spl.component
...@@ -768,26 +768,35 @@ void MigrationImpl::copyConfig() { ...@@ -768,26 +768,35 @@ void MigrationImpl::copyConfig() {
for (Components::const_iterator i(comps.begin()); i != comps.end(); ++i) { for (Components::const_iterator i(comps.begin()); i != comps.end(); ++i) {
if (!i->second.includedPaths.empty()) { if (!i->second.includedPaths.empty()) {
rtl::OUStringBuffer buf(m_aInfo.userdata); rtl::OUStringBuffer buf(m_aInfo.userdata);
buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("/user/registry/data")); if ( m_aInfo.productname.equals( OUString::createFromAscii("OpenOffice.org 3") ) )
sal_Int32 n = 0; {
do { // OpenOffice.org 3 configuration file
rtl::OUString seg(i->first.getToken(0, '.', n)); buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("/user/registrymodifications.xcu"));
rtl::OUString enc( }
rtl::Uri::encode( else
seg, rtl_UriCharClassPchar, rtl_UriEncodeStrict, {
RTL_TEXTENCODING_UTF8)); // OpenOffice.org 2 configuration files
if (enc.getLength() == 0 && seg.getLength() != 0) { buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("/user/registry/data"));
OSL_TRACE( sal_Int32 n = 0;
("configuration migration component %s ignored (cannot" do {
" be encoded as file path)"), rtl::OUString seg(i->first.getToken(0, '.', n));
rtl::OUStringToOString( rtl::OUString enc(
i->first, RTL_TEXTENCODING_UTF8).getStr()); rtl::Uri::encode(
goto next; seg, rtl_UriCharClassPchar, rtl_UriEncodeStrict,
} RTL_TEXTENCODING_UTF8));
buf.append(sal_Unicode('/')); if (enc.getLength() == 0 && seg.getLength() != 0) {
buf.append(enc); OSL_TRACE(
} while (n >= 0); ("configuration migration component %s ignored (cannot"
buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(".xcu")); " be encoded as file path)"),
rtl::OUStringToOString(
i->first, RTL_TEXTENCODING_UTF8).getStr());
goto next;
}
buf.append(sal_Unicode('/'));
buf.append(enc);
} while (n >= 0);
buf.appendAscii(RTL_CONSTASCII_STRINGPARAM(".xcu"));
}
configuration::Update::get( configuration::Update::get(
comphelper::getProcessComponentContext())-> comphelper::getProcessComponentContext())->
insertModificationXcuFile( insertModificationXcuFile(
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
#include "cppuhelper/implementationentry.hxx" #include "cppuhelper/implementationentry.hxx"
#include "basicmigration.hxx" #include "basicmigration.hxx"
#include "wordbookmigration.hxx" #include "wordbookmigration.hxx"
//#include "extensionmigration.hxx" #include "oo3extensionmigration.hxx"
extern "C" extern "C"
{ {
...@@ -44,11 +44,11 @@ extern "C" ...@@ -44,11 +44,11 @@ extern "C"
migration::WordbookMigration_getSupportedServiceNames, ::cppu::createSingleComponentFactory, migration::WordbookMigration_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
0, 0 0, 0
}, },
// { {
// migration::ExtensionMigration_create, migration::ExtensionMigration_getImplementationName, migration::OO3ExtensionMigration_create, migration::OO3ExtensionMigration_getImplementationName,
// migration::ExtensionMigration_getSupportedServiceNames, ::cppu::createSingleComponentFactory, migration::OO3ExtensionMigration_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
// 0, 0 0, 0
// }, },
{ 0, 0, 0, 0, 0, 0 } { 0, 0, 0, 0, 0, 0 }
}; };
......
...@@ -34,8 +34,10 @@ COMP1TYPELIST = migrationoo2 ...@@ -34,8 +34,10 @@ COMP1TYPELIST = migrationoo2
LIBTARGET=NO LIBTARGET=NO
# --- Settings ----------------------------------------------------- # --- Settings -----------------------------------------------------
.INCLUDE : ..$/..$/deployment/inc/dp_misc.mk PRJINC=..$/..
.INCLUDE : settings.mk .INCLUDE : settings.mk
.INCLUDE : ..$/..$/deployment/inc/dp_misc.mk
.INCLUDE : ..$/..$/deployment/inc/dp_gui.mk
DLLPRE = DLLPRE =
# ------------------------------------------------------------------ # ------------------------------------------------------------------
...@@ -48,21 +50,22 @@ SLOFILES= \ ...@@ -48,21 +50,22 @@ SLOFILES= \
$(SLO)$/basicmigration.obj \ $(SLO)$/basicmigration.obj \
$(SLO)$/wordbookmigration.obj \ $(SLO)$/wordbookmigration.obj \
$(SLO)$/autocorrmigration.obj \ $(SLO)$/autocorrmigration.obj \
$(SLO)$/oo3extensionmigration.obj \ $(SLO)$/oo3extensionmigration.obj
$(SLO)$/cexportsoo3.obj
SHL1OBJS= \ SHL1OBJS= \
$(SLO)$/jvmfwk.obj \ $(SLO)$/jvmfwk.obj \
$(SLO)$/cexports.obj \ $(SLO)$/cexports.obj \
$(SLO)$/basicmigration.obj \ $(SLO)$/basicmigration.obj \
$(SLO)$/wordbookmigration.obj \ $(SLO)$/wordbookmigration.obj \
$(SLO)$/autocorrmigration.obj $(SLO)$/autocorrmigration.obj \
$(SLO)$/oo3extensionmigration.obj
SHL1TARGET=$(TARGET) SHL1TARGET=$(TARGET)
SHL1VERSIONMAP = $(SOLARENV)/src/component.map SHL1VERSIONMAP = $(SOLARENV)/src/component.map
SHL1STDLIBS= \ SHL1STDLIBS= \
$(DEPLOYMENTMISCLIB) \ $(DEPLOYMENTMISCLIB) \
$(DEPLOYMENTGUILIB) \
$(CPPULIB) \ $(CPPULIB) \
$(CPPUHELPERLIB) \ $(CPPUHELPERLIB) \
$(SALLIB) \ $(SALLIB) \
...@@ -80,49 +83,10 @@ SHL1DEF=$(MISC)$/$(SHL1TARGET).def ...@@ -80,49 +83,10 @@ SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET) DEF1NAME=$(SHL1TARGET)
COMP2TYPELIST = migrationoo3
.IF "$(OS)" == "OS2"
SHL2TARGET=migroo3
.ELSE
SHL2TARGET=migrationoo3.uno
.ENDIF
SHL2VERSIONMAP = $(SOLARENV)/src/component.map
SHL2OBJS= \
$(SLO)$/cexportsoo3.obj \
$(SLO)$/oo3extensionmigration.obj
SHL2STDLIBS= \
$(DEPLOYMENTMISCLIB) \
$(CPPULIB) \
$(CPPUHELPERLIB) \
$(SALLIB) \
$(UCBHELPERLIB) \
$(UNOTOOLSLIB) \
$(TOOLSLIB) \
$(I18NISOLANGLIB) \
$(JVMFWKLIB) \
$(XMLSCRIPTLIB) \
SHL2DEPN=
SHL2IMPLIB=imigrationoo3
#SHL2LIBS=$(SLB)$/$(SHL2TARGET).lib
SHL2DEF=$(MISC)$/$(SHL2TARGET).def
DEF2NAME=$(SHL2TARGET)
# --- Targets ------------------------------------------------------ # --- Targets ------------------------------------------------------
.INCLUDE : target.mk .INCLUDE : target.mk
ALLTAR : $(MISC)/migrationoo3.component
$(MISC)/migrationoo3.component .ERRREMOVE : \
$(SOLARENV)/bin/createcomponent.xslt migrationoo3.component
$(XSLTPROC) --nonet --stringparam uri \
'$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL2TARGETN:f)' -o $@ \
$(SOLARENV)/bin/createcomponent.xslt migrationoo3.component
ALLTAR : $(MISC)/migrationoo2.component ALLTAR : $(MISC)/migrationoo2.component
$(MISC)/migrationoo2.component .ERRREMOVE : \ $(MISC)/migrationoo2.component .ERRREMOVE : \
......
...@@ -24,10 +24,13 @@ ...@@ -24,10 +24,13 @@
<component loader="com.sun.star.loader.SharedLibrary" <component loader="com.sun.star.loader.SharedLibrary"
xmlns="http://openoffice.org/2010/uno-components"> xmlns="http://openoffice.org/2010/uno-components">
<implementation name="com.sun.star.comp.desktop.migration.Basic"> <implementation name="com.sun.star.comp.desktop.migration.Basic">
<service name="com.sun.star.migration.Basic"/> <service name="com.sun.star.migration.Basic"/>
</implementation> </implementation>
<implementation name="com.sun.star.comp.desktop.migration.Wordbooks"> <implementation name="com.sun.star.comp.desktop.migration.Wordbooks">
<service name="com.sun.star.migration.Wordbooks"/> <service name="com.sun.star.migration.Wordbooks"/>
</implementation> </implementation>
<implementation name="com.sun.star.comp.desktop.migration.OOo3Extensions">
<service name="com.sun.star.migration.Extensions"/>
</implementation>
</component> </component>
...@@ -46,6 +46,9 @@ ...@@ -46,6 +46,9 @@
#include <com/sun/star/beans/NamedValue.hpp> #include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/deployment/ExtensionManager.hpp> #include <com/sun/star/deployment/ExtensionManager.hpp>
#include <com/sun/star/deployment/VersionException.hpp>
#include <dp_gui_handleversionexception.hxx>
using namespace ::com::sun::star; using namespace ::com::sun::star;
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -517,6 +520,14 @@ void TmpRepositoryCommandEnv::handle( ...@@ -517,6 +520,14 @@ void TmpRepositoryCommandEnv::handle(
bool approve = true; bool approve = true;
bool abort = false; bool abort = false;
deployment::VersionException verExc;
if ( xRequest->getRequest() >>= verExc )
{
// user interaction, if an extension is already been installed.
approve = dp_gui::handleVersionException( verExc );
abort = !approve;
}
// select: // select:
uno::Sequence< Reference< task::XInteractionContinuation > > conts( uno::Sequence< Reference< task::XInteractionContinuation > > conts(
xRequest->getContinuations() ); xRequest->getContinuations() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment