summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--desktop/inc/app.hxx20
-rw-r--r--desktop/inc/deployment.hrc9
-rw-r--r--desktop/inc/migration.hxx (renamed from desktop/source/migration/migration.hxx)11
-rw-r--r--desktop/inc/pch/precompiled_desktop.cxx2
-rw-r--r--desktop/inc/pch/precompiled_desktop.hxx3
-rw-r--r--desktop/os2/source/applauncher/launcher.cxx9
-rw-r--r--desktop/os2/source/applauncher/launcher.hxx2
-rw-r--r--desktop/os2/source/applauncher/officeloader.cxx3
-rw-r--r--desktop/os2/source/applauncher/quickstart.cxx3
-rw-r--r--desktop/os2/source/applauncher/sbase.cxx3
-rw-r--r--desktop/os2/source/applauncher/scalc.cxx3
-rw-r--r--desktop/os2/source/applauncher/sdraw.cxx3
-rw-r--r--desktop/os2/source/applauncher/simpress.cxx3
-rw-r--r--desktop/os2/source/applauncher/smath.cxx3
-rw-r--r--desktop/os2/source/applauncher/swriter.cxx3
-rw-r--r--desktop/prj/build.lst2
-rw-r--r--desktop/prj/d.lst22
-rw-r--r--desktop/qa/deployment_misc/makefile.mk2
-rw-r--r--desktop/qa/deployment_misc/test_dp_version.cxx1
-rw-r--r--desktop/scripts/sbase.sh2
-rw-r--r--desktop/scripts/scalc.sh2
-rw-r--r--desktop/scripts/sdraw.sh2
-rw-r--r--desktop/scripts/simpress.sh2
-rw-r--r--desktop/scripts/smaster.sh2
-rw-r--r--desktop/scripts/smath.sh2
-rw-r--r--desktop/scripts/soffice.sh62
-rw-r--r--desktop/scripts/sweb.sh2
-rw-r--r--desktop/scripts/swriter.sh2
-rw-r--r--desktop/scripts/unopkg.sh14
-rw-r--r--desktop/source/app/app.cxx255
-rw-r--r--desktop/source/app/appfirststart.cxx126
-rw-r--r--desktop/source/app/appinit.cxx53
-rw-r--r--desktop/source/app/appinit.hxx3
-rw-r--r--desktop/source/app/appsys.cxx2
-rw-r--r--desktop/source/app/appsys.hxx3
-rwxr-xr-xdesktop/source/app/check_ext_deps.cxx19
-rw-r--r--desktop/source/app/checkinstall.cxx3
-rw-r--r--desktop/source/app/checkinstall.hxx3
-rw-r--r--desktop/source/app/cmdlineargs.cxx218
-rw-r--r--desktop/source/app/cmdlineargs.hxx16
-rw-r--r--desktop/source/app/cmdlinehelp.cxx111
-rw-r--r--desktop/source/app/cmdlinehelp.hxx6
-rw-r--r--desktop/source/app/configinit.cxx4
-rw-r--r--desktop/source/app/configinit.hxx3
-rw-r--r--desktop/source/app/copyright_ascii_ooo.c2
-rw-r--r--desktop/source/app/copyright_ascii_sun.c2
-rw-r--r--desktop/source/app/desktopcontext.cxx5
-rw-r--r--desktop/source/app/desktopcontext.hxx3
-rw-r--r--desktop/source/app/desktopresid.cxx3
-rw-r--r--desktop/source/app/desktopresid.hxx3
-rw-r--r--desktop/source/app/dispatchwatcher.cxx269
-rw-r--r--desktop/source/app/dispatchwatcher.hxx10
-rw-r--r--desktop/source/app/langselect.cxx19
-rw-r--r--desktop/source/app/langselect.hxx3
-rw-r--r--desktop/source/app/lockfile.cxx130
-rw-r--r--desktop/source/app/lockfile.hxx20
-rw-r--r--desktop/source/app/lockfile2.cxx12
-rw-r--r--desktop/source/app/main.c3
-rw-r--r--desktop/source/app/makefile.mk2
-rw-r--r--desktop/source/app/officeipcthread.cxx148
-rw-r--r--desktop/source/app/officeipcthread.hxx28
-rw-r--r--desktop/source/app/omutexmember.hxx3
-rw-r--r--desktop/source/app/sofficemain.cxx27
-rw-r--r--desktop/source/app/sofficemain.h3
-rw-r--r--desktop/source/app/userinstall.cxx38
-rw-r--r--desktop/source/app/userinstall.hxx3
-rw-r--r--desktop/source/deployment/dp_log.cxx2
-rw-r--r--desktop/source/deployment/dp_persmap.cxx2
-rw-r--r--desktop/source/deployment/dp_services.cxx2
-rw-r--r--desktop/source/deployment/dp_xml.cxx1
-rw-r--r--desktop/source/deployment/gui/descedit.cxx2
-rw-r--r--desktop/source/deployment/gui/descedit.hxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui.h3
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui.hrc9
-rw-r--r--desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_autoscrolledit.hxx3
-rw-r--r--desktop/source/deployment/gui/dp_gui_backend.src45
-rw-r--r--desktop/source/deployment/gui/dp_gui_dependencydialog.cxx3
-rw-r--r--desktop/source/deployment/gui/dp_gui_dependencydialog.hxx5
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_dialog.src53
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_dialog2.cxx49
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.hxx3
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.src16
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx77
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx3
-rw-r--r--desktop/source/deployment/gui/dp_gui_service.cxx14
-rw-r--r--desktop/source/deployment/gui/dp_gui_shared.hxx3
-rw-r--r--desktop/source/deployment/gui/dp_gui_system.cxx59
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_theextmgr.cxx18
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_theextmgr.hxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_thread.cxx3
-rw-r--r--desktop/source/deployment/gui/dp_gui_thread.hxx3
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_updatedata.hxx3
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_updatedialog.cxx17
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_updatedialog.hxx8
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_updatedialog.src5
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx37
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx5
-rw-r--r--desktop/source/deployment/gui/license_dialog.cxx17
-rw-r--r--desktop/source/deployment/gui/license_dialog.hxx3
-rw-r--r--desktop/source/deployment/gui/makefile.mk1
-rw-r--r--desktop/source/deployment/inc/db.hxx40
-rw-r--r--desktop/source/deployment/inc/dp_dependencies.hxx3
-rw-r--r--desktop/source/deployment/inc/dp_descriptioninfoset.hxx3
-rw-r--r--desktop/source/deployment/inc/dp_identifier.hxx3
-rw-r--r--desktop/source/deployment/inc/dp_interact.h3
-rw-r--r--desktop/source/deployment/inc/dp_misc.h3
-rw-r--r--desktop/source/deployment/inc/dp_misc_api.hxx3
-rw-r--r--desktop/source/deployment/inc/dp_persmap.h3
-rw-r--r--desktop/source/deployment/inc/dp_platform.hxx5
-rw-r--r--desktop/source/deployment/inc/dp_resource.h3
-rw-r--r--desktop/source/deployment/inc/dp_ucb.h3
-rw-r--r--desktop/source/deployment/inc/dp_version.hxx3
-rw-r--r--desktop/source/deployment/inc/dp_xml.h3
-rw-r--r--desktop/source/deployment/manager/dp_activepackages.cxx3
-rw-r--r--desktop/source/deployment/manager/dp_activepackages.hxx3
-rw-r--r--desktop/source/deployment/manager/dp_informationprovider.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_manager.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_manager.h2
-rw-r--r--desktop/source/deployment/manager/dp_managerfac.cxx2
-rw-r--r--desktop/source/deployment/misc/db.cxx2
-rw-r--r--desktop/source/deployment/misc/dp_dependencies.cxx18
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx3
-rw-r--r--desktop/source/deployment/misc/dp_identifier.cxx3
-rw-r--r--desktop/source/deployment/misc/dp_interact.cxx2
-rw-r--r--desktop/source/deployment/misc/dp_misc.cxx7
-rw-r--r--desktop/source/deployment/misc/dp_platform.cxx23
-rw-r--r--desktop/source/deployment/misc/dp_resource.cxx2
-rw-r--r--desktop/source/deployment/misc/dp_ucb.cxx3
-rw-r--r--desktop/source/deployment/misc/dp_version.cxx3
-rw-r--r--desktop/source/deployment/registry/component/dp_component.cxx10
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx14
-rwxr-xr-xdesktop/source/deployment/registry/dp_backend.cxx15
-rw-r--r--desktop/source/deployment/registry/dp_registry.cxx2
-rw-r--r--desktop/source/deployment/registry/executable/dp_executable.cxx6
-rw-r--r--desktop/source/deployment/registry/executable/dp_executablebackenddb.hxx.orig (renamed from desktop/source/deployment/gui/dp_gui_system.hxx)49
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx26
-rwxr-xr-xdesktop/source/deployment/registry/inc/dp_backend.h11
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx7
-rw-r--r--desktop/source/deployment/registry/script/dp_lib_container.cxx8
-rw-r--r--desktop/source/deployment/registry/script/dp_lib_container.h20
-rw-r--r--desktop/source/deployment/registry/script/dp_script.cxx24
-rw-r--r--desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx2
-rw-r--r--desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx6
-rw-r--r--desktop/source/deployment/registry/sfwk/dp_parceldesc.hxx3
-rwxr-xr-xdesktop/source/deployment/registry/sfwk/dp_sfwk.cxx6
-rw-r--r--desktop/source/inc/exithelper.hxx3
-rw-r--r--desktop/source/migration/cfgfilter.hxx173
-rw-r--r--desktop/source/migration/makefile.mk11
-rw-r--r--desktop/source/migration/migration.cxx217
-rw-r--r--desktop/source/migration/migration_impl.hxx13
-rw-r--r--desktop/source/migration/services/autocorrmigration.cxx15
-rw-r--r--desktop/source/migration/services/autocorrmigration.hxx3
-rw-r--r--desktop/source/migration/services/basicmigration.cxx13
-rw-r--r--desktop/source/migration/services/basicmigration.hxx3
-rw-r--r--desktop/source/migration/services/cexports.cxx3
-rw-r--r--desktop/source/migration/services/jvmfwk.cxx14
-rw-r--r--desktop/source/migration/services/jvmfwk.hxx2
-rw-r--r--desktop/source/migration/services/misc.hxx3
-rw-r--r--desktop/source/migration/services/oo3extensionmigration.hxx1
-rw-r--r--[-rwxr-xr-x]desktop/source/migration/services/wordbookmigration.cxx5
-rw-r--r--[-rwxr-xr-x]desktop/source/migration/services/wordbookmigration.hxx3
-rw-r--r--desktop/source/offacc/acceptor.cxx20
-rw-r--r--desktop/source/offacc/acceptor.hxx2
-rw-r--r--desktop/source/pagein/file_image.h3
-rw-r--r--desktop/source/pagein/file_image_unx.c3
-rw-r--r--desktop/source/pagein/makefile.mk1
-rw-r--r--desktop/source/pagein/pagein.c3
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_app.cxx2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx2
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_main.c3
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_main.h3
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx3
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_shared.h1
-rw-r--r--desktop/source/so_comp/evaluation.cxx11
-rw-r--r--desktop/source/so_comp/evaluation.hxx3
-rw-r--r--desktop/source/so_comp/oemjob.cxx57
-rw-r--r--desktop/source/so_comp/oemjob.hxx3
-rw-r--r--desktop/source/so_comp/services.cxx20
-rw-r--r--desktop/source/splash/makefile.mk6
-rw-r--r--[-rwxr-xr-x]desktop/source/splash/services_spl.cxx26
-rw-r--r--desktop/source/splash/splash.cxx36
-rw-r--r--desktop/source/splash/splash.hxx10
-rw-r--r--desktop/test/deployment/boxt/Addons.xcu50
-rw-r--r--desktop/test/deployment/executable_content/build/hello.c8
-rw-r--r--desktop/test/deployment/locationtest/manifest.xml4
-rwxr-xr-xdesktop/test/deployment/update/updateinfocreation/build/manifest.xml4
-rw-r--r--desktop/unx/source/makefile.mk64
-rw-r--r--[-rwxr-xr-x]desktop/unx/source/officeloader/officeloader.cxx3
-rw-r--r--desktop/unx/source/splashx.c624
-rw-r--r--desktop/unx/source/splashx.h65
-rw-r--r--desktop/unx/source/start.c861
-rw-r--r--desktop/unx/splash/makefile.mk71
-rw-r--r--desktop/unx/splash/services_unxsplash.cxx159
-rw-r--r--desktop/unx/splash/unxsplash.cxx164
-rw-r--r--desktop/unx/splash/unxsplash.hxx89
-rw-r--r--desktop/util/makefile.mk15
-rw-r--r--desktop/util/ooverinfo.rc15
-rw-r--r--desktop/util/template.manifest4
-rwxr-xr-xdesktop/util/verinfo.rc13
-rw-r--r--desktop/win32/source/applauncher/launcher.cxx2
-rw-r--r--desktop/win32/source/applauncher/launcher.hxx3
-rwxr-xr-xdesktop/win32/source/applauncher/ooo/verinfo.rc15
-rw-r--r--desktop/win32/source/applauncher/sbase.cxx3
-rw-r--r--desktop/win32/source/applauncher/scalc.cxx3
-rw-r--r--desktop/win32/source/applauncher/sdraw.cxx3
-rw-r--r--desktop/win32/source/applauncher/simpress.cxx3
-rw-r--r--desktop/win32/source/applauncher/smath.cxx3
-rw-r--r--desktop/win32/source/applauncher/sweb.cxx3
-rw-r--r--desktop/win32/source/applauncher/swriter.cxx3
-rwxr-xr-xdesktop/win32/source/applauncher/verinfo.rc13
-rw-r--r--desktop/win32/source/extendloaderenvironment.cxx3
-rw-r--r--desktop/win32/source/extendloaderenvironment.hxx3
-rw-r--r--desktop/win32/source/guiloader/genericloader.cxx2
-rw-r--r--desktop/win32/source/guistdio/guistdio.cxx3
-rw-r--r--desktop/win32/source/guistdio/guistdio.inc7
-rw-r--r--desktop/win32/source/guistdio/unopkgio.cxx3
-rw-r--r--desktop/win32/source/lwrapa.cxx3
-rw-r--r--desktop/win32/source/lwrapw.cxx3
-rw-r--r--desktop/win32/source/main.h2
-rw-r--r--desktop/win32/source/officeloader/officeloader.cxx16
-rw-r--r--desktop/win32/source/rebase/Resource.h3
-rw-r--r--desktop/win32/source/rebase/rebase.cxx1
-rw-r--r--desktop/win32/source/rebase/rebasegui.cxx1
-rw-r--r--desktop/win32/source/rwrapa.cxx3
-rw-r--r--desktop/win32/source/rwrapw.cxx3
-rw-r--r--desktop/win32/source/setup/Resource.h3
-rwxr-xr-xdesktop/win32/source/setup/setup.cpp33
-rw-r--r--desktop/win32/source/setup/setup.hxx3
-rw-r--r--desktop/win32/source/setup/setup.ulf2
-rw-r--r--desktop/win32/source/setup/setup_a.cxx3
-rw-r--r--desktop/win32/source/setup/setup_help.hxx4
-rw-r--r--desktop/win32/source/setup/setup_main.cxx11
-rw-r--r--desktop/win32/source/setup/setup_main.hxx6
-rw-r--r--desktop/win32/source/setup/setup_w.cxx2
-rw-r--r--desktop/win32/source/sowrapper.cxx3
-rw-r--r--desktop/win32/source/unoinfo.cxx3
-rw-r--r--desktop/win32/source/wrapper.h2
-rw-r--r--desktop/win32/source/wrappera.cxx3
-rw-r--r--desktop/win32/source/wrapperw.cxx3
-rw-r--r--desktop/zipintro/makefile.mk34
241 files changed, 4130 insertions, 1615 deletions
diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index 73c074a08f..d84fc711a0 100644
--- a/desktop/inc/app.hxx
+++ b/desktop/inc/app.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,9 +33,7 @@
#include <map>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <vcl/svapp.hxx>
-#ifndef _VCL_TIMER_HXX_
#include <vcl/timer.hxx>
-#endif
#include <tools/resmgr.hxx>
#include <unotools/bootstrap.hxx>
#include <com/sun/star/lang/XInitialization.hpp>
@@ -45,7 +44,6 @@
using namespace com::sun::star::task;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
-using namespace rtl;
#define DESKTOP_SAVETASKS_MOD 0x1
#define DESKTOP_SAVETASKS_UNMOD 0x2
@@ -59,7 +57,7 @@ namespace desktop
--------------------------------------------------------------------*/
class CommandLineArgs;
class Lockfile;
-class AcceptorMap : public std::map< OUString, Reference<XInitialization> > {};
+class AcceptorMap : public std::map< rtl::OUString, Reference<XInitialization> > {};
struct ConvertData;
class Desktop : public Application
{
@@ -88,8 +86,9 @@ class Desktop : public Application
Desktop();
~Desktop();
- virtual void Main( );
+ virtual int Main( );
virtual void Init();
+ virtual void InitFinished();
virtual void DeInit();
virtual BOOL QueryExit();
virtual USHORT Exception(USHORT nError);
@@ -130,10 +129,7 @@ class Desktop : public Application
static sal_Bool CheckOEM();
static sal_Bool isCrashReporterEnabled();
- // first-start (ever) & license relate methods
- static rtl::OUString GetLicensePath();
- static sal_Bool LicenseNeedsAcceptance();
- static sal_Bool IsFirstStartWizardNeeded();
+ // first-start (ever) related methods
static sal_Bool CheckExtensionDependencies();
static void DoRestartActionsIfNecessary( sal_Bool bQuickStart );
@@ -196,9 +192,9 @@ class Desktop : public Application
static sal_Bool isUIOnSessionShutdownAllowed();
// on-demand acceptors
- static void createAcceptor(const OUString& aDescription);
+ static void createAcceptor(const rtl::OUString& aDescription);
static void enableAcceptors();
- static void destroyAcceptor(const OUString& aDescription);
+ static void destroyAcceptor(const rtl::OUString& aDescription);
sal_Bool m_bMinimized;
sal_Bool m_bInvisible;
@@ -217,3 +213,5 @@ class Desktop : public Application
}
#endif // _DESKTOP_APP_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/deployment.hrc b/desktop/inc/deployment.hrc
index 92c5742fcd..65131af453 100644
--- a/desktop/inc/deployment.hrc
+++ b/desktop/inc/deployment.hrc
@@ -40,27 +40,19 @@
#define RID_DEPLOYMENT_BUNDLE_START (RID_DEPLOYMENT_START+2000)
#define RID_IMG_DEF_PACKAGE_BUNDLE RID_DEPLOYMENT_BUNDLE_START
-#define RID_IMG_DEF_PACKAGE_BUNDLE_HC (RID_DEPLOYMENT_BUNDLE_START+1)
#define RID_DEPLOYMENT_SCRIPT_START (RID_DEPLOYMENT_START+2500)
#define RID_IMG_SCRIPTLIB RID_DEPLOYMENT_SCRIPT_START
-#define RID_IMG_SCRIPTLIB_HC (RID_DEPLOYMENT_SCRIPT_START+1)
#define RID_IMG_DIALOGLIB (RID_DEPLOYMENT_SCRIPT_START+2)
-#define RID_IMG_DIALOGLIB_HC (RID_DEPLOYMENT_SCRIPT_START+3)
#define RID_DEPLOYMENT_CONF_START (RID_DEPLOYMENT_START+3000)
#define RID_IMG_CONF_XML RID_DEPLOYMENT_CONF_START
-#define RID_IMG_CONF_XML_HC (RID_DEPLOYMENT_CONF_START+1)
#define RID_DEPLOYMENT_COMPONENT_START (RID_DEPLOYMENT_START+3500)
#define RID_IMG_COMPONENT RID_DEPLOYMENT_COMPONENT_START
-#define RID_IMG_COMPONENT_HC (RID_DEPLOYMENT_COMPONENT_START+1)
#define RID_IMG_JAVA_COMPONENT (RID_DEPLOYMENT_COMPONENT_START+2)
-#define RID_IMG_JAVA_COMPONENT_HC (RID_DEPLOYMENT_COMPONENT_START+3)
#define RID_IMG_TYPELIB (RID_DEPLOYMENT_COMPONENT_START+4)
-#define RID_IMG_TYPELIB_HC (RID_DEPLOYMENT_COMPONENT_START+5)
#define RID_IMG_JAVA_TYPELIB (RID_DEPLOYMENT_COMPONENT_START+6)
-#define RID_IMG_JAVA_TYPELIB_HC (RID_DEPLOYMENT_COMPONENT_START+7)
#define RID_DEPLOYMENT_UNOPKG_START (RID_DEPLOYMENT_START+4000)
#define RID_STR_UNOPKG_ACCEPT_LIC_1 (RID_DEPLOYMENT_UNOPKG_START+1)
@@ -83,5 +75,4 @@
#define RID_DEPLOYMENT_HELP_START (RID_DEPLOYMENT_START+5000)
#define RID_IMG_HELP RID_DEPLOYMENT_HELP_START
-#define RID_IMG_HELP_HC (RID_DEPLOYMENT_HELP_START+1)
#endif
diff --git a/desktop/source/migration/migration.hxx b/desktop/inc/migration.hxx
index 3ba0d8fd80..d8620c4ba4 100644
--- a/desktop/source/migration/migration.hxx
+++ b/desktop/inc/migration.hxx
@@ -1,10 +1,11 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* 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
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* This file is part of OpenOffice.org.
*
@@ -36,11 +37,9 @@ namespace desktop {
class Migration
{
public:
- // starts the migration process
- static void doMigration();
- static void cancelMigration();
- static sal_Bool checkMigration();
- static rtl::OUString getOldVersionName();
+ static void migrateSettingsIfNecessary();
};
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/pch/precompiled_desktop.cxx b/desktop/inc/pch/precompiled_desktop.cxx
index 767998a4c8..c75a09a317 100644
--- a/desktop/inc/pch/precompiled_desktop.cxx
+++ b/desktop/inc/pch/precompiled_desktop.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,3 +28,4 @@
#include "precompiled_desktop.hxx"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/inc/pch/precompiled_desktop.hxx b/desktop/inc/pch/precompiled_desktop.hxx
index de5990c02c..023fa49379 100644
--- a/desktop/inc/pch/precompiled_desktop.hxx
+++ b/desktop/inc/pch/precompiled_desktop.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,3 +39,5 @@
#include "tools/debug.hxx"
#include "unotools/configmgr.hxx"
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/os2/source/applauncher/launcher.cxx b/desktop/os2/source/applauncher/launcher.cxx
index bbbc4936cd..33bd34a6d0 100644
--- a/desktop/os2/source/applauncher/launcher.cxx
+++ b/desktop/os2/source/applauncher/launcher.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,11 +67,7 @@ int main( int argc, char* argv[])
DosSetExtLIBPATH( (PCSZ)szLibpath, BEGIN_LIBPATH);
// make sure we load DLL from our path only, so multiple instances/versions
// can be loaded.
-#if 0
- // YD this feature is not compatible with innowin b20,
- // java cannot load with this flag enabled
- DosSetExtLIBPATH( (PCSZ)"T", LIBPATHSTRICT);
-#endif
+
// adjust exe name
_splitpath( szApplicationName, szDrive, szDir, szFileName, szExt );
@@ -120,3 +117,5 @@ int main( int argc, char* argv[])
exit( result.codeResult);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/os2/source/applauncher/launcher.hxx b/desktop/os2/source/applauncher/launcher.hxx
index 266ec74883..1f1c1be968 100644
--- a/desktop/os2/source/applauncher/launcher.hxx
+++ b/desktop/os2/source/applauncher/launcher.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#define INCL_DOS
#define INCL_PM
@@ -7,3 +8,4 @@
extern CHAR APPLICATION_SWITCH[];
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/os2/source/applauncher/officeloader.cxx b/desktop/os2/source/applauncher/officeloader.cxx
index 9a664ab68d..f3124acdcf 100644
--- a/desktop/os2/source/applauncher/officeloader.cxx
+++ b/desktop/os2/source/applauncher/officeloader.cxx
@@ -1,3 +1,6 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "launcher.hxx"
CHAR APPLICATION_SWITCH[] = ( "" );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/os2/source/applauncher/quickstart.cxx b/desktop/os2/source/applauncher/quickstart.cxx
index 63585434bb..b67389272f 100644
--- a/desktop/os2/source/applauncher/quickstart.cxx
+++ b/desktop/os2/source/applauncher/quickstart.cxx
@@ -1,3 +1,6 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "launcher.hxx"
CHAR APPLICATION_SWITCH[] = ( "-quickstart" );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/os2/source/applauncher/sbase.cxx b/desktop/os2/source/applauncher/sbase.cxx
index a60a46be4c..ed3e7cceb3 100644
--- a/desktop/os2/source/applauncher/sbase.cxx
+++ b/desktop/os2/source/applauncher/sbase.cxx
@@ -1,3 +1,6 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "launcher.hxx"
CHAR APPLICATION_SWITCH[] = ( "-base" );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/os2/source/applauncher/scalc.cxx b/desktop/os2/source/applauncher/scalc.cxx
index dc4470ca08..854f34e7f6 100644
--- a/desktop/os2/source/applauncher/scalc.cxx
+++ b/desktop/os2/source/applauncher/scalc.cxx
@@ -1,3 +1,6 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "launcher.hxx"
CHAR APPLICATION_SWITCH[] = ( "-calc" );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/os2/source/applauncher/sdraw.cxx b/desktop/os2/source/applauncher/sdraw.cxx
index 76893e1f4f..b3f4bcff30 100644
--- a/desktop/os2/source/applauncher/sdraw.cxx
+++ b/desktop/os2/source/applauncher/sdraw.cxx
@@ -1,3 +1,6 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "launcher.hxx"
CHAR APPLICATION_SWITCH[] = ( "-draw" );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/os2/source/applauncher/simpress.cxx b/desktop/os2/source/applauncher/simpress.cxx
index 15f03ab7af..f4cf9575eb 100644
--- a/desktop/os2/source/applauncher/simpress.cxx
+++ b/desktop/os2/source/applauncher/simpress.cxx
@@ -1,3 +1,6 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "launcher.hxx"
CHAR APPLICATION_SWITCH[] = ( "-impress" );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/os2/source/applauncher/smath.cxx b/desktop/os2/source/applauncher/smath.cxx
index cad0b8631e..d93b15d345 100644
--- a/desktop/os2/source/applauncher/smath.cxx
+++ b/desktop/os2/source/applauncher/smath.cxx
@@ -1,3 +1,6 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "launcher.hxx"
CHAR APPLICATION_SWITCH[] = ( "-math" );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/os2/source/applauncher/swriter.cxx b/desktop/os2/source/applauncher/swriter.cxx
index ded9cf089d..4fc857cf2e 100644
--- a/desktop/os2/source/applauncher/swriter.cxx
+++ b/desktop/os2/source/applauncher/swriter.cxx
@@ -1,3 +1,6 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "launcher.hxx"
CHAR APPLICATION_SWITCH[] = ( "-writer" );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst
index 146579cab8..2b6638ff37 100644
--- a/desktop/prj/build.lst
+++ b/desktop/prj/build.lst
@@ -19,6 +19,8 @@ dt desktop\win32\source\applauncher\ooo nmake - w dt_applauncher_ooo dt_applaunc
dt desktop\win32\source\rebase nmake - w dt_rebase dt_inc NULL
dt desktop\os2\source\applauncher nmake - p dt_applauncher dt_inc NULL
dt desktop\unx\source\officeloader nmake - u dt_officeloader_unx dt_inc NULL
+dt desktop\unx\source nmake - u dt_uwrapper dt_inc NULL
+dt desktop\unx\splash nmake - u dt_usplash dt_inc NULL
dt desktop\source\pagein nmake - u dt_pagein dt_inc NULL
dt desktop\source\pkgchk\unopkg nmake - all dt_unopkg dt_dp_misc dt_app dt_inc dt_guiloader.w NULL
dt desktop\source\deployment nmake - all dt_deployment dt_dp_manager dt_dp_registry dt_dp_registry_package dt_dp_registry_executable dt_dp_registry_help dt_dp_registry_script dt_dp_registry_sfwk dt_dp_registry_component dt_dp_registry_configuration dt_dp_unopkg dt_inc dt_dp_misc NULL
diff --git a/desktop/prj/d.lst b/desktop/prj/d.lst
index b6e14a5ce7..442303258f 100644
--- a/desktop/prj/d.lst
+++ b/desktop/prj/d.lst
@@ -10,6 +10,7 @@ mkdir: %_DEST%\bin%_EXT%\odf4ms
..\%__SRC%\bin\officeloader.exe %_DEST%\bin%_EXT%\soffice.exe
..\%__SRC%\bin\soffice %_DEST%\bin%_EXT%\soffice.bin
..\%__SRC%\bin\soffice_mac %_DEST%\bin%_EXT%\soffice
+..\%__SRC%\bin\oosplash %_DEST%\bin%_EXT%\oosplash.bin
..\%__SRC%\bin\so\soffice.bin %_DEST%\bin%_EXT%\so\soffice.bin
..\%__SRC%\bin\so\officeloader.exe %_DEST%\bin%_EXT%\so\soffice.exe
..\%__SRC%\bin\so\soffice %_DEST%\bin%_EXT%\so\soffice.bin
@@ -105,21 +106,12 @@ mkdir: %_DEST%\bin%_EXT%\odf4ms
..\%__SRC%\misc\nswrapper.sh %_DEST%\bin%_EXT%\nswrapper
..\%__SRC%\misc\mozwrapper.sh %_DEST%\bin%_EXT%\mozwrapper
-mkdir: %COMMON_DEST%\pck%_EXT%\openoffice_dev
-mkdir: %COMMON_DEST%\pck%_EXT%\openoffice_dev_nologo
-mkdir: %COMMON_DEST%\pck%_EXT%\openoffice_nologo
-mkdir: %COMMON_DEST%\pck%_EXT%\broffice_dev
-mkdir: %COMMON_DEST%\pck%_EXT%\broffice
-mkdir: %COMMON_DEST%\pck%_EXT%\broffice_dev_nologo
-mkdir: %COMMON_DEST%\pck%_EXT%\broffice_nologo
-..\%__SRC%\bin\intro\intro.zip %COMMON_DEST%\pck%_EXT%\intro.zip
-..\%__SRC%\bin\dev\intro.zip %COMMON_DEST%\pck%_EXT%\openoffice_dev\intro.zip
-..\%__SRC%\bin\dev_nologo\intro.zip %COMMON_DEST%\pck%_EXT%\openoffice_dev_nologo\intro.zip
-..\%__SRC%\bin\nologo\intro.zip %COMMON_DEST%\pck%_EXT%\openoffice_nologo\intro.zip
-..\%__SRC%\bin\dev_broffice\intro.zip %COMMON_DEST%\pck%_EXT%\broffice_dev\intro.zip
-..\%__SRC%\bin\broffice\intro.zip %COMMON_DEST%\pck%_EXT%\broffice\intro.zip
-..\%__SRC%\bin\nologo_dev_broffice\intro.zip %COMMON_DEST%\pck%_EXT%\broffice_dev_nologo\intro.zip
-..\%__SRC%\bin\nologo_broffice\intro.zip %COMMON_DEST%\pck%_EXT%\broffice_nologo\intro.zip
+mkdir: %COMMON_DEST%\pck%_EXT%\brand
+mkdir: %COMMON_DEST%\pck%_EXT%\brand_dev
+
+..\%__SRC%\bin\brand\intro.zip %COMMON_DEST%\pck%_EXT%\brand\intro.zip
+..\%__SRC%\bin\brand_dev\intro.zip %COMMON_DEST%\pck%_EXT%\brand_dev\intro.zip
+..\%__SRC%\bin\shell\shell.zip %COMMON_DEST%\pck%_EXT%\shell.zip
..\%__SRC%\bin\guiloader.exe %_DEST%\bin%_EXT%\testtool.exe
diff --git a/desktop/qa/deployment_misc/makefile.mk b/desktop/qa/deployment_misc/makefile.mk
index 16223914e7..f7f4508b96 100644
--- a/desktop/qa/deployment_misc/makefile.mk
+++ b/desktop/qa/deployment_misc/makefile.mk
@@ -44,7 +44,7 @@ CFLAGSCXX += -DDISABLE_PCH_HACK
SHL1TARGET = $(TARGET)
SHL1OBJS = $(SLO)$/test_dp_version.obj
-SHL1STDLIBS = $(CPPUNITLIB) $(DEPLOYMENTMISCLIB) $(SALLIB)
+SHL1STDLIBS = $(CPPUNITLIB) $(DEPLOYMENTMISCLIB) $(SALLIB) $(TESTSHL2LIB)
SHL1VERSIONMAP = version.map
SHL1RPATH = NONE
SHL1IMPLIB = i$(SHL1TARGET)
diff --git a/desktop/qa/deployment_misc/test_dp_version.cxx b/desktop/qa/deployment_misc/test_dp_version.cxx
index cc543fc1b9..12eb4f92f1 100644
--- a/desktop/qa/deployment_misc/test_dp_version.cxx
+++ b/desktop/qa/deployment_misc/test_dp_version.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
diff --git a/desktop/scripts/sbase.sh b/desktop/scripts/sbase.sh
index 932a535e53..e3a8ed07d5 100644
--- a/desktop/scripts/sbase.sh
+++ b/desktop/scripts/sbase.sh
@@ -1,4 +1,4 @@
#!/bin/sh
cmd=`dirname "$0"`/soffice
-exec "$cmd" -base "$@"
+exec "$cmd" --base "$@"
diff --git a/desktop/scripts/scalc.sh b/desktop/scripts/scalc.sh
index b1c3eebaff..c9c3cde39e 100644
--- a/desktop/scripts/scalc.sh
+++ b/desktop/scripts/scalc.sh
@@ -1,4 +1,4 @@
#!/bin/sh
cmd=`dirname "$0"`/soffice
-exec "$cmd" -calc "$@"
+exec "$cmd" --calc "$@"
diff --git a/desktop/scripts/sdraw.sh b/desktop/scripts/sdraw.sh
index fe0338a893..4131a2505f 100644
--- a/desktop/scripts/sdraw.sh
+++ b/desktop/scripts/sdraw.sh
@@ -1,4 +1,4 @@
#!/bin/sh
cmd=`dirname "$0"`/soffice
-exec "$cmd" -draw "$@"
+exec "$cmd" --draw "$@"
diff --git a/desktop/scripts/simpress.sh b/desktop/scripts/simpress.sh
index 20cae509b1..d78ea14207 100644
--- a/desktop/scripts/simpress.sh
+++ b/desktop/scripts/simpress.sh
@@ -1,4 +1,4 @@
#!/bin/sh
cmd=`dirname "$0"`/soffice
-exec "$cmd" -impress "$@"
+exec "$cmd" --impress "$@"
diff --git a/desktop/scripts/smaster.sh b/desktop/scripts/smaster.sh
index affd55b265..ed9b09d512 100644
--- a/desktop/scripts/smaster.sh
+++ b/desktop/scripts/smaster.sh
@@ -1,4 +1,4 @@
#!/bin/sh
cmd=`dirname "$0"`/soffice
-exec "$cmd" -global "$@"
+exec "$cmd" --global "$@"
diff --git a/desktop/scripts/smath.sh b/desktop/scripts/smath.sh
index ae4e3670a8..454fa135ff 100644
--- a/desktop/scripts/smath.sh
+++ b/desktop/scripts/smath.sh
@@ -1,4 +1,4 @@
#!/bin/sh
cmd=`dirname "$0"`/soffice
-exec "$cmd" -math "$@"
+exec "$cmd" --math "$@"
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
index a268536181..85108530bf 100644
--- a/desktop/scripts/soffice.sh
+++ b/desktop/scripts/soffice.sh
@@ -54,7 +54,36 @@ cd "`dirname "$sd_res"`"
sd_prog=`pwd`
cd "$sd_cwd"
-sd_binary=`basename "$0"`.bin
+# linked build needs additional settings
+if [ -e $sd_prog/ooenv ] ; then
+ . $sd_prog/ooenv
+fi
+
+if [ "$VALGRIND" != "" ]; then
+ VALGRINDCHECK="valgrind --tool=$VALGRIND --error-exitcode=101"
+ export VALGRINDCHECK
+ G_SLICE=always-malloc
+ export G_SLICE
+fi
+
+sd_binary=`basename "$0" | sed 's/libreoffice/soffice/g'`.bin
+
+case "`uname -s`" in
+NetBSD|OpenBSD) # this is a temporary hack until we can live with the default search paths
+ sd_prog1="$sd_prog/../basis-link/program"
+ sd_prog2="$sd_prog/../basis-link/ure-link/lib"
+ LD_LIBRARY_PATH=$sd_prog1:$sd_prog2${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+ JAVA_HOME=$(javaPathHelper -h libreoffice-java 2> /dev/null)
+ export LD_LIBRARY_PATH
+ if [ -n "${JAVA_HOME}" ]; then
+ export JAVA_HOME
+ fi
+ ;;
+AIX)
+ LIBPATH=$sd_prog:$sd_prog/../basis-link/program:$sd_prog/../basis-link/ure-link/lib${LIBPATH:+:$LIBPATH}
+ export LIBPATH
+ ;;
+esac
#collect all bootstrap variables specified on the command line
#so that they can be passed as arguments to javaldx later on
@@ -65,23 +94,44 @@ do
esac
done
+# test for availability of the fast external splash
+for arg in $@; do
+ case "$arg" in
+ --nologo|-nologo|--no-oosplash|-no-oosplash|--version|-version|--help|-help|-h|-\?)
+ no_oosplash=y
+ ;;
+ esac
+done
+
+# Setup our app as oosplash, but try to avoid executing pagein,
+# and other expensive environment setup pieces wherever possible
+# for a second started office
+if [ "$sd_binary" = "soffice.bin" -a -x "$sd_prog/oosplash.bin" ] && [ "$no_oosplash" != "y" ] ; then
+ sd_binary="oosplash.bin"
+
+ # try to connect to a running instance early
+ if $VALGRINDCHECK "$sd_prog/$sd_binary" -qsend-and-report "$@" ; then
+ exit 0
+ fi
+fi
+
# pagein
sd_pagein_args=@pagein-common
for sd_arg in "$@"; do
case ${sd_arg} in
- -calc)
+ --calc|-calc)
sd_pagein_args="${sd_pagein_args} @pagein-calc"
break;
;;
- -draw)
+ --draw|-draw)
sd_pagein_args="${sd_pagein_args} @pagein-draw"
break;
;;
- -impress)
+ --impress|-impress)
sd_pagein_args="${sd_pagein_args} @pagein-impress"
break;
;;
- -writer)
+ --writer|-writer)
sd_pagein_args="${sd_pagein_args} @pagein-writer"
break;
;;
@@ -114,7 +164,7 @@ if [ -f /etc/adabasrc ]; then
fi
# execute soffice binary
-"$sd_prog/$sd_binary" "$@" &
+$VALGRINDCHECK "$sd_prog/$sd_binary" "$@" &
trap 'kill -9 $!' TERM
wait $!
sd_ret=$?
diff --git a/desktop/scripts/sweb.sh b/desktop/scripts/sweb.sh
index 6d814e26e8..a365392584 100644
--- a/desktop/scripts/sweb.sh
+++ b/desktop/scripts/sweb.sh
@@ -1,4 +1,4 @@
#!/bin/sh
cmd=`dirname "$0"`/soffice
-exec "$cmd" -web "$@"
+exec "$cmd" --web "$@"
diff --git a/desktop/scripts/swriter.sh b/desktop/scripts/swriter.sh
index 34ca9fee30..3fa48c0d3e 100644
--- a/desktop/scripts/swriter.sh
+++ b/desktop/scripts/swriter.sh
@@ -1,4 +1,4 @@
#!/bin/sh
cmd=`dirname "$0"`/soffice
-exec "$cmd" -writer "$@"
+exec "$cmd" --writer "$@"
diff --git a/desktop/scripts/unopkg.sh b/desktop/scripts/unopkg.sh
index 2343611c60..0fc32f618b 100644
--- a/desktop/scripts/unopkg.sh
+++ b/desktop/scripts/unopkg.sh
@@ -42,6 +42,20 @@ cd "`dirname "$sd_res"`"
sd_prog=`pwd`
cd "$sd_cwd"
+# this is a temporary hack until we can live with the default search paths
+case "`uname -s`" in
+NetBSD|OpenBSD)
+ sd_prog1="$sd_prog/../basis-link/program"
+ sd_prog2="$sd_prog/../basis-link/ure-link/lib"
+ LD_LIBRARY_PATH=$sd_prog1:$sd_prog2${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
+ JAVA_HOME=$(javaPathHelper -h libreoffice-java 2> /dev/null)
+ export LD_LIBRARY_PATH
+ if [ -n "${JAVA_HOME}" ]; then
+ export JAVA_HOME
+ fi
+ ;;
+esac
+
#collect all bootstrap variables specified on the command line
#so that they can be passed as arguments to javaldx later on
#Recognize the "sync" option. sync must be applied without any other
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 69be935443..7b15ce27d2 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -47,7 +48,7 @@
#include "userinstall.hxx"
#include "desktopcontext.hxx"
#include "exithelper.hxx"
-#include "../migration/pages.hxx"
+#include "migration.hxx"
#include <svtools/javacontext.hxx>
#include <com/sun/star/frame/XSessionManagerListener.hpp>
@@ -90,7 +91,6 @@
#include <com/sun/star/task/XRestartManager.hpp>
#ifndef _COM_SUN_STAR_TASK_XJOBEXECUTOR_HPP_
#include <com/sun/star/task/XJob.hpp>
-#endif
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
#include <com/sun/star/task/XJob.hpp>
@@ -101,17 +101,13 @@
#include <com/sun/star/java/XJavaVM.hpp>
#include <tools/testtoolloader.hxx>
#include <tools/solar.h>
-#ifndef _TOOLKIT_HELPER_VCLUNOHELPER_HXX_
#include <toolkit/unohlp.hxx>
-#endif
-#include <vos/security.hxx>
-#include <vos/ref.hxx>
+#include <osl/security.hxx>
+#include <rtl/ref.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/componentcontext.hxx>
#include <comphelper/configurationhelper.hxx>
-#ifndef _UTL__HXX_
#include <unotools/configmgr.hxx>
-#endif
#include <unotools/configitem.hxx>
#include <unotools/confignode.hxx>
#include <unotools/ucbhelper.hxx>
@@ -120,6 +116,7 @@
#include <unotools/moduleoptions.hxx>
#include <osl/module.h>
#include <osl/file.hxx>
+#include <osl/process.h>
#include <osl/signal.h>
#include <osl/thread.hxx>
#include <rtl/uuid.h>
@@ -145,6 +142,9 @@
#include <vcl/stdtext.hxx>
#include <vcl/msgbox.hxx>
#include <sfx2/sfx.hrc>
+#include <sfx2/app.hxx>
+#include <svl/itemset.hxx>
+#include <svl/eitem.hxx>
#include <ucbhelper/contentbroker.hxx>
#include <unotools/bootstrap.hxx>
#include <cppuhelper/bootstrap.hxx>
@@ -168,17 +168,13 @@
#define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
#define U2S(STRING) ::rtl::OUStringToOString(STRING, RTL_TEXTENCODING_UTF8)
-using namespace vos;
-using namespace rtl;
-
-//Gives an ICE with MSVC6
-//namespace css = ::com::sun::star;
+using rtl::OUString;
+using rtl::OUStringBuffer;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::util;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
-//using namespace ::com::sun::star::bridge;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::document;
using namespace ::com::sun::star::view;
@@ -194,7 +190,7 @@ ResMgr* desktop::Desktop::pResMgr = 0;
namespace desktop
{
-static SalMainPipeExchangeSignalHandler* pSignalHandler = 0;
+static oslSignalHandler pSignalHandler = 0;
static sal_Bool _bCrashReporterEnabled = sal_True;
static const ::rtl::OUString CFG_PACKAGE_COMMON_HELP ( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Office.Common/Help"));
@@ -221,15 +217,6 @@ ResMgr* Desktop::GetDesktopResManager()
// Use VCL to get the correct language specific message as we
// are in the bootstrap process and not able to get the installed
// language!!
-/*
- LanguageType aLanguageType = LANGUAGE_DONTKNOW;
-
- Desktop::pResMgr = ResMgr::SearchCreateResMgr( U2S( aMgrName ), aLanguageType );
- AllSettings as = GetSettings();
- as.SetUILanguage(aLanguageType);
- SetSettings(as);
-*/
- // LanguageSelection langselect;
OUString aUILocaleString = LanguageSelection::getLanguageString();
sal_Int32 nIndex = 0;
OUString aLanguage = aUILocaleString.getToken( 0, '-', nIndex);
@@ -294,7 +281,7 @@ OUString MakeStartupConfigAccessErrorMessage( OUString const & aInternalErrMsg )
if ( pResMgr )
aDiagnosticMessage.append( OUString(String(ResId(STR_INTERNAL_ERRMSG, *pResMgr ))) );
else
- aDiagnosticMessage.appendAscii( "The following internal error has occured:\n\n" );
+ aDiagnosticMessage.appendAscii( "The following internal error has occurred:\n\n" );
aDiagnosticMessage.append( aInternalErrMsg );
}
@@ -319,8 +306,7 @@ void FatalError(const ::rtl::OUString& sMessage)
::rtl::OUString sProductKey = ::utl::Bootstrap::getProductKey();
if ( ! sProductKey.getLength())
{
- ::vos::OStartupInfo aInfo;
- aInfo.getExecutableFile( sProductKey );
+ osl_getExecutableFile( &sProductKey.pData );
::sal_uInt32 nLastIndex = sProductKey.lastIndexOf('/');
if ( nLastIndex > 0 )
@@ -740,10 +726,25 @@ void Desktop::Init()
Reference < XMultiServiceFactory > rSMgr = CreateApplicationServiceManager();
if( rSMgr.is() )
{
- ::comphelper::setProcessServiceFactory( rSMgr );
+ ::rtl::OUString aUserLastSyncFilePathURL = getLastSyncFileURLFromUserInstallation();
+ ::rtl::OUString aPreregSyncFilePathURL = getLastSyncFileURLFromBrandInstallation();
+
+ if ( needsSynchronization( aPreregSyncFilePathURL, aUserLastSyncFilePathURL ))
+ {
+ rtl::OUString aUserPath = getUserBundledExtPathURL();
+ rtl::OUString aPreregBundledPath = getBrandSharePreregBundledPathURL();
+
+ // copy bundled folder to the user directory
+ osl::FileBase::RC rc = osl::Directory::createPath(aUserPath);
+ (void) rc;
+ copy_bundled_recursive( aPreregBundledPath, aUserPath, +1 );
+ }
}
- else
+
+ // We need to have service factory before going further.
+ if( !::comphelper::getProcessServiceFactory().is())
{
+ OSL_ENSURE(0, "Service factory should have been crated in soffice_main().");
SetBootstrapError( BE_UNO_SERVICEMANAGER );
}
@@ -762,13 +763,6 @@ void Desktop::Init()
if ( GetBootstrapError() == BE_OK )
{
CommandLineArgs* pCmdLineArgs = GetCommandLineArgs();
-#ifdef UNX
- // check whether we need to print cmdline help
- if ( pCmdLineArgs->IsHelp() ) {
- displayCmdlineHelp();
- SetBootstrapStatus(BS_TERMINATE);
- }
-#endif
// start ipc thread only for non-remote offices
RTL_LOGFILE_CONTEXT( aLog2, "desktop (cd100003) ::OfficeIPCThread::EnableOfficeIPCThread" );
OfficeIPCThread::Status aStatus = OfficeIPCThread::EnableOfficeIPCThread();
@@ -786,7 +780,25 @@ void Desktop::Init()
// disable IPC thread in an instance that is just showing a help message
OfficeIPCThread::DisableOfficeIPCThread();
}
- pSignalHandler = new SalMainPipeExchangeSignalHandler;
+ pSignalHandler = osl_addSignalHandler(SalMainPipeExchangeSignal_impl, NULL);
+ }
+}
+
+void Desktop::InitFinished()
+{
+ RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::InitFinished" );
+
+ CloseSplashScreen();
+}
+
+// GetCommandLineArgs() requires this code to work, otherwise it will abort, and
+// on Unix command line args needs to be checked before Desktop::Init()
+void Desktop::CreateProcessServiceFactory()
+{
+ Reference < XMultiServiceFactory > rSMgr = CreateApplicationServiceManager();
+ if( rSMgr.is() )
+ {
+ ::comphelper::setProcessServiceFactory( rSMgr );
}
}
@@ -814,7 +826,7 @@ void Desktop::DeInit()
OfficeIPCThread::DisableOfficeIPCThread();
if( pSignalHandler )
- DELETEZ( pSignalHandler );
+ osl_removeSignalHandler( pSignalHandler );
} catch (RuntimeException&) {
// someone threw an exception during shutdown
// this will leave some garbage behind..
@@ -828,7 +840,7 @@ BOOL Desktop::QueryExit()
try
{
RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" );
- utl::ConfigManager::GetConfigManager()->StoreConfigItems();
+ utl::ConfigManager::GetConfigManager().StoreConfigItems();
RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" );
}
catch ( RuntimeException& )
@@ -881,14 +893,10 @@ void Desktop::HandleBootstrapPathErrors( ::utl::Bootstrap::Status aBootstrapStat
{
if ( aBootstrapStatus != ::utl::Bootstrap::DATA_OK )
{
- sal_Bool bWorkstationInstallation = sal_False;
- ::rtl::OUString aBaseInstallURL;
- ::rtl::OUString aUserInstallURL;
::rtl::OUString aProductKey;
::rtl::OUString aTemp;
- ::vos::OStartupInfo aInfo;
- aInfo.getExecutableFile( aProductKey );
+ osl_getExecutableFile( &aProductKey.pData );
sal_uInt32 lastIndex = aProductKey.lastIndexOf('/');
if ( lastIndex > 0 )
aProductKey = aProductKey.copy( lastIndex+1 );
@@ -897,16 +905,6 @@ void Desktop::HandleBootstrapPathErrors( ::utl::Bootstrap::Status aBootstrapStat
if ( aTemp.getLength() > 0 )
aProductKey = aTemp;
- ::utl::Bootstrap::PathStatus aBaseInstallStatus = ::utl::Bootstrap::locateBaseInstallation( aBaseInstallURL );
- ::utl::Bootstrap::PathStatus aUserInstallStatus = ::utl::Bootstrap::locateUserInstallation( aUserInstallURL );
-
- if (( aBaseInstallStatus == ::utl::Bootstrap::PATH_EXISTS &&
- aUserInstallStatus == ::utl::Bootstrap::PATH_EXISTS ))
- {
- if ( aBaseInstallURL != aUserInstallURL )
- bWorkstationInstallation = sal_True;
- }
-
OUString aMessage;
OUStringBuffer aBuffer( 100 );
aBuffer.append( aDiagnosticMessage );
@@ -1213,9 +1211,9 @@ void Desktop::HandleBootstrapErrors( BootstrapError aBootstrapError )
void Desktop::retrieveCrashReporterState()
{
- static const ::rtl::OUString CFG_PACKAGE_RECOVERY = ::rtl::OUString::createFromAscii("org.openoffice.Office.Recovery/");
- static const ::rtl::OUString CFG_PATH_CRASHREPORTER = ::rtl::OUString::createFromAscii("CrashReporter" );
- static const ::rtl::OUString CFG_ENTRY_ENABLED = ::rtl::OUString::createFromAscii("Enabled" );
+ static const ::rtl::OUString CFG_PACKAGE_RECOVERY(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Recovery/"));
+ static const ::rtl::OUString CFG_PATH_CRASHREPORTER(RTL_CONSTASCII_USTRINGPARAM("CrashReporter"));
+ static const ::rtl::OUString CFG_ENTRY_ENABLED(RTL_CONSTASCII_USTRINGPARAM("Enabled"));
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
@@ -1286,12 +1284,10 @@ void impl_checkRecoveryState(sal_Bool& bCrashed ,
sal_Bool& bRecoveryDataExists,
sal_Bool& bSessionDataExists )
{
- static const ::rtl::OUString SERVICENAME_RECOVERYCORE = ::rtl::OUString::createFromAscii("com.sun.star.frame.AutoRecovery");
- static const ::rtl::OUString PROP_CRASHED = ::rtl::OUString::createFromAscii("Crashed" );
- static const ::rtl::OUString PROP_EXISTSRECOVERY = ::rtl::OUString::createFromAscii("ExistsRecoveryData" );
- static const ::rtl::OUString PROP_EXISTSSESSION = ::rtl::OUString::createFromAscii("ExistsSessionData" );
- static const ::rtl::OUString CFG_PACKAGE_RECOVERY = ::rtl::OUString::createFromAscii("org.openoffice.Office.Recovery/");
- static const ::rtl::OUString CFG_PATH_RECOVERYINFO = ::rtl::OUString::createFromAscii("RecoveryInfo" );
+ static const ::rtl::OUString SERVICENAME_RECOVERYCORE(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.AutoRecovery"));
+ static const ::rtl::OUString PROP_CRASHED(RTL_CONSTASCII_USTRINGPARAM("Crashed"));
+ static const ::rtl::OUString PROP_EXISTSRECOVERY(RTL_CONSTASCII_USTRINGPARAM("ExistsRecoveryData"));
+ static const ::rtl::OUString PROP_EXISTSSESSION(RTL_CONSTASCII_USTRINGPARAM("ExistsSessionData"));
bCrashed = sal_False;
bRecoveryDataExists = sal_False;
@@ -1321,11 +1317,11 @@ sal_Bool impl_callRecoveryUI(sal_Bool bEmergencySave ,
sal_Bool bCrashed ,
sal_Bool bExistsRecoveryData)
{
- static ::rtl::OUString SERVICENAME_RECOVERYUI = ::rtl::OUString::createFromAscii("com.sun.star.comp.svx.RecoveryUI" );
- static ::rtl::OUString SERVICENAME_URLPARSER = ::rtl::OUString::createFromAscii("com.sun.star.util.URLTransformer" );
- static ::rtl::OUString COMMAND_EMERGENCYSAVE = ::rtl::OUString::createFromAscii("vnd.sun.star.autorecovery:/doEmergencySave");
- static ::rtl::OUString COMMAND_RECOVERY = ::rtl::OUString::createFromAscii("vnd.sun.star.autorecovery:/doAutoRecovery" );
- static ::rtl::OUString COMMAND_CRASHREPORT = ::rtl::OUString::createFromAscii("vnd.sun.star.autorecovery:/doCrashReport" );
+ static ::rtl::OUString SERVICENAME_RECOVERYUI(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.svx.RecoveryUI"));
+ static ::rtl::OUString SERVICENAME_URLPARSER(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.URLTransformer"));
+ static ::rtl::OUString COMMAND_EMERGENCYSAVE(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.autorecovery:/doEmergencySave"));
+ static ::rtl::OUString COMMAND_RECOVERY(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.autorecovery:/doAutoRecovery"));
+ static ::rtl::OUString COMMAND_CRASHREPORT(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.autorecovery:/doCrashReport"));
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
@@ -1561,12 +1557,12 @@ void Desktop::Main()
if ( eError != BE_OK )
{
HandleBootstrapErrors( eError );
- return;
+ return EXIT_FAILURE;
}
BootstrapStatus eStatus = GetBootstrapStatus();
if (eStatus == BS_TERMINATE) {
- return;
+ return EXIT_FAILURE;
}
// Detect desktop environment - need to do this as early as possible
@@ -1587,6 +1583,7 @@ void Desktop::Main()
OpenSplashScreen();
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main } OpenSplashScreen" );
+ SetSplashScreenProgress(10);
{
UserInstall::UserInstallError instErr_fin = UserInstall::finalize();
if ( instErr_fin != UserInstall::E_None)
@@ -1598,11 +1595,11 @@ void Desktop::Main()
HandleBootstrapErrors( BE_USERINSTALL_NOWRITEACCESS );
else
HandleBootstrapErrors( BE_USERINSTALL_FAILED );
- return;
+ return EXIT_FAILURE;
}
// refresh path information
utl::Bootstrap::reloadData();
- SetSplashScreenProgress(25);
+ SetSplashScreenProgress(20);
}
Reference< XMultiServiceFactory > xSMgr =
@@ -1614,12 +1611,12 @@ void Desktop::Main()
{
RegisterServices( xSMgr );
- //SetSplashScreenProgress(15);
+ SetSplashScreenProgress(25);
#ifndef UNX
if ( pCmdLineArgs->IsHelp() ) {
displayCmdlineHelp();
- return;
+ return EXIT_SUCCESS;
}
#endif
@@ -1629,7 +1626,7 @@ void Desktop::Main()
m_pLockfile = new Lockfile;
if ( !pCmdLineArgs->IsInvisible() && !pCmdLineArgs->IsNoLockcheck() && !m_pLockfile->check( Lockfile_execWarning )) {
// Lockfile exists, and user clicked 'no'
- return;
+ return EXIT_FAILURE;
}
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main <- Lockfile" );
@@ -1641,18 +1638,20 @@ void Desktop::Main()
if( !InitAccessBridge( true, bQuitApp ) )
if( bQuitApp )
- return;
+ return EXIT_FAILURE;
}
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} GetEnableATToolSupport" );
// terminate if requested...
- if( pCmdLineArgs->IsTerminateAfterInit() ) return;
+ if( pCmdLineArgs->IsTerminateAfterInit() )
+ return EXIT_SUCCESS;
// Read the common configuration items for optimization purpose
- if ( !InitializeConfiguration() ) return;
+ if ( !InitializeConfiguration() )
+ return EXIT_FAILURE;
- //SetSplashScreenProgress(20);
+ SetSplashScreenProgress(30);
// set static variable to enabled/disable crash reporter
retrieveCrashReporterState();
@@ -1680,7 +1679,7 @@ void Desktop::Main()
OUString aTitleString( aTitle );
bCheckOk = CheckInstallation( aTitleString );
if ( !bCheckOk )
- return;
+ return EXIT_FAILURE;
else
aTitle = aTitleString;
@@ -1778,7 +1777,6 @@ void Desktop::Main()
}
SetSplashScreenProgress(50);
-
// Backing Component
sal_Bool bCrashed = sal_False;
sal_Bool bExistsRecoveryData = sal_False;
@@ -1862,12 +1860,12 @@ void Desktop::Main()
com::sun::star::uno::Exception te;
wte.TargetException >>= te;
FatalError( MakeStartupConfigAccessErrorMessage(wte.Message + te.Message) );
- return;
+ return EXIT_FAILURE;
}
catch ( com::sun::star::uno::Exception& e )
{
FatalError( MakeStartupErrorMessage(e.Message) );
- return;
+ return EXIT_FAILURE;
}
SvtFontSubstConfig().Apply();
@@ -2111,9 +2109,7 @@ sal_Bool Desktop::InitializeQuickstartMode( Reference< XMultiServiceFactory >& r
// this will only be activated if -quickstart was specified on cmdline
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) createInstance com.sun.star.office.Quickstart" );
- sal_Bool bQuickstart = GetCommandLineArgs()->IsQuickstart();
- Sequence< Any > aSeq( 1 );
- aSeq[0] <<= bQuickstart;
+ sal_Bool bQuickstart = shouldLaunchQuickstart();
// Try to instanciate quickstart service. This service is not mandatory, so
// do nothing if service is not available
@@ -2126,6 +2122,8 @@ sal_Bool Desktop::InitializeQuickstartMode( Reference< XMultiServiceFactory >& r
if ( bQuickstart )
//#endif
{
+ Sequence< Any > aSeq( 1 );
+ aSeq[0] <<= bQuickstart;
Reference < XComponent > xQuickstart( rSMgr->createInstanceWithArguments(
DEFINE_CONST_UNICODE( "com.sun.star.office.Quickstart" ), aSeq ),
UNO_QUERY );
@@ -2174,23 +2172,8 @@ void Desktop::SystemSettingsChanging( AllSettings& rSettings, Window* )
hMouseSettings.SetFollow( aAppearanceCfg.IsMenuMouseFollow() ? (nFollow|MOUSE_FOLLOW_MENU) : (nFollow&~MOUSE_FOLLOW_MENU));
rSettings.SetMouseSettings(hMouseSettings);
- BOOL bUseImagesInMenus = hStyleSettings.GetUseImagesInMenus();
-
SvtMenuOptions aMenuOpt;
- nGet = aMenuOpt.GetMenuIconsState();
- switch ( nGet )
- {
- case 0:
- bUseImagesInMenus = FALSE;
- break;
- case 1:
- bUseImagesInMenus = TRUE;
- break;
- case 2:
- default:
- break;
- }
- hStyleSettings.SetUseImagesInMenus(bUseImagesInMenus);
+ hStyleSettings.SetUseImagesInMenus(aMenuOpt.GetMenuIconsState());
hStyleSettings.SetDragFullOptions( nDragFullOptions );
rSettings.SetStyleSettings ( hStyleSettings );
@@ -2227,7 +2210,6 @@ IMPL_LINK( Desktop, OpenClients_Impl, void*, EMPTYARG )
OfficeIPCThread::SetReady();
- // CloseStartupScreen();
CloseSplashScreen();
CheckFirstRun( );
EnableOleAutomation();
@@ -2260,7 +2242,7 @@ sal_Bool Desktop::CheckOEM()
{
Reference<XMultiServiceFactory> rFactory = ::comphelper::getProcessServiceFactory();
Reference<XJob> rOemJob(rFactory->createInstance(
- OUString::createFromAscii("com.sun.star.office.OEMPreloadJob")),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.office.OEMPreloadJob"))),
UNO_QUERY );
Sequence<NamedValue> args;
sal_Bool bResult = sal_False;
@@ -2517,7 +2499,7 @@ void Desktop::PreloadConfigurationData()
{
// preload writer configuration
Sequence< Any > theArgs(1);
- theArgs[ 0 ] <<= OUString::createFromAscii( "org.openoffice.Office.Writer/MailMergeWizard" );
+ theArgs[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Writer/MailMergeWizard"));
try
{
xNameAccess = Reference< XNameAccess >(
@@ -2528,7 +2510,7 @@ void Desktop::PreloadConfigurationData()
}
// WriterWeb
- theArgs[ 0 ] <<= OUString::createFromAscii( "org.openoffice.Office.WriterWeb/Content" );
+ theArgs[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.WriterWeb/Content"));
try
{
xNameAccess = Reference< XNameAccess >(
@@ -2539,7 +2521,7 @@ void Desktop::PreloadConfigurationData()
}
// preload compatibility
- theArgs[ 0 ] <<= OUString::createFromAscii( "org.openoffice.Office.Compatibility/WriterCompatibilityVersion" );
+ theArgs[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Compatibility/WriterCompatibilityVersion"));
try
{
xNameAccess = Reference< XNameAccess >(
@@ -2550,7 +2532,7 @@ void Desktop::PreloadConfigurationData()
}
// preload calc configuration
- theArgs[ 0 ] <<= OUString::createFromAscii( "org.openoffice.Office.Calc/Content" );
+ theArgs[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Calc/Content"));
try
{
xNameAccess = Reference< XNameAccess >(
@@ -2561,7 +2543,7 @@ void Desktop::PreloadConfigurationData()
}
// preload impress configuration
- theArgs[ 0 ] <<= OUString::createFromAscii( "org.openoffice.Office.UI.Effects/UserInterface" );
+ theArgs[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.UI.Effects/UserInterface"));
try
{
xNameAccess = Reference< XNameAccess >(
@@ -2571,7 +2553,7 @@ void Desktop::PreloadConfigurationData()
{
}
- theArgs[ 0 ] <<= OUString::createFromAscii( "org.openoffice.Office.Impress/Layout" );
+ theArgs[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Impress/Layout"));
try
{
xNameAccess = Reference< XNameAccess >(
@@ -2582,7 +2564,7 @@ void Desktop::PreloadConfigurationData()
}
// preload draw configuration
- theArgs[ 0 ] <<= OUString::createFromAscii( "org.openoffice.Office.Draw/Layout" );
+ theArgs[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Draw/Layout"));
try
{
xNameAccess = Reference< XNameAccess >(
@@ -2593,7 +2575,7 @@ void Desktop::PreloadConfigurationData()
}
// preload ui configuration
- theArgs[ 0 ] <<= OUString::createFromAscii( "org.openoffice.Office.UI/FilterClassification" );
+ theArgs[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.UI/FilterClassification"));
try
{
xNameAccess = Reference< XNameAccess >(
@@ -2604,7 +2586,7 @@ void Desktop::PreloadConfigurationData()
}
// preload addons configuration
- theArgs[ 0 ] <<= OUString::createFromAscii( "org.openoffice.Office.Addons/AddonUI" );
+ theArgs[ 0 ] <<= OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Addons/AddonUI"));
try
{
xNameAccess = Reference< XNameAccess >(
@@ -2676,9 +2658,8 @@ void Desktop::OpenClients()
else
{
OUString aIniName;
- ::vos::OStartupInfo aInfo;
- aInfo.getExecutableFile( aIniName );
+ osl_getExecutableFile( &aIniName.pData );
sal_uInt32 lastIndex = aIniName.lastIndexOf('/');
if ( lastIndex > 0 )
{
@@ -2697,7 +2678,7 @@ void Desktop::OpenClients()
OUString aPreloadData;
aPerfTuneIniFile.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "QuickstartPreloadConfiguration" )), aPreloadData, aDefault );
- if ( aPreloadData.equalsAscii( "1" ))
+ if ( aPreloadData.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "1" ) ))
{
if ( pArgs->IsWriter() ||
pArgs->IsCalc() ||
@@ -2737,14 +2718,14 @@ void Desktop::OpenClients()
::com::sun::star::uno::UNO_QUERY_THROW );
css::util::URL aCmd;
- aCmd.Complete = ::rtl::OUString::createFromAscii("vnd.sun.star.autorecovery:/disableRecovery");
+ aCmd.Complete = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.autorecovery:/disableRecovery"));
xParser->parseStrict(aCmd);
xRecovery->dispatch(aCmd, css::uno::Sequence< css::beans::PropertyValue >());
}
catch(const css::uno::Exception& e)
{
- OUString aMessage = OUString::createFromAscii("Could not disable AutoRecovery.\n")
+ OUString aMessage = OUString(RTL_CONSTASCII_USTRINGPARAM("Could not disable AutoRecovery.\n"))
+ e.Message;
OSL_ENSURE(sal_False, OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
}
@@ -2786,7 +2767,7 @@ void Desktop::OpenClients()
}
catch(const css::uno::Exception& e)
{
- OUString aMessage = OUString::createFromAscii("Error during recovery\n")
+ OUString aMessage = OUString(RTL_CONSTASCII_USTRINGPARAM("Error during recovery\n"))
+ e.Message;
OSL_ENSURE(sal_False, OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
}
@@ -2809,7 +2790,7 @@ void Desktop::OpenClients()
}
catch(const com::sun::star::uno::Exception& e)
{
- OUString aMessage = OUString::createFromAscii("Registration of session listener failed\n")
+ OUString aMessage = OUString(RTL_CONSTASCII_USTRINGPARAM("Registration of session listener failed\n"))
+ e.Message;
OSL_ENSURE(sal_False, OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
}
@@ -2827,7 +2808,7 @@ void Desktop::OpenClients()
}
catch(const com::sun::star::uno::Exception& e)
{
- OUString aMessage = OUString::createFromAscii("Error in session management\n")
+ OUString aMessage = OUString(RTL_CONSTASCII_USTRINGPARAM("Error in session management\n"))
+ e.Message;
OSL_ENSURE(sal_False, OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
}
@@ -2850,6 +2831,10 @@ void Desktop::OpenClients()
pArgs->GetPrinterName( aRequest.aPrinterName );
pArgs->GetForceOpenList( aRequest.aForceOpenList );
pArgs->GetForceNewList( aRequest.aForceNewList );
+ pArgs->GetConversionList( aRequest.aConversionList );
+ pArgs->GetConversionParams( aRequest.aConversionParams );
+ pArgs->GetConversionOut( aRequest.aConversionOut );
+ pArgs->GetInFilter( aRequest.aInFilter );
if ( aRequest.aOpenList.getLength() > 0 ||
aRequest.aViewList.getLength() > 0 ||
@@ -2857,7 +2842,8 @@ void Desktop::OpenClients()
aRequest.aPrintList.getLength() > 0 ||
aRequest.aForceOpenList.getLength() > 0 ||
aRequest.aForceNewList.getLength() > 0 ||
- ( aRequest.aPrintToList.getLength() > 0 && aRequest.aPrinterName.getLength() > 0 ))
+ ( aRequest.aPrintToList.getLength() > 0 && aRequest.aPrinterName.getLength() > 0 ) ||
+ aRequest.aConversionList.getLength() > 0 )
{
bLoaded = sal_True;
@@ -2993,7 +2979,7 @@ String GetURL_Impl(
}
// Add path seperator to these directory and make given URL (rName) absolute by using of current working directory
- // Attention: "setFianlSlash()" is neccessary for calling "smartRel2Abs()"!!!
+ // Attention: "setFinalSlash()" is necessary for calling "smartRel2Abs()"!!!
// Otherwhise last part will be ignored and wrong result will be returned!!!
// "smartRel2Abs()" interpret given URL as file not as path. So he truncate last element to get the base path ...
// But if we add a seperator - he doesn't do it anymore.
@@ -3214,7 +3200,8 @@ void Desktop::OpenSplashScreen()
!pCmdLine->IsNoLogo() &&
!pCmdLine->IsTerminateAfterInit() &&
!pCmdLine->GetPrintList( aTmpString ) &&
- !pCmdLine->GetPrintToList( aTmpString ) )
+ !pCmdLine->GetPrintToList( aTmpString ) &&
+ !pCmdLine->GetConversionList( aTmpString ))
{
// Determine application name from command line parameters
OUString aAppName;
@@ -3235,17 +3222,21 @@ void Desktop::OpenSplashScreen()
else if ( pCmdLine->IsWeb() )
aAppName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "web" ));
+ // Which splash to use
+ OUString aSplashService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.office.SplashScreen" ));
+ if ( pCmdLine->GetStringParam( CommandLineArgs::CMD_STRINGPARAM_SPLASHPIPE ).getLength() )
+ aSplashService = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.office.PipeSplashScreen"));
+
bVisible = sal_True;
Sequence< Any > aSeq( 2 );
aSeq[0] <<= bVisible;
aSeq[1] <<= aAppName;
m_rSplashScreen = Reference<XStatusIndicator>(
comphelper::getProcessServiceFactory()->createInstanceWithArguments(
- OUString::createFromAscii("com.sun.star.office.SplashScreen"),
- aSeq), UNO_QUERY);
+ aSplashService, aSeq), UNO_QUERY);
if(m_rSplashScreen.is())
- m_rSplashScreen->start(OUString::createFromAscii("SplashScreen"), 100);
+ m_rSplashScreen->start(OUString(RTL_CONSTASCII_USTRINGPARAM("SplashScreen")), 100);
}
}
@@ -3280,9 +3271,9 @@ void Desktop::DoFirstRunInitializations()
{
try
{
- Reference< XJobExecutor > xExecutor( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.task.JobExecutor" ) ), UNO_QUERY );
+ Reference< XJobExecutor > xExecutor( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.JobExecutor")) ), UNO_QUERY );
if( xExecutor.is() )
- xExecutor->trigger( ::rtl::OUString::createFromAscii("onFirstRunInitialization") );
+ xExecutor->trigger( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("onFirstRunInitialization")) );
}
catch(const ::com::sun::star::uno::Exception&)
{
@@ -3293,8 +3284,8 @@ void Desktop::DoFirstRunInitializations()
// ========================================================================
void Desktop::CheckFirstRun( )
{
- const ::rtl::OUString sCommonMiscNodeName = ::rtl::OUString::createFromAscii( "/org.openoffice.Office.Common/Misc" );
- const ::rtl::OUString sFirstRunNodeName = ::rtl::OUString::createFromAscii( "FirstRun" );
+ const ::rtl::OUString sCommonMiscNodeName(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.Common/Misc"));
+ const ::rtl::OUString sFirstRunNodeName(RTL_CONSTASCII_USTRINGPARAM("FirstRun"));
// --------------------------------------------------------------------
// check if this is the first office start
@@ -3336,3 +3327,5 @@ void Desktop::CheckFirstRun( )
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/appfirststart.cxx b/desktop/source/app/appfirststart.cxx
index 943f45de2b..8b7c7f16c1 100644
--- a/desktop/source/app/appfirststart.cxx
+++ b/desktop/source/app/appfirststart.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,67 +49,55 @@ using namespace ::com::sun::star::beans;
static const OUString sConfigSrvc( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" ) );
static const OUString sAccessSrvc( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationUpdateAccess" ) );
-/* Path of the license. */
-OUString Desktop::GetLicensePath()
+/* Local function - get access to the configuration */
+static Reference< XPropertySet > impl_getConfigurationAccess( const OUString& rPath )
{
- // license file name
- static const char *szLicensePath = "/share/readme";
-#if defined(WNT) || defined(OS2)
- static const char *szWNTLicenseName = "/license";
- static const char *szWNTLicenseExt = ".txt";
-#else
- static const char *szUNXLicenseName = "/LICENSE";
- static const char *szUNXLicenseExt = "";
-#endif
- static OUString aLicensePath;
-
- if (aLicensePath.getLength() > 0)
- return aLicensePath;
-
- OUString aBaseInstallPath(RTL_CONSTASCII_USTRINGPARAM("$BRAND_BASE_DIR"));
- rtl::Bootstrap::expandMacros(aBaseInstallPath);
-
- // determine the filename of the license to show
- OUString aLangString;
- ::com::sun::star::lang::Locale aLocale;
- OString aMgrName = OString("dkt");
-
- AllSettings aSettings(Application::GetSettings());
- aLocale = aSettings.GetUILocale();
- ResMgr* pLocalResMgr = ResMgr::SearchCreateResMgr(aMgrName, aLocale);
-
- aLangString = aLocale.Language;
- if ( aLocale.Country.getLength() != 0 )
+ Reference < XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
+
+ // get configuration provider
+ Reference< XMultiServiceFactory > xConfigProvider = Reference< XMultiServiceFactory >(
+ xFactory->createInstance( sConfigSrvc ), UNO_QUERY_THROW );
+
+ Sequence< Any > aArgs( 1 );
+ NamedValue aValue( OUString( RTL_CONSTASCII_USTRINGPARAM( "NodePath" ) ), makeAny( rPath ) );
+ aArgs[0] <<= aValue;
+ return Reference< XPropertySet >(
+ xConfigProvider->createInstanceWithArguments( sAccessSrvc, aArgs ), UNO_QUERY_THROW );
+}
+
+void Desktop::DoRestartActionsIfNecessary( sal_Bool bQuickStart )
+{
+ if ( bQuickStart )
{
- aLangString += OUString::createFromAscii("-");
- aLangString += aLocale.Country;
- if ( aLocale.Variant.getLength() != 0 )
+ try
+ {
+ Reference< XPropertySet > xPSet = impl_getConfigurationAccess( OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Setup/Office" ) ) );
+
+ OUString sPropName( RTL_CONSTASCII_USTRINGPARAM( "OfficeRestartInProgress" ) );
+ Any aRestart = xPSet->getPropertyValue( sPropName );
+ sal_Bool bRestart = sal_False;
+ if ( ( aRestart >>= bRestart ) && bRestart )
+ {
+ xPSet->setPropertyValue( sPropName, makeAny( sal_False ) );
+ Reference< util::XChangesBatch >( xPSet, UNO_QUERY_THROW )->commitChanges();
+
+ Sequence< Any > aSeq( 1 );
+ sal_Bool bQuickstart = shouldLaunchQuickstart();
+ aSeq[0] <<= bQuickstart;
+
+ Reference < XInitialization > xQuickstart( ::comphelper::getProcessServiceFactory()->createInstance(
+ OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.office.Quickstart" ) ) ),UNO_QUERY_THROW );
+ xQuickstart->initialize( aSeq );
+ }
+ }
+ catch( uno::Exception& )
{
- aLangString += OUString::createFromAscii("-");
- aLangString += aLocale.Variant;
+ // this is no critical operation so it should not prevent office from starting
}
}
-#if defined(WNT) || defined(OS2)
- aLicensePath =
- aBaseInstallPath + OUString::createFromAscii(szLicensePath)
- + OUString::createFromAscii(szWNTLicenseName)
- + OUString::createFromAscii("_")
- + aLangString
- + OUString::createFromAscii(szWNTLicenseExt);
-#else
- aLicensePath =
- aBaseInstallPath + OUString::createFromAscii(szLicensePath)
- + OUString::createFromAscii(szUNXLicenseName)
- + OUString::createFromAscii("_")
- + aLangString
- + OUString::createFromAscii(szUNXLicenseExt);
-#endif
- delete pLocalResMgr;
- return aLicensePath;
}
-/* Check if we need to accept license. */
-sal_Bool Desktop::LicenseNeedsAcceptance()
+void Desktop::SetRestartState()
{
// Don't show a license
return sal_False;
@@ -117,8 +106,10 @@ sal_Bool Desktop::LicenseNeedsAcceptance()
sal_Int32 nOpenSourceContext = 0;
try
{
- ::utl::ConfigManager::GetDirectConfigProperty(
- ::utl::ConfigManager::OPENSOURCECONTEXT ) >>= nOpenSourceContext;
+ Reference< XPropertySet > xPSet = impl_getConfigurationAccess( OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Setup/Office" ) ) );
+ OUString sPropName( RTL_CONSTASCII_USTRINGPARAM( "OfficeRestartInProgress" ) );
+ xPSet->setPropertyValue( sPropName, makeAny( sal_True ) );
+ Reference< util::XChangesBatch >( xPSet, UNO_QUERY_THROW )->commitChanges();
}
catch( const ::com::sun::star::uno::Exception& ) {}
@@ -160,29 +151,8 @@ static sal_Bool impl_isFirstStart()
return sal_True;
} catch (const Exception&)
{
- return sal_True;
+ // this is no critical operation, ignore the exception
}
-}
-
-/* Local function - convert oslDateTime to tools DateTime */
-static DateTime impl_oslDateTimeToDateTime(const oslDateTime& aDateTime)
-{
- return DateTime(
- Date(aDateTime.Day, aDateTime.Month, aDateTime.Year),
- Time(aDateTime.Hours, aDateTime.Minutes, aDateTime.Seconds));
-}
-
-/* Local function - get DateTime from a string */
-static sal_Bool impl_parseDateTime(const OUString& aString, DateTime& aDateTime)
-{
- // take apart a canonical literal xsd:dateTime string
- //CCYY-MM-DDThh:mm:ss(Z)
-
- OUString aDateTimeString = aString.trim();
-
- // check length
- if (aDateTimeString.getLength() < 19 || aDateTimeString.getLength() > 20)
- return sal_False;
sal_Int32 nDateLength = 10;
sal_Int32 nTimeLength = 8;
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 25798d913f..3ea394beec 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -51,7 +52,7 @@
#include <cppuhelper/bootstrap.hxx>
#include <osl/file.hxx>
#include <osl/module.h>
-#include <vos/process.hxx>
+#include <osl/security.hxx>
#include <rtl/uri.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/bootstrap.hxx>
@@ -82,7 +83,6 @@
#define DESKTOP_TEMPDIRNAME "soffice.tmp"
using namespace rtl;
-using namespace vos;
using namespace desktop;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
@@ -107,7 +107,7 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect)
}
rtl::OUString aPipe;
- vos::OSecurity().getUserIdent(aPipe);
+ osl::Security().getUserIdent(aPipe);
rtl::OUStringBuffer aPortal;
if (rPortalConnect.getLength() != 0)
@@ -118,14 +118,13 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect)
Sequence< Any > aArgs(6);
aArgs[0]
- <<= rtl::OUString::createFromAscii(bServer ?
- UCB_CONFIGURATION_KEY1_SERVER :
- UCB_CONFIGURATION_KEY1_LOCAL);
+ <<= bServer ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UCB_CONFIGURATION_KEY1_SERVER)) :
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UCB_CONFIGURATION_KEY1_LOCAL));
aArgs[1]
- <<= rtl::OUString::createFromAscii(UCB_CONFIGURATION_KEY2_OFFICE);
- aArgs[2] <<= rtl::OUString::createFromAscii("PIPE");
+ <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UCB_CONFIGURATION_KEY2_OFFICE));
+ aArgs[2] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PIPE"));
aArgs[3] <<= aPipe;
- aArgs[4] <<= rtl::OUString::createFromAscii("PORTAL");
+ aArgs[4] <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("PORTAL"));
aArgs[5] <<= aPortal.makeStringAndClear();
bool ret =
@@ -146,32 +145,11 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect)
);
rtl::OUString aDesktopEnvironment;
if ((aValue >>= aDesktopEnvironment)
- && aDesktopEnvironment.equalsAscii("GNOME"))
+ && aDesktopEnvironment.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("GNOME")))
{
Reference<XContentProviderManager> xCPM =
cb->getContentProviderManagerInterface();
-#if 0
- try
- {
- Reference<XContentProviderFactory> xCPF(
- xServiceFactory->createInstance(
- rtl::OUString::createFromAscii(
- "com.sun.star.ucb.ContentProviderProxyFactory")),
- UNO_QUERY);
- if(xCPF.is())
- xCPM->registerContentProvider(
- xCPF->createContentProvider(
- rtl::OUString::createFromAscii(
- "com.sun.star.ucb.GnomeVFSContentProvider"
- )
- ),
- rtl::OUString::createFromAscii(".*"),
- false);
- } catch (...)
- {
- }
-#else
// Workaround for P1 #124597#. Instanciate GNOME-VFS-UCP in the thread that initialized
// GNOME in order to avoid a deadlock that may occure in case UCP gets initialized from
@@ -182,19 +160,18 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect)
{
Reference<XContentProvider> xCP(
xServiceFactory->createInstance(
- rtl::OUString::createFromAscii(
- "com.sun.star.ucb.GnomeVFSContentProvider")),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.ucb.GnomeVFSContentProvider"))),
UNO_QUERY);
if(xCP.is())
xCPM->registerContentProvider(
xCP,
- rtl::OUString::createFromAscii(".*"),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".*")),
false);
} catch (...)
{
}
}
-#endif
}
} catch (RuntimeException e) {
}
@@ -300,7 +277,7 @@ void Desktop::RegisterServices( Reference< XMultiServiceFactory >& xSMgr )
if ( !configureUcb( bServer, aPortalConnect ) )
{
DBG_ERROR( "Can't configure UCB" );
- throw com::sun::star::uno::Exception(rtl::OUString::createFromAscii("RegisterServices, configureUcb"), NULL);
+ throw com::sun::star::uno::Exception(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RegisterServices, configureUcb")), NULL);
}
CreateTemporaryDirectory();
@@ -328,7 +305,7 @@ void Desktop::createAcceptor(const OUString& aAcceptString)
aSeq[1] <<= bAccept;
Reference<XInitialization> rAcceptor(
::comphelper::getProcessServiceFactory()->createInstance(
- OUString::createFromAscii( "com.sun.star.office.Acceptor" )), UNO_QUERY );
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.office.Acceptor" ))), UNO_QUERY );
if ( rAcceptor.is() ) {
try{
rAcceptor->initialize( aSeq );
@@ -482,3 +459,5 @@ void Desktop::RemoveTemporaryDirectory()
}
} // namespace desktop
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/appinit.hxx b/desktop/source/app/appinit.hxx
index 2f3842b676..01aa78857b 100644
--- a/desktop/source/app/appinit.hxx
+++ b/desktop/source/app/appinit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,3 +49,5 @@ void removeTemporaryDirectory();
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/appsys.cxx b/desktop/source/app/appsys.cxx
index 0c26e694b5..61948550ca 100644
--- a/desktop/source/app/appsys.cxx
+++ b/desktop/source/app/appsys.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,3 +68,4 @@ void FATToVFat_Impl( String& aName )
#endif // WNT
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/appsys.hxx b/desktop/source/app/appsys.hxx
index 309f67d308..2dad7b5d71 100644
--- a/desktop/source/app/appsys.hxx
+++ b/desktop/source/app/appsys.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,3 +41,5 @@ void FATToVFat_Impl( String& aName );
}
#endif // _DESKTOP_APPSYS_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index bb946c99e3..c03c498c79 100755
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -232,7 +233,7 @@ static sal_Int16 impl_showExtensionDialog( uno::Reference< uno::XComponentContex
uno::Reference< lang::XMultiComponentFactory > xServiceManager( xContext->getServiceManager() );
if( !xServiceManager.is() )
- throw uno::RuntimeException(
+ throw uno::RuntimeException(
UNISTRING( "impl_showExtensionDialog(): unable to obtain service manager from component context" ), uno::Reference< uno::XInterface > () );
xService = xServiceManager->createInstanceWithContext( sServiceName, xContext );
@@ -333,15 +334,15 @@ static void impl_setNeedsCompatCheck()
xFactory->createInstance(sConfigSrvc), UNO_QUERY_THROW);
Sequence< Any > theArgs(1);
- beans::NamedValue v( OUString::createFromAscii("NodePath"),
- makeAny( OUString::createFromAscii("org.openoffice.Setup/Office") ) );
+ beans::NamedValue v( OUString(RTL_CONSTASCII_USTRINGPARAM("NodePath")),
+ makeAny( OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup/Office")) ) );
theArgs[0] <<= v;
Reference< beans::XPropertySet > pset = Reference< beans::XPropertySet >(
theConfigProvider->createInstanceWithArguments( sAccessSrvc, theArgs ), UNO_QUERY_THROW );
- Any value = makeAny( OUString::createFromAscii("never") );
+ Any value = makeAny( OUString(RTL_CONSTASCII_USTRINGPARAM("never")) );
- pset->setPropertyValue( OUString::createFromAscii("LastCompatibilityCheckID"), value );
+ pset->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LastCompatibilityCheckID")), value );
Reference< util::XChangesBatch >( pset, UNO_QUERY_THROW )->commitChanges();
}
catch (const Exception&) {}
@@ -386,20 +387,20 @@ static bool impl_needsCompatCheck()
xFactory->createInstance(sConfigSrvc), UNO_QUERY_THROW);
Sequence< Any > theArgs(1);
- beans::NamedValue v( OUString::createFromAscii("NodePath"),
- makeAny( OUString::createFromAscii("org.openoffice.Setup/Office") ) );
+ beans::NamedValue v( OUString(RTL_CONSTASCII_USTRINGPARAM("NodePath")),
+ makeAny( OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup/Office")) ) );
theArgs[0] <<= v;
Reference< beans::XPropertySet > pset = Reference< beans::XPropertySet >(
theConfigProvider->createInstanceWithArguments( sAccessSrvc, theArgs ), UNO_QUERY_THROW );
- Any result = pset->getPropertyValue( OUString::createFromAscii("LastCompatibilityCheckID") );
+ Any result = pset->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LastCompatibilityCheckID")) );
result >>= aLastCheckBuildID;
if ( aLastCheckBuildID != aCurrentBuildID )
{
bNeedsCheck = true;
result <<= aCurrentBuildID;
- pset->setPropertyValue( OUString::createFromAscii("LastCompatibilityCheckID"), result );
+ pset->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LastCompatibilityCheckID")), result );
Reference< util::XChangesBatch >( pset, UNO_QUERY_THROW )->commitChanges();
}
#ifdef DEBUG
diff --git a/desktop/source/app/checkinstall.cxx b/desktop/source/app/checkinstall.cxx
index 7a0e61d1b0..ee5c96b8c7 100644
--- a/desktop/source/app/checkinstall.cxx
+++ b/desktop/source/app/checkinstall.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -116,3 +117,5 @@ sal_Bool CheckInstallation( OUString& rTitle )
}
} // namespace desktop
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/checkinstall.hxx b/desktop/source/app/checkinstall.hxx
index ee33b69898..f37d5ee7ea 100644
--- a/desktop/source/app/checkinstall.hxx
+++ b/desktop/source/app/checkinstall.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,3 +41,5 @@ sal_Bool CheckInstallation( rtl::OUString& rTitle );
}
#endif // _DESKTOP_CHECKINSTALL_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index beb8423814..d1c8255b7b 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -57,7 +57,7 @@ public:
m_index(0)
{
rtl::OUString url;
- if (tools::getProcessWorkingDir(&url)) {
+ if (tools::getProcessWorkingDir(url)) {
m_cwdUrl.reset(url);
}
}
@@ -137,8 +137,8 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
Reference< XExternalUriReferenceTranslator > xTranslator(
xMS->createInstance(
- OUString::createFromAscii(
- "com.sun.star.uri.ExternalUriReferenceTranslator")),
+ OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "com.sun.star.uri.ExternalUriReferenceTranslator"))),
UNO_QUERY);
// parse command line arguments
@@ -163,7 +163,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
break;
}
// convert file URLs to internal form #112849#
- if (aArg.indexOf(OUString::createFromAscii("file:"))==0 &&
+ if (aArg.indexOfAsciiL(RTL_CONSTASCII_STRINGPARAM("file:"))==0 &&
xTranslator.is())
{
OUString tmp(xTranslator->translateToInternal(aArg));
@@ -175,12 +175,13 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
if ( aArg.getLength() > 0 )
{
m_eArgumentCount = m_eArgumentCount == NONE ? ONE : MANY;
- if ( !InterpretCommandLineParameter( aArg ))
+ ::rtl::OUString oArg;
+ if ( !InterpretCommandLineParameter( aArg, oArg ))
{
- if ( aArgStr.GetChar(0) == '-' )
+ if ( aArg.toChar() == '-' )
{
// handle this argument as an option
- if ( aArgStr.EqualsIgnoreCaseAscii( "-n" ))
+ if ( aArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("-n")))
{
// force new documents based on the following documents
bForceNewEvent = true;
@@ -253,7 +254,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bForceOpenEvent = false;
bDisplaySpec = false;
}
- else if ( aArgStr.EqualsIgnoreCaseAscii( "-display" ))
+ else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("print-to-file")))
{
// set display
bOpenEvent = false;
@@ -295,18 +296,43 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bStartEvent = false;
bDisplaySpec = false;
}
- #endif
}
else
{
if ( bPrinterName && bPrintToEvent )
{
// first argument after "-pt" this must be the printer name
- AddStringListParam_Impl( CMD_STRINGPARAM_PRINTERNAME, aArgStr );
+ AddStringListParam_Impl( CMD_STRINGPARAM_PRINTERNAME, aArg );
bPrinterName = sal_False;
}
+ else if ( bConversionParamsEvent && bConversionEvent )
+ {
+ // first argument must be the the params
+ AddStringListParam_Impl( CMD_STRINGPARAM_CONVERSIONPARAMS, aArg );
+ bConversionParamsEvent = sal_False;
+ }
+ else if ( bBatchPrinterNameEvent && bBatchPrintEvent )
+ {
+ // first argument is the printer name
+ AddStringListParam_Impl( CMD_STRINGPARAM_PRINTERNAME, aArg );
+ bBatchPrinterNameEvent = sal_False;
+ }
+ else if ( (bConversionEvent || bBatchPrintEvent) && bConversionOutEvent )
+ {
+ AddStringListParam_Impl( CMD_STRINGPARAM_CONVERSIONOUT, aArg );
+ bConversionOutEvent = sal_False;
+ }
else
{
+ if( bOpenEvent || bViewEvent || bForceNewEvent || bForceOpenEvent )
+ {
+ if( aArg.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("::ODMA")) )
+ {
+ ::rtl::OUString sArg(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.odma:/"));
+ sArg += aArg;
+ aArg = sArg;
+ }
+ }
// handle this argument as a filename
if ( bOpenEvent )
{
@@ -349,6 +375,8 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bDisplaySpec = false; // only one display, not a lsit
bOpenEvent = true; // set back to standard
}
+ else if ( bConversionEvent || bBatchPrintEvent )
+ AddStringListParam_Impl( CMD_STRINGPARAM_CONVERSIONLIST, aArg );
}
}
}
@@ -374,55 +402,60 @@ void CommandLineArgs::SetBoolParam_Impl( BoolParam eParam, sal_Bool bValue )
m_aBoolParams[eParam] = bValue;
}
-sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString& aArg )
+sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString& aArg, ::rtl::OUString& oArg )
{
- String aArgStr( aArg );
+ bool bDeprecated = false;
+ if (aArg.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("--")))
+ {
+ oArg = ::rtl::OUString(aArg.getStr()+2, aArg.getLength()-2);
+ }
+ else if (aArg.toChar() == '-')
+ {
+ bDeprecated = true;
+ oArg = ::rtl::OUString(aArg.getStr()+1, aArg.getLength()-1);
+ }
+ else
+ {
+ return sal_False;
+ }
- if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-minimized" )) == sal_True )
+ if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "minimized" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_MINIMIZED, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-invisible" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "invisible" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_INVISIBLE, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-norestore" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "norestore" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_NORESTORE, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-nodefault" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "nodefault" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_NODEFAULT, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-bean" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "bean" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_BEAN, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-plugin" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "plugin" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_PLUGIN, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-server" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "server" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_SERVER, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-headless" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "headless" )) == sal_True )
{
// Headless means also invisibile, so set this parameter to true!
SetBoolParam_Impl( CMD_BOOLPARAM_HEADLESS, sal_True );
SetBoolParam_Impl( CMD_BOOLPARAM_INVISIBLE, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-quickstart" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "quickstart" )) == sal_True )
{
-#if defined(WNT) || defined(OS2) || defined(QUARTZ)
+#if defined(ENABLE_QUICKSTART_APPLET)
SetBoolParam_Impl( CMD_BOOLPARAM_QUICKSTART, sal_True );
#endif
SetBoolParam_Impl( CMD_BOOLPARAM_NOQUICKSTART, sal_False );
@@ -434,70 +467,70 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
SetBoolParam_Impl( CMD_BOOLPARAM_QUICKSTART, sal_False );
return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-terminate_after_init" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "quickstart=no" )))
+ {
+ SetBoolParam_Impl( CMD_BOOLPARAM_NOQUICKSTART, sal_True );
+ SetBoolParam_Impl( CMD_BOOLPARAM_QUICKSTART, sal_False );
+ }
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "terminate_after_init" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_TERMINATEAFTERINIT, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-nofirststartwizard" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "nofirststartwizard" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_NOFIRSTSTARTWIZARD, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-nologo" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "nologo" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_NOLOGO, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-nolockcheck" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "nolockcheck" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_NOLOCKCHECK, sal_True );
// Workaround for automated testing
::svt::DocumentLockFile::AllowInteraction( sal_False );
-
- return sal_True;
}
else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-help" ))
|| aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-h" ))
|| aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-?" )))
{
SetBoolParam_Impl( CMD_BOOLPARAM_HELP, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-helpwriter" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "helpwriter" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_HELPWRITER, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-helpcalc" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "helpcalc" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_HELPCALC, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-helpdraw" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "helpdraw" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_HELPDRAW, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-helpimpress" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "helpimpress" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_HELPIMPRESS, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-helpbase" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "helpbase" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_HELPBASE, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-helpbasic" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "helpbasic" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_HELPBASIC, sal_True );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-helpmath" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "helpmath" )) == sal_True )
{
SetBoolParam_Impl( CMD_BOOLPARAM_HELPMATH, sal_True );
- return sal_True;
+ }
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "version" )) == sal_True )
+ {
+ SetBoolParam_Impl( CMD_BOOLPARAM_VERSION, sal_True );
+ }
+ else if ( oArg.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("splash-pipe=")) )
+ {
+ AddStringListParam_Impl( CMD_STRINGPARAM_SPLASHPIPE, oArg.copy(RTL_CONSTASCII_LENGTH("splash-pipe=")) );
}
#ifdef MACOSX
/* #i84053# ignore -psn on Mac
@@ -513,21 +546,22 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
#endif
else if ( aArgStr.Copy(0, 8).EqualsIgnoreCaseAscii( "-accept=" ))
{
- AddStringListParam_Impl( CMD_STRINGPARAM_ACCEPT, aArgStr.Copy( 8 ) );
- return sal_True;
+ AddStringListParam_Impl( CMD_STRINGPARAM_INFILTER, oArg.copy(RTL_CONSTASCII_LENGTH("infilter=")) );
}
- else if ( aArgStr.Copy(0, 10).EqualsIgnoreCaseAscii( "-unaccept=" ))
+ else if ( oArg.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("accept=")))
{
- AddStringListParam_Impl( CMD_STRINGPARAM_UNACCEPT, aArgStr.Copy( 10 ) );
- return sal_True;
+ AddStringListParam_Impl( CMD_STRINGPARAM_ACCEPT, oArg.copy(RTL_CONSTASCII_LENGTH("accept=")) );
}
else if ( aArgStr.CompareIgnoreCaseToAscii( "-portal," ,
RTL_CONSTASCII_LENGTH( "-portal," )) == COMPARE_EQUAL )
{
- AddStringListParam_Impl( CMD_STRINGPARAM_PORTAL, aArgStr.Copy( RTL_CONSTASCII_LENGTH( "-portal," )) );
- return sal_True;
+ AddStringListParam_Impl( CMD_STRINGPARAM_UNACCEPT, oArg.copy(RTL_CONSTASCII_LENGTH("unaccept=")) );
+ }
+ else if ( oArg.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("portal,")))
+ {
+ AddStringListParam_Impl( CMD_STRINGPARAM_PORTAL, oArg.copy(RTL_CONSTASCII_LENGTH("portal,")) );
}
- else if ( aArgStr.Copy( 0, 7 ).EqualsIgnoreCaseAscii( "-userid" ))
+ else if ( oArg.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("userid")))
{
if ( aArgStr.Len() > 8 )
{
@@ -535,14 +569,12 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
AddStringListParam_Impl( CMD_STRINGPARAM_USERDIR,
::rtl::Uri::decode( aUserDir.copy( 8 ), rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 ) );
}
- return sal_True;
}
- else if ( aArgStr.Copy( 0, 15).EqualsIgnoreCaseAscii( "-clientdisplay=" ))
+ else if ( oArg.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("clientdisplay=")))
{
- AddStringListParam_Impl( CMD_STRINGPARAM_CLIENTDISPLAY, aArgStr.Copy( 15 ) );
- return sal_True;
+ AddStringListParam_Impl( CMD_STRINGPARAM_CLIENTDISPLAY, oArg.copy(RTL_CONSTASCII_LENGTH("clientdisplay=")) );
}
- else if ( aArgStr.Copy(0, 9).EqualsIgnoreCaseAscii( "-version=" ))
+ else if ( oArg.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("version=")))
{
AddStringListParam_Impl( CMD_STRINGPARAM_VERSION, aArgStr.Copy( 9 ) );
return sal_True;
@@ -552,7 +584,7 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
AddStringListParam_Impl( CMD_STRINGPARAM_LANGUAGE, aArgStr.Copy( 10 ) );
return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-writer" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "writer" )) == sal_True )
{
sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_WRITER );
if ( !bAlreadySet )
@@ -560,7 +592,7 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
m_bDocumentArgs = true;
return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-calc" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "calc" )) == sal_True )
{
sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_CALC );
if ( !bAlreadySet )
@@ -568,7 +600,7 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
m_bDocumentArgs = true;
return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-draw" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "draw" )) == sal_True )
{
sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_DRAW );
if ( !bAlreadySet )
@@ -576,7 +608,7 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
m_bDocumentArgs = true;
return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-impress" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "impress" )) == sal_True )
{
sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_IMPRESS );
if ( !bAlreadySet )
@@ -584,7 +616,7 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
m_bDocumentArgs = true;
return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-base" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "base" )) == sal_True )
{
sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_BASE );
if ( !bAlreadySet )
@@ -592,7 +624,7 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
m_bDocumentArgs = true;
return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-global" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "global" )) == sal_True )
{
sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_GLOBAL );
if ( !bAlreadySet )
@@ -600,7 +632,7 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
m_bDocumentArgs = true;
return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-math" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "math" )) == sal_True )
{
sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_MATH );
if ( !bAlreadySet )
@@ -608,7 +640,7 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
m_bDocumentArgs = true;
return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-web" )) == sal_True )
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "web" )) == sal_True )
{
sal_Bool bAlreadySet = CheckGroupMembers( CMD_GRPID_MODULE, CMD_BOOLPARAM_WEB );
if ( !bAlreadySet )
@@ -616,8 +648,15 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
m_bDocumentArgs = true;
return sal_True;
}
+ else
+ return sal_False;
- return sal_False;
+ if (bDeprecated)
+ {
+ rtl::OString sArg(rtl::OUStringToOString(aArg, RTL_TEXTENCODING_UTF8));
+ fprintf(stderr, "Warning: %s is deprecated. Use -%s instead.\n", sArg.getStr(), sArg.getStr());
+ }
+ return sal_True;
}
sal_Bool CommandLineArgs::CheckGroupMembers( GroupParamId nGroupId, BoolParam nExcludeMember ) const
@@ -652,6 +691,14 @@ void CommandLineArgs::SetBoolParam( BoolParam eParam, sal_Bool bNewValue )
m_aBoolParams[eParam] = bNewValue;
}
+const rtl::OUString& CommandLineArgs::GetStringParam( StringParam eParam ) const
+{
+ osl::MutexGuard aMutexGuard( m_aMutex );
+
+ OSL_ASSERT( ( eParam >= 0 && eParam < CMD_STRINGPARAM_COUNT ) );
+ return m_aStrParams[eParam];
+}
+
sal_Bool CommandLineArgs::IsMinimized() const
{
osl::MutexGuard aMutexGuard( m_aMutex );
@@ -708,14 +755,14 @@ sal_Bool CommandLineArgs::IsNoQuickstart() const
sal_Bool CommandLineArgs::IsTerminateAfterInit() const
{
- osl::MutexGuard aMutexGuard( m_aMutex );
- return m_aBoolParams[ CMD_BOOLPARAM_TERMINATEAFTERINIT ];
+ osl::MutexGuard aMutexGuard( m_aMutex );
+ return m_aBoolParams[ CMD_BOOLPARAM_NOQUICKSTART ];
}
-sal_Bool CommandLineArgs::IsNoFirstStartWizard() const
+sal_Bool CommandLineArgs::IsTerminateAfterInit() const
{
osl::MutexGuard aMutexGuard( m_aMutex );
- return m_aBoolParams[ CMD_BOOLPARAM_NOFIRSTSTARTWIZARD ];
+ return m_aBoolParams[ CMD_BOOLPARAM_TERMINATEAFTERINIT ];
}
sal_Bool CommandLineArgs::IsNoLogo() const
@@ -823,6 +870,12 @@ sal_Bool CommandLineArgs::IsWeb() const
return m_aBoolParams[ CMD_BOOLPARAM_WEB ];
}
+sal_Bool CommandLineArgs::IsVersion() const
+{
+ osl::MutexGuard aMutexGuard( m_aMutex );
+ return m_aBoolParams[ CMD_BOOLPARAM_VERSION ];
+}
+
sal_Bool CommandLineArgs::HasModuleParam() const
{
osl::MutexGuard aMutexGuard( m_aMutex );
@@ -923,7 +976,8 @@ sal_Bool CommandLineArgs::IsEmptyOrAcceptOnly() const
{
osl::MutexGuard aMutexGuard( m_aMutex );
- return m_eArgumentCount == NONE ||
+ return m_eArgumentCount == NONE ||
+ ( ( m_eArgumentCount == ONE ) && ( m_aStrParams[ CMD_STRINGPARAM_SPLASHPIPE ].getLength() )) ||
( ( m_eArgumentCount == ONE ) && ( m_aStrParams[ CMD_STRINGPARAM_ACCEPT ].getLength() )) ||
( ( m_eArgumentCount == ONE ) && m_aBoolParams[ CMD_BOOLPARAM_PSN ] );
}
@@ -935,3 +989,5 @@ sal_Bool CommandLineArgs::WantsToLoadDocument() const
}
} // namespace desktop
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/cmdlineargs.hxx b/desktop/source/app/cmdlineargs.hxx
index 6412c2a7f2..efd0cfcd68 100644
--- a/desktop/source/app/cmdlineargs.hxx
+++ b/desktop/source/app/cmdlineargs.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,7 +41,7 @@ class CommandLineArgs
public:
enum BoolParam // must be zero based!
{
- CMD_BOOLPARAM_MINIMIZED,
+ CMD_BOOLPARAM_MINIMIZED = 0,
CMD_BOOLPARAM_INVISIBLE,
CMD_BOOLPARAM_NORESTORE,
CMD_BOOLPARAM_BEAN,
@@ -76,7 +77,8 @@ class CommandLineArgs
enum StringParam // must be zero based!
{
- CMD_STRINGPARAM_PORTAL,
+ CMD_STRINGPARAM_PORTAL = 0,
+ CMD_STRINGPARAM_SPLASHPIPE,
CMD_STRINGPARAM_ACCEPT,
CMD_STRINGPARAM_UNACCEPT,
CMD_STRINGPARAM_USERDIR,
@@ -90,6 +92,10 @@ class CommandLineArgs
CMD_STRINGPARAM_VERSION,
CMD_STRINGPARAM_PRINTTOLIST,
CMD_STRINGPARAM_PRINTERNAME,
+ CMD_STRINGPARAM_CONVERSIONLIST,
+ CMD_STRINGPARAM_CONVERSIONPARAMS,
+ CMD_STRINGPARAM_CONVERSIONOUT,
+ CMD_STRINGPARAM_INFILTER,
CMD_STRINGPARAM_DISPLAY,
CMD_STRINGPARAM_LANGUAGE,
CMD_STRINGPARAM_COUNT // must be last element!
@@ -97,7 +103,7 @@ class CommandLineArgs
enum GroupParamId
{
- CMD_GRPID_MODULE,
+ CMD_GRPID_MODULE = 0,
CMD_GRPID_COUNT
};
@@ -125,6 +131,8 @@ class CommandLineArgs
// generic methods to access parameter
void SetBoolParam( BoolParam eParam, sal_Bool bNewValue );
+ const rtl::OUString& GetStringParam( StringParam eParam ) const;
+
// Access to bool parameters
sal_Bool IsMinimized() const;
sal_Bool IsInvisible() const;
@@ -213,3 +221,5 @@ class CommandLineArgs
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx
index 8af72e63ec..6a09755a7b 100644
--- a/desktop/source/app/cmdlinehelp.cxx
+++ b/desktop/source/app/cmdlinehelp.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,42 +54,45 @@ namespace desktop
// __BOTTOM__
// [OK]
- const char *aCmdLineHelp_head =
+ const char *aCmdLineHelp_version =
"%PRODUCTNAME %PRODUCTVERSION %PRODUCTEXTENSION %BUILDID\n"\
- "\n"\
+ "\n";
+ const char *aCmdLineHelp_head =
"Usage: %CMDNAME [options] [documents...]\n"\
"\n"\
"Options:\n";
const char *aCmdLineHelp_left =
- "-minimized \n"\
- "-invisible \n"\
- "-norestore \n"\
- "-quickstart \n"\
- "-nologo \n"\
- "-nolockcheck \n"\
- "-nodefault \n"\
- "-headless \n"\
- "-help/-h/-? \n"\
- "-writer \n"\
- "-calc \n"\
- "-draw \n"\
- "-impress \n"\
- "-base \n"\
- "-math \n"\
- "-global \n"\
- "-web \n"\
+ "--minimized \n"\
+ "--invisible \n"\
+ "--norestore \n"\
+ "--quickstart \n"\
+ "--nologo \n"\
+ "--nolockcheck \n"\
+ "--nodefault \n"\
+ "--headless \n"\
+ "--help/-h/-? \n"\
+ "--version \n"\
+ "--writer \n"\
+ "--calc \n"\
+ "--draw \n"\
+ "--impress \n"\
+ "--base \n"\
+ "--math \n"\
+ "--global \n"\
+ "--web \n"\
"-o \n"\
"-n \n";
const char *aCmdLineHelp_right =
"keep startup bitmap minimized.\n"\
"no startup screen, no default document and no UI.\n"\
"suppress restart/restore after fatal errors.\n"\
- "starts the quickstart service (only available on windows and OS/2 platform)\n"\
+ "starts the quickstart service\n"\
"don't show startup screen.\n"\
"don't check for remote instances using the installation\n"\
"don't start with an empty document\n"\
"like invisible but no userinteraction at all.\n"\
"show this message and exit.\n"\
+ "display the version information.\n"\
"create new text document.\n"\
"create new spreadsheet document.\n"\
"create new drawing.\n"\
@@ -100,23 +104,36 @@ namespace desktop
"open documents regardless whether they are templates or not.\n"\
"always open documents as new files (use as template).\n";
const char *aCmdLineHelp_bottom =
- "-display <display>\n"\
+ "--display <display>\n"\
" Specify X-Display to use in Unix/X11 versions.\n"
"-p <documents...>\n"\
" print the specified documents on the default printer.\n"\
- "-pt <printer> <documents...>\n"\
+ "--pt <printer> <documents...>\n"\
" print the specified documents on the specified printer.\n"\
- "-view <documents...>\n"\
+ "--view <documents...>\n"\
" open the specified documents in viewer-(readonly-)mode.\n"\
- "-show <presentation>\n"\
+ "--show <presentation>\n"\
" open the specified presentation and start it immediately\n"\
- "-accept=<accept-string>\n"\
+ "--accept=<accept-string>\n"\
" Specify an UNO connect-string to create an UNO acceptor through which\n"\
" other programs can connect to access the API\n"\
- "-unaccept=<accept-string>\n"\
+ "--unaccept=<accept-string>\n"\
" Close an acceptor that was created with -accept=<accept-string>\n"\
" Use -unnaccept=all to close all open acceptors\n"\
- "Remaining arguments will be treated as filenames or URLs of documents to open.\n";
+ "--infilter=<filter>\n"\
+ " Force an input filter type if possible\n"\
+ " Eg. -infilter=\"Calc Office Open XML\"\n"\
+ "--convert-to output_file_extension[:output_filter_name] [-outdir ouput_dir] files\n"\
+ " Batch convert files.\n"\
+ " If -outdir is not specified then current working dir is used as output_dir.\n"\
+ " Eg. -convert-to pdf *.doc\n"\
+ " -convert-to pdf:writer_pdf_Export -outdir /home/user *.doc\n"\
+ "--print-to-file [-printer-name printer_name] [-outdir ouput_dir] files\n"\
+ " Batch print files to file.\n"\
+ " If -outdir is not specified then current working dir is used as output_dir.\n"\
+ " Eg. -print-to-file *.doc\n"\
+ " -print-to-file -printer-name nasty_lowres_printer -outdir /home/user *.doc\n"\
+ "\nRemaining arguments will be treated as filenames or URLs of documents to open.\n\n";
void ReplaceStringHookProc( UniString& rStr );
@@ -124,40 +141,62 @@ namespace desktop
{
// if you put variables in other chunks don't forget to call the replace routines
// for those chunks...
+ String aHelpMessage_version(aCmdLineHelp_version, RTL_TEXTENCODING_ASCII_US);
String aHelpMessage_head(aCmdLineHelp_head, RTL_TEXTENCODING_ASCII_US);
String aHelpMessage_left(aCmdLineHelp_left, RTL_TEXTENCODING_ASCII_US);
String aHelpMessage_right(aCmdLineHelp_right, RTL_TEXTENCODING_ASCII_US);
String aHelpMessage_bottom(aCmdLineHelp_bottom, RTL_TEXTENCODING_ASCII_US);
- ReplaceStringHookProc(aHelpMessage_head);
+ ReplaceStringHookProc(aHelpMessage_version);
::rtl::OUString aDefault;
String aVerId( ::utl::Bootstrap::getBuildIdData( aDefault ));
- aHelpMessage_head.SearchAndReplaceAscii( "%BUILDID", aVerId );
+ aHelpMessage_version.SearchAndReplaceAscii( "%BUILDID", aVerId );
aHelpMessage_head.SearchAndReplaceAscii( "%CMDNAME", String( "soffice", RTL_TEXTENCODING_ASCII_US) );
#ifdef UNX
// on unix use console for output
- fprintf(stderr, "%s\n", ByteString(aHelpMessage_head,
- RTL_TEXTENCODING_ASCII_US).GetBuffer());
+ fprintf(stdout, "%s%s",
+ ByteString(aHelpMessage_version, RTL_TEXTENCODING_ASCII_US).GetBuffer(),
+ ByteString(aHelpMessage_head, RTL_TEXTENCODING_ASCII_US).GetBuffer());
// merge left and right column
int n = aHelpMessage_left.GetTokenCount ('\n');
ByteString bsLeft(aHelpMessage_left, RTL_TEXTENCODING_ASCII_US);
ByteString bsRight(aHelpMessage_right, RTL_TEXTENCODING_ASCII_US);
for ( int i = 0; i < n; i++ )
{
- fprintf(stderr, "%s", bsLeft.GetToken(i, '\n').GetBuffer());
- fprintf(stderr, "%s\n", bsRight.GetToken(i, '\n').GetBuffer());
+ fprintf(stdout, "%s", bsLeft.GetToken(i, '\n').GetBuffer());
+ fprintf(stdout, "%s\n", bsRight.GetToken(i, '\n').GetBuffer());
}
- fprintf(stderr, "%s", ByteString(aHelpMessage_bottom,
+ fprintf(stdout, "%s", ByteString(aHelpMessage_bottom,
RTL_TEXTENCODING_ASCII_US).GetBuffer());
#else
// rest gets a dialog box
CmdlineHelpDialog aDlg;
- aDlg.m_ftHead.SetText(aHelpMessage_head);
+ String head = aHelpMessage_version;
+ head.Append(aHelpMessage_head);
+ aDlg.m_ftHead.SetText(head);
aDlg.m_ftLeft.SetText(aHelpMessage_left);
aDlg.m_ftRight.SetText(aHelpMessage_right);
aDlg.m_ftBottom.SetText(aHelpMessage_bottom);
aDlg.Execute();
#endif
}
+
+ void displayVersion()
+ {
+ String aVersionMsg(aCmdLineHelp_version, RTL_TEXTENCODING_ASCII_US);
+ ReplaceStringHookProc(aVersionMsg);
+ ::rtl::OUString aDefault;
+ String aVerId = ::utl::Bootstrap::getBuildIdData(aDefault);
+ aVersionMsg.SearchAndReplaceAscii("%BUILDID", aVerId);
+#ifdef UNX
+ fprintf(stdout, "%s", ByteString(aVersionMsg, RTL_TEXTENCODING_ASCII_US).GetBuffer());
+#else
+ // Just re-use the help dialog for now.
+ CmdlineHelpDialog aDlg;
+ aDlg.m_ftHead.SetText(aVersionMsg);
+ aDlg.Execute();
+#endif
+ }
+
#ifndef UNX
CmdlineHelpDialog::CmdlineHelpDialog (void)
: ModalDialog( NULL, DesktopResId( DLG_CMDLINEHELP ) )
@@ -171,3 +210,5 @@ namespace desktop
}
#endif
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/cmdlinehelp.hxx b/desktop/source/app/cmdlinehelp.hxx
index ca6424c4d6..2036d64678 100644
--- a/desktop/source/app/cmdlinehelp.hxx
+++ b/desktop/source/app/cmdlinehelp.hxx
@@ -1,12 +1,12 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include <vcl/dialog.hxx>
#include <vcl/fixed.hxx>
-#ifndef _SV_BUTTON_HXX
#include <vcl/button.hxx>
-#endif
namespace desktop
{
void displayCmdlineHelp( void );
+ void displayVersion();
#ifndef UNX
class CmdlineHelpDialog : public ModalDialog
{
@@ -21,3 +21,5 @@ namespace desktop
};
#endif
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/configinit.cxx b/desktop/source/app/configinit.cxx
index b5162158e0..4da030c453 100644
--- a/desktop/source/app/configinit.cxx
+++ b/desktop/source/app/configinit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -242,7 +243,7 @@ private:
uno::Any SAL_CALL ConfigurationErrorHandler::Context::getValueByName( OUString const & aName)
throw (uno::RuntimeException)
{
- if ( aName.equalsAscii( CONFIG_ERROR_HANDLER ) )
+ if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CONFIG_ERROR_HANDLER)) )
{
if ( !m_xHandler.is() )
m_xHandler = ConfigurationErrorHandler::getDefaultInteractionHandler();
@@ -301,3 +302,4 @@ ConfigurationErrorHandler::InteractionHandler ConfigurationErrorHandler::getDefa
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/configinit.hxx b/desktop/source/app/configinit.hxx
index cdcf5145ec..8254f41118 100644
--- a/desktop/source/app/configinit.hxx
+++ b/desktop/source/app/configinit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#ifndef _DESKTOP_CONFIGINIT_HXX_
#define _DESKTOP_CONFIGINIT_HXX_
@@ -69,3 +70,5 @@ com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >
//-----------------------------------------------------------------------------
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/copyright_ascii_ooo.c b/desktop/source/app/copyright_ascii_ooo.c
index 4224419e99..b35aa2cee9 100644
--- a/desktop/source/app/copyright_ascii_ooo.c
+++ b/desktop/source/app/copyright_ascii_ooo.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* copyright text to see as text in the soffice binary
@@ -8,3 +9,4 @@ extern const char copyright_text_1[];
const char copyright_text_1[] = "Copyright © 2000, 2010 Oracle and/or its affiliates, All rights reserved.";
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/copyright_ascii_sun.c b/desktop/source/app/copyright_ascii_sun.c
index f9950118e8..a94966855e 100644
--- a/desktop/source/app/copyright_ascii_sun.c
+++ b/desktop/source/app/copyright_ascii_sun.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* copyright text to see as text in the soffice binary
@@ -6,3 +7,4 @@
const char copyright_text_1[] = "Copyright © 2000, 2010 Oracle and/or its affiliates, All rights reserved.";
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/desktopcontext.cxx b/desktop/source/app/desktopcontext.cxx
index 27d81924f1..df33617937 100644
--- a/desktop/source/app/desktopcontext.cxx
+++ b/desktop/source/app/desktopcontext.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,7 +49,7 @@ Any SAL_CALL DesktopContext::getValueByName( const OUString& Name) throw (Runtim
{
Any retVal;
- if ( 0 == Name.compareToAscii( JAVA_INTERACTION_HANDLER_NAME ))
+ if (Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(JAVA_INTERACTION_HANDLER_NAME)))
{
retVal = makeAny( Reference< XInteractionHandler >( new svt::JavaInteractionHandler()) );
}
@@ -61,3 +62,5 @@ Any SAL_CALL DesktopContext::getValueByName( const OUString& Name) throw (Runtim
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/desktopcontext.hxx b/desktop/source/app/desktopcontext.hxx
index 0339ea4841..f0ac41c87a 100644
--- a/desktop/source/app/desktopcontext.hxx
+++ b/desktop/source/app/desktopcontext.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,3 +49,5 @@ namespace desktop
}
#endif // _DESKTOP_DESKTOPCONTEXT_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/desktopresid.cxx b/desktop/source/app/desktopresid.cxx
index a4aa77cc31..347ee542a3 100644
--- a/desktop/source/app/desktopresid.cxx
+++ b/desktop/source/app/desktopresid.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,5 @@ DesktopResId::DesktopResId( USHORT nId ) :
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/desktopresid.hxx b/desktop/source/app/desktopresid.hxx
index 2271145f71..689a0f11da 100644
--- a/desktop/source/app/desktopresid.hxx
+++ b/desktop/source/app/desktopresid.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,3 +43,5 @@ class DesktopResId : public ResId
}
#endif // _DESKTOP_RESID_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index e6383e32bd..8d8fc9d6ed 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,6 +29,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_desktop.hxx"
+#include <sfx2/docfile.hxx>
+#include <sfx2/docfilt.hxx>
+#include <sfx2/fcontnr.hxx>
+#include "osl/file.hxx"
+#include <svl/fstathelper.hxx>
+
#include "dispatchwatcher.hxx"
#include <rtl/ustring.hxx>
#include <tools/string.hxx>
@@ -48,13 +55,15 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/document/UpdateDocMode.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
#include <tools/urlobj.hxx>
#include <comphelper/mediadescriptor.hxx>
#include <vector>
+#include <osl/thread.hxx>
-using namespace ::rtl;
+using ::rtl::OUString;
using namespace ::osl;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::util;
@@ -80,6 +89,32 @@ struct DispatchHolder
Reference< XDispatch > xDispatch;
};
+static String impl_GetFilterFromExt( OUString aUrl, SfxFilterFlags nFlags,
+ String aAppl )
+{
+ String aFilter;
+ SfxMedium* pMedium = new SfxMedium( aUrl,
+ STREAM_STD_READ, FALSE );
+ const SfxFilter *pSfxFilter = NULL;
+ SfxFilterMatcher aMatcher;
+ if( nFlags == SFX_FILTER_EXPORT )
+ aMatcher = SfxFilterMatcher( aAppl );
+ aMatcher.GuessFilterIgnoringContent( *pMedium, &pSfxFilter, nFlags, 0 );
+ if( pSfxFilter )
+ aFilter = ( nFlags == SFX_FILTER_EXPORT ) ? pSfxFilter->GetFilterName() :
+ pSfxFilter->GetServiceName();
+
+ delete pMedium;
+ return aFilter;
+}
+static OUString impl_GuessFilter( OUString aUrlIn, OUString aUrlOut )
+{
+ /* aAppl can also be set to Factory like scalc, swriter... */
+ String aAppl;
+ aAppl = impl_GetFilterFromExt( aUrlIn, SFX_FILTER_IMPORT, aAppl );
+ return impl_GetFilterFromExt( aUrlOut, SFX_FILTER_EXPORT, aAppl );
+}
+
Mutex* DispatchWatcher::pWatcherMutex = NULL;
Mutex& DispatchWatcher::GetMutex()
@@ -138,10 +173,11 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
DispatchList::const_iterator p;
std::vector< DispatchHolder > aDispatches;
::rtl::OUString aAsTemplateArg( RTL_CONSTASCII_USTRINGPARAM( "AsTemplate"));
+ sal_Bool bSetInputFilter = sal_False;
+ ::rtl::OUString aForcedInputFilter;
- for ( p = aDispatchRequestsList.begin(); p != aDispatchRequestsList.end(); p++ )
+ for ( p = aDispatchRequestsList.begin(); p != aDispatchRequestsList.end(); ++p )
{
- String aPrinterName;
const DispatchRequest& aDispatchRequest = *p;
// create parameter array
@@ -149,40 +185,53 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
if ( aDispatchRequest.aPreselectedFactory.getLength() )
nCount++;
+ // Set Input Filter
+ if ( aDispatchRequest.aRequestType == REQUEST_INFILTER )
+ {
+ bSetInputFilter = sal_True;
+ aForcedInputFilter = aDispatchRequest.aURL;
+ OfficeIPCThread::RequestsCompleted( 1 );
+ continue;
+ }
+
// we need more properties for a print/print to request
if ( aDispatchRequest.aRequestType == REQUEST_PRINT ||
- aDispatchRequest.aRequestType == REQUEST_PRINTTO )
+ aDispatchRequest.aRequestType == REQUEST_PRINTTO ||
+ aDispatchRequest.aRequestType == REQUEST_BATCHPRINT ||
+ aDispatchRequest.aRequestType == REQUEST_CONVERSION)
nCount++;
Sequence < PropertyValue > aArgs( nCount );
// mark request as user interaction from outside
- aArgs[0].Name = ::rtl::OUString::createFromAscii("Referer");
- aArgs[0].Value <<= ::rtl::OUString::createFromAscii("private:OpenEvent");
+ aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Referer"));
+ aArgs[0].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:OpenEvent"));
if ( aDispatchRequest.aRequestType == REQUEST_PRINT ||
- aDispatchRequest.aRequestType == REQUEST_PRINTTO )
+ aDispatchRequest.aRequestType == REQUEST_PRINTTO ||
+ aDispatchRequest.aRequestType == REQUEST_BATCHPRINT ||
+ aDispatchRequest.aRequestType == REQUEST_CONVERSION)
{
- aArgs[1].Name = ::rtl::OUString::createFromAscii("ReadOnly");
- aArgs[2].Name = ::rtl::OUString::createFromAscii("OpenNewView");
- aArgs[3].Name = ::rtl::OUString::createFromAscii("Hidden");
- aArgs[4].Name = ::rtl::OUString::createFromAscii("Silent");
+ aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly"));
+ aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OpenNewView"));
+ aArgs[3].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Hidden"));
+ aArgs[4].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Silent"));
}
else
{
Reference < com::sun::star::task::XInteractionHandler > xInteraction(
- ::comphelper::getProcessServiceFactory()->createInstance( OUString::createFromAscii("com.sun.star.task.InteractionHandler") ),
+ ::comphelper::getProcessServiceFactory()->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler")) ),
com::sun::star::uno::UNO_QUERY );
- aArgs[1].Name = OUString::createFromAscii( "InteractionHandler" );
+ aArgs[1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ));
aArgs[1].Value <<= xInteraction;
sal_Int16 nMacroExecMode = ::com::sun::star::document::MacroExecMode::USE_CONFIG;
- aArgs[2].Name = OUString::createFromAscii( "MacroExecutionMode" );
+ aArgs[2].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "MacroExecutionMode" ));
aArgs[2].Value <<= nMacroExecMode;
sal_Int16 nUpdateDoc = ::com::sun::star::document::UpdateDocMode::ACCORDING_TO_CONFIG;
- aArgs[3].Name = OUString::createFromAscii( "UpdateDocMode" );
+ aArgs[3].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "UpdateDocMode" ));
aArgs[3].Value <<= nUpdateDoc;
}
@@ -196,7 +245,9 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
::rtl::OUString aTarget( RTL_CONSTASCII_USTRINGPARAM("_default") );
if ( aDispatchRequest.aRequestType == REQUEST_PRINT ||
- aDispatchRequest.aRequestType == REQUEST_PRINTTO )
+ aDispatchRequest.aRequestType == REQUEST_PRINTTO ||
+ aDispatchRequest.aRequestType == REQUEST_BATCHPRINT ||
+ aDispatchRequest.aRequestType == REQUEST_CONVERSION)
{
// documents opened for printing are opened readonly because they must be opened as a new document and this
// document could be open already
@@ -214,7 +265,6 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
// hidden documents should never be put into open tasks
aTarget = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_blank") );
}
-
// load the document ... if they are loadable!
// Otherwise try to dispatch it ...
Reference < XPrintable > xDoc;
@@ -278,7 +328,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
// Otherwise it would be possible to have an office running without an open
// window!!
Sequence < PropertyValue > aArgs2(1);
- aArgs2[0].Name = ::rtl::OUString::createFromAscii("SynchronMode");
+ aArgs2[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SynchronMode"));
aArgs2[0].Value <<= sal_True;
Reference < XNotifyingDispatch > xDisp( xDispatcher, UNO_QUERY );
if ( xDisp.is() )
@@ -288,8 +338,8 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
}
catch ( ::com::sun::star::uno::Exception& )
{
- OUString aMsg = OUString::createFromAscii(
- "Desktop::OpenDefault() IllegalArgumentException while calling XNotifyingDispatch: ");
+ OUString aMsg = OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Desktop::OpenDefault() IllegalArgumentException while calling XNotifyingDispatch: "));
OSL_ENSURE( sal_False, OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
}
}
@@ -318,7 +368,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
if(aDispatchRequest.aRequestType == REQUEST_VIEW) {
sal_Int32 nIndex = aArgs.getLength();
aArgs.realloc(nIndex+1);
- aArgs[nIndex].Name = OUString::createFromAscii("ReadOnly");
+ aArgs[nIndex].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly"));
aArgs[nIndex].Value <<= sal_True;
}
@@ -326,28 +376,35 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
if(aDispatchRequest.aRequestType == REQUEST_START) {
sal_Int32 nIndex = aArgs.getLength();
aArgs.realloc(nIndex+1);
- aArgs[nIndex].Name = OUString::createFromAscii("StartPresentation");
+ aArgs[nIndex].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("StartPresentation"));
aArgs[nIndex].Value <<= sal_True;
}
- // This is a synchron loading of a component so we don't have to deal with our statusChanged listener mechanism.
+ // Force input filter, if possible
+ if( bSetInputFilter )
+ {
+ sal_Int32 nIndex = aArgs.getLength();
+ aArgs.realloc(nIndex+1);
+ aArgs[nIndex].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("FilterName"));
+ aArgs[nIndex].Value <<= aForcedInputFilter;
+ }
+ // This is a synchron loading of a component so we don't have to deal with our statusChanged listener mechanism.
try
{
xDoc = Reference < XPrintable >( ::comphelper::SynchronousDispatch::dispatch( xDesktop, aName, aTarget, 0, aArgs ), UNO_QUERY );
- //xDoc = Reference < XPrintable >( xDesktop->loadComponentFromURL( aName, aTarget, 0, aArgs ), UNO_QUERY );
}
catch ( ::com::sun::star::lang::IllegalArgumentException& iae)
{
- OUString aMsg = OUString::createFromAscii(
- "Dispatchwatcher IllegalArgumentException while calling loadComponentFromURL: ")
+ OUString aMsg = OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Dispatchwatcher IllegalArgumentException while calling loadComponentFromURL: "))
+ iae.Message;
OSL_ENSURE( sal_False, OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
}
catch (com::sun::star::io::IOException& ioe)
{
- OUString aMsg = OUString::createFromAscii(
- "Dispatchwatcher IOException while calling loadComponentFromURL: ")
+ OUString aMsg = OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Dispatchwatcher IOException while calling loadComponentFromURL: "))
+ ioe.Message;
OSL_ENSURE( sal_False, OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
}
@@ -361,24 +418,132 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
OfficeIPCThread::RequestsCompleted( 1 );
}
else if ( aDispatchRequest.aRequestType == REQUEST_PRINT ||
- aDispatchRequest.aRequestType == REQUEST_PRINTTO )
+ aDispatchRequest.aRequestType == REQUEST_PRINTTO ||
+ aDispatchRequest.aRequestType == REQUEST_BATCHPRINT ||
+ aDispatchRequest.aRequestType == REQUEST_CONVERSION )
{
if ( xDoc.is() )
{
- if ( aDispatchRequest.aRequestType == REQUEST_PRINTTO )
- {
- // create the printer
+ if ( aDispatchRequest.aRequestType == REQUEST_CONVERSION ) {
+ Reference< XStorable > xStorable( xDoc, UNO_QUERY );
+ if ( xStorable.is() ) {
+ rtl::OUString aParam = aDispatchRequest.aPrinterName;
+ sal_Int32 nPathIndex = aParam.lastIndexOfAsciiL( ";", 1 );
+ sal_Int32 nFilterIndex = aParam.indexOfAsciiL( ":", 1 );
+ if( nPathIndex < nFilterIndex )
+ nFilterIndex = -1;
+ rtl::OUString aFilterOut=aParam.copy( nPathIndex+1 );
+ rtl::OUString aFilter;
+ rtl::OUString aFilterExt;
+ sal_Bool bGuess = sal_False;
+
+ if( nFilterIndex >= 0 )
+ {
+ aFilter = aParam.copy( nFilterIndex+1, nPathIndex-nFilterIndex-1 );
+ aFilterExt = aParam.copy( 0, nFilterIndex );
+ }
+ else
+ {
+ // Guess
+ bGuess = sal_True;
+ aFilterExt = aParam.copy( 0, nPathIndex );
+ }
+ INetURLObject aOutFilename( aObj );
+ aOutFilename.SetExtension( aFilterExt );
+ FileBase::getFileURLFromSystemPath( aFilterOut, aFilterOut );
+ rtl::OUString aOutFile = aFilterOut+
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ))+
+ aOutFilename.getName();
+
+ if ( bGuess )
+ {
+ aFilter = impl_GuessFilter( aName, aOutFile );
+ }
+
+ Sequence<PropertyValue> conversionProperties( 2 );
+ conversionProperties[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Overwrite" ));
+ conversionProperties[0].Value <<= sal_True;
+
+ conversionProperties[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" ));
+ conversionProperties[1].Value <<= aFilter;
+
+ rtl::OUString aTempName;
+ FileBase::getSystemPathFromFileURL( aName, aTempName );
+ rtl::OString aSource8 = ::rtl::OUStringToOString ( aTempName, RTL_TEXTENCODING_UTF8 );
+ FileBase::getSystemPathFromFileURL( aOutFile, aTempName );
+ rtl::OString aTargetURL8 = ::rtl::OUStringToOString(aTempName, RTL_TEXTENCODING_UTF8 );
+ printf("convert %s -> %s using %s\n", aSource8.getStr(), aTargetURL8.getStr(),
+ ::rtl::OUStringToOString( aFilter, RTL_TEXTENCODING_UTF8 ).getStr());
+ if( FStatHelper::IsDocument(aOutFile) )
+ printf("Overwriting: %s\n",::rtl::OUStringToOString( aTempName, RTL_TEXTENCODING_UTF8 ).getStr() );
+ try
+ {
+ xStorable->storeToURL( aOutFile, conversionProperties );
+ }
+ catch ( Exception& )
+ {
+ fprintf( stderr, "Error: Please reverify input parameters...\n" );
+ }
+ }
+ } else if ( aDispatchRequest.aRequestType == REQUEST_BATCHPRINT ) {
+ rtl::OUString aParam = aDispatchRequest.aPrinterName;
+ sal_Int32 nPathIndex = aParam.lastIndexOfAsciiL( ";", 1 );
+
+ rtl::OUString aFilterOut;
+ rtl::OUString aPrinterName;
+ if( nPathIndex != -1 )
+ aFilterOut=aParam.copy( nPathIndex+1 );
+ if( nPathIndex != 0 )
+ aPrinterName=aParam.copy( 0, nPathIndex );
+
+ INetURLObject aOutFilename( aObj );
+ aOutFilename.SetExtension( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ps")) );
+ FileBase::getFileURLFromSystemPath( aFilterOut, aFilterOut );
+ rtl::OUString aOutFile = aFilterOut+
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ))+
+ aOutFilename.getName();
+
+ rtl::OUString aTempName;
+ FileBase::getSystemPathFromFileURL( aName, aTempName );
+ rtl::OString aSource8 = ::rtl::OUStringToOString ( aTempName, RTL_TEXTENCODING_UTF8 );
+ FileBase::getSystemPathFromFileURL( aOutFile, aTempName );
+ rtl::OString aTargetURL8 = ::rtl::OUStringToOString(aTempName, RTL_TEXTENCODING_UTF8 );
+ printf("print %s -> %s using %s\n", aSource8.getStr(), aTargetURL8.getStr(),
+ aPrinterName.getLength() ?
+ ::rtl::OUStringToOString( aPrinterName, RTL_TEXTENCODING_UTF8 ).getStr() : "<default_printer>");
+
+ // create the custom printer, if given
+ Sequence < PropertyValue > aPrinterArgs( 1 );
+ if( aPrinterName.getLength() )
+ {
+ aPrinterArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"));
+ aPrinterArgs[0].Value <<= aPrinterName;
+ xDoc->setPrinter( aPrinterArgs );
+ }
+
+ // print ( also without user interaction )
+ aPrinterArgs.realloc(2);
+ aPrinterArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FileName"));
+ aPrinterArgs[0].Value <<= aOutFile;
+ aPrinterArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wait"));
+ aPrinterArgs[1].Value <<= ( sal_Bool ) sal_True;
+ xDoc->print( aPrinterArgs );
+ } else {
+ if ( aDispatchRequest.aRequestType == REQUEST_PRINTTO )
+ {
+ // create the printer
+ Sequence < PropertyValue > aPrinterArgs( 1 );
+ aPrinterArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"));
+ aPrinterArgs[0].Value <<= ::rtl::OUString( aDispatchRequest.aPrinterName );
+ xDoc->setPrinter( aPrinterArgs );
+ }
+
+ // print ( also without user interaction )
Sequence < PropertyValue > aPrinterArgs( 1 );
- aPrinterArgs[0].Name = ::rtl::OUString::createFromAscii("Name");
- aPrinterArgs[0].Value <<= ::rtl::OUString( aDispatchRequest.aPrinterName );
- xDoc->setPrinter( aPrinterArgs );
+ aPrinterArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wait"));
+ aPrinterArgs[0].Value <<= ( sal_Bool ) sal_True;
+ xDoc->print( aPrinterArgs );
}
-
- // print ( also without user interaction )
- Sequence < PropertyValue > aPrinterArgs( 1 );
- aPrinterArgs[0].Name = ::rtl::OUString::createFromAscii("Wait");
- aPrinterArgs[0].Value <<= ( sal_Bool ) sal_True;
- xDoc->print( aPrinterArgs );
}
else
{
@@ -412,9 +577,9 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
{
// Execute all asynchronous dispatches now after we placed them into our request container!
Sequence < PropertyValue > aArgs( 2 );
- aArgs[0].Name = ::rtl::OUString::createFromAscii("Referer");
- aArgs[0].Value <<= ::rtl::OUString::createFromAscii("private:OpenEvent");
- aArgs[1].Name = ::rtl::OUString::createFromAscii("SynchronMode");
+ aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Referer"));
+ aArgs[0].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:OpenEvent"));
+ aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SynchronMode"));
aArgs[1].Value <<= sal_True;
for ( sal_uInt32 n = 0; n < aDispatches.size(); n++ )
@@ -445,7 +610,6 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
// We have to check if we have an open task otherwise we have to shutdown the office.
Reference< XFramesSupplier > xTasksSupplier( xDesktop, UNO_QUERY );
aGuard.clear();
-
Reference< XElementAccess > xList( xTasksSupplier->getFrames(), UNO_QUERY );
if ( !xList->hasElements() )
@@ -470,21 +634,9 @@ throw(::com::sun::star::uno::RuntimeException)
void SAL_CALL DispatchWatcher::dispatchFinished( const DispatchResultEvent& ) throw( RuntimeException )
{
osl::ClearableMutexGuard aGuard( GetMutex() );
- sal_Int16 nCount = --m_nRequestCount;
+ sal_Int16 nCount = m_nRequestCount;
aGuard.clear();
OfficeIPCThread::RequestsCompleted( 1 );
-/*
- // Find request in our hash map and remove it as a pending request
- DispatchWatcherHashMap::iterator pDispatchEntry = m_aRequestContainer.find( rEvent.FeatureURL.Complete ) ;
- if ( pDispatchEntry != m_aRequestContainer.end() )
- {
- m_aRequestContainer.erase( pDispatchEntry );
- aGuard.clear();
- OfficeIPCThread::RequestsCompleted( 1 );
- }
- else
- aGuard.clear();
-*/
if ( !nCount && !OfficeIPCThread::AreRequestsPending() )
{
// We have to check if we have an open task otherwise we have to shutdown the office.
@@ -512,3 +664,4 @@ void SAL_CALL DispatchWatcher::dispatchFinished( const DispatchResultEvent& ) th
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/dispatchwatcher.hxx b/desktop/source/app/dispatchwatcher.hxx
index f7de7ae0df..6dc2d9362c 100644
--- a/desktop/source/app/dispatchwatcher.hxx
+++ b/desktop/source/app/dispatchwatcher.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -75,7 +76,10 @@ class DispatchWatcher : public ::cppu::WeakImplHelper1< ::com::sun::star::frame:
REQUEST_PRINT,
REQUEST_PRINTTO,
REQUEST_FORCEOPEN,
- REQUEST_FORCENEW
+ REQUEST_FORCENEW,
+ REQUEST_CONVERSION,
+ REQUEST_INFILTER,
+ REQUEST_BATCHPRINT
};
struct DispatchRequest
@@ -86,7 +90,7 @@ class DispatchWatcher : public ::cppu::WeakImplHelper1< ::com::sun::star::frame:
RequestType aRequestType;
rtl::OUString aURL;
boost::optional< rtl::OUString > aCwdUrl;
- rtl::OUString aPrinterName;
+ rtl::OUString aPrinterName; // also conversion params
rtl::OUString aPreselectedFactory;
};
@@ -122,3 +126,5 @@ class DispatchWatcher : public ::cppu::WeakImplHelper1< ::com::sun::star::frame:
}
#endif // _DESKTOP_DISPATCHWATCHER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx
index bf6bb8cc6c..cf5dfcf0e4 100644
--- a/desktop/source/app/langselect.cxx
+++ b/desktop/source/app/langselect.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -146,7 +147,7 @@ bool LanguageSelection::prepareLanguage()
try
{
Reference< XPropertySet > xProp(getConfigAccess("org.openoffice.System/L10N/", sal_False), UNO_QUERY_THROW);
- Any aWin16SysLocale = xProp->getPropertyValue(OUString::createFromAscii("SystemLocale"));
+ Any aWin16SysLocale = xProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("SystemLocale")));
::rtl::OUString sWin16SysLocale;
aWin16SysLocale >>= sWin16SysLocale;
if( sWin16SysLocale.getLength())
@@ -370,12 +371,12 @@ Reference< XNameAccess > LanguageSelection::getConfigAccess(const sal_Char* pPat
{
Reference< XNameAccess > xNameAccess;
try{
- OUString sConfigSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider");
+ OUString sConfigSrvc(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"));
OUString sAccessSrvc;
if (bUpdate)
- sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationUpdateAccess");
+ sAccessSrvc = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationUpdateAccess"));
else
- sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess");
+ sAccessSrvc = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess"));
OUString sConfigURL = OUString::createFromAscii(pPath);
@@ -415,7 +416,7 @@ Sequence< OUString > LanguageSelection::getInstalledLanguages()
static Sequence< OUString > _getFallbackLocales(const OUString& aIsoLang)
{
Sequence< OUString > seqFallbacks;
- if (aIsoLang.equalsAscii("zh-HK")) {
+ if (aIsoLang.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("zh-HK"))) {
seqFallbacks = Sequence< OUString >(1);
seqFallbacks[0] = OUString::createFromAscii("zh-TW");
}
@@ -489,7 +490,7 @@ OUString LanguageSelection::getUserLanguage()
{
try
{
- xAccess->getByName(OUString::createFromAscii("UILocale")) >>= aUserLanguage;
+ xAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("UILocale"))) >>= aUserLanguage;
}
catch ( NoSuchElementException const & )
{
@@ -513,7 +514,7 @@ OUString LanguageSelection::getSystemLanguage()
{
try
{
- xAccess->getByName(OUString::createFromAscii("UILocale")) >>= aUserLanguage;
+ xAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("UILocale"))) >>= aUserLanguage;
}
catch ( NoSuchElementException const & )
{
@@ -535,7 +536,7 @@ void LanguageSelection::resetUserLanguage()
try
{
Reference< XPropertySet > xProp(getConfigAccess("org.openoffice.Office.Linguistic/General", sal_True), UNO_QUERY_THROW);
- xProp->setPropertyValue(OUString::createFromAscii("UILocale"), makeAny(OUString::createFromAscii("")));
+ xProp->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("UILocale")), makeAny(OUString()));
Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges();
}
catch ( PropertyVetoException& )
@@ -556,3 +557,5 @@ LanguageSelection::LanguageSelectionStatus LanguageSelection::getStatus()
}
} // namespace desktop
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/langselect.hxx b/desktop/source/app/langselect.hxx
index cc1400bc6a..6db4f5bc24 100644
--- a/desktop/source/app/langselect.hxx
+++ b/desktop/source/app/langselect.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,3 +73,5 @@ private:
};
} //namespace desktop
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/lockfile.cxx b/desktop/source/app/lockfile.cxx
index 099412c133..79c8bca1c2 100644
--- a/desktop/source/app/lockfile.cxx
+++ b/desktop/source/app/lockfile.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,6 +34,8 @@
#include <tools/prewin.h>
#include <windows.h>
#include <tools/postwin.h>
+#else
+#include <unistd.h>
#endif
#include <sal/types.h>
#include <osl/file.hxx>
@@ -50,25 +53,38 @@ using namespace ::rtl;
using namespace ::utl;
-namespace desktop {
+static rtl::OString impl_getHostname()
+{
+ rtl::OString aHost;
+#ifdef WNT
+ /*
+ prevent windows from connecting to the net to get it's own
+ hostname by using the netbios name
+ */
+ sal_Int32 sz = MAX_COMPUTERNAME_LENGTH + 1;
+ char* szHost = new char[sz];
+ if (GetComputerName(szHost, (LPDWORD)&sz))
+ aHost = OString(szHost);
+ else
+ aHost = OString("UNKNOWN");
+ delete[] szHost;
+#else
+ /* Don't do dns lookup on Linux either */
+ sal_Char pHostName[1024];
+
+ if ( gethostname( pHostName, sizeof( pHostName ) - 1 ) == 0 )
+ {
+ pHostName[sizeof( pHostName ) - 1] = '\0';
+ aHost = OString( pHostName );
+ }
+ else
+ aHost = OString("UNKNOWN");
+#endif
+
+ return aHost;
+}
- // initialize static members...
- // lock suffix
- const OUString Lockfile::Suffix()
- { return OUString::createFromAscii( "/.lock" ); }
- // values for datafile
- const ByteString Lockfile::Group()
- { return ByteString( "Lockdata" ); }
- const ByteString Lockfile::Userkey()
- { return ByteString( "User" ); }
- const ByteString Lockfile::Hostkey()
- { return ByteString( "Host" ); }
- const ByteString Lockfile::Stampkey()
- { return ByteString( "Stamp" ); }
- const ByteString Lockfile::Timekey()
- { return ByteString( "Time" ); }
- const ByteString Lockfile::IPCkey()
- { return ByteString( "IPCServer" ); }
+namespace desktop {
Lockfile::Lockfile( bool bIPCserver )
:m_bIPCserver(bIPCserver)
@@ -78,7 +94,7 @@ namespace desktop {
// build the file-url to use for the lock
OUString aUserPath;
utl::Bootstrap::locateUserInstallation( aUserPath );
- m_aLockname = aUserPath + Suffix();
+ m_aLockname = aUserPath + LOCKFILE_SUFFIX;
// generate ID
const int nIdBytes = 16;
@@ -105,7 +121,7 @@ namespace desktop {
// try to create file
File aFile(m_aLockname);
- if (aFile.open( OpenFlag_Create ) == File::E_EXIST) {
+ if (aFile.open( osl_File_OpenFlag_Create ) == File::E_EXIST) {
m_bIsLocked = sal_True;
} else {
// new lock created
@@ -125,7 +141,7 @@ namespace desktop {
// remove file and create new
File::remove( m_aLockname );
File aFile(m_aLockname);
- aFile.open( OpenFlag_Create );
+ aFile.open( osl_File_OpenFlag_Create );
aFile.close( );
syncToFile( );
m_bRemove = sal_True;
@@ -148,38 +164,22 @@ namespace desktop {
// to assume that it is a stale lockfile which can be overwritten
String aLockname = m_aLockname;
Config aConfig(aLockname);
- aConfig.SetGroup(Group());
- ByteString aIPCserver = aConfig.ReadKey( IPCkey() );
- if (! aIPCserver.EqualsIgnoreCaseAscii( "true" ))
+ aConfig.SetGroup(LOCKFILE_GROUP);
+ rtl::OString aIPCserver = aConfig.ReadKey( LOCKFILE_IPCKEY );
+ if (!aIPCserver.equalsIgnoreAsciiCase(rtl::OString("true")))
return false;
- ByteString aHost = aConfig.ReadKey( Hostkey() );
- ByteString aUser = aConfig.ReadKey( Userkey() );
+ rtl::OString aHost = aConfig.ReadKey( LOCKFILE_HOSTKEY );
+ rtl::OString aUser = aConfig.ReadKey( LOCKFILE_USERKEY );
+
// lockfile from same host?
- ByteString myHost;
-#ifdef WNT
- /*
- prevent windows from connecting to the net to get it's own
- hostname by using the netbios name
- */
- sal_Int32 sz = MAX_COMPUTERNAME_LENGTH + 1;
- char* szHost = new char[sz];
- if (GetComputerName(szHost, (LPDWORD)&sz))
- myHost = OString(szHost);
- else
- myHost = OString("UNKNOWN");
- delete[] szHost;
-#else
- oslSocketResult sRes;
- myHost = OUStringToOString(
- SocketAddr::getLocalHostname( &sRes ), RTL_TEXTENCODING_ASCII_US );
-#endif
+ rtl::OString myHost( impl_getHostname() );
if (aHost == myHost) {
// lockfile by same UID
OUString myUserName;
Security aSecurity;
aSecurity.getUserName( myUserName );
- ByteString myUser = OUStringToOString( myUserName, RTL_TEXTENCODING_ASCII_US );
+ rtl::OString myUser(rtl::OUStringToOString(myUserName, RTL_TEXTENCODING_ASCII_US));
if (aUser == myUser)
return sal_True;
}
@@ -190,42 +190,25 @@ namespace desktop {
{
String aLockname = m_aLockname;
Config aConfig(aLockname);
- aConfig.SetGroup(Group());
+ aConfig.SetGroup(LOCKFILE_GROUP);
// get information
- ByteString aHost;
-#ifdef WNT
- /*
- prevent windows from connecting to the net to get it's own
- hostname by using the netbios name
- */
- sal_Int32 sz = MAX_COMPUTERNAME_LENGTH + 1;
- char* szHost = new char[sz];
- if (GetComputerName(szHost, (LPDWORD)&sz))
- aHost = OString(szHost);
- else
- aHost = OString("UNKNOWN");
- delete[] szHost;
-#else
- oslSocketResult sRes;
- aHost = OUStringToOString(
- SocketAddr::getLocalHostname( &sRes ), RTL_TEXTENCODING_ASCII_US );
-#endif
+ rtl::OString aHost( impl_getHostname() );
OUString aUserName;
Security aSecurity;
aSecurity.getUserName( aUserName );
- ByteString aUser = OUStringToOString( aUserName, RTL_TEXTENCODING_ASCII_US );
- ByteString aTime = OUStringToOString( m_aDate, RTL_TEXTENCODING_ASCII_US );
- ByteString aStamp = OUStringToOString( m_aId, RTL_TEXTENCODING_ASCII_US );
+ rtl::OString aUser = OUStringToOString( aUserName, RTL_TEXTENCODING_ASCII_US );
+ rtl::OString aTime = OUStringToOString( m_aDate, RTL_TEXTENCODING_ASCII_US );
+ rtl::OString aStamp = OUStringToOString( m_aId, RTL_TEXTENCODING_ASCII_US );
// write information
- aConfig.WriteKey( Userkey(), aUser );
- aConfig.WriteKey( Hostkey(), aHost );
- aConfig.WriteKey( Stampkey(), aStamp );
- aConfig.WriteKey( Timekey(), aTime );
+ aConfig.WriteKey( LOCKFILE_USERKEY, aUser );
+ aConfig.WriteKey( LOCKFILE_HOSTKEY, aHost );
+ aConfig.WriteKey( LOCKFILE_STAMPKEY, aStamp );
+ aConfig.WriteKey( LOCKFILE_TIMEKEY, aTime );
aConfig.WriteKey(
- IPCkey(),
- m_bIPCserver ? ByteString("true") : ByteString("false") );
+ LOCKFILE_IPCKEY,
+ m_bIPCserver ? rtl::OString("true") : rtl::OString("false") );
aConfig.Flush( );
}
@@ -254,3 +237,4 @@ namespace desktop {
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/lockfile.hxx b/desktop/source/app/lockfile.hxx
index ad971cac00..0d286e13ca 100644
--- a/desktop/source/app/lockfile.hxx
+++ b/desktop/source/app/lockfile.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,6 +46,14 @@
class ByteString;
+#define LOCKFILE_SUFFIX rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/.lock" ) )
+#define LOCKFILE_GROUP ByteString( "Lockdata" )
+#define LOCKFILE_USERKEY ByteString( "User" )
+#define LOCKFILE_HOSTKEY ByteString( "Host" )
+#define LOCKFILE_STAMPKEY ByteString( "Stamp" )
+#define LOCKFILE_TIMEKEY ByteString( "Time" )
+#define LOCKFILE_IPCKEY ByteString( "IPCServer" )
+
namespace desktop {
class Lockfile;
@@ -71,15 +80,6 @@ namespace desktop {
~Lockfile(void);
private:
- // data in lockfile
- static const ByteString Group();
- static const ByteString Userkey();
- static const ByteString Hostkey();
- static const ByteString Stampkey();
- static const ByteString Timekey();
- static const ByteString IPCkey();
- // lockfilename
- static const rtl::OUString Suffix();
bool m_bIPCserver;
// full qualified name (file://-url) of the lockfile
rtl::OUString m_aLockname;
@@ -97,3 +97,5 @@ namespace desktop {
};
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/lockfile2.cxx b/desktop/source/app/lockfile2.cxx
index fdeb99f630..9f61c563fd 100644
--- a/desktop/source/app/lockfile2.cxx
+++ b/desktop/source/app/lockfile2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -42,11 +43,11 @@ bool Lockfile_execWarning( Lockfile * that )
// read information from lock
String aLockname = that->m_aLockname;
Config aConfig(aLockname);
- aConfig.SetGroup(that->Group());
- ByteString aHost = aConfig.ReadKey( that->Hostkey() );
- ByteString aUser = aConfig.ReadKey( that->Userkey() );
- ByteString aStamp = aConfig.ReadKey( that->Stampkey() );
- ByteString aTime = aConfig.ReadKey( that->Timekey() );
+ aConfig.SetGroup( LOCKFILE_GROUP );
+ ByteString aHost = aConfig.ReadKey( LOCKFILE_HOSTKEY );
+ ByteString aUser = aConfig.ReadKey( LOCKFILE_USERKEY );
+ ByteString aStamp = aConfig.ReadKey( LOCKFILE_STAMPKEY );
+ ByteString aTime = aConfig.ReadKey( LOCKFILE_TIMEKEY );
// display warning and return response
QueryBox aBox( NULL, DesktopResId( QBX_USERDATALOCKED ) );
@@ -68,3 +69,4 @@ bool Lockfile_execWarning( Lockfile * that )
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/main.c b/desktop/source/app/main.c
index 2705326c3e..198e42a0ca 100644
--- a/desktop/source/app/main.c
+++ b/desktop/source/app/main.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,3 +35,5 @@
SAL_IMPLEMENT_MAIN() {
return soffice_main();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/makefile.mk b/desktop/source/app/makefile.mk
index 085d8520e7..c73f72e2f2 100644
--- a/desktop/source/app/makefile.mk
+++ b/desktop/source/app/makefile.mk
@@ -91,7 +91,7 @@ SHL1STDLIBS = \
$(UCBHELPERLIB) \
$(UNOTOOLSLIB) \
$(VCLLIB) \
- $(VOSLIB)
+
SHL1VERSIONMAP = version.map
SHL1IMPLIB = i$(SHL1TARGET)
DEF1NAME = $(SHL1TARGET)
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 5f7e4be8c7..bcf0bba78f 100644
--- a/desktop/source/app/officeipcthread.cxx
+++ b/desktop/source/app/officeipcthread.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,7 @@
#include "dispatchwatcher.hxx"
#include <memory>
#include <stdio.h>
-#include <vos/process.hxx>
+#include <osl/process.h>
#include <unotools/bootstrap.hxx>
#include <vcl/svapp.hxx>
#include <vcl/help.hxx>
@@ -48,11 +49,10 @@
#include <rtl/bootstrap.hxx>
#include <rtl/strbuf.hxx>
#include <comphelper/processfactory.hxx>
-#include "osl/file.hxx"
+#include <osl/file.hxx>
#include "rtl/process.h"
#include "tools/getprocessworkingdir.hxx"
-using namespace vos;
using namespace rtl;
using namespace desktop;
using namespace ::com::sun::star::uno;
@@ -219,14 +219,17 @@ bool addArgument(
}
OfficeIPCThread* OfficeIPCThread::pGlobalOfficeIPCThread = 0;
-namespace { struct Security : public rtl::Static<OSecurity, Security> {}; }
+ namespace { struct Security : public rtl::Static<osl::Security, Security> {}; }
::osl::Mutex* OfficeIPCThread::pOfficeIPCThreadMutex = 0;
-
+// Turns a string in aMsg such as file:///home/foo/.libreoffice/3
+// Into a hex string of well known length ff132a86...
String CreateMD5FromString( const OUString& aMsg )
{
- // PRE: aStr "file"
- // BACK: Str "ababab....0f" Hexcode String
+#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL
+ fprintf (stderr, "create md5 frim '%s'\n",
+ (const sal_Char *)rtl::OUStringToOString (aMsg, RTL_TEXTENCODING_UTF8));
+#endif
rtlDigest handle = rtl_digest_create( rtl_Digest_AlgorithmMD5 );
if ( handle > 0 )
@@ -291,11 +294,11 @@ void ImplPostProcessDocumentsEvent( ProcessDocumentsRequest* pEvent )
Application::PostUserEvent( STATIC_LINK( NULL, ProcessEventsClass_Impl, ProcessDocumentsEvent ), pEvent );
}
-OSignalHandler::TSignalAction SAL_CALL SalMainPipeExchangeSignalHandler::signal(TSignalInfo *pInfo)
+oslSignalAction SAL_CALL SalMainPipeExchangeSignal_impl(void* /*pData*/, oslSignalInfo* pInfo)
{
if( pInfo->Signal == osl_Signal_Terminate )
OfficeIPCThread::DisableOfficeIPCThread();
- return (TAction_CallNextHandler);
+ return osl_Signal_ActCallNextHdl;
}
// ----------------------------------------------------------------------------
@@ -433,7 +436,6 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
::rtl::OUString aUserInstallPath;
::rtl::OUString aDummy;
- ::vos::OStartupInfo aInfo;
OfficeIPCThread* pThread = new OfficeIPCThread;
pThread->maPipeIdent = OUString( RTL_CONSTASCII_USTRINGPARAM( "SingleOfficeIPC_" ) );
@@ -456,8 +458,9 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
// and connectPipe!!
OUString aIniName;
-
- aInfo.getExecutableFile( aIniName );
+
+ osl_getExecutableFile( &aIniName.pData );
+
sal_uInt32 lastIndex = aIniName.lastIndexOf('/');
if ( lastIndex > 0 )
{
@@ -469,18 +472,18 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
aIniName += OUString( RTL_CONSTASCII_USTRINGPARAM( "rc" ));
#endif
}
-
+
::rtl::Bootstrap aPerfTuneIniFile( aIniName );
-
+
OUString aDefault( RTL_CONSTASCII_USTRINGPARAM( "0" ));
OUString aPreloadData;
-
+
aPerfTuneIniFile.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "FastPipeCommunication" )), aPreloadData, aDefault );
OUString aUserInstallPathHashCode;
- if ( aPreloadData.equalsAscii( "1" ))
+ if ( aPreloadData.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "1" ) ))
{
sal_Char szBuffer[32];
sprintf( szBuffer, "%d", SUPD );
@@ -488,7 +491,7 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
}
else
aUserInstallPathHashCode = CreateMD5FromString( aDummy );
-
+
// Check result to create a hash code from the user install path
if ( aUserInstallPathHashCode.getLength() == 0 )
@@ -499,22 +502,22 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
PipeMode nPipeMode = PIPEMODE_DONTKNOW;
do
{
- OSecurity &rSecurity = Security::get();
+ osl::Security &rSecurity = Security::get();
// Try to create pipe
- if ( pThread->maPipe.create( pThread->maPipeIdent.getStr(), OPipe::TOption_Create, rSecurity ))
+ if ( pThread->maPipe.create( pThread->maPipeIdent.getStr(), osl_Pipe_CREATE, rSecurity ))
{
// Pipe created
nPipeMode = PIPEMODE_CREATED;
}
- else if( pThread->maPipe.create( pThread->maPipeIdent.getStr(), OPipe::TOption_Open, rSecurity )) // Creation not successfull, now we try to connect
+ else if( pThread->maPipe.create( pThread->maPipeIdent.getStr(), osl_Pipe_OPEN, rSecurity )) // Creation not successfull, now we try to connect
{
// Pipe connected to first office
nPipeMode = PIPEMODE_CONNECTED;
}
else
{
- OPipe::TPipeError eReason = pThread->maPipe.getError();
- if ((eReason == OPipe::E_ConnectionRefused) || (eReason == OPipe::E_invalidError))
+ oslPipeError eReason = pThread->maPipe.getError();
+ if ((eReason == osl_Pipe_E_ConnectionRefused) || (eReason == osl_Pipe_E_invalidError))
return IPC_STATUS_BOOTSTRAP_ERROR;
// Wait for second office to be ready
@@ -535,12 +538,11 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
else
{
// Seems another office is running. Pipe arguments to it and self terminate
- pThread->maStreamPipe = pThread->maPipe;
+ osl::StreamPipe aStreamPipe(pThread->maPipe.getHandle());
- sal_Bool bWaitBeforeClose = sal_False;
ByteString aArguments(RTL_CONSTASCII_STRINGPARAM(ARGUMENT_PREFIX));
rtl::OUString cwdUrl;
- if (!(tools::getProcessWorkingDir(&cwdUrl) &&
+ if (!(tools::getProcessWorkingDir(cwdUrl) &&
addArgument(&aArguments, '1', cwdUrl)))
{
aArguments += '0';
@@ -549,22 +551,18 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
for( sal_uInt32 i=0; i < nCount; i++ )
{
rtl_getAppCommandArg( i, &aDummy.pData );
- if( aDummy.indexOf('-',0) != 0 )
- {
- bWaitBeforeClose = sal_True;
- }
if (!addArgument(&aArguments, ',', aDummy)) {
return IPC_STATUS_BOOTSTRAP_ERROR;
}
}
// finaly, write the string onto the pipe
- pThread->maStreamPipe.write( aArguments.GetBuffer(), aArguments.Len() );
- pThread->maStreamPipe.write( "\0", 1 );
+ aStreamPipe.write( aArguments.GetBuffer(), aArguments.Len() );
+ aStreamPipe.write( "\0", 1 );
// wait for confirmation #95361# #95425#
ByteString aToken(sc_aConfirmationSequence);
char *aReceiveBuffer = new char[aToken.Len()+1];
- int n = pThread->maStreamPipe.read( aReceiveBuffer, aToken.Len() );
+ int n = aStreamPipe.read( aReceiveBuffer, aToken.Len() );
aReceiveBuffer[n]='\0';
delete pThread;
@@ -593,15 +591,15 @@ void OfficeIPCThread::DisableOfficeIPCThread()
// send thread a termination message
// this is done so the subsequent join will not hang
// because the thread hangs in accept of pipe
- OPipe Pipe( pOfficeIPCThread->maPipeIdent, OPipe::TOption_Open, Security::get() );
+ osl::StreamPipe aPipe ( pOfficeIPCThread->maPipeIdent, osl_Pipe_OPEN, Security::get() );
//Pipe.send( TERMINATION_SEQUENCE, TERMINATION_LENGTH );
- if (Pipe.isValid())
+ if (aPipe.is())
{
- Pipe.send( sc_aTerminationSequence, sc_nTSeqLength+1 ); // also send 0-byte
+ aPipe.send( sc_aTerminationSequence, sc_nTSeqLength+1 ); // also send 0-byte
// close the pipe so that the streampipe on the other
// side produces EOF
- Pipe.close();
+ aPipe.close();
}
// release mutex to avoid deadlocks
@@ -656,11 +654,10 @@ void SAL_CALL OfficeIPCThread::run()
{
do
{
- OPipe::TPipeError
- nError = maPipe.accept( maStreamPipe );
+ oslPipeError nError = maPipe.accept( maStreamPipe );
- if( nError == OStreamPipe::E_None )
+ if( nError == osl_Pipe_E_None )
{
// #111143# and others:
@@ -726,14 +723,12 @@ void SAL_CALL OfficeIPCThread::run()
}
// handle request for acceptor
- sal_Bool bAcceptorRequest = sal_False;
OUString aAcceptString;
if ( aCmdLineArgs->GetAcceptString(aAcceptString) && Desktop::CheckOEM()) {
ApplicationEvent* pAppEvent =
new ApplicationEvent( aEmpty, aEmpty,
"ACCEPT", aAcceptString );
ImplPostForeignAppEvent( pAppEvent );
- bAcceptorRequest = sal_True;
}
// handle acceptor removal
OUString aUnAcceptString;
@@ -742,7 +737,6 @@ void SAL_CALL OfficeIPCThread::run()
new ApplicationEvent( aEmpty, aEmpty,
"UNACCEPT", aUnAcceptString );
ImplPostForeignAppEvent( pAppEvent );
- bAcceptorRequest = sal_True;
}
#ifndef UNX
@@ -904,9 +898,6 @@ void SAL_CALL OfficeIPCThread::run()
while (
(nResult = maStreamPipe.send(sc_aConfirmationSequence+nBytes, sc_nCSeqLength-nBytes))>0 &&
((nBytes += nResult) < sc_nCSeqLength) ) ;
- // now we can close, don't we?
- // maStreamPipe.close();
-
}
else
{
@@ -916,7 +907,7 @@ void SAL_CALL OfficeIPCThread::run()
TimeValue tval;
tval.Seconds = 1;
tval.Nanosec = 0;
- sleep( tval );
+ wait( tval );
}
} while( schedule() );
}
@@ -943,6 +934,62 @@ static void AddToDispatchList(
}
}
+static void AddConversionsToDispatchList(
+ DispatchWatcher::DispatchList& rDispatchList,
+ boost::optional< rtl::OUString > const & cwdUrl,
+ const OUString& rRequestList,
+ const OUString& rParam,
+ const OUString& rPrinterName,
+ const OUString& rFactory,
+ const OUString& rParamOut )
+{
+ DispatchWatcher::RequestType nType;
+ OUString aParam( rParam );
+
+ if( rParam.getLength() )
+ {
+ nType = DispatchWatcher::REQUEST_CONVERSION;
+ aParam = rParam;
+ }
+ else
+ {
+ nType = DispatchWatcher::REQUEST_BATCHPRINT;
+ aParam = rPrinterName;
+ }
+
+ OUString aOutDir( rParamOut.trim() );
+ ::rtl::OUString aPWD;
+ ::tools::getProcessWorkingDir( aPWD );
+
+ if( !::osl::FileBase::getAbsoluteFileURL( aPWD, rParamOut, aOutDir ) )
+ ::osl::FileBase::getSystemPathFromFileURL( aOutDir, aOutDir );
+
+ if( rParamOut.trim().getLength() )
+ {
+ aParam += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(";"));
+ aParam += aOutDir;
+ }
+ else
+ {
+ ::osl::FileBase::getSystemPathFromFileURL( aPWD, aPWD );
+ aParam += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ";" )) + aPWD;
+ }
+
+ if ( rRequestList.getLength() > 0 )
+ {
+ sal_Int32 nIndex = 0;
+ do
+ {
+ OUString aToken = rRequestList.getToken( 0, APPEVENT_PARAM_DELIMITER, nIndex );
+ if ( aToken.getLength() > 0 )
+ rDispatchList.push_back(
+ DispatchWatcher::DispatchRequest( nType, aToken, cwdUrl, aParam, rFactory ));
+ }
+ while ( nIndex >= 0 );
+ }
+}
+
+
sal_Bool OfficeIPCThread::ExecuteCmdLineRequests( ProcessDocumentsRequest& aRequest )
{
// protect the dispatch list
@@ -952,6 +999,7 @@ sal_Bool OfficeIPCThread::ExecuteCmdLineRequests( ProcessDocumentsRequest& aRequ
rtl::OUString aEmpty;
// Create dispatch list for dispatch watcher
+ AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aInFilter, DispatchWatcher::REQUEST_INFILTER, aEmpty, aRequest.aModule );
AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aOpenList, DispatchWatcher::REQUEST_OPEN, aEmpty, aRequest.aModule );
AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aViewList, DispatchWatcher::REQUEST_VIEW, aEmpty, aRequest.aModule );
AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aStartList, DispatchWatcher::REQUEST_START, aEmpty, aRequest.aModule );
@@ -959,14 +1007,14 @@ sal_Bool OfficeIPCThread::ExecuteCmdLineRequests( ProcessDocumentsRequest& aRequ
AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aPrintToList, DispatchWatcher::REQUEST_PRINTTO, aRequest.aPrinterName, aRequest.aModule );
AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aForceOpenList, DispatchWatcher::REQUEST_FORCEOPEN, aEmpty, aRequest.aModule );
AddToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aForceNewList, DispatchWatcher::REQUEST_FORCENEW, aEmpty, aRequest.aModule );
-
+ AddConversionsToDispatchList( aDispatchList, aRequest.aCwdUrl, aRequest.aConversionList, aRequest.aConversionParams, aRequest.aPrinterName, aRequest.aModule, aRequest.aConversionOut );
sal_Bool bShutdown( sal_False );
if ( pGlobalOfficeIPCThread )
{
if( ! pGlobalOfficeIPCThread->AreRequestsEnabled() )
return bShutdown;
-
+
pGlobalOfficeIPCThread->mnPendingRequests += aDispatchList.size();
if ( !pGlobalOfficeIPCThread->mpDispatchWatcher )
{
@@ -977,7 +1025,7 @@ sal_Bool OfficeIPCThread::ExecuteCmdLineRequests( ProcessDocumentsRequest& aRequ
// copy for execute
DispatchWatcher::DispatchList aTempList( aDispatchList );
aDispatchList.clear();
-
+
aGuard.clear();
// Execute dispatch requests
@@ -992,3 +1040,5 @@ sal_Bool OfficeIPCThread::ExecuteCmdLineRequests( ProcessDocumentsRequest& aRequ
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/officeipcthread.hxx b/desktop/source/app/officeipcthread.hxx
index 92a35a5ff7..f075aec313 100644
--- a/desktop/source/app/officeipcthread.hxx
+++ b/desktop/source/app/officeipcthread.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,24 +31,19 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/frame/XTerminateListener.hpp>
-#include <vos/pipe.hxx>
-#include <vos/security.hxx>
-#include <vos/thread.hxx>
-#include <vos/signal.hxx>
+#include <osl/pipe.hxx>
+#include <osl/security.hxx>
+#include <osl/signal.h>
#include <rtl/ustring.hxx>
-#ifndef _CPPUHELPER_WEAKBASE2_HXX_
#include <cppuhelper/implbase2.hxx>
-#endif
#include <osl/conditn.hxx>
+#include <osl/thread.hxx>
#include "boost/optional.hpp"
namespace desktop
{
-class SalMainPipeExchangeSignalHandler : public vos::OSignalHandler
-{
- virtual TSignalAction SAL_CALL signal(TSignalInfo *pInfo);
-};
+oslSignalAction SAL_CALL SalMainPipeExchangeSignal_impl(void* /*pData*/, oslSignalInfo* pInfo);
// A request for the current office
// that was given by command line or by IPC pipe communication.
@@ -66,18 +62,22 @@ struct ProcessDocumentsRequest
::rtl::OUString aForceNewList; // Documents that should be forced to create a new document
::rtl::OUString aPrinterName; // The printer name that should be used for printing
::rtl::OUString aPrintToList; // Documents that should be printed on the given printer
+ ::rtl::OUString aConversionList;
+ ::rtl::OUString aConversionParams;
+ ::rtl::OUString aConversionOut;
+ ::rtl::OUString aInFilter;
::osl::Condition *pcProcessed; // pointer condition to be set when the request has been processed
};
class DispatchWatcher;
-class OfficeIPCThread : public vos::OThread
+class OfficeIPCThread : public osl::Thread
{
private:
static OfficeIPCThread* pGlobalOfficeIPCThread;
static ::osl::Mutex* pOfficeIPCThreadMutex;
- vos::OPipe maPipe;
- vos::OStreamPipe maStreamPipe;
+ osl::Pipe maPipe;
+ osl::StreamPipe maStreamPipe;
rtl::OUString maPipeIdent;
bool mbDowning;
bool mbRequestsEnabled;
@@ -163,3 +163,5 @@ class OfficeIPCThreadController : public ::cppu::WeakImplHelper2<
}
#endif // _DESKTOP_OFFICEIPCTHREAD_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/omutexmember.hxx b/desktop/source/app/omutexmember.hxx
index 30433c3ccd..4e33e1313d 100644
--- a/desktop/source/app/omutexmember.hxx
+++ b/desktop/source/app/omutexmember.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -59,3 +60,5 @@ struct OMutexMember
};
#endif // #ifndef __FRAMEWORK_OMUTEXMEMBER_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx
index 7b615dcb6e..1e640c58ae 100644
--- a/desktop/source/app/sofficemain.cxx
+++ b/desktop/source/app/sofficemain.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,11 +30,13 @@
#include "precompiled_desktop.hxx"
#include "app.hxx"
+#include "cmdlineargs.hxx"
+#include "cmdlinehelp.hxx"
#include <rtl/logfile.hxx>
#include <tools/extendapplicationenvironment.hxx>
-BOOL SVMain();
+int SVMain();
// -=-= main() -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
@@ -46,7 +49,23 @@ extern "C" int soffice_main()
desktop::Desktop aDesktop;
// This string is used during initialization of the Gtk+ VCL module
aDesktop.SetAppName( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("soffice")) );
- SVMain();
-
- return 0;
+ aDesktop.CreateProcessServiceFactory();
+#ifdef UNX
+ // handle --version and --help already here, otherwise they would be handled
+ // after VCL initialization that might fail if $DISPLAY is not set
+ desktop::CommandLineArgs* pCmdLineArgs = aDesktop.GetCommandLineArgs();
+ if ( pCmdLineArgs->IsHelp() )
+ {
+ desktop::displayCmdlineHelp();
+ return EXIT_SUCCESS;
+ }
+ else if ( pCmdLineArgs->IsVersion() )
+ {
+ desktop::displayVersion();
+ return EXIT_SUCCESS;
+ }
+#endif
+ return SVMain();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/sofficemain.h b/desktop/source/app/sofficemain.h
index 977043ef83..5b07bb4684 100644
--- a/desktop/source/app/sofficemain.h
+++ b/desktop/source/app/sofficemain.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,3 +42,5 @@ int soffice_main(void);
#endif
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/userinstall.cxx b/desktop/source/app/userinstall.cxx
index f72d13834e..d2a37ddf88 100644
--- a/desktop/source/app/userinstall.cxx
+++ b/desktop/source/app/userinstall.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -39,13 +40,10 @@
#include <osl/mutex.hxx>
#include <osl/process.h>
#include <osl/diagnose.h>
-#include <vos/security.hxx>
-#include <vos/ref.hxx>
-#include <vos/process.hxx>
+#include <osl/security.hxx>
+#include <rtl/ref.hxx>
-#ifndef _TOOLS_RESMGR_HXX_
#include <tools/resmgr.hxx>
-#endif
#include <unotools/bootstrap.hxx>
#include <svl/languageoptions.hxx>
#ifndef _SVTOOLS_SYSLOCALEOPTIONSOPTIONS_HXX
@@ -67,7 +65,8 @@
#include "app.hxx"
-using namespace rtl;
+using rtl::OString;
+using rtl::OUString;
using namespace osl;
using namespace utl;
using namespace com::sun::star::container;
@@ -100,11 +99,6 @@ namespace desktop {
theMSF->createInstance(sConfigSrvc), UNO_QUERY_THROW);
// localize the provider to user selection
-// Reference< XLocalizable > localizable(theConfigProvider, UNO_QUERY_THROW);
-// LanguageType aUserLanguageType = LanguageSelection::getLanguageType();
-// Locale aLocale( MsLangId::convertLanguageToIsoString(aUserLanguageType));
-// localizable->setLocale(aLocale);
-
Reference< XLocalizable > localizable(theConfigProvider, UNO_QUERY_THROW);
OUString aUserLanguage = LanguageSelection::getLanguageString();
Locale aLocale = LanguageSelection::IsoStringToLocale(aUserLanguage);
@@ -112,8 +106,8 @@ namespace desktop {
Sequence< Any > theArgs(1);
NamedValue v;
- v.Name = OUString::createFromAscii("NodePath");
- v.Value = makeAny(OUString::createFromAscii("org.openoffice.Setup"));
+ v.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("NodePath"));
+ v.Value = makeAny(OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup")));
theArgs[0] <<= v;
Reference< XHierarchicalNameAccess> hnacc(
theConfigProvider->createInstanceWithArguments(
@@ -205,7 +199,7 @@ namespace desktop {
rtl::OUString itemname = aFileStatus.getFileName();
// append trailing '/' if needed
if (newDstUnqPath.lastIndexOf(sal_Unicode('/')) != newDstUnqPath.getLength()-1)
- newDstUnqPath += rtl::OUString::createFromAscii("/");
+ newDstUnqPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
newDstUnqPath += itemname;
// recursion
err = copy_recursive(newSrcUnqPath, newDstUnqPath);
@@ -246,6 +240,11 @@ namespace desktop {
FileBase::RC rc = Directory::createPath(aUserPath);
if ((rc != FileBase::E_None) && (rc != FileBase::E_EXIST)) return UserInstall::E_Creation;
+#ifdef UNIX
+ // set safer permissions for the user directory by default
+ File::setAttributes(aUserPath, Attribute_OwnWrite| Attribute_OwnRead| Attribute_OwnExe);
+#endif
+
// copy data from shared data directory of base installation
for (sal_Int32 i=0; pszSrcList[i]!=NULL && pszDstList[i]!=NULL; i++)
{
@@ -264,21 +263,19 @@ namespace desktop {
}
try
{
- OUString sConfigSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider");
- OUString sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationUpdateAccess");
+ OUString sConfigSrvc(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"));
+ OUString sAccessSrvc(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationUpdateAccess"));
// get configuration provider
Reference< XMultiServiceFactory > theMSF = comphelper::getProcessServiceFactory();
Reference< XMultiServiceFactory > theConfigProvider = Reference< XMultiServiceFactory >(
theMSF->createInstance(sConfigSrvc), UNO_QUERY_THROW);
Sequence< Any > theArgs(1);
- NamedValue v(OUString::createFromAscii("NodePath"), makeAny(OUString::createFromAscii("org.openoffice.Setup")));
- //v.Name = OUString::createFromAscii("NodePath");
- //v.Value = makeAny(OUString::createFromAscii("org.openoffice.Setup"));
+ NamedValue v(OUString(RTL_CONSTASCII_USTRINGPARAM("NodePath")), makeAny(OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup"))));
theArgs[0] <<= v;
Reference< XHierarchicalPropertySet> hpset(
theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs), UNO_QUERY_THROW);
- hpset->setHierarchicalPropertyValue(OUString::createFromAscii("Office/ooSetupInstCompleted"), makeAny(sal_True));
+ hpset->setHierarchicalPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Office/ooSetupInstCompleted")), makeAny(sal_True));
Reference< XChangesBatch >(hpset, UNO_QUERY_THROW)->commitChanges();
}
catch ( PropertyVetoException& )
@@ -299,3 +296,4 @@ namespace desktop {
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/userinstall.hxx b/desktop/source/app/userinstall.hxx
index 2f6ee193ef..67b4f0081a 100644
--- a/desktop/source/app/userinstall.hxx
+++ b/desktop/source/app/userinstall.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,3 +51,5 @@ public:
static UserInstallError finalize();
};
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/dp_log.cxx b/desktop/source/deployment/dp_log.cxx
index 0f6a26ee88..bb58770c4c 100644
--- a/desktop/source/deployment/dp_log.cxx
+++ b/desktop/source/deployment/dp_log.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -209,3 +210,4 @@ extern sdecl::ServiceDecl const serviceDecl(
} // namespace dp_log
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx
index dc4d8eeb5e..410bb01c1a 100644
--- a/desktop/source/deployment/dp_persmap.cxx
+++ b/desktop/source/deployment/dp_persmap.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -251,3 +252,4 @@ t_string2string_map PersistentMap::getEntries() const
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/dp_services.cxx b/desktop/source/deployment/dp_services.cxx
index db42a215e7..b9a8185b2d 100644
--- a/desktop/source/deployment/dp_services.cxx
+++ b/desktop/source/deployment/dp_services.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113,3 +114,4 @@ void * SAL_CALL component_getFactory(
} // extern "C"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/dp_xml.cxx b/desktop/source/deployment/dp_xml.cxx
index a4d4de1873..52451e4683 100644
--- a/desktop/source/deployment/dp_xml.cxx
+++ b/desktop/source/deployment/dp_xml.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
diff --git a/desktop/source/deployment/gui/descedit.cxx b/desktop/source/deployment/gui/descedit.cxx
index 4898aecc03..0291ce5802 100644
--- a/desktop/source/deployment/gui/descedit.cxx
+++ b/desktop/source/deployment/gui/descedit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -98,3 +99,4 @@ void DescriptionEdit::SetDescription( const String& rDescription )
UpdateScrollBar();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/descedit.hxx b/desktop/source/deployment/gui/descedit.hxx
index 6e98a1233a..27e36e14a0 100644
--- a/desktop/source/deployment/gui/descedit.hxx
+++ b/desktop/source/deployment/gui/descedit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,4 @@ namespace dp_gui
#endif // INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_DESCEDIT_HXX
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui.h b/desktop/source/deployment/gui/dp_gui.h
index 9d7152b4b5..043a86f1af 100644
--- a/desktop/source/deployment/gui/dp_gui.h
+++ b/desktop/source/deployment/gui/dp_gui.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -96,3 +97,5 @@ private:
} // namespace dp_gui
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui.hrc b/desktop/source/deployment/gui/dp_gui.hrc
index 11699bd50e..9c54c17f70 100755
--- a/desktop/source/deployment/gui/dp_gui.hrc
+++ b/desktop/source/deployment/gui/dp_gui.hrc
@@ -35,7 +35,7 @@
#define RID_DLG_EXTENSION_MANAGER RID_DEPLOYMENT_GUI_START
#define RID_DLG_UPDATE_REQUIRED (RID_DEPLOYMENT_GUI_START + 11)
-#define RID_EM_BTN_CLOSE 10
+#define RID_EM_BTN_CLOSE 10
#define RID_EM_BTN_HELP 11
#define RID_EM_BTN_ADD 12
#define RID_EM_BTN_CHECK_UPDATES 13
@@ -57,7 +57,6 @@
#define FL_LICENSE 69
#define FI_LICENSE_ARROW1 60
#define FI_LICENSE_ARROW2 61
-#define IMG_LICENCE_ARROW_HC 62
#define BTN_LICENSE_ACCEPT 63
// local RIDs for "Download and Install" dialog
@@ -123,8 +122,8 @@
#define RID_DLG_UPDATE_BROWSERBASED 25
#define RID_DLG_UPDATE_PUBLISHER_LABEL 26
#define RID_DLG_UPDATE_PUBLISHER_LINK 27
-#define RID_DLG_UPDATE_RELEASENOTES_LABEL 28
-#define RID_DLG_UPDATE_RELEASENOTES_LINK 29
+#define RID_DLG_UPDATE_RELEASENOTES_LABEL 28
+#define RID_DLG_UPDATE_RELEASENOTES_LINK 29
#define RID_DLG_UPDATE_NOUPDATE 30
#define RID_DLG_UPDATE_VERSION 31
#define RID_DLG_UPDATE_IGNORE 32
@@ -138,9 +137,7 @@
#define RID_INFOBOX_UPDATE_SHARED_EXTENSION (RID_DEPLOYMENT_GUI_START + 21)
#define RID_IMG_WARNING (RID_DEPLOYMENT_GUI_START+56)
-#define RID_IMG_WARNING_HC (RID_DEPLOYMENT_GUI_START+57)
#define RID_IMG_LOCKED (RID_DEPLOYMENT_GUI_START+58)
-#define RID_IMG_LOCKED_HC (RID_DEPLOYMENT_GUI_START+59)
#define RID_IMG_EXTENSION (RID_DEPLOYMENT_GUI_START+60)
#define RID_IMG_EXTENSION_HC (RID_DEPLOYMENT_GUI_START+61)
#define RID_IMG_SHARED (RID_DEPLOYMENT_GUI_START+62)
diff --git a/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx b/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx
index d560b3d5a9..c00123fb91 100644
--- a/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx
+++ b/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,3 +73,4 @@ void AutoScrollEdit::Notify( SfxBroadcaster&, const SfxHint& rHint )
} // namespace dp_gui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_autoscrolledit.hxx b/desktop/source/deployment/gui/dp_gui_autoscrolledit.hxx
index 79efac6e4a..ddec1e81ae 100644
--- a/desktop/source/deployment/gui/dp_gui_autoscrolledit.hxx
+++ b/desktop/source/deployment/gui/dp_gui_autoscrolledit.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -49,3 +50,5 @@ public:
} // namespace dp_gui
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_backend.src b/desktop/source/deployment/gui/dp_gui_backend.src
index 343d75df6a..b002bf2408 100644
--- a/desktop/source/deployment/gui/dp_gui_backend.src
+++ b/desktop/source/deployment/gui/dp_gui_backend.src
@@ -33,11 +33,6 @@ Image RID_IMG_DEF_PACKAGE_BUNDLE
ImageBitmap = Bitmap { File = "sx03256.bmp"; };
MASKCOLOR
};
-Image RID_IMG_DEF_PACKAGE_BUNDLE_HC
-{
- ImageBitmap = Bitmap { File = "sxh03256.bmp"; };
- MASKCOLOR
-};
// script, dialog:
Image RID_IMG_SCRIPTLIB
@@ -45,22 +40,12 @@ Image RID_IMG_SCRIPTLIB
ImageBitmap = Bitmap { File = "im30820.bmp"; };
MASKCOLOR
};
-Image RID_IMG_SCRIPTLIB_HC
-{
- ImageBitmap = Bitmap { File = "imh30820.bmp"; };
- MASKCOLOR
-};
Image RID_IMG_DIALOGLIB
{
ImageBitmap = Bitmap { File = "dialogfolder_16.bmp"; };
MASKCOLOR
};
-Image RID_IMG_DIALOGLIB_HC
-{
- ImageBitmap = Bitmap { File = "dialogfolder_16_h.bmp"; };
- MASKCOLOR
-};
// configuration:
Image RID_IMG_CONF_XML
@@ -68,11 +53,6 @@ Image RID_IMG_CONF_XML
ImageBitmap = Bitmap { File = "xml_16.bmp"; };
MASKCOLOR
};
-Image RID_IMG_CONF_XML_HC
-{
- ImageBitmap = Bitmap { File = "xml_16_h.bmp"; };
- MASKCOLOR
-};
// component, typelib:
Image RID_IMG_COMPONENT
@@ -80,52 +60,27 @@ Image RID_IMG_COMPONENT
ImageBitmap = Bitmap { File = "component_16.bmp"; };
MASKCOLOR
};
-Image RID_IMG_COMPONENT_HC
-{
- ImageBitmap = Bitmap { File = "component_16_h.bmp"; };
- MASKCOLOR
-};
Image RID_IMG_JAVA_COMPONENT
{
ImageBitmap = Bitmap { File = "javacomponent_16.bmp"; };
MASKCOLOR
};
-Image RID_IMG_JAVA_COMPONENT_HC
-{
- ImageBitmap = Bitmap { File = "javacomponent_16_h.bmp"; };
- MASKCOLOR
-};
Image RID_IMG_TYPELIB
{
ImageBitmap = Bitmap { File = "library_16.bmp"; };
MASKCOLOR
};
-Image RID_IMG_TYPELIB_HC
-{
- ImageBitmap = Bitmap { File = "library_16_h.bmp"; };
- MASKCOLOR
-};
Image RID_IMG_JAVA_TYPELIB
{
ImageBitmap = Bitmap { File = "javalibrary_16.bmp"; };
MASKCOLOR
};
-Image RID_IMG_JAVA_TYPELIB_HC
-{
- ImageBitmap = Bitmap { File = "javalibrary_16_h.bmp"; };
- MASKCOLOR
-};
Image RID_IMG_HELP
{
ImageBitmap = Bitmap { File = "commandimagelist/sc_helperdialog.bmp"; };
MASKCOLOR
};
-Image RID_IMG_HELP_HC
-{
- ImageBitmap = Bitmap { File = "commandimagelist/sch_helperdialog.bmp"; };
- MASKCOLOR
-};
diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
index 1f34c490ea..694f764d5e 100644
--- a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -84,3 +85,5 @@ void DependencyDialog::Resize() {
(m_list.GetSizePixel().Width() - m_ok.GetSizePixel().Width()) / 2),
m_list.GetPosPixel().Y() + m_list.GetSizePixel().Height() + n));
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx b/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx
index 3d982cd250..72f8334d38 100644
--- a/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,9 +33,7 @@
#include <vector>
#include "tools/gen.hxx"
-#ifndef _SV_BUTTON_HXX
#include "vcl/button.hxx"
-#endif
#include "vcl/dialog.hxx"
#include "vcl/fixed.hxx"
#include "vcl/lstbox.hxx"
@@ -66,3 +65,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_dialog.src b/desktop/source/deployment/gui/dp_gui_dialog.src
index e61994c475..91f9252dfc 100644..100755
--- a/desktop/source/deployment/gui/dp_gui_dialog.src
+++ b/desktop/source/deployment/gui/dp_gui_dialog.src
@@ -4,7 +4,7 @@
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
- * OpenOffice.org - a multi-platform office productivity suite
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* This file is part of OpenOffice.org.
*
@@ -31,27 +31,33 @@ String RID_STR_ADD_PACKAGES
{
Text [ en-US ] = "Add Extension(s)";
};
+
String RID_CTX_ITEM_REMOVE
{
Text [ en-US ] = "~Remove";
};
+
String RID_CTX_ITEM_ENABLE
{
Text [ en-US ] = "~Enable";
};
+
String RID_CTX_ITEM_DISABLE
{
Text [ en-US ] = "~Disable";
};
+
String RID_CTX_ITEM_CHECK_UPDATE
{
Text [ en-US ] = "~Update...";
};
+
String RID_CTX_ITEM_OPTIONS
{
Text [ en-US ] = "~Options...";
};
+
String RID_STR_ADDING_PACKAGES
{
Text [ en-US ] = "Adding %EXTENSION_NAME";
@@ -128,7 +134,7 @@ String RID_STR_SHOW_LICENSE_CMD
// ---------------------------------------------------
// row 1 | multi line edit
// ---------------------------------------------------
-// row 2 | fixed text
+// row 2 | fixed text
// ---------------------------------------------------
// row 3 | img | fixed text | fixed text | button
// ----------------------------------------------------
@@ -136,7 +142,7 @@ String RID_STR_SHOW_LICENSE_CMD
// ---------------------------------------------------
// row 5 |fixed line
// ---------------------------------------------------
-// row 6 | | |button | button
+// row 6 | | |button | button
// ---------------------------------------------------
// | col 1 | col 2 | col3 | col4 | col5
@@ -183,7 +189,6 @@ ModalDialog RID_DLG_LICENSE
Moveable = TRUE;
Closeable = TRUE;
Sizeable = FALSE;
-// Hide = TRUE;
MultiLineEdit ML_LICENSE
{
@@ -194,7 +199,7 @@ ModalDialog RID_DLG_LICENSE
VScroll = TRUE;
ReadOnly = TRUE;
};
-
+
FixedText FT_LICENSE_HEADER
{
Pos = MAP_APPFONT(COL1_X, ROW2_Y);
@@ -202,14 +207,16 @@ ModalDialog RID_DLG_LICENSE
WordBreak = TRUE;
NoLabel = TRUE;
Text [ en-US ] = "Please follow these steps to proceed with the installation of the extension:";
- };
+ };
+
FixedText FT_LICENSE_BODY_1
{
Pos = MAP_APPFONT(COL2_X, ROW3_Y);
Size = MAP_APPFONT( COL2_WIDTH, ROW3_HEIGHT );
NoLabel = TRUE;
Text [ en-US ] = "1.";
- };
+ };
+
//spans col3 + col4
FixedText FT_LICENSE_BODY_1_TXT
{
@@ -218,14 +225,16 @@ ModalDialog RID_DLG_LICENSE
WordBreak = TRUE;
NoLabel = TRUE;
Text [ en-US ] = "Read the complete License Agreement. Use the scroll bar or the \'Scroll Down\' button in this dialog to view the entire license text.";
- };
+ };
+
FixedText FT_LICENSE_BODY_2
{
Pos = MAP_APPFONT(COL2_X, ROW4_Y);
Size = MAP_APPFONT(COL2_WIDTH, ROW4_HEIGHT);
NoLabel = TRUE;
Text [ en-US ] = "2.";
- };
+ };
+
FixedText FT_LICENSE_BODY_2_TXT
{
Pos = MAP_APPFONT(COL3_X, ROW4_Y);
@@ -233,8 +242,9 @@ ModalDialog RID_DLG_LICENSE
WordBreak = TRUE;
NoLabel = TRUE;
Text [ en-US ] = "Accept the License Agreement for the extension by pressing the \'Accept\' button.";
-
- };
+
+ };
+
PushButton PB_LICENSE_DOWN
{
HelpID = "desktop:PushButton:RID_DLG_LICENSE:PB_LICENSE_DOWN";
@@ -242,14 +252,15 @@ ModalDialog RID_DLG_LICENSE
Pos = MAP_APPFONT(COL5_X , ROW3_Y) ;
Size = MAP_APPFONT(RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT) ;
Text [ en-US ] = "~Scroll Down";
-
+
};
+
FixedLine FL_LICENSE
{
Pos = MAP_APPFONT ( 0, ROW5_Y) ;
Size = MAP_APPFONT ( LIC_DLG_WIDTH, ROW5_HEIGHT ) ;
};
-
+
FixedImage FI_LICENSE_ARROW1
{
Pos = MAP_APPFONT (COL1_X, ROW3_Y) ;
@@ -260,7 +271,7 @@ ModalDialog RID_DLG_LICENSE
MASKCOLOR
};
};
-
+
FixedImage FI_LICENSE_ARROW2
{
Pos = MAP_APPFONT (COL1_X, ROW4_Y) ;
@@ -271,13 +282,7 @@ ModalDialog RID_DLG_LICENSE
MASKCOLOR
};
};
-
- Image IMG_LICENCE_ARROW_HC
- {
- ImageBitmap = Bitmap { File = "sch06300.png"; };
- MASKCOLOR
- };
-
+
OKButton BTN_LICENSE_ACCEPT
{
Pos = MAP_APPFONT(COL4_X, ROW6_Y);
@@ -287,7 +292,7 @@ ModalDialog RID_DLG_LICENSE
DefButton = TRUE;
Text [ en-US ] = "Accept";
};
-
+
CancelButton BTN_LICENSE_DECLINE
{
Pos = MAP_APPFONT(COL5_X, ROW6_Y);
@@ -295,8 +300,6 @@ ModalDialog RID_DLG_LICENSE
Text [ en-US ] = "Decline" ;
TabStop = TRUE;
};
-
-};
ModalDialog RID_DLG_SHOW_LICENSE
{
@@ -375,7 +378,7 @@ WARNINGBOX RID_WARNINGBOX_DISABLE_SHARED_EXTENSION
"Click \'Cancel\' to stop disabling the extension.";
};
-
+
String RID_STR_UNSUPPORTED_PLATFORM
{
Text [ en-US ] = "The extension \'%Name\' does not work on this computer.";
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 41ccc69693..aba7732054 100755
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,7 +51,7 @@
#include "vcl/scrbar.hxx"
#include "vcl/svapp.hxx"
-#include "vos/mutex.hxx"
+#include "osl/mutex.hxx"
#include "svtools/extensionlistbox.hxx"
@@ -102,7 +103,7 @@ namespace dp_gui {
struct StrAllFiles : public rtl::StaticWithInit< const OUString, StrAllFiles >
{
const OUString operator () () {
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
::std::auto_ptr< ResMgr > const resmgr( ResMgr::CreateResMgr( "fps_office" ) );
OSL_ASSERT( resmgr.get() != 0 );
String ret( ResId( STR_FILTERNAME_ALL, *resmgr.get() ) );
@@ -368,12 +369,21 @@ bool ExtBoxWithBtns_Impl::HandleTabKey( bool bReverse )
// -----------------------------------------------------------------------
MENU_COMMAND ExtBoxWithBtns_Impl::ShowPopupMenu( const Point & rPos, const long nPos )
{
- if ( nPos >= (long) getItemCount() )
- return CMD_NONE;
+ if ( ( nPos >= 0 ) && ( nPos < (long) getItemCount() ) )
+ {
+ if ( ! GetEntryData( nPos )->m_bLocked )
+ {
+ PopupMenu aPopup;
- PopupMenu aPopup;
+ aPopup.InsertItem( CMD_UPDATE, DialogHelper::getResourceString( RID_CTX_ITEM_CHECK_UPDATE ) );
- aPopup.InsertItem( CMD_UPDATE, DialogHelper::getResourceString( RID_CTX_ITEM_CHECK_UPDATE ) );
+ if ( GetEntryData( nPos )->m_bUser )
+ {
+ if ( GetEntryData( nPos )->m_eState == REGISTERED )
+ aPopup.InsertItem( CMD_DISABLE, DialogHelper::getResourceString( RID_CTX_ITEM_DISABLE ) );
+ else if ( GetEntryData( nPos )->m_eState != NOT_AVAILABLE )
+ aPopup.InsertItem( CMD_ENABLE, DialogHelper::getResourceString( RID_CTX_ITEM_ENABLE ) );
+ }
if ( ! GetEntryData( nPos )->m_bLocked )
{
@@ -425,6 +435,7 @@ void ExtBoxWithBtns_Impl::MouseButtonDown( const MouseEvent& rMEvt )
}
else if ( rMEvt.IsLeft() )
{
+ const SolarMutexGuard aGuard;
if ( rMEvt.IsMod1() && HasActive() )
selectEntry( EXTENSION_LISTBOX_ENTRY_NOTFOUND ); // Selecting an not existing entry will deselect the current one
else
@@ -570,7 +581,7 @@ DialogHelper::~DialogHelper()
//------------------------------------------------------------------------------
ResId DialogHelper::getResId( USHORT nId )
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
return ResId( nId, *DeploymentGuiResMgr::get() );
}
@@ -579,7 +590,7 @@ String DialogHelper::getResourceString( USHORT id )
{
// init with non-acquired solar mutex:
BrandName::get();
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
String ret( ResId( id, *DeploymentGuiResMgr::get() ) );
if (ret.SearchAscii( "%PRODUCTNAME" ) != STRING_NOTFOUND) {
ret.SearchAndReplaceAllAscii( "%PRODUCTNAME", BrandName::get() );
@@ -604,7 +615,7 @@ bool DialogHelper::continueOnSharedExtension( const uno::Reference< deployment::
{
if ( !bHadWarning && IsSharedPkgMgr( xPackage ) )
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
WarningBox aInfoBox( pParent, getResId( nResID ) );
String aMsgText = aInfoBox.GetMessText();
aMsgText.SearchAndReplaceAllAscii( "%PRODUCTNAME", BrandName::get() );
@@ -638,7 +649,7 @@ void DialogHelper::openWebBrowser( const OUString & sURL, const OUString &sTitle
{
uno::Any exc( ::cppu::getCaughtException() );
OUString msg( ::comphelper::anyToString( exc ) );
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
ErrorBox aErrorBox( NULL, WB_OK, msg );
aErrorBox.SetText( sTitle );
aErrorBox.Execute();
@@ -648,7 +659,7 @@ void DialogHelper::openWebBrowser( const OUString & sURL, const OUString &sTitle
//------------------------------------------------------------------------------
bool DialogHelper::installExtensionWarn( const OUString &rExtensionName ) const
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
WarningBox aInfo( m_pVCLWindow, getResId( RID_WARNINGBOX_INSTALL_EXTENSION ) );
String sText( aInfo.GetMessText() );
@@ -661,7 +672,7 @@ bool DialogHelper::installExtensionWarn( const OUString &rExtensionName ) const
//------------------------------------------------------------------------------
bool DialogHelper::installForAllUsers( bool &bInstallForAll ) const
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
QueryBox aQuery( m_pVCLWindow, getResId( RID_QUERYBOX_INSTALL_FOR_ALL ) );
String sMsgText = aQuery.GetMessText();
@@ -778,6 +789,7 @@ void ExtMgrDialog::setGetExtensionsURL( const ::rtl::OUString &rURL )
long ExtMgrDialog::addPackageToList( const uno::Reference< deployment::XPackage > &xPackage,
bool bLicenseMissing )
{
+ const SolarMutexGuard aGuard;
m_aUpdateBtn.Enable( true );
return m_pExtensionBox->addEntry( xPackage, bLicenseMissing );
}
@@ -791,14 +803,14 @@ void ExtMgrDialog::prepareChecking()
//------------------------------------------------------------------------------
void ExtMgrDialog::checkEntries()
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
m_pExtensionBox->checkEntries();
}
//------------------------------------------------------------------------------
bool ExtMgrDialog::removeExtensionWarn( const OUString &rExtensionName ) const
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
WarningBox aInfo( const_cast< ExtMgrDialog* >(this), getResId( RID_WARNINGBOX_REMOVE_EXTENSION ) );
String sText( aInfo.GetMessText() );
@@ -1049,6 +1061,7 @@ void ExtMgrDialog::updateProgress( const OUString &rText,
//------------------------------------------------------------------------------
void ExtMgrDialog::updatePackageInfo( const uno::Reference< deployment::XPackage > &xPackage )
{
+ const SolarMutexGuard aGuard;
m_pExtensionBox->updateEntry( xPackage );
}
@@ -1167,7 +1180,7 @@ void ExtMgrDialog::Resize()
Rectangle aNativeControlRegion, aNativeContentRegion;
if( (bNativeOK = GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
CTRL_STATE_ENABLED, aValue, rtl::OUString(),
- aNativeControlRegion, aNativeContentRegion ) ) != FALSE )
+ aNativeControlRegion, aNativeContentRegion ) != FALSE )
{
nProgressHeight = aNativeControlRegion.GetHeight();
}
@@ -1349,7 +1362,7 @@ void UpdateRequiredDialog::prepareChecking()
//------------------------------------------------------------------------------
void UpdateRequiredDialog::checkEntries()
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
m_pExtensionBox->checkEntries();
if ( ! hasActiveEntries() )
@@ -1462,6 +1475,7 @@ void UpdateRequiredDialog::updatePackageInfo( const uno::Reference< deployment::
// We will remove all updated packages with satisfied dependencies, but
// we will show all disabled entries so the user sees the result
// of the 'disable all' button
+ const SolarMutexGuard aGuard;
if ( isEnabled( xPackage ) && checkDependencies( xPackage ) )
m_pExtensionBox->removeEntry( xPackage );
else
@@ -1610,7 +1624,7 @@ void UpdateRequiredDialog::Resize()
Rectangle aNativeControlRegion, aNativeContentRegion;
if( (bNativeOK = GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
CTRL_STATE_ENABLED, aValue, rtl::OUString(),
- aNativeControlRegion, aNativeContentRegion ) ) != FALSE )
+ aNativeControlRegion, aNativeContentRegion ) != FALSE )
{
nProgressHeight = aNativeControlRegion.GetHeight();
}
@@ -1826,3 +1840,4 @@ SelectedPackage::~SelectedPackage() {}
} //namespace dp_gui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index 50878d8778..8b5d0ba37c 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -279,3 +280,5 @@ public:
} // namespace dp_gui
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.src b/desktop/source/deployment/gui/dp_gui_dialog2.src
index daeb5d0125..813bbd58d4 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.src
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.src
@@ -162,17 +162,12 @@ Image RID_IMG_WARNING
ImageBitmap = Bitmap { File = "caution_16.png"; };
};
-Image RID_IMG_WARNING_HC
-{
- ImageBitmap = Bitmap { File = "caution_16_h.png"; };
-};
-
Image RID_IMG_LOCKED
{
ImageBitmap = Bitmap { File = "lock_16.png"; };
};
-Image RID_IMG_LOCKED_HC
+Image RID_IMG_SHARED
{
ImageBitmap = Bitmap { File = "lock_16_h.png"; };
};
@@ -192,11 +187,6 @@ Image RID_IMG_EXTENSION
ImageBitmap = Bitmap { File = "extension_32.png"; };
};
-Image RID_IMG_EXTENSION_HC
-{
- ImageBitmap = Bitmap { File = "extension_32_h.png"; };
-};
-
QueryBox RID_QUERYBOX_INSTALL_FOR_ALL
{
Buttons = WB_YES_NO_CANCEL;
@@ -209,7 +199,7 @@ QueryBox RID_QUERYBOX_INSTALL_FOR_ALL
// ---------------------------------------------------
// row 1 | multi line edit
// ---------------------------------------------------
-// row 2 | fixed text
+// row 2 | fixed text
// ---------------------------------------------------
// row 3 | img | fixed text | fixed text | button
// ----------------------------------------------------
@@ -217,7 +207,7 @@ QueryBox RID_QUERYBOX_INSTALL_FOR_ALL
// ---------------------------------------------------
// row 5 |fixed line
// ---------------------------------------------------
-// row 6 | | |button | button
+// row 6 | | |button | button
// ---------------------------------------------------
// | col 1 | col 2 | col3 | col4 | col5
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index ea983c5a7f..2bada9f02c 100755
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,6 +26,8 @@
*
************************************************************************/
+#define _WIN32_WINNT 0x0500
+
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_desktop.hxx"
@@ -165,7 +168,7 @@ public:
m_bWarnUser( false )
{}
- Dialog * activeDialog() { return m_pDialogHelper->getWindow(); }
+ Dialog * activeDialog() { return m_pDialogHelper ? m_pDialogHelper->getWindow() : NULL; }
void setTitle( const OUString& rNewTitle ) { m_sTitle = rNewTitle; }
void startProgress();
@@ -258,6 +261,8 @@ private:
virtual void execute();
virtual void SAL_CALL onTerminated();
+ void _insert(const TExtensionCmd& rExtCmd);
+
void _addExtension( ::rtl::Reference< ProgressCmdEnv > &rCmdEnv,
const OUString &rPackageURL,
const OUString &rRepository,
@@ -427,7 +432,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
dp_misc::Dependencies::getErrorText( depExc.UnsatisfiedDependencies[i]) );
}
{
- vos::OGuard guard(Application::GetSolarMutex());
+ SolarMutexGuard guard;
short n = DependencyDialog( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, deps ).Execute();
// Distinguish between closing the dialog and programatically
// canceling the dialog (headless VCL):
@@ -471,7 +476,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
bool bEqualNames = verExc.NewDisplayName.equals(
verExc.Deployed->getDisplayName());
{
- vos::OGuard guard(Application::GetSolarMutex());
+ SolarMutexGuard guard;
WarningBox box( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, ResId(id, *DeploymentGuiResMgr::get()));
String s;
if (bEqualNames)
@@ -512,7 +517,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
{
if ( m_pDialogHelper )
{
- vos::OGuard guard(Application::GetSolarMutex());
+ SolarMutexGuard guard;
approve = m_pDialogHelper->installExtensionWarn( instExc.displayName );
}
@@ -523,7 +528,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
}
else if (request >>= platExc)
{
- vos::OGuard guard( Application::GetSolarMutex() );
+ SolarMutexGuard guard;
String sMsg( ResId( RID_STR_UNSUPPORTED_PLATFORM, *DeploymentGuiResMgr::get() ) );
sMsg.SearchAndReplaceAllAscii( "%Name", platExc.package->getDisplayName() );
ErrorBox box( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, WB_OK, sMsg );
@@ -597,7 +602,7 @@ void ProgressCmdEnv::update_( uno::Any const & rStatus )
if ( text.getLength() == 0 )
text = ::comphelper::anyToString( rStatus ); // fallback
- const ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ const SolarMutexGuard aGuard;
const ::std::auto_ptr< ErrorBox > aBox( new ErrorBox( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, WB_OK, text ) );
aBox->Execute();
}
@@ -645,12 +650,6 @@ void ExtensionCmdQueue::Thread::addExtension( const ::rtl::OUString &rExtensionU
const ::rtl::OUString &rRepository,
const bool bWarnUser )
{
- ::osl::MutexGuard aGuard( m_mutex );
-
- //If someone called stop then we do not add the extension -> game over!
- if ( m_bStopped )
- return;
-
if ( rExtensionURL.getLength() )
{
TExtensionCmd pEntry( new ExtensionCmd( ExtensionCmd::ADD, rExtensionURL, rRepository, bWarnUser ) );
@@ -693,9 +692,13 @@ void ExtensionCmdQueue::Thread::acceptLicense( const uno::Reference< deployment:
{
TExtensionCmd pEntry( new ExtensionCmd( ExtensionCmd::ACCEPT_LICENSE, rPackage ) );
- m_queue.push( pEntry );
- m_eInput = START;
- m_wakeup.set();
+//------------------------------------------------------------------------------
+void ExtensionCmdQueue::Thread::acceptLicense( const uno::Reference< deployment::XPackage > &rPackage )
+{
+ if ( rPackage.is() )
+ {
+ TExtensionCmd pEntry( new ExtensionCmd( ExtensionCmd::ACCEPT_LICENSE, rPackage ) );
+ _insert( pEntry );
}
}
@@ -703,20 +706,12 @@ void ExtensionCmdQueue::Thread::acceptLicense( const uno::Reference< deployment:
void ExtensionCmdQueue::Thread::enableExtension( const uno::Reference< deployment::XPackage > &rPackage,
const bool bEnable )
{
- ::osl::MutexGuard aGuard( m_mutex );
-
- //If someone called stop then we do not remove the extension -> game over!
- if ( m_bStopped )
- return;
-
if ( rPackage.is() )
{
TExtensionCmd pEntry( new ExtensionCmd( bEnable ? ExtensionCmd::ENABLE :
ExtensionCmd::DISABLE,
rPackage ) );
- m_queue.push( pEntry );
- m_eInput = START;
- m_wakeup.set();
+ _insert( pEntry );
}
}
@@ -724,16 +719,8 @@ void ExtensionCmdQueue::Thread::enableExtension( const uno::Reference< deploymen
void ExtensionCmdQueue::Thread::checkForUpdates(
const std::vector<uno::Reference<deployment::XPackage > > &vExtensionList )
{
- ::osl::MutexGuard aGuard( m_mutex );
-
- //If someone called stop then we do not update the extension -> game over!
- if ( m_bStopped )
- return;
-
TExtensionCmd pEntry( new ExtensionCmd( ExtensionCmd::CHECK_FOR_UPDATES, vExtensionList ) );
- m_queue.push( pEntry );
- m_eInput = START;
- m_wakeup.set();
+ _insert( pEntry );
}
//------------------------------------------------------------------------------
@@ -888,7 +875,7 @@ void ExtensionCmdQueue::Thread::execute()
if (msg.getLength() == 0) // fallback for debugging purposes
msg = ::comphelper::anyToString(exc);
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
::std::auto_ptr<ErrorBox> box(
new ErrorBox( currentCmdEnv->activeDialog(), WB_OK, msg ) );
if ( m_pDialogHelper )
@@ -1002,7 +989,7 @@ void ExtensionCmdQueue::Thread::_checkForUpdates(
UpdateDialog* pUpdateDialog;
std::vector< UpdateData > vData;
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
pUpdateDialog = new UpdateDialog( m_xContext, m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, vExtensionList, &vData );
@@ -1010,13 +997,13 @@ void ExtensionCmdQueue::Thread::_checkForUpdates(
if ( ( pUpdateDialog->Execute() == RET_OK ) && !vData.empty() )
{
- // If there is at least one directly downloadable dialog then we
+ // If there is at least one directly downloadable extension then we
// open the install dialog.
::std::vector< UpdateData > dataDownload;
int countWebsiteDownload = 0;
typedef std::vector< dp_gui::UpdateData >::const_iterator cit;
- for ( cit i = vData.begin(); i < vData.end(); i++ )
+ for ( cit i = vData.begin(); i < vData.end(); ++i )
{
if ( i->sWebsiteURL.getLength() > 0 )
countWebsiteDownload ++;
@@ -1036,7 +1023,7 @@ void ExtensionCmdQueue::Thread::_checkForUpdates(
//Now start the webbrowser and navigate to the websites where we get the updates
if ( RET_OK == nDialogResult )
{
- for ( cit i = vData.begin(); i < vData.end(); i++ )
+ for ( cit i = vData.begin(); i < vData.end(); ++i )
{
if ( m_pDialogHelper && ( i->sWebsiteURL.getLength() > 0 ) )
m_pDialogHelper->openWebBrowser( i->sWebsiteURL, m_pDialogHelper->getWindow()->GetText() );
@@ -1122,6 +1109,19 @@ void ExtensionCmdQueue::Thread::onTerminated()
m_bTerminated = true;
}
+void ExtensionCmdQueue::Thread::_insert(const TExtensionCmd& rExtCmd)
+{
+ ::osl::MutexGuard aGuard( m_mutex );
+
+ // If someone called stop then we do not process the command -> game over!
+ if ( m_bStopped )
+ return;
+
+ m_queue.push( rExtCmd );
+ m_eInput = START;
+ m_wakeup.set();
+}
+
//------------------------------------------------------------------------------
OUString ExtensionCmdQueue::Thread::searchAndReplaceAll( const OUString &rSource,
const OUString &rWhat,
@@ -1210,3 +1210,4 @@ void handleInteractionRequest( const uno::Reference< uno::XComponentContext > &
} //namespace dp_gui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx
index 90eb0dab07..8794c51132 100755
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -109,3 +110,5 @@ void handleInteractionRequest( const ::com::sun::star::uno::Reference< ::com::su
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_service.cxx b/desktop/source/deployment/gui/dp_gui_service.cxx
index b8daa7668d..b1ec3a43df 100644
--- a/desktop/source/deployment/gui/dp_gui_service.cxx
+++ b/desktop/source/deployment/gui/dp_gui_service.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,7 +66,7 @@ public:
virtual ~MyApp();
// Application
- virtual void Main();
+ virtual int Main();
};
//______________________________________________________________________________
@@ -79,8 +80,9 @@ MyApp::MyApp()
}
//______________________________________________________________________________
-void MyApp::Main()
+int MyApp::Main()
{
+ return EXIT_SUCCESS;
}
//##############################################################################
@@ -206,7 +208,7 @@ void ServiceImpl::setDialogTitle( OUString const & title )
{
if ( dp_gui::TheExtensionManager::s_ExtMgr.is() )
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
::rtl::Reference< ::dp_gui::TheExtensionManager > dialog(
::dp_gui::TheExtensionManager::get( m_xComponentContext,
m_parent ? *m_parent : Reference<awt::XWindow>(),
@@ -234,7 +236,7 @@ void ServiceImpl::startExecuteModal(
}
catch (Exception & exc) {
if (bAppUp) {
- const vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
std::auto_ptr<ErrorBox> box(
new ErrorBox( Application::GetActiveTopWindow(),
WB_OK, exc.Message ) );
@@ -278,7 +280,7 @@ void ServiceImpl::startExecuteModal(
}
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
::rtl::Reference< ::dp_gui::TheExtensionManager > myExtMgr(
::dp_gui::TheExtensionManager::get(
m_xComponentContext,
@@ -366,3 +368,5 @@ void * SAL_CALL component_getFactory(
}
} // extern "C"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_shared.hxx b/desktop/source/deployment/gui/dp_gui_shared.hxx
index 40f5bc9d6f..af3a0bd5b9 100644
--- a/desktop/source/deployment/gui/dp_gui_shared.hxx
+++ b/desktop/source/deployment/gui/dp_gui_shared.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,5 @@ public:
} // namespace dp_gui
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_system.cxx b/desktop/source/deployment/gui/dp_gui_system.cxx
deleted file mode 100644
index bc11a4b12b..0000000000
--- a/desktop/source/deployment/gui/dp_gui_system.cxx
+++ /dev/null
@@ -1,59 +0,0 @@
-/*************************************************************************
- *
- * 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
- *
- * 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 "dp_gui_system.hxx"
-#ifdef WNT
-#define WIN32_LEAN_AND_MEAN
-#ifdef _MSC_VER
-#pragma warning(push,1) /* disable warnings within system headers */
-#endif
-#include <windows.h>
-#ifdef _MSC_VER
-#pragma warning(pop)
-#endif
-#endif
-
-namespace dp_gui {
-
-//We cannot distinguish Vista and 2008 Server
-bool isVista()
-{
-#ifdef WNT
- OSVERSIONINFO osvi;
- ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
- osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
- GetVersionEx(&osvi);
- return osvi.dwMajorVersion >= 6;
-#else
- return false;
-#endif
-}
-
-} //namespace dp_gui
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index 17d5e6af39..564580c520 100755
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
#include "vcl/svapp.hxx"
#include "vcl/msgbox.hxx"
-#include "vos/mutex.hxx"
+#include "osl/mutex.hxx"
#include "toolkit/helper/vclunohelper.hxx"
@@ -126,7 +127,7 @@ TheExtensionManager::~TheExtensionManager()
//------------------------------------------------------------------------------
void TheExtensionManager::createDialog( const bool bCreateUpdDlg )
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
if ( bCreateUpdDlg )
{
@@ -151,7 +152,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg )
//------------------------------------------------------------------------------
void TheExtensionManager::Show()
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
getDialog()->Show();
}
@@ -159,7 +160,7 @@ void TheExtensionManager::Show()
//------------------------------------------------------------------------------
void TheExtensionManager::SetText( const ::rtl::OUString &rTitle )
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
getDialog()->SetText( rTitle );
}
@@ -167,7 +168,7 @@ void TheExtensionManager::SetText( const ::rtl::OUString &rTitle )
//------------------------------------------------------------------------------
void TheExtensionManager::ToTop( USHORT nFlags )
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
getDialog()->ToTop( nFlags );
}
@@ -278,7 +279,7 @@ void TheExtensionManager::terminateDialog()
{
if ( ! dp_misc::office_is_running() )
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
delete m_pExtMgrDialog;
m_pExtMgrDialog = NULL;
delete m_pUpdReqDialog;
@@ -445,7 +446,7 @@ void TheExtensionManager::disposing( lang::EventObject const & rEvt )
{
if ( dp_misc::office_is_running() )
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
delete m_pExtMgrDialog;
m_pExtMgrDialog = NULL;
delete m_pUpdReqDialog;
@@ -514,7 +515,7 @@ void TheExtensionManager::modified( ::lang::EventObject const & /*rEvt*/ )
::rtl::Reference<TheExtensionManager> that( new TheExtensionManager( pParent, xContext ) );
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
if ( ! s_ExtMgr.is() )
{
OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
@@ -529,3 +530,4 @@ void TheExtensionManager::modified( ::lang::EventObject const & /*rEvt*/ )
} //namespace dp_gui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
index 4baa797d63..13ba06d0b3 100755
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -129,3 +130,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_thread.cxx b/desktop/source/deployment/gui/dp_gui_thread.cxx
index 1f92d468d3..3bf0ff0d6c 100644
--- a/desktop/source/deployment/gui/dp_gui_thread.cxx
+++ b/desktop/source/deployment/gui/dp_gui_thread.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,3 +81,5 @@ void Thread::run() {
void Thread::onTerminated() {
release();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_thread.hxx b/desktop/source/deployment/gui/dp_gui_thread.hxx
index 0b5a954b99..eb4fe43c94 100644
--- a/desktop/source/deployment/gui/dp_gui_thread.hxx
+++ b/desktop/source/deployment/gui/dp_gui_thread.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -82,3 +83,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_updatedata.hxx b/desktop/source/deployment/gui/dp_gui_updatedata.hxx
index 651cd536e2..099fdcb8f5 100755
--- a/desktop/source/deployment/gui/dp_gui_updatedata.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedata.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,5 @@ struct UpdateData
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
index 6108766118..29b3a3491c 100755
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -107,7 +108,7 @@
#include "vcl/image.hxx"
#include "vcl/msgbox.hxx"
#include "vcl/svapp.hxx"
-#include "vos/mutex.hxx"
+#include "osl/mutex.hxx"
#include "comphelper/processfactory.hxx"
@@ -124,7 +125,6 @@
#include "dp_gui_updatedata.hxx"
#include "dp_gui_updatedialog.hxx"
#include "dp_gui_shared.hxx"
-#include "dp_gui_system.hxx"
class KeyEvent;
class MouseEvent;
@@ -318,7 +318,7 @@ UpdateDialog::Thread::Thread(
void UpdateDialog::Thread::stop() {
uno::Reference< task::XAbortChannel > abort;
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
abort = m_abort;
m_stop = true;
}
@@ -455,7 +455,7 @@ void UpdateDialog::Thread::handleGeneralError(uno::Any const & exception)
}
vos::OGuard g(Application::GetSolarMutex());
if (!m_stop) {
- m_dialog.addGeneralError(message);
+ m_dialog.checkingDone();
}
}
#endif
@@ -471,7 +471,7 @@ void UpdateDialog::Thread::handleSpecificError(
if (exception >>= e) {
data.message = e.Message;
}
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_stop) {
m_dialog.addSpecificError(data);
}
@@ -552,7 +552,7 @@ bool UpdateDialog::Thread::update(
}
ret = !m_stop;
} else {
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_stop) {
m_dialog.addDisabledUpdate(du);
}
@@ -573,8 +573,7 @@ UpdateDialog::UpdateDialog(
m_update(this, DpGuiResId(RID_DLG_UPDATE_UPDATE)),
m_updates(
*this, DpGuiResId(RID_DLG_UPDATE_UPDATES),
- Image(DpGuiResId(RID_DLG_UPDATE_NORMALALERT)),
- Image(DpGuiResId(RID_DLG_UPDATE_HIGHCONTRASTALERT))),
+ Image(DpGuiResId(RID_DLG_UPDATE_NORMALALERT))),
m_all(this, DpGuiResId(RID_DLG_UPDATE_ALL)),
m_description(this, DpGuiResId(RID_DLG_UPDATE_DESCRIPTION)),
m_PublisherLabel(this, DpGuiResId(RID_DLG_UPDATE_PUBLISHER_LABEL)),
@@ -1510,3 +1509,5 @@ IMPL_LINK( UpdateDialog, hyperlink_clicked, svt::FixedHyperlink*, pHyperlink )
return 1;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
index e562c4e845..79c1831cfd 100755
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -40,9 +41,7 @@
#include "svx/checklbx.hxx"
#include "tools/link.hxx"
#include "tools/solar.h"
-#ifndef _SV_BUTTON_HXX
#include "vcl/button.hxx"
-#endif
#include "vcl/dialog.hxx"
#include "vcl/fixed.hxx"
#include <svtools/fixedhyper.hxx>
@@ -122,8 +121,7 @@ private:
public:
CheckListBox(
UpdateDialog & dialog, ResId const & resource,
- Image const & normalStaticImage,
- Image const & highContrastStaticImage);
+ Image const & normalStaticImage);
virtual ~CheckListBox();
@@ -230,3 +228,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.src b/desktop/source/deployment/gui/dp_gui_updatedialog.src
index d926360643..3050213703 100755
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.src
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.src
@@ -216,11 +216,6 @@ ModalDialog RID_DLG_UPDATE {
File = "caution_12.png";
};
};
- Image RID_DLG_UPDATE_HIGHCONTRASTALERT {
- ImageBitmap = Bitmap {
- File = "caution_12_h.png";
- };
- };
String RID_DLG_UPDATE_ERROR {
Text[en-US] = "Error";
};
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index 8f0a262bfc..8f26b574ac 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,7 +42,7 @@
#include "vcl/dialog.hxx"
#include "vcl/msgbox.hxx"
#include "vcl/svapp.hxx"
-#include "vos/mutex.hxx"
+#include "osl/mutex.hxx"
#include "vcl/dialog.hxx"
#include "cppuhelper/implbase3.hxx"
@@ -79,7 +80,7 @@
#include "dp_gui_extensioncmdqueue.hxx"
#include "ucbhelper/content.hxx"
#include "osl/mutex.hxx"
-#include "vos/mutex.hxx"
+#include "osl/mutex.hxx"
#include "rtl/ref.hxx"
#include "com/sun/star/uno/Sequence.h"
#include "comphelper/anytostring.hxx"
@@ -187,7 +188,7 @@ UpdateInstallDialog::Thread::Thread(
void UpdateInstallDialog::Thread::stop() {
cssu::Reference< css::task::XAbortChannel > abort;
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
abort = m_abort;
m_stop = true;
}
@@ -216,7 +217,7 @@ void UpdateInstallDialog::Thread::execute()
{
//make sure m_dialog is still alive
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (! m_stop)
m_dialog.updateDone();
}
@@ -376,7 +377,7 @@ void UpdateInstallDialog::Thread::downloadExtensions()
sal_uInt16 count = 0;
typedef std::vector<UpdateData>::iterator It;
- for (It i = m_aVecUpdateData.begin(); i != m_aVecUpdateData.end(); i++)
+ for (It i = m_aVecUpdateData.begin(); i != m_aVecUpdateData.end(); ++i)
{
UpdateData & curData = *i;
@@ -388,7 +389,7 @@ void UpdateInstallDialog::Thread::downloadExtensions()
//update the name of the extension which is to be downloaded
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -422,7 +423,7 @@ void UpdateInstallDialog::Thread::downloadExtensions()
}
//update the progress and display download error
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -449,7 +450,7 @@ void UpdateInstallDialog::Thread::downloadExtensions()
}
catch (cssu::Exception & e)
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -460,7 +461,7 @@ void UpdateInstallDialog::Thread::installExtensions()
{
//Update the fix text in the dialog to "Installing extensions..."
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -470,11 +471,11 @@ void UpdateInstallDialog::Thread::installExtensions()
sal_uInt16 count = 0;
typedef std::vector<UpdateData>::iterator It;
- for (It i = m_aVecUpdateData.begin(); i != m_aVecUpdateData.end(); i++, count++)
+ for (It i = m_aVecUpdateData.begin(); i != m_aVecUpdateData.end(); ++i, ++count)
{
//update the name of the extension which is to be installed
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -498,7 +499,7 @@ void UpdateInstallDialog::Thread::installExtensions()
cssu::Reference< css::task::XAbortChannel > xAbortChannel(
curData.aInstalledPackage->createAbortChannel() );
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -554,7 +555,7 @@ void UpdateInstallDialog::Thread::installExtensions()
if (bLicenseDeclined)
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -563,7 +564,7 @@ void UpdateInstallDialog::Thread::installExtensions()
}
else if (!xExtension.is() || bError)
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -572,7 +573,7 @@ void UpdateInstallDialog::Thread::installExtensions()
}
}
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -599,7 +600,7 @@ void UpdateInstallDialog::Thread::removeTempDownloads()
void UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, UpdateData & aUpdateData)
{
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -634,7 +635,7 @@ void UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, Update
{
//the user may have cancelled the dialog because downloading took to long
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -754,3 +755,5 @@ void UpdateCommandEnv::pop() throw (cssu::RuntimeException)
} //end namespace dp_gui
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
index 73041853d3..a23488bfbf 100644
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_INSTALLDIALOG_HXX
#include "sal/config.h"
-#ifndef _SV_BUTTON_HXX
#include "vcl/button.hxx"
-#endif
#include "vcl/fixed.hxx"
#include "vcl/dialog.hxx"
#include "svtools/prgsbar.hxx"
@@ -142,3 +141,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx
index c8c79dbdbc..da6d04a67e 100644
--- a/desktop/source/deployment/gui/license_dialog.cxx
+++ b/desktop/source/deployment/gui/license_dialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,7 +90,7 @@ protected:
};
struct LicenseDialogImpl : public ModalDialog
-{
+{
cssu::Reference<cssu::XComponentContext> m_xComponentContext;
FixedText m_ftHead;
FixedText m_ftBody1;
@@ -101,7 +102,7 @@ struct LicenseDialogImpl : public ModalDialog
LicenseView m_mlLicense;
PushButton m_pbDown;
FixedLine m_flBottom;
-
+
OKButton m_acceptButton;
CancelButton m_declineButton;
@@ -120,7 +121,7 @@ struct LicenseDialogImpl : public ModalDialog
const ::rtl::OUString & sLicenseText);
virtual void Activate();
-
+
};
LicenseView::LicenseView( Window* pParent, const ResId& rResId )
@@ -214,13 +215,6 @@ LicenseDialogImpl::LicenseDialogImpl(
{
- if (GetSettings().GetStyleSettings().GetHighContrastMode())
- {
- // high contrast mode needs other images
- m_fiArrow1.SetImage(Image(DpGuiResId(IMG_LICENCE_ARROW_HC)));
- m_fiArrow2.SetImage(Image(DpGuiResId(IMG_LICENCE_ARROW_HC)));
- }
-
FreeResource();
m_acceptButton.SetUniqueId(UID_BTN_LICENSE_ACCEPT);
@@ -306,7 +300,7 @@ LicenseDialog::LicenseDialog( Sequence<Any> const& args,
//______________________________________________________________________________
void LicenseDialog::setTitle( OUString const & ) throw (RuntimeException)
{
-
+
}
//______________________________________________________________________________
@@ -328,3 +322,4 @@ sal_Int16 LicenseDialog::solar_execute()
} // namespace dp_gui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/license_dialog.hxx b/desktop/source/deployment/gui/license_dialog.hxx
index 1f190298ff..7e7a8592e6 100644
--- a/desktop/source/deployment/gui/license_dialog.hxx
+++ b/desktop/source/deployment/gui/license_dialog.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -69,3 +70,5 @@ public:
};
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/makefile.mk b/desktop/source/deployment/gui/makefile.mk
index fe3921bf50..5f73df487d 100644
--- a/desktop/source/deployment/gui/makefile.mk
+++ b/desktop/source/deployment/gui/makefile.mk
@@ -55,7 +55,6 @@ SLOFILES = \
$(SLO)$/dp_gui_updatedialog.obj \
$(SLO)$/dp_gui_updateinstalldialog.obj \
$(SLO)$/dp_gui_autoscrolledit.obj \
- $(SLO)$/dp_gui_system.obj \
$(SLO)$/dp_gui_extensioncmdqueue.obj \
$(SLO)$/descedit.obj
diff --git a/desktop/source/deployment/inc/db.hxx b/desktop/source/deployment/inc/db.hxx
index 414d3639d4..3fa3d22679 100644
--- a/desktop/source/deployment/inc/db.hxx
+++ b/desktop/source/deployment/inc/db.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,6 +28,8 @@
#ifndef BERKELEYDBPROXY_DB_HXX_
#define BERKELEYDBPROXY_DB_HXX_
+#include <boost/noncopyable.hpp>
+
#ifdef SYSTEM_DB
#include <db.h>
#else
@@ -42,26 +45,12 @@ extern "C" {
typedef void (*db_free_fcn_type)(void *);
}
-
namespace berkeleydbproxy {
class DbEnv;
class Dbc;
class Dbt;
- namespace db_internal
- {
- class Noncopyable
- {
- // not implemented
- Noncopyable(const Noncopyable&);
- void operator=(const Noncopyable&);
- protected:
- Noncopyable() {}
- ~Noncopyable() {}
- };
- }
-
class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC DbException
{
rtl::OString what_;
@@ -77,7 +66,7 @@ namespace berkeleydbproxy {
};
- class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC DbEnv : db_internal::Noncopyable
+ class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC DbEnv : boost::noncopyable
{
friend class Db;
@@ -88,7 +77,7 @@ namespace berkeleydbproxy {
static char *strerror(int);
};
- class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC Db : db_internal::Noncopyable
+ class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC Db : boost::noncopyable
{
private:
DB* m_pDBP;
@@ -115,7 +104,7 @@ namespace berkeleydbproxy {
int cursor(DB_TXN *txnid, Dbc **cursorp, u_int32_t flags);
};
- class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC Dbc : db_internal::Noncopyable
+ class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC Dbc : boost::noncopyable
{
friend class Db;
friend class Dbt;
@@ -155,19 +144,4 @@ namespace berkeleydbproxy {
}
#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/inc/dp_dependencies.hxx b/desktop/source/deployment/inc/dp_dependencies.hxx
index 67a92937a5..2e57c06275 100644
--- a/desktop/source/deployment/inc/dp_dependencies.hxx
+++ b/desktop/source/deployment/inc/dp_dependencies.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,3 +81,5 @@ namespace Dependencies {
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
index debdae591f..78b824c87a 100644
--- a/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
+++ b/desktop/source/deployment/inc/dp_descriptioninfoset.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -297,3 +298,5 @@ DescriptionInfoset getDescriptionInfoset(::rtl::OUString const & sExtensionFolde
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/inc/dp_identifier.hxx b/desktop/source/deployment/inc/dp_identifier.hxx
index 18c75e0505..f7b6b1f120 100644
--- a/desktop/source/deployment/inc/dp_identifier.hxx
+++ b/desktop/source/deployment/inc/dp_identifier.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90,3 +91,5 @@ DESKTOP_DEPLOYMENTMISC_DLLPUBLIC ::rtl::OUString generateLegacyIdentifier(
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/inc/dp_interact.h b/desktop/source/deployment/inc/dp_interact.h
index 6999e022b6..3aca761c2d 100644
--- a/desktop/source/deployment/inc/dp_interact.h
+++ b/desktop/source/deployment/inc/dp_interact.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -148,3 +149,5 @@ public:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/inc/dp_misc.h b/desktop/source/deployment/inc/dp_misc.h
index b6b127579c..bbf6d5274b 100644
--- a/desktop/source/deployment/inc/dp_misc.h
+++ b/desktop/source/deployment/inc/dp_misc.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -177,3 +178,5 @@ void syncRepositories(::com::sun::star::uno::Reference<
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/inc/dp_misc_api.hxx b/desktop/source/deployment/inc/dp_misc_api.hxx
index a1604df089..bc2cee1df2 100644
--- a/desktop/source/deployment/inc/dp_misc_api.hxx
+++ b/desktop/source/deployment/inc/dp_misc_api.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -38,3 +39,5 @@
#endif
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/inc/dp_persmap.h b/desktop/source/deployment/inc/dp_persmap.h
index 5e3e1eaf70..b1597f3bb5 100644
--- a/desktop/source/deployment/inc/dp_persmap.h
+++ b/desktop/source/deployment/inc/dp_persmap.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,3 +64,5 @@ public:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/inc/dp_platform.hxx b/desktop/source/deployment/inc/dp_platform.hxx
index 5ef5fe080d..f9773efa1a 100644
--- a/desktop/source/deployment/inc/dp_platform.hxx
+++ b/desktop/source/deployment/inc/dp_platform.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,9 +30,7 @@
#define INCLUDED_DP_PLATFORM_HXX
-#ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_MISC_API_HXX
#include "dp_misc_api.hxx"
-#endif
#include "com/sun/star/uno/Sequence.hxx"
#include "rtl/ustring.hxx"
@@ -54,3 +53,5 @@ bool hasValidPlatform( ::com::sun::star::uno::Sequence< ::rtl::OUString > const
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/inc/dp_resource.h b/desktop/source/deployment/inc/dp_resource.h
index 03d28c4d87..96fd049207 100644
--- a/desktop/source/deployment/inc/dp_resource.h
+++ b/desktop/source/deployment/inc/dp_resource.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,3 +66,5 @@ DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/inc/dp_ucb.h b/desktop/source/deployment/inc/dp_ucb.h
index 1409b27d6a..c2fcdcd7e0 100644
--- a/desktop/source/deployment/inc/dp_ucb.h
+++ b/desktop/source/deployment/inc/dp_ucb.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -89,3 +90,5 @@ bool readProperties( ::std::list< ::std::pair< ::rtl::OUString, ::rtl::OUString>
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/inc/dp_version.hxx b/desktop/source/deployment/inc/dp_version.hxx
index 8e364823a1..c3491a7451 100644
--- a/desktop/source/deployment/inc/dp_version.hxx
+++ b/desktop/source/deployment/inc/dp_version.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,3 +47,5 @@ DESKTOP_DEPLOYMENTMISC_DLLPUBLIC Order compareVersions(
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/inc/dp_xml.h b/desktop/source/deployment/inc/dp_xml.h
index cad9e91bb5..376df332fb 100644
--- a/desktop/source/deployment/inc/dp_xml.h
+++ b/desktop/source/deployment/inc/dp_xml.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,3 +56,5 @@ void xml_parse(
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/manager/dp_activepackages.cxx b/desktop/source/deployment/manager/dp_activepackages.cxx
index f5866cb41a..950e46174d 100644
--- a/desktop/source/deployment/manager/dp_activepackages.cxx
+++ b/desktop/source/deployment/manager/dp_activepackages.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -204,3 +205,5 @@ void ActivePackages::erase(
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/manager/dp_activepackages.hxx b/desktop/source/deployment/manager/dp_activepackages.hxx
index be2c3a20e0..569e4b7852 100644
--- a/desktop/source/deployment/manager/dp_activepackages.hxx
+++ b/desktop/source/deployment/manager/dp_activepackages.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -97,3 +98,5 @@ private:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/manager/dp_informationprovider.cxx b/desktop/source/deployment/manager/dp_informationprovider.cxx
index 48c88bccc1..ac9b17aedc 100644
--- a/desktop/source/deployment/manager/dp_informationprovider.cxx
+++ b/desktop/source/deployment/manager/dp_informationprovider.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -368,3 +369,4 @@ bool singleton_entries(
} // namespace dp_info
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 48081fe7b7..645163edbb 100644
--- a/desktop/source/deployment/manager/dp_manager.cxx
+++ b/desktop/source/deployment/manager/dp_manager.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -1694,3 +1695,4 @@ void PackageManagerImpl::CmdEnvWrapperImpl::pop() throw (RuntimeException)
} // namespace dp_manager
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/manager/dp_manager.h b/desktop/source/deployment/manager/dp_manager.h
index d99f41d42c..fa4a9078ac 100644
--- a/desktop/source/deployment/manager/dp_manager.h
+++ b/desktop/source/deployment/manager/dp_manager.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -292,3 +293,4 @@ inline void PackageManagerImpl::logIntern( css::uno::Any const & status )
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/manager/dp_managerfac.cxx b/desktop/source/deployment/manager/dp_managerfac.cxx
index ec312621c7..ccbaadcb8a 100644
--- a/desktop/source/deployment/manager/dp_managerfac.cxx
+++ b/desktop/source/deployment/manager/dp_managerfac.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -198,3 +199,4 @@ PackageManagerFactoryImpl::getPackageManager( OUString const & context )
} // namespace factory
} // namespace dp_manager
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/misc/db.cxx b/desktop/source/deployment/misc/db.cxx
index 3a559b8ae5..ce403181ab 100644
--- a/desktop/source/deployment/misc/db.cxx
+++ b/desktop/source/deployment/misc/db.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -270,3 +271,4 @@ void db_internal::raise_error(int dberr, const char * where)
//----------------------------------------------------------------------------
} // namespace ecomp
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx
index 599826a957..b190783c40 100644
--- a/desktop/source/deployment/misc/dp_dependencies.cxx
+++ b/desktop/source/deployment/misc/dp_dependencies.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -80,14 +81,14 @@ check(::dp_misc::DescriptionInfoset const & infoset) {
unsatisfied(n);
::sal_Int32 unsat = 0;
for (::sal_Int32 i = 0; i < n; ++i) {
- static char const minimalVersion[] = "OpenOffice.org-minimal-version";
+ static rtl::OUString const minimalVersion(
+ RTL_CONSTASCII_USTRINGPARAM("OpenOffice.org-minimal-version"));
css::uno::Reference< css::xml::dom::XElement > e(
deps->item(i), css::uno::UNO_QUERY_THROW);
bool sat = false;
if (e->getNamespaceURI().equalsAsciiL(
RTL_CONSTASCII_STRINGPARAM(xmlNamespace))
- && e->getTagName().equalsAsciiL(
- RTL_CONSTASCII_STRINGPARAM(minimalVersion)))
+ && (e->getTagName() == minimalVersion))
{
sat = satisfiesMinimalVersion(
e->getAttribute(
@@ -107,19 +108,16 @@ check(::dp_misc::DescriptionInfoset const & infoset) {
::dp_misc::compareVersions(
v,
e->getAttribute(
- ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value"))))
- != ::dp_misc::GREATER;
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("value"))));
} else if (e->hasAttributeNS(
::rtl::OUString(
RTL_CONSTASCII_USTRINGPARAM(xmlNamespace)),
- ::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(minimalVersion))))
+ minimalVersion))
{
sat = satisfiesMinimalVersion(
e->getAttributeNS(
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(xmlNamespace)),
- ::rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(minimalVersion))));
+ minimalVersion));
}
if (!sat) {
unsatisfied[unsat++] = e;
@@ -169,3 +167,5 @@ check(::dp_misc::DescriptionInfoset const & infoset) {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
index e73aeb2780..0efc0ae091 100644
--- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
+++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -862,3 +863,5 @@ DescriptionInfoset::getChildWithDefaultLocale(css::uno::Reference< css::xml::dom
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/misc/dp_identifier.cxx b/desktop/source/deployment/misc/dp_identifier.cxx
index 4126a99cd5..f9fb809b51 100644
--- a/desktop/source/deployment/misc/dp_identifier.cxx
+++ b/desktop/source/deployment/misc/dp_identifier.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,3 +72,5 @@ namespace dp_misc {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/misc/dp_interact.cxx b/desktop/source/deployment/misc/dp_interact.cxx
index 89c2e9a06f..57cc3bf2e7 100644
--- a/desktop/source/deployment/misc/dp_interact.cxx
+++ b/desktop/source/deployment/misc/dp_interact.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -183,3 +184,4 @@ void AbortChannel::sendAbort() throw (RuntimeException)
} // dp_misc
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/misc/dp_misc.cxx b/desktop/source/deployment/misc/dp_misc.cxx
index c988e6494b..7e6f9ddb0b 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,12 +54,10 @@
#include <comphelper/processfactory.hxx>
#ifdef WNT
-//#include "tools/prewin.h"
#define UNICODE
#define _UNICODE
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
-//#include "tools/postwin.h"
#endif
using namespace ::com::sun::star;
@@ -420,7 +419,7 @@ oslProcess raiseProcess(
case osl_Process_E_NotFound:
throw RuntimeException( OUSTR("image not found!"), 0 );
case osl_Process_E_TimedOut:
- throw RuntimeException( OUSTR("timout occured!"), 0 );
+ throw RuntimeException( OUSTR("timout occurred!"), 0 );
case osl_Process_E_NoPermission:
throw RuntimeException( OUSTR("permission denied!"), 0 );
case osl_Process_E_Unknown:
@@ -628,3 +627,5 @@ void syncRepositories(Reference<ucb::XCommandEnvironment> const & xCmdEnv)
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx
index 3c002a9b47..dff464b829 100644
--- a/desktop/source/deployment/misc/dp_platform.cxx
+++ b/desktop/source/deployment/misc/dp_platform.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -62,11 +63,16 @@
#define PLATFORM_SOLARIS_X86 "solaris_x86"
#define PLATFORM_FREEBSD_X86 "freebsd_x86"
#define PLATFORM_FREEBSD_X86_64 "freebsd_x86_64"
+#define PLATFORM_NETBSD_X86 "netbsd_x86"
+#define PLATFORM_NETBSD_X86_64 "netbsd_x86_64"
#define PLATFORM_MACOSX_X86 "macosx_x86"
#define PLATFORM_MACOSX_PPC "macosx_powerpc"
#define PLATFORM_OS2_X86 "os2_x86"
+#define PLATFORM_OPENBSD_X86 "openbsd_x86"
+#define PLATFORM_OPENBSD_X86_64 "openbsd_x86_64"
+#define PLATFORM_AIX_POWERPC "aix_powerpc"
@@ -107,9 +113,7 @@ namespace
::rtl::OUStringBuffer buf;
buf.append( StrOperatingSystem::get() );
buf.append( static_cast<sal_Unicode>('_') );
- OUString arch( RTL_CONSTASCII_USTRINGPARAM("$_ARCH") );
- ::rtl::Bootstrap::expandMacros( arch );
- buf.append( arch );
+ buf.append( StrCPU::get() );
return buf.makeStringAndClear();
}
};
@@ -171,16 +175,26 @@ namespace
ret = checkOSandCPU(OUSTR("FreeBSD"), OUSTR("x86"));
else if (token.equals(OUSTR(PLATFORM_FREEBSD_X86_64)))
ret = checkOSandCPU(OUSTR("FreeBSD"), OUSTR("X86_64"));
+ else if (token.equals(OUSTR(PLATFORM_NETBSD_X86)))
+ ret = checkOSandCPU(OUSTR("NetBSD"), OUSTR("x86"));
+ else if (token.equals(OUSTR(PLATFORM_NETBSD_X86_64)))
+ ret = checkOSandCPU(OUSTR("NetBSD"), OUSTR("X86_64"));
else if (token.equals(OUSTR(PLATFORM_MACOSX_X86)))
ret = checkOSandCPU(OUSTR("MacOSX"), OUSTR("x86"));
else if (token.equals(OUSTR(PLATFORM_MACOSX_PPC)))
ret = checkOSandCPU(OUSTR("MacOSX"), OUSTR("PowerPC"));
else if (token.equals(OUSTR(PLATFORM_OS2_X86)))
ret = checkOSandCPU(OUSTR("OS2"), OUSTR("x86"));
+ else if (token.equals(OUSTR(PLATFORM_AIX_POWERPC)))
+ ret = checkOSandCPU(OUSTR("AIX"), OUSTR("PowerPC"));
+ else if (token.equals(OUSTR(PLATFORM_OPENBSD_X86)))
+ ret = checkOSandCPU(OUSTR("OpenBSD"), OUSTR("x86"));
+ else if (token.equals(OUSTR(PLATFORM_OPENBSD_X86_64)))
+ ret = checkOSandCPU(OUSTR("OpenBSD"), OUSTR("X86_64"));
else
{
OSL_ENSURE(0, "Extension Manager: The extension supports an unknown platform. "
- "Check the platform element in the descripion.xml");
+ "Check the platform element in the description.xml");
ret = false;
}
return ret;
@@ -230,3 +244,4 @@ bool hasValidPlatform( css::uno::Sequence<OUString> const & platformStrings)
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/misc/dp_resource.cxx b/desktop/source/deployment/misc/dp_resource.cxx
index 4a82c7b2fa..eb92eabba3 100644
--- a/desktop/source/deployment/misc/dp_resource.cxx
+++ b/desktop/source/deployment/misc/dp_resource.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -231,3 +232,4 @@ lang::Locale getOfficeLocale()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/misc/dp_ucb.cxx b/desktop/source/deployment/misc/dp_ucb.cxx
index 122cbb6ecf..170a403ddc 100644
--- a/desktop/source/deployment/misc/dp_ucb.cxx
+++ b/desktop/source/deployment/misc/dp_ucb.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -318,3 +319,5 @@ bool readProperties( ::std::list< ::std::pair< ::rtl::OUString, ::rtl::OUString>
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/misc/dp_version.cxx b/desktop/source/deployment/misc/dp_version.cxx
index 563612c675..c999d32cc2 100644
--- a/desktop/source/deployment/misc/dp_version.cxx
+++ b/desktop/source/deployment/misc/dp_version.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -72,3 +73,5 @@ namespace dp_misc {
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx
index e36ecacd2e..6909283550 100644
--- a/desktop/source/deployment/registry/component/dp_component.cxx
+++ b/desktop/source/deployment/registry/component/dp_component.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -574,16 +575,14 @@ BackendImpl::BackendImpl(
getPlatformString(),
OUSTR("*" SAL_DLLEXTENSION),
getResourceString(RID_STR_DYN_COMPONENT),
- RID_IMG_COMPONENT,
- RID_IMG_COMPONENT_HC ) ),
+ RID_IMG_COMPONENT) ),
m_xJavaComponentTypeInfo( new Package::TypeInfo(
OUSTR("application/"
"vnd.sun.star.uno-component;"
"type=Java"),
OUSTR("*.jar"),
getResourceString(RID_STR_JAVA_COMPONENT),
- RID_IMG_JAVA_COMPONENT,
- RID_IMG_JAVA_COMPONENT_HC ) ),
+ RID_IMG_JAVA_COMPONENT) ),
m_xPythonComponentTypeInfo( new Package::TypeInfo(
OUSTR("application/"
"vnd.sun.star.uno-component;"
@@ -606,7 +605,7 @@ BackendImpl::BackendImpl(
"type=RDB"),
OUSTR("*.rdb"),
getResourceString(RID_STR_RDB_TYPELIB),
- RID_IMG_TYPELIB, RID_IMG_TYPELIB_HC ) ),
+ RID_IMG_TYPELIB ) ),
m_xJavaTypelibTypeInfo( new Package::TypeInfo(
OUSTR("application/"
"vnd.sun.star.uno-typelibrary;"
@@ -1845,3 +1844,4 @@ extern sdecl::ServiceDecl const serviceDecl(
} // namespace dp_registry
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 07cd063732..d160147c40 100644
--- a/desktop/source/deployment/registry/configuration/dp_configuration.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -193,13 +194,13 @@ BackendImpl::BackendImpl(
"vnd.sun.star.configuration-data"),
OUSTR("*.xcu"),
getResourceString(RID_STR_CONF_DATA),
- RID_IMG_CONF_XML, RID_IMG_CONF_XML_HC ) ),
+ RID_IMG_CONF_XML ) ),
m_xConfSchemaTypeInfo( new Package::TypeInfo(
OUSTR("application/"
"vnd.sun.star.configuration-schema"),
OUSTR("*.xcs"),
getResourceString(RID_STR_CONF_SCHEMA),
- RID_IMG_CONF_XML, RID_IMG_CONF_XML_HC ) ),
+ RID_IMG_CONF_XML ) ),
m_typeInfos( 2 )
{
m_typeInfos[ 0 ] = m_xConfDataTypeInfo;
@@ -706,7 +707,10 @@ void BackendImpl::PackageImpl::processPackage_(
OSL_ASSERT(data);
that->addToConfigmgrIni( m_isSchema, false, data->iniEntry, xCmdEnv );
}
- else
+ //No need for live-deployment for bundled extension, because OOo
+ //restarts after installation
+ if (that->m_eContext != CONTEXT_BUNDLED
+ && !startup)
{
ConfigurationBackendDb::Data data;
if (!m_isSchema)
@@ -742,6 +746,9 @@ void BackendImpl::PackageImpl::processPackage_(
data.iniEntry = dp_misc::makeRcTerm(url);
that->addDataToDb(getURL(), data);
}
+ that->addToConfigmgrIni( m_isSchema, url, xCmdEnv );
+ data.iniEntry = dp_misc::makeRcTerm(url);
+ that->addDataToDb(getURL(), data);
}
else // revoke
{
@@ -819,3 +826,4 @@ extern sdecl::ServiceDecl const serviceDecl(
} // namespace backend
} // namespace dp_registry
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index 3062dd130c..3e447d33dc 100755
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -638,7 +639,7 @@ beans::Optional< beans::Ambiguous<sal_Bool> > Package::isRegistered(
catch (Exception &) {
Any exc( ::cppu::getCaughtException() );
throw deployment::DeploymentException(
- OUSTR("unexpected exception occured!"),
+ OUSTR("unexpected exception occurred!"),
static_cast<OWeakObject *>(this), exc );
}
}
@@ -808,15 +809,23 @@ OUString Package::TypeInfo::getFileFilter() throw (RuntimeException)
}
//______________________________________________________________________________
-Any Package::TypeInfo::getIcon( sal_Bool highContrast, sal_Bool smallIcon )
+/**************************
+ * Get Icon
+ *
+ * @param highContrast NOTE: disabled the returning of high contrast icons.
+ * This bool is a noop now.
+ * @param smallIcon Return the small version of the icon
+ */
+Any Package::TypeInfo::getIcon( sal_Bool /*highContrast*/, sal_Bool smallIcon )
throw (RuntimeException)
{
if (! smallIcon)
return Any();
- const sal_uInt16 nIconId = (highContrast ? m_smallIcon_HC : m_smallIcon);
+ const sal_uInt16 nIconId = m_smallIcon;
return Any( &nIconId, getCppuType( static_cast<sal_uInt16 const *>(0) ) );
}
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/dp_registry.cxx b/desktop/source/deployment/registry/dp_registry.cxx
index 6c9f5d231e..f60bc7a822 100644
--- a/desktop/source/deployment/registry/dp_registry.cxx
+++ b/desktop/source/deployment/registry/dp_registry.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -574,3 +575,4 @@ Reference<deployment::XPackageRegistry> SAL_CALL create(
} // namespace dp_registry
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx
index 09bf296b79..54385830ae 100644
--- a/desktop/source/deployment/registry/executable/dp_executable.cxx
+++ b/desktop/source/deployment/registry/executable/dp_executable.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,7 +72,6 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
bool getFileAttributes(sal_uInt64& out_Attributes);
bool isUrlTargetInExtension();
-
public:
inline ExecutablePackageImpl(
::rtl::Reference<PackageRegistryBackend> const & myBackend,
@@ -121,8 +121,7 @@ BackendImpl::BackendImpl(
OUSTR("application/vnd.sun.star.executable"),
OUSTR(""),
OUSTR("Executable"),
- RID_IMG_COMPONENT,
- RID_IMG_COMPONENT_HC ) )
+ RID_IMG_COMPONENT ) )
{
if (!transientMode())
{
@@ -343,3 +342,4 @@ extern sdecl::ServiceDecl const serviceDecl(
} // namespace dp_registry
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_system.hxx b/desktop/source/deployment/registry/executable/dp_executablebackenddb.hxx.orig
index 40271e3870..ddb3a29447 100644
--- a/desktop/source/deployment/gui/dp_gui_system.hxx
+++ b/desktop/source/deployment/registry/executable/dp_executablebackenddb.hxx.orig
@@ -25,13 +25,52 @@
*
************************************************************************/
-#ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_SYSTEM_HXX
-#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_SYSTEM_HXX
+#if ! defined INCLUDED_DP_EXECUTABLEBACKENDDB_HXX
+#define INCLUDED_DP_EXECUTABLEBACKENDDB_HXX
+
+#include "rtl/ustring.hxx"
+#include "dp_backenddb.hxx"
+
+namespace css = ::com::sun::star;
+
+namespace com { namespace sun { namespace star {
+ namespace uno {
+ class XComponentContext;
+ }
+}}}
+
+namespace dp_registry {
+namespace backend {
+namespace executable {
+
+/* The XML file stores the extensions which are currently registered.
+ They will be removed when they are revoked.
+ The format looks like this:
+
+<?xml version="1.0"?>
+ */
+class ExecutableBackendDb: public dp_registry::backend::RegisteredDb
+{
+protected:
+ virtual ::rtl::OUString getDbNSName();
+
+ virtual ::rtl::OUString getNSPrefix();
+
+ virtual ::rtl::OUString getRootElementName();
+
+ virtual ::rtl::OUString getKeyElementName();
+
+public:
+
+ ExecutableBackendDb( css::uno::Reference<css::uno::XComponentContext> const & xContext,
+ ::rtl::OUString const & url);
+
+};
-/// @HTML
-namespace dp_gui {
-bool isVista();
}
+}
+}
#endif
+
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 02a2b9d80f..c7dbe773ea 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.cxx
@@ -1,10 +1,11 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* 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
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* This file is part of OpenOffice.org.
*
@@ -115,7 +116,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
Reference< ucb::XSimpleFileAccess > getFileAccess( void );
Reference< ucb::XSimpleFileAccess > m_xSFA;
-
+
const Reference<deployment::XPackageTypeInfo> m_xHelpTypeInfo;
Sequence< Reference<deployment::XPackageTypeInfo> > m_typeInfos;
std::auto_ptr<HelpBackendDb> m_backendDb;
@@ -123,7 +124,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
public:
BackendImpl( Sequence<Any> const & args,
Reference<XComponentContext> const & xComponentContext );
-
+
// XPackageRegistry
virtual Sequence< Reference<deployment::XPackageTypeInfo> > SAL_CALL
getSupportedPackageTypes() throw (RuntimeException);
@@ -142,7 +143,7 @@ BackendImpl::BackendImpl(
OUSTR("application/vnd.sun.star.help"),
rtl::OUString(),
getResourceString(RID_STR_HELP),
- RID_IMG_HELP, RID_IMG_HELP_HC ) ),
+ RID_IMG_HELP ) ),
m_typeInfos( 1 )
{
m_typeInfos[ 0 ] = m_xHelpTypeInfo;
@@ -190,7 +191,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
throw lang::IllegalArgumentException(
StrCannotDetectMediaType::get() + url,
static_cast<OWeakObject *>(this), static_cast<sal_Int16>(-1) );
-
+
String type, subType;
INetContentTypeParameterList params;
if (INetContentTypes::parse( mediaType_, type, subType, &params ))
@@ -273,12 +274,12 @@ BackendImpl * BackendImpl::PackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
if (NULL == pBackend)
- {
+ {
//May throw a DisposedException
check();
//We should never get here...
throw RuntimeException(
- OUSTR("Failed to get the BackendImpl"),
+ OUSTR("Failed to get the BackendImpl"),
static_cast<OWeakObject*>(const_cast<PackageImpl *>(this)));
}
return pBackend;
@@ -635,7 +636,7 @@ void BackendImpl::implCollectXhpFiles( const rtl::OUString& aDir,
if( nLastDot != -1 )
{
rtl::OUString aExt = aURL.copy( nLastDot + 1 );
- if( aExt.equalsIgnoreAsciiCase( rtl::OUString::createFromAscii( "xhp" ) ) )
+ if( aExt.equalsIgnoreAsciiCase( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "xhp" )) ) )
o_rXhpFileVector.push_back( aURL );
}
}
@@ -649,17 +650,17 @@ Reference< ucb::XSimpleFileAccess > BackendImpl::getFileAccess( void )
Reference<XComponentContext> const & xContext = getComponentContext();
if( xContext.is() )
{
- m_xSFA = Reference< ucb::XSimpleFileAccess >(
+ m_xSFA = Reference< ucb::XSimpleFileAccess >(
xContext->getServiceManager()->createInstanceWithContext(
- rtl::OUString::createFromAscii( "com.sun.star.ucb.SimpleFileAccess" ),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )),
xContext ), UNO_QUERY );
}
if( !m_xSFA.is() )
{
throw RuntimeException(
- ::rtl::OUString::createFromAscii(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
"dp_registry::backend::help::BackendImpl::getFileAccess(), "
- "could not instatiate SimpleFileAccess." ),
+ "could not instatiate SimpleFileAccess." )),
Reference< XInterface >() );
}
}
@@ -679,3 +680,4 @@ extern sdecl::ServiceDecl const serviceDecl(
} // namespace backend
} // namespace dp_registry
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h
index 0de8cc43ee..a8299aa1db 100755
--- a/desktop/source/deployment/registry/inc/dp_backend.h
+++ b/desktop/source/deployment/registry/inc/dp_backend.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -55,8 +56,7 @@ namespace css = ::com::sun::star;
class PackageRegistryBackend;
-char const* const BACKEND_SERVICE_NAME =
-"com.sun.star.deployment.PackageRegistryBackend";
+#define BACKEND_SERVICE_NAME "com.sun.star.deployment.PackageRegistryBackend"
typedef ::cppu::WeakComponentImplHelper1<
css::deployment::XPackage > t_PackageBase;
@@ -121,16 +121,16 @@ public:
const ::rtl::OUString m_mediaType;
const ::rtl::OUString m_fileFilter;
const ::rtl::OUString m_shortDescr;
- const sal_uInt16 m_smallIcon, m_smallIcon_HC;
+ const sal_uInt16 m_smallIcon;
public:
virtual ~TypeInfo();
TypeInfo( ::rtl::OUString const & mediaType,
::rtl::OUString const & fileFilter,
::rtl::OUString const & shortDescr,
- sal_uInt16 smallIcon, sal_uInt16 smallIcon_HC )
+ sal_uInt16 smallIcon)
: m_mediaType(mediaType), m_fileFilter(fileFilter),
m_shortDescr(shortDescr),
- m_smallIcon(smallIcon), m_smallIcon_HC(smallIcon_HC)
+ m_smallIcon(smallIcon)
{}
// XPackageTypeInfo
virtual ::rtl::OUString SAL_CALL getMediaType()
@@ -398,3 +398,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx
index 11514f342d..30c5923fc4 100644
--- a/desktop/source/deployment/registry/package/dp_package.cxx
+++ b/desktop/source/deployment/registry/package/dp_package.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -306,8 +307,7 @@ BackendImpl::BackendImpl(
OUSTR("application/vnd.sun.star.package-bundle"),
OUSTR("*.oxt;*.uno.pkg"),
getResourceString(RID_STR_PACKAGE_BUNDLE),
- RID_IMG_DEF_PACKAGE_BUNDLE,
- RID_IMG_DEF_PACKAGE_BUNDLE_HC ) ),
+ RID_IMG_DEF_PACKAGE_BUNDLE ) ),
m_xLegacyBundleTypeInfo( new Package::TypeInfo(
OUSTR("application/"
"vnd.sun.star.legacy-package-bundle"),
@@ -352,7 +352,7 @@ Sequence<OUString> BackendImpl::getSupportedServiceNames()
throw (RuntimeException)
{
return comphelper::makeSequence(
- OUString::createFromAscii(BACKEND_SERVICE_NAME) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM(BACKEND_SERVICE_NAME)) );
}
// XPackageRegistry
@@ -1693,3 +1693,4 @@ Reference<deployment::XPackageRegistry> create(
} // namespace backend
} // namespace dp_registry
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/script/dp_lib_container.cxx b/desktop/source/deployment/registry/script/dp_lib_container.cxx
index 9eeae38260..ccc2b29874 100644
--- a/desktop/source/deployment/registry/script/dp_lib_container.cxx
+++ b/desktop/source/deployment/registry/script/dp_lib_container.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,11 +29,17 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_desktop.hxx"
+#include "com/sun/star/uno/XComponentContext.hpp"
+#include "com/sun/star/ucb/XCommandEnvironment.hpp"
+
#include "dp_script.hrc"
#include "dp_resource.h"
#include "dp_xml.h"
#include "dp_lib_container.h"
+
+#include "rtl/ustring.hxx"
#include "ucbhelper/content.hxx"
+#include "xmlscript/xmllib_imexp.hxx"
using namespace ::dp_misc;
@@ -71,3 +78,4 @@ OUString LibraryContainer::get_libname(
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/script/dp_lib_container.h b/desktop/source/deployment/registry/script/dp_lib_container.h
index 3a3079755c..009846a3c0 100644
--- a/desktop/source/deployment/registry/script/dp_lib_container.h
+++ b/desktop/source/deployment/registry/script/dp_lib_container.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,11 +29,20 @@
#if ! defined INCLUDED_DP_LIB_CONTAINER_H
#define INCLUDED_DP_LIB_CONTAINER_H
-#include "rtl/ustring.hxx"
-#include "xmlscript/xmllib_imexp.hxx"
-#include "com/sun/star/uno/XComponentContext.hpp"
-#include "com/sun/star/ucb/XCommandEnvironment.hpp"
+#include <com/sun/star/uno/Reference.hxx>
+namespace com { namespace sun { namespace star {
+ namespace uno {
+ class XComponentContext;
+ }
+ namespace ucb {
+ class XCommandEnvironment;
+ }
+}}}
+
+namespace rtl {
+ class OUString;
+}
namespace css = ::com::sun::star;
@@ -55,3 +65,5 @@ public:
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/script/dp_script.cxx b/desktop/source/deployment/registry/script/dp_script.cxx
index ab9a346b5a..afd0d179de 100644
--- a/desktop/source/deployment/registry/script/dp_script.cxx
+++ b/desktop/source/deployment/registry/script/dp_script.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -61,7 +62,6 @@ namespace {
typedef ::cppu::ImplInheritanceHelper1<
::dp_registry::backend::PackageRegistryBackend, util::XUpdatable > t_helper;
-//==============================================================================
class BackendImpl : public t_helper
{
class PackageImpl : public ::dp_registry::backend::Package
@@ -83,7 +83,7 @@ class BackendImpl : public t_helper
bool startup,
::rtl::Reference<AbortChannel> const & abortChannel,
Reference<XCommandEnvironment> const & xCmdEnv );
-
+
public:
PackageImpl(
::rtl::Reference<BackendImpl> const & myBackend,
@@ -162,13 +162,13 @@ BackendImpl::BackendImpl(
"vnd.sun.star.basic-library"),
OUString() /* no file filter */,
getResourceString(RID_STR_BASIC_LIB),
- RID_IMG_SCRIPTLIB, RID_IMG_SCRIPTLIB_HC ) ),
+ RID_IMG_SCRIPTLIB) ),
m_xDialogLibTypeInfo( new Package::TypeInfo(
OUSTR("application/"
"vnd.sun.star.dialog-library"),
OUString() /* no file filter */,
getResourceString(RID_STR_DIALOG_LIB),
- RID_IMG_DIALOGLIB, RID_IMG_DIALOGLIB_HC ) ),
+ RID_IMG_DIALOGLIB) ),
m_typeInfos( 2 )
{
m_typeInfos[ 0 ] = m_xBasicLibTypeInfo;
@@ -314,15 +314,13 @@ BackendImpl * BackendImpl::PackageImpl::getMyBackend() const
}
return pBackend;
}
-//______________________________________________________________________________
+
beans::Optional< beans::Ambiguous<sal_Bool> >
BackendImpl::PackageImpl::isRegistered_(
- ::osl::ResettableMutexGuard &,
- ::rtl::Reference<AbortChannel> const &,
- Reference<XCommandEnvironment> const & xCmdEnv )
+ ::osl::ResettableMutexGuard & /* guard */,
+ ::rtl::Reference<AbortChannel> const & /* abortChannel */,
+ Reference<XCommandEnvironment> const & /* xCmdEnv */ )
{
- (void)xCmdEnv;
-
BackendImpl * that = getMyBackend();
Reference< deployment::XPackage > xThisPackage( this );
@@ -332,16 +330,13 @@ BackendImpl::PackageImpl::isRegistered_(
beans::Ambiguous<sal_Bool>( registered, false /* IsAmbiguous */ ) );
}
-//______________________________________________________________________________
void BackendImpl::PackageImpl::processPackage_(
- ::osl::ResettableMutexGuard &,
+ ::osl::ResettableMutexGuard & /* guard */,
bool doRegisterPackage,
bool startup,
::rtl::Reference<AbortChannel> const &,
Reference<XCommandEnvironment> const & xCmdEnv )
{
- (void)xCmdEnv;
-
BackendImpl * that = getMyBackend();
Reference< deployment::XPackage > xThisPackage( this );
@@ -502,3 +497,4 @@ extern sdecl::ServiceDecl const serviceDecl(
} // namespace backend
} // namespace dp_registry
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx b/desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx
index e09e721b27..63015ab1e4 100644
--- a/desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx
+++ b/desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,3 +72,4 @@ public:
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx b/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx
index 7db0952c81..4ac316e785 100644
--- a/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx
+++ b/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -98,9 +99,9 @@ ParcelDescDocHandler::startElement( const OUString& aName,
aName + OUSTR("\n"));
if ( !skipIndex )
{
- if ( aName.equals( OUString::createFromAscii( "parcel" ) ) )
+ if ( aName.equals( OUString(RTL_CONSTASCII_USTRINGPARAM( "parcel" )) ) )
{
- m_sLang = xAttribs->getValueByName( OUString::createFromAscii( "language" ) );
+ m_sLang = xAttribs->getValueByName( OUString(RTL_CONSTASCII_USTRINGPARAM( "language" )) );
}
++skipIndex;
}
@@ -128,3 +129,4 @@ void SAL_CALL ParcelDescDocHandler::endElement( const OUString & aName )
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/sfwk/dp_parceldesc.hxx b/desktop/source/deployment/registry/sfwk/dp_parceldesc.hxx
index d90a38f376..6d2dc52006 100644
--- a/desktop/source/deployment/registry/sfwk/dp_parceldesc.hxx
+++ b/desktop/source/deployment/registry/sfwk/dp_parceldesc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -87,3 +88,5 @@ public:
}
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
index 24302351fb..9f0e7730c0 100755
--- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
+++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -178,7 +179,7 @@ BackendImpl::BackendImpl(
OUSTR("application/vnd.sun.star.framework-script"),
OUString() /* no file filter */,
OUSTR("Scripting Framework Script Library"),
- RID_IMG_SCRIPTLIB, RID_IMG_SCRIPTLIB_HC ) )
+ RID_IMG_SCRIPTLIB ) )
{
if (! transientMode())
{
@@ -274,7 +275,7 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
{
if (subType.EqualsIgnoreCaseAscii("vnd.sun.star.framework-script"))
{
- OUString lang = OUString::createFromAscii("Script");
+ OUString lang = OUString(RTL_CONSTASCII_USTRINGPARAM("Script"));
OUString sParcelDescURL = makeURL(
url, OUSTR("parcel-descriptor.xml") );
@@ -430,3 +431,4 @@ extern sdecl::ServiceDecl const serviceDecl(
} // namespace backend
} // namespace dp_registry
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/inc/exithelper.hxx b/desktop/source/inc/exithelper.hxx
index 1d3e8a99dc..441cc06a1b 100644
--- a/desktop/source/inc/exithelper.hxx
+++ b/desktop/source/inc/exithelper.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,3 +67,5 @@ class ExitHelper
} // namespace desktop
#endif // #ifndef _DESKTOP_EXITHELPER_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/cfgfilter.hxx b/desktop/source/migration/cfgfilter.hxx
deleted file mode 100644
index 7970ed7dbb..0000000000
--- a/desktop/source/migration/cfgfilter.hxx
+++ /dev/null
@@ -1,173 +0,0 @@
-#ifndef _DESKTOP_CFGFILTER_HXX_
-#define _DESKTOP_CFGFILTER_HXX_
-
-#include <stack>
-
-#include <sal/types.h>
-#include <rtl/ustring.hxx>
-
-#include <cppuhelper/implbase2.hxx>
-#include <cppuhelper/implbase3.hxx>
-
-#include <com/sun/star/uno/Reference.hxx>
-#include <com/sun/star/uno/Any.hxx>
-#include <com/sun/star/uno/Type.hxx>
-
-#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/configuration/backend/XLayer.hpp>
-#include <com/sun/star/configuration/backend/XLayerHandler.hpp>
-#include <com/sun/star/configuration/backend/TemplateIdentifier.hpp>
-
-
-#include "migration_impl.hxx"
-
-#define NS_CSS com::sun::star
-#define NS_UNO com::sun::star::uno
-
-
-namespace desktop {
-
-struct element
-{
- rtl::OUString name;
- rtl::OUString path;
- sal_Bool use;
-
-};
-
-typedef std::stack< element > element_stack;
-
-// XInitialization:
-// -> Source : XLayer
-// XLayer
-// XLayerHandler
-class CConfigFilter : public cppu::WeakImplHelper3<
- NS_CSS::configuration::backend::XLayer,
- NS_CSS::configuration::backend::XLayerHandler,
- NS_CSS::lang::XInitialization>
-{
-
-private:
- NS_UNO::Reference< NS_CSS::configuration::backend::XLayerHandler > m_xLayerHandler;
- NS_UNO::Reference< NS_CSS::configuration::backend::XLayer > m_xSourceLayer;
-
- rtl::OUString m_aCurrentComponent;
-
- const strings_v *m_pvInclude;
- const strings_v *m_pvExclude;
-
- element_stack m_elementStack;
-
- void pushElement(rtl::OUString aName, sal_Bool bUse = sal_True);
- void popElement();
- sal_Bool checkElement(rtl::OUString aName);
- sal_Bool checkCurrentElement();
-
-public:
- CConfigFilter(const strings_v* include, const strings_v* exclude);
-
- // XInitialization
- virtual void SAL_CALL initialize(const NS_UNO::Sequence< NS_UNO::Any >& seqArgs)
- throw (NS_UNO::Exception);
-
- // XLayer
- virtual void SAL_CALL readData(
- const NS_UNO::Reference< NS_CSS::configuration::backend::XLayerHandler >& layerHandler)
- throw (NS_CSS::lang::NullPointerException, NS_CSS::lang::WrappedTargetException,
- NS_CSS::configuration::backend::MalformedDataException);
-
- // XLayerHandler
- virtual void SAL_CALL startLayer()
- throw(::com::sun::star::lang::WrappedTargetException);
-
- virtual void SAL_CALL endLayer()
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL overrideNode(
- const rtl::OUString& aName,
- sal_Int16 aAttributes,
- sal_Bool bClear)
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL addOrReplaceNode(
- const rtl::OUString& aName,
- sal_Int16 aAttributes)
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL addOrReplaceNodeFromTemplate(
- const rtl::OUString& aName,
- const NS_CSS::configuration::backend::TemplateIdentifier& aTemplate,
- sal_Int16 aAttributes )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL endNode()
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL dropNode(
- const rtl::OUString& aName )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL overrideProperty(
- const rtl::OUString& aName,
- sal_Int16 aAttributes,
- const NS_UNO::Type& aType,
- sal_Bool bClear )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL setPropertyValue(
- const NS_UNO::Any& aValue )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL setPropertyValueForLocale(
- const NS_UNO::Any& aValue,
- const rtl::OUString& aLocale )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL endProperty()
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL addProperty(
- const rtl::OUString& aName,
- sal_Int16 aAttributes,
- const NS_UNO::Type& aType )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
- virtual void SAL_CALL addPropertyWithValue(
- const rtl::OUString& aName,
- sal_Int16 aAttributes,
- const NS_UNO::Any& aValue )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException );
-
-};
-
-} // namespace desktop
-#undef NS_CSS
-#undef NS_UNO
-
-#endif
-
-
diff --git a/desktop/source/migration/makefile.mk b/desktop/source/migration/makefile.mk
index bc0cd9a62b..97eecf386b 100644
--- a/desktop/source/migration/makefile.mk
+++ b/desktop/source/migration/makefile.mk
@@ -42,18 +42,11 @@ RSCEXTINC=..$/app
# hacky - is no define
CDEFS+=-I..$/app
+CDEFS+=-I$(PRJ)/inc
SLOFILES = \
- $(SLO)$/migration.obj \
- $(SLO)$/wizard.obj \
- $(SLO)$/pages.obj \
- $(SLO)$/cfgfilter.obj
-
-SRS1NAME= wizard
-SRC1FILES= wizard.src
-
+ $(SLO)$/migration.obj
# --- Targets ------------------------------------------------------
.INCLUDE : target.mk
-
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index 6396ef1091..6e6ae303ee 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,7 +35,6 @@
#include "migration.hxx"
#include "migration_impl.hxx"
-#include "cfgfilter.hxx"
#include <unotools/textsearch.hxx>
#include <comphelper/processfactory.hxx>
@@ -193,25 +193,41 @@ static const ::rtl::OUString MENU_SUBMENU = ::rtl::OUString::createFromAscii("..
return sIdentifier;
}
-static MigrationImpl *pImpl = 0;
-static Mutex aMutex;
-static MigrationImpl *getImpl()
-{
- MutexGuard aGuard(aMutex);
- if (pImpl == 0)
- pImpl = new MigrationImpl(comphelper::getProcessServiceFactory());
- return pImpl;
-}
+static const ::rtl::OUString MENU_SEPERATOR(RTL_CONSTASCII_USTRINGPARAM(" | "));
+static const ::rtl::OUString MENU_SUBMENU(RTL_CONSTASCII_USTRINGPARAM("..."));
+static const ::rtl::OUString MIGRATION_STAMP_NAME(RTL_CONSTASCII_USTRINGPARAM("/MIGRATED"));
-static void releaseImpl()
+::rtl::OUString retrieveLabelFromCommand(const ::rtl::OUString& sCommand, const ::rtl::OUString& sModuleIdentifier)
{
- MutexGuard aGuard(aMutex);
- if (pImpl != 0)
+ ::rtl::OUString sLabel;
+
+ uno::Reference< container::XNameAccess > xUICommands;
+ uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.UICommandDescription")) ), uno::UNO_QUERY );
+ if ( xNameAccess.is() )
{
- delete pImpl;
- pImpl = 0;
+ uno::Any a = xNameAccess->getByName( sModuleIdentifier );
+ a >>= xUICommands;
}
-}
+ if (xUICommands.is())
+ {
+ if ( sCommand.getLength() > 0 )
+ {
+ rtl::OUString aStr;
+ ::uno::Sequence< beans::PropertyValue > aPropSeq;
+ try
+ {
+ uno::Any a( xUICommands->getByName( sCommand ));
+ if ( a >>= aPropSeq )
+ {
+ for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
+ {
+ if ( aPropSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Label" ) ))
+ {
+ aPropSeq[i].Value >>= aStr;
+ break;
+ }
+ }
+ }
// static main entry point for the migration process
void Migration::doMigration()
@@ -225,37 +241,108 @@ void Migration::doMigration()
aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
OSL_ENSURE(sal_False, aMsg.getStr());
}
- OSL_ENSURE(bResult, "Migration has not been successfull");
- // shut down migration framework
- releaseImpl();
-}
-void Migration::cancelMigration()
-{
- releaseImpl();
+ return sLabel;
}
-sal_Bool Migration::checkMigration()
+::rtl::OUString mapModuleShortNameToIdentifier(const ::rtl::OUString& sShortName)
{
- return getImpl()->checkMigration();
+ ::rtl::OUString sIdentifier;
+
+ if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("StartModule"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.StartModule"));
+
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("swriter"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.TextDocument"));
+
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("scalc"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sheet.SpreadsheetDocument"));
+
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sdraw"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.DrawingDocument"));
+
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("simpress"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.presentation.PresentationDocument"));
+
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("smath"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.formula.FormulaProperties"));
+
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("schart"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.chart2.ChartDocument"));
+
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("BasicIDE"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.script.BasicIDE"));
+
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("dbapp"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument"));
+
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sglobal"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.GlobalDocument"));
+
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sweb"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.WebDocument"));
+
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("swxform"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.xforms.XMLFormDocument"));
+
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sbibliography"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Bibliography"));
+
+ return sIdentifier;
}
-OUString Migration::getOldVersionName()
+bool MigrationImpl::alreadyMigrated()
{
- return getImpl()->getOldVersionName();
+ rtl::OUString aStr = m_aInfo.userdata + MIGRATION_STAMP_NAME;
+ File aFile(aStr);
+ // create migration stamp, and/or check its existence
+ bool bRet = aFile.open (osl_File_OpenFlag_Write | osl_File_OpenFlag_Create | osl_File_OpenFlag_NoLock) == FileBase::E_EXIST;
+ OSL_TRACE( "File '%s' exists? %d\n",
+ rtl::OUStringToOString(aStr, RTL_TEXTENCODING_ASCII_US).getStr(),
+ bRet );
+ return bRet;
}
-OUString MigrationImpl::getOldVersionName()
+bool MigrationImpl::initializeMigration()
{
- return m_aInfo.productname;
+ bool bRet = false;
+
+ if (!checkMigrationCompleted()) {
+ readAvailableMigrations(m_vMigrationsAvailable);
+ sal_Int32 nIndex = findPreferedMigrationProcess(m_vMigrationsAvailable);
+ // m_aInfo is now set to the preferred migration source
+ if ( nIndex >= 0 ) {
+ if (alreadyMigrated())
+ return false;
+ m_vrMigrations = readMigrationSteps(m_vMigrationsAvailable[nIndex].name);
+ }
+
+ bRet = m_aInfo.userdata.getLength() > 0;
+ }
+
+ OSL_TRACE( "Migration %s\n", bRet ? "needed" : "not required" );
+
+ return bRet;
}
-sal_Bool MigrationImpl::checkMigration()
+void Migration::migrateSettingsIfNecessary()
{
- if (m_aInfo.userdata.getLength() > 0 && ! checkMigrationCompleted())
- return sal_True;
- else
- return sal_False;
+ MigrationImpl aImpl( comphelper::getProcessServiceFactory() );
+
+ if (! aImpl.initializeMigration() )
+ return;
+
+ sal_Bool bResult = sal_False;
+ try {
+ bResult = aImpl.doMigration();
+ } catch (Exception& e)
+ {
+ OString aMsg("doMigration() exception: ");
+ aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
+ OSL_ENSURE(sal_False, aMsg.getStr());
+ }
+ OSL_ENSURE(bResult, "Migration has not been successfull");
+ (void)bResult;
}
MigrationImpl::MigrationImpl(const uno::Reference< XMultiServiceFactory >& xFactory)
@@ -270,9 +357,9 @@ MigrationImpl::MigrationImpl(const uno::Reference< XMultiServiceFactory >& xFact
MigrationImpl::~MigrationImpl()
{
-
}
+// The main entry point for migrating settings
sal_Bool MigrationImpl::doMigration()
{
// compile file list for migration
@@ -370,7 +457,7 @@ sal_Bool MigrationImpl::doMigration()
void MigrationImpl::refresh()
{
uno::Reference< XRefreshable > xRefresh(m_xFactory->createInstance(
- OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider")), uno::UNO_QUERY);
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"))), uno::UNO_QUERY);
if (xRefresh.is())
xRefresh->refresh();
else
@@ -382,24 +469,33 @@ void MigrationImpl::setMigrationCompleted()
{
try {
uno::Reference< XPropertySet > aPropertySet(getConfigAccess("org.openoffice.Setup/Office", true), uno::UNO_QUERY_THROW);
- aPropertySet->setPropertyValue(OUString::createFromAscii("MigrationCompleted"), uno::makeAny(sal_True));
+ aPropertySet->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("MigrationCompleted")), uno::makeAny(sal_True));
uno::Reference< XChangesBatch >(aPropertySet, uno::UNO_QUERY_THROW)->commitChanges();
} catch (...) {
// fail silently
}
}
-sal_Bool MigrationImpl::checkMigrationCompleted()
+bool MigrationImpl::checkMigrationCompleted()
{
sal_Bool bMigrationCompleted = sal_False;
try {
uno::Reference< XPropertySet > aPropertySet(
getConfigAccess("org.openoffice.Setup/Office"), uno::UNO_QUERY_THROW);
aPropertySet->getPropertyValue(
- OUString::createFromAscii("MigrationCompleted")) >>= bMigrationCompleted;
+ OUString(RTL_CONSTASCII_USTRINGPARAM("MigrationCompleted"))) >>= bMigrationCompleted;
+
+ if( !bMigrationCompleted && getenv("SAL_DISABLE_USERMIGRATION" ) )
+ {
+ // migration prevented - fake it's success
+ setMigrationCompleted();
+ bMigrationCompleted = sal_True;
+ }
} catch (Exception&) {
// just return false...
}
+ OSL_TRACE( "Migration %s", bMigrationCompleted ? "already completed" : "not done" );
+
return bMigrationCompleted;
}
@@ -484,21 +580,21 @@ migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigratio
}
// exluded files...
- if (tmpAccess->getByName(OUString::createFromAscii("ExcludedFiles")) >>= tmpSeq)
+ if (tmpAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("ExcludedFiles"))) >>= tmpSeq)
{
for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
tmpStep.excludeFiles.push_back(tmpSeq[j]);
}
// included nodes...
- if (tmpAccess->getByName(OUString::createFromAscii("IncludedNodes")) >>= tmpSeq)
+ if (tmpAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IncludedNodes"))) >>= tmpSeq)
{
for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
tmpStep.includeConfig.push_back(tmpSeq[j]);
}
// excluded nodes...
- if (tmpAccess->getByName(OUString::createFromAscii("ExcludedNodes")) >>= tmpSeq)
+ if (tmpAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("ExcludedNodes"))) >>= tmpSeq)
{
for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
tmpStep.excludeConfig.push_back(tmpSeq[j]);
@@ -522,7 +618,7 @@ migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigratio
}
// generic service
- tmpAccess->getByName(OUString::createFromAscii("MigrationService")) >>= tmpStep.service;
+ tmpAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("MigrationService"))) >>= tmpStep.service;
vrMigrations->push_back(tmpStep);
}
@@ -572,7 +668,7 @@ install_info MigrationImpl::findInstallation(const strings_v& rVersions)
aUserInst += ::rtl::OUString::createFromAscii("/");
#if defined UNX && ! defined MACOSX
// tribute to whoever had the "great" idea to use different names on Windows and Unix
- aUserInst += ::rtl::OUString::createFromAscii(".");
+ aUserInst += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("."));
#endif
aUserInst += aProfileName;
try
@@ -633,9 +729,9 @@ strings_vr MigrationImpl::applyPatterns(const strings_v& vSet, const strings_v&
end = (xub_StrLen)(i_set->getLength());
if (ts.SearchFrwrd(*i_set, &start, &end))
vrResult->push_back(*i_set);
- i_set++;
+ ++i_set;
}
- i_pat++;
+ ++i_pat;
}
return vrResult;
}
@@ -672,7 +768,7 @@ strings_vr MigrationImpl::getAllFiles(const OUString& baseURL) const
{
vrSubResult = getAllFiles(*i);
vrResult->insert(vrResult->end(), vrSubResult->begin(), vrSubResult->end());
- i++;
+ ++i;
}
}
return vrResult;
@@ -700,9 +796,9 @@ strings_vr MigrationImpl::compileFileList()
{
vrInclude = applyPatterns(*vrFiles, i_migr->includeFiles);
vrExclude = applyPatterns(*vrFiles, i_migr->excludeFiles);
- substract(*vrInclude, *vrExclude);
+ subtract(*vrInclude, *vrExclude);
vrResult->insert(vrResult->end(), vrInclude->begin(), vrInclude->end());
- i_migr++;
+ ++i_migr;
}
return vrResult;
}
@@ -809,7 +905,7 @@ void MigrationImpl::copyConfig() {
}
// removes elements of vector 2 in vector 1
-void MigrationImpl::substract(strings_v& va, const strings_v& vb_c) const
+void MigrationImpl::subtract(strings_v& va, const strings_v& vb_c) const
{
strings_v vb(vb_c);
// ensure uniqueness of entries
@@ -836,9 +932,9 @@ void MigrationImpl::substract(strings_v& va, const strings_v& vb_c) const
break;
}
else
- i_in++;
+ ++i_in;
}
- i_ex++;
+ ++i_ex;
}
}
@@ -846,12 +942,12 @@ uno::Reference< XNameAccess > MigrationImpl::getConfigAccess(const sal_Char* pPa
{
uno::Reference< XNameAccess > xNameAccess;
try{
- OUString sConfigSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider");
+ OUString sConfigSrvc(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"));
OUString sAccessSrvc;
if (bUpdate)
- sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationUpdateAccess");
+ sAccessSrvc = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationUpdateAccess"));
else
- sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess");
+ sAccessSrvc = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess"));
OUString sConfigURL = OUString::createFromAscii(pPath);
@@ -886,7 +982,6 @@ void MigrationImpl::copyFiles()
{
while (i_file != m_vrFileList->end())
{
-
// remove installation prefix from file
localName = i_file->copy(m_aInfo.userdata.getLength());
destName = userInstall + localName;
@@ -902,7 +997,7 @@ void MigrationImpl::copyFiles()
+ OUStringToOString(destName, RTL_TEXTENCODING_UTF8);
OSL_ENSURE(sal_False, msg.getStr());
}
- i_file++;
+ ++i_file;
}
}
else
@@ -916,10 +1011,10 @@ void MigrationImpl::runServices()
// Build argument array
uno::Sequence< uno::Any > seqArguments(3);
seqArguments[0] = uno::makeAny(NamedValue(
- OUString::createFromAscii("Productname"),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Productname")),
uno::makeAny(m_aInfo.productname)));
seqArguments[1] = uno::makeAny(NamedValue(
- OUString::createFromAscii("UserData"),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("UserData")),
uno::makeAny(m_aInfo.userdata)));
@@ -966,7 +1061,7 @@ void MigrationImpl::runServices()
}
}
- i_mig++;
+ ++i_mig;
}
}
@@ -1363,3 +1458,5 @@ void NewVersionUIInfo::init(const ::std::vector< MigrationModuleInfo >& vModules
}
} // namespace desktop
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx
index d9177abe40..d588f2f38a 100644
--- a/desktop/source/migration/migration_impl.hxx
+++ b/desktop/source/migration/migration_impl.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -212,7 +213,7 @@ private:
strings_vr compileFileList();
// helpers
- void substract(strings_v& va, const strings_v& vb_c) const;
+ void subtract(strings_v& va, const strings_v& vb_c) const;
strings_vr getAllFiles(const rtl::OUString& baseURL) const;
strings_vr applyPatterns(const strings_v& vSet, const strings_v& vPatterns) const;
NS_UNO::Reference< NS_CSS::container::XNameAccess > getConfigAccess(const sal_Char* path, sal_Bool rw=sal_False);
@@ -234,19 +235,19 @@ private:
void refresh();
void setMigrationCompleted();
- sal_Bool checkMigrationCompleted();
-
+ bool checkMigrationCompleted();
+
public:
MigrationImpl(const NS_UNO::Reference< NS_CSS::lang::XMultiServiceFactory >&);
~MigrationImpl();
+ bool initializeMigration();
sal_Bool doMigration();
- sal_Bool checkMigration();
rtl::OUString getOldVersionName();
-
-
};
}
#undef NS_CSS
#undef NS_UNO
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/autocorrmigration.cxx b/desktop/source/migration/services/autocorrmigration.cxx
index 71818a6438..4b12969dbe 100644
--- a/desktop/source/migration/services/autocorrmigration.cxx
+++ b/desktop/source/migration/services/autocorrmigration.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -153,7 +154,7 @@ namespace migration
{
return aResult;
}
- }
+ }
// -----------------------------------------------------------------------------
@@ -167,20 +168,20 @@ namespace migration
TStringVectorPtr aFileList = getFiles( m_sSourceDir );
TStringVector::const_iterator aI = aFileList->begin();
while ( aI != aFileList->end() )
- {
+ {
::rtl::OUString sSourceLocalName = aI->copy( m_sSourceDir.getLength() );
sal_Int32 nStart = sBaseName.getLength();
sal_Int32 nEnd = sSourceLocalName.lastIndexOf ( sSuffix );
::rtl::OUString sLanguageType = sSourceLocalName.copy( nStart, nEnd - nStart );
::rtl::OUString sIsoName = MsLangId::convertLanguageToIsoString( (LanguageType) sLanguageType.toInt32() );
::rtl::OUString sTargetLocalName = sBaseName;
- sTargetLocalName += ::rtl::OUString::createFromAscii( "_" );
+ sTargetLocalName += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "_" ));
sTargetLocalName += sIsoName;
sTargetLocalName += sSuffix;
::rtl::OUString sTargetName = sTargetDir + sTargetLocalName;
INetURLObject aURL( sTargetName );
aURL.removeSegment();
- checkAndCreateDirectory( aURL );
+ checkAndCreateDirectory( aURL );
::osl::FileBase::RC aResult = ::osl::File::copy( *aI, sTargetName );
if ( aResult != ::osl::FileBase::E_None )
{
@@ -191,7 +192,7 @@ namespace migration
}
++aI;
}
- }
+ }
else
{
OSL_ENSURE( sal_False, "AutocorrectionMigration::copyFiles: no user installation!" );
@@ -241,7 +242,7 @@ namespace migration
{
beans::NamedValue aValue;
*pIter >>= aValue;
- if ( aValue.Name.equalsAscii( "UserData" ) )
+ if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UserData" ) ) )
{
if ( !(aValue.Value >>= m_sSourceDir) )
{
@@ -283,3 +284,5 @@ namespace migration
//.........................................................................
} // namespace migration
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/autocorrmigration.hxx b/desktop/source/migration/services/autocorrmigration.hxx
index bfcdee737d..9a8aef32cd 100644
--- a/desktop/source/migration/services/autocorrmigration.hxx
+++ b/desktop/source/migration/services/autocorrmigration.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -100,3 +101,5 @@ namespace migration
//.........................................................................
#endif // _DESKTOP_AUTOCORRMIGRATION_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/basicmigration.cxx b/desktop/source/migration/services/basicmigration.cxx
index 0796b6f033..fa3fa81fa4 100644
--- a/desktop/source/migration/services/basicmigration.cxx
+++ b/desktop/source/migration/services/basicmigration.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -150,7 +151,7 @@ namespace migration
{
return aResult;
}
- }
+ }
// -----------------------------------------------------------------------------
@@ -164,12 +165,12 @@ namespace migration
TStringVectorPtr aFileList = getFiles( m_sSourceDir );
TStringVector::const_iterator aI = aFileList->begin();
while ( aI != aFileList->end() )
- {
+ {
::rtl::OUString sLocalName = aI->copy( m_sSourceDir.getLength() );
::rtl::OUString sTargetName = sTargetDir + sLocalName;
INetURLObject aURL( sTargetName );
aURL.removeSegment();
- checkAndCreateDirectory( aURL );
+ checkAndCreateDirectory( aURL );
::osl::FileBase::RC aResult = ::osl::File::copy( *aI, sTargetName );
if ( aResult != ::osl::FileBase::E_None )
{
@@ -180,7 +181,7 @@ namespace migration
}
++aI;
}
- }
+ }
else
{
OSL_ENSURE( sal_False, "BasicMigration::copyFiles: no user installation!" );
@@ -230,7 +231,7 @@ namespace migration
{
beans::NamedValue aValue;
*pIter >>= aValue;
- if ( aValue.Name.equalsAscii( "UserData" ) )
+ if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UserData" ) ) )
{
if ( !(aValue.Value >>= m_sSourceDir) )
{
@@ -272,3 +273,5 @@ namespace migration
//.........................................................................
} // namespace migration
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/basicmigration.hxx b/desktop/source/migration/services/basicmigration.hxx
index 47fca13077..131092748a 100644
--- a/desktop/source/migration/services/basicmigration.hxx
+++ b/desktop/source/migration/services/basicmigration.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -100,3 +101,5 @@ namespace migration
//.........................................................................
#endif // _DESKTOP_BASICMIGRATION_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/cexports.cxx b/desktop/source/migration/services/cexports.cxx
index 8424917d7a..072d4a59bd 100644
--- a/desktop/source/migration/services/cexports.cxx
+++ b/desktop/source/migration/services/cexports.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,3 +72,5 @@ void * SAL_CALL component_getFactory(
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx
index 3511108b3b..6978ce03b8 100644
--- a/desktop/source/migration/services/jvmfwk.cxx
+++ b/desktop/source/migration/services/jvmfwk.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -276,7 +277,7 @@ void SAL_CALL JavaMigration::initialize( const css::uno::Sequence< css::uno::Any
for(;pIter != pEnd;++pIter)
{
*pIter >>= aValue;
- if (aValue.Name.equalsAscii("OldConfiguration"))
+ if (aValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("OldConfiguration")))
{
sal_Bool bSuccess = aValue.Value >>= aOldConfigValues;
OSL_ENSURE(bSuccess == sal_True, "[Service implementation " IMPL_NAME
@@ -287,7 +288,7 @@ void SAL_CALL JavaMigration::initialize( const css::uno::Sequence< css::uno::Any
const css::beans::NamedValue* pEnd2 = pIter2 + aOldConfigValues.getLength();
for(;pIter2 != pEnd2;++pIter2)
{
- if ( pIter2->Name.equalsAscii("org.openoffice.Office.Java") )
+ if ( pIter2->Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("org.openoffice.Office.Java")) )
{
pIter2->Value >>= m_xLayer;
break;
@@ -295,7 +296,7 @@ void SAL_CALL JavaMigration::initialize( const css::uno::Sequence< css::uno::Any
}
}
}
- else if (aValue.Name.equalsAscii("UserData"))
+ else if (aValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UserData")))
{
if ( !(aValue.Value >>= m_sUserDir) )
{
@@ -344,7 +345,7 @@ void JavaMigration::migrateJavarc()
{
OSL_ENSURE(0, "[Service implementation " IMPL_NAME
"] XJob::execute: jfw_setSelectedJRE failed.");
- fprintf(stderr, "\nCannot migrate Java. An error occured.\n");
+ fprintf(stderr, "\nCannot migrate Java. An error occurred.\n");
}
}
else if (err == JFW_E_FAILED_VERSION)
@@ -419,9 +420,9 @@ void SAL_CALL JavaMigration::overrideProperty(
MalformedDataException,
WrappedTargetException )
{
- if (aName.equalsAscii("Enable"))
+ if (aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Enable")))
m_aStack.push(TElementStack::value_type(aName,ENABLE_JAVA));
- else if (aName.equalsAscii("UserClassPath"))
+ else if (aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UserClassPath")))
m_aStack.push(TElementStack::value_type(aName, USER_CLASS_PATH));
}
// -----------------------------------------------------------------------------
@@ -527,3 +528,4 @@ void SAL_CALL JavaMigration::addOrReplaceNodeFromTemplate(
} //end namespace jfw
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/jvmfwk.hxx b/desktop/source/migration/services/jvmfwk.hxx
index dc81b60f53..96e459521d 100644
--- a/desktop/source/migration/services/jvmfwk.hxx
+++ b/desktop/source/migration/services/jvmfwk.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -48,3 +49,4 @@ css::uno::Sequence< rtl::OUString > jvmfwk_getSupportedServiceNames();
} //end blind namespace
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/misc.hxx b/desktop/source/migration/services/misc.hxx
index 8fe846109c..a8f7babef9 100644
--- a/desktop/source/migration/services/misc.hxx
+++ b/desktop/source/migration/services/misc.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -46,3 +47,5 @@ namespace migration
//.........................................................................
#endif // _DESKTOP_MISC_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/oo3extensionmigration.hxx b/desktop/source/migration/services/oo3extensionmigration.hxx
index 721a1bd704..dae864710a 100644
--- a/desktop/source/migration/services/oo3extensionmigration.hxx
+++ b/desktop/source/migration/services/oo3extensionmigration.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index 54cfe9fb3f..4900c02755 100755..100644
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -278,7 +279,7 @@ bool IsUserWordbook( const ::rtl::OUString& rFile )
{
beans::NamedValue aValue;
*pIter >>= aValue;
- if ( aValue.Name.equalsAscii( "UserData" ) )
+ if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UserData" ) ) )
{
if ( !(aValue.Value >>= m_sSourceDir) )
{
@@ -320,3 +321,5 @@ bool IsUserWordbook( const ::rtl::OUString& rFile )
//.........................................................................
} // namespace migration
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/wordbookmigration.hxx b/desktop/source/migration/services/wordbookmigration.hxx
index 3096beb3fe..8b04417dba 100755..100644
--- a/desktop/source/migration/services/wordbookmigration.hxx
+++ b/desktop/source/migration/services/wordbookmigration.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -100,3 +101,5 @@ namespace migration
//.........................................................................
#endif // _DESKTOP_AUTOCORRMIGRATION_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx
index 4275de98b8..71fd31fb20 100644
--- a/desktop/source/offacc/acceptor.cxx
+++ b/desktop/source/offacc/acceptor.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,14 +31,11 @@
#include "acceptor.hxx"
#include <unotools/bootstrap.hxx>
-#include <vos/process.hxx>
#include <tools/urlobj.hxx>
#include <tools/stream.hxx>
#include <vcl/svapp.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
-#ifndef _COM_SUN_STAR_UNO_XNAMEINGSERVICE_HPP_
#include <com/sun/star/uno/XNamingService.hpp>
-#endif
#include <cppuhelper/factory.hxx>
@@ -71,10 +69,10 @@ Acceptor::Acceptor( const Reference< XMultiServiceFactory >& rFactory )
{
m_rSMgr = rFactory;
m_rAcceptor = Reference< XAcceptor > (m_rSMgr->createInstance(
- rtl::OUString::createFromAscii( "com.sun.star.connection.Acceptor" )),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.connection.Acceptor" ))),
UNO_QUERY );
m_rBridgeFactory = Reference < XBridgeFactory > (m_rSMgr->createInstance(
- rtl::OUString::createFromAscii( "com.sun.star.bridge.BridgeFactory" )),
+ rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.bridge.BridgeFactory" ))),
UNO_QUERY );
// get component context
m_rContext = getComponentContext(m_rSMgr);
@@ -176,7 +174,7 @@ void SAL_CALL Acceptor::initialize( const Sequence<Any>& aArguments )
// "<connectString>;<protocol>"
sal_Int32 nIndex1 = m_aAcceptString.indexOf( (sal_Unicode) ';' );
if (nIndex1 < 0) throw IllegalArgumentException(
- OUString::createFromAscii("Invalid accept-string format"), m_rContext, 1);
+ OUString(RTL_CONSTASCII_USTRINGPARAM("Invalid accept-string format")), m_rContext, 1);
m_aConnectString = m_aAcceptString.copy( 0 , nIndex1 ).trim();
nIndex1++;
sal_Int32 nIndex2 = m_aAcceptString.indexOf( (sal_Unicode) ';' , nIndex1 );
@@ -202,7 +200,7 @@ void SAL_CALL Acceptor::initialize( const Sequence<Any>& aArguments )
if (!bOk)
{
throw IllegalArgumentException(
- OUString::createFromAscii("invalid initialization"), m_rContext, 1);
+ OUString(RTL_CONSTASCII_USTRINGPARAM("invalid initialization")), m_rContext, 1);
}
}
@@ -277,14 +275,14 @@ Reference<XInterface> SAL_CALL AccInstanceProvider::getInstance (const OUString&
else if ( aName.compareToAscii("StarOffice.NamingService" ) == 0 )
{
Reference< XNamingService > rNamingService(
- m_rSMgr->createInstance( OUString::createFromAscii( "com.sun.star.uno.NamingService" )),
+ m_rSMgr->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.uno.NamingService" ))),
UNO_QUERY );
if ( rNamingService.is() )
{
rNamingService->registerObject(
- OUString::createFromAscii( "StarOffice.ServiceManager" ), m_rSMgr );
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "StarOffice.ServiceManager" )), m_rSMgr );
rNamingService->registerObject(
- OUString::createFromAscii( "StarOffice.ComponentContext" ), getComponentContext( m_rSMgr ));
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "StarOffice.ComponentContext" )), getComponentContext( m_rSMgr ));
rInstance = rNamingService;
}
}
@@ -348,3 +346,5 @@ component_getFactory(const sal_Char *pImplementationName, void *pServiceManager,
}
} // extern "C"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/offacc/acceptor.hxx b/desktop/source/offacc/acceptor.hxx
index eea88984d8..4096b3e63c 100644
--- a/desktop/source/offacc/acceptor.hxx
+++ b/desktop/source/offacc/acceptor.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -127,3 +128,4 @@ public:
} //namespace desktop
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/pagein/file_image.h b/desktop/source/pagein/file_image.h
index dae9f39b65..4234140027 100644
--- a/desktop/source/pagein/file_image.h
+++ b/desktop/source/pagein/file_image.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,3 +77,5 @@ int file_image_close (
#endif
#endif /* INCLUDED_ODEP_IMAGE_H */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/pagein/file_image_unx.c b/desktop/source/pagein/file_image_unx.c
index e4d62fe6ca..41d60e8035 100644
--- a/desktop/source/pagein/file_image_unx.c
+++ b/desktop/source/pagein/file_image_unx.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -148,3 +149,5 @@ int file_image_close (file_image * image)
image->m_base = 0, image->m_size = 0;
return (0);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/pagein/makefile.mk b/desktop/source/pagein/makefile.mk
index 700f2922a5..6ea4bb7d29 100644
--- a/desktop/source/pagein/makefile.mk
+++ b/desktop/source/pagein/makefile.mk
@@ -72,6 +72,7 @@ UNODLLPOST=.uno$(DLLPOST)
DFTDLLPOST=$(DLLPOSTFIX)$(DLLPOST) # Default
URELIBPATH=..$/ure-link$/lib
+UREMISCPATH=..$/ure-link$/share$/misc
$(MISC)$/$(TARGET)-calc : makefile.mk
@echo Making: $@
diff --git a/desktop/source/pagein/pagein.c b/desktop/source/pagein/pagein.c
index 9b40013d3a..15623bfd8d 100644
--- a/desktop/source/pagein/pagein.c
+++ b/desktop/source/pagein/pagein.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -147,3 +148,5 @@ int main (int argc, char **argv)
fprintf (stderr, "Total: %d files (%d bytes)\n", (int) nfiles, (int) nbytes);
return (0);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 60b27a6901..e4b7100ce2 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -709,3 +710,4 @@ extern "C" int unopkg_main()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
index 785c79a759..73c9de61ad 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -431,3 +432,4 @@ Reference< XCommandEnvironment > createCmdEnv(
}
} // unopkg
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/pkgchk/unopkg/unopkg_main.c b/desktop/source/pkgchk/unopkg/unopkg_main.c
index f1ffe5cd6e..1d5b31d03f 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_main.c
+++ b/desktop/source/pkgchk/unopkg/unopkg_main.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,3 +35,5 @@
SAL_IMPLEMENT_MAIN() {
return unopkg_main();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/pkgchk/unopkg/unopkg_main.h b/desktop/source/pkgchk/unopkg/unopkg_main.h
index 2bdc4a2feb..694cc41558 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_main.h
+++ b/desktop/source/pkgchk/unopkg/unopkg_main.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,3 +42,5 @@ int unopkg_main(void);
#endif
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
index 29b4ac34fd..6affa6347a 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -194,7 +195,7 @@ struct ProcessWorkingDir : public rtl::StaticWithInit<
const OUString, ProcessWorkingDir> {
const OUString operator () () {
OUString workingDir;
- tools::getProcessWorkingDir(&workingDir);
+ tools::getProcessWorkingDir(workingDir);
return workingDir;
}
};
diff --git a/desktop/source/pkgchk/unopkg/unopkg_shared.h b/desktop/source/pkgchk/unopkg/unopkg_shared.h
index 662245b329..7aca792955 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_shared.h
+++ b/desktop/source/pkgchk/unopkg/unopkg_shared.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
diff --git a/desktop/source/so_comp/evaluation.cxx b/desktop/source/so_comp/evaluation.cxx
index afeadb5f3c..c55b94596b 100644
--- a/desktop/source/so_comp/evaluation.cxx
+++ b/desktop/source/so_comp/evaluation.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -66,7 +67,7 @@ const char* SOEvaluation::serviceName = "com.sun.star.office.Evaluation";
OUString SOEvaluation::GetImplementationName()
{
- return OUString( RTL_CONSTASCII_USTRINGPARAM( implementationName));
+ return OUString::createFromAscii(implementationName);
}
Sequence< OUString > SOEvaluation::GetSupportedServiceNames()
@@ -144,13 +145,13 @@ rtl::OUString SAL_CALL SOEvaluation::getExactName( const rtl::OUString& rApproxi
for (int i=0; i<aSeq.getLength(); i++ )
{
NamedValue& rValue = aSeq[i];
- if ( rValue.Name.equalsAscii("expired") )
+ if ( rValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("expired")) )
rValue.Value >>= bExpired;
- else if (rValue.Name.equalsAscii("title") )
+ else if (rValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("title")) )
rValue.Value >>= aEval;
}
// append eval string to title
- aTitle += OUString::createFromAscii(" ") + aEval;
+ aTitle += OUString(RTL_CONSTASCII_USTRINGPARAM(" ")) + aEval;
if ( bExpired )
throw RuntimeException();
}
@@ -203,3 +204,5 @@ throw ( RuntimeException )
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/so_comp/evaluation.hxx b/desktop/source/so_comp/evaluation.hxx
index 9ef4b71baa..a34cc65253 100644
--- a/desktop/source/so_comp/evaluation.hxx
+++ b/desktop/source/so_comp/evaluation.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90,3 +91,5 @@ public:
};
}
#endif // _SOCOMP_EVALUATION_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/so_comp/oemjob.cxx b/desktop/source/so_comp/oemjob.cxx
index 21b78b5923..64767d180d 100644
--- a/desktop/source/so_comp/oemjob.cxx
+++ b/desktop/source/so_comp/oemjob.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -67,14 +68,14 @@ const char* OEMPreloadJob::serviceName = "com.sun.star.office.OEMPreloadJob";
OUString OEMPreloadJob::GetImplementationName()
{
- return OUString( RTL_CONSTASCII_USTRINGPARAM( implementationName));
+ return OUString::createFromAscii(implementationName);
}
Sequence< OUString > OEMPreloadJob::GetSupportedServiceNames()
{
sal_Int32 nSize = (sizeof( interfaces ) / sizeof( const char *)) - 1;
Sequence< OUString > aResult( nSize );
-
+
for( sal_Int32 i = 0; i < nSize; i++ )
aResult[i] = OUString::createFromAscii( interfaces[i] );
return aResult;
@@ -88,7 +89,7 @@ Reference< XInterface > SAL_CALL OEMPreloadJob::CreateInstance(
return (XComponent*) ( new OEMPreloadJob( rSMgr ) );
}
-OEMPreloadJob::OEMPreloadJob( const Reference< XMultiServiceFactory >& xFactory ) :
+OEMPreloadJob::OEMPreloadJob( const Reference< XMultiServiceFactory >& xFactory ) :
m_aListeners( m_aMutex ),
m_xServiceManager( xFactory )
{
@@ -117,24 +118,24 @@ void SAL_CALL OEMPreloadJob::removeEventListener( const Reference< XEventListene
}
// XServiceInfo
-::rtl::OUString SAL_CALL OEMPreloadJob::getImplementationName()
+::rtl::OUString SAL_CALL OEMPreloadJob::getImplementationName()
throw ( RuntimeException )
{
return OEMPreloadJob::GetImplementationName();
}
-sal_Bool SAL_CALL OEMPreloadJob::supportsService( const ::rtl::OUString& rServiceName )
+sal_Bool SAL_CALL OEMPreloadJob::supportsService( const ::rtl::OUString& rServiceName )
throw ( RuntimeException )
{
sal_Int32 nSize = sizeof( interfaces ) / sizeof( const char *);
-
+
for( sal_Int32 i = 0; i < nSize; i++ )
if ( rServiceName.equalsAscii( interfaces[i] ))
return sal_True;
return sal_False;
}
-Sequence< ::rtl::OUString > SAL_CALL OEMPreloadJob::getSupportedServiceNames()
+Sequence< ::rtl::OUString > SAL_CALL OEMPreloadJob::getSupportedServiceNames()
throw ( RuntimeException )
{
return OEMPreloadJob::GetSupportedServiceNames();
@@ -150,7 +151,7 @@ throw ( RuntimeException )
{
// create OEM preload service dialog
Reference <XExecutableDialog> xDialog( m_xServiceManager->createInstance(
- OUString::createFromAscii("org.openoffice.comp.preload.OEMPreloadWizard")),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.comp.preload.OEMPreloadWizard"))),
UNO_QUERY );
if ( xDialog.is() ){
// execute OEM preload dialog and check return value
@@ -160,11 +161,11 @@ throw ( RuntimeException )
bCont = sal_True;
disableOEMPreloadFlag();
} else {
- // user declined...
+ // user declined...
// terminate.
/*
Reference< XDesktop > xDesktop( m_xServiceManager->createInstance(
- OUString::createFromAscii("com.sun.star.frame.Desktop")),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop"))),
UNO_QUERY );
xDesktop->terminate();
*/
@@ -175,18 +176,18 @@ throw ( RuntimeException )
Reference<XModel> rModel;
Reference<XCloseable> rClose;
for (int i=0; i<args.getLength(); i++)
- {
- if (args[i].Name.equalsAscii("EnvType"))
+ {
+ if (args[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("EnvType")))
args[i].Value >>= aEnvType;
- else if (args[i].Name.equalsAscii("Frame")) {
+ else if (args[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Frame"))) {
args[i].Value >>= rFrame;
rClose = Reference<XCloseable>(rFrame, UNO_QUERY);
}
- else if (args[i].Name.equalsAscii("Model")) {
+ else if (args[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Model"))) {
args[i].Value >>= rModel;
rClose = Reference<XCloseable>(rModel, UNO_QUERY);
- }
- }
+ }
+ }
if (rClose.is()) rClose->close(sal_True);
*/
bCont = sal_False;
@@ -195,10 +196,10 @@ throw ( RuntimeException )
} else {
// don't try again
bCont = sal_True;
- }
+ }
/*
- NamedValue nv;
- nv.Name = OUString::createFromAscii("Deactivate");
+ NamedValue nv;
+ nv.Name = OUString(RTL_CONSTASCII_USTRINGPARAM("Deactivate"));
nv.Value <<= bDeactivate;
Sequence<NamedValue> s(1);
s[0] = nv;
@@ -208,32 +209,30 @@ throw ( RuntimeException )
return r;
}
-
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 locateIniFile()
{
OUString aUserDataPath;
OUString aSofficeIniFileURL;
-
+
// Retrieve the default file URL for the soffice.ini/rc
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 )
{
@@ -242,11 +241,11 @@ static OUString locateIniFile()
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;
}
@@ -269,7 +268,7 @@ void OEMPreloadJob::disableOEMPreloadFlag()
{
OUString aSofficeIniFileURL = locateIniFile();
if ( aSofficeIniFileURL.getLength() > 0 )
- {
+ {
Config aConfig(aSofficeIniFileURL);
aConfig.SetGroup( OEM_PRELOAD_SECTION );
aConfig.WriteKey( OEM_PRELOAD, STR_FALSE );
@@ -278,3 +277,5 @@ void OEMPreloadJob::disableOEMPreloadFlag()
}
} // namespace desktop
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/so_comp/oemjob.hxx b/desktop/source/so_comp/oemjob.hxx
index 973cae36df..26c1f0943d 100644
--- a/desktop/source/so_comp/oemjob.hxx
+++ b/desktop/source/so_comp/oemjob.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -90,3 +91,5 @@ public:
}
#endif // _SOCOMP_OEMJOB_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/so_comp/services.cxx b/desktop/source/so_comp/services.cxx
index 8a5e561444..7bd2e60822 100644
--- a/desktop/source/so_comp/services.cxx
+++ b/desktop/source/so_comp/services.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -58,7 +59,7 @@ static const char* pServices[] =
static const char* pImplementations[] =
{
SOEvaluation::implementationName,
- OEMPreloadJob::implementationName,
+ OEMPreloadJob::implementationName,
NULL
};
@@ -71,13 +72,12 @@ static const fProvider pInstanceProviders[] =
NULL
};
-
static const char** pSupportedServices[] =
{
SOEvaluation::interfaces,
OEMPreloadJob::interfaces,
NULL
-};
+};
static Sequence<OUString>
getSupportedServiceNames(int p) {
@@ -88,13 +88,13 @@ getSupportedServiceNames(int p) {
aSeq[i] = OUString::createFromAscii(names[i]);
}
return aSeq;
-}
+}
extern "C"
{
-void SAL_CALL
+void SAL_CALL
component_getImplementationEnvironment(
- const sal_Char** ppEnvironmentTypeName,
+ const sal_Char** ppEnvironmentTypeName,
uno_Environment**)
{
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
@@ -110,11 +110,11 @@ component_getFactory(
if ( pImplementationName && pServiceManager )
{
Reference< XSingleServiceFactory > xFactory;
- Reference< XMultiServiceFactory > xServiceManager(
+ Reference< XMultiServiceFactory > xServiceManager(
reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
-
+
// search implementation
- for (int i = 0; (pImplementations[i]!=NULL); i++) {
+ for (int i = 0; (pImplementations[i]!=NULL); i++) {
if ( strcmp(pImplementations[i], pImplementationName ) == 0 ) {
// found implementation
xFactory = Reference<XSingleServiceFactory>(cppu::createSingleFactory(
@@ -132,3 +132,5 @@ component_getFactory(
return NULL;
}
} // extern "C"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/splash/makefile.mk b/desktop/source/splash/makefile.mk
index b2e0736df1..a321f6d1da 100644
--- a/desktop/source/splash/makefile.mk
+++ b/desktop/source/splash/makefile.mk
@@ -40,15 +40,11 @@ ENABLE_EXCEPTIONS=TRUE
# --- Files --------------------------------------------------------
SLOFILES = $(SLO)$/splash.obj \
- $(SLO)$/firststart.obj \
$(SLO)$/services_spl.obj
SHL1DEPN= makefile.mk
SHL1OBJS= $(SLOFILES) \
- $(SLO)$/pages.obj \
- $(SLO)$/wizard.obj \
- $(SLO)$/migration.obj \
- $(SLO)$/cfgfilter.obj
+ $(SLO)$/migration.obj
SHL1TARGET=$(TARGET)$(DLLPOSTFIX)
diff --git a/desktop/source/splash/services_spl.cxx b/desktop/source/splash/services_spl.cxx
index ff5469ac30..a60ca55d32 100755..100644
--- a/desktop/source/splash/services_spl.cxx
+++ b/desktop/source/splash/services_spl.cxx
@@ -1,10 +1,11 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* 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
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
*
* This file is part of OpenOffice.org.
*
@@ -35,8 +36,6 @@
#include <unotools/configmgr.hxx>
#include "splash.hxx"
-#include "firststart.hxx"
-
using namespace rtl;
using namespace ::com::sun::star::uno;
@@ -48,14 +47,12 @@ using namespace ::desktop;
static const char* pServices[] =
{
SplashScreen::serviceName,
- FirstStart::serviceName,
NULL
};
static const char* pImplementations[] =
{
SplashScreen::implementationName,
- FirstStart::implementationName,
NULL
};
@@ -64,17 +61,14 @@ typedef Reference<XInterface>(* fProvider)(const Reference<XMultiServiceFactory>
static const fProvider pInstanceProviders[] =
{
SplashScreen::getInstance,
- FirstStart::CreateInstance,
NULL
};
-
static const char** pSupportedServices[] =
{
SplashScreen::interfaces,
- FirstStart::interfaces,
NULL
-};
+};
static Sequence<OUString>
getSupportedServiceNames(int p) {
@@ -85,13 +79,13 @@ getSupportedServiceNames(int p) {
aSeq[i] = OUString::createFromAscii(names[i]);
}
return aSeq;
-}
+}
extern "C"
{
-void SAL_CALL
+void SAL_CALL
component_getImplementationEnvironment(
- const sal_Char** ppEnvironmentTypeName,
+ const sal_Char** ppEnvironmentTypeName,
uno_Environment**)
{
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
@@ -107,11 +101,11 @@ component_getFactory(
if ( pImplementationName && pServiceManager )
{
Reference< XSingleServiceFactory > xFactory;
- Reference< XMultiServiceFactory > xServiceManager(
+ Reference< XMultiServiceFactory > xServiceManager(
reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
-
+
// search implementation
- for (int i = 0; (pImplementations[i]!=NULL); i++) {
+ for (int i = 0; (pImplementations[i]!=NULL); i++) {
if ( strcmp(pImplementations[i], pImplementationName ) == 0 ) {
// found implementation
xFactory = Reference<XSingleServiceFactory>(cppu::createSingleFactory(
@@ -129,3 +123,5 @@ component_getFactory(
return NULL;
}
} // extern "C"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index db46035c4d..1e99d9bff8 100644
--- a/desktop/source/splash/splash.cxx
+++ b/desktop/source/splash/splash.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,11 +29,9 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_desktop.hxx"
-#include <introbmpnames.hxx>
#include "splash.hxx"
#include <stdio.h>
#include <unotools/bootstrap.hxx>
-#include <vos/process.hxx>
#include <tools/urlobj.hxx>
#include <tools/stream.hxx>
#include <sfx2/sfx.hrc>
@@ -42,7 +41,8 @@
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <rtl/bootstrap.hxx>
#include <rtl/logfile.hxx>
-#include <rtl/ustrbuf.hxx>
+#include <rtl/locale.hxx>
+#include <rtl/strbuf.hxx>
#include <rtl/math.hxx>
#include <vcl/graph.hxx>
#include <svtools/filter.hxx>
@@ -100,7 +100,7 @@ void SAL_CALL SplashScreen::start(const OUString&, sal_Int32 nRange)
_iMax = nRange;
if (_bVisible) {
_bProgressEnd = sal_False;
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
if ( _eBitmapMode == BM_FULLSCREEN )
ShowFullScreenMode( TRUE );
Show();
@@ -159,7 +159,7 @@ void SAL_CALL SplashScreen::setValue(sal_Int32 nValue)
RTL_LOGFILE_CONTEXT( aLog, "::SplashScreen::setValue (lo119109)" );
RTL_LOGFILE_CONTEXT_TRACE1( aLog, "value=%d", nValue );
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
if (_bVisible && !_bProgressEnd) {
if ( _eBitmapMode == BM_FULLSCREEN )
ShowFullScreenMode( TRUE );
@@ -183,7 +183,8 @@ SplashScreen::initialize( const ::com::sun::star::uno::Sequence< ::com::sun::sta
aArguments[1] >>= _sAppName;
// start to determine bitmap and all other required value
- initBitmap();
+ if ( _bShowLogo )
+ SetScreenBitmap (_aIntroBmp);
Size aSize = _aIntroBmp.GetSizePixel();
SetOutputSizePixel( aSize );
_vdev.SetOutputSizePixel( aSize );
@@ -489,8 +490,9 @@ bool SplashScreen::findScreenBitmap(rtl::OUString const & path)
}
// create file name from screen resolution information
- OUStringBuffer aStrBuf( 128 );
- aStrBuf.appendAscii( "intro_" );
+ OStringBuffer aStrBuf( 128 );
+ OStringBuffer aResBuf( 32 );
+ aStrBuf.append( "intro_" );
if ( _sAppName.getLength() > 0 )
{
aStrBuf.append( _sAppName );
@@ -528,12 +530,13 @@ bool SplashScreen::findScreenBitmap(rtl::OUString const & path)
haveBitmap = loadBitmap( path, aBmpFileName );
}
}
- return haveBitmap;
-}
+ aResBuf.append( OString::valueOf( nWidth ));
+ aResBuf.append( "x" );
+ aResBuf.append( OString::valueOf( nHeight ));
-bool SplashScreen::findAppBitmap(rtl::OUString const & path)
-{
- bool haveBitmap = false;
+ aStrBuf.append( aResBuf.getStr() );
+ if (Application::LoadBrandBitmap (aStrBuf.makeStringAndClear(), rBitmap))
+ return;
if ( _sAppName.getLength() > 0 )
{
@@ -676,12 +679,7 @@ void SplashScreen::Paint( const Rectangle&)
_vdev.DrawRect(Rectangle(_tlx+_barspace, _tly+_barspace, _tlx+_barspace+length, _tly+_barheight-_barspace));
_vdev.DrawText( Rectangle(_tlx, _tly+_barheight+5, _tlx+_barwidth, _tly+_barheight+5+20), _sProgressText, TEXT_DRAW_CENTER );
}
- Size aSize = GetOutputSizePixel();
- Size bSize = _vdev.GetOutputSizePixel();
- //_vdev.Flush();
- //_vdev.DrawOutDev(Point(), GetOutputSize(), Point(), GetOutputSize(), *((IntroWindow*)this) );
DrawOutDev(Point(), GetOutputSizePixel(), Point(), _vdev.GetOutputSizePixel(), _vdev );
- //Flush();
}
@@ -713,3 +711,5 @@ const sal_Char *SplashScreen::implementationName = "com.sun.star.office.comp.Spl
const sal_Char *SplashScreen::supportedServiceNames[] = {"com.sun.star.office.SplashScreen", NULL};
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/splash/splash.hxx b/desktop/source/splash/splash.hxx
index 2090a64a82..c7c3ff5b52 100644
--- a/desktop/source/splash/splash.hxx
+++ b/desktop/source/splash/splash.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -71,13 +72,8 @@ private:
DECL_LINK( AppEventListenerHdl, VclWindowEvent * );
virtual ~SplashScreen();
void loadConfig();
- void initBitmap();
void updateStatus();
- bool findScreenBitmap(rtl::OUString const & path);
- bool findAppBitmap(rtl::OUString const & path);
- bool findBitmap(rtl::OUString const & path);
- bool loadBitmap(
- rtl::OUString const & path, const rtl::OUString &rBmpFileName );
+ void SetScreenBitmap(BitmapEx &rBitmap);
void determineProgressRatioValues( double& rXRelPos, double& rYRelPos, double& rRelWidth, double& rRelHeight );
static SplashScreen *_pINSTANCE;
@@ -134,3 +130,5 @@ public:
};
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/test/deployment/boxt/Addons.xcu b/desktop/test/deployment/boxt/Addons.xcu
deleted file mode 100644
index 3df7e2de27..0000000000
--- a/desktop/test/deployment/boxt/Addons.xcu
+++ /dev/null
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--**********************************************************************
-*
-* 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
-*
-* 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.
-*
-**********************************************************************-->
-
-<o:component-data xmlns:o="http://openoffice.org/2001/registry"
- o:package="org.openoffice.Office" o:name="Addons">
- <node o:name="AddonUI">
- <node o:name="OfficeMenuBar">
- <node o:name="org.openoffice.test.desktop.deployment.boxt" o:op="replace">
- <prop o:name="Title" xml:lang="en-US">
- <value>boxt</value>
- </prop>
- <node o:name="Submenu">
- <node o:name="1" o:op="replace">
- <prop o:name="URL">
- <value>vnd.org.openoffice.test.desktop.deployment.boxt:</value>
- </prop>
- <prop o:name="Title" xml:lang="en-US">
- <value>boxt</value>
- </prop>
- </node>
- </node>
- </node>
- </node>
- </node>
-</o:component-data>
diff --git a/desktop/test/deployment/executable_content/build/hello.c b/desktop/test/deployment/executable_content/build/hello.c
index 46313af564..e5f41dc651 100644
--- a/desktop/test/deployment/executable_content/build/hello.c
+++ b/desktop/test/deployment/executable_content/build/hello.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -34,12 +35,13 @@ int main(int argc , char** argv, char** envp)
{
//prevent warning about unused parameters
//we need to provide parameter names in C
- argc = argc;
- argv = argv;
- envp = envp;
+ (void)argc;
+ (void)argv;
+ (void)envp;
fprintf(stdout,"Hello world!\n");
return 0;
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/test/deployment/locationtest/manifest.xml b/desktop/test/deployment/locationtest/manifest.xml
index 8791582798..3dd6460faf 100644
--- a/desktop/test/deployment/locationtest/manifest.xml
+++ b/desktop/test/deployment/locationtest/manifest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<manifest:manifest>
+<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
<manifest:file-entry manifest:full-path="LocationTest.jar" manifest:media-type="application/vnd.sun.star.uno-component;type=Java"/>
<manifest:file-entry manifest:full-path="LocationTest.rdb" manifest:media-type="application/vnd.sun.star.uno-typelibrary;type=RDB"/>
-</manifest:manifest> \ No newline at end of file
+</manifest:manifest>
diff --git a/desktop/test/deployment/update/updateinfocreation/build/manifest.xml b/desktop/test/deployment/update/updateinfocreation/build/manifest.xml
index 7e3e7947aa..fcedabf96b 100755
--- a/desktop/test/deployment/update/updateinfocreation/build/manifest.xml
+++ b/desktop/test/deployment/update/updateinfocreation/build/manifest.xml
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<manifest:manifest>
+<manifest:manifest xmlns:manifest="http://openoffice.org/2001/manifest">
<manifest:file-entry manifest:full-path="TestExtension.jar" manifest:media-type="application/vnd.sun.star.uno-component;type=Java"/>
<manifest:file-entry manifest:full-path="TestExtension.rdb" manifest:media-type="application/vnd.sun.star.uno-typelibrary;type=RDB"/>
-</manifest:manifest> \ No newline at end of file
+</manifest:manifest>
diff --git a/desktop/unx/source/makefile.mk b/desktop/unx/source/makefile.mk
new file mode 100644
index 0000000000..494477a0c4
--- /dev/null
+++ b/desktop/unx/source/makefile.mk
@@ -0,0 +1,64 @@
+#
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# Novell, Inc.
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
+#
+# Contributor(s): Jan Holesovsky <kendy@novell.com>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+#
+PRJ=..$/..
+PRJNAME=desktop
+TARGET=oosplash
+
+NO_DEFAULT_STL=TRUE
+
+.INCLUDE : settings.mk
+
+.IF "$(ENABLE_UNIX_QUICKSTARTER)"!="TRUE"
+
+dummy:
+ @echo "Unix quickstarter disabled"
+
+.ELSE
+
+STDLIB=
+
+CFLAGS+=$(LIBPNG_CFLAGS)
+
+OBJFILES= \
+ $(OBJ)$/splashx.obj \
+ $(OBJ)$/start.obj
+
+APP1TARGET = $(TARGET)
+APP1RPATH = BRAND
+APP1OBJS = $(OBJFILES)
+APP1LIBSALCPPRT=
+APP1CODETYPE = C
+APP1STDLIBS = $(SALLIB) -lX11 $(LIBPNG_LIBS)
+.IF "$(OS)"=="SOLARIS"
+APP1STDLIBS+= -lsocket
+.ENDIF
+
+.ENDIF # ENABLE_UNIX_QUICKSTARTER
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
diff --git a/desktop/unx/source/officeloader/officeloader.cxx b/desktop/unx/source/officeloader/officeloader.cxx
index 613eea1ea3..89147d76f0 100755..100644
--- a/desktop/unx/source/officeloader/officeloader.cxx
+++ b/desktop/unx/source/officeloader/officeloader.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -108,3 +109,5 @@ SAL_IMPLEMENT_MAIN()
return exitcode;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
new file mode 100644
index 0000000000..a4b9abd344
--- /dev/null
+++ b/desktop/unx/source/splashx.c
@@ -0,0 +1,624 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jan Holesovsky <kendy@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include <X11/Xlib.h>
+#include <X11/Xatom.h>
+#include <X11/Xutil.h>
+
+#define USE_LIBPNG
+
+#include "osl/endian.h"
+#include <fcntl.h>
+#include <stdint.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#ifdef USE_LIBPNG
+# include <png.h>
+#endif
+
+#include "splashx.h"
+
+typedef struct {
+ unsigned char b, g, r;
+} color_t;
+
+#define WINDOW_WIDTH 440
+#define WINDOW_HEIGHT 299
+
+#define PROGRESS_XOFFSET 12
+#define PROGRESS_YOFFSET 18
+#define PROGRESS_BARSPACE 2
+
+static Display *display = NULL;
+static int screen;
+static int depth;
+static Visual *visual = NULL;
+
+static int width = WINDOW_WIDTH;
+static int height = WINDOW_HEIGHT;
+
+static Colormap color_map;
+static Window win;
+static GC gc;
+
+// Progress bar values
+// taken from desktop/source/splash/splash.cxx
+static int tlx = 212;
+static int tly = 216;
+static int barwidth = 263;
+static int barheight = 8;
+static int barspace = PROGRESS_BARSPACE;
+static color_t barcol = { 18, 202, 157 };
+static color_t framecol = { 0xD3, 0xD3, 0xD3 };
+
+static XColor barcolor;
+static XColor framecolor;
+
+static unsigned char **bitmap_rows = NULL;
+
+#define BMP_HEADER_LEN 14
+#define WIN_INFO_LEN 40
+
+#define UINT8( x ) ( (unsigned int)( ( (uint8_t *)( x ) )[0] ) )
+
+#define UINT16( x ) ( ( (unsigned int)( ( (uint8_t *)( x ) )[0] ) ) + \
+ ( ( (unsigned int)( ( (uint8_t *)( x ) )[1] ) ) << 8 ) )
+
+#define UINT32( x ) ( ( (unsigned int)( ( (uint8_t *)( x ) )[0] ) ) + \
+ ( ( (unsigned int)( ( (uint8_t *)( x ) )[1] ) ) << 8 ) + \
+ ( ( (unsigned int)( ( (uint8_t *)( x ) )[2] ) ) << 16 ) + \
+ ( ( (unsigned int)( ( (uint8_t *)( x ) )[3] ) ) << 24 ) )
+
+#define MAX( x, y ) ( ( (x) > (y) )? (x): (y) )
+
+#define LOAD_FAILURE( msg ) \
+ { \
+ fprintf( stderr, "%s: " msg, filename ); \
+ close( fd ); \
+ return 0; \
+ }
+
+#ifdef USE_LIBPNG
+
+/* libpng-1.2.41 */
+#ifndef PNG_TRANSFORM_GRAY_TO_RGB
+# define PNG_TRANSFORM_GRAY_TO_RGB 0x2000
+#endif
+
+int splash_load_bmp( const char *filename )
+{
+ FILE *file;
+ png_structp png_ptr;
+ png_infop info_ptr;
+
+ if ( !(file = fopen( filename, "r" ) ) )
+ return 0;
+
+ png_ptr = png_create_read_struct( PNG_LIBPNG_VER_STRING, 0, 0, 0 );
+ info_ptr = png_create_info_struct(png_ptr);
+ png_init_io( png_ptr, file );
+
+ if( setjmp( png_jmpbuf( png_ptr ) ) )
+ {
+ png_destroy_read_struct( &png_ptr, &info_ptr, NULL );
+ fclose( file );
+ return 0;
+ }
+
+ png_read_png( png_ptr, info_ptr,
+ PNG_TRANSFORM_EXPAND | PNG_TRANSFORM_STRIP_ALPHA |
+ PNG_TRANSFORM_GRAY_TO_RGB | PNG_TRANSFORM_BGR, NULL);
+
+ bitmap_rows = png_get_rows( png_ptr, info_ptr );
+ width = png_get_image_width( png_ptr, info_ptr );
+ height = png_get_image_height( png_ptr, info_ptr );
+
+#if 0
+ {
+ int i,j;
+ for (j = 0; j < height; j++) {
+ for (i = 0; i < width*3; i++) {
+ fprintf (stderr, "%.2x", bitmap_rows[j][i]);
+ }
+ fprintf (stderr, "\n");
+ }
+ }
+#endif
+
+ return 1;
+}
+#else
+
+/* Load the specified Windows 24bit BMP to 'bitmap'
+ * Return: 1 - success, 0 - failure */
+int splash_load_bmp( const char *filename )
+{
+ int fd = open( filename, O_RDONLY );
+ if ( fd < 0 )
+ return 0;
+
+ char file_header[ BMP_HEADER_LEN ];
+
+ if ( read( fd, file_header, BMP_HEADER_LEN ) != BMP_HEADER_LEN || file_header[0] != 'B' || file_header[1] != 'M' )
+ LOAD_FAILURE( "Not a bitmap.\n" );
+
+/* int file_size = UINT32( file_header + 2 ); */
+
+ char info_header[ WIN_INFO_LEN ];
+ if ( read( fd, info_header, 4 ) != 4 )
+ LOAD_FAILURE( "Unable to read the header.\n" );
+
+ int header_size = UINT32( info_header );
+ if ( header_size != WIN_INFO_LEN )
+ LOAD_FAILURE( "Not a Windows bitmap.\n" );
+
+ if ( read( fd, info_header + 4, WIN_INFO_LEN - 4 ) != WIN_INFO_LEN - 4 )
+ LOAD_FAILURE( "The header ended too early.\n" );
+
+ width = UINT32( info_header + 4 );
+ height = UINT32( info_header + 8 );
+
+ int bits = UINT16( info_header + 14 );
+ int compression = UINT16( info_header + 16 );
+
+ if ( bits != 24 )
+ LOAD_FAILURE( "Just 24 bpp bitmaps are supported.\n" );
+
+ if ( compression != 0 )
+ LOAD_FAILURE( "Just uncompressed bitmaps are supported.\n" );
+
+ size_t bitmap_size = width * height * 3;
+ unsigned char *bitmap = malloc( bitmap_size );
+ if ( bitmap == NULL )
+ LOAD_FAILURE( "Cannot allocate memory for the data.\n" );
+
+ if ( read( fd, bitmap, bitmap_size ) != bitmap_size )
+ LOAD_FAILURE( "Cannot read the bitmap data.\n" );
+
+ bitmap_rows = malloc (sizeof (unsigned char*) * height);
+ int i;
+ for (i = 0; i < height; i++)
+ bitmap_rows[i] = bitmap + (width * height * 3) - width * 3 * (i + 1);
+
+ close( fd );
+ return 1;
+}
+#endif
+
+static void setup_color( int val[3], color_t *col )
+{
+ if ( val[0] < 0 || val[1] < 0 || val[2] < 0 )
+ return;
+
+#define CONVERT_COLOR( from,to ) if ( from < 0 ) to = 0; else if ( from > 255 ) to = 255; else to = from;
+ CONVERT_COLOR( val[0], col->r );
+ CONVERT_COLOR( val[1], col->g );
+ CONVERT_COLOR( val[2], col->b );
+#undef CONVERT_COLOR
+}
+
+// setup
+void splash_setup( int barc[3], int framec[3], int posx, int posy, int w, int h )
+{
+ if ( width <= 500 )
+ {
+ barwidth = width - ( 2 * PROGRESS_XOFFSET );
+ barheight = 6;
+ tlx = PROGRESS_XOFFSET;
+ tly = height - PROGRESS_YOFFSET;
+
+ barcol.r = 0;
+ barcol.g = 0;
+ barcol.b = 128;
+ }
+
+ if ( posx >= 0 )
+ tlx = posx;
+ if ( posy >= 0 )
+ tly = posy;
+ if ( w >= 0 )
+ barwidth = w;
+ if ( h >= 0 )
+ barheight = h;
+
+ setup_color( barc, &barcol );
+ setup_color( framec, &framecol );
+}
+
+// Universal shift: bits >= 0 - left, otherwise right
+#define SHIFT( x, bits ) ( ( (bits) >= 0 )? ( (x) << (bits) ): ( (x) >> -(bits) ) )
+
+// Position of the highest bit (more or less integer log2)
+inline int HIGHEST_BIT( unsigned long x )
+{
+ int i = 0;
+ for ( ; x; ++i )
+ x >>= 1;
+
+ return i;
+}
+
+// Number of bits set to 1
+inline int BITS( unsigned long x )
+{
+ int i = 0;
+ for ( ; x; x >>= 1 )
+ if ( x & 1UL )
+ ++i;
+
+ return i;
+}
+
+// Set 'bitmap' as the background of our 'win' window
+static void create_pixmap()
+{
+ if ( !bitmap_rows )
+ return;
+
+ Pixmap pixmap = XCreatePixmap( display, win, width, height, depth );
+
+ unsigned long value_mask = 0;
+ XGCValues values;
+ GC pixmap_gc = XCreateGC( display, pixmap, value_mask, &values );
+
+ if ( visual->class == TrueColor )
+ {
+ unsigned long red_mask = visual->red_mask;
+ unsigned long green_mask = visual->green_mask;
+ unsigned long blue_mask = visual->blue_mask;
+
+ unsigned long red_delta_mask = ( 1UL << ( 8 - BITS( red_mask ) ) ) - 1;
+ unsigned long green_delta_mask = ( 1UL << ( 8 - BITS( green_mask ) ) ) - 1;
+ unsigned long blue_delta_mask = ( 1UL << ( 8 - BITS( blue_mask ) ) ) - 1;
+
+ int red_shift = HIGHEST_BIT( red_mask ) - 8;
+ int green_shift = HIGHEST_BIT( green_mask ) - 8;
+ int blue_shift = HIGHEST_BIT( blue_mask ) - 8;
+
+ XImage *image = XCreateImage( display, visual, depth, ZPixmap,
+ 0, NULL, width, height, 32, 0 );
+
+ int bytes_per_line = image->bytes_per_line;
+ int bpp = image->bits_per_pixel;
+ int byte_order = image->byte_order;
+#if defined( _LITTLE_ENDIAN )
+ int machine_byte_order = LSBFirst;
+#elif defined( _BIG_ENDIAN )
+ int machine_byte_order = MSBFirst;
+#else
+ {
+ fprintf( stderr, "Unsupported machine endianity.\n" );
+ XFreeGC( display, pixmap_gc );
+ XFreePixmap( display, pixmap );
+ XDestroyImage( image );
+ return;
+ }
+#endif
+
+ char *data = malloc( height * bytes_per_line );
+ image->data = data;
+
+ // The following dithers & converts the color_t color to one
+ // acceptable for the visual
+#define COPY_IN_OUT( pix_size, code ) \
+ { \
+ int x, y; \
+ for ( y = 0; y < height; ++y ) \
+ { \
+ unsigned long red_delta = 0, green_delta = 0, blue_delta = 0; \
+ color_t *in = (color_t *)bitmap_rows[y]; \
+ for ( x = 0; x < width; ++x, ++in ) \
+ { \
+ unsigned long red = in->r + red_delta; \
+ unsigned long green = in->g + green_delta; \
+ unsigned long blue = in->b + blue_delta; \
+ red_delta = red & red_delta_mask; \
+ green_delta = green & green_delta_mask; \
+ blue_delta = blue & blue_delta_mask; \
+ if ( red > 255 ) \
+ red = 255; \
+ if ( green > 255 ) \
+ green = 255; \
+ if ( blue > 255 ) \
+ blue = 255; \
+ unsigned long pixel = \
+ ( SHIFT( red, red_shift ) & red_mask ) | \
+ ( SHIFT( green, green_shift ) & green_mask ) | \
+ ( SHIFT( blue, blue_shift ) & blue_mask ); \
+ code \
+ } \
+ } \
+ }
+
+ char *out = data;
+
+ if ( bpp == 32 )
+ {
+ if ( machine_byte_order == byte_order )
+ COPY_IN_OUT( 4, *( (uint32_t *)out ) = (uint32_t)pixel; out += 4; )
+ else
+ COPY_IN_OUT( 4, uint32_t tmp = pixel;
+ *( (uint8_t *)out ) = *( (uint8_t *)(&tmp) + 3 );
+ *( (uint8_t *)out + 1 ) = *( (uint8_t *)(&tmp) + 2 );
+ *( (uint8_t *)out + 2 ) = *( (uint8_t *)(&tmp) + 1 );
+ *( (uint8_t *)out + 3 ) = *( (uint8_t *)(&tmp) );
+ out += 4; )
+ }
+ else if ( bpp == 24 )
+ {
+ if ( machine_byte_order == byte_order && byte_order == LSBFirst )
+ COPY_IN_OUT( 3, *( (color_t *)out ) = *( (color_t *)( &pixel ) ); out += 3; )
+ if ( machine_byte_order == byte_order && byte_order == MSBFirst )
+ COPY_IN_OUT( 3, uint32_t tmp = pixel;
+ *( (uint8_t *)out ) = *( (uint8_t *)(&tmp) + 1 );
+ *( (uint8_t *)out + 1 ) = *( (uint8_t *)(&tmp) + 2 );
+ *( (uint8_t *)out + 2 ) = *( (uint8_t *)(&tmp) + 3 );
+ out += 3; )
+ else
+ COPY_IN_OUT( 3, uint32_t tmp = pixel;
+ *( (uint8_t *)out ) = *( (uint8_t *)(&tmp) + 3 );
+ *( (uint8_t *)out + 1 ) = *( (uint8_t *)(&tmp) + 2 );
+ *( (uint8_t *)out + 2 ) = *( (uint8_t *)(&tmp) + 1 );
+ out += 3; )
+ }
+ else if ( bpp == 16 )
+ {
+ if ( machine_byte_order == byte_order )
+ COPY_IN_OUT( 2, *( (uint16_t *)out ) = (uint16_t)pixel; out += 2; )
+ else
+ COPY_IN_OUT( 2, uint16_t tmp = pixel;
+ *( (uint8_t *)out ) = *( (uint8_t *)(&tmp) + 1 );
+ *( (uint8_t *)out + 1 ) = *( (uint8_t *)(&tmp) );
+ out += 2; );
+ }
+ else if ( bpp == 8 )
+ {
+ COPY_IN_OUT( 1, *( (uint8_t *)out ) = (uint8_t)pixel; ++out; )
+ }
+ else
+ {
+ fprintf( stderr, "Unsupported depth: %d bits per pixel.\n", bpp );
+ XFreeGC( display, pixmap_gc );
+ XFreePixmap( display, pixmap );
+ XDestroyImage( image );
+ return;
+ }
+
+#undef COPY_IN_OUT
+
+ XPutImage( display, pixmap, pixmap_gc, image, 0, 0, 0, 0, width, height );
+ XDestroyImage( image );
+ }
+ else //if ( depth == 1 || visual->class == DirectColor )
+ {
+ // FIXME Something like the following, but faster ;-) - XDrawPoint is not
+ // a good idea...
+ int x, y;
+ for ( y = 0; y < height; ++y )
+ {
+ color_t *color = (color_t *)&bitmap_rows[y];
+
+ int delta = 0;
+ for ( x = 0; x < width; ++x, ++color )
+ {
+ int rnd = (int)( ( (long)( random() - RAND_MAX/2 ) * 32000 )/RAND_MAX );
+ int luminance = delta + rnd + 299 * (int)color->r + 587 * (int)color->g + 114 * (int)color->b;
+
+ if ( luminance < 128000 )
+ {
+ XSetForeground( display, pixmap_gc, BlackPixel( display, screen ) );
+ delta = luminance;
+ }
+ else
+ {
+ XSetForeground( display, pixmap_gc, WhitePixel( display, screen ) );
+ delta = luminance - 255000;
+ }
+
+ XDrawPoint( display, pixmap, pixmap_gc, x, y );
+ }
+ }
+ }
+
+ XSetWindowBackgroundPixmap( display, win, pixmap );
+
+ XFreeGC( display, pixmap_gc );
+ XFreePixmap( display, pixmap );
+}
+
+// The old method of hiding the window decorations
+static void suppress_decorations_motif()
+{
+ struct {
+ unsigned long flags, functions, decorations;
+ long input_mode;
+ unsigned long status;
+ } mwmhints;
+
+ Atom a = XInternAtom( display, "_MOTIF_WM_HINTS", False );
+
+ mwmhints.flags = 15; // functions, decorations, input_mode, status
+ mwmhints.functions = 2; // ?
+ mwmhints.decorations = 0;
+ mwmhints.input_mode = 0;
+
+ XChangeProperty( display, win, a, a, 32,
+ PropModeReplace, (unsigned char*)&mwmhints, 5 );
+}
+
+// This is a splash, set it as such.
+// If it fails, just hide the decorations...
+static void suppress_decorations()
+{
+ Atom atom_type = XInternAtom( display, "_NET_WM_WINDOW_TYPE", True );
+ Atom atom_splash = XInternAtom( display, "_NET_WM_WINDOW_TYPE_SPLASH", True );
+
+ if ( atom_type != None && atom_splash != None )
+ XChangeProperty( display, win, atom_type, XA_ATOM, 32,
+ PropModeReplace, (unsigned char*)&atom_splash, 1 );
+ //else
+ suppress_decorations_motif(); // FIXME: Unconditional until Metacity/compiz's SPLASH handling is fixed
+}
+
+// Create the window
+// Return: 1 - success, 0 - failure
+int splash_create_window( int argc, char** argv )
+{
+ char *display_name = NULL;
+ int i;
+ for ( i = 0; i < argc; i++ )
+ {
+ if ( !strcmp( argv[i], "-display" ) || !strcmp( argv[i], "--display" ) )
+ display_name = ( i + 1 < argc )? argv[i+1]: NULL;
+ }
+
+ if ( !display_name )
+ display_name = getenv( "DISPLAY" );
+
+ // init display
+ display = XOpenDisplay( display_name );
+ if ( !display )
+ {
+ fprintf( stderr, "Failed to open display\n" );
+ return 0;
+ }
+
+ // create the window
+ screen = DefaultScreen( display );
+ depth = DefaultDepth( display, screen );
+ color_map = DefaultColormap( display, screen );
+ visual = DefaultVisual( display, screen );
+
+ Window root_win = RootWindow( display, screen );
+ int display_width = DisplayWidth( display, screen );
+ int display_height = DisplayHeight( display, screen );
+
+ win = XCreateSimpleWindow( display, root_win,
+ ( display_width - width ) / 2, ( display_height - height ) / 2,
+ width, height, 0,
+ BlackPixel( display, screen ), BlackPixel( display, screen ) );
+
+ XSetWindowColormap( display, win, color_map );
+
+ // setup colors
+#define FILL_COLOR( xcol,col ) xcol.red = 256*col.r; xcol.green = 256*col.g; xcol.blue = 256*col.b;
+ FILL_COLOR( barcolor, barcol );
+ FILL_COLOR( framecolor, framecol );
+#undef FILL_COLOR
+
+ XAllocColor( display, color_map, &barcolor );
+ XAllocColor( display, color_map, &framecolor );
+
+ // not resizable, no decorations, etc.
+ unsigned long value_mask = 0;
+ XGCValues values;
+ gc = XCreateGC( display, win, value_mask, &values );
+
+ XSizeHints size_hints;
+ size_hints.flags = PPosition | PSize | PMinSize | PMaxSize;
+ size_hints.min_width = width;
+ size_hints.max_width = width;
+ size_hints.min_height = height;
+ size_hints.max_height = height;
+
+ char *name = "OpenOffice.org";
+ char *icon = "icon"; // FIXME
+
+ XSetStandardProperties( display, win, name, icon, None,
+ 0, 0, &size_hints );
+
+ // the actual work
+ suppress_decorations();
+ create_pixmap();
+
+ // show it
+ XSelectInput( display, win, 0 );
+ XMapWindow( display, win );
+
+ return 1;
+}
+
+// Re-draw & process the events
+// Just throwing them away - we do not need anything more...
+static void process_events()
+{
+ XEvent xev;
+ int num_events;
+
+ XFlush( display );
+ num_events = XPending( display );
+ while ( num_events > 0 )
+ {
+ num_events--;
+ XNextEvent( display, &xev );
+ //process_event(xev);
+ }
+}
+
+// Draw the progress
+void splash_draw_progress( int progress )
+{
+ // sanity
+ if ( progress < 0 )
+ progress = 0;
+ if ( progress > 100 )
+ progress = 100;
+
+ // draw progress...
+ int length = ( progress * barwidth / 100 ) - ( 2 * barspace );
+ if ( length < 0 )
+ length = 0;
+
+ // border
+ XSetForeground( display, gc, framecolor.pixel );
+ XDrawRectangle( display, win, gc,
+ tlx, tly,
+ barwidth, barheight );
+
+ // progress bar
+ XSetForeground( display, gc, barcolor.pixel );
+ XFillRectangle( display, win, gc,
+ tlx + barspace, tly + barspace,
+ length + 1, barheight - 2*barspace + 1 );
+
+ // pending events
+ process_events();
+}
+
+// Close the window & cleanup
+void splash_close_window()
+{
+ XCloseDisplay( display );
+
+ // leak it is faster
+ bitmap_rows = NULL;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/unx/source/splashx.h b/desktop/unx/source/splashx.h
new file mode 100644
index 0000000000..537034c6ef
--- /dev/null
+++ b/desktop/unx/source/splashx.h
@@ -0,0 +1,65 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jan Holesovsky <kendy@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#ifndef _SPLASHX_H
+#define _SPLASHX_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+// Load the specified bitmap so we can have as a background of the
+// splash.
+//
+// Note: Must be called before the create_window(), otherwise there will be no
+// image in the splash, just black rectangle.
+//
+// Return: 1 - success, 0 - failure (non-existing, etc.)
+int splash_load_bmp( const char *filename );
+
+// Init some of the values
+// If not called, the defaults are used
+// barc, framec - colors, posx, posy - position, w, h - size
+void splash_setup( int barc[3], int framec[3], int posx, int posy, int w, int h );
+
+// Create the splash window
+// Return: 1 - success, 0 - failure
+int splash_create_window( int argc, char** argv );
+
+// Destroy the splash window
+void splash_close_window();
+
+// Update the progress bar
+void splash_draw_progress( int progress );
+
+#ifdef __cplusplus
+} // extern "C"
+#endif
+
+#endif // _SPLASHX_H
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/unx/source/start.c b/desktop/unx/source/start.c
new file mode 100644
index 0000000000..d747a7de11
--- /dev/null
+++ b/desktop/unx/source/start.c
@@ -0,0 +1,861 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jan Holesovsky <kendy@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include <signal.h>
+#include <unistd.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <sys/socket.h>
+#include <arpa/inet.h>
+#include <sys/un.h>
+#include <sys/poll.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <libgen.h>
+
+#include <osl/nlsupport.h>
+#include <osl/process.h>
+#include <osl/thread.h>
+#include <rtl/bootstrap.h>
+#include <rtl/digest.h>
+#include <rtl/ustrbuf.h>
+#include <sal/main.h>
+
+#include "splashx.h"
+
+/*
+ * magic argument - if passed, not passed onto soffice.bin but we exit
+ * immediately if we fail to control the process. Used to avoid doing
+ * an un-conditional pagein
+ */
+#define QSEND_AND_REPORT "-qsend-and-report"
+
+#define IMG_SUFFIX ".png"
+#define PIPEDEFAULTPATH "/tmp"
+#define PIPEALTERNATEPATH "/var/tmp"
+
+typedef enum { ProgressContinue, ProgressRestart, ProgressExit } ProgressStatus;
+
+/* Easier conversions: rtl_uString to rtl_String */
+static rtl_String *
+ustr_to_str( rtl_uString *pStr )
+{
+ rtl_String *pOut = NULL;
+
+ rtl_uString2String( &pOut, rtl_uString_getStr( pStr ),
+ rtl_uString_getLength( pStr ), osl_getThreadTextEncoding(), OUSTRING_TO_OSTRING_CVTFLAGS );
+
+ return pOut;
+}
+
+/* Easier conversions: char * to rtl_uString */
+static rtl_uString *
+charp_to_ustr( const char *pStr )
+{
+ rtl_uString *pOut = NULL;
+
+ rtl_string2UString( &pOut, pStr, strlen( pStr ), osl_getThreadTextEncoding(), OSTRING_TO_OUSTRING_CVTFLAGS );
+
+ return pOut;
+}
+
+/* Easier debugging of rtl_uString values. */
+#if OSL_DEBUG_LEVEL > 0
+static void
+ustr_debug( const char *pMessage, rtl_uString *pStr )
+{
+ rtl_String *pOut = ustr_to_str( pStr );
+
+ fprintf( stderr, "%s: %s\n", pMessage, rtl_string_getStr( pOut ) );
+
+ rtl_string_release( pOut );
+ return;
+}
+#else
+#define ustr_debug( a, b ) {}
+#endif
+
+/* Path of the application. */
+static rtl_uString *
+get_app_path( const char *pAppExec )
+{
+ char pRealPath[PATH_MAX];
+ rtl_uString *pResult;
+
+ char *pPath = strdup( pAppExec );
+ pPath = dirname( pPath );
+
+ realpath( pPath, pRealPath );
+ pResult = charp_to_ustr( pRealPath );
+ free( pPath );
+
+ return pResult;
+}
+
+/* Compute the OOo md5 hash from 'pText' */
+static rtl_uString *
+get_md5hash( rtl_uString *pText )
+{
+ rtl_uString *pResult = NULL;
+ sal_Int32 nCapacity = 100;
+
+#if OSL_DEBUG_LEVEL > 0
+ fprintf (stderr, "Generate pipe md5 for '%s'\n", ustr_to_str (pText)->buffer);
+#endif
+
+ if ( !pText )
+ return NULL;
+
+ unsigned char *pData = (unsigned char *)rtl_uString_getStr( pText );
+ sal_uInt32 nSize = rtl_uString_getLength( pText ) * sizeof( sal_Unicode );
+ if ( !pData )
+ return NULL;
+
+ rtlDigest digest = rtl_digest_create( rtl_Digest_AlgorithmMD5 );
+ if ( digest == 0 )
+ return NULL;
+
+ sal_uInt32 md5_key_len = rtl_digest_queryLength( digest );
+ sal_uInt8 *md5_buf = (sal_uInt8 *)calloc( md5_key_len, sizeof( sal_uInt8 ) );
+
+ rtl_digest_init( digest, pData , nSize );
+ rtl_digest_update( digest, pData, nSize );
+ rtl_digest_get( digest, md5_buf, md5_key_len );
+ rtl_digest_destroy( digest );
+
+ /* create hex-value string from the MD5 value to keep
+ the string size minimal */
+ rtl_uString_new_WithLength( &pResult, nCapacity );
+ sal_uInt32 i = 0;
+ for ( ; i < md5_key_len; ++i )
+ {
+ char val[3];
+ snprintf( val, 3, "%x", md5_buf[i] ); /* sic! we ignore some of the 0's */
+
+ rtl_uStringbuffer_insert_ascii( &pResult, &nCapacity, rtl_uString_getLength( pResult ),
+ val, strlen( val ) );
+ }
+
+ /* cleanup */
+ free( md5_buf );
+
+ return pResult;
+}
+
+/* Construct the pipe name */
+static rtl_uString *
+get_pipe_path( rtl_uString *pAppPath )
+{
+ rtl_uString *pPath = NULL, *pTmp = NULL, *pUserInstallation = NULL;
+ rtl_uString *pResult = NULL, *pBasePath = NULL, *pAbsUserInstallation = NULL;
+
+ /* setup bootstrap filename */
+ rtl_uString_newFromAscii( &pPath, "file://" );
+ rtl_uString_newConcat( &pPath, pPath, pAppPath );
+ rtl_uString_newFromAscii( &pTmp, "/" );
+ rtl_uString_newConcat( &pPath, pPath, pTmp );
+ rtl_uString_newFromAscii( &pTmp, SAL_CONFIGFILE( "bootstrap" ) );
+ rtl_uString_newConcat( &pPath, pPath, pTmp );
+
+ ustr_debug( "bootstap", pPath );
+
+ /* read userinstallation value */
+ rtlBootstrapHandle handle = rtl_bootstrap_args_open( pPath );
+
+ rtl_uString_newFromAscii( &pTmp, "UserInstallation" );
+ rtl_bootstrap_get_from_handle( handle, pTmp, &pUserInstallation, NULL );
+
+ rtl_bootstrap_args_close( handle );
+
+ /* turn it into an absolute path - unwinding symlinks etc. */
+ if ( osl_getProcessWorkingDir (&pBasePath) ||
+ osl_getAbsoluteFileURL( pBasePath, pUserInstallation, &pAbsUserInstallation ) )
+ rtl_uString_newFromString (&pAbsUserInstallation, pUserInstallation);
+
+ /* create the pipe name */
+ ustr_debug( "user installation", pAbsUserInstallation );
+ rtl_uString *pMd5hash = get_md5hash( pAbsUserInstallation );
+ if ( !pMd5hash )
+ rtl_uString_new( &pMd5hash );
+
+ if ( access( PIPEDEFAULTPATH, R_OK|W_OK ) == 0 )
+ rtl_uString_newFromAscii( &pResult, PIPEDEFAULTPATH );
+ else
+ rtl_uString_newFromAscii( &pResult, PIPEALTERNATEPATH );
+
+ rtl_uString_newFromAscii( &pTmp, "/OSL_PIPE_" );
+ rtl_uString_newConcat( &pResult, pResult, pTmp );
+
+ sal_Unicode pUnicode[RTL_USTR_MAX_VALUEOFINT32];
+ rtl_ustr_valueOfInt32( pUnicode, (int)getuid(), 10 );
+ rtl_uString_newFromStr( &pTmp, pUnicode );
+ rtl_uString_newConcat( &pResult, pResult, pTmp );
+
+ rtl_uString_newFromAscii( &pTmp, "_SingleOfficeIPC_" );
+ rtl_uString_newConcat( &pResult, pResult, pTmp );
+
+ rtl_uString_newConcat( &pResult, pResult, pMd5hash );
+
+ ustr_debug( "result", pResult );
+
+ /* cleanup */
+ rtl_uString_release( pPath );
+ rtl_uString_release( pTmp );
+ rtl_uString_release( pBasePath );
+ rtl_uString_release( pUserInstallation );
+ rtl_uString_release( pAbsUserInstallation );
+
+ return pResult;
+}
+
+/* Get fd of the pipe of the already running OOo. */
+static int
+connect_pipe( rtl_uString *pPipePath )
+{
+ int fd;
+ size_t len;
+ struct sockaddr_un addr;
+
+ rtl_String *pPipeStr = ustr_to_str( pPipePath );
+
+ memset( &addr, 0, sizeof( addr ) );
+
+ if ( ( fd = socket( AF_UNIX, SOCK_STREAM, 0 ) ) < 0 )
+ return fd;
+
+ fcntl( fd, F_SETFD, FD_CLOEXEC );
+
+ addr.sun_family = AF_UNIX;
+ strncpy( addr.sun_path, rtl_string_getStr( pPipeStr ), sizeof( addr.sun_path ) );
+ rtl_string_release( pPipeStr );
+
+/* cut / paste from osl's pipe.c */
+#if defined(FREEBSD)
+ len = SUN_LEN( &addr );
+#else
+ len = sizeof( addr );
+#endif
+
+ if ( connect( fd, (struct sockaddr *)&addr, len ) < 0 )
+ return -1;
+
+ return fd;
+}
+
+/* Escape: "," -> "\\,", "\0" -> "\\0", "\\" -> "\\\\" */
+static rtl_uString *
+escape_path( rtl_uString *pToEscape )
+{
+ rtl_uString *pBuffer = NULL;
+ sal_Int32 nCapacity = 1000;
+
+ rtl_uString_new_WithLength( &pBuffer, nCapacity );
+
+ sal_Int32 i = 0;
+ sal_Int32 nEscapeLength = rtl_uString_getLength( pToEscape );
+ for ( ; i < nEscapeLength; ++i )
+ {
+ sal_Unicode c = pToEscape->buffer[i];
+ switch ( c )
+ {
+ case (sal_Unicode)'\0':
+ rtl_uStringbuffer_insert_ascii( &pBuffer, &nCapacity,
+ rtl_uString_getLength( pBuffer ),
+ RTL_CONSTASCII_STRINGPARAM( "\\0" ) );
+ break;
+ case (sal_Unicode)',':
+ rtl_uStringbuffer_insert_ascii( &pBuffer, &nCapacity,
+ rtl_uString_getLength( pBuffer ),
+ RTL_CONSTASCII_STRINGPARAM( "\\," ) );
+ break;
+ case (sal_Unicode)'\\':
+ rtl_uStringbuffer_insert_ascii( &pBuffer, &nCapacity,
+ rtl_uString_getLength( pBuffer ),
+ RTL_CONSTASCII_STRINGPARAM( "\\\\" ) );
+ break;
+ default:
+ rtl_uStringbuffer_insert( &pBuffer, &nCapacity,
+ rtl_uString_getLength( pBuffer ),
+ &c, 1 );
+ }
+ }
+
+ return pBuffer;
+}
+
+/* Send args to the OOo instance (using the 'fd' file descriptor) */
+static sal_Bool
+send_args( int fd, rtl_uString *pCwdPath )
+{
+ rtl_uString *pBuffer = NULL, *pTmp = NULL;
+ sal_Int32 nCapacity = 1000;
+ rtl_String *pOut = NULL;
+ sal_Bool bResult;
+ size_t nLen;
+ rtl_uString *pEscapedCwdPath = escape_path( pCwdPath );
+
+ rtl_uString_new_WithLength( &pBuffer, nCapacity );
+ rtl_uString_new( &pTmp );
+
+ rtl_uStringbuffer_insert_ascii( &pBuffer, &nCapacity,
+ rtl_uString_getLength( pBuffer ),
+ RTL_CONSTASCII_STRINGPARAM( "InternalIPC::Arguments" ) );
+
+ if ( rtl_uString_getLength( pEscapedCwdPath ) )
+ {
+ rtl_uStringbuffer_insert_ascii( &pBuffer, &nCapacity,
+ rtl_uString_getLength( pBuffer ),
+ RTL_CONSTASCII_STRINGPARAM( "1" ) );
+ rtl_uStringbuffer_insert( &pBuffer, &nCapacity,
+ rtl_uString_getLength( pBuffer ),
+ rtl_uString_getStr( pEscapedCwdPath ),
+ rtl_uString_getLength( pEscapedCwdPath ) );
+ }
+ else
+ rtl_uStringbuffer_insert_ascii( &pBuffer, &nCapacity,
+ rtl_uString_getLength( pBuffer ),
+ RTL_CONSTASCII_STRINGPARAM( "0" ) );
+
+ sal_Bool bDontConvertNext = sal_False;
+ sal_uInt32 nArg;
+ sal_uInt32 nArgCount = osl_getCommandArgCount();
+ for ( nArg = 0; nArg < nArgCount; ++nArg )
+ {
+ rtl_uStringbuffer_insert_ascii( &pBuffer, &nCapacity,
+ rtl_uString_getLength( pBuffer ),
+ ",", 1 );
+
+ osl_getCommandArg( nArg, &pTmp );
+
+ if ( rtl_uString_getLength( pTmp ) == 0 ||
+ !rtl_ustr_ascii_compare( pTmp->buffer, QSEND_AND_REPORT ) )
+ continue;
+
+ // this is not a param, we have to prepend filenames with file://
+ // FIXME: improve the check
+ if ( ( pTmp->buffer[0] != (sal_Unicode)'-' ) &&
+ ( rtl_ustr_indexOfAscii_WithLength( pTmp->buffer, pTmp->length, "slot:", 5 /* length */ ) ) )
+ {
+ sal_Int32 nFirstColon = rtl_ustr_indexOfChar_WithLength( pTmp->buffer, pTmp->length, ':' );
+ sal_Int32 nFirstSlash = rtl_ustr_indexOfChar_WithLength( pTmp->buffer, pTmp->length, '/' );
+
+ // check that pTmp is not an URI yet
+ if ( nFirstColon < 1 || ( nFirstSlash != nFirstColon + 1 ) )
+ {
+ // some of the switches (currently just -pt) don't want to
+ // have the filenames as URIs
+ if ( !bDontConvertNext )
+ osl_getAbsoluteFileURL( pCwdPath, pTmp, &pTmp );
+ }
+ }
+
+ // don't convert filenames with some of the switches
+ // (currently just -pt)
+ bDontConvertNext = !rtl_ustr_ascii_compareIgnoreAsciiCase( pTmp->buffer, "-pt" );
+
+ rtl_uString *pEscapedTmp = escape_path( pTmp );
+
+ rtl_uStringbuffer_insert( &pBuffer, &nCapacity,
+ rtl_uString_getLength( pBuffer ),
+ rtl_uString_getStr( pEscapedTmp ),
+ rtl_uString_getLength( pEscapedTmp ) );
+
+ rtl_uString_release( pEscapedTmp );
+ }
+
+ ustr_debug( "Pass args", pBuffer );
+
+ pOut = ustr_to_str( pBuffer );
+
+ nLen = rtl_string_getLength( pOut ) + 1;
+ bResult = ( write( fd, rtl_string_getStr( pOut ), nLen ) == (ssize_t) nLen );
+
+ /* cleanup */
+ rtl_uString_release( pEscapedCwdPath );
+ rtl_uString_release( pBuffer );
+ rtl_uString_release( pTmp );
+ rtl_string_release( pOut );
+
+ return bResult;
+}
+
+static void
+load_splash_image( rtl_uString *pUAppPath )
+{
+ char *pBuffer, *pSuffix, *pLocale;
+ int nLocSize;
+ rtl_Locale *pLoc = NULL;
+ rtl_String *pLang, *pCountry, *pAppPath;
+
+ osl_getProcessLocale (&pLoc);
+ pLang = ustr_to_str (pLoc->Language);
+ pCountry = ustr_to_str (pLoc->Country);
+
+ nLocSize = strlen (pLang->buffer) + strlen (pCountry->buffer) + 8;
+ pLocale = malloc (nLocSize);
+ pLocale[0] = '-';
+ strcpy (pLocale + 1, pLang->buffer);
+ strcat (pLocale, "_");
+ strcat (pLocale, pCountry->buffer);
+
+ pAppPath = ustr_to_str (pUAppPath);
+ pBuffer = malloc (pAppPath->length + nLocSize + 256);
+ strcpy (pBuffer, pAppPath->buffer);
+ pSuffix = pBuffer + pAppPath->length;
+
+ strcpy (pSuffix, "/edition/intro");
+ strcat (pSuffix, pLocale);
+ strcat (pSuffix, IMG_SUFFIX);
+ if ( splash_load_bmp( pBuffer ) )
+ goto cleanup;
+
+ strcpy (pSuffix, "/edition/intro" IMG_SUFFIX);
+ if ( splash_load_bmp( pBuffer ) )
+ goto cleanup;
+
+ strcpy (pSuffix, "/intro");
+ strcat (pSuffix, pLocale);
+ strcat (pSuffix, IMG_SUFFIX);
+ if ( splash_load_bmp( pBuffer ) )
+ goto cleanup;
+
+ strcpy (pSuffix, "/intro" IMG_SUFFIX);
+ if ( splash_load_bmp( pBuffer ) )
+ goto cleanup;
+
+ fprintf (stderr, "Failed to find intro image\n");
+
+ cleanup:
+ free (pLocale);
+ free (pBuffer);
+}
+
+/* Fill 'array' with values of the key 'name'.
+ Its value is a comma delimited list of integers */
+static void
+get_bootstrap_value( int *array, int size, rtlBootstrapHandle handle, const char *name )
+{
+ rtl_uString *pKey = NULL, *pValue = NULL;
+ sal_Int32 nIndex = 0;
+ int i = 0;
+
+ /* get the value from the ini file */
+ rtl_uString_newFromAscii( &pKey, name );
+ rtl_bootstrap_get_from_handle( handle, pKey, &pValue, NULL );
+
+ /* the value is several numbers delimited by ',' - parse it */
+ if ( rtl_uString_getLength( pValue ) > 0 )
+ {
+ rtl_uString *pToken = NULL;
+
+ for ( ; ( nIndex >= 0 ) && ( i < size ); ++i )
+ {
+ nIndex = rtl_uString_getToken( &pToken, pValue, 0, ',', nIndex );
+ array[i] = rtl_ustr_toInt32( rtl_uString_getStr( pToken ), 10 );
+ }
+
+ rtl_uString_release( pToken );
+ }
+
+ /* cleanup */
+ rtl_uString_release( pKey );
+ rtl_uString_release( pValue );
+}
+
+/* Load the colors and size of the splash. */
+static void
+load_splash_defaults( rtl_uString *pAppPath, sal_Bool *pInhibitSplash )
+{
+ rtl_uString *pSettings = NULL, *pTmp = NULL;
+ rtlBootstrapHandle handle;
+
+ /* costruct the sofficerc file location */
+ rtl_uString_newFromAscii( &pSettings, "file://" );
+ rtl_uString_newConcat( &pSettings, pSettings, pAppPath );
+ rtl_uString_newFromAscii( &pTmp, "/" );
+ rtl_uString_newConcat( &pSettings, pSettings, pTmp );
+ rtl_uString_newFromAscii( &pTmp, SAL_CONFIGFILE( "soffice" ) );
+ rtl_uString_newConcat( &pSettings, pSettings, pTmp );
+
+ /* use it as the bootstrap file */
+ handle = rtl_bootstrap_args_open( pSettings );
+
+ int logo[1] = { -1 },
+ bar[3] = { -1, -1, -1 },
+ frame[3] = { -1, -1, -1 },
+ pos[2] = { -1, -1 },
+ size[2] = { -1, -1 };
+
+ /* get the values */
+ get_bootstrap_value( logo, 1, handle, "Logo" );
+ get_bootstrap_value( bar, 3, handle, "ProgressBarColor" );
+ get_bootstrap_value( frame, 3, handle, "ProgressFrameColor" );
+ get_bootstrap_value( pos, 2, handle, "ProgressPosition" );
+ get_bootstrap_value( size, 2, handle, "ProgressSize" );
+
+ if ( logo[0] == 0 )
+ *pInhibitSplash = sal_True;
+
+ splash_setup( bar, frame, pos[0], pos[1], size[0], size[1] );
+
+ /* cleanup */
+ rtl_bootstrap_args_close( handle );
+ rtl_uString_release( pSettings );
+ rtl_uString_release( pTmp );
+}
+
+#define BUFFER_LEN 255
+
+/* Read the percent to show in splash. */
+static ProgressStatus
+read_percent( int status_fd, int *pPercent )
+{
+ static char pBuffer[BUFFER_LEN + 1];
+ static char *pNext = pBuffer;
+ static ssize_t nRead = 0;
+
+ char *pBegin;
+ char *pIter;
+
+ /* from the last call */
+ int nNotProcessed = nRead - ( pNext - pBuffer );
+ if ( nNotProcessed >= BUFFER_LEN )
+ return sal_False;
+
+ memmove( pBuffer, pNext, nNotProcessed );
+
+ /* read data */
+ nRead = read( status_fd, pBuffer + nNotProcessed, BUFFER_LEN - nNotProcessed );
+ if ( nRead < 0 )
+ return sal_False;
+
+ nRead += nNotProcessed;
+ pBuffer[nRead] = '\0';
+
+ /* skip old data */
+ pBegin = pBuffer;
+ pNext = pBuffer;
+ for ( pIter = pBuffer; *pIter; ++pIter )
+ if ( *pIter == '\n' )
+ {
+ pBegin = pNext;
+ pNext = pIter + 1;
+ }
+
+#if OSL_DEBUG_LEVEL > 0
+ fprintf( stderr, "Got status: %s\n", pBegin );
+#endif
+ if ( !strncasecmp( pBegin, "end", 3 ) )
+ return ProgressExit;
+ else if ( !strncasecmp( pBegin, "restart", 7 ) )
+ return ProgressRestart;
+ else if ( sscanf( pBegin, "%d%%", pPercent ) )
+ return ProgressContinue;
+
+ /* unexpected - let's exit the splash to be safe */
+ return ProgressExit;
+}
+
+/* Periodically update the splash & the percent acconding to what
+ status_fd says */
+static ProgressStatus
+show_splash( int status_fd )
+{
+ int nRetval;
+ struct pollfd aPfd;
+
+ int nPercent = 0;
+ sal_Bool bFinish = sal_False;
+ ProgressStatus eResult = ProgressExit;
+
+ /* we want to watch status_fd */
+ aPfd.fd = status_fd;
+ aPfd.events = POLLIN;
+
+#if OSL_DEBUG_LEVEL > 0
+ fprintf( stderr, "Starting main loop, status fd: %d\n", status_fd );
+#endif
+
+ /* main loop */
+ do {
+ splash_draw_progress( nPercent );
+
+ /* read from pipe if data available */
+ nRetval = poll( &aPfd, 1, 50 );
+ if ( aPfd.revents & ( POLLERR | POLLHUP | POLLNVAL ) )
+ bFinish = sal_True;
+ else if ( nRetval > 0 )
+ {
+ eResult = read_percent( status_fd, &nPercent );
+ bFinish = ( eResult != ProgressContinue );
+ }
+ else if ( nRetval < 0 )
+ bFinish = sal_True;
+ } while ( !bFinish );
+
+#if OSL_DEBUG_LEVEL > 0
+ fprintf( stderr, "Finishing, result is %s\n",
+ ( eResult == ProgressContinue )? "continue" : ( ( eResult == ProgressRestart )? "restart" : "exit" ) );
+#endif
+ return eResult;
+}
+
+/* Simple system check. */
+static void
+system_checks( void )
+{
+#ifdef LINUX
+ struct stat buf;
+
+ /* check proc is mounted - lots of things fail otherwise */
+ if ( stat( "/proc/version", &buf ) != 0 )
+ {
+ fprintf( stderr, "ERROR: /proc not mounted - OO.o is unlikely to work well if at all" );
+ exit( 1 );
+ }
+#endif
+}
+
+/* Start the OOo application */
+static sal_Bool
+fork_app( rtl_uString *pAppPath, int *status_fd )
+{
+ rtl_uString *pApp = NULL, *pTmp = NULL, *pArg = NULL;
+ rtl_uString **ppArgs;
+ sal_uInt32 nArgs, i;
+
+ oslProcess aProcess;
+ oslProcessError nError;
+ int status_pipe[2];
+
+ system_checks();
+
+ /* application name */
+ rtl_uString_newFromAscii( &pApp, "file://" );
+ rtl_uString_newConcat( &pApp, pApp, pAppPath );
+ rtl_uString_newFromAscii( &pTmp, "/soffice.bin" );
+ rtl_uString_newConcat( &pApp, pApp, pTmp );
+
+ rtl_uString_new( &pTmp );
+
+ /* copy args */
+ nArgs = osl_getCommandArgCount();
+ ppArgs = (rtl_uString **)calloc( nArgs + 1, sizeof( rtl_uString* ) );
+ for ( i = 0; i < nArgs; ++i )
+ {
+ ppArgs[i] = NULL;
+ osl_getCommandArg( i, &pTmp );
+ rtl_uString_newFromString( &(ppArgs[i]), pTmp );
+ }
+
+ /* create pipe */
+ if ( pipe( status_pipe ) < 0 )
+ {
+ fprintf( stderr, "ERROR: no file handles\n");
+ exit( 1 );
+ }
+
+ /* add the pipe arg */
+ sal_Unicode pUnicode[RTL_USTR_MAX_VALUEOFINT32];
+ rtl_ustr_valueOfInt32( pUnicode, status_pipe[1], 10 );
+
+ rtl_uString_newFromAscii( &pArg, "--splash-pipe=" );
+ rtl_uString_newFromStr( &pTmp, pUnicode );
+ rtl_uString_newConcat( &pArg, pArg, pTmp );
+
+ ppArgs[nArgs] = NULL;
+ rtl_uString_newFromString( &(ppArgs[nArgs]), pArg );
+ ++nArgs;
+
+ /* start the OOo process */
+ nError = osl_executeProcess( pApp, ppArgs, nArgs,
+ osl_Process_DETACHED | osl_Process_NORMAL,
+ NULL,
+ NULL,
+ NULL, 0,
+ &aProcess );
+
+ *status_fd = status_pipe[0];
+ close( status_pipe[1] );
+
+ if ( nError != osl_Process_E_None )
+ {
+ fprintf( stderr, "ERROR %d forking process", nError );
+ ustr_debug( "", pApp );
+ return sal_False;
+ }
+
+ return sal_True;
+}
+
+/* Check if 'pArg' is -pCmpWith or --pCmpWith */
+static sal_Bool
+arg_check( rtl_uString *pArg, const char *pCmpWith )
+{
+ sal_Unicode *pUnicode = rtl_uString_getStr( pArg );
+
+ if ( pUnicode[0] == (sal_Unicode)'-' )
+ pUnicode++;
+ else
+ return sal_False;
+
+ /* tolerate -- prefixes etc. */
+ if ( pUnicode[0] == (sal_Unicode)'-' )
+ pUnicode++;
+
+ return !rtl_ustr_ascii_compare( pUnicode, pCmpWith );
+}
+
+static const char *ppInhibit[] = {
+ "nologo", "headless", "invisible", "help", "h", "?", "minimized",
+ NULL };
+static const char *ppTwoArgs[] = {
+ "pt", "display",
+ NULL };
+
+/* Read command line parameters and return whether we display the splash. */
+static sal_Bool
+get_inhibit_splash()
+{
+ rtl_uString *pTmp = NULL;
+ sal_Bool bSkipNextArg = sal_False;
+ const char **ppIter;
+
+ rtl_uString_new( &pTmp );
+
+ sal_uInt32 nArg;
+ sal_uInt32 nArgCount = osl_getCommandArgCount();
+ for ( nArg = 0; nArg < nArgCount; ++nArg )
+ {
+ if ( bSkipNextArg )
+ {
+ bSkipNextArg = sal_False;
+ continue;
+ }
+
+ osl_getCommandArg( nArg, &pTmp );
+
+ /* check for inhibit splash params */
+ for ( ppIter = ppInhibit; *ppIter; ++ppIter )
+ {
+ if ( arg_check( pTmp, *ppIter ) )
+ {
+ rtl_uString_release( pTmp );
+ return sal_True;
+ }
+ }
+ /* check for 2 arguments params */
+ for ( ppIter = ppTwoArgs; *ppIter; ++ppIter )
+ {
+ if ( arg_check( pTmp, *ppIter ) )
+ {
+ bSkipNextArg = sal_True;
+ break;
+ }
+ }
+ }
+
+ /* cleanup */
+ rtl_uString_release( pTmp );
+
+ return sal_False;
+}
+
+SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
+{
+ int fd = 0, status_fd = 0;
+ sal_Bool bInhibitSplash, bSendAndReport;
+ sal_Bool bSentArgs = sal_False;
+ rtl_uString *pAppPath = NULL;
+ rtl_uString *pPipePath = NULL;
+ ProgressStatus eResult = ProgressExit;
+
+ /* turn SIGPIPE into an error */
+ signal( SIGPIPE, SIG_IGN );
+
+ bInhibitSplash = get_inhibit_splash();
+
+ pAppPath = get_app_path( argv[0] );
+ if ( !pAppPath )
+ {
+ fprintf( stderr, "ERROR: Can't read app link\n" );
+ exit( 1 );
+ }
+ ustr_debug( "App path", pAppPath );
+
+ bSendAndReport = argc > 1 && !strcmp (argv[1], QSEND_AND_REPORT);
+
+ pPipePath = get_pipe_path( pAppPath );
+
+ if ( ( fd = connect_pipe( pPipePath ) ) >= 0 )
+ {
+ rtl_uString *pCwdPath = NULL;
+ osl_getProcessWorkingDir( &pCwdPath );
+
+ bSentArgs = send_args( fd, pCwdPath );
+ }
+#if OSL_DEBUG_LEVEL > 0
+ else
+ ustr_debug( "Failed to connect to pipe", pPipePath );
+#endif
+
+ if ( !bSendAndReport && !bSentArgs )
+ {
+ /* we have to exec the binary */
+ do {
+ if ( !fork_app( pAppPath, &status_fd ) )
+ return 1;
+
+ if ( !bInhibitSplash )
+ {
+ load_splash_image( pAppPath );
+ load_splash_defaults( pAppPath, &bInhibitSplash );
+ }
+
+ if ( !bInhibitSplash && splash_create_window( argc, argv ) )
+ {
+ splash_draw_progress( 0 );
+ eResult = show_splash( status_fd );
+ splash_close_window();
+ }
+
+ close( status_fd );
+ } while ( eResult == ProgressRestart );
+ }
+
+ /* cleanup */
+ rtl_uString_release( pAppPath );
+ rtl_uString_release( pPipePath );
+
+ close( fd );
+
+ return bSendAndReport? !bSentArgs : 0;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/unx/splash/makefile.mk b/desktop/unx/splash/makefile.mk
new file mode 100644
index 0000000000..d182173de1
--- /dev/null
+++ b/desktop/unx/splash/makefile.mk
@@ -0,0 +1,71 @@
+#
+# Version: MPL 1.1 / GPLv3+ / LGPLv3+
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#
+# The Initial Developer of the Original Code is
+# Novell, Inc.
+# Portions created by the Initial Developer are Copyright (C) 2010 the
+# Initial Developer. All Rights Reserved.
+#
+# Contributor(s): Jan Holesovsky <kendy@novell.com>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+# the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+# in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+# instead of those above.
+#
+PRJ=..$/..
+
+PRJNAME=desktop
+TARGET=spl_unx
+LIBTARGET=NO
+
+ENABLE_EXCEPTIONS=TRUE
+
+# --- Settings -----------------------------------------------------
+
+.INCLUDE : settings.mk
+
+.IF "$(ENABLE_UNIX_QUICKSTARTER)"!="TRUE"
+
+dummy:
+ @echo "Unix quickstarter disabled"
+
+.ELSE
+
+# --- Files --------------------------------------------------------
+
+SLOFILES = $(SLO)$/unxsplash.obj \
+ $(SLO)$/services_unxsplash.obj
+
+SHL1DEPN= makefile.mk
+SHL1OBJS= $(SLOFILES)
+
+
+SHL1TARGET=$(TARGET)$(DLLPOSTFIX)
+SHL1IMPLIB=i$(TARGET)
+
+SHL1VERSIONMAP=exports.map
+SHL1DEF=$(MISC)$/$(SHL1TARGET).def
+DEF1NAME=$(SHL1TARGET)
+
+SHL1STDLIBS= \
+ $(CPPUHELPERLIB) \
+ $(CPPULIB) \
+ $(SALLIB)
+
+.ENDIF # ENABLE_UNIX_QUICKSTARTER
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
diff --git a/desktop/unx/splash/services_unxsplash.cxx b/desktop/unx/splash/services_unxsplash.cxx
new file mode 100644
index 0000000000..2e472983ed
--- /dev/null
+++ b/desktop/unx/splash/services_unxsplash.cxx
@@ -0,0 +1,159 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * Copyright 2010, Novell Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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.
+ *
+ * Contributor(s): Jan Holesovsky <kendy@novell.com>
+ *
+ ************************************************************************/
+#include <com/sun/star/beans/NamedValue.hpp>
+#include <com/sun/star/registry/XRegistryKey.hpp>
+#include <com/sun/star/util/Date.hpp>
+#include <uno/environment.h>
+#include <cppuhelper/factory.hxx>
+#include <unotools/configmgr.hxx>
+
+#include <string.h>
+
+#include "unxsplash.hxx"
+
+using namespace rtl;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
+using namespace ::com::sun::star::registry;
+using namespace ::desktop;
+
+static const char* pServices[] =
+{
+ UnxSplashScreen::serviceName,
+ NULL
+};
+
+static const char* pImplementations[] =
+{
+ UnxSplashScreen::implementationName,
+ NULL
+};
+
+typedef Reference<XInterface>(* fProvider)( const Reference<XMultiServiceFactory>& );
+
+static const fProvider pInstanceProviders[] =
+{
+ UnxSplashScreen::getInstance,
+ NULL
+};
+
+
+static const char** pSupportedServices[] =
+{
+ UnxSplashScreen::interfaces,
+ NULL
+};
+
+static Sequence<OUString>
+getSupportedServiceNames( int p ) {
+ const char **names = pSupportedServices[p];
+ Sequence<OUString> aSeq;
+ for ( int i = 0; names[i] != NULL; i++ )
+ {
+ aSeq.realloc( i+1 );
+ aSeq[i] = OUString::createFromAscii( names[i] );
+ }
+ return aSeq;
+}
+
+extern "C"
+{
+void SAL_CALL
+component_getImplementationEnvironment(
+ const sal_Char** ppEnvironmentTypeName,
+ uno_Environment** /*ppEnvironment*/ )
+{
+ *ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
+}
+
+sal_Bool SAL_CALL
+component_writeInfo(
+ void* pServiceManager,
+ void* pRegistryKey )
+{
+ Reference<XMultiServiceFactory> xMan(
+ reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
+ Reference<XRegistryKey> xKey(
+ reinterpret_cast< XRegistryKey* >( pRegistryKey ) ) ;
+
+ // iterate over service names and register them...
+ OUString aImpl;
+ const char* pServiceName = NULL;
+ const char* pImplName = NULL;
+ for ( int i = 0; ( pServices[i] != NULL ) && ( pImplementations[i] != NULL ); i++ )
+ {
+ pServiceName= pServices[i];
+ pImplName = pImplementations[i];
+ aImpl = OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ))
+ + OUString::createFromAscii( pImplName )
+ + OUString(RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" ));
+ Reference<XRegistryKey> xNewKey = xKey->createKey( aImpl );
+ xNewKey->createKey( OUString::createFromAscii( pServiceName ) );
+ }
+ return sal_True;
+}
+
+void* SAL_CALL
+component_getFactory(
+ const sal_Char* pImplementationName,
+ void* pServiceManager,
+ void* /*pRegistryKey*/ )
+{
+ // Set default return value for this operation - if it failed.
+ if ( pImplementationName && pServiceManager )
+ {
+ Reference< XSingleServiceFactory > xFactory;
+ Reference< XMultiServiceFactory > xServiceManager(
+ reinterpret_cast< XMultiServiceFactory* >( pServiceManager ) ) ;
+
+ // search implementation
+ for ( int i = 0; ( pImplementations[i] != NULL ); i++ )
+ {
+ if ( strcmp( pImplementations[i], pImplementationName ) == 0 )
+ {
+ // found implementation
+ xFactory = Reference<XSingleServiceFactory>( cppu::createSingleFactory(
+ xServiceManager, OUString::createFromAscii( pImplementationName ),
+ pInstanceProviders[i], getSupportedServiceNames( i ) ) );
+ if ( xFactory.is() )
+ {
+ // Factory is valid - service was found.
+ xFactory->acquire();
+ return xFactory.get();
+ }
+ }
+ }
+ }
+
+ return NULL;
+}
+} // extern "C"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/unx/splash/unxsplash.cxx b/desktop/unx/splash/unxsplash.cxx
new file mode 100644
index 0000000000..f51e22a7c1
--- /dev/null
+++ b/desktop/unx/splash/unxsplash.cxx
@@ -0,0 +1,164 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * Copyright 2010, Novell Inc.
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * 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.
+ *
+ * Contributor(s): Jan Holesovsky <kendy@novell.com>
+ *
+ ************************************************************************/
+#include "unxsplash.hxx"
+#include <stdio.h>
+#include <unotools/bootstrap.hxx>
+#include <osl/process.h>
+#include <tools/urlobj.hxx>
+#include <tools/stream.hxx>
+#include <sfx2/sfx.hrc>
+#include <com/sun/star/registry/XRegistryKey.hpp>
+#include <rtl/logfile.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <rtl/math.hxx>
+
+#define PIPE_ARG "--splash-pipe="
+
+using namespace ::rtl;
+using namespace ::com::sun::star::registry;
+
+namespace desktop
+{
+
+UnxSplashScreen::UnxSplashScreen( const Reference< XMultiServiceFactory >& rSMgr )
+ : m_rFactory( rSMgr ),
+ m_pOutFd( NULL )
+{
+}
+
+UnxSplashScreen::~UnxSplashScreen()
+{
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "UnxSplashScreen::~UnxSplashScreen()\n" );
+#endif
+
+ if ( m_pOutFd )
+ {
+ fclose( m_pOutFd );
+ m_pOutFd = NULL;
+ }
+}
+
+void SAL_CALL UnxSplashScreen::start( const OUString& /*aText*/, sal_Int32 /*nRange*/ )
+ throw ( RuntimeException )
+{
+}
+
+void SAL_CALL UnxSplashScreen::end()
+ throw ( RuntimeException )
+{
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "UnxSplashScreen::end()\n" );
+#endif
+
+ fprintf( m_pOutFd, "end\n" );
+ fflush( m_pOutFd );
+}
+
+void SAL_CALL UnxSplashScreen::reset()
+ throw ( RuntimeException )
+{
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "UnxSplashScreen::reset()\n" );
+#endif
+
+ fprintf( m_pOutFd, "restart\n" );
+ fflush( m_pOutFd );
+}
+
+void SAL_CALL UnxSplashScreen::setText( const OUString& /*aText*/ )
+ throw ( RuntimeException )
+{
+ // TODO?
+}
+
+void SAL_CALL UnxSplashScreen::setValue( sal_Int32 nValue )
+ throw ( RuntimeException )
+{
+ if ( m_pOutFd )
+ {
+ fprintf( m_pOutFd, "%"SAL_PRIdINT32"%%\n", nValue );
+ fflush( m_pOutFd );
+ }
+}
+
+// XInitialize
+void SAL_CALL
+UnxSplashScreen::initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>& )
+ throw ( RuntimeException )
+{
+ for ( sal_uInt32 i = 0; i < osl_getCommandArgCount(); i++ )
+ {
+ rtl::OUString aArg;
+ if ( osl_getCommandArg( i, &aArg.pData ) )
+ break;
+ if ( aArg.matchIgnoreAsciiCaseAsciiL( PIPE_ARG, sizeof( PIPE_ARG ) - 1, 0 ) )
+ {
+ OUString aNum = aArg.copy( sizeof( PIPE_ARG ) - 1 );
+ int fd = aNum.toInt32();
+ m_pOutFd = fdopen( fd, "w" );
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "Got argument '--splash-pipe=%d ('%s') (%p)\n",
+ fd, (const sal_Char *)rtl::OUStringToOString( aNum, RTL_TEXTENCODING_UTF8 ),
+ m_pOutFd );
+#endif
+ }
+ }
+}
+
+// get service instance...
+UnxSplashScreen *UnxSplashScreen::m_pINSTANCE = NULL;
+osl::Mutex UnxSplashScreen::m_aMutex;
+
+Reference< XInterface > UnxSplashScreen::getInstance( const Reference< XMultiServiceFactory >& rSMgr )
+{
+ if ( m_pINSTANCE == NULL )
+ {
+ osl::MutexGuard guard( m_aMutex );
+ if ( m_pINSTANCE == NULL )
+ return (XComponent*) new UnxSplashScreen( rSMgr );
+ }
+
+ return (XComponent*)NULL;
+}
+
+// static service info...
+const char* UnxSplashScreen::interfaces[] =
+{
+ "com.sun.star.task.XStartusIndicator",
+ "com.sun.star.lang.XInitialization",
+ NULL,
+};
+const sal_Char *UnxSplashScreen::serviceName = "com.sun.star.office.PipeSplashScreen";
+const sal_Char *UnxSplashScreen::implementationName = "com.sun.star.office.comp.PipeSplashScreen";
+const sal_Char *UnxSplashScreen::supportedServiceNames[] = { "com.sun.star.office.PipeSplashScreen", NULL };
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/unx/splash/unxsplash.hxx b/desktop/unx/splash/unxsplash.hxx
new file mode 100644
index 0000000000..abe5a8cac2
--- /dev/null
+++ b/desktop/unx/splash/unxsplash.hxx
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ * http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * The Initial Developer of the Original Code is
+ * Novell, Inc.
+ * Portions created by the Initial Developer are Copyright (C) 2010 the
+ * Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s): Jan Holesovsky <kendy@novell.com>
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+#include <stdio.h>
+
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/uno/Exception.hpp>
+#include <com/sun/star/uno/Reference.h>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/task/XStatusIndicator.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <cppuhelper/implbase2.hxx>
+#include <cppuhelper/interfacecontainer.h>
+#include <com/sun/star/lang/XSingleServiceFactory.hpp>
+#include <osl/mutex.hxx>
+#include <rtl/bootstrap.hxx>
+
+using namespace ::rtl;
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::task;
+
+namespace desktop {
+
+class UnxSplashScreen : public ::cppu::WeakImplHelper2< XStatusIndicator, XInitialization >
+{
+private:
+ // don't allow anybody but ourselves to create instances of this class
+ UnxSplashScreen( const UnxSplashScreen& );
+ UnxSplashScreen( void );
+ UnxSplashScreen operator =( const UnxSplashScreen& );
+
+ UnxSplashScreen( const Reference< XMultiServiceFactory >& xFactory );
+
+ virtual ~UnxSplashScreen();
+
+ static UnxSplashScreen *m_pINSTANCE;
+
+ static osl::Mutex m_aMutex;
+ Reference< XMultiServiceFactory > m_rFactory;
+
+ FILE *m_pOutFd;
+
+public:
+ static const char* interfaces[];
+ static const sal_Char *serviceName;
+ static const sal_Char *implementationName;
+ static const sal_Char *supportedServiceNames[];
+
+ static Reference< XInterface > getInstance( const Reference < XMultiServiceFactory >& xFactory );
+
+ // XStatusIndicator
+ virtual void SAL_CALL start( const OUString& aText, sal_Int32 nRange ) throw ( RuntimeException );
+ virtual void SAL_CALL end() throw ( RuntimeException );
+ virtual void SAL_CALL reset() throw ( RuntimeException );
+ virtual void SAL_CALL setText( const OUString& aText ) throw ( RuntimeException );
+ virtual void SAL_CALL setValue( sal_Int32 nValue ) throw ( RuntimeException );
+
+ // XInitialize
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>& aArguments ) throw ( RuntimeException );
+};
+
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/util/makefile.mk b/desktop/util/makefile.mk
index bc2ec6c740..d86ebea140 100644
--- a/desktop/util/makefile.mk
+++ b/desktop/util/makefile.mk
@@ -57,22 +57,9 @@ RCFILES=ooverinfo2.rc
LINKFLAGSAPPGUI!:= $(LINKFLAGSAPPGUI:s/-bind_at_load//)
.ENDIF # MACOSX
-#.IF "$(OS)" == "LINUX" || "$(OS)" == "FREEBSD" || "$(OS)" == "NETBSD"
-## #74158# linux needs sal/vos/tools at end of link list, solaris needs it first,
-## winXX is handled like solaris for now
-#APP1_STDPRE=
-#APP1_STDPOST=$(CPPULIB) $(CPPUHELPERLIB) $(UNOLIB) $(TOOLSLIB) \
-# $(VOSLIB) $(SALLIB)
-#.ELSE
-#APP1_STDPRE=$(SALLIB) $(VOSLIB) $(TOOLSLIB) $(UNOLIB) $(CPPULIB) \
-# $(CPPUHELPERLIB)
-#APP1_STDPOST=
-#.ENDIF
-
RESLIB1NAME= dkt
RESLIB1IMAGES= $(PRJ)$/res
-RESLIB1SRSFILES= $(SRS)$/desktop.srs \
- $(SRS)$/wizard.srs
+RESLIB1SRSFILES= $(SRS)$/desktop.srs
.IF "$(L10N_framework)"==""
.IF "$(LINK_SO)"=="TRUE"
diff --git a/desktop/util/ooverinfo.rc b/desktop/util/ooverinfo.rc
index 6d92e2a995..2252ec8eb7 100644
--- a/desktop/util/ooverinfo.rc
+++ b/desktop/util/ooverinfo.rc
@@ -25,10 +25,6 @@
*
*************************************************************************/
-#if !defined(ENGLISH)
-#define LG_D // generate always german version
-#endif
-
#define VER_FIRSTYEAR 2000
#include <windows.h>
@@ -50,11 +46,7 @@ VS_VERSION_INFO versioninfo
VS_FF_PRERELEASE |
#endif
0
-#ifndef WIN32
- fileos VOS_DOS_WINDOWS16
-#else
fileos VOS_NT_WINDOWS32
-#endif
filetype VFT_APP
{
block "StringFileInfo"
@@ -75,7 +67,7 @@ VS_VERSION_INFO versioninfo
block "040904E4"
{
// International StringTable
- value "CompanyName", "OpenOffice.org\0"
+ value "CompanyName", "The Document Foundation\0"
value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
value "FileVersion", PPS(VER_LEVEL) "\0"
value "ProductVersion", PPS(VER_LEVEL) "\0"
@@ -83,16 +75,11 @@ VS_VERSION_INFO versioninfo
value "InternalName", "SOFFICE\0"
value "LegalCopyright", S_CRIGHT " Oracle, Inc.\0"
}
-#endif
}
block "VarFileInfo"
{
-#ifdef LG_D
- value "Translation", 0x0407, 1252
-#else
value "Translation", 0x0409, 1252
-#endif
}
}
diff --git a/desktop/util/template.manifest b/desktop/util/template.manifest
index dbed81ce3f..d3bd0c101f 100644
--- a/desktop/util/template.manifest
+++ b/desktop/util/template.manifest
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
-<assemblyIdentity version="1.0.0.0" processorArchitecture="x86" name="OpenOffice" type="win32" />
-<description>http://www.openoffice.org</description>
+<assemblyIdentity version="1.0.0.0" processorArchitecture="x86" name="LibreOffice" type="win32" />
+<description>http://www.documentfoundation.org</description>
<dependency>
<dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" publicKeyToken="6595b64144ccf1df" language="*" processorArchitecture="x86"/>
diff --git a/desktop/util/verinfo.rc b/desktop/util/verinfo.rc
index 7d589956ec..082f9e6915 100755
--- a/desktop/util/verinfo.rc
+++ b/desktop/util/verinfo.rc
@@ -25,10 +25,6 @@
*
*************************************************************************/
-#if !defined(ENGLISH)
-#define LG_D // generate always german version
-#endif
-
#define VER_FIRSTYEAR 2007
#include <windows.h>
@@ -55,11 +51,7 @@ VS_VERSION_INFO versioninfo
VS_FF_PRERELEASE |
#endif
0
-#ifndef WIN32
- fileos VOS_DOS_WINDOWS16
-#else
fileos VOS_NT_WINDOWS32
-#endif
filetype VFT_APP
{
block "StringFileInfo"
@@ -88,16 +80,11 @@ VS_VERSION_INFO versioninfo
value "InternalName", "SOFFICE\0"
value "LegalCopyright", S_CRIGHT " Oracle and/or its affiliates. All rights reserved.\0"
}
-#endif
}
block "VarFileInfo"
{
-#ifdef LG_D
- value "Translation", 0x0407, 1252
-#else
value "Translation", 0x0409, 1252
-#endif
}
}
diff --git a/desktop/win32/source/applauncher/launcher.cxx b/desktop/win32/source/applauncher/launcher.cxx
index dceb07a7e9..dd50c351a9 100644
--- a/desktop/win32/source/applauncher/launcher.cxx
+++ b/desktop/win32/source/applauncher/launcher.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -144,3 +145,4 @@ extern "C" int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
return GetLastError();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/applauncher/launcher.hxx b/desktop/win32/source/applauncher/launcher.hxx
index b1b4033b27..444789c96a 100644
--- a/desktop/win32/source/applauncher/launcher.hxx
+++ b/desktop/win32/source/applauncher/launcher.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#pragma once
#ifndef __cplusplus
#error Need C++ to compile
@@ -19,3 +20,5 @@
#define OFFICE_IMAGE_NAME _T("soffice")
extern _TCHAR APPLICATION_SWITCH[];
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/applauncher/ooo/verinfo.rc b/desktop/win32/source/applauncher/ooo/verinfo.rc
index c13e723527..623400a255 100755
--- a/desktop/win32/source/applauncher/ooo/verinfo.rc
+++ b/desktop/win32/source/applauncher/ooo/verinfo.rc
@@ -25,10 +25,6 @@
*
*************************************************************************/
-#if !defined(ENGLISH)
-#define LG_D // generate always german version
-#endif
-
#define VER_FIRSTYEAR 2009
#include <windows.h>
@@ -50,11 +46,7 @@ VS_VERSION_INFO versioninfo
VS_FF_PRERELEASE |
#endif
0
-#ifndef WIN32
- fileos VOS_DOS_WINDOWS16
-#else
fileos VOS_NT_WINDOWS32
-#endif
filetype VFT_APP
{
block "StringFileInfo"
@@ -75,7 +67,7 @@ VS_VERSION_INFO versioninfo
block "040904E4"
{
// International StringTable
- value "CompanyName", "OpenOffice.org\0"
+ value "CompanyName", "The Document Foundation\0"
value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
value "FileVersion", PPS(VER_LEVEL) "\0"
value "ProductVersion", PPS(VER_LEVEL) "\0"
@@ -83,15 +75,10 @@ VS_VERSION_INFO versioninfo
value "InternalName", PPS(RES_APP_NAME) "\0"
value "LegalCopyright", S_CRIGHT " Oracle and/or its affiliates. All rights reserved.\0"
}
-#endif
}
block "VarFileInfo"
{
-#ifdef LG_D
- value "Translation", 0x0407, 1252
-#else
value "Translation", 0x0409, 1252
-#endif
}
}
diff --git a/desktop/win32/source/applauncher/sbase.cxx b/desktop/win32/source/applauncher/sbase.cxx
index df20e3be57..df940d0267 100644
--- a/desktop/win32/source/applauncher/sbase.cxx
+++ b/desktop/win32/source/applauncher/sbase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,3 +33,5 @@
#include "launcher.hxx"
_TCHAR APPLICATION_SWITCH[] = _T( "-base" );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/applauncher/scalc.cxx b/desktop/win32/source/applauncher/scalc.cxx
index 61147a345d..ed741c28e0 100644
--- a/desktop/win32/source/applauncher/scalc.cxx
+++ b/desktop/win32/source/applauncher/scalc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,3 +33,5 @@
#include "launcher.hxx"
_TCHAR APPLICATION_SWITCH[] = _T( "-calc" );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/applauncher/sdraw.cxx b/desktop/win32/source/applauncher/sdraw.cxx
index e880abfc46..c8aa2f62f8 100644
--- a/desktop/win32/source/applauncher/sdraw.cxx
+++ b/desktop/win32/source/applauncher/sdraw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,3 +33,5 @@
#include "launcher.hxx"
_TCHAR APPLICATION_SWITCH[] = _T( "-draw" );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/applauncher/simpress.cxx b/desktop/win32/source/applauncher/simpress.cxx
index 350a4037e4..6160827922 100644
--- a/desktop/win32/source/applauncher/simpress.cxx
+++ b/desktop/win32/source/applauncher/simpress.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,3 +33,5 @@
#include "launcher.hxx"
_TCHAR APPLICATION_SWITCH[] = _T( "-impress" );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/applauncher/smath.cxx b/desktop/win32/source/applauncher/smath.cxx
index d42165b4ec..cec6bbdca1 100644
--- a/desktop/win32/source/applauncher/smath.cxx
+++ b/desktop/win32/source/applauncher/smath.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,3 +33,5 @@
#include "launcher.hxx"
_TCHAR APPLICATION_SWITCH[] = _T( "-math" );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/applauncher/sweb.cxx b/desktop/win32/source/applauncher/sweb.cxx
index a044dad91c..578239dd1a 100644
--- a/desktop/win32/source/applauncher/sweb.cxx
+++ b/desktop/win32/source/applauncher/sweb.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -32,3 +33,5 @@
#include "launcher.hxx"
_TCHAR APPLICATION_SWITCH[] = _T( "-web" );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/applauncher/swriter.cxx b/desktop/win32/source/applauncher/swriter.cxx
index f90091e0fb..5235e5b7b2 100644
--- a/desktop/win32/source/applauncher/swriter.cxx
+++ b/desktop/win32/source/applauncher/swriter.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,3 +31,5 @@
#include "launcher.hxx"
_TCHAR APPLICATION_SWITCH[] = _T( "-writer" );
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/applauncher/verinfo.rc b/desktop/win32/source/applauncher/verinfo.rc
index c0ff714940..1534b46b18 100755
--- a/desktop/win32/source/applauncher/verinfo.rc
+++ b/desktop/win32/source/applauncher/verinfo.rc
@@ -25,10 +25,6 @@
*
*************************************************************************/
-#if !defined(ENGLISH)
-#define LG_D // generate always german version
-#endif
-
#define VER_FIRSTYEAR 2009
#include <windows.h>
@@ -55,11 +51,7 @@ VS_VERSION_INFO versioninfo
VS_FF_PRERELEASE |
#endif
0
-#ifndef WIN32
- fileos VOS_DOS_WINDOWS16
-#else
fileos VOS_NT_WINDOWS32
-#endif
filetype VFT_APP
{
block "StringFileInfo"
@@ -88,15 +80,10 @@ VS_VERSION_INFO versioninfo
value "InternalName", PPS(RES_APP_NAME) "\0"
value "LegalCopyright", S_CRIGHT " Oracle and/or its affiliates. All rights reserved.\0"
}
-#endif
}
block "VarFileInfo"
{
-#ifdef LG_D
- value "Translation", 0x0407, 1252
-#else
value "Translation", 0x0409, 1252
-#endif
}
}
diff --git a/desktop/win32/source/extendloaderenvironment.cxx b/desktop/win32/source/extendloaderenvironment.cxx
index bf9f6bf982..436003c770 100644
--- a/desktop/win32/source/extendloaderenvironment.cxx
+++ b/desktop/win32/source/extendloaderenvironment.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -180,3 +181,5 @@ void extendLoaderEnvironment(WCHAR * binPath, WCHAR * iniDirectory) {
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/extendloaderenvironment.hxx b/desktop/win32/source/extendloaderenvironment.hxx
index 5fbd65900a..2c1207a0db 100644
--- a/desktop/win32/source/extendloaderenvironment.hxx
+++ b/desktop/win32/source/extendloaderenvironment.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -93,3 +94,5 @@ void extendLoaderEnvironment(WCHAR * binPath, WCHAR * iniDirectory);
}
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/guiloader/genericloader.cxx b/desktop/win32/source/guiloader/genericloader.cxx
index bef67b2df0..ac84ed3510 100644
--- a/desktop/win32/source/guiloader/genericloader.cxx
+++ b/desktop/win32/source/guiloader/genericloader.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -174,3 +175,4 @@ int __cdecl _tmain()
return GenericMain();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/guistdio/guistdio.cxx b/desktop/win32/source/guistdio/guistdio.cxx
index 3c1f3f220d..7ebf4cb120 100644
--- a/desktop/win32/source/guistdio/guistdio.cxx
+++ b/desktop/win32/source/guistdio/guistdio.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,3 +29,5 @@
#include "precompiled_desktop.hxx"
#include "guistdio.inc"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/guistdio/guistdio.inc b/desktop/win32/source/guistdio/guistdio.inc
index 7f2bbe9002..05d462d231 100644
--- a/desktop/win32/source/guistdio/guistdio.inc
+++ b/desktop/win32/source/guistdio/guistdio.inc
@@ -43,6 +43,7 @@
#include <systools/win32/uwinapi.h>
#include <stdio.h>
+#include <sal/macros.h>
#ifdef UNOPKG
@@ -358,7 +359,7 @@ int _tmain( int, _TCHAR ** )
{
size_t len = lpLastDot - szModuleFileName;
_tcsncpy( szTargetFileName, szModuleFileName, len );
- _tcsncpy( szTargetFileName + len, _T(".EXE"), sizeof(szTargetFileName)/sizeof(szTargetFileName[0]) - len );
+ _tcsncpy( szTargetFileName + len, _T(".EXE"), SAL_N_ELEMENTS(szTargetFileName) - len );
}
// Create process with same command line, environment and stdio handles which
@@ -410,13 +411,13 @@ int _tmain( int, _TCHAR ** )
};
#ifdef UNOPKG
- dwWaitResult = WaitForMultipleObjects( elementsof(hObjects), hObjects, TRUE, INFINITE );
+ dwWaitResult = WaitForMultipleObjects( SAL_N_ELEMENTS(hObjects), hObjects, TRUE, INFINITE );
#else
bool bDetach = false;
int nOpenPipes = 2;
do
{
- dwWaitResult = WaitForMultipleObjects( elementsof(hObjects), hObjects, FALSE, INFINITE );
+ dwWaitResult = WaitForMultipleObjects( SAL_N_ELEMENTS(hObjects), hObjects, FALSE, INFINITE );
switch ( dwWaitResult )
{
diff --git a/desktop/win32/source/guistdio/unopkgio.cxx b/desktop/win32/source/guistdio/unopkgio.cxx
index d038a2f75f..af99179c5f 100644
--- a/desktop/win32/source/guistdio/unopkgio.cxx
+++ b/desktop/win32/source/guistdio/unopkgio.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,3 +30,5 @@
#define UNOPKG
#include "guistdio.inc"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/lwrapa.cxx b/desktop/win32/source/lwrapa.cxx
index ce3250c311..11e4b9e400 100644
--- a/desktop/win32/source/lwrapa.cxx
+++ b/desktop/win32/source/lwrapa.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,3 +31,5 @@
#include "precompiled_desktop.hxx"
#define LOCAL
#include "wrapper.h"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/lwrapw.cxx b/desktop/win32/source/lwrapw.cxx
index fed35f3a22..6a9b72ca30 100644
--- a/desktop/win32/source/lwrapw.cxx
+++ b/desktop/win32/source/lwrapw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,3 +32,5 @@
#define LOCAL
#define UNICODE
#include "wrapper.h"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/main.h b/desktop/win32/source/main.h
index eb39548fcc..9e72fb9c3e 100644
--- a/desktop/win32/source/main.h
+++ b/desktop/win32/source/main.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#pragma once
#ifdef __cplusplus
@@ -11,3 +12,4 @@ int MainW();
} /* extern "C" */
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx
index 42a152e6c4..9139b8d4ff 100644
--- a/desktop/win32/source/officeloader/officeloader.cxx
+++ b/desktop/win32/source/officeloader/officeloader.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,6 +51,7 @@
#include <systools/win32/uwinapi.h>
#include "rtl/string.h"
+#include <sal/macros.h>
#include "../../../source/inc/exithelper.hxx"
#include "../extendloaderenvironment.hxx"
@@ -200,7 +202,7 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
{
size_t len = lpLastSlash - szModuleFileName + 1;
_tcsncpy( szPerfTuneIniFile, szModuleFileName, len );
- _tcsncpy( szPerfTuneIniFile + len, _T("perftune.ini"), sizeof(szPerfTuneIniFile)/sizeof(szPerfTuneIniFile[0]) - len );
+ _tcsncpy( szPerfTuneIniFile + len, _T("perftune.ini"), SAL_N_ELEMENTS(szPerfTuneIniFile) - len );
}
// Create process with same command line, environment and stdio handles which
@@ -228,7 +230,7 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
TEXT("FastPipeCommunication"),
TEXT("0"),
szKey,
- elementsof(szKey),
+ SAL_N_ELEMENTS(szKey),
szPerfTuneIniFile
);
@@ -256,10 +258,10 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
fSuccess = ConvertSidToStringSid( pSid, &szUserIdent );
- _tcsncpy( szPipeName, PIPE_PREFIX, elementsof(szPipeName) );
- _tcsncat( szPipeName, szUserIdent, elementsof(szPipeName) - _tcslen(szPipeName) - 1 );
- _tcsncat( szPipeName, PIPE_POSTFIX, elementsof(szPipeName) - _tcslen(szPipeName) - 1 );
- _tcsncat( szPipeName, _ultot( SUPD, szSUPD, 10), elementsof(szPipeName) - _tcslen(szPipeName) - 1 );
+ _tcsncpy( szPipeName, PIPE_PREFIX, SAL_N_ELEMENTS(szPipeName) );
+ _tcsncat( szPipeName, szUserIdent, SAL_N_ELEMENTS(szPipeName) - _tcslen(szPipeName) - 1 );
+ _tcsncat( szPipeName, PIPE_POSTFIX, SAL_N_ELEMENTS(szPipeName) - _tcslen(szPipeName) - 1 );
+ _tcsncat( szPipeName, _ultot( SUPD, szSUPD, 10), SAL_N_ELEMENTS(szPipeName) - _tcslen(szPipeName) - 1 );
LocalFree( szUserIdent );
@@ -423,3 +425,5 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
return fSuccess ? dwExitCode : -1;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/rebase/Resource.h b/desktop/win32/source/rebase/Resource.h
index dccac77aae..8c892111c9 100644
--- a/desktop/win32/source/rebase/Resource.h
+++ b/desktop/win32/source/rebase/Resource.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,3 +37,5 @@
#define IDI_REBASEGUI 99
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/rebase/rebase.cxx b/desktop/win32/source/rebase/rebase.cxx
index 534d4615a3..ee96d71e89 100644
--- a/desktop/win32/source/rebase/rebase.cxx
+++ b/desktop/win32/source/rebase/rebase.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
diff --git a/desktop/win32/source/rebase/rebasegui.cxx b/desktop/win32/source/rebase/rebasegui.cxx
index d512a872da..0d3b32921b 100644
--- a/desktop/win32/source/rebase/rebasegui.cxx
+++ b/desktop/win32/source/rebase/rebasegui.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
diff --git a/desktop/win32/source/rwrapa.cxx b/desktop/win32/source/rwrapa.cxx
index 4d4191a765..4d1f599f01 100644
--- a/desktop/win32/source/rwrapa.cxx
+++ b/desktop/win32/source/rwrapa.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,3 +31,5 @@
#include "precompiled_desktop.hxx"
#define REMOTE
#include "wrapper.h"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/rwrapw.cxx b/desktop/win32/source/rwrapw.cxx
index 77a0858117..d4912990e4 100644
--- a/desktop/win32/source/rwrapw.cxx
+++ b/desktop/win32/source/rwrapw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,3 +32,5 @@
#define REMOTE
#define UNICODE
#include "wrapper.h"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/setup/Resource.h b/desktop/win32/source/setup/Resource.h
index 6b17f3bfe5..2f075004d6 100644
--- a/desktop/win32/source/setup/Resource.h
+++ b/desktop/win32/source/setup/Resource.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -77,3 +78,5 @@
#define IDI_INSTALLER 99
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/setup/setup.cpp b/desktop/win32/source/setup/setup.cpp
index c716ee00f5..69d09a47f6 100755
--- a/desktop/win32/source/setup/setup.cpp
+++ b/desktop/win32/source/setup/setup.cpp
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -26,6 +27,7 @@
************************************************************************/
#define WIN // scope W32 API
+#define _WIN32_WINNT 0x0501
#if defined _MSC_VER
#pragma warning(push, 1)
@@ -263,22 +265,21 @@ boolean SetupAppX::GetProfileSection( LPCTSTR pFileName, LPCTSTR pSection,
{
if ( !rSize || !*pRetBuf )
{
- rSize = 512;
+ rSize = 10000;
*pRetBuf = new TCHAR[ rSize ];
}
DWORD nRet = GetPrivateProfileSection( pSection, *pRetBuf, rSize, pFileName );
- if ( nRet && ( nRet + 2 > rSize ) ) // buffer was too small, retry with bigger one
+ while ( nRet && ( nRet + 2 >= rSize ) ) // buffer was too small, retry until big enough
{
- if ( nRet < 32767 - 2 )
- {
- delete [] (*pRetBuf);
- rSize = nRet + 2;
- *pRetBuf = new TCHAR[ rSize ];
+ if (rSize > 1000000)
+ break;
+ delete [] (*pRetBuf);
+ rSize = rSize * 2;
+ *pRetBuf = new TCHAR[ rSize ];
- nRet = GetPrivateProfileSection( pSection, *pRetBuf, rSize, pFileName );
- }
+ nRet = GetPrivateProfileSection( pSection, *pRetBuf, rSize, pFileName );
}
if ( !nRet )
@@ -290,7 +291,7 @@ boolean SetupAppX::GetProfileSection( LPCTSTR pFileName, LPCTSTR pSection,
Log( sBuf );
return false;
}
- else if ( nRet + 2 > rSize )
+ else if ( nRet + 2 >= rSize )
{
SetError( ERROR_OUTOFMEMORY );
Log( TEXT( "ERROR: GetPrivateProfileSection() out of memory\r\n" ) );
@@ -1320,9 +1321,7 @@ boolean SetupAppX::AlreadyRunning() const
const TCHAR sGUniqueName[] = TEXT( "Global\\_MSISETUP_{EA8130C1-8D3D-4338-9309-1A52D530D846}" );
const TCHAR sUniqueName[] = TEXT( "_MSISETUP_{EA8130C1-8D3D-4338-9309-1A52D530D846}" );
- if ( IsWin9x() )
- sMutexName = sUniqueName;
- else if ( ( GetOSVersion() < 5 ) && ! IsTerminalServerInstalled() )
+ if ( ( GetOSVersion() < 5 ) && ! IsTerminalServerInstalled() )
sMutexName = sUniqueName;
else
sMutexName = sGUniqueName;
@@ -1393,8 +1392,7 @@ void SetupAppX::Log( LPCTSTR pMessage, LPCTSTR pText ) const
if ( !bInit )
{
bInit = true;
- if ( ! IsWin9x() )
- _ftprintf( m_pLogFile, TEXT("%c"), 0xfeff );
+ _ftprintf( m_pLogFile, TEXT("%c"), 0xfeff );
_tsetlocale( LC_ALL, TEXT("") );
_ftprintf( m_pLogFile, TEXT("\nCodepage=%s\nMultiByte Codepage=[%d]\n"),
@@ -1652,9 +1650,6 @@ boolean SetupAppX::GetCmdLineParameters( LPTSTR *pCmdLine )
//--------------------------------------------------------------------------
boolean SetupAppX::IsAdmin()
{
- if ( IsWin9x() )
- return true;
-
PSID aPsidAdmin;
SID_IDENTIFIER_AUTHORITY aAuthority = SECURITY_NT_AUTHORITY;
@@ -2064,3 +2059,5 @@ SetupApp* Create_SetupAppX()
}
//--------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/setup/setup.hxx b/desktop/win32/source/setup/setup.hxx
index d43650e078..c3bb71cb3f 100644
--- a/desktop/win32/source/setup/setup.hxx
+++ b/desktop/win32/source/setup/setup.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -152,3 +153,5 @@ public:
};
//--------------------------------------------------------------------------
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/setup/setup.ulf b/desktop/win32/source/setup/setup.ulf
index d0e867d49f..85d43f43aa 100644
--- a/desktop/win32/source/setup/setup.ulf
+++ b/desktop/win32/source/setup/setup.ulf
@@ -46,7 +46,7 @@ en-US = "There is already a setup process running."
[%UNKNOWN_ERROR%]
-en-US = "An Unknown Error occured!"
+en-US = "An Unknown Error occurred!"
[%INVALID_PROFILE%]
diff --git a/desktop/win32/source/setup/setup_a.cxx b/desktop/win32/source/setup/setup_a.cxx
index ce46df65bc..b3cb31bea4 100644
--- a/desktop/win32/source/setup/setup_a.cxx
+++ b/desktop/win32/source/setup/setup_a.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,3 +30,5 @@
#include "precompiled_desktop.hxx"
#include "setup.cpp"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/setup/setup_help.hxx b/desktop/win32/source/setup/setup_help.hxx
index c87e8a1db0..f37daa5be3 100644
--- a/desktop/win32/source/setup/setup_help.hxx
+++ b/desktop/win32/source/setup/setup_help.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -44,4 +45,5 @@ class SetupHelperX
//--------------------------------------------------------------------------
-#endif \ No newline at end of file
+#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/setup/setup_main.cxx b/desktop/win32/source/setup/setup_main.cxx
index af6b42bd18..effd3de52e 100644
--- a/desktop/win32/source/setup/setup_main.cxx
+++ b/desktop/win32/source/setup/setup_main.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -63,7 +64,6 @@ SetupApp::SetupApp()
m_nOSVersion = sInfoOS.dwMajorVersion;
m_nMinorVersion = sInfoOS.dwMinorVersion;
- m_bIsWin9x = ( VER_PLATFORM_WIN32_NT != sInfoOS.dwPlatformId );
m_bNeedReboot = false;
m_bAdministrative = false;
}
@@ -88,14 +88,9 @@ extern "C" int __stdcall WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, int )
GetVersionEx( &sInfoOS );
- boolean bIsWin9x = ( VER_PLATFORM_WIN32_NT != sInfoOS.dwPlatformId );
-
SetupApp *pSetup;
- if ( bIsWin9x )
- pSetup = Create_SetupAppA();
- else
- pSetup = Create_SetupAppW();
+ pSetup = Create_SetupAppW();
try
{
@@ -145,3 +140,5 @@ extern "C" int __stdcall WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, int )
return nRet;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/setup/setup_main.hxx b/desktop/win32/source/setup/setup_main.hxx
index 419d658ac0..f966e6ae03 100644
--- a/desktop/win32/source/setup/setup_main.hxx
+++ b/desktop/win32/source/setup/setup_main.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,7 +34,6 @@ class SetupApp
{
DWORD m_nOSVersion;
DWORD m_nMinorVersion;
- boolean m_bIsWin9x : 1;
boolean m_bNeedReboot : 1;
boolean m_bAdministrative : 1;
@@ -57,7 +57,6 @@ public:
virtual void DisplayError( UINT nErr ) const = 0;
void SetError( UINT nErr ) { m_uiRet = nErr; }
- boolean IsWin9x() const { return m_bIsWin9x; }
DWORD GetOSVersion() const { return m_nOSVersion; }
DWORD GetMinorVersion() const { return m_nMinorVersion; }
@@ -68,7 +67,8 @@ public:
boolean NeedReboot() const { return m_bNeedReboot; }
};
-SetupApp* Create_SetupAppA();
SetupApp* Create_SetupAppW();
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/setup/setup_w.cxx b/desktop/win32/source/setup/setup_w.cxx
index 0de38fbf1d..d123eeb350 100644
--- a/desktop/win32/source/setup/setup_w.cxx
+++ b/desktop/win32/source/setup/setup_w.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -33,3 +34,4 @@
#include "setup.cpp"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/sowrapper.cxx b/desktop/win32/source/sowrapper.cxx
index 92ec3ead4b..b7020f09c5 100644
--- a/desktop/win32/source/sowrapper.cxx
+++ b/desktop/win32/source/sowrapper.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -45,3 +46,5 @@ int APIENTRY WinMain( HINSTANCE, HINSTANCE, LPSTR, int )
else
return MainW();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/unoinfo.cxx b/desktop/win32/source/unoinfo.cxx
index 47c97344cb..6ec5727a36 100644
--- a/desktop/win32/source/unoinfo.cxx
+++ b/desktop/win32/source/unoinfo.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -146,3 +147,5 @@ int wmain(int argc, wchar_t ** argv, wchar_t **) {
}
exit(EXIT_SUCCESS);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/wrapper.h b/desktop/win32/source/wrapper.h
index 9e525ca5a9..6ccf063b36 100644
--- a/desktop/win32/source/wrapper.h
+++ b/desktop/win32/source/wrapper.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#pragma once
#ifndef __cplusplus
#error Need C++ to compile
@@ -171,3 +172,4 @@ extern "C" int Main()
return GetLastError();
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/wrappera.cxx b/desktop/win32/source/wrappera.cxx
index 8fba6a501c..c9a2129922 100644
--- a/desktop/win32/source/wrappera.cxx
+++ b/desktop/win32/source/wrappera.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -29,3 +30,5 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_desktop.hxx"
#include "wrapper.h"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/wrapperw.cxx b/desktop/win32/source/wrapperw.cxx
index da423d567e..e6927ab820 100644
--- a/desktop/win32/source/wrapperw.cxx
+++ b/desktop/win32/source/wrapperw.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,3 +31,5 @@
#include "precompiled_desktop.hxx"
#define UNICODE
#include "wrapper.h"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/zipintro/makefile.mk b/desktop/zipintro/makefile.mk
index 4f022effed..2745d11945 100644
--- a/desktop/zipintro/makefile.mk
+++ b/desktop/zipintro/makefile.mk
@@ -29,12 +29,9 @@ PRJ=..
PRJNAME=desktop
TARGET=zipintro
-# --- Settings -----------------------------------------------------------
.INCLUDE : settings.mk
-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.png $(INTRO_BITMAPS)) \
$(null,$(ABOUT_BITMAPS) $(MISC)$/$(RSCDEFIMG)$/introabout$/about.png $(ABOUT_BITMAPS))
@@ -62,36 +59,17 @@ ZIP8LIST= \
ZIP1TARGET=dev_intro
ZIP1DEPS=$(ZIP1LIST)
-
-ZIP2TARGET=dev_nologo_intro
+ZIP2TARGET=brand_dev
ZIP2DEPS=$(ZIP2LIST)
-
-ZIP3TARGET=nologo_intro
+ZIP3TARGET=shell
ZIP3DEPS=$(ZIP3LIST)
-ZIP4TARGET=intro_intro
-ZIP4DEPS=$(ZIP4LIST)
-
-ZIP5TARGET=dev_broffice_intro
-ZIP5DEPS=$(ZIP5LIST)
-
-ZIP6TARGET=broffice_intro
-ZIP6DEPS=$(ZIP6LIST)
-
-ZIP7TARGET=nologo_broffice_intro
-ZIP7DEPS=$(ZIP7LIST)
-
-ZIP8TARGET=nologo_dev_broffice_intro
-ZIP8DEPS=$(ZIP8LIST)
-
.INCLUDE : target.mk
-ALLTAR : $(foreach,i,$(DEFAULT_FLAVOURS) $(COMMONBIN)$/$i$/intro.zip)
-
-# now duplicate for deliver...
-# Because of issue 78837 we cannot use a % rule here (Commented out below)
-# but have to write individual rules.
-#$(COMMONBIN)$/%$/intro.zip : $(COMMONBIN)$/%_intro.zip
+ALLTAR : \
+ $(COMMONBIN)$/brand$/intro.zip \
+ $(COMMONBIN)$/brand_dev$/intro.zip \
+ $(COMMONBIN)$/shell/shell.zip
$(COMMONBIN)$/dev$/intro.zip : $(COMMONBIN)$/dev_intro.zip
@@-$(MKDIR) $(@:d)