You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by or...@apache.org on 2013/06/18 10:08:46 UTC
svn commit: r1494061 - in /openoffice/trunk/main/desktop: prj/ source/app/
source/deployment/gui/ source/deployment/inc/ source/inc/ source/migration/
Author: orw
Date: Tue Jun 18 08:08:46 2013
New Revision: 1494061
URL: http://svn.apache.org/r1494061
Log:
122398: re-activate the FirstStartWizard
Added:
openoffice/trunk/main/desktop/source/deployment/inc/dp_gui.mk (with props)
openoffice/trunk/main/desktop/source/inc/dp_gui_handleversionexception.hxx (with props)
Modified:
openoffice/trunk/main/desktop/prj/build.lst
openoffice/trunk/main/desktop/source/app/app.cxx
openoffice/trunk/main/desktop/source/app/makefile.mk
openoffice/trunk/main/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
openoffice/trunk/main/desktop/source/deployment/gui/makefile.mk
openoffice/trunk/main/desktop/source/migration/wizard.cxx
openoffice/trunk/main/desktop/source/migration/wizard.hxx
Modified: openoffice/trunk/main/desktop/prj/build.lst
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/prj/build.lst?rev=1494061&r1=1494060&r2=1494061&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/prj/build.lst (original)
+++ openoffice/trunk/main/desktop/prj/build.lst Tue Jun 18 08:08:46 2013
@@ -3,7 +3,7 @@ dt desktop usr1 - all dt_mkout N
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
Modified: openoffice/trunk/main/desktop/source/app/app.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/source/app/app.cxx?rev=1494061&r1=1494060&r2=1494061&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/source/app/app.cxx (original)
+++ openoffice/trunk/main/desktop/source/app/app.cxx Tue Jun 18 08:08:46 2013
@@ -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,18 +796,41 @@ void MinimalCommandEnv::handle(
css::uno::Reference< css::task::XInteractionRequest> const& xRequest)
throw ( css::uno::RuntimeException )
{
- 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;
- }
- }
+ 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 )
+ {
+ 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;
+ }
+ }
+ }
}
@@ -883,9 +909,8 @@ static bool needsInstallBundledExtension
// install bundled but non-pre-registered extension blobs
static void installBundledExtensionBlobs()
{
- rtl::OUString aDirUrl( OUSTR("$OOO_BASE_DIR/share/extensions/install"));
- ::rtl::Bootstrap::expandMacros( aDirUrl);
- ::osl::Directory aDir( aDirUrl);
+ rtl::OUString aDirUrl( OUSTR("$OOO_BASE_DIR/share/extensions/install"));
+ ::rtl::Bootstrap::expandMacros( 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.
@@ -896,57 +921,40 @@ static void installBundledExtensionBlobs
writeLastModified(sMarkerURL);
// get the ExtensionManager
- ::css::uno::Reference< ::css::uno::XComponentContext> xContext = comphelper::getProcessComponentContext();
- ::css::uno::Reference< ::css::deployment::XExtensionManager> xEM = ::css::deployment::ExtensionManager::get( xContext);
- // 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());
- }
- }
-
- // iterate over the bundled extension blobs
- ::osl::File::RC rc = aDir.open();
- while( rc == osl::File::E_None) {
- ::osl::DirectoryItem aDI;
- if( aDir.getNextItem( aDI) != osl::File::E_None)
- break;
- ::osl::FileStatus aFileStat( FileStatusMask_Type | FileStatusMask_FileURL);
- if( aDI.getFileStatus( aFileStat) != ::osl::File::E_None)
- 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;
- // 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&) {
- }
- }
+ ::css::uno::Reference< ::css::uno::XComponentContext> xContext = comphelper::getProcessComponentContext();
+ ::css::uno::Reference< ::css::deployment::XExtensionManager> xEM = ::css::deployment::ExtensionManager::get( xContext);
+ // 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);
+ ::css::uno::Reference< ::css::task::XAbortChannel> xAbortChannel;
+
+ 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)
+ {
+ ::osl::DirectoryItem aDI;
+ if( aDir.getNextItem( aDI) != osl::File::E_None)
+ break;
+ ::osl::FileStatus aFileStat( FileStatusMask_Type | FileStatusMask_FileURL);
+ if( aDI.getFileStatus( aFileStat) != ::osl::File::E_None)
+ continue;
+ if( aFileStat.getFileType() != ::osl::FileStatus::Regular)
+ continue;
+ try
+ {
+ // request to install the extension blob
+ 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();
}
}
Modified: openoffice/trunk/main/desktop/source/app/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/source/app/makefile.mk?rev=1494061&r1=1494060&r2=1494061&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/source/app/makefile.mk (original)
+++ openoffice/trunk/main/desktop/source/app/makefile.mk Tue Jun 18 08:08:46 2013
@@ -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) \
Modified: openoffice/trunk/main/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx?rev=1494061&r1=1494060&r2=1494061&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx (original)
+++ openoffice/trunk/main/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx Tue Jun 18 08:08:46 2013
@@ -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 >
//------------------------------------------------------------------------------
// 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::Refere
}
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)
{
Modified: openoffice/trunk/main/desktop/source/deployment/gui/makefile.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/source/deployment/gui/makefile.mk?rev=1494061&r1=1494060&r2=1494061&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/source/deployment/gui/makefile.mk (original)
+++ openoffice/trunk/main/desktop/source/deployment/gui/makefile.mk Tue Jun 18 08:08:46 2013
@@ -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 = \
Added: openoffice/trunk/main/desktop/source/deployment/inc/dp_gui.mk
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/source/deployment/inc/dp_gui.mk?rev=1494061&view=auto
==============================================================================
--- openoffice/trunk/main/desktop/source/deployment/inc/dp_gui.mk (added)
+++ openoffice/trunk/main/desktop/source/deployment/inc/dp_gui.mk Tue Jun 18 08:08:46 2013
@@ -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
Propchange: openoffice/trunk/main/desktop/source/deployment/inc/dp_gui.mk
------------------------------------------------------------------------------
svn:executable = *
Added: openoffice/trunk/main/desktop/source/inc/dp_gui_handleversionexception.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/source/inc/dp_gui_handleversionexception.hxx?rev=1494061&view=auto
==============================================================================
--- openoffice/trunk/main/desktop/source/inc/dp_gui_handleversionexception.hxx (added)
+++ openoffice/trunk/main/desktop/source/inc/dp_gui_handleversionexception.hxx Tue Jun 18 08:08:46 2013
@@ -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
Propchange: openoffice/trunk/main/desktop/source/inc/dp_gui_handleversionexception.hxx
------------------------------------------------------------------------------
svn:executable = *
Modified: openoffice/trunk/main/desktop/source/migration/wizard.cxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/source/migration/wizard.cxx?rev=1494061&r1=1494060&r2=1494061&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/source/migration/wizard.cxx (original)
+++ openoffice/trunk/main/desktop/source/migration/wizard.cxx Tue Jun 18 08:08:46 2013
@@ -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( Wind
,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( Wind
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::DisableButtonsWhi
{
::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::DisableButtonsWhi
// 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(Wizard
// 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 )
Modified: openoffice/trunk/main/desktop/source/migration/wizard.hxx
URL: http://svn.apache.org/viewvc/openoffice/trunk/main/desktop/source/migration/wizard.hxx?rev=1494061&r1=1494060&r2=1494061&view=diff
==============================================================================
--- openoffice/trunk/main/desktop/source/migration/wizard.hxx (original)
+++ openoffice/trunk/main/desktop/source/migration/wizard.hxx Tue Jun 18 08:08:46 2013
@@ -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;