[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 3 commits - desktop/prj desktop/source officecfg/registry svgio/inc svgio/source

Armin Le Grand alg at apache.org
Tue Jun 18 03:07:16 PDT 2013


 desktop/prj/build.lst                                       |    4 
 desktop/prj/d.lst                                           |    1 
 desktop/source/app/app.cxx                                  |   99 +++---
 desktop/source/app/makefile.mk                              |   18 -
 desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx  |  108 +++---
 desktop/source/deployment/gui/makefile.mk                   |    6 
 desktop/source/deployment/inc/dp_gui.mk                     |   38 ++
 desktop/source/inc/dp_gui_handleversionexception.hxx        |   40 ++
 desktop/source/migration/migration.cxx                      |   49 +--
 desktop/source/migration/services/cexports.cxx              |   12 
 desktop/source/migration/services/makefile.mk               |   50 ---
 desktop/source/migration/services/migrationoo2.component    |   15 
 desktop/source/migration/services/oo3extensionmigration.cxx |   11 
 desktop/source/migration/wizard.cxx                         |   39 +-
 desktop/source/migration/wizard.hxx                         |    1 
 officecfg/registry/data/org/openoffice/Setup.xcu            |  189 +++++++++++-
 svgio/inc/svgio/svgreader/svgstyleattributes.hxx            |   18 +
 svgio/inc/svgio/svgreader/svgtoken.hxx                      |    1 
 svgio/source/svgreader/svgcharacternode.cxx                 |   32 ++
 svgio/source/svgreader/svgdocumenthandler.cxx               |   22 +
 svgio/source/svgreader/svgnode.cxx                          |    2 
 svgio/source/svgreader/svgstyleattributes.cxx               |   77 ++++
 svgio/source/svgreader/svgtoken.cxx                         |    2 
 23 files changed, 615 insertions(+), 219 deletions(-)

New commits:
commit def95cfb69619071811fb8e564eb4187f59f4b99
Author: Armin Le Grand <alg at apache.org>
Date:   Tue Jun 18 09:44:12 2013 +0000

    i122524 fixed/added some text import aspects for super/sub-baseline

diff --git a/svgio/inc/svgio/svgreader/svgstyleattributes.hxx b/svgio/inc/svgio/svgreader/svgstyleattributes.hxx
index c0e0970..7b3cbef 100644
--- a/svgio/inc/svgio/svgreader/svgstyleattributes.hxx
+++ b/svgio/inc/svgio/svgreader/svgstyleattributes.hxx
@@ -146,6 +146,15 @@ namespace svgio
             FillRule_evenodd
         };
 
+        enum BaselineShift
+        {
+            BaselineShift_Baseline,
+            BaselineShift_Sub,
+            BaselineShift_Super,
+            BaselineShift_Percentage,
+            BaselineShift_Length
+        };
+
         class SvgStyleAttributes
         {
         private:
@@ -199,6 +208,10 @@ namespace svgio
             // ClipRule setting (only valid wne mbIsClipPathContent == true, default is FillRule_nonzero)
             FillRule                    maClipRule;
 
+            // BaselineShift: Type and number (in case of BaselineShift_Percentage or BaselineShift_Length)
+            BaselineShift               maBaselineShift;
+            SvgNumber                   maBaselineShiftNumber;
+
             /// bitfield
 
             // defines if this attributes are part of a ClipPath. If yes,
@@ -425,6 +438,11 @@ namespace svgio
             const SvgMarkerNode* accessMarkerEndXLink() const;
             void setMarkerEndXLink(const rtl::OUString& rNew) { maMarkerEndXLink = rNew; }
 
+            // BaselineShift
+            void setBaselineShift(const BaselineShift aBaselineShift = BaselineShift_Baseline) { maBaselineShift = aBaselineShift; }
+            BaselineShift getBaselineShift() const { return maBaselineShift; }
+            void setBaselineShiftNumber(const SvgNumber& rBaselineShift = SvgNumber()) { maBaselineShiftNumber = rBaselineShift; }
+            SvgNumber getBaselineShiftNumber() const;
         };
     } // end of namespace svgreader
 } // end of namespace svgio
diff --git a/svgio/inc/svgio/svgreader/svgtoken.hxx b/svgio/inc/svgio/svgreader/svgtoken.hxx
index a20e822..19c5653 100644
--- a/svgio/inc/svgio/svgreader/svgtoken.hxx
+++ b/svgio/inc/svgio/svgreader/svgtoken.hxx
@@ -181,6 +181,7 @@ namespace svgio
 
             // text tokens
             SVGTokenText,
+            SVGTokenBaselineShift,
 
             SVGTokenLast
         };
diff --git a/svgio/source/svgreader/svgcharacternode.cxx b/svgio/source/svgreader/svgcharacternode.cxx
index eb337f0..7a225d0 100644
--- a/svgio/source/svgreader/svgcharacternode.cxx
+++ b/svgio/source/svgreader/svgcharacternode.cxx
@@ -408,6 +408,38 @@ namespace svgio
                     }
                 }
 
+                // get BaselineShift
+                const BaselineShift aBaselineShift(rSvgStyleAttributes.getBaselineShift());
+
+                // apply BaselineShift
+                switch(aBaselineShift)
+                {
+                    case BaselineShift_Sub:
+                    {
+                        aPosition.setY(aPosition.getY() + aTextLayouterDevice.getUnderlineOffset());
+                        break;
+                    }
+                    case BaselineShift_Super:
+                    {
+                        aPosition.setY(aPosition.getY() + aTextLayouterDevice.getOverlineOffset());
+                        break;
+                    }
+                    case BaselineShift_Percentage:
+                    case BaselineShift_Length:
+                    {
+                        const SvgNumber aNumber(rSvgStyleAttributes.getBaselineShiftNumber());
+                        const double mfBaselineShift(aNumber.solve(*this, length));
+
+                        aPosition.setY(aPosition.getY() + mfBaselineShift);
+                        break;
+                    }
+                    default: // BaselineShift_Baseline
+                    {
+                        // nothing to do
+                        break;
+                    }
+                }
+
                 // get fill color
                 const basegfx::BColor aFill(rSvgStyleAttributes.getFill()
                     ? *rSvgStyleAttributes.getFill()
diff --git a/svgio/source/svgreader/svgdocumenthandler.cxx b/svgio/source/svgreader/svgdocumenthandler.cxx
index dc348ab..f28921d 100644
--- a/svgio/source/svgreader/svgdocumenthandler.cxx
+++ b/svgio/source/svgreader/svgdocumenthandler.cxx
@@ -86,9 +86,29 @@ namespace
                             {
                                 if(pLast)
                                 {
+                                    bool bAddGap(true);
+                                    static bool bNoGapsForBaselineShift(true);
+
+                                    if(bNoGapsForBaselineShift)
+                                    {
+                                        // With this option a baseline shift between two char parts ('words')
+                                        // will not add a space 'gap' to the end of the (non-last) word. This
+                                        // seems to be the standard behaviour, see last bugdoc attached #122524#
+                                        const svgio::svgreader::SvgStyleAttributes* pStyleLast = pLast->getSvgStyleAttributes();
+                                        const svgio::svgreader::SvgStyleAttributes* pStyleCurrent = pCandidate->getSvgStyleAttributes();
+
+                                        if(pStyleLast && pStyleCurrent && pStyleLast->getBaselineShift() != pStyleCurrent->getBaselineShift())
+                                        {
+                                            bAddGap = false;
+                                        }
+                                    }
+
                                     // add in-between whitespace (single space) to last
                                     // known character node
-                                    pLast->addGap();
+                                    if(bAddGap)
+                                    {
+                                        pLast->addGap();
+                                    }
                                 }
 
                                 // remember new last corected character node
diff --git a/svgio/source/svgreader/svgnode.cxx b/svgio/source/svgreader/svgnode.cxx
index 438d3c3..db5cb57 100644
--- a/svgio/source/svgreader/svgnode.cxx
+++ b/svgio/source/svgreader/svgnode.cxx
@@ -210,7 +210,7 @@ namespace svgio
                 }
                 else
                 {
-                    parseAttribute(aTokenName, StrToSVGToken(aTokenName), xAttribs->getValueByIndex(a));
+                    parseAttribute(aTokenName, aSVGToken, xAttribs->getValueByIndex(a));
                 }
             }
 
diff --git a/svgio/source/svgreader/svgstyleattributes.cxx b/svgio/source/svgreader/svgstyleattributes.cxx
index 8484859..45214cb 100644
--- a/svgio/source/svgreader/svgstyleattributes.cxx
+++ b/svgio/source/svgreader/svgstyleattributes.cxx
@@ -1169,6 +1169,8 @@ namespace svgio
             mpMarkerEndXLink(0),
             maFillRule(FillRule_notset),
             maClipRule(FillRule_nonzero),
+            maBaselineShift(BaselineShift_Baseline),
+            maBaselineShiftNumber(0),
             mbIsClipPathContent(SVGTokenClipPathNode == mrOwner.getType()),
             mbStrokeDasharraySet(false)
         {
@@ -1803,6 +1805,43 @@ namespace svgio
                     }
                     break;
                 }
+                case SVGTokenBaselineShift:
+                {
+                    if(aContent.getLength())
+                    {
+                        static rtl::OUString aStrSub(rtl::OUString::createFromAscii("sub"));
+                        static rtl::OUString aStrSuper(rtl::OUString::createFromAscii("super"));
+                        SvgNumber aNum;
+
+                        if(aContent.match(aStrSub))
+                        {
+                            setBaselineShift(BaselineShift_Sub);
+                        }
+                        else if(aContent.match(aStrSuper))
+                        {
+                            setBaselineShift(BaselineShift_Super);
+                        }
+                        else if(readSingleNumber(aContent, aNum))
+                        {
+                            setBaselineShiftNumber(aNum);
+
+                            if(Unit_percent == aNum.getUnit())
+                            {
+                                setBaselineShift(BaselineShift_Percentage);
+                            }
+                            else
+                            {
+                                setBaselineShift(BaselineShift_Length);
+                            }
+                        }
+                        else
+                        {
+                            // no BaselineShift or inherit (which is automatically)
+                            setBaselineShift(BaselineShift_Baseline);
+                        }
+                    }
+                    break;
+                }
                 default:
                 {
                     break;
@@ -2184,6 +2223,24 @@ namespace svgio
         {
             if(maFontSize.isSet())
             {
+                // #122524# Handle Unit_percent realtive to parent FontSize (see SVG1.1
+                // spec 10.10 Font selection properties ‘font-size’, lastline (klick 'normative
+                // definition of the property')
+                if(Unit_percent == maFontSize.getUnit())
+                {
+                    const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+
+                    if(pSvgStyleAttributes)
+                    {
+                        const SvgNumber aParentNumber = pSvgStyleAttributes->getFontSize();
+
+                        return SvgNumber(
+                            aParentNumber.getNumber() * maFontSize.getNumber() * 0.01,
+                            aParentNumber.getUnit(),
+                            true);
+                    }
+                }
+
                 return maFontSize;
             }
 
@@ -2472,6 +2529,26 @@ namespace svgio
             return mpMarkerEndXLink;
         }
 
+        SvgNumber SvgStyleAttributes::getBaselineShiftNumber() const
+        {
+            // #122524# Handle Unit_percent realtive to parent BaselineShift
+            if(Unit_percent == maBaselineShiftNumber.getUnit())
+            {
+                const SvgStyleAttributes* pSvgStyleAttributes = getParentStyle();
+
+                if(pSvgStyleAttributes)
+                {
+                    const SvgNumber aParentNumber = pSvgStyleAttributes->getBaselineShiftNumber();
+
+                    return SvgNumber(
+                        aParentNumber.getNumber() * maBaselineShiftNumber.getNumber() * 0.01,
+                        aParentNumber.getUnit(),
+                        true);
+                }
+            }
+
+            return maBaselineShiftNumber;
+        }
     } // end of namespace svgreader
 } // end of namespace svgio
 
diff --git a/svgio/source/svgreader/svgtoken.cxx b/svgio/source/svgreader/svgtoken.cxx
index a401442..20e8bd2 100644
--- a/svgio/source/svgreader/svgtoken.cxx
+++ b/svgio/source/svgreader/svgtoken.cxx
@@ -165,6 +165,7 @@ namespace svgio
         static rtl::OUString aSVGStrStrokeWidth(rtl::OUString::createFromAscii("stroke-width"));
 
         static rtl::OUString aSVGStrText(rtl::OUString::createFromAscii("text"));
+        static rtl::OUString aSVGStrBaselineShift(rtl::OUString::createFromAscii("baseline-shift"));
 
         SVGToken StrToSVGToken(const rtl::OUString& rStr)
         {
@@ -307,6 +308,7 @@ namespace svgio
                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrStrokeWidth, SVGTokenStrokeWidth));
 
                 aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrText, SVGTokenText));
+                aSVGTokenMapperList.insert(SVGTokenValueType(aSVGStrBaselineShift, SVGTokenBaselineShift));
             }
 
             const SVGTokenMapper::const_iterator aResult(aSVGTokenMapperList.find(rStr));
commit 8f9af2d0a761436caaf6c313c69c35f8dc1f61c7
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date:   Tue Jun 18 08:23:00 2013 +0000

    122397: activate migration of AOO 3.4.x/OOo 3.x user profiles (incl. migration of wordbooks, basic macros and user-installed extensions)

diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst
index e61419b..95a3368 100644
--- a/desktop/prj/build.lst
+++ b/desktop/prj/build.lst
@@ -5,7 +5,7 @@ dt	desktop\prj								get		-	all	dt_prj 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\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\offacc					nmake	-	all	dt_offac dt_inc NULL
 dt	desktop\source\splash					nmake	-	all	dt_spl dt_migr dt_inc NULL
diff --git a/desktop/prj/d.lst b/desktop/prj/d.lst
index 32977f8..1535275 100644
--- a/desktop/prj/d.lst
+++ b/desktop/prj/d.lst
@@ -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\deploymentgui.component %_DEST%\xml%_EXT%\deploymentgui.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\socomp.component %_DEST%\xml%_EXT%\socomp.component
 ..\%__SRC%\misc\spl.component %_DEST%\xml%_EXT%\spl.component
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index b9d3e09..0b3aea5 100755
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -768,26 +768,35 @@ void MigrationImpl::copyConfig() {
     for (Components::const_iterator i(comps.begin()); i != comps.end(); ++i) {
         if (!i->second.includedPaths.empty()) {
             rtl::OUStringBuffer buf(m_aInfo.userdata);
-            buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("/user/registry/data"));
-            sal_Int32 n = 0;
-            do {
-                rtl::OUString seg(i->first.getToken(0, '.', n));
-                rtl::OUString enc(
-                    rtl::Uri::encode(
-                        seg, rtl_UriCharClassPchar, rtl_UriEncodeStrict,
-                        RTL_TEXTENCODING_UTF8));
-                if (enc.getLength() == 0 && seg.getLength() != 0) {
-                    OSL_TRACE(
-                        ("configuration migration component %s ignored (cannot"
-                         " 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"));
+            if ( m_aInfo.productname.equals( OUString::createFromAscii("OpenOffice.org 3") ) )
+            {
+                // OpenOffice.org 3 configuration file
+                buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("/user/registrymodifications.xcu"));
+            }
+            else
+            {
+                // OpenOffice.org 2 configuration files
+                buf.appendAscii(RTL_CONSTASCII_STRINGPARAM("/user/registry/data"));
+                sal_Int32 n = 0;
+                do {
+                    rtl::OUString seg(i->first.getToken(0, '.', n));
+                    rtl::OUString enc(
+                        rtl::Uri::encode(
+                            seg, rtl_UriCharClassPchar, rtl_UriEncodeStrict,
+                            RTL_TEXTENCODING_UTF8));
+                    if (enc.getLength() == 0 && seg.getLength() != 0) {
+                        OSL_TRACE(
+                            ("configuration migration component %s ignored (cannot"
+                             " 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(
                 comphelper::getProcessComponentContext())->
                 insertModificationXcuFile(
diff --git a/desktop/source/migration/services/cexports.cxx b/desktop/source/migration/services/cexports.cxx
index 473c8ca..a759210 100644
--- a/desktop/source/migration/services/cexports.cxx
+++ b/desktop/source/migration/services/cexports.cxx
@@ -27,7 +27,7 @@
 #include "cppuhelper/implementationentry.hxx"
 #include "basicmigration.hxx"
 #include "wordbookmigration.hxx"
-//#include "extensionmigration.hxx"
+#include "oo3extensionmigration.hxx"
 
 extern "C"
 {
@@ -44,11 +44,11 @@ extern "C"
         migration::WordbookMigration_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
         0, 0
     },
-//     {
-//         migration::ExtensionMigration_create, migration::ExtensionMigration_getImplementationName,
-//         migration::ExtensionMigration_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
-//         0, 0
-//     },
+    {
+        migration::OO3ExtensionMigration_create, migration::OO3ExtensionMigration_getImplementationName,
+        migration::OO3ExtensionMigration_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
+        0, 0
+    },
     { 0, 0, 0, 0, 0, 0 }
 };
 
diff --git a/desktop/source/migration/services/makefile.mk b/desktop/source/migration/services/makefile.mk
index 9c06e49..88f6216 100644
--- a/desktop/source/migration/services/makefile.mk
+++ b/desktop/source/migration/services/makefile.mk
@@ -34,8 +34,10 @@ COMP1TYPELIST = migrationoo2
 LIBTARGET=NO
 
 # --- Settings -----------------------------------------------------
-.INCLUDE : ..$/..$/deployment/inc/dp_misc.mk
+PRJINC=..$/..
 .INCLUDE :  settings.mk
+.INCLUDE : ..$/..$/deployment/inc/dp_misc.mk
+.INCLUDE : ..$/..$/deployment/inc/dp_gui.mk
 DLLPRE =
 
 # ------------------------------------------------------------------
@@ -48,21 +50,22 @@ SLOFILES= \
         $(SLO)$/basicmigration.obj \
         $(SLO)$/wordbookmigration.obj \
         $(SLO)$/autocorrmigration.obj \
-        $(SLO)$/oo3extensionmigration.obj \
-        $(SLO)$/cexportsoo3.obj
+        $(SLO)$/oo3extensionmigration.obj
 
 SHL1OBJS= \
         $(SLO)$/jvmfwk.obj \
         $(SLO)$/cexports.obj \
         $(SLO)$/basicmigration.obj \
         $(SLO)$/wordbookmigration.obj \
-        $(SLO)$/autocorrmigration.obj
+        $(SLO)$/autocorrmigration.obj \
+        $(SLO)$/oo3extensionmigration.obj
 
 SHL1TARGET=$(TARGET)
 SHL1VERSIONMAP = $(SOLARENV)/src/component.map
 
 SHL1STDLIBS= \
     $(DEPLOYMENTMISCLIB) \
+    $(DEPLOYMENTGUILIB) \
     $(CPPULIB)		\
     $(CPPUHELPERLIB)	\
     $(SALLIB) \
@@ -80,49 +83,10 @@ SHL1DEF=$(MISC)$/$(SHL1TARGET).def
 
 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 ------------------------------------------------------
 
 .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
 
 $(MISC)/migrationoo2.component .ERRREMOVE : \
diff --git a/desktop/source/migration/services/migrationoo2.component b/desktop/source/migration/services/migrationoo2.component
index b5435d1..c6f7d6d 100644
--- a/desktop/source/migration/services/migrationoo2.component
+++ b/desktop/source/migration/services/migrationoo2.component
@@ -24,10 +24,13 @@
 
 <component loader="com.sun.star.loader.SharedLibrary"
     xmlns="http://openoffice.org/2010/uno-components">
-  <implementation name="com.sun.star.comp.desktop.migration.Basic">
-    <service name="com.sun.star.migration.Basic"/>
-  </implementation>
-  <implementation name="com.sun.star.comp.desktop.migration.Wordbooks">
-    <service name="com.sun.star.migration.Wordbooks"/>
-  </implementation>
+    <implementation name="com.sun.star.comp.desktop.migration.Basic">
+        <service name="com.sun.star.migration.Basic"/>
+    </implementation>
+    <implementation name="com.sun.star.comp.desktop.migration.Wordbooks">
+        <service name="com.sun.star.migration.Wordbooks"/>
+    </implementation>
+    <implementation name="com.sun.star.comp.desktop.migration.OOo3Extensions">
+        <service name="com.sun.star.migration.Extensions"/>
+    </implementation>
 </component>
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
index 16b5bb8..b4d987e 100644
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -46,6 +46,9 @@
 #include <com/sun/star/beans/NamedValue.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::uno;
 
@@ -517,6 +520,14 @@ void TmpRepositoryCommandEnv::handle(
     bool approve = true;
     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:
     uno::Sequence< Reference< task::XInteractionContinuation > > conts(
         xRequest->getContinuations() );
diff --git a/officecfg/registry/data/org/openoffice/Setup.xcu b/officecfg/registry/data/org/openoffice/Setup.xcu
index 3b934b5..a3ba344 100644
--- a/officecfg/registry/data/org/openoffice/Setup.xcu
+++ b/officecfg/registry/data/org/openoffice/Setup.xcu
@@ -784,7 +784,7 @@
     <node oor:name="SupportedVersions">
       <node oor:name="OpenOffice.org2+StarOffice8+StarSuite8" oor:op="replace">
         <prop oor:name="Priority">
-          <value>10</value>
+          <value>20</value>
         </prop>
         <prop oor:name="VersionIdentifiers">
           <value oor:separator=",">OpenOffice.org 2=openoffice.org2,StarOffice 8=staroffice8,StarSuite 8=starsuite8</value>
@@ -808,11 +808,6 @@
               </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>
@@ -936,11 +931,6 @@
               <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>
@@ -954,6 +944,181 @@
           </node>
         </node>
       </node>
+        <node oor:name="OpenOffice.org3" oor:op="replace">
+            <prop oor:name="Priority">
+                <value>10</value>
+            </prop>
+            <prop oor:name="VersionIdentifiers">
+                <value oor:separator=",">OpenOffice.org 3=openoffice.org/3</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>
+                            <it>/org.openoffice.Office.DataAccess/Bibliography</it>
+                            <it>/org.openoffice.Office.DataAccess/ConnectionPool</it>
+                            <it>/org.openoffice.Office.DataAccess/DataSources</it>
+                            <it>/org.openoffice.Office.DataAccess/DriverManager</it>
+                        </value>
+                    </prop>
+                </node>
+                <node oor:name="Deployment" oor:op="replace">
+                    <prop oor:name="MigrationService">
+                        <value>com.sun.star.migration.Extensions</value>
+                    </prop>
+                    <prop oor:name="ExcludedExtensions">
+                        <value>
+                            <!-- presentation minimizer is integrated since AOO 4.0 -->
+                            <it>com.sun.star.PresentationMinimizer-*</it>
+                            <!-- presentation screen is integrated since AOO 4.0 -->
+                            <it>com.sun.PresenterScreen-*</it>
+                        </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>
+                            <it>.*/autotext/.*</it>
+                            <it>.*/autocorr/.*</it>
+                            <it>.*/config/.*\.so[bcdegh]</it>
+                            <it>.*/config/soffice.cfg/modules/.*/toolbar/custom.*\.xml</it>
+                            <it>.*/config/soffice.cfg/modules/.*/images/.*</it>
+                            <it>.*/gallery/.*</it>
+                            <it>.*/template/.*</it>
+                        </value>
+                    </prop>
+                    <prop oor:name="IncludedNodes">
+                        <value>
+                            <it>/org.openoffice.Office.Compatibility</it>
+                            <it>/org.openoffice.Office.Custom</it>
+                            <it>/org.openoffice.Office.Embedding</it>
+                            <it>/org.openoffice.Office.Events</it>
+                            <it>/org.openoffice.Office.ExtendedColorScheme</it>
+                            <it>/org.openoffice.Office.Common/Accessibility</it>
+                            <it>/org.openoffice.Office.Common/Accessibility/AutoDetectSystemHC</it>
+                            <it>/org.openoffice.Office.Common/AsianLayout</it>
+                            <it>/org.openoffice.Office.Common/AutoCorrect</it>
+                            <it>/org.openoffice.Office.Common/Cache</it>
+                            <it>/org.openoffice.Office.Common/DateFormat</it>
+                            <it>/org.openoffice.Office.Common/ExternalMailer/Program</it>
+                            <it>/org.openoffice.Office.Common/Filter</it>
+                            <it>/org.openoffice.Office.Common/Font</it>
+                            <it>/org.openoffice.Office.Common/Forms</it>
+                            <it>/org.openoffice.Office.Common/Gallery</it>
+                            <it>/org.openoffice.Office.Common/Help</it>
+                            <it>/org.openoffice.Office.Common/History</it>
+                            <it>/org.openoffice.Office.Common/I18N</it>
+                            <it>/org.openoffice.Office.Common/InternalMSExport</it>
+                            <it>/org.openoffice.Office.Common/Load</it>
+                            <it>/org.openoffice.Office.Common/Misc/FormControlPilotsEnabled</it>
+                            <it>/org.openoffice.Office.Common/Misc/PluginsEnabled</it>
+                            <it>/org.openoffice.Office.Common/Misc/SymbolSet</it>
+                            <it>/org.openoffice.Office.Common/Misc/UseSystemFileDialog</it>
+                            <it>/org.openoffice.Office.Common/Misc/UseSystemPrintDialog</it>
+                            <it>/org.openoffice.Office.Common/Misc/SymbolStyle</it>
+                            <it>/org.openoffice.Office.Common/Passwords</it>
+                            <it>/org.openoffice.Office.Common/Print/PrintingModifiesDocument</it>
+                            <it>/org.openoffice.Office.Common/Print/Warning</it>
+                            <it>/org.openoffice.Office.Common/Vectorize</it>
+                            <it>/org.openoffice.Office.Common/Save</it>
+                            <it>/org.openoffice.Office.Common/SearchOptions</it>
+                            <it>/org.openoffice.Office.Common/Undo</it>
+                            <it>/org.openoffice.Office.Common/View/Dialog/Dialog/MiddleMouseButton</it>
+                            <it>/org.openoffice.Office.Common/View/Dialog/MousePositioning</it>
+                            <it>/org.openoffice.Office.Common/View/Localization</it>
+                            <it>/org.openoffice.Office.Common/View/Menu</it>
+                            <it>/org.openoffice.Office.Common/_3D_Engine</it>
+                        </value>
+                    </prop>
+                    <prop oor:name="ExcludedNodes">
+                        <value>
+                            <it>/org.openoffice.Office.Common/_3D_Engine/OpenGL</it>
+                            <it>/org.openoffice.Office.Common/Help/Registration</it>
+                        </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="Writer" oor:op="replace">
+                    <prop oor:name="IncludedNodes">
+                        <value>
+                            <it>/org.openoffice.Office.Writer</it>
+                            <it>/org.openoffice.Office.WriterWeb</it>
+                        </value>
+                    </prop>
+                    <prop oor:name="ExcludedNodes">
+                        <value>/org.openoffice.Office.Writer/Wizard</value>
+                    </prop>
+                </node>
+            </node>
+        </node>
     </node>
-    </node>
+  </node>
 </oor:component-data>
commit ce829e862e8e0b7c35a62afc2a169a30612e962d
Author: Oliver-Rainer Wittmann <orw at apache.org>
Date:   Tue Jun 18 08:08:46 2013 +0000

    122398: re-activate the FirstStartWizard

diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst
index ee0ae2e..e61419b 100644
--- a/desktop/prj/build.lst
+++ b/desktop/prj/build.lst
@@ -3,7 +3,7 @@ dt	desktop									usr1	-	all	dt_mkout NULL
 dt	desktop\inc								nmake	-	all	dt_inc NULL
 dt	desktop\prj								get		-	all	dt_prj NULL
 dt	desktop\res								get		-	all	dt_res NULL
-dt	desktop\source\app						nmake	-	all	dt_app dt_migr dt_inc dt_dp_misc 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\services		nmake	-	all	dt_services dt_inc dt_dp_misc NULL
 dt	desktop\source\so_comp					nmake	-	all	dt_so_comp dt_inc NULL
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index e010f12..30f1992 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -160,9 +160,13 @@
 #include "com/sun/star/deployment/ExtensionManager.hpp"
 #include "com/sun/star/deployment/XExtensionManager.hpp"
 #include "com/sun/star/task/XInteractionApprove.hpp"
+#include "com/sun/star/task/XInteractionAbort.hpp"
 #include "cppuhelper/compbase3.hxx"
 #include <hash_set>
 
+#include "com/sun/star/deployment/VersionException.hpp"
+#include <dp_gui_handleversionexception.hxx>
+
 #if defined MACOSX
 #include <errno.h>
 #include <sys/wait.h>
@@ -179,7 +183,6 @@ using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::util;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::beans;
-//using namespace ::com::sun::star::bridge;
 using namespace ::com::sun::star::frame;
 using namespace ::com::sun::star::document;
 using namespace ::com::sun::star::view;
@@ -793,16 +796,39 @@ void MinimalCommandEnv::handle(
     css::uno::Reference< css::task::XInteractionRequest> const& xRequest)
     throw ( css::uno::RuntimeException )
 {
+    bool bApprove = true;
+
+    css::deployment::VersionException verExc;
+    if ( xRequest->getRequest() >>= verExc )
+    {
+        // user interaction, if an extension is already been installed.
+        bApprove = dp_gui::handleVersionException( verExc );
+    }
+
     const css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > conts( xRequest->getContinuations());
     const css::uno::Reference< css::task::XInteractionContinuation>* pConts = conts.getConstArray();
     const sal_Int32 len = conts.getLength();
     for( sal_Int32 pos = 0; pos < len; ++pos )
     {
-        css::uno::Reference< css::task::XInteractionApprove> xInteractionApprove( pConts[ pos ], css::uno::UNO_QUERY);
-        if( xInteractionApprove.is()) {
-            xInteractionApprove->select();
-            // don't query again for ongoing continuations:
-            break;
+        if ( bApprove )
+        {
+            css::uno::Reference< css::task::XInteractionApprove> xInteractionApprove( pConts[ pos ], css::uno::UNO_QUERY);
+            if( xInteractionApprove.is())
+            {
+                xInteractionApprove->select();
+                // don't query again for ongoing continuations:
+                break;
+            }
+        }
+        else
+        {
+            css::uno::Reference< css::task::XInteractionAbort > xInteractionAbort( pConts[ pos ], css::uno::UNO_QUERY );
+            if (xInteractionAbort.is())
+            {
+                xInteractionAbort->select();
+                // don't query again for ongoing continuations:
+                break;
+            }
         }
     }
 }
@@ -885,7 +911,6 @@ static void installBundledExtensionBlobs()
 {
     rtl::OUString aDirUrl( OUSTR("$OOO_BASE_DIR/share/extensions/install"));
     ::rtl::Bootstrap::expandMacros( aDirUrl);
-    ::osl::Directory aDir( aDirUrl);
 
     // Find out if we can exit early: only when there is an extension file newer
     // than the marker we have to install any extension.
@@ -901,29 +926,16 @@ static void installBundledExtensionBlobs()
     // provide the minimal set of requirements to call ExtensionManager's methods
     MinimalCommandEnv* pMiniCmdEnv = new MinimalCommandEnv;
     ::css::uno::Reference< css::ucb::XCommandEnvironment> xCmdEnv( static_cast< cppu::OWeakObject*>(pMiniCmdEnv), css::uno::UNO_QUERY);
-    const ::css::beans::NamedValue aNamedProps( OUSTR("SUPPRESS_LICENSE"), ::css::uno::makeAny( OUSTR("1")));
-    const ::css::uno::Sequence< ::css::beans::NamedValue> xProperties( &aNamedProps, 1);
     ::css::uno::Reference< ::css::task::XAbortChannel> xAbortChannel;
 
-    // get the list of deployed extensions
-    typedef std::hash_set< rtl::OUString, ::rtl::OUStringHash> StringSet;
-    StringSet aExtNameSet;
-    css::uno::Sequence< css::uno::Sequence<css::uno::Reference<css::deployment::XPackage> > > xListOfLists = xEM->getAllExtensions( xAbortChannel, xCmdEnv);
-    const sal_Int32 nLen1 = xListOfLists.getLength();
-    for( int i1 = 0; i1 < nLen1; ++i1) {
-        css::uno::Sequence<css::uno::Reference<css::deployment::XPackage> > xListOfPacks = xListOfLists[i1];
-        const sal_Int32 nLen2 = xListOfPacks.getLength();
-        for( int i2 = 0; i2 < nLen2; ++i2) {
-            css::uno::Reference<css::deployment::XPackage> xPackage = xListOfPacks[i2];
-            if( !xPackage.is())
-                continue;
-            aExtNameSet.insert( xPackage->getName());
-        }
-    }
+    const ::css::beans::NamedValue aNamedProps( OUSTR("SUPPRESS_LICENSE"), ::css::uno::makeAny( OUSTR("1")));
+    const ::css::uno::Sequence< ::css::beans::NamedValue> xProperties( &aNamedProps, 1);
 
     // iterate over the bundled extension blobs
+    ::osl::Directory aDir( aDirUrl);
     ::osl::File::RC rc = aDir.open();
-    while( rc == osl::File::E_None) {
+    while( rc == osl::File::E_None)
+    {
         ::osl::DirectoryItem aDI;
         if( aDir.getNextItem( aDI) != osl::File::E_None)
             break;
@@ -932,20 +944,16 @@ static void installBundledExtensionBlobs()
             continue;
         if( aFileStat.getFileType() != ::osl::FileStatus::Regular)
             continue;
-        try {
-            // check if the extension is already installed
-            const rtl::OUString& rExtFileUrl = aFileStat.getFileURL();
-            const sal_Int32 nBaseIndex = rExtFileUrl.lastIndexOf('/');
-            const ::rtl::OUString aBaseName = (nBaseIndex < 0) ? rExtFileUrl : rExtFileUrl.copy( nBaseIndex+1);
-            const bool bFound = (aExtNameSet.find( aBaseName) != aExtNameSet.end());
-            if( bFound)
-                continue;
+        try
+        {
             // request to install the extension blob
-            xEM->addExtension( rExtFileUrl, xProperties, OUSTR("user"), xAbortChannel, xCmdEnv);
-        // ExtensionManager problems are not worth to die for here
-        } catch( css::uno::RuntimeException&) {
-        } catch( css::deployment::DeploymentException&) {
+            xEM->addExtension( aFileStat.getFileURL(), xProperties, OUSTR("user"), xAbortChannel, xCmdEnv);
         }
+        // ExtensionManager problems are not worth to die for here
+        catch( css::uno::RuntimeException&)
+        {}
+        catch( css::deployment::DeploymentException&)
+        {}
     }
 }
 
@@ -2010,8 +2018,21 @@ void Desktop::Main()
                     DEFINE_CONST_UNICODE( "com.sun.star.comp.desktop.FirstStart" ) ), UNO_QUERY );
                 if (xFirstStartJob.is())
                 {
-                   // mark first start as done
-                   FinishFirstStart();
+                    sal_Bool bDone = sal_False;
+                    Sequence< NamedValue > lArgs(2);
+                    lArgs[0].Name    = ::rtl::OUString::createFromAscii("LicenseNeedsAcceptance");
+                    lArgs[0].Value <<= LicenseNeedsAcceptance();
+                    lArgs[1].Name    = ::rtl::OUString::createFromAscii("LicensePath");
+                    lArgs[1].Value <<= GetLicensePath();
+
+                    xFirstStartJob->execute(lArgs) >>= bDone;
+                    if ( !bDone )
+                    {
+                        doShutdown();
+                        return;
+                    }
+                    // mark first start as done
+                    FinishFirstStart();
                 }
             }
 
diff --git a/desktop/source/app/makefile.mk b/desktop/source/app/makefile.mk
index 5eece7b..e768e66 100644
--- a/desktop/source/app/makefile.mk
+++ b/desktop/source/app/makefile.mk
@@ -32,6 +32,7 @@ ENABLE_EXCEPTIONS=TRUE
 
 .INCLUDE :  settings.mk
 .INCLUDE : ../deployment/inc/dp_misc.mk
+.INCLUDE : ../deployment/inc/dp_gui.mk
 
 .IF "$(ENABLE_GNOMEVFS)"=="TRUE"
 CFLAGS+=-DGNOME_VFS_ENABLED
@@ -41,22 +42,6 @@ CFLAGS+=-DGNOME_VFS_ENABLED
 CFLAGS+=-DENABLE_QUICKSTART_APPLET
 .ENDIF
 
-# .IF "$(OS)" == "WNT"
-# .IF "$(COM)" == "GCC"
-# DEPLOYMENTMISCLIB = -ldeploymentmisc$(DLLPOSTFIX)
-# .ELSE
-# DEPLOYMENTMISCLIB = ideploymentmisc$(DLLPOSTFIX).lib
-# .ENDIF
-# .ELIF "$(OS)" == "OS2"
-# DEPLOYMENTMISCLIB = ideploymentmisc$(DLLPOSTFIX).lib
-# .ELSE
-# DEPLOYMENTMISCLIB = -ldeploymentmisc$(DLLPOSTFIX)
-# .ENDIF
-
-.IF "$(GUI)"=="WNT" || "$(GUI)"=="OS2" || "$(GUIBASE)"=="aqua" || "$(ENABLE_SYSTRAY_GTK)"=="TRUE"
-CFLAGS+=-DENABLE_QUICKSTART_APPLET
-.ENDIF
-
 SHL1TARGET = sofficeapp
 SHL1OBJS = \
     $(SLO)$/app.obj \
@@ -85,6 +70,7 @@ SHL1STDLIBS = \
     $(CPPUHELPERLIB) \
     $(CPPULIB) \
     $(DEPLOYMENTMISCLIB) \
+    $(DEPLOYMENTGUILIB) \
     $(I18NISOLANGLIB) \
     $(SALLIB) \
     $(SFXLIB) \
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index 5a0ffe2..ca0dbc4 100644
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -86,6 +86,7 @@
 #include "dp_dependencies.hxx"
 #include "dp_identifier.hxx"
 #include "dp_version.hxx"
+#include <dp_gui_handleversionexception.hxx>
 
 #include <queue>
 #include <boost/shared_ptr.hpp>
@@ -359,6 +360,63 @@ uno::Reference< ucb::XProgressHandler > ProgressCmdEnv::getProgressHandler()
 //------------------------------------------------------------------------------
 // XInteractionHandler
 //------------------------------------------------------------------------------
+bool handleVersionException(
+    com::sun::star::deployment::VersionException verExc,
+    DialogHelper* pDialogHelper )
+{
+    bool bApprove = false;
+
+    sal_uInt32 id;
+    switch (dp_misc::compareVersions(
+        verExc.NewVersion, verExc.Deployed->getVersion() ))
+    {
+    case dp_misc::LESS:
+        id = RID_WARNINGBOX_VERSION_LESS;
+        break;
+    case dp_misc::EQUAL:
+        id = RID_WARNINGBOX_VERSION_EQUAL;
+        break;
+    default: // dp_misc::GREATER
+        id = RID_WARNINGBOX_VERSION_GREATER;
+        break;
+    }
+    OSL_ASSERT( verExc.Deployed.is() );
+    const bool bEqualNames = verExc.NewDisplayName.equals(
+        verExc.Deployed->getDisplayName());
+    {
+        vos::OGuard guard(Application::GetSolarMutex());
+        WarningBox box( pDialogHelper ? pDialogHelper->getWindow() : NULL, ResId(id, *DeploymentGuiResMgr::get()));
+        String s;
+        if (bEqualNames)
+        {
+            s = box.GetMessText();
+        }
+        else if (id == RID_WARNINGBOX_VERSION_EQUAL)
+        {
+            //hypothetical: requires two instances of an extension with the same
+            //version to have different display names. Probably the developer forgot
+            //to change the version.
+            s = String(ResId(RID_STR_WARNINGBOX_VERSION_EQUAL_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
+        }
+        else if (id == RID_WARNINGBOX_VERSION_LESS)
+        {
+            s = String(ResId(RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
+        }
+        else if (id == RID_WARNINGBOX_VERSION_GREATER)
+        {
+            s = String(ResId(RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
+        }
+        s.SearchAndReplaceAllAscii( "$NAME", verExc.NewDisplayName);
+        s.SearchAndReplaceAllAscii( "$OLDNAME", verExc.Deployed->getDisplayName());
+        s.SearchAndReplaceAllAscii( "$NEW", getVersion(verExc.NewVersion) );
+        s.SearchAndReplaceAllAscii( "$DEPLOYED", getVersion(verExc.Deployed) );
+        box.SetMessText(s);
+        bApprove = box.Execute() == RET_OK;
+    }
+
+    return bApprove;
+}
+
 void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const & xRequest )
     throw ( uno::RuntimeException )
 {
@@ -449,54 +507,8 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
     }
     else if (request >>= verExc)
     {
-        sal_uInt32 id;
-        switch (dp_misc::compareVersions(
-                    verExc.NewVersion, verExc.Deployed->getVersion() ))
-        {
-        case dp_misc::LESS:
-            id = RID_WARNINGBOX_VERSION_LESS;
-            break;
-        case dp_misc::EQUAL:
-            id = RID_WARNINGBOX_VERSION_EQUAL;
-            break;
-        default: // dp_misc::GREATER
-            id = RID_WARNINGBOX_VERSION_GREATER;
-            break;
-        }
-        OSL_ASSERT( verExc.Deployed.is() );
-        bool bEqualNames = verExc.NewDisplayName.equals(
-            verExc.Deployed->getDisplayName());
-        {
-            vos::OGuard guard(Application::GetSolarMutex());
-            WarningBox box( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, ResId(id, *DeploymentGuiResMgr::get()));
-            String s;
-            if (bEqualNames)
-            {
-                s = box.GetMessText();
-            }
-            else if (id == RID_WARNINGBOX_VERSION_EQUAL)
-            {
-                //hypothetical: requires two instances of an extension with the same
-                //version to have different display names. Probably the developer forgot
-                //to change the version.
-                s = String(ResId(RID_STR_WARNINGBOX_VERSION_EQUAL_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
-            }
-            else if (id == RID_WARNINGBOX_VERSION_LESS)
-            {
-                s = String(ResId(RID_STR_WARNINGBOX_VERSION_LESS_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
-            }
-            else if (id == RID_WARNINGBOX_VERSION_GREATER)
-            {
-               s = String(ResId(RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES, *DeploymentGuiResMgr::get()));
-            }
-            s.SearchAndReplaceAllAscii( "$NAME", verExc.NewDisplayName);
-            s.SearchAndReplaceAllAscii( "$OLDNAME", verExc.Deployed->getDisplayName());
-            s.SearchAndReplaceAllAscii( "$NEW", getVersion(verExc.NewVersion) );
-            s.SearchAndReplaceAllAscii( "$DEPLOYED", getVersion(verExc.Deployed) );
-            box.SetMessText(s);
-            approve = box.Execute() == RET_OK;
-            abort = !approve;
-        }
+        approve = handleVersionException( verExc, m_pDialogHelper );
+        abort = !approve;
     }
     else if (request >>= instExc)
     {
diff --git a/desktop/source/deployment/gui/makefile.mk b/desktop/source/deployment/gui/makefile.mk
index f6a3b99..3881b55 100644
--- a/desktop/source/deployment/gui/makefile.mk
+++ b/desktop/source/deployment/gui/makefile.mk
@@ -26,7 +26,7 @@ PRJ = ..$/..$/..
 PRJNAME = desktop
 TARGET = deploymentgui
 ENABLE_EXCEPTIONS = TRUE
-#USE_DEFFILE = TRUE
+USE_DEFFILE = TRUE
 NO_BSYMBOLIC = TRUE
 USE_PCH :=
 ENABLE_PCH :=
@@ -51,6 +51,8 @@ SLOFILES = \
         $(SLO)$/dp_gui_extensioncmdqueue.obj \
         $(SLO)$/descedit.obj
 
+SHL1OBJS = $(SLO)$/dp_gui_extensioncmdqueue.obj
+
 .IF "$(GUI)"=="OS2"
 SHL1TARGET = deplgui$(DLLPOSTFIX)
 .ELSE
@@ -84,8 +86,6 @@ SHL1LIBS = $(SLB)$/$(TARGET).lib
 SHL1DEF = $(MISC)$/$(SHL1TARGET).def
 
 DEF1NAME = $(SHL1TARGET)
-#DEFLIB1NAME = $(TARGET)
-#DEF1DEPN =
 
 SRS1NAME = $(TARGET)
 SRC1FILES = \
diff --git a/desktop/source/deployment/inc/dp_gui.mk b/desktop/source/deployment/inc/dp_gui.mk
new file mode 100755
index 0000000..0ff81b3
--- /dev/null
+++ b/desktop/source/deployment/inc/dp_gui.mk
@@ -0,0 +1,38 @@
+#**************************************************************
+#  
+#  Licensed to the Apache Software Foundation (ASF) under one
+#  or more contributor license agreements.  See the NOTICE file
+#  distributed with this work for additional information
+#  regarding copyright ownership.  The ASF licenses this file
+#  to you under the Apache License, Version 2.0 (the
+#  "License"); you may not use this file except in compliance
+#  with the License.  You may obtain a copy of the License at
+#  
+#    http://www.apache.org/licenses/LICENSE-2.0
+#  
+#  Unless required by applicable law or agreed to in writing,
+#  software distributed under the License is distributed on an
+#  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+#  KIND, either express or implied.  See the License for the
+#  specific language governing permissions and limitations
+#  under the License.
+#  
+#**************************************************************
+
+
+
+# To be included after settings.mk
+
+# Although the deployment gui shared library is a UNO component, it also exports
+# some C++ functionality:
+.IF "$(OS)" == "WNT"
+.IF "$(COM)" == "GCC"
+DEPLOYMENTGUILIB = -ldeploymentgui$(DLLPOSTFIX)
+.ELSE
+DEPLOYMENTGUILIB = ideploymentgui$(DLLPOSTFIX).lib
+.ENDIF
+.ELIF "$(OS)" == "OS2"
+DEPLOYMENTGUILIB = -ldeplgui
+.ELSE
+DEPLOYMENTGUILIB = -ldeploymentgui$(DLLPOSTFIX)
+.ENDIF
diff --git a/desktop/source/inc/dp_gui_handleversionexception.hxx b/desktop/source/inc/dp_gui_handleversionexception.hxx
new file mode 100755
index 0000000..d2b0eb3
--- /dev/null
+++ b/desktop/source/inc/dp_gui_handleversionexception.hxx
@@ -0,0 +1,40 @@
+/**************************************************************
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ *
+ *************************************************************/
+
+
+
+#ifndef INCLUDED_DP_GUI_HANDLEVERSIONEXCEPTION_HXX
+#define INCLUDED_DP_GUI_HANDLEVERSIONEXCEPTION_HXX
+
+#include "sal/config.h"
+#include "sal/types.h"
+#include "com/sun/star/deployment/VersionException.hpp"
+
+namespace dp_gui {
+
+    class DialogHelper;
+
+    SAL_DLLPUBLIC_EXPORT bool handleVersionException(
+            com::sun::star::deployment::VersionException verExc,
+            DialogHelper* pDialogHelper = 0 );
+}
+
+#endif
diff --git a/desktop/source/migration/wizard.cxx b/desktop/source/migration/wizard.cxx
index 990f8e8..db022a8 100644
--- a/desktop/source/migration/wizard.cxx
+++ b/desktop/source/migration/wizard.cxx
@@ -116,9 +116,11 @@ ResMgr *FirstStartWizard::GetResManager()
 }
 
 FirstStartWizard::FirstStartWizard( Window* pParent, sal_Bool bLicenseNeedsAcceptance, const rtl::OUString &rLicensePath )
-    :RoadmapWizard( pParent, WizardResId(DLG_FIRSTSTART_WIZARD),
-        WZB_NEXT|WZB_PREVIOUS|WZB_FINISH|WZB_CANCEL|WZB_HELP)
+    :RoadmapWizard( pParent,
+                    WizardResId(DLG_FIRSTSTART_WIZARD),
+                    WZB_NEXT|WZB_PREVIOUS|WZB_FINISH|WZB_CANCEL|WZB_HELP)
     ,m_bOverride(sal_False)
+    , m_lastState( STATE_WELCOME )
     ,m_aDefaultPath(0)
     ,m_aMigrationPath(0)
     ,m_bDone(sal_False)
@@ -129,9 +131,6 @@ FirstStartWizard::FirstStartWizard( Window* pParent, sal_Bool bLicenseNeedsAccep
     ,m_aLicensePath( rLicensePath )
 {
     FreeResource();
-    // ---
-//  enableState(STATE_USER, sal_False);
-//  enableState(STATE_REGISTRATION, sal_False);
 
     Size aTPSize(TP_WIDTH, TP_HEIGHT);
     SetPageSizePixel(LogicToPixel(aTPSize, MAP_APPFONT));
@@ -141,7 +140,6 @@ FirstStartWizard::FirstStartWizard( Window* pParent, sal_Bool bLicenseNeedsAccep
     m_pNextPage->SetHelpId(HID_FIRSTSTART_NEXT);
     m_pCancel->SetHelpId(HID_FIRSTSTART_CANCEL);
     m_pFinish->SetHelpId(HID_FIRSTSTART_FINISH);
-    // m_pHelp->SetUniqueId(UID_FIRSTSTART_HELP);
     m_pHelp->Hide();
     m_pHelp->Disable();
 
@@ -173,23 +171,25 @@ void FirstStartWizard::DisableButtonsWhileMigration()
 {
     ::svt::RoadmapWizardTypes::PathId aDefaultPath = 0;
 
-    sal_Bool bPage_Welcome      = sal_True;
     sal_Bool bPage_Migration    = sal_True;
-    sal_Bool bPage_User         = sal_True;
     sal_Bool bPage_UpdateCheck  = sal_True;
 
     bPage_Migration   = Migration::checkMigration();
     bPage_UpdateCheck = showOnlineUpdatePage();
 
     WizardPath aPath;
-    if (bPage_Welcome)
-        aPath.push_back(STATE_WELCOME);
+    aPath.push_back(STATE_WELCOME);
     if (bPage_Migration)
+    {
         aPath.push_back(STATE_MIGRATION);
-    if (bPage_User)
-        aPath.push_back(STATE_USER);
+    }
+    aPath.push_back(STATE_USER);
+    m_lastState = STATE_USER;
     if (bPage_UpdateCheck)
+    {
         aPath.push_back(STATE_UPDATE_CHECK);
+        m_lastState = STATE_UPDATE_CHECK;
+    }
 
     declarePath(aDefaultPath, aPath);
 
@@ -200,12 +200,11 @@ void FirstStartWizard::DisableButtonsWhileMigration()
     //    such direct links can be enabled by default.
     sal_Bool bAllowDirectLink = true;
 
-    if (bPage_User)
-        enableState(STATE_USER, bAllowDirectLink);
-    if (bPage_UpdateCheck)
-        enableState(STATE_UPDATE_CHECK, bAllowDirectLink);
+    enableState(STATE_USER, bAllowDirectLink);
     if (bPage_Migration)
         enableState(STATE_MIGRATION, bAllowDirectLink);
+    if (bPage_UpdateCheck)
+        enableState(STATE_UPDATE_CHECK, bAllowDirectLink);
 
     return aDefaultPath;
 }
@@ -252,15 +251,13 @@ void FirstStartWizard::enterState(WizardState _nState)
         // attach warning dialog to cancel/decline button
         m_pCancel->SetClickHdl( LINK(this, FirstStartWizard, DeclineHdl) );
         break;
-    case STATE_REGISTRATION:
+    }
+    if ( _nState == m_lastState )
+    {
         enableButtons(WZB_NEXT, sal_False);
         enableButtons(WZB_FINISH, sal_True);
         defaultButton(WZB_FINISH);
-        break;
     }
-
-    // focus
-
 }
 
 IMPL_LINK( FirstStartWizard, DeclineHdl, PushButton *, EMPTYARG )
diff --git a/desktop/source/migration/wizard.hxx b/desktop/source/migration/wizard.hxx
index b80db1c..5c48d4e 100644
--- a/desktop/source/migration/wizard.hxx
+++ b/desktop/source/migration/wizard.hxx
@@ -62,6 +62,7 @@ public:
 private:
     sal_Bool m_bOverride;
     WizardState _currentState;
+    WizardState m_lastState;
     ::svt::RoadmapWizardTypes::PathId m_aDefaultPath;
     ::svt::RoadmapWizardTypes::PathId m_aMigrationPath;
     String m_sNext;


More information about the Libreoffice-commits mailing list