summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/prj/d.lst4
-rw-r--r--desktop/qa/deployment_misc/makefile.mk1
-rw-r--r--desktop/source/app/app.cxx36
-rw-r--r--desktop/source/app/appinit.cxx5
-rw-r--r--desktop/source/app/cmdlineargs.cxx97
-rw-r--r--desktop/source/app/cmdlineargs.hxx4
-rw-r--r--desktop/source/app/copyright_ascii_ooo.c8
-rw-r--r--desktop/source/app/copyright_ascii_sun.c14
-rw-r--r--desktop/source/app/desktop.src2
-rw-r--r--desktop/source/app/langselect.cxx137
-rw-r--r--desktop/source/app/langselect.hxx1
-rw-r--r--desktop/source/app/version.map2
-rw-r--r--desktop/source/deployment/deployment.map8
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx3
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx8
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.hxx5
-rw-r--r--desktop/source/deployment/gui/makefile.mk2
-rw-r--r--desktop/source/deployment/inc/dp_descriptioninfoset.hxx16
-rw-r--r--desktop/source/deployment/makefile.mk2
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx44
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx68
-rw-r--r--desktop/source/inc/exithelper.hxx4
-rw-r--r--desktop/source/migration/migration.cxx134
-rw-r--r--desktop/source/migration/migration_impl.hxx38
-rw-r--r--desktop/source/migration/pages.cxx63
-rw-r--r--desktop/source/migration/pages.hxx5
-rwxr-xr-xdesktop/source/migration/services/cexportsoo3.cxx71
-rw-r--r--desktop/source/migration/services/makefile.mk50
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/migrationoo3.map (renamed from desktop/source/migration/services/migrationoo2.map)0
-rwxr-xr-xdesktop/source/migration/services/oo3extensionmigration.cxx656
-rwxr-xr-xdesktop/source/migration/services/oo3extensionmigration.hxx171
-rw-r--r--desktop/source/migration/wizard.cxx124
-rw-r--r--desktop/source/migration/wizard.hrc1
-rw-r--r--desktop/source/migration/wizard.hxx6
-rw-r--r--desktop/source/offacc/exports.map10
-rw-r--r--desktop/source/offacc/makefile.mk2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_app.cxx11
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx34
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_shared.h3
-rw-r--r--desktop/source/pkgchk/unopkg/version.map2
-rw-r--r--desktop/source/so_comp/exports.map10
-rw-r--r--desktop/source/so_comp/makefile.mk2
-rw-r--r--desktop/source/splash/exports.map10
-rw-r--r--desktop/source/splash/makefile.mk2
-rw-r--r--desktop/source/splash/splash.cxx65
-rw-r--r--desktop/source/splash/splash.hxx5
-rwxr-xr-xdesktop/test/deployment/simple_license/suppress_license.oxtbin0 -> 2143 bytes
-rw-r--r--desktop/test/deployment/simple_license/tests_simple_license.odtbin15621 -> 16629 bytes
-rw-r--r--desktop/util/ooverinfo.rc67
-rw-r--r--desktop/util/ooverinfo2.rc61
-rw-r--r--desktop/util/verinfo.rc12
-rw-r--r--desktop/win32/source/applauncher/makefile.mk2
-rw-r--r--desktop/win32/source/applauncher/ooo/makefile.mk2
-rw-r--r--desktop/zipintro/makefile.mk35
54 files changed, 1762 insertions, 363 deletions
diff --git a/desktop/prj/d.lst b/desktop/prj/d.lst
index 5ec84bca7d..92a4853c2b 100644
--- a/desktop/prj/d.lst
+++ b/desktop/prj/d.lst
@@ -59,8 +59,8 @@ mkdir: %_DEST%\bin%_EXT%\odf4ms
..\%__SRC%\lib\liboffacc*.so %_DEST%\lib%_EXT%\liboffacc*.so
..\%__SRC%\lib\liboffacc*.dylib %_DEST%\lib%_EXT%\liboffacc*.dylib
..\%__SRC%\bin\migratio*.dll %_DEST%\bin%_EXT%\migratio*.dll
-..\%__SRC%\lib\migrationoo2.uno.so %_DEST%\lib%_EXT%\migrationoo2.uno.so
-..\%__SRC%\lib\migrationoo2.uno.dylib %_DEST%\lib%_EXT%\migrationoo2.uno.dylib
+..\%__SRC%\lib\migratio*.uno.so %_DEST%\lib%_EXT%\migratio*.uno.so
+..\%__SRC%\lib\migratio*.uno.dylib %_DEST%\lib%_EXT%\migratio*.uno.dylib
..\%__SRC%\bin\sweb %_DEST%\bin%_EXT%\sweb.bin
diff --git a/desktop/qa/deployment_misc/makefile.mk b/desktop/qa/deployment_misc/makefile.mk
index 556df1a623..15faef0dc4 100644
--- a/desktop/qa/deployment_misc/makefile.mk
+++ b/desktop/qa/deployment_misc/makefile.mk
@@ -34,6 +34,7 @@ ENABLE_EXCEPTIONS := TRUE
.INCLUDE: settings.mk
.INCLUDE: $(PRJ)$/source$/deployment$/inc$/dp_misc.mk
+CFLAGSCXX += $(CPPUNIT_CFLAGS)
DLLPRE = # no leading "lib" on .so files
SHL1TARGET = $(TARGET)
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 5d7e2c72ef..c716a10d1a 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1149,16 +1149,6 @@ USHORT Desktop::Exception(USHORT nError)
switch( nError & EXC_MAJORTYPE )
{
-/*
- case EXC_USER:
- if( nError == EXC_OUTOFMEMORY )
- {
- // not possible without a special NewHandler!
- String aMemExceptionString;
- Application::Abort( aMemExceptionString );
- }
- break;
-*/
case EXC_RSCNOTLOADED:
{
String aResExceptionString;
@@ -1175,23 +1165,14 @@ USHORT Desktop::Exception(USHORT nError)
default:
{
- if ( pArgs->IsNoRestore() ) {
- if (m_pLockfile != NULL) {
- m_pLockfile->clean();
- }
- _exit( ExitHelper::E_LOCKFILE );
+ if (m_pLockfile != NULL) {
+ m_pLockfile->clean();
}
-
if( bRestart )
{
OfficeIPCThread::DisableOfficeIPCThread();
if( pSignalHandler )
DELETEZ( pSignalHandler );
-
- if (m_pLockfile != NULL) {
- m_pLockfile->clean();
- }
-
#ifdef MACOSX
DoRestart();
#endif
@@ -1199,17 +1180,15 @@ USHORT Desktop::Exception(USHORT nError)
}
else
{
- bInException = sal_False;
- _exit( ExitHelper::E_CRASH );
+ Application::Abort( String() );
}
break;
}
}
+ OSL_ASSERT(false); // unreachable
return 0;
-
- // ConfigManager is disposed, so no way to continue
}
void Desktop::AppEvent( const ApplicationEvent& rAppEvent )
@@ -1579,7 +1558,8 @@ void Desktop::Main()
// SetSplashScreenProgress(80);
- if ( !bTerminateRequested && !pCmdLineArgs->IsInvisible() )
+ if ( !bTerminateRequested && !pCmdLineArgs->IsInvisible() &&
+ !pCmdLineArgs->IsNoQuickstart() )
InitializeQuickstartMode( xSMgr );
RTL_LOGFILE_CONTEXT( aLog2, "desktop (cd100003) createInstance com.sun.star.frame.Desktop" );
@@ -1666,7 +1646,11 @@ void Desktop::Main()
// remove temp directory
RemoveTemporaryDirectory();
+ // The acceptors in the AcceptorMap must be released (in DeregisterServices)
+ // with the solar mutex unlocked, to avoid deadlock:
+ nAcquireCount = Application::ReleaseSolarMutex();
DeregisterServices();
+ Application::AcquireSolarMutex(nAcquireCount);
tools::DeInitTestToolLib();
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index c15ef44a4f..25798d913f 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -311,7 +311,6 @@ void Desktop::RegisterServices( Reference< XMultiServiceFactory >& xSMgr )
namespace
{
struct acceptorMap : public rtl::Static< AcceptorMap, acceptorMap > {};
- struct mtxAccMap : public rtl::Static< osl::Mutex, mtxAccMap > {};
struct CurrentTempURL : public rtl::Static< String, CurrentTempURL > {};
}
@@ -319,8 +318,6 @@ static sal_Bool bAccept = sal_False;
void Desktop::createAcceptor(const OUString& aAcceptString)
{
- // make sure nobody adds an acceptor whle we create one...
- osl::MutexGuard aGuard(mtxAccMap::get());
// check whether the requested acceptor already exists
AcceptorMap &rMap = acceptorMap::get();
AcceptorMap::const_iterator pIter = rMap.find(aAcceptString);
@@ -367,7 +364,6 @@ class enable
void Desktop::enableAcceptors()
{
RTL_LOGFILE_CONTEXT(aLog, "desktop (lo119109) Desktop::enableAcceptors");
- osl::MutexGuard aGuard(mtxAccMap::get());
if (!bAccept)
{
// from now on, all new acceptors are enabled
@@ -381,7 +377,6 @@ void Desktop::enableAcceptors()
void Desktop::destroyAcceptor(const OUString& aAcceptString)
{
- osl::MutexGuard aGuard(mtxAccMap::get());
// special case stop all acceptors
AcceptorMap &rMap = acceptorMap::get();
if (aAcceptString.compareToAscii("all") == 0) {
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 758d797fd4..c142c5f96a 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -227,7 +227,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bViewEvent = sal_False;
bStartEvent = sal_False;
bDisplaySpec = sal_False;
- }
+ }
else if ( aArgStr.EqualsIgnoreCaseAscii( "-view" ))
{
// open in viewmode
@@ -239,31 +239,43 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bViewEvent = sal_True;
bStartEvent = sal_False;
bDisplaySpec = sal_False;
- }
+ }
else if ( aArgStr.EqualsIgnoreCaseAscii( "-show" ))
{
- // open in viewmode
- bOpenEvent = sal_False;
- bViewEvent = sal_False;
- bStartEvent = sal_True;
- bPrintEvent = sal_False;
- bPrintToEvent = sal_False;
- bForceNewEvent = sal_False;
- bForceOpenEvent = sal_False;
- bDisplaySpec = sal_False;
+ // open in viewmode
+ bOpenEvent = sal_False;
+ bViewEvent = sal_False;
+ bStartEvent = sal_True;
+ bPrintEvent = sal_False;
+ bPrintToEvent = sal_False;
+ bForceNewEvent = sal_False;
+ bForceOpenEvent = sal_False;
+ bDisplaySpec = sal_False;
}
else if ( aArgStr.EqualsIgnoreCaseAscii( "-display" ))
{
- // open in viewmode
- bOpenEvent = sal_False;
- bPrintEvent = sal_False;
- bForceOpenEvent = sal_False;
- bPrintToEvent = sal_False;
- bForceNewEvent = sal_False;
- bViewEvent = sal_False;
- bStartEvent = sal_False;
- bDisplaySpec = sal_True;
+ // set display
+ bOpenEvent = sal_False;
+ bPrintEvent = sal_False;
+ bForceOpenEvent = sal_False;
+ bPrintToEvent = sal_False;
+ bForceNewEvent = sal_False;
+ bViewEvent = sal_False;
+ bStartEvent = sal_False;
+ bDisplaySpec = sal_True;
+ }
+ else if ( aArgStr.EqualsIgnoreCaseAscii( "-language" ))
+ {
+ bOpenEvent = sal_False;
+ bPrintEvent = sal_False;
+ bForceOpenEvent = sal_False;
+ bPrintToEvent = sal_False;
+ bForceNewEvent = sal_False;
+ bViewEvent = sal_False;
+ bStartEvent = sal_False;
+ bDisplaySpec = sal_False;
}
+
#ifdef MACOSX
/* #i84053# ignore -psn on Mac
Platform dependent #ifdef here is ugly, however this is currently
@@ -272,15 +284,15 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
*/
else if ( aArgStr.CompareToAscii( "-psn", 4 ) == COMPARE_EQUAL )
{
- // finder argument from MacOSX
- bOpenEvent = sal_False;
- bPrintEvent = sal_False;
- bForceOpenEvent = sal_False;
- bPrintToEvent = sal_False;
- bForceNewEvent = sal_False;
- bViewEvent = sal_False;
- bStartEvent = sal_False;
- bDisplaySpec = sal_False;
+ // finder argument from MacOSX
+ bOpenEvent = sal_False;
+ bPrintEvent = sal_False;
+ bForceOpenEvent = sal_False;
+ bPrintToEvent = sal_False;
+ bForceNewEvent = sal_False;
+ bViewEvent = sal_False;
+ bStartEvent = sal_False;
+ bDisplaySpec = sal_False;
}
#endif
}
@@ -387,6 +399,13 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
#if defined(WNT) || defined(OS2) || defined(QUARTZ)
SetBoolParam_Impl( CMD_BOOLPARAM_QUICKSTART, sal_True );
#endif
+ SetBoolParam_Impl( CMD_BOOLPARAM_NOQUICKSTART, sal_False );
+ return sal_True;
+ }
+ else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-quickstart=no" )))
+ {
+ SetBoolParam_Impl( CMD_BOOLPARAM_NOQUICKSTART, sal_True );
+ SetBoolParam_Impl( CMD_BOOLPARAM_QUICKSTART, sal_False );
return sal_True;
}
else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-terminate_after_init" )) == sal_True )
@@ -502,7 +521,12 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
}
else if ( aArgStr.Copy(0, 9).EqualsIgnoreCaseAscii( "-version=" ))
{
- AddStringListParam_Impl( CMD_STRINGPARAM_VERSION, aArgStr.Copy( 15 ) );
+ AddStringListParam_Impl( CMD_STRINGPARAM_VERSION, aArgStr.Copy( 9 ) );
+ return sal_True;
+ }
+ else if ( aArgStr.Copy(0, 10).EqualsIgnoreCaseAscii( "-language=" ))
+ {
+ AddStringListParam_Impl( CMD_STRINGPARAM_LANGUAGE, aArgStr.Copy( 10 ) );
return sal_True;
}
else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-writer" )) == sal_True )
@@ -645,6 +669,12 @@ sal_Bool CommandLineArgs::IsQuickstart() const
return m_aBoolParams[ CMD_BOOLPARAM_QUICKSTART ];
}
+sal_Bool CommandLineArgs::IsNoQuickstart() const
+{
+ osl::MutexGuard aMutexGuard( m_aMutex );
+ return m_aBoolParams[ CMD_BOOLPARAM_NOQUICKSTART ];
+}
+
sal_Bool CommandLineArgs::IsTerminateAfterInit() const
{
osl::MutexGuard aMutexGuard( m_aMutex );
@@ -845,6 +875,13 @@ sal_Bool CommandLineArgs::GetPrinterName( ::rtl::OUString& rPara ) const
return m_aStrSetParams[ CMD_STRINGPARAM_PRINTERNAME ];
}
+sal_Bool CommandLineArgs::GetLanguage( ::rtl::OUString& rPara ) const
+{
+ osl::MutexGuard aMutexGuard( m_aMutex );
+ rPara = m_aStrParams[ CMD_STRINGPARAM_LANGUAGE ];
+ return m_aStrSetParams[ CMD_STRINGPARAM_LANGUAGE ];
+}
+
sal_Bool CommandLineArgs::IsEmpty() const
{
osl::MutexGuard aMutexGuard( m_aMutex );
diff --git a/desktop/source/app/cmdlineargs.hxx b/desktop/source/app/cmdlineargs.hxx
index fda4ab77cb..569dd5ccbc 100644
--- a/desktop/source/app/cmdlineargs.hxx
+++ b/desktop/source/app/cmdlineargs.hxx
@@ -48,6 +48,7 @@ class CommandLineArgs
CMD_BOOLPARAM_SERVER,
CMD_BOOLPARAM_HEADLESS,
CMD_BOOLPARAM_QUICKSTART,
+ CMD_BOOLPARAM_NOQUICKSTART,
CMD_BOOLPARAM_TERMINATEAFTERINIT,
CMD_BOOLPARAM_NOFIRSTSTARTWIZARD,
CMD_BOOLPARAM_NOLOGO,
@@ -90,6 +91,7 @@ class CommandLineArgs
CMD_STRINGPARAM_PRINTTOLIST,
CMD_STRINGPARAM_PRINTERNAME,
CMD_STRINGPARAM_DISPLAY,
+ CMD_STRINGPARAM_LANGUAGE,
CMD_STRINGPARAM_COUNT // must be last element!
};
@@ -131,6 +133,7 @@ class CommandLineArgs
sal_Bool IsServer() const;
sal_Bool IsHeadless() const;
sal_Bool IsQuickstart() const;
+ sal_Bool IsNoQuickstart() const;
sal_Bool IsTerminateAfterInit() const;
sal_Bool IsNoFirstStartWizard() const;
sal_Bool IsNoLogo() const;
@@ -165,6 +168,7 @@ class CommandLineArgs
sal_Bool GetPrintList( ::rtl::OUString& rPara) const;
sal_Bool GetPrintToList( ::rtl::OUString& rPara ) const;
sal_Bool GetPrinterName( ::rtl::OUString& rPara ) const;
+ sal_Bool GetLanguage( ::rtl::OUString& rPara ) const;
// Special analyzed states (does not match directly to a command line parameter!)
sal_Bool IsPrinting() const;
diff --git a/desktop/source/app/copyright_ascii_ooo.c b/desktop/source/app/copyright_ascii_ooo.c
index 8d9d821e19..4224419e99 100644
--- a/desktop/source/app/copyright_ascii_ooo.c
+++ b/desktop/source/app/copyright_ascii_ooo.c
@@ -5,12 +5,6 @@
*/
extern const char copyright_text_1[];
-extern const char copyright_text_2[];
-extern const char copyright_text_21[];
-extern const char copyright_text_22[];
-const char copyright_text_1[] = "Copyright © 2010 Sun Microsystems, Inc., All rights reserved.";
-const char copyright_text_2[] = "Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent applications in the U.S. and in other countries.";
-const char copyright_text_21[] = "Copyright © 2010 Sun Microsystems, Tous droits réservés.";
-const char copyright_text_22[] = "Sun Microsystems, Inc. a les droits de propriété intellectuels relatants à la technologie incorporée dans ce produit. En particulier, et sans la limitation, ces droits de propriété intellectuels peuvent inclure un ou plus des brevets américains énumérés à http://www.sun.com/patents et un ou les brevets plus supplémentaires ou les applications de brevet en attente dans les États - Unis et les autres pays.";
+const char copyright_text_1[] = "Copyright © 2000, 2010 Oracle and/or its affiliates, All rights reserved.";
diff --git a/desktop/source/app/copyright_ascii_sun.c b/desktop/source/app/copyright_ascii_sun.c
index 3d437af856..f9950118e8 100644
--- a/desktop/source/app/copyright_ascii_sun.c
+++ b/desktop/source/app/copyright_ascii_sun.c
@@ -4,17 +4,5 @@
*
*/
-const char copyright_text_1[] = "Copyright © 2010 Sun Microsystems, Inc., All rights reserved.";
-const char copyright_text_2[] = "Sun Microsystems, Inc. has intellectual property rights relating to technology embodied in the product that is described in this document. In particular, and without limitation, these intellectual property rights may include one or more of the U.S. patents listed at http://www.sun.com/patents and one or more additional patents or pending patent applications in the U.S. and in other countries.";
-const char copyright_text_3[] = "U.S. Government Rights - Commercial software. Government users are subject to the Sun Microsystems, Inc. standard license agreement and applicable provisions of the FAR and its supplements. Use is subject to license terms.";
-const char copyright_text_4[] = "This distribution may include materials developed by third parties.Sun, Sun Microsystems, the Sun logo, Java, Solaris and StarOffice are trademarks or registered trademarks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trademarks of SPARC International, Inc. in the U.S. and other countries.";
-const char copyright_text_5[] = "UNIX is a registered trademark in the U.S. and other countries, exclusively licensed through X/Open Company, Ltd.";
-const char copyright_text_21[] = "Copyright © 2010 Sun Microsystems, Tous droits réservés.";
-const char copyright_text_22[] = "Sun Microsystems, Inc. a les droits de propriété intellectuels relatants à la technologie incorporée dans ce produit. En particulier, et sans la limitation, ces droits de propriété intellectuels peuvent inclure un ou plus des brevets américains énumérés à http://www.sun.com/patents et un ou les brevets plus supplémentaires ou les applications de brevet en attente dans les États - Unis et les autres pays.";
-const char copyright_text_23[] = "Ce produit ou document est protégé par un copyright et distribué avec des licences qui en restreignent l'utilisation, la copie, la distribution, et la décompilation. Aucune partie de ce produit ou document ne peut être reproduite sous aucune forme, par quelque moyen que ce soit, sans l'autorisation préalable et écrite de Sun et de ses bailleurs de licence, s'il y ena.";
-const char copyright_text_24[] = "L'utilisation est soumise aux termes du contrat de licence.";
-const char copyright_text_25[] = "Cette distribution peut comprendre des composants développés par des tierces parties.";
-const char copyright_text_26[] = "Sun, Sun Microsystems, le logo Sun, Java, Solaris et StarOffice sont des marques de fabrique ou des marques déposées de Sun Microsystems, Inc. aux Etats-Unis et dans d'autres pay";
-const char copyright_text_27[] = "Toutes les marques SPARC sont utilisées sous licence et sont des marques de fabrique ou des marques déposées de SPARC International, Inc. aux Etats-Unis et dans d'autres pay";
-const char copyright_text_28[] = "UNIX est une marque déposée aux Etats-Unis et dans d'autres pays et licenciée exlusivement par X/Open Company, Ltd.";
+const char copyright_text_1[] = "Copyright © 2000, 2010 Oracle and/or its affiliates, All rights reserved.";
diff --git a/desktop/source/app/desktop.src b/desktop/source/app/desktop.src
index f172efb309..e333c44181 100644
--- a/desktop/source/app/desktop.src
+++ b/desktop/source/app/desktop.src
@@ -209,7 +209,7 @@ InfoBox INFOBOX_EXPIRED
{
Buttons = WB_OK ;
DefButton = WB_DEF_OK ;
- Message [ en-US ] = "This Evaluation Version has expired. To find out more about %PRODUCTNAME,\nvisit www.sun.com/%PRODUCTNAME.";
+ Message [ en-US ] = "This Evaluation Version has expired. To find out more about %PRODUCTNAME,\nvisit http://www.oracle.com/us/products/applications/open-office.";
};
String STR_TITLE_EXPIRED
diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx
index 62b3c89922..f5cdc3e307 100644
--- a/desktop/source/app/langselect.cxx
+++ b/desktop/source/app/langselect.cxx
@@ -30,15 +30,14 @@
#include "app.hxx"
#include "langselect.hxx"
+#include "cmdlineargs.hxx"
#include <stdio.h>
-#ifndef _RTL_STRING_HXX
#include <rtl/string.hxx>
-#endif
-#ifndef _SVTOOLS_PATHOPTIONS_HXX
+#include <rtl/bootstrap.hxx>
#include <unotools/pathoptions.hxx>
-#endif
#include <tools/resid.hxx>
+#include <tools/config.hxx>
#include <i18npool/mslangid.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/container/XNameAccess.hpp>
@@ -52,6 +51,7 @@
#include <rtl/locale.hxx>
#include <rtl/instance.hxx>
#include <osl/process.h>
+#include <osl/file.hxx>
using namespace rtl;
using namespace com::sun::star::uno;
@@ -62,10 +62,54 @@ using namespace com::sun::star::util;
namespace desktop {
+static char const SOFFICE_BOOTSTRAP[] = "Bootstrap";
+static char const SOFFICE_STARTLANG[] = "STARTLANG";
sal_Bool LanguageSelection::bFoundLanguage = sal_False;
OUString LanguageSelection::aFoundLanguage;
const OUString LanguageSelection::usFallbackLanguage = OUString::createFromAscii("en-US");
+
+static sal_Bool existsURL( OUString const& sURL )
+{
+ using namespace osl;
+ DirectoryItem aDirItem;
+
+ if (sURL.getLength() != 0)
+ return ( DirectoryItem::get( sURL, aDirItem ) == DirectoryItem::E_None );
+
+ return sal_False;
+}
+
+// locate soffice.ini/.rc file
+static OUString locateSofficeIniFile()
+{
+ OUString aUserDataPath;
+ OUString aSofficeIniFileURL;
+
+ // Retrieve the default file URL for the soffice.ini/rc
+ rtl::Bootstrap().getIniName( aSofficeIniFileURL );
+
+ if ( utl::Bootstrap::locateUserData( aUserDataPath ) == utl::Bootstrap::PATH_EXISTS )
+ {
+ const char CONFIG_DIR[] = "/config";
+
+ sal_Int32 nIndex = aSofficeIniFileURL.lastIndexOf( '/');
+ if ( nIndex > 0 )
+ {
+ OUString aUserSofficeIniFileURL;
+ OUStringBuffer aBuffer( aUserDataPath );
+ aBuffer.appendAscii( CONFIG_DIR );
+ aBuffer.append( aSofficeIniFileURL.copy( nIndex ));
+ aUserSofficeIniFileURL = aBuffer.makeStringAndClear();
+
+ if ( existsURL( aUserSofficeIniFileURL ))
+ return aUserSofficeIniFileURL;
+ }
+ }
+ // Fallback try to use the soffice.ini/rc from program folder
+ return aSofficeIniFileURL;
+}
+
Locale LanguageSelection::IsoStringToLocale(const OUString& str)
{
Locale l;
@@ -119,8 +163,51 @@ bool LanguageSelection::prepareLanguage()
catch (Exception&)
{
}
+
// get the selected UI language as string
- OUString aLocaleString = getLanguageString();
+ bool bCmdLanguage( false );
+ bool bIniLanguage( false );
+ OUString aEmpty;
+ OUString aLocaleString = getUserUILanguage();
+
+ if ( aLocaleString.getLength() == 0 )
+ {
+ CommandLineArgs* pCmdLineArgs = Desktop::GetCommandLineArgs();
+ if ( pCmdLineArgs )
+ {
+ pCmdLineArgs->GetLanguage(aLocaleString);
+ if (isInstalledLanguage(aLocaleString, sal_False))
+ {
+ bCmdLanguage = true;
+ bFoundLanguage = true;
+ aFoundLanguage = aLocaleString;
+ }
+ else
+ aLocaleString = aEmpty;
+ }
+
+ if ( !bCmdLanguage )
+ {
+ OUString aSOfficeIniURL = locateSofficeIniFile();
+ Config aConfig(aSOfficeIniURL);
+ aConfig.SetGroup( SOFFICE_BOOTSTRAP );
+ OString sLang = aConfig.ReadKey( SOFFICE_STARTLANG );
+ aLocaleString = OUString( sLang.getStr(), sLang.getLength(), RTL_TEXTENCODING_ASCII_US );
+ if (isInstalledLanguage(aLocaleString, sal_False))
+ {
+ bIniLanguage = true;
+ bFoundLanguage = true;
+ aFoundLanguage = aLocaleString;
+ }
+ else
+ aLocaleString = aEmpty;
+ }
+ }
+
+ // user further fallbacks for the UI language
+ if ( aLocaleString.getLength() == 0 )
+ aLocaleString = getLanguageString();
+
if ( aLocaleString.getLength() > 0 )
{
try
@@ -137,9 +224,21 @@ bool LanguageSelection::prepareLanguage()
theConfigProvider->setLocale(loc);
Reference< XPropertySet > xProp(getConfigAccess("org.openoffice.Setup/L10N/", sal_True), UNO_QUERY_THROW);
- xProp->setPropertyValue(OUString::createFromAscii("ooLocale"), makeAny(aLocaleString));
- Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges();
-
+ if ( !bCmdLanguage )
+ {
+ // Store language only
+ xProp->setPropertyValue(OUString::createFromAscii("ooLocale"), makeAny(aLocaleString));
+ Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges();
+ }
+
+ if ( bIniLanguage )
+ {
+ // Store language only
+ Reference< XPropertySet > xProp2(getConfigAccess("org.openoffice.Office.Linguistic/General/", sal_True), UNO_QUERY_THROW);
+ xProp2->setPropertyValue(OUString::createFromAscii("UILocale"), makeAny(aLocaleString));
+ Reference< XChangesBatch >(xProp2, UNO_QUERY_THROW)->commitChanges();
+ }
+
MsLangId::setConfiguredSystemUILanguage( MsLangId::convertLocaleToLanguage(loc) );
OUString sLocale;
@@ -165,7 +264,7 @@ bool LanguageSelection::prepareLanguage()
}
}
-
+
// #i32939# setting of default document locale
// #i32939# this should not be based on the UI language
setDefaultLanguage(aLocaleString);
@@ -197,11 +296,8 @@ void LanguageSelection::setDefaultLanguage(const OUString& sLocale)
}
}
-OUString LanguageSelection::getLanguageString()
+OUString LanguageSelection::getUserUILanguage()
{
- // did we already find a language?
- if (bFoundLanguage)
- return aFoundLanguage;
// check whether the user has selected a specific language
OUString aUserLanguage = getUserLanguage();
if (aUserLanguage.getLength() > 0 )
@@ -219,6 +315,21 @@ OUString LanguageSelection::getLanguageString()
resetUserLanguage();
}
}
+
+ return aUserLanguage;
+}
+
+OUString LanguageSelection::getLanguageString()
+{
+ // did we already find a language?
+ if (bFoundLanguage)
+ return aFoundLanguage;
+
+ // check whether the user has selected a specific language
+ OUString aUserLanguage = getUserUILanguage();
+ if (aUserLanguage.getLength() > 0 )
+ return aUserLanguage ;
+
// try to use system default
aUserLanguage = getSystemLanguage();
if (aUserLanguage.getLength() > 0 )
diff --git a/desktop/source/app/langselect.hxx b/desktop/source/app/langselect.hxx
index 8d94b28b32..536bff8928 100644
--- a/desktop/source/app/langselect.hxx
+++ b/desktop/source/app/langselect.hxx
@@ -50,6 +50,7 @@ private:
static com::sun::star::uno::Sequence< rtl::OUString > getInstalledLanguages();
static sal_Bool isInstalledLanguage(rtl::OUString& usLocale, sal_Bool bExact=sal_False);
static rtl::OUString getFirstInstalledLanguage();
+ static rtl::OUString getUserUILanguage();
static rtl::OUString getUserLanguage();
static rtl::OUString getSystemLanguage();
static void resetUserLanguage();
diff --git a/desktop/source/app/version.map b/desktop/source/app/version.map
index e2d9026465..ad52c57cc1 100644
--- a/desktop/source/app/version.map
+++ b/desktop/source/app/version.map
@@ -25,7 +25,7 @@
#
#*************************************************************************
-soffice.3 {
+UDK_3_0_0 {
global:
soffice_main;
diff --git a/desktop/source/deployment/deployment.map b/desktop/source/deployment/deployment.map
deleted file mode 100644
index 563b3d86a5..0000000000
--- a/desktop/source/deployment/deployment.map
+++ /dev/null
@@ -1,8 +0,0 @@
-UDK_3_1_0 {
- global:
- component_getImplementationEnvironment;
- component_writeInfo;
- component_getFactory;
- local:
- *;
-};
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 8f79fc5820..2a0cef61b8 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -90,8 +90,7 @@ using ::rtl::OUString;
namespace dp_gui {
-#define ICON_OFFSET 50
-#define TOP_OFFSET 3
+#define TOP_OFFSET 5
#define LINE_SIZE 4
#define PROGRESS_WIDTH 60
#define PROGRESS_HEIGHT 14
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 2852e67e7d..e974d7ab21 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -520,10 +520,10 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl pEntr
else
aImage = isHCMode() ? pEntry->m_aIconHC : pEntry->m_aIcon;
Size aImageSize = aImage.GetSizePixel();
- if ( ( aImageSize.Width() <= ICON_HEIGHT ) && ( aImageSize.Height() <= ICON_HEIGHT ) )
- DrawImage( Point( aPos.X()+((ICON_HEIGHT-aImageSize.Width())/2), aPos.Y()+((ICON_HEIGHT-aImageSize.Height())/2) ), aImage );
+ if ( ( aImageSize.Width() <= ICON_WIDTH ) && ( aImageSize.Height() <= ICON_HEIGHT ) )
+ DrawImage( Point( aPos.X()+((ICON_WIDTH-aImageSize.Width())/2), aPos.Y()+((ICON_HEIGHT-aImageSize.Height())/2) ), aImage );
else
- DrawImage( aPos, Size( ICON_HEIGHT, ICON_HEIGHT ), aImage );
+ DrawImage( aPos, Size( ICON_WIDTH, ICON_HEIGHT ), aImage );
// Setup fonts
Font aStdFont( GetFont() );
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
index 2749db99ce..18f9844349 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
@@ -45,9 +45,10 @@
namespace dp_gui {
#define SMALL_ICON_SIZE 16
-#define TOP_OFFSET 3
+#define TOP_OFFSET 5
#define ICON_HEIGHT 42
-#define ICON_OFFSET 50
+#define ICON_WIDTH 47
+#define ICON_OFFSET 72
#define RIGHT_ICON_OFFSET 5
#define SPACE_BETWEEN 3
diff --git a/desktop/source/deployment/gui/makefile.mk b/desktop/source/deployment/gui/makefile.mk
index b55ad49421..6a9c7b6bbb 100644
--- a/desktop/source/deployment/gui/makefile.mk
+++ b/desktop/source/deployment/gui/makefile.mk
@@ -60,7 +60,7 @@ SLOFILES = \
$(SLO)$/descedit.obj
SHL1TARGET = $(TARGET)$(DLLPOSTFIX).uno
-SHL1VERSIONMAP = ..$/deployment.map
+SHL1VERSIONMAP = $(SOLARENV)/src/component.map
SHL1STDLIBS = \
$(SALLIB) \
diff --git a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
index cd964761da..80c46df937 100644
--- a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
+++ b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
@@ -53,6 +53,15 @@ namespace rtl { class OUString; }
namespace dp_misc {
+struct DESKTOP_DEPLOYMENTMISC_DLLPUBLIC SimpleLicenseAttributes
+{
+ ::rtl::OUString acceptBy;
+ //Attribute suppress-on-update. Default is false.
+ bool suppressOnUpdate;
+ //Attribute suppress-if-required. Default is false.
+ bool suppressIfRequired;
+};
+
/**
Access to the content of an XML <code>description</code> element.
@@ -132,6 +141,13 @@ public:
*/
::rtl::OUString getLocalizedLicenseURL() const;
+ /** returns the attributes of the simple-license element
+
+ As long as there is a simple-license element, the function will return
+ the structure. If it does not exist, then the optional object is uninitialized.
+ */
+ ::boost::optional<SimpleLicenseAttributes> getSimpleLicenseAttributes() const;
+
/** returns the localized display name of the extensions.
In case there is no localized display-name then an empty string is returned.
diff --git a/desktop/source/deployment/makefile.mk b/desktop/source/deployment/makefile.mk
index f11f87ad56..7eda0f582e 100644
--- a/desktop/source/deployment/makefile.mk
+++ b/desktop/source/deployment/makefile.mk
@@ -49,7 +49,7 @@ INCPRE += inc
DLLPRE =
SHL1TARGET = $(TARGET)$(DLLPOSTFIX).uno
-SHL1VERSIONMAP = deployment.map
+SHL1VERSIONMAP = $(SOLARENV)/src/component.map
SHL1LIBS = \
$(SLB)$/deployment_manager.lib \
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index 1ecb757d07..73df2b0168 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -370,6 +370,50 @@ css::uno::Sequence< ::rtl::OUString > DescriptionInfoset::getUrls(
}
+::boost::optional<SimpleLicenseAttributes>
+DescriptionInfoset::getSimpleLicenseAttributes() const
+{
+ //Check if the node exist
+ css::uno::Reference< css::xml::dom::XNode > n;
+ if (m_element.is()) {
+ try {
+ n = m_xpath->selectSingleNode(m_element,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "/desc:description/desc:registration/desc:simple-license/@accept-by")));
+ } catch (css::xml::xpath::XPathException &) {
+ // ignore
+ }
+ if (n.is())
+ {
+ SimpleLicenseAttributes attributes;
+ attributes.acceptBy =
+ getNodeValueFromExpression(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "/desc:description/desc:registration/desc:simple-license/@accept-by")));
+
+ ::boost::optional< ::rtl::OUString > suppressOnUpdate = getOptionalValue(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "/desc:description/desc:registration/desc:simple-license/@suppress-on-update")));
+ if (suppressOnUpdate)
+ attributes.suppressOnUpdate = (*suppressOnUpdate).trim().equalsIgnoreAsciiCase(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("true")));
+ else
+ attributes.suppressOnUpdate = false;
+
+ ::boost::optional< ::rtl::OUString > suppressIfRequired = getOptionalValue(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "/desc:description/desc:registration/desc:simple-license/@suppress-if-required")));
+ if (suppressIfRequired)
+ attributes.suppressIfRequired = (*suppressIfRequired).trim().equalsIgnoreAsciiCase(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("true")));
+ else
+ attributes.suppressIfRequired = false;
+
+ return ::boost::optional<SimpleLicenseAttributes>(attributes);
+ }
+ }
+ return ::boost::optional<SimpleLicenseAttributes>();
+}
+
::rtl::OUString DescriptionInfoset::getLocalizedDescriptionURL() const
{
return getLocalizedHREFAttrFromChild(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index bffe47b5e7..8a61eb026f 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -70,7 +70,7 @@
#include "com/sun/star/xml/dom/XDocumentBuilder.hpp"
#include "com/sun/star/xml/xpath/XXPathAPI.hpp"
#include "com/sun/star/deployment/XPackageManager.hpp"
-
+#include "boost/optional.hpp"
#include <vector>
#include <stdio.h>
@@ -583,21 +583,12 @@ bool BackendImpl::PackageImpl::checkDependencies(
{
try
{
- css::uno::Reference<css::xml::dom::XNode> xRoot = desc.getRootElement();
- css::uno::Reference<css::xml::xpath::XXPathAPI> xPath =
- getDescriptionInfoset().getXpath();
-
- css::uno::Reference<css::xml::dom::XNode> nodeSimpleLic;
- try {
- nodeSimpleLic = xPath->selectSingleNode(xRoot,
- OUSTR("/desc:description/desc:registration/desc:simple-license"));
- } catch (css::xml::xpath::XPathException &) {
- // ignore
- }
-
- if (!nodeSimpleLic.is())
+ DescriptionInfoset info = getDescriptionInfoset();
+ ::boost::optional<SimpleLicenseAttributes> simplLicAttr
+ = info.getSimpleLicenseAttributes();
+ if (! simplLicAttr)
return true;
- OUString sLic = getDescriptionInfoset().getLocalizedLicenseURL();
+ OUString sLic = info.getLocalizedLicenseURL();
//If we do not get a localized licence then there is an error in the description.xml
//This should be handled by using a validating parser. Therefore we assume that no
//license is available.
@@ -606,23 +597,20 @@ bool BackendImpl::PackageImpl::checkDependencies(
OUSTR("Could not obtain path to license. Possible error in description.xml"), 0, Any());
OUString sHref = desc.getExtensionRootUrl() + OUSTR("/") + sLic;
OUString sLicense = getTextFromURL(xCmdEnv, sHref);
- //determine who has to agree to the license
- css::uno::Reference<css::xml::xpath::XXPathObject> nodeAttribWho3 =
- xPath->eval(nodeSimpleLic,
- OUSTR("@accept-by"));
- OUString sAccept = nodeAttribWho3->getString().trim();
+ ////determine who has to agree to the license
//check correct value for attribute
- if ( ! (sAccept.equals(OUSTR("user")) || sAccept.equals(OUSTR("admin"))))
+ if ( ! (simplLicAttr->acceptBy.equals(OUSTR("user")) || simplLicAttr->acceptBy.equals(OUSTR("admin"))))
throw css::deployment::DeploymentException(
OUSTR("Could not obtain attribute simple-lincense@accept-by or it has no valid value"), 0, Any());
//If if @accept-by="user" then every user needs to accept the license before it can be installed.
- //Therefore we must prevent the installation as shared extension.
+ //Therefore we must prevent the installation as shared extension unless suppress-if-required="true"
OSL_ASSERT(aContextName.getLength());
- if (sAccept.equals(OUSTR("user")) && aContextName.equals(OUSTR("shared")))
+ if (simplLicAttr->acceptBy.equals(OUSTR("user")) && aContextName.equals(OUSTR("shared")))
{
- css::deployment::LicenseIndividualAgreementException exc =
- css::deployment::LicenseIndividualAgreementException(OUString(), 0, m_name);
+ css::deployment::LicenseIndividualAgreementException
+ exc = css::deployment::LicenseIndividualAgreementException(
+ OUString(), 0, m_name, simplLicAttr->suppressIfRequired);
bool approve = false;
bool abort = false;
@@ -632,32 +620,24 @@ bool BackendImpl::PackageImpl::checkDependencies(
OUSTR("Could not interact with user."), 0, Any());
if (abort == true)
return false;
- //We should always prevent installation
- OSL_ASSERT(0);
- }
-
- //determine optional attribute simple-license@suppressOnUpdate
- css::uno::Reference<css::xml::dom::XElement> elemSimpleLic(nodeSimpleLic, css::uno::UNO_QUERY_THROW);
- sal_Bool bSuppress = sal_False;
- if (elemSimpleLic->hasAttribute(OUSTR("suppress-on-update")))
- {
- if (elemSimpleLic->getAttribute(OUSTR("suppress-on-update")).equals(OUSTR("true")))
- bSuppress = sal_True;
+
+ //If the unopkg --suppress-license was used and simplLicAttr->suppressIfRequired == true,
+ //then the user implicitely accepts the license
}
//Only use interaction if there is no version of this extension already installed
//and the suppress-on-update flag is not set for the new extension
- // bInstalled | bSuppress | show license
+ // bInstalled | bSuppressOnUpdate | show license
//----------------------------------------
- // 0 | 0 | 1
- // 0 | 1 | 1
- // 1 | 0 | 1
- // 1 | 1 | 0
+ // 0 | 0 | 1
+ // 0 | 1 | 1
+ // 1 | 0 | 1
+ // 1 | 1 | 0
- if ( !(bInstalled && bSuppress))
+ if ( !(bInstalled && simplLicAttr->suppressOnUpdate))
{
- css::deployment::LicenseException licExc =
- css::deployment::LicenseException(OUString(), 0, m_name, sLicense);
+ css::deployment::LicenseException licExc(
+ OUString(), 0, m_name, sLicense, simplLicAttr->suppressIfRequired);
bool approve = false;
bool abort = false;
if (! interactContinuation(
diff --git a/desktop/source/inc/exithelper.hxx b/desktop/source/inc/exithelper.hxx
index 112d4848f0..682410c6b7 100644
--- a/desktop/source/inc/exithelper.hxx
+++ b/desktop/source/inc/exithelper.hxx
@@ -56,12 +56,8 @@ class ExitHelper
E_SECOND_OFFICE = 1,
/// an uno exception was catched during startup
E_FATAL_ERROR = 333, // Only the low 8 bits are significant 333 % 256 = 77
- /// crash during runtime
- E_CRASH = 78,
/// user force automatic restart after crash
E_CRASH_WITH_RESTART = 79,
- /// ???
- E_LOCKFILE = 80
};
};
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 3de12d3b2c..ede233edd2 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -34,6 +34,7 @@
#include <unotools/textsearch.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/sequence.hxx>
#include <unotools/bootstrap.hxx>
#include <rtl/bootstrap.hxx>
#include <tools/config.hxx>
@@ -91,7 +92,6 @@ static void releaseImpl()
}
}
-
// static main entry point for the migration process
void Migration::doMigration()
{
@@ -140,11 +140,11 @@ sal_Bool MigrationImpl::checkMigration()
MigrationImpl::MigrationImpl(const uno::Reference< XMultiServiceFactory >& xFactory)
: m_vrVersions(new strings_v)
, m_xFactory(xFactory)
- , m_vrMigrations(readMigrationSteps())
- , m_aInfo(findInstallation())
- , m_vrFileList(compileFileList())
- , m_vrServiceList(compileServiceList())
{
+ readAvailableMigrations(m_vMigrationsAvailable);
+ sal_Int32 nIndex = findPreferedMigrationProcess(m_vMigrationsAvailable);
+ if ( nIndex >= 0 )
+ m_vrMigrations = readMigrationSteps(m_vMigrationsAvailable[nIndex].name);
}
MigrationImpl::~MigrationImpl()
@@ -154,6 +154,10 @@ MigrationImpl::~MigrationImpl()
sal_Bool MigrationImpl::doMigration()
{
+ // compile file and service list for migration
+ m_vrFileList = compileFileList();
+ m_vrServiceList = compileServiceList();
+
sal_Bool result = sal_False;
try{
copyFiles();
@@ -218,20 +222,61 @@ sal_Bool MigrationImpl::checkMigrationCompleted()
return bMigrationCompleted;
}
-
-migrations_vr MigrationImpl::readMigrationSteps()
+static void insertSorted(migrations_available& rAvailableMigrations, supported_migration& aSupportedMigration)
{
+ bool bInserted( false );
+ migrations_available::iterator pIter = rAvailableMigrations.begin();
+ while ( !bInserted && pIter != rAvailableMigrations.end())
+ {
+ if ( pIter->nPriority < aSupportedMigration.nPriority )
+ {
+ rAvailableMigrations.insert(pIter, aSupportedMigration );
+ bInserted = true;
+ }
+ ++pIter;
+ }
+ if ( !bInserted )
+ rAvailableMigrations.push_back( aSupportedMigration );
+}
+bool MigrationImpl::readAvailableMigrations(migrations_available& rAvailableMigrations)
+{
// get supported version names
- uno::Reference< XNameAccess > aMigrationAccess(getConfigAccess("org.openoffice.Setup/Migration"), uno::UNO_QUERY_THROW);
- uno::Sequence< OUString > seqVersions;
- aMigrationAccess->getByName(OUString::createFromAscii("SupportedVersions")) >>= seqVersions;
- for (sal_Int32 i=0; i<seqVersions.getLength(); i++)
- m_vrVersions->push_back(seqVersions[i].trim());
+ uno::Reference< XNameAccess > aMigrationAccess(getConfigAccess("org.openoffice.Setup/Migration/SupportedVersions"), uno::UNO_QUERY_THROW);
+ uno::Sequence< OUString > seqSupportedVersions = aMigrationAccess->getElementNames();
+
+ const OUString aVersionIdentifiers( RTL_CONSTASCII_USTRINGPARAM( "VersionIdentifiers" ));
+ const OUString aPriorityIdentifier( RTL_CONSTASCII_USTRINGPARAM( "Priority" ));
+ for (sal_Int32 i=0; i<seqSupportedVersions.getLength(); i++)
+ {
+ sal_Int32 nPriority( 0 );
+ uno::Sequence< OUString > seqVersions;
+ uno::Reference< XNameAccess > xMigrationData( aMigrationAccess->getByName(seqSupportedVersions[i]), uno::UNO_QUERY_THROW );
+ xMigrationData->getByName( aVersionIdentifiers ) >>= seqVersions;
+ xMigrationData->getByName( aPriorityIdentifier ) >>= nPriority;
+
+ supported_migration aSupportedMigration;
+ aSupportedMigration.name = seqSupportedVersions[i];
+ aSupportedMigration.nPriority = nPriority;
+ for (sal_Int32 j=0; j<seqVersions.getLength(); j++)
+ aSupportedMigration.supported_versions.push_back(seqVersions[j].trim());
+ insertSorted( rAvailableMigrations, aSupportedMigration );
+ }
+
+ return true;
+}
+
+migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigrationName)
+{
+ // get migration access
+ uno::Reference< XNameAccess > aMigrationAccess(getConfigAccess("org.openoffice.Setup/Migration/SupportedVersions"), uno::UNO_QUERY_THROW);
+ uno::Reference< XNameAccess > xMigrationData( aMigrationAccess->getByName(rMigrationName), uno::UNO_QUERY_THROW );
+
// get migration description from from org.openoffice.Setup/Migration
// and build vector of migration steps
- uno::Reference< XNameAccess > theNameAccess(getConfigAccess("org.openoffice.Setup/Migration/MigrationSteps"), uno::UNO_QUERY_THROW);
+ OUString aMigrationSteps( RTL_CONSTASCII_USTRINGPARAM( "MigrationSteps" ));
+ uno::Reference< XNameAccess > theNameAccess(xMigrationData->getByName(aMigrationSteps), uno::UNO_QUERY_THROW);
uno::Sequence< OUString > seqMigrations = theNameAccess->getElementNames();
uno::Reference< XNameAccess > tmpAccess;
uno::Reference< XNameAccess > tmpAccess2;
@@ -273,6 +318,20 @@ migrations_vr MigrationImpl::readMigrationSteps()
tmpStep.excludeConfig.push_back(tmpSeq[j]);
}
+ // included extensions...
+ if (tmpAccess->getByName(OUString::createFromAscii("IncludedExtensions")) >>= tmpSeq)
+ {
+ for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
+ tmpStep.includeExtensions.push_back(tmpSeq[j]);
+ }
+
+ // excluded extensions...
+ if (tmpAccess->getByName(OUString::createFromAscii("ExcludedExtensions")) >>= tmpSeq)
+ {
+ for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
+ tmpStep.excludeExtensions.push_back(tmpSeq[j]);
+ }
+
// config components
if (tmpAccess->getByName(OUString::createFromAscii("ServiceConfigComponents")) >>= tmpSeq)
{
@@ -280,7 +339,6 @@ migrations_vr MigrationImpl::readMigrationSteps()
tmpStep.configComponents.push_back(tmpSeq[j]);
}
-
// generic service
tmpAccess->getByName(OUString::createFromAscii("MigrationService")) >>= tmpStep.service;
@@ -302,7 +360,7 @@ static FileBase::RC _checkAndCreateDirectory(INetURLObject& dirURL)
return result;
}
-install_info MigrationImpl::findInstallation()
+install_info MigrationImpl::findInstallation(const strings_v& rVersions)
{
rtl::OUString aProductName;
uno::Any aRet = ::utl::ConfigManager::GetDirectConfigProperty( ::utl::ConfigManager::PRODUCTNAME );
@@ -310,9 +368,9 @@ install_info MigrationImpl::findInstallation()
aProductName = aProductName.toAsciiLowerCase();
install_info aInfo;
- strings_v::const_iterator i_ver = m_vrVersions->begin();
+ strings_v::const_iterator i_ver = rVersions.begin();
uno::Reference < util::XStringSubstitution > xSubst( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.PathSubstitution")), uno::UNO_QUERY );
- while (i_ver != m_vrVersions->end())
+ while (i_ver != rVersions.end())
{
::rtl::OUString aVersion, aProfileName;
sal_Int32 nSeparatorIndex = (*i_ver).indexOf('=');
@@ -330,7 +388,7 @@ install_info MigrationImpl::findInstallation()
osl::Security().getConfigDir( aUserInst );
if ( aUserInst.getLength() && aUserInst[ aUserInst.getLength()-1 ] != '/' )
aUserInst += ::rtl::OUString::createFromAscii("/");
-#ifdef UNX
+#if defined UNX && ! defined MACOSX
// tribute to whoever had the "great" idea to use different names on Windows and Unix
aUserInst += ::rtl::OUString::createFromAscii(".");
#endif
@@ -345,12 +403,34 @@ install_info MigrationImpl::findInstallation()
}
catch( uno::Exception& ){}
}
- i_ver++;
+ ++i_ver;
}
return aInfo;
}
+sal_Int32 MigrationImpl::findPreferedMigrationProcess(const migrations_available& rAvailableMigrations)
+{
+ sal_Int32 nIndex( -1 );
+ sal_Int32 i( 0 );
+
+ migrations_available::const_iterator rIter = rAvailableMigrations.begin();
+ while ( rIter != rAvailableMigrations.end() )
+ {
+ install_info aInstallInfo = findInstallation(rIter->supported_versions);
+ if (aInstallInfo.productname.getLength() > 0 )
+ {
+ m_aInfo = aInstallInfo;
+ nIndex = i;
+ break;
+ }
+ ++i;
+ ++rIter;
+ }
+
+ return nIndex;
+}
+
strings_vr MigrationImpl::applyPatterns(const strings_v& vSet, const strings_v& vPatterns) const
{
using namespace utl;
@@ -517,8 +597,6 @@ void MigrationImpl::copyConfig()
aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
OSL_ENSURE(sal_False, aMsg.getStr());
}
-
-
}
// removes elements of vector 2 in vector 1
@@ -626,7 +704,6 @@ void MigrationImpl::copyFiles()
void MigrationImpl::runServices()
{
-
//create stratum for old user layer
OUString aOldLayerURL = m_aInfo.userdata;
aOldLayerURL += OUString::createFromAscii("/user/registry");
@@ -637,7 +714,7 @@ void MigrationImpl::runServices()
aStratumSvc, stratumArgs), uno::UNO_QUERY);
// Build argument array
- uno::Sequence< uno::Any > seqArguments(3);
+ uno::Sequence< uno::Any > seqArguments(4);
seqArguments[0] = uno::makeAny(NamedValue(
OUString::createFromAscii("Productname"),
uno::makeAny(m_aInfo.productname)));
@@ -673,10 +750,21 @@ void MigrationImpl::runServices()
i_comp++;
i++;
}
+
// set old config argument
seqArguments[2] = uno::makeAny(NamedValue(
OUString::createFromAscii("OldConfiguration"),
uno::makeAny(seqComponents)));
+
+ // set black list for extension migration
+ uno::Sequence< rtl::OUString > seqExtBlackList;
+ sal_uInt32 nSize = i_mig->excludeExtensions.size();
+ if ( nSize > 0 )
+ seqExtBlackList = comphelper::arrayToSequence< ::rtl::OUString >(
+ &i_mig->excludeExtensions[0], nSize );
+ seqArguments[3] = uno::makeAny(NamedValue(
+ OUString::createFromAscii("ExtensionBlackList"),
+ uno::makeAny( seqExtBlackList )));
xMigrationJob = uno::Reference< XJob >(m_xFactory->createInstanceWithArguments(
i_mig->service, seqArguments), uno::UNO_QUERY_THROW);
diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx
index 0de88d4dbc..a1533212ed 100644
--- a/desktop/source/migration/migration_impl.hxx
+++ b/desktop/source/migration/migration_impl.hxx
@@ -65,11 +65,21 @@ struct migration_step
strings_v includeConfig;
strings_v excludeConfig;
strings_v configComponents;
+ strings_v includeExtensions;
+ strings_v excludeExtensions;
rtl::OUString service;
};
+struct supported_migration
+{
+ rtl::OUString name;
+ sal_Int32 nPriority;
+ strings_v supported_versions;
+};
+
typedef std::vector< migration_step > migrations_v;
typedef std::auto_ptr< migrations_v > migrations_vr;
+typedef std::vector< supported_migration > migrations_available;
class MigrationImpl
{
@@ -77,18 +87,22 @@ class MigrationImpl
private:
strings_vr m_vrVersions;
NS_UNO::Reference< NS_CSS::lang::XMultiServiceFactory > m_xFactory;
- migrations_vr m_vrMigrations; // list of all migration specs from config
- install_info m_aInfo; // info about the version being migrated
- strings_vr m_vrFileList; // final list of files to be copied
- strings_vr m_vrConfigList; // final list of nodes to be copied
- strings_vr m_vrServiceList; // final list of services to be called
-
- // initializer functions...
- migrations_vr readMigrationSteps();
- install_info findInstallation();
- strings_vr compileFileList();
- strings_vr compileConfigList();
- strings_vr compileServiceList();
+
+ migrations_available m_vMigrationsAvailable; // list of all available migrations
+ migrations_vr m_vrMigrations; // list of all migration specs from config
+ install_info m_aInfo; // info about the version being migrated
+ strings_vr m_vrFileList; // final list of files to be copied
+ strings_vr m_vrConfigList; // final list of nodes to be copied
+ strings_vr m_vrServiceList; // final list of services to be called
+
+ // functions to control the migration process
+ bool readAvailableMigrations(migrations_available&);
+ migrations_vr readMigrationSteps(const ::rtl::OUString& rMigrationName);
+ sal_Int32 findPreferedMigrationProcess(const migrations_available&);
+ install_info findInstallation(const strings_v& rVersions);
+ strings_vr compileFileList();
+ strings_vr compileConfigList();
+ strings_vr compileServiceList();
// helpers
void substract(strings_v& va, const strings_v& vb_c) const;
diff --git a/desktop/source/migration/pages.cxx b/desktop/source/migration/pages.cxx
index c70707bde8..64a1fd54a0 100644
--- a/desktop/source/migration/pages.cxx
+++ b/desktop/source/migration/pages.cxx
@@ -55,6 +55,7 @@
#include <rtl/bootstrap.hxx>
#include <rtl/ustrbuf.hxx>
#include <osl/file.hxx>
+#include <osl/thread.hxx>
#include <unotools/bootstrap.hxx>
#include <tools/config.hxx>
@@ -62,6 +63,7 @@ using namespace rtl;
using namespace osl;
using namespace utl;
using namespace svt;
+using namespace com::sun::star;
using namespace com::sun::star::frame;
using namespace com::sun::star::lang;
using namespace com::sun::star::util;
@@ -305,12 +307,46 @@ void LicenseView::Notify( SfxBroadcaster&, const SfxHint& rHint )
// -------------------------------------------------------------------
-MigrationPage::MigrationPage( svt::OWizardMachine* parent, const ResId& resid)
+class MigrationThread : public ::osl::Thread
+{
+ public:
+ MigrationThread();
+
+ virtual void SAL_CALL run();
+ virtual void SAL_CALL onTerminated();
+};
+
+MigrationThread::MigrationThread()
+{
+}
+
+void MigrationThread::run()
+{
+ try
+ {
+ Migration::doMigration();
+ }
+ catch ( uno::Exception& )
+ {
+ }
+}
+
+void MigrationThread::onTerminated()
+{
+}
+
+// -------------------------------------------------------------------
+
+MigrationPage::MigrationPage(
+ svt::OWizardMachine* parent,
+ const ResId& resid,
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XThrobber > xThrobber)
: OWizardPage(parent, resid)
, m_ftHead(this, WizardResId(FT_MIGRATION_HEADER))
, m_ftBody(this, WizardResId(FT_MIGRATION_BODY))
, m_cbMigration(this, WizardResId(CB_MIGRATION))
, m_bMigrationDone(sal_False)
+ , m_xThrobber(xThrobber)
{
FreeResource();
_setBold(m_ftHead);
@@ -325,9 +361,28 @@ sal_Bool MigrationPage::commitPage( CommitPageReason _eReason )
{
if (_eReason == eTravelForward && m_cbMigration.IsChecked() && !m_bMigrationDone)
{
- EnterWait();
- Migration::doMigration();
- LeaveWait();
+ GetParent()->EnterWait();
+ FirstStartWizard* pWizard = dynamic_cast< FirstStartWizard* >( GetParent() );
+ if ( pWizard )
+ pWizard->DisableButtonsWhileMigration();
+
+ uno::Reference< awt::XWindow > xWin( m_xThrobber, uno::UNO_QUERY );
+ xWin->setVisible( true );
+ m_xThrobber->start();
+ MigrationThread* pMigThread = new MigrationThread();
+ pMigThread->create();
+
+ while ( pMigThread->isRunning() )
+ {
+ Application::Reschedule();
+ }
+
+ m_xThrobber->stop();
+ GetParent()->LeaveWait();
+ // Next state will enable buttons - so no EnableButtons necessary!
+ xWin->setVisible( false );
+ pMigThread->join();
+ delete pMigThread;
m_bMigrationDone = sal_True;
}
else
diff --git a/desktop/source/migration/pages.hxx b/desktop/source/migration/pages.hxx
index 57a3d57f7d..478782d266 100644
--- a/desktop/source/migration/pages.hxx
+++ b/desktop/source/migration/pages.hxx
@@ -38,6 +38,8 @@
#include <svl/lstner.hxx>
#include <svtools/xtextedt.hxx>
+#include <com/sun/star/awt/XThrobber.hpp>
+
namespace desktop
{
class WelcomePage : public svt::OWizardPage
@@ -120,8 +122,9 @@ private:
FixedText m_ftBody;
CheckBox m_cbMigration;
sal_Bool m_bMigrationDone;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XThrobber > m_xThrobber;
public:
- MigrationPage( svt::OWizardMachine* parent, const ResId& resid);
+ MigrationPage( svt::OWizardMachine* parent, const ResId& resid, ::com::sun::star::uno::Reference< ::com::sun::star::awt::XThrobber > xThrobber );
virtual sal_Bool commitPage( CommitPageReason _eReason );
protected:
diff --git a/desktop/source/migration/services/cexportsoo3.cxx b/desktop/source/migration/services/cexportsoo3.cxx
new file mode 100755
index 0000000000..b33d78966f
--- /dev/null
+++ b/desktop/source/migration/services/cexportsoo3.cxx
@@ -0,0 +1,71 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: cexports.cxx,v $
+ * $Revision: 1.9 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_desktop.hxx"
+
+#include "cppuhelper/implementationentry.hxx"
+#include "oo3extensionmigration.hxx"
+
+extern "C"
+{
+
+::cppu::ImplementationEntry entries [] =
+{
+ {
+ migration::OO3ExtensionMigration_create, migration::OO3ExtensionMigration_getImplementationName,
+ migration::OO3ExtensionMigration_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
+ { 0, 0, 0, 0, 0, 0 }
+};
+
+
+void SAL_CALL component_getImplementationEnvironment(
+ const sal_Char ** ppEnvTypeName, uno_Environment ** )
+{
+ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
+}
+
+sal_Bool SAL_CALL component_writeInfo(
+ void * pServiceManager, void * pRegistryKey )
+{
+ return ::cppu::component_writeInfoHelper(
+ pServiceManager, pRegistryKey, entries );
+}
+
+void * SAL_CALL component_getFactory(
+ const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
+{
+ return ::cppu::component_getFactoryHelper(
+ pImplName, pServiceManager, pRegistryKey, entries );
+}
+
+}
diff --git a/desktop/source/migration/services/makefile.mk b/desktop/source/migration/services/makefile.mk
index 323b823fe3..55ecff6bc0 100644
--- a/desktop/source/migration/services/makefile.mk
+++ b/desktop/source/migration/services/makefile.mk
@@ -31,6 +31,7 @@ PRJNAME=desktop
TARGET = migrationoo2.uno
ENABLE_EXCEPTIONS=TRUE
COMP1TYPELIST = migrationoo2
+LIBTARGET=NO
# --- Settings -----------------------------------------------------
.INCLUDE : ..$/..$/deployment/inc/dp_misc.mk
@@ -50,10 +51,21 @@ SLOFILES= \
$(SLO)$/cexports.obj \
$(SLO)$/basicmigration.obj \
$(SLO)$/wordbookmigration.obj \
- $(SLO)$/extensionmigration.obj
+ $(SLO)$/extensionmigration.obj \
+ $(SLO)$/autocorrmigration.obj \
+ $(SLO)$/oo3extensionmigration.obj \
+ $(SLO)$/cexportsoo3.obj
+
+SHL1OBJS= \
+ $(SLO)$/jvmfwk.obj \
+ $(SLO)$/cexports.obj \
+ $(SLO)$/basicmigration.obj \
+ $(SLO)$/wordbookmigration.obj \
+ $(SLO)$/extensionmigration.obj \
+ $(SLO)$/autocorrmigration.obj
SHL1TARGET=$(TARGET)
-SHL1VERSIONMAP = migrationoo2.map
+SHL1VERSIONMAP = $(SOLARENV)/src/component.map
SHL1STDLIBS= \
$(DEPLOYMENTMISCLIB) \
@@ -67,16 +79,42 @@ SHL1STDLIBS= \
$(JVMFWKLIB) \
$(XMLSCRIPTLIB) \
$(BERKELEYLIB)
-
-
SHL1DEPN=
-SHL1IMPLIB=i$(TARGET)
-SHL1LIBS=$(SLB)$/$(TARGET).lib
+SHL1IMPLIB=imigrationoo2
+#SHL1LIBS=$(SLB)$/$(TARGET).lib
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
+COMP2TYPELIST = migrationoo3
+SHL2TARGET=migrationoo3.uno
+SHL2VERSIONMAP = migrationoo3.map
+
+SHL2OBJS= \
+ $(SLO)$/cexportsoo3.obj \
+ $(SLO)$/oo3extensionmigration.obj
+
+SHL2STDLIBS= \
+ $(DEPLOYMENTMISCLIB) \
+ $(CPPULIB) \
+ $(CPPUHELPERLIB) \
+ $(SALLIB) \
+ $(UCBHELPERLIB) \
+ $(UNOTOOLSLIB) \
+ $(TOOLSLIB) \
+ $(I18NISOLANGLIB) \
+ $(JVMFWKLIB) \
+ $(XMLSCRIPTLIB) \
+ $(BERKELEYLIB)
+
+SHL2DEPN=
+SHL2IMPLIB=imigrationoo3
+#SHL2LIBS=$(SLB)$/$(SHL2TARGET).lib
+SHL2DEF=$(MISC)$/$(SHL2TARGET).def
+
+DEF2NAME=$(SHL2TARGET)
+
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
diff --git a/desktop/source/migration/services/migrationoo2.map b/desktop/source/migration/services/migrationoo3.map
index ac2c3750bf..ac2c3750bf 100644..100755
--- a/desktop/source/migration/services/migrationoo2.map
+++ b/desktop/source/migration/services/migrationoo3.map
diff --git a/desktop/source/migration/services/oo3extensionmigration.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
new file mode 100755
index 0000000000..07e971b033
--- /dev/null
+++ b/desktop/source/migration/services/oo3extensionmigration.cxx
@@ -0,0 +1,656 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: extensionmigration.cxx,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_desktop.hxx"
+
+#include "oo3extensionmigration.hxx"
+#include <rtl/instance.hxx>
+#include <osl/file.hxx>
+#include <osl/thread.h>
+#include <tools/urlobj.hxx>
+#include <unotools/bootstrap.hxx>
+#include <unotools/ucbstreamhelper.hxx>
+#include <unotools/textsearch.hxx>
+#include <comphelper/sequence.hxx>
+#include <comphelper/processfactory.hxx>
+#include <ucbhelper/content.hxx>
+
+#include <com/sun/star/deployment/thePackageManagerFactory.hpp>
+#include <com/sun/star/deployment/XPackageManagerFactory.hpp>
+#include <com/sun/star/task/XInteractionApprove.hpp>
+#include <com/sun/star/task/XInteractionAbort.hpp>
+#include <com/sun/star/ucb/XCommandInfo.hpp>
+#include <com/sun/star/ucb/TransferInfo.hpp>
+#include <com/sun/star/ucb/NameClash.hpp>
+#include <com/sun/star/ucb/XCommandEnvironment.hpp>
+#include <com/sun/star/xml/xpath/XXPathAPI.hpp>
+
+using namespace ::com::sun::star;
+using namespace ::com::sun::star::uno;
+
+namespace migration
+{
+
+static ::rtl::OUString sExtensionSubDir = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/uno_packages/" ) );
+static ::rtl::OUString sSubDirName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "cache" ) );
+static ::rtl::OUString sConfigDir = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/registry/data" ) );
+static ::rtl::OUString sOrgDir = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/registry/data/org" ) );
+static ::rtl::OUString sExcludeDir1 = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/registry/data/org" ) );
+static ::rtl::OUString sExcludeDir2 = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/registry/data/org/openoffice" ) );
+static ::rtl::OUString sDescriptionXmlFile = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/description.xml" ) );
+static ::rtl::OUString sExtensionRootSubDirName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/uno_packages" ) );
+
+static ::rtl::OUString sConfigurationDataType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.star.configuration-data"));
+static ::rtl::OUString sConfigurationSchemaType = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("application/vnd.sun.star.configuration-schema"));
+
+// =============================================================================
+// component operations
+// =============================================================================
+
+::rtl::OUString OO3ExtensionMigration_getImplementationName()
+{
+ static ::rtl::OUString* pImplName = 0;
+ if ( !pImplName )
+ {
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ if ( !pImplName )
+ {
+ static ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.desktop.migration.OOo3Extensions" ) );
+ pImplName = &aImplName;
+ }
+ }
+ return *pImplName;
+}
+
+// -----------------------------------------------------------------------------
+
+Sequence< ::rtl::OUString > OO3ExtensionMigration_getSupportedServiceNames()
+{
+ static Sequence< ::rtl::OUString >* pNames = 0;
+ if ( !pNames )
+ {
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ if ( !pNames )
+ {
+ static Sequence< ::rtl::OUString > aNames(1);
+ aNames.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.migration.Extensions" ) );
+ pNames = &aNames;
+ }
+ }
+ return *pNames;
+}
+
+// =============================================================================
+// ExtensionMigration
+// =============================================================================
+
+OO3ExtensionMigration::OO3ExtensionMigration(Reference< XComponentContext > const & ctx) :
+m_ctx(ctx)
+{
+}
+
+// -----------------------------------------------------------------------------
+
+OO3ExtensionMigration::~OO3ExtensionMigration()
+{
+}
+
+::osl::FileBase::RC OO3ExtensionMigration::checkAndCreateDirectory( INetURLObject& rDirURL )
+{
+ ::osl::FileBase::RC aResult = ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
+ if ( aResult == ::osl::FileBase::E_NOENT )
+ {
+ INetURLObject aBaseURL( rDirURL );
+ aBaseURL.removeSegment();
+ checkAndCreateDirectory( aBaseURL );
+ return ::osl::Directory::create( rDirURL.GetMainURL( INetURLObject::DECODE_TO_IURI ) );
+ }
+ else
+ {
+ return aResult;
+ }
+}
+
+void OO3ExtensionMigration::registerConfigurationPackage( const uno::Reference< deployment::XPackage > & xPkg)
+{
+ const ::rtl::OUString sMediaType = xPkg->getPackageType()->getMediaType();
+ if ( (sMediaType.equals(sConfigurationDataType) || sMediaType.equals(sConfigurationSchemaType) ) )
+ {
+ xPkg->revokePackage(uno::Reference< task::XAbortChannel >(), uno::Reference< ucb::XCommandEnvironment> ());
+ xPkg->registerPackage(uno::Reference< task::XAbortChannel >(), uno::Reference< ucb::XCommandEnvironment> ());
+ }
+}
+
+ void OO3ExtensionMigration::scanUserExtensions( const ::rtl::OUString& sSourceDir, TStringVector& aMigrateExtensions )
+{
+ osl::Directory aScanRootDir( sSourceDir );
+ osl::FileStatus fs(FileStatusMask_Type | FileStatusMask_FileURL);
+ osl::FileBase::RC nRetCode = aScanRootDir.open();
+ if ( nRetCode == osl::Directory::E_None )
+ {
+ sal_uInt32 nHint( 0 );
+ osl::DirectoryItem aItem;
+ while ( aScanRootDir.getNextItem( aItem, nHint ) == osl::Directory::E_None )
+ {
+ if (( aItem.getFileStatus(fs) == osl::FileBase::E_None ) &&
+ ( fs.getFileType() == osl::FileStatus::Directory ))
+ {
+ //Check next folder as the "real" extension folder is below a temp folder!
+ ::rtl::OUString sExtensionFolderURL = fs.getFileURL();
+
+ osl::DirectoryItem aExtDirItem;
+ osl::Directory aExtensionRootDir( sExtensionFolderURL );
+
+ nRetCode = aExtensionRootDir.open();
+ if (( nRetCode == osl::Directory::E_None ) &&
+ ( aExtensionRootDir.getNextItem( aExtDirItem, nHint ) == osl::Directory::E_None ))
+ {
+ bool bFileStatus = aExtDirItem.getFileStatus(fs) == osl::FileBase::E_None;
+ bool bIsDir = fs.getFileType() == osl::FileStatus::Directory;
+
+ if ( bFileStatus && bIsDir )
+ {
+ sExtensionFolderURL = fs.getFileURL();
+ ScanResult eResult = scanExtensionFolder( sExtensionFolderURL );
+ if ( eResult == SCANRESULT_MIGRATE_EXTENSION )
+ aMigrateExtensions.push_back( sExtensionFolderURL );
+ }
+ }
+ }
+ }
+ }
+}
+
+OO3ExtensionMigration::ScanResult OO3ExtensionMigration::scanExtensionFolder( const ::rtl::OUString& sExtFolder )
+{
+ ScanResult aResult = SCANRESULT_NOTFOUND;
+ osl::Directory aDir(sExtFolder);
+
+ // get sub dirs
+ if (aDir.open() == osl::FileBase::E_None)
+ {
+ // work through directory contents...
+ osl::DirectoryItem item;
+ osl::FileStatus fs(FileStatusMask_Type | FileStatusMask_FileURL);
+ TStringVector aDirectories;
+ while ((aDir.getNextItem(item) == osl::FileBase::E_None ) &&
+ ( aResult == SCANRESULT_NOTFOUND ))
+ {
+ if (item.getFileStatus(fs) == osl::FileBase::E_None)
+ {
+ ::rtl::OUString aDirEntryURL;
+ if (fs.getFileType() == osl::FileStatus::Directory)
+ aDirectories.push_back( fs.getFileURL() );
+ else
+ {
+ aDirEntryURL = fs.getFileURL();
+ if ( aDirEntryURL.indexOf( sDescriptionXmlFile ) > 0 )
+ aResult = scanDescriptionXml( aDirEntryURL ) ? SCANRESULT_MIGRATE_EXTENSION : SCANRESULT_DONTMIGRATE_EXTENSION;
+ }
+ }
+ }
+
+ TStringVector::const_iterator pIter = aDirectories.begin();
+ while ( pIter != aDirectories.end() && aResult == SCANRESULT_NOTFOUND )
+ {
+ aResult = scanExtensionFolder( *pIter );
+ ++pIter;
+ }
+ }
+ return aResult;
+}
+
+bool OO3ExtensionMigration::scanDescriptionXml( const ::rtl::OUString& sDescriptionXmlURL )
+{
+ if ( !m_xDocBuilder.is() )
+ {
+ m_xDocBuilder = uno::Reference< xml::dom::XDocumentBuilder >(
+ m_ctx->getServiceManager()->createInstanceWithContext(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xml.dom.DocumentBuilder")),
+ m_ctx ), uno::UNO_QUERY );
+ }
+
+ if ( !m_xSimpleFileAccess.is() )
+ {
+ m_xSimpleFileAccess = uno::Reference< ucb::XSimpleFileAccess >(
+ m_ctx->getServiceManager()->createInstanceWithContext(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")),
+ m_ctx ), uno::UNO_QUERY );
+ }
+
+ ::rtl::OUString aExtIdentifier;
+ if ( m_xDocBuilder.is() && m_xSimpleFileAccess.is() )
+ {
+ try
+ {
+ uno::Reference< io::XInputStream > xIn =
+ m_xSimpleFileAccess->openFileRead( sDescriptionXmlURL );
+
+ if ( xIn.is() )
+ {
+ uno::Reference< xml::dom::XDocument > xDoc = m_xDocBuilder->parse( xIn );
+ if ( xDoc.is() )
+ {
+ uno::Reference< xml::dom::XElement > xRoot = xDoc->getDocumentElement();
+ if ( xRoot.is() &&
+ xRoot->getTagName().equals(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("description"))) )
+ {
+ uno::Reference< xml::xpath::XXPathAPI > xPath(
+ m_ctx->getServiceManager()->createInstanceWithContext(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.xpath.XPathAPI")),
+ m_ctx),
+ uno::UNO_QUERY);
+
+ xPath->registerNS(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("desc")),
+ xRoot->getNamespaceURI());
+ xPath->registerNS(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("xlink")),
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("http://www.w3.org/1999/xlink")));
+
+ try
+ {
+ uno::Reference< xml::dom::XNode > xRootNode( xRoot, uno::UNO_QUERY );
+ uno::Reference< xml::dom::XNode > xNode(
+ xPath->selectSingleNode(
+ xRootNode,
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("desc:identifier/@value")) ));
+ if ( xNode.is() )
+ aExtIdentifier = xNode->getNodeValue();
+ }
+ catch ( xml::xpath::XPathException& )
+ {
+ }
+ catch ( xml::dom::DOMException& )
+ {
+ }
+ }
+ }
+ }
+
+ if ( aExtIdentifier.getLength() > 0 )
+ {
+ // scan extension identifier and try to match with our black list entries
+ for ( sal_uInt32 i = 0; i < m_aBlackList.size(); i++ )
+ {
+ utl::SearchParam param(m_aBlackList[i], utl::SearchParam::SRCH_REGEXP);
+ utl::TextSearch ts(param, LANGUAGE_DONTKNOW);
+
+ xub_StrLen start = 0;
+ xub_StrLen end = static_cast<USHORT>(aExtIdentifier.getLength());
+ if (ts.SearchFrwrd(aExtIdentifier, &start, &end))
+ return false;
+ }
+ }
+ }
+ catch ( ucb::CommandAbortedException& )
+ {
+ }
+ catch ( uno::RuntimeException& )
+ {
+ }
+
+ if ( aExtIdentifier.getLength() == 0 )
+ {
+ // Fallback:
+ // Try to use the folder name to match our black list
+ // as some extensions don't provide an identifier in the
+ // description.xml!
+ for ( sal_uInt32 i = 0; i < m_aBlackList.size(); i++ )
+ {
+ utl::SearchParam param(m_aBlackList[i], utl::SearchParam::SRCH_REGEXP);
+ utl::TextSearch ts(param, LANGUAGE_DONTKNOW);
+
+ xub_StrLen start = 0;
+ xub_StrLen end = static_cast<USHORT>(sDescriptionXmlURL.getLength());
+ if (ts.SearchFrwrd(sDescriptionXmlURL, &start, &end))
+ return false;
+ }
+ }
+ }
+
+ return true;
+}
+
+bool OO3ExtensionMigration::migrateExtension( const ::rtl::OUString& sSourceDir )
+{
+ if ( !m_xPackageManager.is() )
+ {
+ try
+ {
+ m_xPackageManager = deployment::thePackageManagerFactory::get( m_ctx )->getPackageManager(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "user" )) );
+ }
+ catch ( ucb::CommandFailedException & ){}
+ catch ( uno::RuntimeException & ) {}
+ }
+
+ if ( m_xPackageManager.is() )
+ {
+ try
+ {
+ TmpRepositoryCommandEnv* pCmdEnv = new TmpRepositoryCommandEnv();
+
+ uno::Reference< ucb::XCommandEnvironment > xCmdEnv(
+ static_cast< cppu::OWeakObject* >( pCmdEnv ), uno::UNO_QUERY );
+ uno::Reference< task::XAbortChannel > xAbortChannel;
+ uno::Reference< deployment::XPackage > xPackage =
+ m_xPackageManager->addPackage( sSourceDir, ::rtl::OUString(), xAbortChannel, xCmdEnv );
+
+ if ( xPackage.is() )
+ return true;
+ }
+ catch ( ucb::CommandFailedException& )
+ {
+ }
+ catch ( ucb::CommandAbortedException& )
+ {
+ }
+ catch ( lang::IllegalArgumentException& )
+ {
+ }
+ }
+
+ return false;
+}
+
+bool OO3ExtensionMigration::copy( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir )
+{
+ bool bRet = false;
+
+ INetURLObject aSourceObj( sSourceDir );
+ INetURLObject aDestObj( sTargetDir );
+ String aName = aDestObj.getName();
+ aDestObj.removeSegment();
+ aDestObj.setFinalSlash();
+
+ try
+ {
+ ::ucbhelper::Content aDestPath( aDestObj.GetMainURL( INetURLObject::NO_DECODE ), uno::Reference< ucb::XCommandEnvironment > () );
+ uno::Reference< ucb::XCommandInfo > xInfo = aDestPath.getCommands();
+ ::rtl::OUString aTransferName = ::rtl::OUString::createFromAscii( "transfer" );
+ if ( xInfo->hasCommandByName( aTransferName ) )
+ {
+ aDestPath.executeCommand( aTransferName, uno::makeAny(
+ ucb::TransferInfo( sal_False, aSourceObj.GetMainURL( INetURLObject::NO_DECODE ), aName, ucb::NameClash::OVERWRITE ) ) );
+ bRet = true;
+ }
+ }
+ catch( uno::Exception& )
+ {
+ }
+
+ return bRet;
+}
+
+
+// -----------------------------------------------------------------------------
+// XServiceInfo
+// -----------------------------------------------------------------------------
+
+::rtl::OUString OO3ExtensionMigration::getImplementationName() throw (RuntimeException)
+{
+ return OO3ExtensionMigration_getImplementationName();
+}
+
+// -----------------------------------------------------------------------------
+
+sal_Bool OO3ExtensionMigration::supportsService( const ::rtl::OUString& rServiceName ) throw (RuntimeException)
+{
+ Sequence< ::rtl::OUString > aNames( getSupportedServiceNames() );
+ const ::rtl::OUString* pNames = aNames.getConstArray();
+ const ::rtl::OUString* pEnd = pNames + aNames.getLength();
+ for ( ; pNames != pEnd && !pNames->equals( rServiceName ); ++pNames )
+ ;
+
+ return pNames != pEnd;
+}
+
+// -----------------------------------------------------------------------------
+
+Sequence< ::rtl::OUString > OO3ExtensionMigration::getSupportedServiceNames() throw (RuntimeException)
+{
+ return OO3ExtensionMigration_getSupportedServiceNames();
+}
+
+// -----------------------------------------------------------------------------
+// XInitialization
+// -----------------------------------------------------------------------------
+
+void OO3ExtensionMigration::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ const Any* pIter = aArguments.getConstArray();
+ const Any* pEnd = pIter + aArguments.getLength();
+ for ( ; pIter != pEnd ; ++pIter )
+ {
+ beans::NamedValue aValue;
+ *pIter >>= aValue;
+ if ( aValue.Name.equalsAscii( "UserData" ) )
+ {
+ if ( !(aValue.Value >>= m_sSourceDir) )
+ {
+ OSL_ENSURE( false, "ExtensionMigration::initialize: argument UserData has wrong type!" );
+ }
+ }
+ else if ( aValue.Name.equalsAscii( "ExtensionBlackList" ) )
+ {
+ Sequence< ::rtl::OUString > aBlackList;
+ if ( (aValue.Value >>= aBlackList ) && ( aBlackList.getLength() > 0 ))
+ {
+ m_aBlackList.resize( aBlackList.getLength() );
+ ::comphelper::sequenceToArray< ::rtl::OUString >( &m_aBlackList[0], aBlackList );
+ }
+ }
+ }
+}
+
+// -----------------------------------------------------------------------------
+
+TStringVectorPtr getContent( const ::rtl::OUString& rBaseURL )
+{
+ TStringVectorPtr aResult( new TStringVector );
+ ::osl::Directory aDir( rBaseURL);
+ if ( aDir.open() == ::osl::FileBase::E_None )
+ {
+ // iterate over directory content
+ TStringVector aSubDirs;
+ ::osl::DirectoryItem aItem;
+ while ( aDir.getNextItem( aItem ) == ::osl::FileBase::E_None )
+ {
+ ::osl::FileStatus aFileStatus( FileStatusMask_Type | FileStatusMask_FileURL );
+ if ( aItem.getFileStatus( aFileStatus ) == ::osl::FileBase::E_None )
+ aResult->push_back( aFileStatus.getFileURL() );
+ }
+ }
+
+ return aResult;
+}
+
+// -----------------------------------------------------------------------------
+// XJob
+// -----------------------------------------------------------------------------
+
+void OO3ExtensionMigration::copyConfig( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir )
+{
+ ::rtl::OUString sEx1( m_sSourceDir );
+ sEx1 += sExcludeDir1;
+ ::rtl::OUString sEx2( m_sSourceDir );
+ sEx2 += sExcludeDir2;
+
+ TStringVectorPtr aList = getContent( sSourceDir );
+ TStringVector::const_iterator aI = aList->begin();
+ while ( aI != aList->end() )
+ {
+ ::rtl::OUString sSourceLocalName = aI->copy( sSourceDir.getLength() );
+ ::rtl::OUString aTemp = aI->copy( m_sSourceDir.getLength() );
+ if ( aTemp != sExcludeDir1 && aTemp != sExcludeDir2 )
+ {
+ ::rtl::OUString sTargetName = sTargetDir + sSourceLocalName;
+ copy( (*aI), sTargetName );
+ }
+ ++aI;
+ }
+}
+
+Any OO3ExtensionMigration::execute( const Sequence< beans::NamedValue >& )
+ throw (lang::IllegalArgumentException, Exception, RuntimeException)
+{
+ ::osl::MutexGuard aGuard( m_aMutex );
+
+ ::utl::Bootstrap::PathStatus aStatus = ::utl::Bootstrap::locateUserInstallation( m_sTargetDir );
+ if ( aStatus == ::utl::Bootstrap::PATH_EXISTS )
+ {
+ // copy all extensions
+ ::rtl::OUString sSourceDir( m_sSourceDir );
+ sSourceDir += sExtensionSubDir;
+ sSourceDir += sSubDirName;
+ sSourceDir += sExtensionRootSubDirName;
+ TStringVector aExtensionToMigrate;
+ scanUserExtensions( sSourceDir, aExtensionToMigrate );
+ if ( aExtensionToMigrate.size() > 0 )
+ {
+ TStringVector::iterator pIter = aExtensionToMigrate.begin();
+ while ( pIter != aExtensionToMigrate.end() )
+ {
+ migrateExtension( *pIter );
+ ++pIter;
+ }
+ }
+ }
+
+ return Any();
+}
+
+// -----------------------------------------------------------------------------
+// TmpRepositoryCommandEnv
+// -----------------------------------------------------------------------------
+
+TmpRepositoryCommandEnv::TmpRepositoryCommandEnv()
+{
+}
+
+TmpRepositoryCommandEnv::TmpRepositoryCommandEnv(
+ uno::Reference< task::XInteractionHandler> const & handler)
+ : m_forwardHandler(handler)
+{
+}
+
+TmpRepositoryCommandEnv::~TmpRepositoryCommandEnv()
+{
+}
+// XCommandEnvironment
+//______________________________________________________________________________
+uno::Reference< task::XInteractionHandler > TmpRepositoryCommandEnv::getInteractionHandler()
+throw ( uno::RuntimeException )
+{
+ return this;
+}
+
+//______________________________________________________________________________
+uno::Reference< ucb::XProgressHandler > TmpRepositoryCommandEnv::getProgressHandler()
+throw ( uno::RuntimeException )
+{
+ return this;
+}
+
+// XInteractionHandler
+void TmpRepositoryCommandEnv::handle(
+ uno::Reference< task::XInteractionRequest> const & xRequest )
+ throw ( uno::RuntimeException )
+{
+ uno::Any request( xRequest->getRequest() );
+ OSL_ASSERT( request.getValueTypeClass() == uno::TypeClass_EXCEPTION );
+
+ bool approve = true;
+ bool abort = false;
+
+ // select:
+ uno::Sequence< Reference< task::XInteractionContinuation > > conts(
+ xRequest->getContinuations() );
+ Reference< task::XInteractionContinuation > const * pConts =
+ conts.getConstArray();
+ sal_Int32 len = conts.getLength();
+ for ( sal_Int32 pos = 0; pos < len; ++pos )
+ {
+ if (approve) {
+ uno::Reference< task::XInteractionApprove > xInteractionApprove(
+ pConts[ pos ], uno::UNO_QUERY );
+ if (xInteractionApprove.is()) {
+ xInteractionApprove->select();
+ // don't query again for ongoing continuations:
+ approve = false;
+ }
+ }
+ else if (abort) {
+ uno::Reference< task::XInteractionAbort > xInteractionAbort(
+ pConts[ pos ], uno::UNO_QUERY );
+ if (xInteractionAbort.is()) {
+ xInteractionAbort->select();
+ // don't query again for ongoing continuations:
+ abort = false;
+ }
+ }
+ }
+}
+
+// XProgressHandler
+void TmpRepositoryCommandEnv::push( uno::Any const & /*Status*/ )
+throw (uno::RuntimeException)
+{
+}
+
+
+void TmpRepositoryCommandEnv::update( uno::Any const & /*Status */)
+throw (uno::RuntimeException)
+{
+}
+
+void TmpRepositoryCommandEnv::pop() throw (uno::RuntimeException)
+{
+}
+
+// =============================================================================
+// component operations
+// =============================================================================
+
+Reference< XInterface > SAL_CALL OO3ExtensionMigration_create(
+ Reference< XComponentContext > const & ctx )
+ SAL_THROW( () )
+{
+ return static_cast< lang::XTypeProvider * >( new OO3ExtensionMigration(
+ ctx) );
+}
+
+// -----------------------------------------------------------------------------
+
+} // namespace migration
diff --git a/desktop/source/migration/services/oo3extensionmigration.hxx b/desktop/source/migration/services/oo3extensionmigration.hxx
new file mode 100755
index 0000000000..4a2b389310
--- /dev/null
+++ b/desktop/source/migration/services/oo3extensionmigration.hxx
@@ -0,0 +1,171 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2008 by Sun Microsystems, Inc.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * $RCSfile: extensionmigration.hxx,v $
+ * $Revision: 1.2 $
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _DESKTOP_OO3EXTENSIONMIGRATION_HXX_
+#define _DESKTOP_OO3EXTENSIONMIGRATION_HXX_
+
+#include "misc.hxx"
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/task/XJob.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/xml/dom/XDocumentBuilder.hpp>
+#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <com/sun/star/deployment/XPackageManager.hpp>
+
+#include <osl/mutex.hxx>
+#include <osl/file.hxx>
+#include <cppuhelper/implbase3.hxx>
+#include <cppuhelper/compbase3.hxx>
+#include <ucbhelper/content.hxx>
+#include <xmlscript/xmllib_imexp.hxx>
+
+namespace com { namespace sun { namespace star {
+ namespace uno {
+ class XComponentContext;
+ }
+ namespace deployment {
+ class XPackage;
+ }
+}}}
+
+class INetURLObject;
+
+
+namespace migration
+{
+
+ ::rtl::OUString SAL_CALL OO3ExtensionMigration_getImplementationName();
+ ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL OO3ExtensionMigration_getSupportedServiceNames();
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL OO3ExtensionMigration_create(
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext )
+ SAL_THROW( (::com::sun::star::uno::Exception) );
+
+
+ // =============================================================================
+ // class ExtensionMigration
+ // =============================================================================
+
+ typedef ::cppu::WeakImplHelper3<
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XInitialization,
+ ::com::sun::star::task::XJob > ExtensionMigration_BASE;
+
+ class OO3ExtensionMigration : public ExtensionMigration_BASE
+ {
+ private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_ctx;
+ ::com::sun::star::uno::Reference< ::com::sun::star::xml::dom::XDocumentBuilder > m_xDocBuilder;
+ ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess > m_xSimpleFileAccess;
+ ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackageManager > m_xPackageManager;
+ ::osl::Mutex m_aMutex;
+ ::rtl::OUString m_sSourceDir;
+ ::rtl::OUString m_sTargetDir;
+ TStringVector m_aBlackList;
+
+ enum ScanResult
+ {
+ SCANRESULT_NOTFOUND,
+ SCANRESULT_MIGRATE_EXTENSION,
+ SCANRESULT_DONTMIGRATE_EXTENSION
+ };
+
+ ::osl::FileBase::RC checkAndCreateDirectory( INetURLObject& rDirURL );
+ void copyConfig( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir );
+ bool copy( const ::rtl::OUString& sSourceDir, const ::rtl::OUString& sTargetDir );
+ ScanResult scanExtensionFolder( const ::rtl::OUString& sExtFolder );
+ void scanUserExtensions( const ::rtl::OUString& sSourceDir, TStringVector& aMigrateExtensions );
+ bool scanDescriptionXml( const ::rtl::OUString& sDescriptionXmlFilePath );
+ bool migrateExtension( const ::rtl::OUString& sSourceDir );
+ /* fills m_scriptElements and m_dialogElements
+ */
+ void registerConfigurationPackage(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::deployment::XPackage > & xPkg);
+
+ public:
+ OO3ExtensionMigration(::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext > const & ctx);
+ virtual ~OO3ExtensionMigration();
+
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& rServiceName )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
+ throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+
+ // XJob
+ virtual ::com::sun::star::uno::Any SAL_CALL execute(
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& Arguments )
+ throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::Exception,
+ ::com::sun::star::uno::RuntimeException);
+ };
+
+ class TmpRepositoryCommandEnv
+ : public ::cppu::WeakImplHelper3< ::com::sun::star::ucb::XCommandEnvironment,
+ ::com::sun::star::task::XInteractionHandler,
+ ::com::sun::star::ucb::XProgressHandler >
+ {
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler> m_forwardHandler;
+ public:
+ virtual ~TmpRepositoryCommandEnv();
+ TmpRepositoryCommandEnv();
+ TmpRepositoryCommandEnv(
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler> const & handler);
+
+ // XCommandEnvironment
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionHandler > SAL_CALL
+ getInteractionHandler() throw ( ::com::sun::star::uno::RuntimeException );
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XProgressHandler >
+ SAL_CALL getProgressHandler() throw ( ::com::sun::star::uno::RuntimeException );
+
+ // XInteractionHandler
+ virtual void SAL_CALL handle(
+ ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest > const & xRequest )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // XProgressHandler
+ virtual void SAL_CALL push( ::com::sun::star::uno::Any const & Status )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL update( ::com::sun::star::uno::Any const & Status )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL pop() throw (::com::sun::star::uno::RuntimeException);
+ };
+
+//.........................................................................
+} // namespace migration
+//.........................................................................
+
+#endif // _DESKTOP_OO3EXTENSIONMIGRATION_HXX_
diff --git a/desktop/source/migration/wizard.cxx b/desktop/source/migration/wizard.cxx
index ae40a73278..64b135d87f 100644
--- a/desktop/source/migration/wizard.cxx
+++ b/desktop/source/migration/wizard.cxx
@@ -61,11 +61,14 @@
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/util/XChangesBatch.hpp>
#include <com/sun/star/container/XNameReplace.hpp>
+#include <com/sun/star/awt/WindowDescriptor.hpp>
+#include <com/sun/star/awt/WindowAttribute.hpp>
using namespace svt;
using namespace rtl;
using namespace osl;
using namespace utl;
+using namespace com::sun::star;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
@@ -77,13 +80,38 @@ using namespace com::sun::star::container;
namespace desktop
{
-const FirstStartWizard::WizardState FirstStartWizard::STATE_WELCOME = 0;
-const FirstStartWizard::WizardState FirstStartWizard::STATE_LICENSE = 1;
-const FirstStartWizard::WizardState FirstStartWizard::STATE_MIGRATION = 2;
-const FirstStartWizard::WizardState FirstStartWizard::STATE_USER = 3;
+const FirstStartWizard::WizardState FirstStartWizard::STATE_WELCOME = 0;
+const FirstStartWizard::WizardState FirstStartWizard::STATE_LICENSE = 1;
+const FirstStartWizard::WizardState FirstStartWizard::STATE_MIGRATION = 2;
+const FirstStartWizard::WizardState FirstStartWizard::STATE_USER = 3;
const FirstStartWizard::WizardState FirstStartWizard::STATE_UPDATE_CHECK = 4;
const FirstStartWizard::WizardState FirstStartWizard::STATE_REGISTRATION = 5;
+static uno::Reference< uno::XComponentContext > getComponentContext( const uno::Reference< lang::XMultiServiceFactory >& rFactory )
+{
+ uno::Reference< uno::XComponentContext > rContext;
+ uno::Reference< beans::XPropertySet > rPropSet( rFactory, uno::UNO_QUERY );
+ uno::Any a = rPropSet->getPropertyValue(
+ ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ) ) );
+ a >>= rContext;
+ return rContext;
+}
+
+static sal_Int32 getBuildId()
+{
+ ::rtl::OUString aDefault;
+ ::rtl::OUString aBuildIdData = utl::Bootstrap::getBuildIdData( aDefault );
+ sal_Int32 nBuildId( 0 );
+ sal_Int32 nIndex1 = aBuildIdData.indexOf(':');
+ sal_Int32 nIndex2 = aBuildIdData.indexOf(')');
+ if (( nIndex1 > 0 ) && ( nIndex2 > 0 ) && ( nIndex2-1 > nIndex1+1 ))
+ {
+ ::rtl::OUString aBuildId = aBuildIdData.copy( nIndex1+1, nIndex2-nIndex1-1 );
+ nBuildId = aBuildId.toInt32();
+ }
+ return nBuildId;
+}
+
WizardResId::WizardResId( USHORT nId ) :
ResId( nId, *FirstStartWizard::GetResManager() )
{
@@ -118,7 +146,47 @@ FirstStartWizard::FirstStartWizard( Window* pParent, sal_Bool bLicenseNeedsAccep
// enableState(STATE_USER, sal_False);
// enableState(STATE_REGISTRATION, sal_False);
- ShowButtonFixedLine(sal_True);
+ try
+ {
+ Point pos(5, 210 );
+ Size size(11, 11 );
+
+ pos = LogicToPixel( pos, MAP_APPFONT );
+ size = LogicToPixel( size, MAP_APPFONT );
+
+ uno::Reference< lang::XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
+ uno::Reference< awt::XToolkit > xToolkit(
+ uno::Reference< lang::XMultiComponentFactory >(
+ xFactory, uno::UNO_QUERY_THROW)->
+ createInstanceWithContext(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("com.sun.star.awt.Toolkit")),
+ getComponentContext(xFactory)),
+ uno::UNO_QUERY_THROW);
+
+ m_xThrobber = uno::Reference< awt::XThrobber >(
+ xToolkit->createWindow(
+ awt::WindowDescriptor(
+ awt::WindowClass_SIMPLE,
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Throbber")),
+ GetComponentInterface(), 0,
+ awt::Rectangle(
+ pos.X(), pos.Y(), size.Width(), size.Height()),
+ awt::WindowAttribute::SHOW)),
+ uno::UNO_QUERY_THROW);
+ }
+ catch (uno::RuntimeException &)
+ {
+ throw;
+ }
+ catch (Exception& )
+ {
+ }
+
+ uno::Reference< awt::XWindow > xThrobberWin( m_xThrobber, uno::UNO_QUERY );
+ if ( xThrobberWin.is() )
+ xThrobberWin->setVisible( false );
+
Size aTPSize(TP_WIDTH, TP_HEIGHT);
SetPageSizePixel(LogicToPixel(aTPSize, MAP_APPFONT));
@@ -151,6 +219,16 @@ FirstStartWizard::FirstStartWizard( Window* pParent, sal_Bool bLicenseNeedsAccep
defaultButton(WZB_NEXT);
}
+void FirstStartWizard::EnableButtonsWhileMigration()
+{
+ enableButtons(0xff, sal_True);
+}
+
+void FirstStartWizard::DisableButtonsWhileMigration()
+{
+ enableButtons(0xff, sal_False);
+}
+
::svt::RoadmapWizardTypes::PathId FirstStartWizard::defineWizardPagesDependingFromContext()
{
::svt::RoadmapWizardTypes::PathId aDefaultPath = 0;
@@ -280,7 +358,7 @@ TabPage* FirstStartWizard::createPage(WizardState _nState)
pTabPage = new LicensePage(this, WizardResId(TP_LICENSE), m_aLicensePath);
break;
case STATE_MIGRATION:
- pTabPage = new MigrationPage(this, WizardResId(TP_MIGRATION));
+ pTabPage = new MigrationPage(this, WizardResId(TP_MIGRATION), m_xThrobber );
break;
case STATE_USER:
pTabPage = new UserPage(this, WizardResId(TP_USER));
@@ -343,13 +421,21 @@ sal_Bool FirstStartWizard::prepareLeaveCurrentState( CommitPageReason _eReason )
storeAcceptDate();
m_bLicenseWasAccepted = sal_True;
- }
+ }
return svt::RoadmapWizard::prepareLeaveCurrentState(_eReason);
}
sal_Bool FirstStartWizard::leaveState(WizardState)
{
+ if (( getCurrentState() == STATE_MIGRATION ) && m_bLicenseWasAccepted )
+ {
+ // Store accept date and patch level now as it has been
+ // overwritten by the migration process!
+ storeAcceptDate();
+ setPatchLevel();
+ }
+
return sal_True;
}
@@ -436,6 +522,30 @@ void FirstStartWizard::storeAcceptDate()
}
+void FirstStartWizard::setPatchLevel()
+{
+ try {
+ Reference < XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
+ // get configuration provider
+ Reference< XMultiServiceFactory > theConfigProvider = Reference< XMultiServiceFactory >(
+ xFactory->createInstance(sConfigSrvc), UNO_QUERY_THROW);
+ Sequence< Any > theArgs(1);
+ NamedValue v(OUString::createFromAscii("NodePath"),
+ makeAny(OUString::createFromAscii("org.openoffice.Office.Common/Help/Registration")));
+ theArgs[0] <<= v;
+ Reference< XPropertySet > pset = Reference< XPropertySet >(
+ theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs), UNO_QUERY_THROW);
+ Any result = pset->getPropertyValue(OUString::createFromAscii("ReminderDate"));
+
+ OUString aPatchLevel( RTL_CONSTASCII_USTRINGPARAM( "Patch" ));
+ aPatchLevel += OUString::valueOf( getBuildId(), 10 );
+ pset->setPropertyValue(OUString::createFromAscii("ReminderDate"), makeAny(aPatchLevel));
+ Reference< XChangesBatch >(pset, UNO_QUERY_THROW)->commitChanges();
+ } catch (const Exception&)
+ {
+ }
+}
+
#ifdef WNT
typedef int ( __stdcall * CleanCurUserRegProc ) ( wchar_t* );
#endif
diff --git a/desktop/source/migration/wizard.hrc b/desktop/source/migration/wizard.hrc
index 7ef461f1ee..7e83748e90 100644
--- a/desktop/source/migration/wizard.hrc
+++ b/desktop/source/migration/wizard.hrc
@@ -78,6 +78,7 @@
#define ED_USER_LAST 17
#define ED_USER_FATHER 18
#define ED_USER_INITIALS 19
+#define TR_WAITING 20
// global strings
#define STR_STATE_WELCOME RID_FIRSTSTSTART_START+100
diff --git a/desktop/source/migration/wizard.hxx b/desktop/source/migration/wizard.hxx
index a994ec8274..9f26a8b4f2 100644
--- a/desktop/source/migration/wizard.hxx
+++ b/desktop/source/migration/wizard.hxx
@@ -32,6 +32,7 @@
#include <svtools/roadmapwizard.hxx>
#include <vcl/window.hxx>
#include <tools/resid.hxx>
+#include <com/sun/star/awt/XThrobber.hpp>
namespace desktop
{
@@ -61,6 +62,9 @@ public:
virtual short Execute();
virtual long PreNotify( NotifyEvent& rNEvt );
+ void EnableButtonsWhileMigration();
+ void DisableButtonsWhileMigration();
+
private:
sal_Bool m_bOverride;
WizardState _currentState;
@@ -73,10 +77,12 @@ private:
sal_Bool m_bLicenseWasAccepted;
sal_Bool m_bAutomaticUpdChk;
Link m_lnkCancel;
+ ::com::sun::star::uno::Reference< ::com::sun::star::awt::XThrobber > m_xThrobber;
rtl::OUString m_aLicensePath;
void storeAcceptDate();
+ void setPatchLevel();
void disableWizard();
void enableQuickstart();
diff --git a/desktop/source/offacc/exports.map b/desktop/source/offacc/exports.map
deleted file mode 100644
index ba501f9ae0..0000000000
--- a/desktop/source/offacc/exports.map
+++ /dev/null
@@ -1,10 +0,0 @@
-UDK_3_0_0 {
- global:
- GetVersionInfo;
- component_getImplementationEnvironment;
- component_getFactory;
- component_writeInfo;
-
- local:
- *;
-};
diff --git a/desktop/source/offacc/makefile.mk b/desktop/source/offacc/makefile.mk
index fb5cb9ab93..c2d53930b5 100644
--- a/desktop/source/offacc/makefile.mk
+++ b/desktop/source/offacc/makefile.mk
@@ -47,7 +47,7 @@ SHL1OBJS= $(SLOFILES)
SHL1TARGET= $(TARGET)$(DLLPOSTFIX)
SHL1IMPLIB= i$(TARGET)
-SHL1VERSIONMAP=exports.map
+SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 6b49ed0f48..dc976718dc 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -82,6 +82,8 @@ const char s_usingText [] =
" -V, --version version information\n"
" -v, --verbose verbose output to stdout\n"
" -f, --force force overwriting existing extensions\n"
+" -s, --suppress-license prevents showing the license provided that\n"
+" the extension allows it\n"
" --log-file <file> custom log file; default: <cache-dir>/log.txt\n"
" --shared expert feature: operate on shared installation\n"
" deployment context;\n"
@@ -103,6 +105,7 @@ const OptionInfo s_option_infos [] = {
{ RTL_CONSTASCII_STRINGPARAM("shared"), '\0', false },
{ RTL_CONSTASCII_STRINGPARAM("deployment-context"), '\0', true },
{ RTL_CONSTASCII_STRINGPARAM("bundled"), '\0', false},
+ { RTL_CONSTASCII_STRINGPARAM("suppress-license"), 's', false},
{ 0, 0, '\0', false }
};
@@ -207,6 +210,7 @@ extern "C" int unopkg_main()
bool option_force = false;
bool option_verbose = false;
bool option_bundled = false;
+ bool option_suppressLicense = false;
bool subcmd_add = false;
bool subcmd_gui = false;
OUString logFile;
@@ -230,6 +234,9 @@ extern "C" int unopkg_main()
s_option_infos, OUSTR("version") );
OptionInfo const * info_bundled = getOptionInfo(
s_option_infos, OUSTR("bundled") );
+ OptionInfo const * info_suppressLicense = getOptionInfo(
+ s_option_infos, OUSTR("suppress-license") );
+
Reference<XComponentContext> xComponentContext;
Reference<XComponentContext> xLocalComponentContext;
@@ -271,6 +278,7 @@ extern "C" int unopkg_main()
!readOption( &option_shared, info_shared, &nPos ) &&
!readOption( &option_force, info_force, &nPos ) &&
!readOption( &option_bundled, info_bundled, &nPos ) &&
+ !readOption( &option_suppressLicense, info_suppressLicense, &nPos ) &&
!readArgument( &deploymentContext, info_context, &nPos ) &&
!isBootstrapVariable(&nPos))
{
@@ -342,7 +350,8 @@ extern "C" int unopkg_main()
Reference< ::com::sun::star::ucb::XCommandEnvironment > xCmdEnv(
createCmdEnv( xComponentContext, logFile,
- option_force, option_verbose, option_bundled) );
+ option_force, option_verbose, option_bundled,
+ option_suppressLicense) );
if (subcmd_add ||
subCommand.equalsAsciiL(
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index 68eb11f91b..808f30712f 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -86,6 +86,7 @@ class CommandEnvironmentImpl
bool m_option_force_overwrite;
bool m_option_verbose;
bool m_option_bundled;
+ bool m_option_suppressLicense;
Reference< XComponentContext > m_xComponentContext;
Reference< XProgressHandler > m_xLogFile;
@@ -99,7 +100,8 @@ public:
OUString const & log_file,
bool option_force_overwrite,
bool option_verbose,
- bool option_bundled);
+ bool option_bundled,
+ bool option_suppressLicense);
// XCommandEnvironment
virtual Reference< task::XInteractionHandler > SAL_CALL
@@ -124,11 +126,13 @@ CommandEnvironmentImpl::CommandEnvironmentImpl(
OUString const & log_file,
bool option_force_overwrite,
bool option_verbose,
- bool option_bundled)
+ bool option_bundled,
+ bool option_suppressLicense)
: m_logLevel(0),
m_option_force_overwrite( option_force_overwrite ),
m_option_verbose( option_verbose ),
m_option_bundled( option_bundled),
+ m_option_suppressLicense( option_suppressLicense),
m_xComponentContext(xComponentContext)
{
if (log_file.getLength() > 0) {
@@ -279,15 +283,25 @@ void CommandEnvironmentImpl::handle(
}
else if (request >>= licAgreementExc)
{
- String sResMsg( ResId( RID_STR_UNOPKG_NO_SHARED_ALLOWED, *DeploymentResMgr::get() ) );
- sResMsg.SearchAndReplaceAllAscii( "%NAME", licAgreementExc.ExtensionName );
- dp_misc::writeConsole(OUSTR("\n") + sResMsg + OUSTR("\n\n"));
- abort = true;
+ if (m_option_suppressLicense && licAgreementExc.SuppressIfRequired)
+ {
+ approve = true;
+ }
+ else
+ {
+ String sResMsg( ResId( RID_STR_UNOPKG_NO_SHARED_ALLOWED, *DeploymentResMgr::get() ) );
+ sResMsg.SearchAndReplaceAllAscii( "%NAME", licAgreementExc.ExtensionName );
+ dp_misc::writeConsole(OUSTR("\n") + sResMsg + OUSTR("\n\n"));
+ abort = true;
+ }
}
else if (request >>= licExc)
{
bLicenseException = true;
- printLicense(licExc.Text, approve, abort);
+ if (m_option_suppressLicense && licExc.SuppressIfRequired)
+ approve = true;
+ else
+ printLicense(licExc.Text, approve, abort);
}
else if (request >>= instExc)
{
@@ -432,10 +446,12 @@ Reference< XCommandEnvironment > createCmdEnv(
OUString const & logFile,
bool option_force_overwrite,
bool option_verbose,
- bool option_bundled)
+ bool option_bundled,
+ bool option_suppressLicense)
{
return new CommandEnvironmentImpl(
- xContext, logFile, option_force_overwrite, option_verbose, option_bundled);
+ xContext, logFile, option_force_overwrite, option_verbose, option_bundled,
+ option_suppressLicense);
}
} // unopkg
diff --git a/desktop/source/pkgchk/unopkg/unopkg_shared.h b/desktop/source/pkgchk/unopkg/unopkg_shared.h
index 397c57c6a3..07a30abfb3 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_shared.h
+++ b/desktop/source/pkgchk/unopkg/unopkg_shared.h
@@ -163,7 +163,8 @@ css::uno::Reference<css::ucb::XCommandEnvironment> createCmdEnv(
::rtl::OUString const & logFile,
bool option_force_overwrite,
bool option_verbose,
- bool option_bundled);
+ bool option_bundled,
+ bool option_suppressLicense);
//==============================================================================
void printf_packages(
diff --git a/desktop/source/pkgchk/unopkg/version.map b/desktop/source/pkgchk/unopkg/version.map
index b729ec6eb6..8591bb3b58 100644
--- a/desktop/source/pkgchk/unopkg/version.map
+++ b/desktop/source/pkgchk/unopkg/version.map
@@ -25,7 +25,7 @@
#
#*************************************************************************
-unopkg.3 {
+UDK_3_0_0 {
global:
unopkg_main;
diff --git a/desktop/source/so_comp/exports.map b/desktop/source/so_comp/exports.map
deleted file mode 100644
index ba501f9ae0..0000000000
--- a/desktop/source/so_comp/exports.map
+++ /dev/null
@@ -1,10 +0,0 @@
-UDK_3_0_0 {
- global:
- GetVersionInfo;
- component_getImplementationEnvironment;
- component_getFactory;
- component_writeInfo;
-
- local:
- *;
-};
diff --git a/desktop/source/so_comp/makefile.mk b/desktop/source/so_comp/makefile.mk
index b16ae7a009..590f99518c 100644
--- a/desktop/source/so_comp/makefile.mk
+++ b/desktop/source/so_comp/makefile.mk
@@ -55,7 +55,7 @@ SHL1OBJS= $(SLOFILES)
SHL1TARGET= $(TARGET)
SHL1IMPLIB= i$(TARGET)
-SHL1VERSIONMAP=exports.map
+SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
diff --git a/desktop/source/splash/exports.map b/desktop/source/splash/exports.map
deleted file mode 100644
index ba501f9ae0..0000000000
--- a/desktop/source/splash/exports.map
+++ /dev/null
@@ -1,10 +0,0 @@
-UDK_3_0_0 {
- global:
- GetVersionInfo;
- component_getImplementationEnvironment;
- component_getFactory;
- component_writeInfo;
-
- local:
- *;
-};
diff --git a/desktop/source/splash/makefile.mk b/desktop/source/splash/makefile.mk
index 518ccc11ad..8960968743 100644
--- a/desktop/source/splash/makefile.mk
+++ b/desktop/source/splash/makefile.mk
@@ -54,7 +54,7 @@ SHL1OBJS= $(SLOFILES) \
SHL1TARGET=$(TARGET)$(DLLPOSTFIX)
SHL1IMPLIB=i$(TARGET)
-SHL1VERSIONMAP=exports.map
+SHL1VERSIONMAP=$(SOLARENV)/src/component.map
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index 623799cbcb..7e2313b5eb 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -44,6 +44,8 @@
#include <rtl/logfile.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/math.hxx>
+#include <vcl/graph.hxx>
+#include <svtools/filter.hxx>
#define NOT_LOADED ((long)-1)
@@ -58,6 +60,7 @@ SplashScreen::SplashScreen(const Reference< XMultiServiceFactory >& rSMgr)
, _vdev(*((IntroWindow*)this))
, _cProgressFrameColor(sal::static_int_cast< ColorData >(NOT_LOADED))
, _cProgressBarColor(sal::static_int_cast< ColorData >(NOT_LOADED))
+ , _bNativeProgress(true)
, _iMax(100)
, _iProgress(0)
, _eBitmapMode(BM_DEFAULTMODE)
@@ -295,6 +298,9 @@ void SplashScreen::loadConfig()
OUString( RTL_CONSTASCII_USTRINGPARAM( "ProgressPosition" ) ) );
OUString sFullScreenSplash = implReadBootstrapKey(
OUString( RTL_CONSTASCII_USTRINGPARAM( "FullScreenSplash" ) ) );
+ OUString sNativeProgress = implReadBootstrapKey(
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "NativeProgress" ) ) );
+
// Determine full screen splash mode
_bFullScreenSplash = (( sFullScreenSplash.getLength() > 0 ) &&
@@ -344,6 +350,11 @@ void SplashScreen::loadConfig()
_cProgressBarColor = Color( nRed, nGreen, nBlue );
}
}
+
+ if( sNativeProgress.getLength() )
+ {
+ _bNativeProgress = sNativeProgress.toBoolean();
+ }
if ( sSize.getLength() )
{
@@ -418,9 +429,15 @@ bool SplashScreen::loadBitmap(
SvFileStream aStrm( aObj.PathToFileName(), STREAM_STD_READ );
if ( !aStrm.GetError() )
{
+ // Use graphic class to also support more graphic formats (bmp,png,...)
+ Graphic aGraphic;
+
+ GraphicFilter* pGF = GraphicFilter::GetGraphicFilter();
+ pGF->ImportGraphic( aGraphic, String(), aStrm, GRFILTER_FORMAT_DONTKNOW );
+
// Default case, we load the intro bitmap from a seperate file
// (e.g. staroffice_intro.bmp or starsuite_intro.bmp)
- aStrm >> _aIntroBmp;
+ _aIntroBmp = aGraphic.GetBitmapEx();
return true;
}
@@ -438,8 +455,14 @@ bool SplashScreen::findBitmap(rtl::OUString const & path) {
haveBitmap = findAppBitmap(path);
}
if ( !haveBitmap )
+ {
haveBitmap = loadBitmap(
- path, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("intro.bmp")));
+ path, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("intro.png")));
+ if ( !haveBitmap )
+ haveBitmap = loadBitmap(
+ path, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("intro.bmp")));
+ }
+
return haveBitmap;
}
@@ -469,21 +492,34 @@ bool SplashScreen::findScreenBitmap(rtl::OUString const & path)
aStrBuf.append( OUString::valueOf( nWidth ));
aStrBuf.appendAscii( "x" );
aStrBuf.append( OUString::valueOf( nHeight ));
- aStrBuf.appendAscii( ".bmp" );
- OUString aBmpFileName = aStrBuf.makeStringAndClear();
+
+ OUString aRootIntroFileName = aStrBuf.makeStringAndClear();
+ OUString aBmpFileName = aRootIntroFileName + OUString::createFromAscii(".png");
bool haveBitmap = loadBitmap( path, aBmpFileName );
if ( !haveBitmap )
{
+ aBmpFileName = aRootIntroFileName + OUString::createFromAscii(".bmp");
+ haveBitmap = loadBitmap( path, aBmpFileName );
+ }
+
+ if ( !haveBitmap )
+ {
aStrBuf.appendAscii( "intro_" );
aStrBuf.appendAscii( "_" );
aStrBuf.append( OUString::valueOf( nWidth ));
aStrBuf.appendAscii( "x" );
aStrBuf.append( OUString::valueOf( nHeight ));
- aStrBuf.appendAscii( ".bmp" );
- aBmpFileName = aStrBuf.makeStringAndClear();
+
+ aRootIntroFileName = aStrBuf.makeStringAndClear();
+ aBmpFileName = aRootIntroFileName + OUString::createFromAscii(".png");
haveBitmap = loadBitmap( path, aBmpFileName );
+ if ( !haveBitmap )
+ {
+ aBmpFileName = aRootIntroFileName + OUString::createFromAscii(".bmp");
+ haveBitmap = loadBitmap( path, aBmpFileName );
+ }
}
return haveBitmap;
}
@@ -498,9 +534,16 @@ bool SplashScreen::findAppBitmap(rtl::OUString const & path)
aStrBuf.appendAscii( "intro_" );
aStrBuf.appendAscii( "_" );
aStrBuf.append( _sAppName );
- aStrBuf.appendAscii( ".bmp" );
- OUString aBmpFileName = aStrBuf.makeStringAndClear();
+
+ OUString aRootIntroFileName = aStrBuf.makeStringAndClear();
+
+ OUString aBmpFileName = aRootIntroFileName + OUString::createFromAscii( ".png" );
haveBitmap = loadBitmap( path, aBmpFileName );
+ if ( !haveBitmap )
+ {
+ aBmpFileName = aRootIntroFileName + OUString::createFromAscii( ".bmp" );
+ haveBitmap = loadBitmap( path, aBmpFileName );
+ }
}
return haveBitmap;
}
@@ -584,9 +627,9 @@ void SplashScreen::Paint( const Rectangle&)
BOOL bNativeOK = FALSE;
// in case of native controls we need to draw directly to the window
- if( IsNativeControlSupported( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL ) )
+ if( _bNativeProgress && IsNativeControlSupported( CTRL_INTROPROGRESS, PART_ENTIRE_CONTROL ) )
{
- DrawBitmap( Point(), _aIntroBmp );
+ DrawBitmapEx( Point(), _aIntroBmp );
ImplControlValue aValue( _iProgress * _barwidth / _iMax);
Rectangle aDrawRect( Point(_tlx, _tly), Size( _barwidth, _barheight ) );
@@ -612,7 +655,7 @@ void SplashScreen::Paint( const Rectangle&)
//non native drawing
// draw bitmap
if (_bPaintBitmap)
- _vdev.DrawBitmap( Point(), _aIntroBmp );
+ _vdev.DrawBitmapEx( Point(), _aIntroBmp );
if (_bPaintProgress) {
// draw progress...
diff --git a/desktop/source/splash/splash.hxx b/desktop/source/splash/splash.hxx
index 77f34be5ce..8d1bfb7dbe 100644
--- a/desktop/source/splash/splash.hxx
+++ b/desktop/source/splash/splash.hxx
@@ -34,7 +34,7 @@
#include <cppuhelper/implbase2.hxx>
#include <cppuhelper/interfacecontainer.h>
#include <vcl/introwin.hxx>
-#include <vcl/bitmap.hxx>
+#include <vcl/bitmapex.hxx>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <osl/mutex.hxx>
#include <vcl/virdev.hxx>
@@ -86,9 +86,10 @@ private:
Reference< XMultiServiceFactory > _rFactory;
VirtualDevice _vdev;
- Bitmap _aIntroBmp;
+ BitmapEx _aIntroBmp;
Color _cProgressFrameColor;
Color _cProgressBarColor;
+ bool _bNativeProgress;
OUString _sAppName;
std::vector< FullScreenProgressRatioValue > _sFullScreenProgressRatioValues;
diff --git a/desktop/test/deployment/simple_license/suppress_license.oxt b/desktop/test/deployment/simple_license/suppress_license.oxt
new file mode 100755
index 0000000000..2bacd6aa37
--- /dev/null
+++ b/desktop/test/deployment/simple_license/suppress_license.oxt
Binary files differ
diff --git a/desktop/test/deployment/simple_license/tests_simple_license.odt b/desktop/test/deployment/simple_license/tests_simple_license.odt
index b0f5410d99..b0c86e11c6 100644
--- a/desktop/test/deployment/simple_license/tests_simple_license.odt
+++ b/desktop/test/deployment/simple_license/tests_simple_license.odt
Binary files differ
diff --git a/desktop/util/ooverinfo.rc b/desktop/util/ooverinfo.rc
index 7a80adcad6..6d92e2a995 100644
--- a/desktop/util/ooverinfo.rc
+++ b/desktop/util/ooverinfo.rc
@@ -69,7 +69,7 @@ VS_VERSION_INFO versioninfo
value "ProductVersion", PPS(VER_LEVEL) "\0"
value "OriginalFilename", "SOFFICE.EXE\0"
value "InternalName", "SOFFICE\0"
- value "LegalCopyright", S_CRIGHT " Sun Microsystems, Inc.\0"
+ value "LegalCopyright", S_CRIGHT " Oracle, Inc.\0"
}
#else
block "040904E4"
@@ -81,7 +81,7 @@ VS_VERSION_INFO versioninfo
value "ProductVersion", PPS(VER_LEVEL) "\0"
value "OriginalFilename", "SOFFICE.EXE\0"
value "InternalName", "SOFFICE\0"
- value "LegalCopyright", S_CRIGHT " Sun Microsystems, Inc.\0"
+ value "LegalCopyright", S_CRIGHT " Oracle, Inc.\0"
}
#endif
}
@@ -96,44 +96,43 @@ VS_VERSION_INFO versioninfo
}
}
-
-2 ICON "icons\\ooo3_writer_doc.ico"
-3 ICON "icons\\ooo3_writer_tem.ico"
-4 ICON "icons\\ooo3_calc_doc.ico"
-5 ICON "icons\\ooo3_calc_tem.ico"
-6 ICON "icons\\ooo3_draw_doc.ico"
-7 ICON "icons\\ooo3_draw_tem.ico"
-8 ICON "icons\\ooo3_impress_doc.ico"
-9 ICON "icons\\ooo3_impress_tem.ico"
-10 ICON "icons\\ooo3_impress_doc.ico"
-11 ICON "icons\\ooo3_global_doc.ico"
-12 ICON "icons\\ooo3_html_doc.ico"
-13 ICON "icons\\ooo3_chart_doc.ico"
-14 ICON "icons\\ooo3_base_doc.ico"
-15 ICON "icons\\ooo3_math_doc.ico"
-16 ICON "icons\\ooo3_empty_tem.ico"
-17 ICON "icons\\ooo3_macro_doc.ico"
+2 ICON "icons\\oasis-text.ico"
+3 ICON "icons\\oasis-text-template.ico"
+4 ICON "icons\\oasis-spreadsheet.ico"
+5 ICON "icons\\oasis-spreadsheet-template.ico"
+6 ICON "icons\\oasis-drawing.ico"
+7 ICON "icons\\oasis-drawing-template.ico"
+8 ICON "icons\\oasis-presentation.ico"
+9 ICON "icons\\oasis-presentation-template.ico"
+10 ICON "icons\\oasis-presentation-template.ico"
+11 ICON "icons\\oasis-master-document.ico"
+12 ICON "icons\\oasis-web-template.ico"
+13 ICON "icons\\oasis-empty-document.ico"
+14 ICON "icons\\oasis-database.ico"
+15 ICON "icons\\oasis-formula.ico"
+16 ICON "icons\\oasis-web-template.ico"
+17 ICON "icons\\empty-document.ico"
18 ICON "icons\\ooo-configuration.ico"
-19 ICON "icons\\ooo-open.ico"
-20 ICON "icons\\ooo-image-doc.ico"
+19 ICON "icons\\ooo3_open.ico"
+20 ICON "icons\\empty-document.ico"
21 ICON "icons\\ooo3_writer_app.ico"
22 ICON "icons\\ooo3_calc_app.ico"
23 ICON "icons\\ooo3_draw_app.ico"
24 ICON "icons\\ooo3_impress_app.ico"
25 ICON "icons\\ooo3_math_app.ico"
26 ICON "icons\\ooo3_base_app.ico"
-27 ICON "icons\\ooo3_empty_doc.ico"
-28 ICON "icons\\ooo11-writer-doc.ico"
-29 ICON "icons\\ooo11-writer-tem.ico"
-30 ICON "icons\\ooo11-calc-doc.ico"
-31 ICON "icons\\ooo11-calc-tem.ico"
-32 ICON "icons\\ooo11-draw-doc.ico"
-33 ICON "icons\\ooo11-draw-tem.ico"
-34 ICON "icons\\ooo11-impress-doc.ico"
-35 ICON "icons\\ooo11-impress-tem.ico"
-36 ICON "icons\\ooo11-master-doc.ico"
-37 ICON "icons\\ooo11-chart-doc.ico"
-38 ICON "icons\\ooo11-base-doc.ico"
-39 ICON "icons\\ooo11-math-doc.ico"
+27 ICON "icons\\oasis-empty-document.ico"
+28 ICON "icons\\text.ico"
+29 ICON "icons\\text-template.ico"
+30 ICON "icons\\spreadsheet.ico"
+31 ICON "icons\\spreadsheet-template.ico"
+32 ICON "icons\\drawing.ico"
+33 ICON "icons\\drawing-template.ico"
+34 ICON "icons\\presentation.ico"
+35 ICON "icons\\presentation-template.ico"
+36 ICON "icons\\master-document.ico"
+37 ICON "icons\\empty-document.ico"
+38 ICON "icons\\database.ico"
+39 ICON "icons\\formula.ico"
40 ICON "icons\\oxt-extension.ico"
diff --git a/desktop/util/ooverinfo2.rc b/desktop/util/ooverinfo2.rc
index adf7aac708..f149ec6474 100644
--- a/desktop/util/ooverinfo2.rc
+++ b/desktop/util/ooverinfo2.rc
@@ -48,42 +48,43 @@
// -----------------------------------------------------------------------
-ICON 2 "icons/ooo-writer-doc.ico"
-ICON 3 "icons/ooo-writer-tem.ico"
-ICON 4 "icons/ooo-calc-doc.ico"
-ICON 5 "icons/ooo-calc-tem.ico"
-ICON 6 "icons/ooo-draw-doc.ico"
-ICON 7 "icons/ooo-draw-tem.ico"
-ICON 8 "icons/ooo-impress-doc.ico"
-ICON 9 "icons/ooo-impress-tem.ico"
-ICON 10 "icons/ooo-impress-doc.ico"
-//ICON 11 "icons/ooo-global-doc.ico"
-//ICON 12 "icons/ooo-html-doc.ico"
-ICON 13 "icons/ooo-chart-doc.ico"
-ICON 14 "icons/ooo-base-doc.ico"
-ICON 15 "icons/ooo-math-doc.ico"
-ICON 16 "icons/ooo-empty-tem.ico"
-ICON 17 "icons/ooo-macro-doc.ico"
+ICON 2 "icons/oasis-text.ico"
+ICON 3 "icons/oasis-text-template.ico"
+ICON 4 "icons/oasis-spreadsheet.ico"
+ICON 5 "icons/oasis-spreadsheet-template.ico"
+ICON 6 "icons/oasis-drawing.ico"
+ICON 7 "icons/oasis-drawing-template.ico"
+ICON 8 "icons/oasis-presentation.ico"
+ICON 9 "icons/oasis-presentation-template.ico"
+ICON 10 "icons/oasis-presentation-template.ico"
+// ICON 11 "icons/oasis-master-document.ico"
+// ICON 12 "icons/oasis-web-template.ico"
+ICON 13 "icons/oasis-empty-document.ico"
+ICON 14 "icons/oasis-database.ico"
+ICON 15 "icons/oasis-formula.ico"
+ICON 16 "icons/oasis-web-template.ico"
+ICON 17 "icons/empty-document.ico"
ICON 18 "icons/ooo-configuration.ico"
ICON 19 "icons/ooo-open.ico"
-ICON 20 "icons/ooo-image-doc.ico"
+ICON 20 "icons/empty-document.ico"
ICON 21 "icons/ooo-writer-app.ico"
ICON 22 "icons/ooo-calc-app.ico"
ICON 23 "icons/ooo-draw-app.ico"
ICON 24 "icons/ooo-impress-app.ico"
ICON 25 "icons/ooo-math-app.ico"
ICON 26 "icons/ooo-base-app.ico"
-ICON 27 "icons/ooo-empty-doc.ico"
-ICON 28 "icons/ooo11-writer-doc.ico"
-ICON 29 "icons/ooo11-writer-tem.ico"
-ICON 30 "icons/ooo11-calc-doc.ico"
-ICON 31 "icons/ooo11-calc-tem.ico"
-ICON 32 "icons/ooo11-draw-doc.ico"
-ICON 33 "icons/ooo11-draw-tem.ico"
-ICON 34 "icons/ooo11-impress-doc.ico"
-ICON 35 "icons/ooo11-impress-tem.ico"
-ICON 36 "icons/ooo11-master-doc.ico"
-ICON 37 "icons/ooo11-chart-doc.ico"
-ICON 38 "icons/ooo11-base-doc.ico"
-ICON 39 "icons/ooo11-math-doc.ico"
+ICON 27 "icons/oasis-empty-document.ico"
+ICON 28 "icons/text.ico"
+ICON 29 "icons/text-template.ico"
+ICON 30 "icons/spreadsheet.ico"
+ICON 31 "icons/spreadsheet-template.ico"
+ICON 32 "icons/drawing.ico"
+ICON 33 "icons/drawing-template.ico"
+ICON 34 "icons/presentation.ico"
+ICON 35 "icons/presentation-template.ico"
+ICON 36 "icons/master-document.ico"
+ICON 37 "icons/empty-document.ico"
+ICON 38 "icons/database.ico"
+ICON 39 "icons/formula.ico"
+ICON 40 "icons/oxt-extension.ico"
diff --git a/desktop/util/verinfo.rc b/desktop/util/verinfo.rc
index a9f3dcd3f4..038953f2aa 100644
--- a/desktop/util/verinfo.rc
+++ b/desktop/util/verinfo.rc
@@ -68,25 +68,25 @@ VS_VERSION_INFO versioninfo
block "040704E4"
{
// German StringTable
- value "CompanyName", "Sun Microsystems, Inc.\0"
+ value "CompanyName", "Oracle, Inc.\0"
value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
value "FileVersion", PPS(VER_LEVEL) "\0"
value "ProductVersion", PPS(VER_LEVEL) "\0"
value "OriginalFilename", "SOFFICE.EXE\0"
value "InternalName", "SOFFICE\0"
- value "LegalCopyright", S_CRIGHT " Sun Microsystems, Inc.\0"
+ value "LegalCopyright", S_CRIGHT " Oracle, Inc.\0"
}
#else
block "040904E4"
{
// International StringTable
- value "CompanyName", "Sun Microsystems, Inc.\0"
+ value "CompanyName", "Oracle, Inc.\0"
value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
value "FileVersion", PPS(VER_LEVEL) "\0"
value "ProductVersion", PPS(VER_LEVEL) "\0"
value "OriginalFilename", "SOFFICE.EXE\0"
value "InternalName", "SOFFICE\0"
- value "LegalCopyright", S_CRIGHT " Sun Microsystems, Inc.\0"
+ value "LegalCopyright", S_CRIGHT " Oracle, Inc.\0"
}
#endif
}
@@ -115,10 +115,10 @@ VS_VERSION_INFO versioninfo
13 ICON "icons\\oasis-empty-document.ico"
14 ICON "icons\\oasis-database.ico"
15 ICON "icons\\oasis-formula.ico"
-16 ICON "icons\\empty-template.ico"
+16 ICON "icons\\oasis-web-template.ico"
17 ICON "icons\\empty-document.ico"
18 ICON "icons\\so8-configuration.ico"
-19 ICON "icons\\so8-open.ico"
+19 ICON "icons\\so9_open.ico"
20 ICON "icons\\empty-document.ico"
21 ICON "icons\\so9_writer_app.ico"
22 ICON "icons\\so9_calc_app.ico"
diff --git a/desktop/win32/source/applauncher/makefile.mk b/desktop/win32/source/applauncher/makefile.mk
index 4285476475..f0f5743f38 100644
--- a/desktop/win32/source/applauncher/makefile.mk
+++ b/desktop/win32/source/applauncher/makefile.mk
@@ -129,7 +129,7 @@ APP6PRODUCTDEF+=-DRES_APP_NAME=smath
APP7TARGET=so$/sweb
APP7NOSAL=TRUE
APP7LINKRES=$(MISC)$/$(TARGET)7.res
-APP7ICON=$(SOLARRESDIR)$/icons/so9_html_doc.ico
+APP7ICON=$(SOLARRESDIR)$/icons/so9_writer_app.ico
APP7OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/sweb.obj
diff --git a/desktop/win32/source/applauncher/ooo/makefile.mk b/desktop/win32/source/applauncher/ooo/makefile.mk
index 9c60ad1b48..02f240cce9 100644
--- a/desktop/win32/source/applauncher/ooo/makefile.mk
+++ b/desktop/win32/source/applauncher/ooo/makefile.mk
@@ -116,7 +116,7 @@ APP7DEPN=verinfo.rc
APP7VERINFO=verinfo.rc
APP7NOSAL=TRUE
APP7LINKRES=$(MISC)$/$(TARGET)7.res
-APP7ICON=$(SOLARRESDIR)$/icons/ooo3_html_doc.ico
+APP7ICON=$(SOLARRESDIR)$/icons/ooo3_writer_app.ico
APP7OBJS = \
$(OBJ)$/launcher.obj\
$(OBJ)$/sweb.obj
diff --git a/desktop/zipintro/makefile.mk b/desktop/zipintro/makefile.mk
index 6a1ff592d6..fef106d1e0 100644
--- a/desktop/zipintro/makefile.mk
+++ b/desktop/zipintro/makefile.mk
@@ -36,29 +36,29 @@ TARGET=zipintro
DEFAULT_FLAVOURS=dev dev_nologo nologo broffice dev_broffice nologo_broffice nologo_dev_broffice intro
ZIP1LIST= \
- $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/dev$/introabout$/intro.bmp $(INTRO_BITMAPS)) \
- $(null,$(ABOUT_BITMAPS) $(MISC)$/$(RSCDEFIMG)$/introabout$/about.bmp $(ABOUT_BITMAPS))
+ $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/dev$/introabout$/intro.png $(INTRO_BITMAPS)) \
+ $(null,$(ABOUT_BITMAPS) $(MISC)$/$(RSCDEFIMG)$/introabout$/about.png $(ABOUT_BITMAPS))
ZIP2LIST= \
- $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/dev_nologo$/introabout$/intro.bmp $(INTRO_BITMAPS)) \
- $(null,$(ABOUT_BITMAPS) $(MISC)$/$(RSCDEFIMG)$/introabout$/about.bmp $(ABOUT_BITMAPS))
+ $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/dev_nologo$/introabout$/intro.png $(INTRO_BITMAPS)) \
+ $(null,$(ABOUT_BITMAPS) $(MISC)$/$(RSCDEFIMG)$/introabout$/about.png $(ABOUT_BITMAPS))
ZIP3LIST= \
- $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/nologo$/introabout$/intro.bmp $(INTRO_BITMAPS)) \
- $(null,$(ABOUT_BITMAPS) $(MISC)$/$(RSCDEFIMG)$/introabout$/about.bmp $(ABOUT_BITMAPS))
+ $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/nologo$/introabout$/intro.png $(INTRO_BITMAPS)) \
+ $(null,$(ABOUT_BITMAPS) $(MISC)$/$(RSCDEFIMG)$/introabout$/about.png $(ABOUT_BITMAPS))
ZIP4LIST= \
- $(null,$(INTRO_BITMAPS) $(MISC)$/$(RSCDEFIMG)$/introabout$/intro.bmp $(INTRO_BITMAPS)) \
- $(null,$(ABOUT_BITMAPS) $(MISC)$/$(RSCDEFIMG)$/introabout$/about.bmp $(ABOUT_BITMAPS))
+ $(null,$(INTRO_BITMAPS) $(MISC)$/$(RSCDEFIMG)$/introabout$/intro.png $(INTRO_BITMAPS)) \
+ $(null,$(ABOUT_BITMAPS) $(MISC)$/$(RSCDEFIMG)$/introabout$/about.png $(ABOUT_BITMAPS))
ZIP5LIST= \
- $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/dev_broffice$/introabout$/intro.bmp $(INTRO_BITMAPS)) \
- $(null,$(ABOUT_BITMAPS) $(MISC)$/ooo_custom_images$/broffice$/introabout$/about.bmp $(ABOUT_BITMAPS))
+ $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/dev_broffice$/introabout$/intro.png $(INTRO_BITMAPS)) \
+ $(null,$(ABOUT_BITMAPS) $(MISC)$/ooo_custom_images$/broffice$/introabout$/about.png $(ABOUT_BITMAPS))
ZIP6LIST= \
- $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/broffice$/introabout$/intro.bmp $(INTRO_BITMAPS)) \
- $(null,$(ABOUT_BITMAPS) $(MISC)$/ooo_custom_images$/broffice$/introabout$/about.bmp $(ABOUT_BITMAPS))
+ $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/broffice$/introabout$/intro.png $(INTRO_BITMAPS)) \
+ $(null,$(ABOUT_BITMAPS) $(MISC)$/ooo_custom_images$/broffice$/introabout$/about.png $(ABOUT_BITMAPS))
ZIP7LIST= \
- $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/nologo_broffice$/introabout$/intro.bmp $(INTRO_BITMAPS)) \
- $(null,$(ABOUT_BITMAPS) $(MISC)$/ooo_custom_images$/broffice$/introabout$/about.bmp $(ABOUT_BITMAPS))
+ $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/nologo_broffice$/introabout$/intro.png $(INTRO_BITMAPS)) \
+ $(null,$(ABOUT_BITMAPS) $(MISC)$/ooo_custom_images$/broffice$/introabout$/about.png $(ABOUT_BITMAPS))
ZIP8LIST= \
- $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/dev_nologo_broffice$/introabout$/intro.bmp $(INTRO_BITMAPS)) \
- $(null,$(ABOUT_BITMAPS) $(MISC)$/ooo_custom_images$/broffice$/introabout$/about.bmp $(ABOUT_BITMAPS))
+ $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/dev_nologo_broffice$/introabout$/intro.png $(INTRO_BITMAPS)) \
+ $(null,$(ABOUT_BITMAPS) $(MISC)$/ooo_custom_images$/broffice$/introabout$/about.png $(ABOUT_BITMAPS))
ZIP1TARGET=dev_intro
ZIP1DEPS=$(ZIP1LIST)
@@ -129,3 +129,6 @@ $(MISC)$/%.bmp : $(SOLARSRC)$/%.bmp
@@-$(MKDIRHIER) $(@:d)
$(COPY) $< $@
+$(MISC)$/%.png : $(SOLARSRC)$/%.png
+ @@-$(MKDIRHIER) $(@:d)
+ $(COPY) $< $@