summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
Diffstat (limited to 'desktop')
-rw-r--r--desktop/inc/app.hxx29
-rwxr-xr-x[-rw-r--r--]desktop/inc/deployment.hrc9
-rwxr-xr-x[-rw-r--r--]desktop/inc/makefile.mk0
-rw-r--r--desktop/inc/migration.hxx (renamed from desktop/source/migration/migration.hxx)9
-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.cxx122
-rw-r--r--desktop/os2/source/applauncher/launcher.hxx9
-rw-r--r--desktop/os2/source/applauncher/makefile.mk121
-rw-r--r--desktop/os2/source/applauncher/officeloader.cxx3
-rw-r--r--desktop/os2/source/applauncher/os2quickstart.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.lst6
-rw-r--r--desktop/prj/d.lst310
-rwxr-xr-x[-rw-r--r--]desktop/qa/deployment_misc/makefile.mk0
-rw-r--r--desktop/qa/deployment_misc/test_dp_version.cxx3
-rwxr-xr-x[-rw-r--r--]desktop/qa/deployment_misc/version.map0
-rwxr-xr-x[-rw-r--r--]desktop/registry/data/org/openoffice/Office/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/scripts/basis-link0
-rwxr-xr-x[-rw-r--r--]desktop/scripts/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/scripts/mozwrapper.sh0
-rwxr-xr-x[-rw-r--r--]desktop/scripts/odf-basis-link0
-rwxr-xr-x[-rw-r--r--]desktop/scripts/sbase.sh2
-rwxr-xr-x[-rw-r--r--]desktop/scripts/scalc.sh2
-rwxr-xr-x[-rw-r--r--]desktop/scripts/sdraw.sh2
-rwxr-xr-x[-rw-r--r--]desktop/scripts/simpress.sh2
-rwxr-xr-x[-rw-r--r--]desktop/scripts/smaster.sh2
-rwxr-xr-x[-rw-r--r--]desktop/scripts/smath.sh2
-rwxr-xr-x[-rw-r--r--]desktop/scripts/so-basis-link0
-rwxr-xr-x[-rw-r--r--]desktop/scripts/soffice.sh115
-rwxr-xr-x[-rw-r--r--]desktop/scripts/sweb.sh2
-rwxr-xr-x[-rw-r--r--]desktop/scripts/swriter.sh2
-rwxr-xr-x[-rw-r--r--]desktop/scripts/unoinfo.sh0
-rwxr-xr-x[-rw-r--r--]desktop/scripts/unopkg.sh33
-rwxr-xr-x[-rw-r--r--]desktop/scripts/ure-link0
-rw-r--r--desktop/source/app/app.cxx761
-rw-r--r--desktop/source/app/appfirststart.cxx212
-rw-r--r--desktop/source/app/appinit.cxx84
-rw-r--r--desktop/source/app/appinit.hxx3
-rw-r--r--desktop/source/app/appsys.cxx9
-rw-r--r--desktop/source/app/appsys.hxx3
-rw-r--r--[-rwxr-xr-x]desktop/source/app/check_ext_deps.cxx25
-rw-r--r--desktop/source/app/checkinstall.cxx6
-rw-r--r--desktop/source/app/checkinstall.hxx3
-rw-r--r--desktop/source/app/cmdlineargs.cxx391
-rw-r--r--desktop/source/app/cmdlineargs.hxx117
-rw-r--r--desktop/source/app/cmdlinehelp.cxx111
-rw-r--r--desktop/source/app/cmdlinehelp.hxx6
-rw-r--r--desktop/source/app/configinit.cxx5
-rw-r--r--desktop/source/app/configinit.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/app/copyright_ascii_ooo.c2
-rwxr-xr-x[-rw-r--r--]desktop/source/app/copyright_ascii_sun.c2
-rwxr-xr-x[-rw-r--r--]desktop/source/app/desktop.hrc0
-rw-r--r--desktop/source/app/desktopcontext.cxx8
-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.cxx294
-rw-r--r--desktop/source/app/dispatchwatcher.hxx16
-rwxr-xr-x[-rw-r--r--]desktop/source/app/exports.dxp0
-rw-r--r--desktop/source/app/langselect.cxx67
-rw-r--r--desktop/source/app/langselect.hxx3
-rw-r--r--desktop/source/app/lockfile.cxx136
-rw-r--r--desktop/source/app/lockfile.hxx20
-rw-r--r--desktop/source/app/lockfile2.cxx12
-rwxr-xr-x[-rw-r--r--]desktop/source/app/main.c3
-rwxr-xr-x[-rw-r--r--]desktop/source/app/makefile.mk13
-rw-r--r--desktop/source/app/officeipcthread.cxx177
-rw-r--r--desktop/source/app/officeipcthread.hxx29
-rw-r--r--desktop/source/app/omutexmember.hxx3
-rw-r--r--desktop/source/app/sofficemain.cxx27
-rwxr-xr-x[-rw-r--r--]desktop/source/app/sofficemain.h3
-rw-r--r--desktop/source/app/userinstall.cxx46
-rw-r--r--desktop/source/app/userinstall.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/app/version.map0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/deployment.component0
-rw-r--r--desktop/source/deployment/dp_log.cxx6
-rw-r--r--desktop/source/deployment/dp_persmap.cxx23
-rw-r--r--desktop/source/deployment/dp_services.cxx6
-rw-r--r--desktop/source/deployment/dp_xml.cxx17
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/deploymentgui.component0
-rw-r--r--desktop/source/deployment/gui/descedit.cxx2
-rw-r--r--desktop/source/deployment/gui/descedit.hxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui.h3
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui.hrc48
-rw-r--r--desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx3
-rw-r--r--desktop/source/deployment/gui/dp_gui_autoscrolledit.hxx3
-rw-r--r--desktop/source/deployment/gui/dp_gui_backend.src47
-rw-r--r--desktop/source/deployment/gui/dp_gui_dependencydialog.cxx3
-rw-r--r--desktop/source/deployment/gui/dp_gui_dependencydialog.hxx5
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog.src19
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/gui/dp_gui_dialog2.cxx55
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.hxx4
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.src20
-rw-r--r--desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx110
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx3
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.cxx29
-rw-r--r--desktop/source/deployment/gui/dp_gui_extlistbox.hxx8
-rw-r--r--desktop/source/deployment/gui/dp_gui_service.cxx19
-rw-r--r--desktop/source/deployment/gui/dp_gui_shared.hxx5
-rw-r--r--desktop/source/deployment/gui/dp_gui_system.cxx59
-rw-r--r--desktop/source/deployment/gui/dp_gui_system.hxx37
-rw-r--r--desktop/source/deployment/gui/dp_gui_theextmgr.cxx20
-rw-r--r--desktop/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
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/gui/dp_gui_updatedata.hxx3
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/gui/dp_gui_updatedialog.cxx130
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/gui/dp_gui_updatedialog.hxx8
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/gui/dp_gui_updatedialog.src9
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx39
-rw-r--r--desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx5
-rw-r--r--desktop/source/deployment/gui/license_dialog.cxx9
-rw-r--r--desktop/source/deployment/gui/license_dialog.hxx8
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/makefile.mk8
-rw-r--r--desktop/source/deployment/inc/db.hxx44
-rw-r--r--desktop/source/deployment/inc/dp_dependencies.hxx12
-rw-r--r--desktop/source/deployment/inc/dp_descriptioninfoset.hxx3
-rw-r--r--desktop/source/deployment/inc/dp_identifier.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/inc/dp_interact.h3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/inc/dp_misc.h3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/inc/dp_misc.mk2
-rw-r--r--desktop/source/deployment/inc/dp_misc_api.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/inc/dp_persmap.h7
-rw-r--r--desktop/source/deployment/inc/dp_platform.hxx5
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/inc/dp_resource.h5
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/inc/dp_ucb.h5
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/inc/dp_update.hxx3
-rw-r--r--desktop/source/deployment/inc/dp_version.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/inc/dp_xml.h3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/makefile.mk13
-rw-r--r--desktop/source/deployment/manager/dp_activepackages.cxx5
-rw-r--r--desktop/source/deployment/manager/dp_activepackages.hxx3
-rw-r--r--desktop/source/deployment/manager/dp_commandenvironments.cxx43
-rw-r--r--desktop/source/deployment/manager/dp_commandenvironments.hxx28
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.cxx86
-rw-r--r--desktop/source/deployment/manager/dp_extensionmanager.hxx16
-rw-r--r--desktop/source/deployment/manager/dp_informationprovider.cxx10
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/manager/dp_manager.cxx15
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/dp_manager.h2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/dp_manager.hrc0
-rw-r--r--desktop/source/deployment/manager/dp_managerfac.cxx6
-rw-r--r--desktop/source/deployment/manager/dp_properties.cxx2
-rw-r--r--desktop/source/deployment/manager/dp_properties.hxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/makefile.mk4
-rw-r--r--desktop/source/deployment/misc/db.cxx3
-rw-r--r--desktop/source/deployment/misc/dp_dependencies.cxx51
-rw-r--r--desktop/source/deployment/misc/dp_descriptioninfoset.cxx6
-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.cxx45
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/misc/dp_misc.hrc0
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/misc/dp_misc.src4
-rw-r--r--desktop/source/deployment/misc/dp_platform.cxx43
-rw-r--r--desktop/source/deployment/misc/dp_resource.cxx4
-rw-r--r--desktop/source/deployment/misc/dp_ucb.cxx5
-rw-r--r--desktop/source/deployment/misc/dp_update.cxx48
-rw-r--r--desktop/source/deployment/misc/dp_version.cxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/misc/makefile.mk19
-rw-r--r--desktop/source/deployment/registry/component/dp_compbackenddb.cxx2
-rw-r--r--desktop/source/deployment/registry/component/dp_compbackenddb.hxx2
-rw-r--r--desktop/source/deployment/registry/component/dp_component.cxx192
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/component/dp_component.hrc0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/component/makefile.mk0
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configuration.cxx17
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/configuration/dp_configuration.hrc0
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx9
-rw-r--r--desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/configuration/makefile.mk4
-rw-r--r--desktop/source/deployment/registry/dp_backend.cxx28
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/registry/dp_backenddb.cxx16
-rw-r--r--desktop/source/deployment/registry/dp_registry.cxx14
-rw-r--r--desktop/source/deployment/registry/executable/dp_executable.cxx9
-rw-r--r--desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx2
-rw-r--r--desktop/source/deployment/registry/executable/dp_executablebackenddb.hxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/executable/makefile.mk0
-rw-r--r--desktop/source/deployment/registry/help/dp_help.cxx53
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/help/dp_help.hrc0
-rw-r--r--desktop/source/deployment/registry/help/dp_helpbackenddb.cxx35
-rw-r--r--desktop/source/deployment/registry/help/dp_helpbackenddb.hxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/help/makefile.mk4
-rwxr-xr-xdesktop/source/deployment/registry/inc/dp_backend.h15
-rw-r--r--desktop/source/deployment/registry/inc/dp_backenddb.hxx5
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/inc/dp_registry.hrc0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/makefile.mk0
-rw-r--r--desktop/source/deployment/registry/package/dp_extbackenddb.cxx3
-rw-r--r--desktop/source/deployment/registry/package/dp_extbackenddb.hxx13
-rw-r--r--desktop/source/deployment/registry/package/dp_package.cxx30
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/package/dp_package.hrc0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/package/makefile.mk0
-rw-r--r--desktop/source/deployment/registry/script/dp_lib_container.cxx8
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/script/dp_lib_container.h20
-rw-r--r--desktop/source/deployment/registry/script/dp_script.cxx159
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/script/dp_script.hrc0
-rw-r--r--desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx2
-rw-r--r--desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/script/makefile.mk0
-rw-r--r--desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx6
-rw-r--r--desktop/source/deployment/registry/sfwk/dp_parceldesc.hxx3
-rw-r--r--[-rwxr-xr-x]desktop/source/deployment/registry/sfwk/dp_sfwk.cxx44
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/sfwk/dp_sfwk.hrc0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/sfwk/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/target.pmk0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/unopkg/makefile.mk4
-rw-r--r--desktop/source/inc/exithelper.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/inc/helpid.hrc0
-rw-r--r--desktop/source/migration/cfgfilter.cxx333
-rw-r--r--desktop/source/migration/cfgfilter.hxx173
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/makefile.mk13
-rw-r--r--[-rwxr-xr-x]desktop/source/migration/migration.cxx321
-rw-r--r--desktop/source/migration/migration_impl.hxx16
-rw-r--r--desktop/source/migration/pages.cxx10
-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.cxx45
-rw-r--r--desktop/source/migration/services/basicmigration.hxx3
-rw-r--r--desktop/source/migration/services/cexports.cxx22
-rw-r--r--desktop/source/migration/services/cexportsoo3.cxx7
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/cppumaker.mk0
-rw-r--r--desktop/source/migration/services/jvmfwk.cxx26
-rw-r--r--desktop/source/migration/services/jvmfwk.hxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/makefile.mk7
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/migrationoo2.component0
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/migrationoo2.xml0
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/migrationoo3.component0
-rw-r--r--desktop/source/migration/services/misc.hxx3
-rw-r--r--desktop/source/migration/services/oo3extensionmigration.cxx35
-rw-r--r--desktop/source/migration/services/oo3extensionmigration.hxx3
-rw-r--r--[-rwxr-xr-x]desktop/source/migration/services/wordbookmigration.cxx13
-rw-r--r--[-rwxr-xr-x]desktop/source/migration/services/wordbookmigration.hxx3
-rw-r--r--desktop/source/migration/wizard.cxx26
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/wizard.hrc0
-rw-r--r--desktop/source/offacc/acceptor.cxx38
-rw-r--r--desktop/source/offacc/acceptor.hxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/offacc/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/source/offacc/offacc.component0
-rwxr-xr-x[-rw-r--r--]desktop/source/pagein/makefile.mk68
-rwxr-xr-x[-rw-r--r--]desktop/source/pkgchk/unopkg/makefile.mk8
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_app.cxx15
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx27
-rwxr-xr-x[-rw-r--r--]desktop/source/pkgchk/unopkg/unopkg_main.c3
-rwxr-xr-x[-rw-r--r--]desktop/source/pkgchk/unopkg/unopkg_main.h3
-rw-r--r--desktop/source/pkgchk/unopkg/unopkg_misc.cxx20
-rwxr-xr-x[-rw-r--r--]desktop/source/pkgchk/unopkg/unopkg_shared.h7
-rwxr-xr-x[-rw-r--r--]desktop/source/pkgchk/unopkg/version.map0
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/registration/Registration.java1
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/registration/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/registration/manifest0
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/registration/productregistration.jar.component0
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/BrowserSupport.java0
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/Installer.java0
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/LinuxSystemEnvironment.java1
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/RegistrationData.java0
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/RegistrationDocument.java0
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/Registry.java1
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/ServiceTag.java0
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/SolarisServiceTag.java0
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/SolarisSystemEnvironment.java1
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/SunConnection.java0
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/SysnetRegistryHelper.java1
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java0
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/UnauthorizedAccessException.java0
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/Util.java0
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/WindowsSystemEnvironment.java0
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/source/registration/com/sun/star/servicetag/resources/product_registration.xsd0
-rw-r--r--desktop/source/so_comp/evaluation.cxx14
-rw-r--r--desktop/source/so_comp/evaluation.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/so_comp/makefile.mk5
-rw-r--r--desktop/source/so_comp/oemjob.cxx48
-rw-r--r--desktop/source/so_comp/oemjob.hxx3
-rw-r--r--desktop/source/so_comp/services.cxx13
-rwxr-xr-x[-rw-r--r--]desktop/source/so_comp/socomp.component0
-rwxr-xr-xdesktop/source/splash/firststart.cxx156
-rwxr-xr-xdesktop/source/splash/firststart.hxx90
-rwxr-xr-x[-rw-r--r--]desktop/source/splash/makefile.mk21
-rw-r--r--[-rwxr-xr-x]desktop/source/splash/services_spl.cxx19
-rwxr-xr-x[-rw-r--r--]desktop/source/splash/spl.component0
-rw-r--r--desktop/source/splash/splash.cxx197
-rw-r--r--desktop/source/splash/splash.hxx10
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/active/Dispatch.java0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/active/MANIFEST.MF0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/active/Provider.java0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/active/Services.java0
-rw-r--r--desktop/test/deployment/active/active_native.cxx4
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/active/active_python.py0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/active/description.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/active/makefile.mk4
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/active/manifest.xml0
-rw-r--r--desktop/test/deployment/boxt/boxt.cxx7
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/boxt/description.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/boxt/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/boxt/manifest.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/dependencies/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/display_name/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/executable_content/build/hello.c8
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/executable_content/build/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/executable_content/build/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/executable_content/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/identifier/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/locationtest/LocationTest.java0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/locationtest/MANIFEST.MF0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/locationtest/delzip0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/locationtest/description.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/locationtest/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/locationtest/manifest.xml4
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/MANIFEST.MF0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/OptionsEventHandler.java0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/options/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/passive/Dispatch.java0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/passive/MANIFEST.MF0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/passive/Provider.java0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/passive/Services.java0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/passive/description.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/passive/makefile.mk5
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/passive/manifest.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/passive/passive_java.component0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/passive/passive_native.component0
-rw-r--r--desktop/test/deployment/passive/passive_native.cxx4
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/passive/passive_python.component0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/passive/passive_python.py0
-rw-r--r--[-rwxr-xr-x]desktop/test/deployment/simple_license/suppress_license.oxtbin2143 -> 2143 bytes
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/changing_display_name/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/changing_display_name/update1/change1.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/changing_display_name/update2/change1.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/default_url/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/default_url/update/default1.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/default_url/update/default2.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/default_url/update/feed1.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/defect/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/defect/update/fail1.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/defect/update/fail2.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/defect/update/fail3.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/defect/update/fail4.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/defect/update/info1.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/defect/update/info2.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/defect/update/info3.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/dependencies/publisher_en.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/dependencies/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/dependencies/release-notes_en.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/dependencies/update/update-dependencies.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/license/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/license/update/lic1.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/license/update/lic2.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/license/update/lic3.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/platform/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/publisher_de-DE-altmark.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/publisher_de-DE.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/publisher_de.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/publisher_en-GB.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/publisher_en-US-region1.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/publisher_en-US-region2.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/publisher_en-US.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/publisher_en-region3.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/publisher_en.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/release-notes_de-DE-altmark.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/release-notes_de-DE.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/release-notes_de.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/release-notes_en-GB.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/release-notes_en-US-region1.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/release-notes_en-US-region2.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/release-notes_en-US.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/release-notes_en-region3.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/release-notes_en.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/update/pub1.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/update/pub2.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/update/pub3.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/update/pub4.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/update/pub5.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/update/pub6.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/publisher/update/pub7.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/simple/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/simple/update/plain1.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/simple/update/plain2.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/simple/update/plain3.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/updatefeed/update/feed1.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/updatefeed/update/feed1.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/updatefeed/update/feed2.update.xml0
-rw-r--r--[-rwxr-xr-x]desktop/test/deployment/update/updateinfocreation/build/TestExtension.idl0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/updateinfocreation/build/description.xml0
-rwxr-xr-xdesktop/test/deployment/update/updateinfocreation/build/manifest.xml4
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/updateinfocreation/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web1.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web1_de-DE-altmark.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web1_de-DE.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web1_de.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web1_en-GB.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web1_en-US-region1.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web1_en-US-region2.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web1_en-US.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web1_en-region3.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web1_en.html0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web2.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web3.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web4.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web5.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web6/description.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web6/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web7/description.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/website_update/update/web7/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/wrong_url/readme.txt0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/wrong_url/update/url1.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/wrong_url/update/url2.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/wrong_url/update/wrongdownload1.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/wrong_url/update/wrongdownload2.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/update/wrong_url/update/wrongdownload3.update.xml0
-rwxr-xr-x[-rw-r--r--]desktop/test/deployment/version/readme.txt0
-rw-r--r--desktop/unx/source/args.c152
-rw-r--r--desktop/unx/source/args.h50
-rwxr-xr-x[-rw-r--r--]desktop/unx/source/file_image.h (renamed from desktop/source/pagein/file_image.h)3
-rwxr-xr-x[-rw-r--r--]desktop/unx/source/file_image_unx.c (renamed from desktop/source/pagein/file_image_unx.c)3
-rwxr-xr-xdesktop/unx/source/makefile.mk72
-rwxr-xr-x[-rw-r--r--]desktop/unx/source/officeloader/makefile.mk0
-rw-r--r--[-rwxr-xr-x]desktop/unx/source/officeloader/officeloader.cxx5
-rwxr-xr-x[-rw-r--r--]desktop/unx/source/pagein.c (renamed from desktop/source/pagein/pagein.c)29
-rwxr-xr-xdesktop/unx/source/splashx.c648
-rwxr-xr-xdesktop/unx/source/splashx.h65
-rwxr-xr-xdesktop/unx/source/start.c1034
-rwxr-xr-xdesktop/unx/splash/exports.map9
-rwxr-xr-xdesktop/unx/splash/makefile.mk76
-rwxr-xr-xdesktop/unx/splash/splash.component7
-rw-r--r--desktop/unx/splash/unxsplash.cxx198
-rw-r--r--desktop/unx/splash/unxsplash.hxx83
-rwxr-xr-x[-rw-r--r--]desktop/util/makefile.mk46
-rwxr-xr-x[-rw-r--r--]desktop/util/ooverinfo.rc28
-rwxr-xr-x[-rw-r--r--]desktop/util/template.manifest4
-rw-r--r--desktop/util/verinfo.rc28
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/QuickStart/OOQuickStart.rc0
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/QuickStart/QuickStart.cpp9
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/QuickStart/QuickStart.h3
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/QuickStart/StdAfx.h3
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/QuickStart/resource.h3
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/QuickStart/so/QuickStart.rc0
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/QuickStart/so/makefile.mk0
-rw-r--r--desktop/win32/source/applauncher/launcher.cxx3
-rw-r--r--desktop/win32/source/applauncher/launcher.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/applauncher/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/applauncher/ooo/makefile.mk0
-rwxr-xr-xdesktop/win32/source/applauncher/ooo/verinfo.rc28
-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.rc28
-rw-r--r--desktop/win32/source/extendloaderenvironment.cxx3
-rw-r--r--desktop/win32/source/extendloaderenvironment.hxx5
-rw-r--r--desktop/win32/source/guiloader/genericloader.cxx2
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/guiloader/makefile.mk0
-rw-r--r--desktop/win32/source/guistdio/guistdio.cxx3
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/guistdio/guistdio.inc7
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/guistdio/makefile.mk0
-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
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/main.h2
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/officeloader/makefile.mk18
-rw-r--r--desktop/win32/source/officeloader/officeloader.cxx27
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/rebase/Resource.h3
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/rebase/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/rebase/rcfooter.txt0
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/rebase/rcheader.txt0
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/rebase/rctmpl.txt0
-rw-r--r--desktop/win32/source/rebase/rebase.cxx8
-rw-r--r--desktop/win32/source/rebase/rebasegui.cxx3
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/rebase/rebasegui.ulf0
-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
-rw-r--r--desktop/win32/source/setup/makefile.mk5
-rw-r--r--[-rwxr-xr-x]desktop/win32/source/setup/setup.cpp41
-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.cxx31
-rw-r--r--desktop/win32/source/setup/setup_help.hxx4
-rw-r--r--desktop/win32/source/setup/setup_main.cxx15
-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
-rwxr-xr-x[-rw-r--r--]desktop/win32/source/wrapper.h2
-rw-r--r--desktop/win32/source/wrappera.cxx3
-rw-r--r--desktop/win32/source/wrapperw.cxx3
-rwxr-xr-x[-rw-r--r--]desktop/zipintro/delzip0
-rwxr-xr-x[-rw-r--r--]desktop/zipintro/makefile.mk104
497 files changed, 5670 insertions, 4683 deletions
diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index 3b3cba11f5a0..560b1b0b0860 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,13 +57,13 @@ 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
{
friend class UserInstall;
- void doShutdown();
+ int doShutdown();
public:
enum BootstrapError
@@ -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 sal_Bool QueryExit();
virtual sal_uInt16 Exception(sal_uInt16 nError);
@@ -105,7 +104,7 @@ class Desktop : public Application
static void HandleAppEvent( const ApplicationEvent& rAppEvent );
static ResMgr* GetDesktopResManager();
- static CommandLineArgs* GetCommandLineArgs();
+ static CommandLineArgs& GetCommandLineArgs();
void HandleBootstrapErrors( BootstrapError );
void SetBootstrapError( BootstrapError 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 );
@@ -143,6 +139,8 @@ class Desktop : public Application
void SetSplashScreenText( const ::rtl::OUString& rText );
void SetSplashScreenProgress( sal_Int32 );
+ void CreateProcessServiceFactory();
+
private:
// Bootstrap methods
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > CreateApplicationServiceManager();
@@ -158,6 +156,7 @@ class Desktop : public Application
sal_Bool InitializeInstallation( const rtl::OUString& rAppFilename );
sal_Bool InitializeConfiguration();
void FlushConfiguration();
+ static sal_Bool shouldLaunchQuickstart();
sal_Bool InitializeQuickstartMode( com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rSMgr );
void HandleBootstrapPathErrors( ::utl::Bootstrap::Status, const ::rtl::OUString& aMsg );
@@ -170,7 +169,7 @@ class Desktop : public Application
::rtl::OUString CreateErrorMsgString( utl::Bootstrap::FailureCode nFailureCode,
const ::rtl::OUString& aFileURL );
- static void PreloadModuleData( CommandLineArgs* );
+ static void PreloadModuleData( const CommandLineArgs& );
static void PreloadConfigurationData();
Reference<XStatusIndicator> m_rSplashScreen;
@@ -196,9 +195,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 +216,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 370996c710ae..22492cd8ae88 100644..100755
--- 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/inc/makefile.mk b/desktop/inc/makefile.mk
index 8715d814274f..8715d814274f 100644..100755
--- a/desktop/inc/makefile.mk
+++ b/desktop/inc/makefile.mk
diff --git a/desktop/source/migration/migration.hxx b/desktop/inc/migration.hxx
index 5ac8c5f5702c..3319d8d7716f 100644
--- a/desktop/source/migration/migration.hxx
+++ b/desktop/inc/migration.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.
@@ -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 f95c8300208b..24d7e45f222d 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 796ed48aa7a2..6baa50c69781 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
deleted file mode 100644
index 36c23e1eb4e0..000000000000
--- a/desktop/os2/source/applauncher/launcher.cxx
+++ /dev/null
@@ -1,122 +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.
- *
- ************************************************************************/
-
-#include "launcher.hxx"
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <malloc.h>
-#include <process.h>
-
-int main( int argc, char* argv[])
-{
- PPIB pib;
- APIRET rc;
- RESULTCODES result = {0};
- char szFail[ _MAX_PATH];
-
- HAB hab = WinInitialize( 0);
- HMQ hmq = WinCreateMsgQueue( hab, 0);
- ERRORID erridErrorCode = 0;
- erridErrorCode = WinGetLastError(hab);
-
- // Calculate application name
- CHAR szLibpath[_MAX_PATH*2];
- CHAR szApplicationName[_MAX_PATH];
- CHAR szDrive[_MAX_PATH];
- CHAR szDir[_MAX_PATH];
- CHAR szFileName[_MAX_PATH];
- CHAR szExt[_MAX_PATH];
-
- // get executable fullpath
- DosGetInfoBlocks(NULL, &pib);
- DosQueryModuleName(pib->pib_hmte, sizeof(szApplicationName), szApplicationName);
-
- // adjust libpath
- _splitpath( szApplicationName, szDrive, szDir, szFileName, szExt );
- char* basedir = strstr( szDir, "\\PROGRAM\\");
- if (basedir) *basedir = 0;
- sprintf( szLibpath, "\"%s%s\\URE\\BIN\";\"%s%s\\BASIS\\PROGRAM\";%BeginLIBPATH%",
- szDrive, szDir, szDrive, szDir);
- 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 );
- _makepath( szApplicationName, szDrive, szDir, OFFICE_IMAGE_NAME, (".bin") );
-
- // copy command line parameters
- int i, len;
- len = strlen(szApplicationName) + 1 + strlen( APPLICATION_SWITCH) + 1 + 1;
- for( i=1; i<argc; i++)
- len += strlen( argv[i]) + 1;
-
- char* pszCommandLine, *pszArgs;
- pszCommandLine = (char*) calloc( 1, len);
- strcpy( pszCommandLine, szApplicationName);
- pszArgs = pszCommandLine + strlen(szApplicationName) + 1;
- strcat( pszArgs, APPLICATION_SWITCH);
- strcat( pszArgs, " ");
- for( i=1; i<argc; i++) {
- // add quotes if argument has spaces!
- if (strchr( argv[i], ' '))
- strcat( pszArgs, "\"");
- strcat( pszArgs, argv[i]);
- if (strchr( argv[i], ' '))
- strcat( pszArgs, "\"");
- strcat( pszArgs, " ");
- }
- pszArgs[ strlen( pszArgs) + 0] = 0;
-
- // execute
- rc = DosExecPgm(szFail, sizeof(szFail),
- EXEC_SYNC, (PCSZ)pszCommandLine, (PCSZ)NULL, &result,
- (PCSZ)szApplicationName);
- if (rc) {
- char szMessage[ _MAX_PATH*2];
- sprintf( szMessage, "Execution failed! Contact technical support.\n\nReturn code: %d\nFailing module:%s\n", rc, szFail);
- rc = WinMessageBox( HWND_DESKTOP, HWND_DESKTOP,
- (PSZ)szMessage,
- (PSZ)"Unable to start OpenOffice.org!",
- 0, MB_ERROR | MB_OK);
- WinDestroyMsgQueue( hmq);
- WinTerminate( hab);
- exit(1);
- }
-
- WinDestroyMsgQueue( hmq);
- WinTerminate( hab);
-
- exit( result.codeResult);
-}
diff --git a/desktop/os2/source/applauncher/launcher.hxx b/desktop/os2/source/applauncher/launcher.hxx
deleted file mode 100644
index 181289275dea..000000000000
--- a/desktop/os2/source/applauncher/launcher.hxx
+++ /dev/null
@@ -1,9 +0,0 @@
-
-#define INCL_DOS
-#define INCL_PM
-#include <os2.h>
-
-#define OFFICE_IMAGE_NAME ("soffice")
-
-extern CHAR APPLICATION_SWITCH[];
-
diff --git a/desktop/os2/source/applauncher/makefile.mk b/desktop/os2/source/applauncher/makefile.mk
deleted file mode 100644
index 7eec8aee9c23..000000000000
--- a/desktop/os2/source/applauncher/makefile.mk
+++ /dev/null
@@ -1,121 +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.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=desktop
-TARGET=applauncher
-LIBTARGET=NO
-TARGETTYPE=GUI
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/launcher.obj \
- $(OBJ)$/swriter.obj \
- $(OBJ)$/scalc.obj \
- $(OBJ)$/sdraw.obj \
- $(OBJ)$/simpress.obj \
- $(OBJ)$/sbase.obj \
- $(OBJ)$/smath.obj \
- $(OBJ)$/officeloader.obj \
- $(OBJ)$/os2quickstart.obj
-
-APP1TARGET=swriter
-APP1NOSAL=TRUE
-APP1LINKRES=$(MISC)$/$(TARGET)1.res
-APP1ICON=$(SOLARRESDIR)$/icons$/ooo-writer-app.ico
-APP1OBJS = \
- $(OBJ)$/launcher.obj\
- $(OBJ)$/swriter.obj
-
-
-APP2TARGET=scalc
-APP2NOSAL=TRUE
-APP2LINKRES=$(MISC)$/$(TARGET)2.res
-APP2ICON=$(SOLARRESDIR)$/icons$/ooo-calc-app.ico
-APP2OBJS = \
- $(OBJ)$/launcher.obj\
- $(OBJ)$/scalc.obj
-
-APP3TARGET=sdraw
-APP3NOSAL=TRUE
-APP3LINKRES=$(MISC)$/$(TARGET)3.res
-APP3ICON=$(SOLARRESDIR)$/icons$/ooo-draw-app.ico
-APP3OBJS = \
- $(OBJ)$/launcher.obj\
- $(OBJ)$/sdraw.obj
-
-APP4TARGET=simpress
-APP4NOSAL=TRUE
-APP4LINKRES=$(MISC)$/$(TARGET)4.res
-APP4ICON=$(SOLARRESDIR)$/icons$/ooo-impress-app.ico
-APP4OBJS = \
- $(OBJ)$/launcher.obj\
- $(OBJ)$/simpress.obj
-
-APP5TARGET=sbase
-APP5NOSAL=TRUE
-APP5LINKRES=$(MISC)$/$(TARGET)5.res
-APP5ICON=$(SOLARRESDIR)$/icons$/ooo-base-app.ico
-APP5OBJS = \
- $(OBJ)$/launcher.obj\
- $(OBJ)$/sbase.obj
-
-APP6TARGET=smath
-APP6NOSAL=TRUE
-APP6LINKRES=$(MISC)$/$(TARGET)6.res
-APP6ICON=$(SOLARRESDIR)$/icons$/ooo-math-app.ico
-APP6OBJS = \
- $(OBJ)$/launcher.obj\
- $(OBJ)$/smath.obj
-
-APP7TARGET=officeloader
-APP7NOSAL=TRUE
-APP7LINKRES=$(MISC)$/$(TARGET)7.res
-APP7ICON=$(SOLARRESDIR)$/icons$/ooo-main-app.ico
-APP7OBJS = \
- $(OBJ)$/launcher.obj\
- $(OBJ)$/officeloader.obj
-
-APP8TARGET=os2quickstart
-APP8NOSAL=TRUE
-APP8LINKRES=$(MISC)$/$(TARGET)8.res
-APP8ICON=$(SOLARRESDIR)$/icons$/ooo-main-app.ico
-APP8OBJS = \
- $(OBJ)$/launcher.obj\
- $(OBJ)$/os2quickstart.obj
-
-# --- Targets ------------------------------------------------------
-
-
-.INCLUDE : target.mk
-
diff --git a/desktop/os2/source/applauncher/officeloader.cxx b/desktop/os2/source/applauncher/officeloader.cxx
deleted file mode 100644
index 9a664ab68d43..000000000000
--- a/desktop/os2/source/applauncher/officeloader.cxx
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "launcher.hxx"
-
-CHAR APPLICATION_SWITCH[] = ( "" );
diff --git a/desktop/os2/source/applauncher/os2quickstart.cxx b/desktop/os2/source/applauncher/os2quickstart.cxx
deleted file mode 100644
index 63585434bb50..000000000000
--- a/desktop/os2/source/applauncher/os2quickstart.cxx
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "launcher.hxx"
-
-CHAR APPLICATION_SWITCH[] = ( "-quickstart" );
diff --git a/desktop/os2/source/applauncher/sbase.cxx b/desktop/os2/source/applauncher/sbase.cxx
deleted file mode 100644
index a60a46be4cf4..000000000000
--- a/desktop/os2/source/applauncher/sbase.cxx
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "launcher.hxx"
-
-CHAR APPLICATION_SWITCH[] = ( "-base" );
diff --git a/desktop/os2/source/applauncher/scalc.cxx b/desktop/os2/source/applauncher/scalc.cxx
deleted file mode 100644
index dc4470ca08d3..000000000000
--- a/desktop/os2/source/applauncher/scalc.cxx
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "launcher.hxx"
-
-CHAR APPLICATION_SWITCH[] = ( "-calc" );
diff --git a/desktop/os2/source/applauncher/sdraw.cxx b/desktop/os2/source/applauncher/sdraw.cxx
deleted file mode 100644
index 76893e1f4f87..000000000000
--- a/desktop/os2/source/applauncher/sdraw.cxx
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "launcher.hxx"
-
-CHAR APPLICATION_SWITCH[] = ( "-draw" );
diff --git a/desktop/os2/source/applauncher/simpress.cxx b/desktop/os2/source/applauncher/simpress.cxx
deleted file mode 100644
index 15f03ab7afa3..000000000000
--- a/desktop/os2/source/applauncher/simpress.cxx
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "launcher.hxx"
-
-CHAR APPLICATION_SWITCH[] = ( "-impress" );
diff --git a/desktop/os2/source/applauncher/smath.cxx b/desktop/os2/source/applauncher/smath.cxx
deleted file mode 100644
index cad0b8631e23..000000000000
--- a/desktop/os2/source/applauncher/smath.cxx
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "launcher.hxx"
-
-CHAR APPLICATION_SWITCH[] = ( "-math" );
diff --git a/desktop/os2/source/applauncher/swriter.cxx b/desktop/os2/source/applauncher/swriter.cxx
deleted file mode 100644
index ded9cf089da8..000000000000
--- a/desktop/os2/source/applauncher/swriter.cxx
+++ /dev/null
@@ -1,3 +0,0 @@
-#include "launcher.hxx"
-
-CHAR APPLICATION_SWITCH[] = ( "-writer" );
diff --git a/desktop/prj/build.lst b/desktop/prj/build.lst
index f1dee0761ccd..0307d002282e 100644
--- a/desktop/prj/build.lst
+++ b/desktop/prj/build.lst
@@ -1,4 +1,4 @@
-dt desktop : L10N:l10n sfx2 stoc BERKELEYDB:berkeleydb sysui SO:sysui_so BOOST:boost svx xmlhelp sal unoil officecfg offuh filter LIBXSLT:libxslt NULL
+dt desktop : TRANSLATIONS:translations sfx2 stoc BERKELEYDB:berkeleydb sysui BOOST:boost svx xmlhelp sal unoil officecfg offuh filter LIBXSLT:libxslt NULL
dt desktop usr1 - all dt_mkout NULL
dt desktop\inc nmake - all dt_inc NULL
dt desktop\prj get - all dt_prj NULL
@@ -22,8 +22,10 @@ dt desktop\win32\source\QuickStart\so nmake - w dt_win32_quickstart_so dt_win32_
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_pagein.u 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\unx\splash nmake - u dt_usplash dt_pagein.u dt_inc 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
dt desktop\source\deployment\misc nmake - all dt_dp_misc dt_inc NULL
dt desktop\source\deployment\unopkg nmake - all dt_dp_unopkg dt_inc NULL
@@ -38,7 +40,7 @@ dt desktop\source\deployment\registry\configuration nmake - all dt_dp_registry_c
dt desktop\source\deployment\registry\help nmake - all dt_dp_registry_help dt_inc NULL
dt desktop\source\deployment\registry\executable nmake - all dt_dp_registry_executable dt_inc NULL
dt desktop\scripts nmake - u dt_scripts dt_inc NULL
-dt desktop\util nmake - all dt_util dt_app dt_pagein.u dt_so_comp dt_spl dt_wrapper.w dt_officeloader.w dt_officeloader_unx.u dt_migr dt_rebase.w dt_win32_quickstart_so.w NULL
+dt desktop\util nmake - all dt_util dt_app dt_pagein.u dt_so_comp dt_spl dt_uwrapper.u dt_usplash.u dt_wrapper.w dt_officeloader.w dt_officeloader_unx.u dt_migr dt_rebase.w dt_win32_quickstart_so.w dt_zipintro NULL
dt desktop\zipintro nmake - all dt_zipintro NULL
dt desktop\registry\data\org\openoffice\Office nmake - all sn_regconfig NULL
dt desktop\source\registration\com\sun\star\servicetag\resources get - all sn_svctagres NULL
diff --git a/desktop/prj/d.lst b/desktop/prj/d.lst
index be7b77388763..9fa248f290f1 100644
--- a/desktop/prj/d.lst
+++ b/desktop/prj/d.lst
@@ -1,158 +1,152 @@
-mkdir: %COMMON_DEST%\bin%_EXT%\hid
-mkdir: %_DEST%\bin%_EXT%\so
-mkdir: %_DEST%\bin%_EXT%\c01
-mkdir: %_DEST%\bin%_EXT%\c05
-mkdir: %_DEST%\bin%_EXT%\c08
-mkdir: %_DEST%\bin%_EXT%\odf4ms
-
-..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin%_EXT%\hid\*.hid
-..\%__SRC%\bin\soffice.bin %_DEST%\bin%_EXT%\soffice.bin
-..\%__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\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
-..\%__SRC%\bin\so\soffice_mac %_DEST%\bin%_EXT%\so\soffice
-..\%__SRC%\bin\sofficea*.dll %_DEST%\bin%_EXT%\sofficea*.dll
-..\%__SRC%\lib\isofficeapp.lib %_DEST%\lib%_EXT%\isofficeapp.lib
-..\%__SRC%\lib\libsofficeapp.dylib %_DEST%\lib%_EXT%\libsofficeapp.dylib
-..\%__SRC%\lib\libsofficeapp.so %_DEST%\lib%_EXT%\libsofficeapp.so
-
-..\%__SRC%\bin\soffice_oo.exe %_DEST%\bin%_EXT%\soffice_oo.exe
-..\%__SRC%\bin\soffice_oo %_DEST%\bin%_EXT%\soffice_oo.bin
-..\%__SRC%\bin\so\soffice_so.exe %_DEST%\bin%_EXT%\so\soffice_so.exe
-..\%__SRC%\bin\so\soffice_so %_DEST%\bin%_EXT%\so\soffice_so.bin
-
-..\%__SRC%\bin\scalc.exe %_DEST%\bin%_EXT%\scalc.exe
-..\%__SRC%\bin\sdraw.exe %_DEST%\bin%_EXT%\sdraw.exe
-..\%__SRC%\bin\simpress.exe %_DEST%\bin%_EXT%\simpress.exe
-..\%__SRC%\bin\smath.exe %_DEST%\bin%_EXT%\smath.exe
-..\%__SRC%\bin\swriter.exe %_DEST%\bin%_EXT%\swriter.exe
-..\%__SRC%\bin\sbase.exe %_DEST%\bin%_EXT%\sbase.exe
-..\%__SRC%\bin\sweb.exe %_DEST%\bin%_EXT%\sweb.exe
-..\%__SRC%\bin\os2quickstart.exe %_DEST%\bin%_EXT%\quickstart.exe
-..\%__SRC%\bin\so\scalc.exe %_DEST%\bin%_EXT%\so\scalc.exe
-..\%__SRC%\bin\so\sdraw.exe %_DEST%\bin%_EXT%\so\sdraw.exe
-..\%__SRC%\bin\so\simpress.exe %_DEST%\bin%_EXT%\so\simpress.exe
-..\%__SRC%\bin\so\smath.exe %_DEST%\bin%_EXT%\so\smath.exe
-..\%__SRC%\bin\so\swriter.exe %_DEST%\bin%_EXT%\so\swriter.exe
-..\%__SRC%\bin\so\sbase.exe %_DEST%\bin%_EXT%\so\sbase.exe
-..\%__SRC%\bin\so\sweb.exe %_DEST%\bin%_EXT%\so\sweb.exe
-
-..\%__SRC%\bin\quickstart.exe %_DEST%\bin%_EXT%\quickstart.exe
-..\%__SRC%\bin\quickstart.exe %_DEST%\bin%_EXT%\install_quickstart.exe
-..\%__SRC%\bin\soquickstart.exe %_DEST%\bin%_EXT%\so\quickstart.exe
-..\%__SRC%\bin\soquickstart.exe %_DEST%\bin%_EXT%\so\install_quickstart.exe
-
-..\%__SRC%\misc\soffice.exe.manifest %_DEST%\bin%_EXT%\soffice.exe.manifest
-..\%__SRC%\misc\soffice.bin.manifest %_DEST%\bin%_EXT%\soffice.bin.manifest
-..\%__SRC%\bin\wrp*.dll %_DEST%\bin%_EXT%\wrp*.dll
-..\%__SRC%\bin\spl*.dll %_DEST%\bin%_EXT%\spl*.dll
-..\%__SRC%\bin\socomp.dll %_DEST%\bin%_EXT%\socomp.dll
-..\%__SRC%\obj\officeloader.obj %_DEST%\lib%_EXT%\officeloader.obj
-..\%__SRC%\obj\extendloaderenvironment.obj %_DEST%\lib%_EXT%\extendloaderenvironment.obj
-..\%__SRC%\obj\copyright_ascii_sun.obj %_DEST%\lib%_EXT%\copyright_ascii_sun.obj
-..\%__SRC%\obj\main.obj %_DEST%\lib%_EXT%\main.obj
-..\%__SRC%\lib\libwrp*.so %_DEST%\lib%_EXT%\libwrp*.so
-..\%__SRC%\lib\libwrp*.dylib %_DEST%\lib%_EXT%\libwrp*.dylib
-..\%__SRC%\lib\libspl*.so %_DEST%\lib%_EXT%\libspl*.so
-..\%__SRC%\lib\libspl*.dylib %_DEST%\lib%_EXT%\libspl*.dylib
-..\%__SRC%\lib\libsocomp.so %_DEST%\lib%_EXT%\libsocomp.so
-..\%__SRC%\lib\libsocomp.dylib %_DEST%\lib%_EXT%\libsocomp.dylib
-..\%__SRC%\bin\offacc*.dll %_DEST%\bin%_EXT%\offacc*.dll
-..\%__SRC%\lib\liboffacc*.so %_DEST%\lib%_EXT%\liboffacc*.so
-..\%__SRC%\lib\liboffacc*.dylib %_DEST%\lib%_EXT%\liboffacc*.dylib
-..\%__SRC%\bin\migratio*.dll %_DEST%\bin%_EXT%\migratio*.dll
-..\%__SRC%\lib\migratio*.uno.so %_DEST%\lib%_EXT%\migratio*.uno.so
-..\%__SRC%\lib\migratio*.uno.dylib %_DEST%\lib%_EXT%\migratio*.uno.dylib
-
-..\%__SRC%\bin\sweb %_DEST%\bin%_EXT%\sweb.bin
-
-..\%__SRC%\bin\loader2.ex? %_DEST%\bin%_EXT%\loader2.ex?
-
-..\%__SRC%\bin\depl*.dll %_DEST%\bin%_EXT%\depl*.dll
-..\%__SRC%\lib\deployment*.uno.so %_DEST%\lib%_EXT%\deployment*.uno.so
-..\%__SRC%\lib\deployment*.uno.dylib %_DEST%\lib%_EXT%\deployment*.uno.dylib
-..\%__SRC%\bin\deploymentmisc*.dll %_DEST%\bin%_EXT%\deploymentmisc*.dll
-..\%__SRC%\lib\libdeploymentmisc*.so %_DEST%\lib%_EXT%\libdeploymentmisc*.so
-..\%__SRC%\lib\libdeploymentmisc*.dylib %_DEST%\lib%_EXT%\libdeploymentmisc*.dylib
-..\%__SRC%\bin\guiloader.exe %_DEST%\bin%_EXT%\unopkg.exe
-..\%__SRC%\bin\so\guiloader.exe %_DEST%\bin%_EXT%\so\unopkg.exe
-..\%__SRC%\bin\unopkg %_DEST%\bin%_EXT%\unopkg.bin
-..\%__SRC%\bin\so\unopkg %_DEST%\bin%_EXT%\so\unopkg.bin
-..\%__SRC%\bin\unopkg.exe %_DEST%\bin%_EXT%\unopkg.bin
-..\%__SRC%\bin\so\unopkg.exe %_DEST%\bin%_EXT%\so\unopkg.bin
-..\%__SRC%\misc\unopkg.sh %_DEST%\bin%_EXT%\unopkg
-..\%__SRC%\bin\unopkga*.dll %_DEST%\bin%_EXT%\unopkga*.dll
-..\%__SRC%\lib\libunopkgapp.dylib %_DEST%\lib%_EXT%\libunopkgapp.dylib
-..\%__SRC%\lib\libunopkgapp.so %_DEST%\lib%_EXT%\libunopkgapp.so
-..\%__SRC%\bin\rebasegui.exe %_DEST%\bin%_EXT%\rebasegui.exe
-..\%__SRC%\bin\rebaseoo.exe %_DEST%\bin%_EXT%\rebaseoo.exe
-
-..\%__SRC%\bin\pagein %_DEST%\bin%_EXT%\pagein
-..\%__SRC%\misc\pagein-* %_DEST%\bin%_EXT%\pagein-*
-
-..\%__SRC%\bin\unoinfo.exe %_DEST%\bin%_EXT%\unoinfo.exe
-..\%__SRC%\misc\unoinfo.sh %_DEST%\bin%_EXT%\unoinfo
-
-..\%__SRC%\bin\*.res %_DEST%\bin%_EXT%\*.res
-
-..\%__SRC%\misc\soffice.sh-expanded %_DEST%\bin%_EXT%\soffice
-..\%__SRC%\misc\sbase.sh %_DEST%\bin%_EXT%\sbase
-..\%__SRC%\misc\scalc.sh %_DEST%\bin%_EXT%\scalc
-..\%__SRC%\misc\sdraw.sh %_DEST%\bin%_EXT%\sdraw
-..\%__SRC%\misc\simpress.sh %_DEST%\bin%_EXT%\simpress
-..\%__SRC%\misc\smaster.sh %_DEST%\bin%_EXT%\smaster
-..\%__SRC%\misc\smath.sh %_DEST%\bin%_EXT%\smath
-..\%__SRC%\misc\sweb.sh %_DEST%\bin%_EXT%\sweb
-..\%__SRC%\misc\swriter.sh %_DEST%\bin%_EXT%\swriter
-..\%__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
-
-..\%__SRC%\bin\guiloader.exe %_DEST%\bin%_EXT%\testtool.exe
-
-..\%__SRC%\bin\guistdio.exe %_DEST%\bin%_EXT%\guistdio.com
-..\%__SRC%\bin\guistdio.exe %_DEST%\bin%_EXT%\crashrep.com
-..\%__SRC%\bin\unopkgio.exe %_DEST%\bin%_EXT%\unopkg.com
-
-..\scripts\ure-link %_DEST%\bin%_EXT%\ure-link
-..\scripts\basis-link %_DEST%\bin%_EXT%\basis-link
-..\scripts\basis-link %_DEST%\bin%_EXT%\c01\basis-link
-..\scripts\basis-link %_DEST%\bin%_EXT%\c05\basis-link
-..\scripts\basis-link %_DEST%\bin%_EXT%\c08\basis-link
-..\scripts\so-basis-link %_DEST%\bin%_EXT%\so\basis-link
-..\scripts\odf-basis-link %_DEST%\bin%_EXT%\odf4ms\basis-link
-
-mkdir: %_DEST%\xml%_EXT%\registry\spool
-mkdir: %_DEST%\xml%_EXT%\registry\spool\org
-mkdir: %_DEST%\xml%_EXT%\registry\spool\org\openoffice
-mkdir: %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office
-mkdir: %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office\Jobs
-
-..\%__SRC%\class\*.jar %_DEST%\bin%_EXT%\*.jar
-..\%__SRC%\misc\registry\spool\org\openoffice\Office\Jobs\*.xcu %_DEST%\xml%_EXT%\registry\spool\org\openoffice\Office\Jobs
-..\%__SRC%\misc\deployment.component %_DEST%\xml%_EXT%\deployment.component
-..\%__SRC%\misc\deploymentgui.component %_DEST%\xml%_EXT%\deploymentgui.component
-..\%__SRC%\misc\migrationoo2.component %_DEST%\xml%_EXT%\migrationoo2.component
-..\%__SRC%\misc\migrationoo3.component %_DEST%\xml%_EXT%\migrationoo3.component
-..\%__SRC%\misc\offacc.component %_DEST%\xml%_EXT%\offacc.component
-..\%__SRC%\misc\productregistration.jar.component %_DEST%\xml%_EXT%\productregistration.jar.component
-..\%__SRC%\misc\socomp.component %_DEST%\xml%_EXT%\socomp.component
-..\%__SRC%\misc\spl.component %_DEST%\xml%_EXT%\spl.component
+mkdir: %COMMON_DEST%\bin\hid
+mkdir: %_DEST%\bin\so
+mkdir: %_DEST%\bin\c01
+mkdir: %_DEST%\bin\c05
+mkdir: %_DEST%\bin\c08
+mkdir: %_DEST%\bin\odf4ms
+
+..\%COMMON_OUTDIR%\misc\*.hid %COMMON_DEST%\bin\hid\*.hid
+..\%__SRC%\bin\soffice.bin %_DEST%\bin\soffice.bin
+..\%__SRC%\bin\officeloader.exe %_DEST%\bin\soffice.exe
+..\%__SRC%\bin\soffice %_DEST%\bin\soffice.bin
+..\%__SRC%\bin\soffice_mac %_DEST%\bin\soffice
+..\%__SRC%\bin\oosplash %_DEST%\bin\oosplash.bin
+..\%__SRC%\bin\so\soffice.bin %_DEST%\bin\so\soffice.bin
+..\%__SRC%\bin\so\officeloader.exe %_DEST%\bin\so\soffice.exe
+..\%__SRC%\bin\so\soffice %_DEST%\bin\so\soffice.bin
+..\%__SRC%\bin\so\soffice_mac %_DEST%\bin\so\soffice
+..\%__SRC%\bin\sofficea*.dll %_DEST%\bin\sofficea*.dll
+..\%__SRC%\lib\isofficeapp.lib %_DEST%\lib\isofficeapp.lib
+..\%__SRC%\lib\libsofficeapp.dylib %_DEST%\lib\libsofficeapp.dylib
+..\%__SRC%\lib\libsofficeapp.so %_DEST%\lib\libsofficeapp.so
+
+..\%__SRC%\bin\soffice_oo.exe %_DEST%\bin\soffice_oo.exe
+..\%__SRC%\bin\soffice_oo %_DEST%\bin\soffice_oo.bin
+..\%__SRC%\bin\so\soffice_so.exe %_DEST%\bin\so\soffice_so.exe
+..\%__SRC%\bin\so\soffice_so %_DEST%\bin\so\soffice_so.bin
+
+..\%__SRC%\bin\scalc.exe %_DEST%\bin\scalc.exe
+..\%__SRC%\bin\sdraw.exe %_DEST%\bin\sdraw.exe
+..\%__SRC%\bin\simpress.exe %_DEST%\bin\simpress.exe
+..\%__SRC%\bin\smath.exe %_DEST%\bin\smath.exe
+..\%__SRC%\bin\swriter.exe %_DEST%\bin\swriter.exe
+..\%__SRC%\bin\sbase.exe %_DEST%\bin\sbase.exe
+..\%__SRC%\bin\sweb.exe %_DEST%\bin\sweb.exe
+..\%__SRC%\bin\os2quickstart.exe %_DEST%\bin\quickstart.exe
+..\%__SRC%\bin\so\scalc.exe %_DEST%\bin\so\scalc.exe
+..\%__SRC%\bin\so\sdraw.exe %_DEST%\bin\so\sdraw.exe
+..\%__SRC%\bin\so\simpress.exe %_DEST%\bin\so\simpress.exe
+..\%__SRC%\bin\so\smath.exe %_DEST%\bin\so\smath.exe
+..\%__SRC%\bin\so\swriter.exe %_DEST%\bin\so\swriter.exe
+..\%__SRC%\bin\so\sbase.exe %_DEST%\bin\so\sbase.exe
+..\%__SRC%\bin\so\sweb.exe %_DEST%\bin\so\sweb.exe
+
+..\%__SRC%\bin\quickstart.exe %_DEST%\bin\quickstart.exe
+..\%__SRC%\bin\quickstart.exe %_DEST%\bin\install_quickstart.exe
+..\%__SRC%\bin\soquickstart.exe %_DEST%\bin\so\quickstart.exe
+..\%__SRC%\bin\soquickstart.exe %_DEST%\bin\so\install_quickstart.exe
+
+..\%__SRC%\misc\soffice.exe.manifest %_DEST%\bin\soffice.exe.manifest
+..\%__SRC%\misc\soffice.bin.manifest %_DEST%\bin\soffice.bin.manifest
+..\%__SRC%\bin\wrp*.dll %_DEST%\bin\wrp*.dll
+..\%__SRC%\bin\spl*.dll %_DEST%\bin\spl*.dll
+..\%__SRC%\bin\socomp.dll %_DEST%\bin\socomp.dll
+..\%__SRC%\obj\officeloader.obj %_DEST%\lib\officeloader.obj
+..\%__SRC%\obj\extendloaderenvironment.obj %_DEST%\lib\extendloaderenvironment.obj
+..\%__SRC%\obj\copyright_ascii_sun.obj %_DEST%\lib\copyright_ascii_sun.obj
+..\%__SRC%\obj\main.obj %_DEST%\lib\main.obj
+..\%__SRC%\lib\libwrp*.so %_DEST%\lib\libwrp*.so
+..\%__SRC%\lib\libwrp*.dylib %_DEST%\lib\libwrp*.dylib
+..\%__SRC%\lib\libspl*.so %_DEST%\lib\libspl*.so
+..\%__SRC%\lib\libspl*.dylib %_DEST%\lib\libspl*.dylib
+..\%__SRC%\lib\libsocomp.so %_DEST%\lib\libsocomp.so
+..\%__SRC%\lib\libsocomp.dylib %_DEST%\lib\libsocomp.dylib
+..\%__SRC%\bin\offacc*.dll %_DEST%\bin\offacc*.dll
+..\%__SRC%\lib\liboffacc*.so %_DEST%\lib\liboffacc*.so
+..\%__SRC%\lib\liboffacc*.dylib %_DEST%\lib\liboffacc*.dylib
+..\%__SRC%\bin\migratio*.dll %_DEST%\bin\migratio*.dll
+..\%__SRC%\lib\migratio*.uno.so %_DEST%\lib\migratio*.uno.so
+..\%__SRC%\lib\migratio*.uno.dylib %_DEST%\lib\migratio*.uno.dylib
+
+..\%__SRC%\bin\sweb %_DEST%\bin\sweb.bin
+
+..\%__SRC%\bin\loader2.ex? %_DEST%\bin\loader2.ex?
+
+..\%__SRC%\bin\depl*.dll %_DEST%\bin\depl*.dll
+..\%__SRC%\lib\deployment*.uno.so %_DEST%\lib\deployment*.uno.so
+..\%__SRC%\lib\deployment*.uno.dylib %_DEST%\lib\deployment*.uno.dylib
+..\%__SRC%\bin\deploymentmisc*.dll %_DEST%\bin\deploymentmisc*.dll
+..\%__SRC%\lib\libdeploymentmisc*.so %_DEST%\lib\libdeploymentmisc*.so
+..\%__SRC%\lib\libdeploymentmisc*.dylib %_DEST%\lib\libdeploymentmisc*.dylib
+..\%__SRC%\bin\guiloader.exe %_DEST%\bin\unopkg.exe
+..\%__SRC%\bin\so\guiloader.exe %_DEST%\bin\so\unopkg.exe
+..\%__SRC%\bin\unopkg %_DEST%\bin\unopkg.bin
+..\%__SRC%\bin\so\unopkg %_DEST%\bin\so\unopkg.bin
+..\%__SRC%\bin\unopkg.exe %_DEST%\bin\unopkg.bin
+..\%__SRC%\bin\so\unopkg.exe %_DEST%\bin\so\unopkg.bin
+..\%__SRC%\misc\unopkg.sh %_DEST%\bin\unopkg
+..\%__SRC%\bin\unopkga*.dll %_DEST%\bin\unopkga*.dll
+..\%__SRC%\lib\libunopkgapp.dylib %_DEST%\lib\libunopkgapp.dylib
+..\%__SRC%\lib\libunopkgapp.so %_DEST%\lib\libunopkgapp.so
+..\%__SRC%\bin\rebasegui.exe %_DEST%\bin\rebasegui.exe
+..\%__SRC%\bin\rebaseoo.exe %_DEST%\bin\rebaseoo.exe
+
+..\%__SRC%\bin\pagein %_DEST%\bin\pagein
+..\%__SRC%\misc\pagein-* %_DEST%\bin\pagein-*
+
+..\%__SRC%\bin\unoinfo.exe %_DEST%\bin\unoinfo.exe
+..\%__SRC%\misc\unoinfo.sh %_DEST%\bin\unoinfo
+
+..\%__SRC%\bin\*.res %_DEST%\bin\*.res
+
+..\%__SRC%\misc\soffice.sh-expanded %_DEST%\bin\soffice
+..\%__SRC%\misc\sbase.sh %_DEST%\bin\sbase
+..\%__SRC%\misc\scalc.sh %_DEST%\bin\scalc
+..\%__SRC%\misc\sdraw.sh %_DEST%\bin\sdraw
+..\%__SRC%\misc\simpress.sh %_DEST%\bin\simpress
+..\%__SRC%\misc\smaster.sh %_DEST%\bin\smaster
+..\%__SRC%\misc\smath.sh %_DEST%\bin\smath
+..\%__SRC%\misc\sweb.sh %_DEST%\bin\sweb
+..\%__SRC%\misc\swriter.sh %_DEST%\bin\swriter
+..\%__SRC%\misc\nswrapper.sh %_DEST%\bin\nswrapper
+..\%__SRC%\misc\mozwrapper.sh %_DEST%\bin\mozwrapper
+
+mkdir: %COMMON_DEST%\pck\brand
+mkdir: %COMMON_DEST%\pck\brand_dev
+
+..\%__SRC%\bin\intro.zip %COMMON_DEST%\pck\intro.zip
+..\%__SRC%\bin\brand\intro.zip %COMMON_DEST%\pck\brand\intro.zip
+..\%__SRC%\bin\brand_dev\intro.zip %COMMON_DEST%\pck\brand_dev\intro.zip
+..\%__SRC%\bin\shell\shell.zip %COMMON_DEST%\pck\shell.zip
+
+..\%__SRC%\bin\guiloader.exe %_DEST%\bin\testtool.exe
+
+..\%__SRC%\bin\guistdio.exe %_DEST%\bin\guistdio.com
+..\%__SRC%\bin\guistdio.exe %_DEST%\bin\crashrep.com
+..\%__SRC%\bin\unopkgio.exe %_DEST%\bin\unopkg.com
+
+..\scripts\ure-link %_DEST%\bin\ure-link
+..\scripts\basis-link %_DEST%\bin\basis-link
+..\scripts\basis-link %_DEST%\bin\c01\basis-link
+..\scripts\basis-link %_DEST%\bin\c05\basis-link
+..\scripts\basis-link %_DEST%\bin\c08\basis-link
+..\scripts\so-basis-link %_DEST%\bin\so\basis-link
+..\scripts\odf-basis-link %_DEST%\bin\odf4ms\basis-link
+
+mkdir: %_DEST%\xml\registry\spool
+mkdir: %_DEST%\xml\registry\spool\org
+mkdir: %_DEST%\xml\registry\spool\org\openoffice
+mkdir: %_DEST%\xml\registry\spool\org\openoffice\Office
+mkdir: %_DEST%\xml\registry\spool\org\openoffice\Office\Jobs
+
+..\%__SRC%\class\*.jar %_DEST%\bin\*.jar
+..\%__SRC%\misc\registry\spool\org\openoffice\Office\Jobs\*.xcu %_DEST%\xml\registry\spool\org\openoffice\Office\Jobs
+..\%__SRC%\misc\deployment.component %_DEST%\xml\deployment.component
+..\%__SRC%\misc\deploymentgui.component %_DEST%\xml\deploymentgui.component
+..\%__SRC%\misc\migrationoo2.component %_DEST%\xml\migrationoo2.component
+..\%__SRC%\misc\migrationoo3.component %_DEST%\xml\migrationoo3.component
+..\%__SRC%\misc\offacc.component %_DEST%\xml\offacc.component
+..\%__SRC%\misc\productregistration.jar.component %_DEST%\xml\productregistration.jar.component
+..\%__SRC%\misc\socomp.component %_DEST%\xml\socomp.component
+..\%__SRC%\misc\spl.component %_DEST%\xml\spl.component
+..\%__SRC%\misc\splash.component %_DEST%\xml\splash.component
diff --git a/desktop/qa/deployment_misc/makefile.mk b/desktop/qa/deployment_misc/makefile.mk
index 16223914e740..16223914e740 100644..100755
--- a/desktop/qa/deployment_misc/makefile.mk
+++ b/desktop/qa/deployment_misc/makefile.mk
diff --git a/desktop/qa/deployment_misc/test_dp_version.cxx b/desktop/qa/deployment_misc/test_dp_version.cxx
index a5d50f4ac6be..480172bb5abe 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.
@@ -91,3 +92,5 @@ CPPUNIT_TEST_SUITE_REGISTRATION(Test);
}
CPPUNIT_PLUGIN_IMPLEMENT();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/qa/deployment_misc/version.map b/desktop/qa/deployment_misc/version.map
index 3308588ef6f8..3308588ef6f8 100644..100755
--- a/desktop/qa/deployment_misc/version.map
+++ b/desktop/qa/deployment_misc/version.map
diff --git a/desktop/registry/data/org/openoffice/Office/makefile.mk b/desktop/registry/data/org/openoffice/Office/makefile.mk
index 2ad8441ea3d3..2ad8441ea3d3 100644..100755
--- a/desktop/registry/data/org/openoffice/Office/makefile.mk
+++ b/desktop/registry/data/org/openoffice/Office/makefile.mk
diff --git a/desktop/scripts/basis-link b/desktop/scripts/basis-link
index 3af84201e04f..3af84201e04f 100644..100755
--- a/desktop/scripts/basis-link
+++ b/desktop/scripts/basis-link
diff --git a/desktop/scripts/makefile.mk b/desktop/scripts/makefile.mk
index 5c412f818702..5c412f818702 100644..100755
--- a/desktop/scripts/makefile.mk
+++ b/desktop/scripts/makefile.mk
diff --git a/desktop/scripts/mozwrapper.sh b/desktop/scripts/mozwrapper.sh
index 89b6415358be..89b6415358be 100644..100755
--- a/desktop/scripts/mozwrapper.sh
+++ b/desktop/scripts/mozwrapper.sh
diff --git a/desktop/scripts/odf-basis-link b/desktop/scripts/odf-basis-link
index 3af84201e04f..3af84201e04f 100644..100755
--- a/desktop/scripts/odf-basis-link
+++ b/desktop/scripts/odf-basis-link
diff --git a/desktop/scripts/sbase.sh b/desktop/scripts/sbase.sh
index 932a535e53bd..e3a8ed07d5c0 100644..100755
--- 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 b1c3eebaff1f..c9c3cde39e49 100644..100755
--- 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 fe0338a89394..4131a2505f48 100644..100755
--- 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 20cae509b10a..d78ea14207c0 100644..100755
--- 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 affd55b265b0..ed9b09d51279 100644..100755
--- 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 ae4e3670a8d5..454fa135ff8e 100644..100755
--- 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/so-basis-link b/desktop/scripts/so-basis-link
index 3af84201e04f..3af84201e04f 100644..100755
--- a/desktop/scripts/so-basis-link
+++ b/desktop/scripts/so-basis-link
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
index b5494f9c9727..106bded2ea6a 100644..100755
--- a/desktop/scripts/soffice.sh
+++ b/desktop/scripts/soffice.sh
@@ -39,6 +39,19 @@ export SAL_ENABLE_FILE_LOCKING
# working on your system.
# SAL_NOOPENGL=true; export SAL_NOOPENGL
+unset XENVIRONMENT
+
+# uncomment line below to disable anti aliasing of fonts
+# SAL_ANTIALIAS_DISABLE=true; export SAL_ANTIALIAS_DISABLE
+
+# uncomment line below if you encounter problems starting soffice on your system
+# SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS
+
+# read database entries for Adabas D
+if [ -f /etc/adabasrc ]; then
+ . /etc/adabasrc
+fi
+
# The following is needed on Linux PPC with IBM j2sdk142:
#@# export JITC_PROCESSOR_TYPE=6
@@ -54,81 +67,37 @@ cd "`dirname "$sd_res"`"
sd_prog=`pwd`
cd "$sd_cwd"
-sd_binary=`basename "$0"`.bin
-
-#collect all bootstrap variables specified on the command line
-#so that they can be passed as arguments to javaldx later on
-for arg in $@
-do
- case "$arg" in
- -env:*) BOOTSTRAPVARS=$BOOTSTRAPVARS" ""$arg";;
- esac
-done
-
-# pagein
-sd_pagein_args=@pagein-common
-for sd_arg in "$@"; do
- case ${sd_arg} in
- -calc)
- sd_pagein_args="${sd_pagein_args} @pagein-calc"
- break;
- ;;
- -draw)
- sd_pagein_args="${sd_pagein_args} @pagein-draw"
- break;
- ;;
- -impress)
- sd_pagein_args="${sd_pagein_args} @pagein-impress"
- break;
- ;;
- -writer)
- sd_pagein_args="${sd_pagein_args} @pagein-writer"
- break;
- ;;
- esac
-done
-"$sd_prog/../basis-link/program/pagein" -L"$sd_prog/../basis-link/program" \
- ${sd_pagein_args}
-
-# extend the ld_library_path for java: javaldx checks the sofficerc for us
-if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then
- my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS \
- "-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"`
- if [ -n "$my_path" ] ; then
- LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
- export LD_LIBRARY_PATH
- fi
+# linked build needs additional settings
+if [ -e $sd_prog/ooenv ] ; then
+ . $sd_prog/ooenv
fi
-unset XENVIRONMENT
-
-# uncomment line below to disable anti aliasing of fonts
-# SAL_ANTIALIAS_DISABLE=true; export SAL_ANTIALIAS_DISABLE
-
-# uncomment line below if you encounter problems starting soffice on your system
-# SAL_NO_XINITTHREADS=true; export SAL_NO_XINITTHREADS
-
-# read database entries for Adabas D
-if [ -f /etc/adabasrc ]; then
- . /etc/adabasrc
+if [ "$VALGRIND" != "" ]; then
+ VALGRINDCHECK="valgrind --tool=$VALGRIND --trace-children=yes --trace-children-skip=*/java --error-exitcode=101"
+ export VALGRINDCHECK
+ if [ "$VALGRIND" = "memcheck" ]; then
+ G_SLICE=always-malloc
+ export G_SLICE
+ fi
fi
-# execute soffice binary
-"$sd_prog/$sd_binary" "$@" &
-trap 'kill -9 $!' TERM
-wait $!
-sd_ret=$?
-
-while [ $sd_ret -eq 79 -o $sd_ret -eq 81 ]
-do
- if [ $sd_ret -eq 79 ]; then
- "$sd_prog/$sd_binary" ""$BOOTSTRAPVARS"" &
- elif [ $sd_ret -eq 81 ]; then
- "$sd_prog/$sd_binary" "$@" &
+case "`uname -s`" in
+NetBSD|OpenBSD|FreeBSD|DragonFly)
+# 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
-
- wait $!
- sd_ret=$?
-done
-
-exit $sd_ret
+ ;;
+AIX)
+ LIBPATH=$sd_prog:$sd_prog/../basis-link/program:$sd_prog/../basis-link/ure-link/lib${LIBPATH:+:$LIBPATH}
+ export LIBPATH
+ ;;
+esac
+
+# oosplash does the rest: forcing pages in, javaldx etc. are
+exec $VALGRINDCHECK "$sd_prog/oosplash.bin" "$@"
diff --git a/desktop/scripts/sweb.sh b/desktop/scripts/sweb.sh
index 6d814e26e8aa..a365392584b6 100644..100755
--- 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 34ca9fee30c7..3fa48c0d3eba 100644..100755
--- 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/unoinfo.sh b/desktop/scripts/unoinfo.sh
index a7566155aa0d..a7566155aa0d 100644..100755
--- a/desktop/scripts/unoinfo.sh
+++ b/desktop/scripts/unoinfo.sh
diff --git a/desktop/scripts/unopkg.sh b/desktop/scripts/unopkg.sh
index 5020b89194d1..4419ea077e98 100644..100755
--- a/desktop/scripts/unopkg.sh
+++ b/desktop/scripts/unopkg.sh
@@ -42,6 +42,26 @@ 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|FreeBSD|DragonFly)
+ 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)
+ sd_prog1="$sd_prog/../basis-link/program"
+ sd_prog2="$sd_prog/../basis-link/ure-link/lib"
+ LIBPATH=$sd_prog1:$sd_prog2${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
#Recognize the "sync" option. sync must be applied without any other
@@ -67,8 +87,17 @@ if [ -x "$sd_prog/../basis-link/ure-link/bin/javaldx" ] ; then
my_path=`"$sd_prog/../basis-link/ure-link/bin/javaldx" $BOOTSTRAPVARS $JVMFWKPARAMS \
"-env:INIFILENAME=vnd.sun.star.pathname:$sd_prog/redirectrc"`
if [ -n "$my_path" ] ; then
- LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
- export LD_LIBRARY_PATH
+ sd_platform=`uname -s`
+ case $sd_platform in
+ AIX)
+ LIBPATH=$my_path${LIBPATH:+:$LIBPATH}
+ export LIBPATH
+ ;;
+ *)
+ LD_LIBRARY_PATH=$my_path${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
+ export LD_LIBRARY_PATH
+ ;;
+ esac
fi
fi
diff --git a/desktop/scripts/ure-link b/desktop/scripts/ure-link
index dd0ecb6115e8..dd0ecb6115e8 100644..100755
--- a/desktop/scripts/ure-link
+++ b/desktop/scripts/ure-link
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 02d838ca25c2..8991bb6334b0 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>
@@ -88,9 +89,7 @@
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/task/XJobExecutor.hpp>
#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 +100,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 +115,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,12 +141,13 @@
#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>
-#include "vos/process.hxx"
-
#include <svtools/fontsubstconfig.hxx>
#include <svtools/accessibilityoptions.hxx>
#include <svtools/apearcfg.hxx>
@@ -168,17 +165,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,14 +187,9 @@ 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"));
-static const ::rtl::OUString CFG_PATH_REG ( RTL_CONSTASCII_USTRINGPARAM( "Registration" ));
-static const ::rtl::OUString CFG_ENTRY_REGURL ( RTL_CONSTASCII_USTRINGPARAM( "URL" ));
-static const ::rtl::OUString CFG_ENTRY_TEMPLATEREGURL ( RTL_CONSTASCII_USTRINGPARAM( "TemplateURL" ));
-
static ::rtl::OUString getBrandSharePreregBundledPathURL();
// ----------------------------------------------------------------------------
@@ -209,27 +197,16 @@ ResMgr* Desktop::GetDesktopResManager()
{
if ( !Desktop::pResMgr )
{
- String aMgrName = String::CreateFromAscii( "dkt" );
-
// Create desktop resource manager and bootstrap process
// was successful. Use default way to get language specific message.
if ( Application::IsInExecute() )
- Desktop::pResMgr = ResMgr::CreateResMgr( U2S( aMgrName ));
+ Desktop::pResMgr = ResMgr::CreateResMgr("dkt");
if ( !Desktop::pResMgr )
{
// 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);
@@ -238,7 +215,7 @@ ResMgr* Desktop::GetDesktopResManager()
::com::sun::star::lang::Locale aLocale( aLanguage, aCountry, aVariant );
- Desktop::pResMgr = ResMgr::SearchCreateResMgr( U2S( aMgrName ), aLocale);
+ Desktop::pResMgr = ResMgr::SearchCreateResMgr( "dkt", aLocale);
AllSettings as = GetSettings();
as.SetUILocale(aLocale);
SetSettings(as);
@@ -294,7 +271,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 );
}
@@ -303,15 +280,12 @@ OUString MakeStartupConfigAccessErrorMessage( OUString const & aInternalErrMsg )
//=============================================================================
// shows a simple error box with the given message ... but exits from these process !
-//
// Fatal errors cant be solved by the process ... nor any recovery can help.
// Mostly the installation was damaged and must be repaired manually .. or by calling
// setup again.
-//
// On the other side we must make sure that no further actions will be possible within
// the current office process ! No pipe requests, no menu/toolbar/shortuct actions
// are allowed. Otherwise we will force a "crash inside a crash".
-//
// Thats why we have to use a special native message box here which does not use yield :-)
//=============================================================================
void FatalError(const ::rtl::OUString& sMessage)
@@ -319,8 +293,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 )
@@ -335,24 +308,21 @@ void FatalError(const ::rtl::OUString& sMessage)
_exit(ExitHelper::E_FATAL_ERROR);
}
-static bool ShouldSuppressUI(CommandLineArgs* pCmdLine)
+static bool ShouldSuppressUI(const CommandLineArgs& rCmdLine)
{
- return pCmdLine->IsInvisible() ||
- pCmdLine->IsHeadless() ||
- pCmdLine->IsQuickstart();
+ return rCmdLine.IsInvisible() ||
+ rCmdLine.IsHeadless() ||
+ rCmdLine.IsQuickstart();
}
-CommandLineArgs* Desktop::GetCommandLineArgs()
+namespace
{
- static CommandLineArgs* pArgs = 0;
- if ( !pArgs )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pArgs )
- pArgs = new CommandLineArgs;
- }
+ struct theCommandLineArgs : public rtl::Static< CommandLineArgs, theCommandLineArgs > {};
+}
- return pArgs;
+CommandLineArgs& Desktop::GetCommandLineArgs()
+{
+ return theCommandLineArgs::get();
}
sal_Bool InitConfiguration()
@@ -488,7 +458,7 @@ static bool needsSynchronization(
}
else if (err1 != ::osl::File::E_None)
{
- OSL_ENSURE(0, "Cannot access lastsynchronized in user layer");
+ OSL_FAIL("Cannot access lastsynchronized in user layer");
return true; //sync just in case
}
@@ -502,14 +472,14 @@ static bool needsSynchronization(
}
else if (err2 != ::osl::File::E_None)
{
- OSL_ENSURE(0, "Cannot access file lastsynchronized in base layer");
+ OSL_FAIL("Cannot access file lastsynchronized in base layer");
return true; //sync just in case
}
//compare the modification time of the extension folder and the last
//modified file
- ::osl::FileStatus statUser(FileStatusMask_ModifyTime);
- ::osl::FileStatus statBase(FileStatusMask_ModifyTime);
+ ::osl::FileStatus statUser(osl_FileStatus_Mask_ModifyTime);
+ ::osl::FileStatus statBase(osl_FileStatus_Mask_ModifyTime);
if (itemUserFile.getFileStatus(statUser) == ::osl::File::E_None)
{
if (itemBaseFile.getFileStatus(statBase) == ::osl::File::E_None)
@@ -632,72 +602,73 @@ throw()
}
else if( TypeToCopy == +1 ) // Folder
{
- osl::Directory aDir( srcUnqPath );
- err = aDir.open();
- if ( err != osl::FileBase::E_None )
- return err;
-
err = osl::Directory::create( dstUnqPath );
osl::FileBase::RC next = err;
- if( err == osl::FileBase::E_None ||
- err == osl::FileBase::E_EXIST )
+ if( err == osl::FileBase::E_None || err == osl::FileBase::E_EXIST )
{
err = osl::FileBase::E_None;
- sal_Int32 n_Mask = FileStatusMask_FileURL | FileStatusMask_FileName | FileStatusMask_Type;
- osl::DirectoryItem aDirItem;
+ osl::Directory aDir( srcUnqPath );
bool bExcludeFiles = excludeTmpFilesAndFolders(srcUnqPath);
-
- while( err == osl::FileBase::E_None && ( next = aDir.getNextItem( aDirItem ) ) == osl::FileBase::E_None )
+ if (aDir.open() == osl::FileBase::E_None)
{
- sal_Bool IsDoc = false;
- sal_Bool bFilter = false;
- osl::FileStatus aFileStatus( n_Mask );
- aDirItem.getFileStatus( aFileStatus );
- if( aFileStatus.isValid( FileStatusMask_Type ) )
- IsDoc = aFileStatus.getFileType() == osl::FileStatus::Regular;
-
- // Getting the information for the next recursive copy
- sal_Int32 newTypeToCopy = IsDoc ? -1 : +1;
-
- rtl::OUString newSrcUnqPath;
- if( aFileStatus.isValid( FileStatusMask_FileURL ) )
- newSrcUnqPath = aFileStatus.getFileURL();
-
- rtl::OUString newDstUnqPath = dstUnqPath;
- rtl::OUString tit;
- if( aFileStatus.isValid( FileStatusMask_FileName ) )
+ sal_Int32 n_Mask = osl_FileStatus_Mask_FileURL |
+ osl_FileStatus_Mask_FileName |
+ osl_FileStatus_Mask_Type;
+
+ osl::DirectoryItem aDirItem;
+ while( err == osl::FileBase::E_None && ( next = aDir.getNextItem( aDirItem ) ) == osl::FileBase::E_None )
{
- ::rtl::OUString aFileName = aFileStatus.getFileName();
- tit = rtl::Uri::encode( aFileName,
- rtl_UriCharClassPchar,
- rtl_UriEncodeIgnoreEscapes,
- RTL_TEXTENCODING_UTF8 );
-
- // Special treatment for "lastsychronized" file. Must not be
- // copied from the bundled folder!
- //Also do not copy *.tmp files and *.tmp_ folders. This affects the files/folders
- //from the help and configuration backend
- if ( IsDoc && (aFileName.equalsAscii( pLastSyncFileName )
- || bExcludeFiles && isExcludedFileOrFolder(aFileName)))
- bFilter = true;
- else if (!IsDoc && bExcludeFiles && isExcludedFileOrFolder(aFileName))
- bFilter = true;
- }
+ sal_Bool IsDoc = false;
+ sal_Bool bFilter = false;
+ osl::FileStatus aFileStatus( n_Mask );
+ aDirItem.getFileStatus( aFileStatus );
+ if( aFileStatus.isValid( osl_FileStatus_Mask_Type ) )
+ IsDoc = aFileStatus.getFileType() == osl::FileStatus::Regular;
+
+ // Getting the information for the next recursive copy
+ sal_Int32 newTypeToCopy = IsDoc ? -1 : +1;
+
+ rtl::OUString newSrcUnqPath;
+ if( aFileStatus.isValid( osl_FileStatus_Mask_FileURL ) )
+ newSrcUnqPath = aFileStatus.getFileURL();
+
+ rtl::OUString newDstUnqPath = dstUnqPath;
+ rtl::OUString tit;
+ if( aFileStatus.isValid( osl_FileStatus_Mask_FileName ) )
+ {
+ ::rtl::OUString aFileName = aFileStatus.getFileName();
+ tit = rtl::Uri::encode( aFileName,
+ rtl_UriCharClassPchar,
+ rtl_UriEncodeIgnoreEscapes,
+ RTL_TEXTENCODING_UTF8 );
+
+ // Special treatment for "lastsychronized" file. Must not be
+ // copied from the bundled folder!
+ //Also do not copy *.tmp files and *.tmp_ folders. This affects the files/folders
+ //from the help and configuration backend
+ if ( IsDoc && (aFileName.equalsAscii( pLastSyncFileName )
+ || (bExcludeFiles && isExcludedFileOrFolder(aFileName))))
+ bFilter = true;
+ else if (!IsDoc && bExcludeFiles && isExcludedFileOrFolder(aFileName))
+ bFilter = true;
+ }
- if( newDstUnqPath.lastIndexOf( sal_Unicode('/') ) != newDstUnqPath.getLength()-1 )
- newDstUnqPath += rtl::OUString::createFromAscii( "/" );
+ if( newDstUnqPath.lastIndexOf( sal_Unicode('/') ) != newDstUnqPath.getLength()-1 )
+ newDstUnqPath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
- newDstUnqPath += tit;
+ newDstUnqPath += tit;
- if (( newSrcUnqPath != dstUnqPath ) && !bFilter )
- err = copy_bundled_recursive( newSrcUnqPath,newDstUnqPath, newTypeToCopy );
- }
+ if (( newSrcUnqPath != dstUnqPath ) && !bFilter )
+ err = copy_bundled_recursive( newSrcUnqPath,newDstUnqPath, newTypeToCopy );
+ }
- if( err == osl::FileBase::E_None && next != osl::FileBase::E_NOENT )
- err = next;
+ if( err == osl::FileBase::E_None && next != osl::FileBase::E_NOENT )
+ err = next;
+
+ aDir.close();
+ }
}
- aDir.close();
}
return err;
@@ -738,14 +709,10 @@ void Desktop::Init()
}
}
- // create service factory...
- Reference < XMultiServiceFactory > rSMgr = CreateApplicationServiceManager();
- if( rSMgr.is() )
- {
- ::comphelper::setProcessServiceFactory( rSMgr );
- }
- else
+ // We need to have service factory before going further.
+ if( !::comphelper::getProcessServiceFactory().is())
{
+ OSL_FAIL("Service factory should have been crated in soffice_main().");
SetBootstrapError( BE_UNO_SERVICEMANAGER );
}
@@ -763,14 +730,7 @@ 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
+ const CommandLineArgs& rCmdLineArgs = GetCommandLineArgs();
// start ipc thread only for non-remote offices
RTL_LOGFILE_CONTEXT( aLog2, "desktop (cd100003) ::OfficeIPCThread::EnableOfficeIPCThread" );
OfficeIPCThread::Status aStatus = OfficeIPCThread::EnableOfficeIPCThread();
@@ -783,12 +743,30 @@ void Desktop::Init()
// 2nd office startup should terminate after sending cmdlineargs through pipe
SetBootstrapStatus(BS_TERMINATE);
}
- else if ( pCmdLineArgs->IsHelp() )
+ else if ( rCmdLineArgs.IsHelp() )
{
// 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 );
}
}
@@ -799,7 +777,7 @@ void Desktop::DeInit()
try {
// instead of removing of the configManager just let it commit all the changes
RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" );
- utl::ConfigManager::GetConfigManager()->StoreConfigItems();
+ utl::ConfigManager::GetConfigManager().StoreConfigItems();
FlushConfiguration();
RTL_LOGFILE_CONTEXT_TRACE( aLog, "<- store config items" );
@@ -812,11 +790,14 @@ void Desktop::DeInit()
// clear lockfile
if (m_pLockfile != NULL)
- m_pLockfile->clean();
+ {
+ delete m_pLockfile;
+ m_pLockfile = NULL;
+ }
OfficeIPCThread::DisableOfficeIPCThread();
if( pSignalHandler )
- DELETEZ( pSignalHandler );
+ osl_removeSignalHandler( pSignalHandler );
} catch (RuntimeException&) {
// someone threw an exception during shutdown
// this will leave some garbage behind..
@@ -830,7 +811,7 @@ sal_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& )
@@ -873,7 +854,12 @@ sal_Bool Desktop::QueryExit()
{
}
- if (m_pLockfile != NULL) m_pLockfile->clean();
+ if (m_pLockfile != NULL)
+ {
+ delete m_pLockfile;
+ m_pLockfile = NULL;
+ }
+
}
return bExit;
@@ -883,14 +869,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 );
@@ -899,16 +881,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 );
@@ -1215,9 +1187,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();
@@ -1237,9 +1209,9 @@ void Desktop::retrieveCrashReporterState()
sal_Bool Desktop::isUIOnSessionShutdownAllowed()
{
- static const ::rtl::OUString CFG_PACKAGE_RECOVERY = ::rtl::OUString::createFromAscii("org.openoffice.Office.Recovery/");
- static const ::rtl::OUString CFG_PATH_SESSION = ::rtl::OUString::createFromAscii("SessionShutdown" );
- static const ::rtl::OUString CFG_ENTRY_UIENABLED = ::rtl::OUString::createFromAscii("DocumentStoreUIEnabled" );
+ static const ::rtl::OUString CFG_PACKAGE_RECOVERY(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Recovery/"));
+ static const ::rtl::OUString CFG_PATH_SESSION(RTL_CONSTASCII_USTRINGPARAM("SessionShutdown"));
+ static const ::rtl::OUString CFG_ENTRY_UIENABLED(RTL_CONSTASCII_USTRINGPARAM("DocumentStoreUIEnabled"));
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
@@ -1288,12 +1260,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;
@@ -1323,11 +1293,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();
@@ -1470,14 +1440,14 @@ sal_uInt16 Desktop::Exception(sal_uInt16 nError)
}
bInException = sal_True;
- CommandLineArgs* pArgs = GetCommandLineArgs();
+ const CommandLineArgs& rArgs = GetCommandLineArgs();
// save all modified documents ... if it's allowed doing so.
sal_Bool bRestart = sal_False;
sal_Bool bAllowRecoveryAndSessionManagement = (
- ( !pArgs->IsNoRestore() ) && // some use cases of office must work without recovery
- ( !pArgs->IsHeadless() ) &&
- ( !pArgs->IsServer() ) &&
+ ( !rArgs.IsNoRestore() ) && // some use cases of office must work without recovery
+ ( !rArgs.IsHeadless() ) &&
+ ( !rArgs.IsServer() ) &&
(( nError & EXC_MAJORTYPE ) != EXC_DISPLAY ) && // recovery cant work without UI ... but UI layer seams to be the reason for this crash
( Application::IsInExecute() ) // crashes during startup and shutdown should be ignored (they indicates a corrupt installation ...)
);
@@ -1504,15 +1474,22 @@ sal_uInt16 Desktop::Exception(sal_uInt16 nError)
default:
{
- if (m_pLockfile != NULL) {
- m_pLockfile->clean();
+ if (m_pLockfile != NULL)
+ {
+ delete m_pLockfile;
+ m_pLockfile = NULL;
}
+
if( bRestart )
{
OfficeIPCThread::DisableOfficeIPCThread();
if( pSignalHandler )
- DELETEZ( pSignalHandler );
+ osl_removeSignalHandler( pSignalHandler );
+
restartOnMac(false);
+ if ( m_rSplashScreen.is() )
+ m_rSplashScreen->reset();
+
_exit( ExitHelper::E_CRASH_WITH_RESTART );
}
else
@@ -1533,6 +1510,24 @@ void Desktop::AppEvent( const ApplicationEvent& rAppEvent )
HandleAppEvent( rAppEvent );
}
+namespace {
+ void SetDocumentExtendedStyle( const Reference< ::com::sun::star::awt::XWindow > &xContainerWindow )
+ {
+ // set the WB_EXT_DOCUMENT style. Normally, this is done by the TaskCreator service when a "_blank"
+ // frame/window is created. Since we do not use the TaskCreator here, we need to mimic its behavior,
+ // otherwise documents loaded into this frame will later on miss functionality depending on the style.
+ Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow );
+ OSL_ENSURE( pContainerWindow, "Desktop::Main: no implementation access to the frame's container window!" );
+ if (!pContainerWindow) {
+ fprintf (stderr, "Error: It very much looks as if you have used 'linkoo' (or bin/ooinstall -l)\n"
+ "but have then forgotten to source 'ooenv' into your shell before running !\n"
+ "to save a crash, we will exit now with an error - please '. ./ooenv' first.\n");
+ exit (1);
+ }
+ pContainerWindow->SetExtendedStyle( pContainerWindow->GetExtendedStyle() | WB_EXT_DOCUMENT );
+ }
+}
+
struct ExecuteGlobals
{
Reference < css::document::XEventListener > xGlobalBroadcaster;
@@ -1549,7 +1544,7 @@ struct ExecuteGlobals
static ExecuteGlobals* pExecGlobals = NULL;
-void Desktop::Main()
+int Desktop::Main()
{
pExecGlobals = new ExecuteGlobals();
@@ -1563,23 +1558,23 @@ 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
com::sun::star::uno::setCurrentContext(
new DesktopContext( com::sun::star::uno::getCurrentContext() ) );
- CommandLineArgs* pCmdLineArgs = GetCommandLineArgs();
+ CommandLineArgs& rCmdLineArgs = GetCommandLineArgs();
// setup configuration error handling
ConfigurationErrorHandler aConfigErrHandler;
- if (!ShouldSuppressUI(pCmdLineArgs))
+ if (!ShouldSuppressUI(rCmdLineArgs))
aConfigErrHandler.activate();
ResMgr::SetReadStringHook( ReplaceStringHookProc );
@@ -1589,39 +1584,40 @@ 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)
{
- OSL_ENSURE(sal_False, "userinstall failed");
+ OSL_FAIL("userinstall failed");
if ( instErr_fin == UserInstall::E_NoDiskSpace )
HandleBootstrapErrors( BE_USERINSTALL_NOTENOUGHDISKSPACE );
else if ( instErr_fin == UserInstall::E_NoWriteAccess )
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 =
::comphelper::getProcessServiceFactory();
Reference< ::com::sun::star::task::XRestartManager > xRestartManager;
- int nAcquireCount( 0 );
try
{
RegisterServices( xSMgr );
- //SetSplashScreenProgress(15);
+ SetSplashScreenProgress(25);
#ifndef UNX
- if ( pCmdLineArgs->IsHelp() ) {
+ if ( rCmdLineArgs.IsHelp() )
+ {
displayCmdlineHelp();
- return;
+ return EXIT_SUCCESS;
}
#endif
@@ -1629,10 +1625,11 @@ void Desktop::Main()
// there is no other instance using our data files from a remote host
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main -> Lockfile" );
m_pLockfile = new Lockfile;
- if ( !pCmdLineArgs->IsHeadless() && !pCmdLineArgs->IsInvisible() &&
- !pCmdLineArgs->IsNoLockcheck() && !m_pLockfile->check( Lockfile_execWarning )) {
+ if ( !rCmdLineArgs.IsHeadless() && !rCmdLineArgs.IsInvisible() &&
+ !rCmdLineArgs.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" );
@@ -1644,18 +1641,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( rCmdLineArgs.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();
@@ -1669,7 +1668,7 @@ void Desktop::Main()
sal_Bool bCheckOk = sal_False;
::com::sun::star::lang::Locale aLocale;
String aMgrName = String::CreateFromAscii( "ofa" );
- ResMgr* pLabelResMgr = ResMgr::SearchCreateResMgr( U2S( aMgrName ), aLocale );
+ ResMgr* pLabelResMgr = ResMgr::SearchCreateResMgr( "ofa", aLocale );
String aTitle = pLabelResMgr ? String( ResId( RID_APPTITLE, *pLabelResMgr ) ) : String();
delete pLabelResMgr;
@@ -1677,7 +1676,7 @@ void Desktop::Main()
OUString aTitleString( aTitle );
bCheckOk = CheckInstallation( aTitleString );
if ( !bCheckOk )
- return;
+ return EXIT_FAILURE;
else
aTitle = aTitleString;
@@ -1691,12 +1690,13 @@ void Desktop::Main()
#endif
SetDisplayName( aTitle );
+ SetSplashScreenProgress(35);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ create SvtPathOptions and SvtLanguageOptions" );
pExecGlobals->pPathOptions.reset( new SvtPathOptions);
SetSplashScreenProgress(40);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} create SvtPathOptions and SvtLanguageOptions" );
- // Check special env variable #111015#
+ // Check special env variable
std::vector< String > aUnrestrictedFolders;
svt::getUnrestrictedFolders( aUnrestrictedFolders );
@@ -1731,7 +1731,7 @@ void Desktop::Main()
SynchronizeExtensionRepositories();
bool bAbort = CheckExtensionDependencies();
if ( bAbort )
- return;
+ return EXIT_FAILURE;
{
::comphelper::ComponentContext aContext( xSMgr );
@@ -1741,37 +1741,7 @@ void Desktop::Main()
// check whether the shutdown is caused by restart
pExecGlobals->bRestartRequested = ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
- // First Start Wizard allowed ?
- if ( ! pCmdLineArgs->IsNoFirstStartWizard() && !pExecGlobals->bRestartRequested )
- {
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ FirstStartWizard" );
-
- if (IsFirstStartWizardNeeded())
- {
- ::utl::RegOptions().removeReminder(); // remove patch registration reminder
- Reference< XJob > xFirstStartJob( xSMgr->createInstance(
- DEFINE_CONST_UNICODE( "com.sun.star.comp.desktop.FirstStart" ) ), UNO_QUERY );
- if (xFirstStartJob.is())
- {
- sal_Bool bDone = sal_False;
- Sequence< NamedValue > lArgs(2);
- lArgs[0].Name = ::rtl::OUString::createFromAscii("LicenseNeedsAcceptance");
- lArgs[0].Value <<= LicenseNeedsAcceptance();
- lArgs[1].Name = ::rtl::OUString::createFromAscii("LicensePath");
- lArgs[1].Value <<= GetLicensePath();
-
- xFirstStartJob->execute(lArgs) >>= bDone;
- if ( !bDone )
- {
- return;
- }
- }
- }
- else if ( RegistrationPage::hasReminderDateCome() )
- RegistrationPage::executeSingleMode();
-
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "} FirstStartWizard" );
- }
+ Migration::migrateSettingsIfNecessary();
// keep a language options instance...
pExecGlobals->pLanguageOptions.reset( new SvtLanguageOptions(sal_True));
@@ -1779,7 +1749,7 @@ void Desktop::Main()
if (pExecGlobals->xGlobalBroadcaster.is())
{
css::document::EventObject aEvent;
- aEvent.EventName = ::rtl::OUString::createFromAscii("OnStartApp");
+ aEvent.EventName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OnStartApp"));
pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent);
}
@@ -1802,7 +1772,7 @@ void Desktop::Main()
// check whether the shutdown is caused by restart
pExecGlobals->bRestartRequested = ( xRestartManager.is() && xRestartManager->isRestartRequested( sal_True ) );
- if ( pCmdLineArgs->IsHeadless() )
+ if ( rCmdLineArgs.IsHeadless() )
{
// Ensure that we use not the system file dialogs as
// headless mode relies on Application::EnableHeadlessMode()
@@ -1814,7 +1784,7 @@ void Desktop::Main()
if ( !pExecGlobals->bRestartRequested )
{
- if ((!pCmdLineArgs->WantsToLoadDocument() && !pCmdLineArgs->IsInvisible() && !pCmdLineArgs->IsHeadless() ) &&
+ if ((!rCmdLineArgs.WantsToLoadDocument() && !rCmdLineArgs.IsInvisible() && !rCmdLineArgs.IsHeadless() ) &&
(SvtModuleOptions().IsModuleInstalled(SvtModuleOptions::E_SSTARTMODULE)) &&
(!bExistsRecoveryData ) &&
(!bExistsSessionData ) &&
@@ -1824,6 +1794,7 @@ void Desktop::Main()
Reference< XFrame > xDesktopFrame( xSMgr->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" ))), UNO_QUERY );
if (xDesktopFrame.is())
{
+ SetSplashScreenProgress(60);
Reference< XFrame > xBackingFrame;
Reference< ::com::sun::star::awt::XWindow > xContainerWindow;
@@ -1832,13 +1803,7 @@ void Desktop::Main()
xContainerWindow = xBackingFrame->getContainerWindow();
if (xContainerWindow.is())
{
- // set the WB_EXT_DOCUMENT style. Normally, this is done by the TaskCreator service when a "_blank"
- // frame/window is created. Since we do not use the TaskCreator here, we need to mimic its behavior,
- // otherwise documents loaded into this frame will later on miss functionality depending on the style.
- Window* pContainerWindow = VCLUnoHelper::GetWindow( xContainerWindow );
- OSL_ENSURE( pContainerWindow, "Desktop::Main: no implementation access to the frame's container window!" );
- pContainerWindow->SetExtendedStyle( pContainerWindow->GetExtendedStyle() | WB_EXT_DOCUMENT );
-
+ SetDocumentExtendedStyle(xContainerWindow);
SetSplashScreenProgress(75);
Sequence< Any > lArgs(1);
lArgs[0] <<= xContainerWindow;
@@ -1868,13 +1833,14 @@ 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;
}
+ SetSplashScreenProgress(55);
SvtFontSubstConfig().Apply();
@@ -1883,6 +1849,7 @@ void Desktop::Main()
aAppearanceCfg.SetApplicationDefaults( this );
SvtAccessibilityOptions aOptions;
aOptions.SetVCLSettings();
+ SetSplashScreenProgress(60);
if ( !pExecGlobals->bRestartRequested )
{
@@ -1895,10 +1862,10 @@ void Desktop::Main()
// use system window dialogs
Application::SetSystemWindowMode( SYSTEMWINDOW_MODE_DIALOG );
- // SetSplashScreenProgress(80);
+ SetSplashScreenProgress(80);
- if ( !bTerminateRequested && !pCmdLineArgs->IsInvisible() &&
- !pCmdLineArgs->IsNoQuickstart() )
+ if ( !bTerminateRequested && !rCmdLineArgs.IsInvisible() &&
+ !rCmdLineArgs.IsNoQuickstart() )
InitializeQuickstartMode( xSMgr );
RTL_LOGFILE_CONTEXT( aLog2, "desktop (cd100003) createInstance com.sun.star.frame.Desktop" );
@@ -1913,9 +1880,12 @@ void Desktop::Main()
catch ( com::sun::star::uno::Exception& e )
{
FatalError( MakeStartupErrorMessage(e.Message) );
- return;
+ return EXIT_FAILURE;
}
+ // Release solar mutex just before we wait for our client to connect
+ int nAcquireCount = Application::ReleaseSolarMutex();
+
// Post user event to startup first application component window
// We have to send this OpenClients message short before execute() to
// minimize the risk that this message overtakes type detection contruction!!
@@ -1947,7 +1917,7 @@ void Desktop::Main()
if ( !pExecGlobals->bRestartRequested )
{
// if this run of the office is triggered by restart, some additional actions should be done
- DoRestartActionsIfNecessary( !pCmdLineArgs->IsInvisible() && !pCmdLineArgs->IsNoQuickstart() );
+ DoRestartActionsIfNecessary( !rCmdLineArgs.IsInvisible() && !rCmdLineArgs.IsNoQuickstart() );
Execute();
}
@@ -1965,13 +1935,13 @@ void Desktop::Main()
}
// CAUTION: you do not necessarily get here e.g. on the Mac.
// please put all deinitialization code into doShutdown
- doShutdown();
+ return doShutdown();
}
-void Desktop::doShutdown()
+int Desktop::doShutdown()
{
if( ! pExecGlobals )
- return;
+ return EXIT_SUCCESS;
if ( pExecGlobals->bRestartRequested )
SetRestartState();
@@ -1979,14 +1949,14 @@ void Desktop::doShutdown()
if (pExecGlobals->xGlobalBroadcaster.is())
{
css::document::EventObject aEvent;
- aEvent.EventName = ::rtl::OUString::createFromAscii("OnCloseApp");
+ aEvent.EventName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OnCloseApp"));
pExecGlobals->xGlobalBroadcaster->notifyEvent(aEvent);
}
delete pResMgr, pResMgr = NULL;
// Restore old value
- CommandLineArgs* pCmdLineArgs = GetCommandLineArgs();
- if ( pCmdLineArgs->IsHeadless() )
+ const CommandLineArgs& rCmdLineArgs = GetCommandLineArgs();
+ if ( rCmdLineArgs.IsHeadless() )
SvtMiscOptions().SetUseSystemFileDialog( pExecGlobals->bUseSystemFileDialog );
// remove temp directory
@@ -2016,14 +1986,17 @@ void Desktop::doShutdown()
if ( bRR )
{
restartOnMac(true);
- // wouldn't the solution be more clean if SalMain returns the exit code to the system?
- _exit( ExitHelper::E_NORMAL_RESTART );
+ if ( m_rSplashScreen.is() )
+ m_rSplashScreen->reset();
+
+ return ExitHelper::E_NORMAL_RESTART;
}
+ return EXIT_SUCCESS;
}
IMPL_LINK( Desktop, ImplInitFilterHdl, ConvertData*, pData )
{
- return GraphicFilter::GetGraphicFilter()->GetFilterCallback().Call( pData );
+ return GraphicFilter::GetGraphicFilter().GetFilterCallback().Call( pData );
}
sal_Bool Desktop::InitializeConfiguration()
@@ -2094,7 +2067,7 @@ sal_Bool Desktop::InitializeConfiguration()
void Desktop::FlushConfiguration()
{
- Reference < XFlushable > xCFGFlush( ::utl::ConfigManager::GetConfigManager()->GetConfigurationProvider(), UNO_QUERY );
+ Reference < XFlushable > xCFGFlush( ::utl::ConfigManager::GetConfigManager().GetConfigurationProvider(), UNO_QUERY );
if (xCFGFlush.is())
{
xCFGFlush->flush();
@@ -2102,12 +2075,28 @@ void Desktop::FlushConfiguration()
else
{
// because there is no method to flush the condiguration data, we must dispose the ConfigManager
- Reference < XComponent > xCFGDispose( ::utl::ConfigManager::GetConfigManager()->GetConfigurationProvider(), UNO_QUERY );
+ Reference < XComponent > xCFGDispose( ::utl::ConfigManager::GetConfigManager().GetConfigurationProvider(), UNO_QUERY );
if (xCFGDispose.is())
xCFGDispose->dispose();
}
}
+sal_Bool Desktop::shouldLaunchQuickstart()
+{
+ sal_Bool bQuickstart = GetCommandLineArgs().IsQuickstart();
+ if (!bQuickstart)
+ {
+ const SfxPoolItem* pItem=0;
+ SfxItemSet aQLSet(SFX_APP()->GetPool(), SID_ATTR_QUICKLAUNCHER, SID_ATTR_QUICKLAUNCHER);
+ SFX_APP()->GetOptions(aQLSet);
+ SfxItemState eState = aQLSet.GetItemState(SID_ATTR_QUICKLAUNCHER, sal_False, &pItem);
+ if (SFX_ITEM_SET == eState)
+ bQuickstart = ((SfxBoolItem*)pItem)->GetValue();
+ }
+ return bQuickstart;
+}
+
+
sal_Bool Desktop::InitializeQuickstartMode( Reference< XMultiServiceFactory >& rSMgr )
{
try
@@ -2117,9 +2106,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
@@ -2132,6 +2119,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 );
@@ -2180,24 +2169,8 @@ void Desktop::SystemSettingsChanging( AllSettings& rSettings, Window* )
hMouseSettings.SetFollow( aAppearanceCfg.IsMenuMouseFollow() ? (nFollow|MOUSE_FOLLOW_MENU) : (nFollow&~MOUSE_FOLLOW_MENU));
rSettings.SetMouseSettings(hMouseSettings);
- sal_Bool bUseImagesInMenus = hStyleSettings.GetUseImagesInMenus();
-
SvtMenuOptions aMenuOpt;
- nGet = aMenuOpt.GetMenuIconsState();
- switch ( nGet )
- {
- case 0:
- bUseImagesInMenus = sal_False;
- break;
- case 1:
- bUseImagesInMenus = sal_True;
- break;
- case 2:
- default:
- break;
- }
- hStyleSettings.SetUseImagesInMenus(bUseImagesInMenus);
-
+ hStyleSettings.SetUseImagesInMenus(aMenuOpt.GetMenuIconsState());
hStyleSettings.SetDragFullOptions( nDragFullOptions );
rSettings.SetStyleSettings ( hStyleSettings );
}
@@ -2233,7 +2206,6 @@ IMPL_LINK( Desktop, OpenClients_Impl, void*, EMPTYARG )
OfficeIPCThread::SetReady();
- // CloseStartupScreen();
CloseSplashScreen();
CheckFirstRun( );
EnableOleAutomation();
@@ -2266,7 +2238,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;
@@ -2279,7 +2251,7 @@ sal_Bool Desktop::CheckOEM()
}
}
-void Desktop::PreloadModuleData( CommandLineArgs* pArgs )
+void Desktop::PreloadModuleData( const CommandLineArgs& rArgs )
{
Reference< XMultiServiceFactory > rFactory = ::comphelper::getProcessServiceFactory();
@@ -2292,7 +2264,7 @@ void Desktop::PreloadModuleData( CommandLineArgs* pArgs )
if ( !xLoader.is() )
return;
- if ( pArgs->IsWriter() )
+ if ( rArgs.IsWriter() )
{
try
{
@@ -2304,7 +2276,7 @@ void Desktop::PreloadModuleData( CommandLineArgs* pArgs )
{
}
}
- if ( pArgs->IsCalc() )
+ if ( rArgs.IsCalc() )
{
try
{
@@ -2316,7 +2288,7 @@ void Desktop::PreloadModuleData( CommandLineArgs* pArgs )
{
}
}
- if ( pArgs->IsDraw() )
+ if ( rArgs.IsDraw() )
{
try
{
@@ -2328,7 +2300,7 @@ void Desktop::PreloadModuleData( CommandLineArgs* pArgs )
{
}
}
- if ( pArgs->IsImpress() )
+ if ( rArgs.IsImpress() )
{
try
{
@@ -2523,7 +2495,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 >(
@@ -2534,7 +2506,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 >(
@@ -2545,7 +2517,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 >(
@@ -2556,7 +2528,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 >(
@@ -2567,7 +2539,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 >(
@@ -2577,7 +2549,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 >(
@@ -2588,7 +2560,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 >(
@@ -2599,7 +2571,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 >(
@@ -2610,7 +2582,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 >(
@@ -2630,33 +2602,34 @@ void Desktop::OpenClients()
Reference < XComponent > xFirst;
sal_Bool bLoaded = sal_False;
- CommandLineArgs* pArgs = GetCommandLineArgs();
+ const CommandLineArgs& rArgs = GetCommandLineArgs();
SvtInternalOptions aInternalOptions;
Reference<XMultiServiceFactory> rFactory = ::comphelper::getProcessServiceFactory();
- if (!pArgs->IsQuickstart()) {
+ if (!rArgs.IsQuickstart())
+ {
sal_Bool bShowHelp = sal_False;
::rtl::OUStringBuffer aHelpURLBuffer;
- if (pArgs->IsHelpWriter()) {
+ if (rArgs.IsHelpWriter()) {
bShowHelp = sal_True;
aHelpURLBuffer.appendAscii("vnd.sun.star.help://swriter/start");
- } else if (pArgs->IsHelpCalc()) {
+ } else if (rArgs.IsHelpCalc()) {
bShowHelp = sal_True;
aHelpURLBuffer.appendAscii("vnd.sun.star.help://scalc/start");
- } else if (pArgs->IsHelpDraw()) {
+ } else if (rArgs.IsHelpDraw()) {
bShowHelp = sal_True;
aHelpURLBuffer.appendAscii("vnd.sun.star.help://sdraw/start");
- } else if (pArgs->IsHelpImpress()) {
+ } else if (rArgs.IsHelpImpress()) {
bShowHelp = sal_True;
aHelpURLBuffer.appendAscii("vnd.sun.star.help://simpress/start");
- } else if (pArgs->IsHelpBase()) {
+ } else if (rArgs.IsHelpBase()) {
bShowHelp = sal_True;
aHelpURLBuffer.appendAscii("vnd.sun.star.help://sdatabase/start");
- } else if (pArgs->IsHelpBasic()) {
+ } else if (rArgs.IsHelpBasic()) {
bShowHelp = sal_True;
aHelpURLBuffer.appendAscii("vnd.sun.star.help://sbasic/start");
- } else if (pArgs->IsHelpMath()) {
+ } else if (rArgs.IsHelpMath()) {
bShowHelp = sal_True;
aHelpURLBuffer.appendAscii("vnd.sun.star.help://smath/start");
}
@@ -2672,8 +2645,6 @@ void Desktop::OpenClients()
aHelpURLBuffer.appendAscii("&System=UNX");
#elif defined WNT
aHelpURLBuffer.appendAscii("&System=WIN");
-#elif defined OS2
- aHelpURLBuffer.appendAscii("&System=OS2");
#endif
pHelp->Start(aHelpURLBuffer.makeStringAndClear(), NULL);
return;
@@ -2682,15 +2653,14 @@ void Desktop::OpenClients()
else
{
OUString aIniName;
- ::vos::OStartupInfo aInfo;
- aInfo.getExecutableFile( aIniName );
+ osl_getExecutableFile( &aIniName.pData );
sal_uInt32 lastIndex = aIniName.lastIndexOf('/');
if ( lastIndex > 0 )
{
aIniName = aIniName.copy( 0, lastIndex+1 );
aIniName += OUString( RTL_CONSTASCII_USTRINGPARAM( "perftune" ));
-#if defined(WNT) || defined(OS2)
+#if defined(WNT)
aIniName += OUString( RTL_CONSTASCII_USTRINGPARAM( ".ini" ));
#else
aIniName += OUString( RTL_CONSTASCII_USTRINGPARAM( "rc" ));
@@ -2703,14 +2673,14 @@ 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() ||
- pArgs->IsDraw() ||
- pArgs->IsImpress() )
+ if ( rArgs.IsWriter() ||
+ rArgs.IsCalc() ||
+ rArgs.IsDraw() ||
+ rArgs.IsImpress() )
{
- PreloadModuleData( pArgs );
+ PreloadModuleData( rArgs );
}
PreloadConfigurationData();
@@ -2725,9 +2695,9 @@ void Desktop::OpenClients()
// Furter it's not acceptable to recover such documents without any UI. It can
// need some time, where the user wont see any results and wait for finishing the office startup ...
sal_Bool bAllowRecoveryAndSessionManagement = (
- ( !pArgs->IsNoRestore() ) &&
- ( !pArgs->IsHeadless() ) &&
- ( !pArgs->IsServer() )
+ ( !rArgs.IsNoRestore() ) &&
+ ( !rArgs.IsHeadless() ) &&
+ ( !rArgs.IsServer() )
);
if ( ! bAllowRecoveryAndSessionManagement )
@@ -2743,16 +2713,16 @@ 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());
+ OSL_FAIL(OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
}
}
else
@@ -2792,9 +2762,9 @@ 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());
+ OSL_FAIL(OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
}
}
@@ -2802,7 +2772,7 @@ void Desktop::OpenClients()
try
{
xSessionListener = Reference< XInitialization >(::comphelper::getProcessServiceFactory()->createInstance(
- OUString::createFromAscii("com.sun.star.frame.SessionListener")), UNO_QUERY_THROW);
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.SessionListener"))), UNO_QUERY_THROW);
// specifies whether the UI-interaction on Session shutdown is allowed
sal_Bool bAllowUI = isUIOnSessionShutdownAllowed();
@@ -2815,9 +2785,9 @@ 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());
+ OSL_FAIL(OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
}
if (
@@ -2833,9 +2803,9 @@ 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());
+ OSL_FAIL(OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
}
}
}
@@ -2843,19 +2813,23 @@ void Desktop::OpenClients()
OfficeIPCThread::EnableRequests();
sal_Bool bShutdown( sal_False );
- if ( !pArgs->IsServer() )
+ if ( !rArgs.IsServer() )
{
- ProcessDocumentsRequest aRequest(pArgs->getCwdUrl());
+ ProcessDocumentsRequest aRequest(rArgs.getCwdUrl());
aRequest.pcProcessed = NULL;
- pArgs->GetOpenList( aRequest.aOpenList );
- pArgs->GetViewList( aRequest.aViewList );
- pArgs->GetStartList( aRequest.aStartList );
- pArgs->GetPrintList( aRequest.aPrintList );
- pArgs->GetPrintToList( aRequest.aPrintToList );
- pArgs->GetPrinterName( aRequest.aPrinterName );
- pArgs->GetForceOpenList( aRequest.aForceOpenList );
- pArgs->GetForceNewList( aRequest.aForceNewList );
+ rArgs.GetOpenList( aRequest.aOpenList );
+ rArgs.GetViewList( aRequest.aViewList );
+ rArgs.GetStartList( aRequest.aStartList );
+ rArgs.GetPrintList( aRequest.aPrintList );
+ rArgs.GetPrintToList( aRequest.aPrintToList );
+ rArgs.GetPrinterName( aRequest.aPrinterName );
+ rArgs.GetForceOpenList( aRequest.aForceOpenList );
+ rArgs.GetForceNewList( aRequest.aForceNewList );
+ rArgs.GetConversionList( aRequest.aConversionList );
+ rArgs.GetConversionParams( aRequest.aConversionParams );
+ rArgs.GetConversionOut( aRequest.aConversionOut );
+ rArgs.GetInFilter( aRequest.aInFilter );
if ( aRequest.aOpenList.getLength() > 0 ||
aRequest.aViewList.getLength() > 0 ||
@@ -2863,22 +2837,23 @@ 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;
- if ( pArgs->HasModuleParam() )
+ if ( rArgs.HasModuleParam() )
{
SvtModuleOptions aOpt;
// Support command line parameters to start a module (as preselection)
- if ( pArgs->IsWriter() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SWRITER ) )
+ if ( rArgs.IsWriter() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SWRITER ) )
aRequest.aModule = aOpt.GetFactoryName( SvtModuleOptions::E_WRITER );
- else if ( pArgs->IsCalc() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SCALC ) )
+ else if ( rArgs.IsCalc() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SCALC ) )
aRequest.aModule = aOpt.GetFactoryName( SvtModuleOptions::E_CALC );
- else if ( pArgs->IsImpress() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SIMPRESS ) )
+ else if ( rArgs.IsImpress() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SIMPRESS ) )
aRequest.aModule= aOpt.GetFactoryName( SvtModuleOptions::E_IMPRESS );
- else if ( pArgs->IsDraw() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SDRAW ) )
+ else if ( rArgs.IsDraw() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SDRAW ) )
aRequest.aModule= aOpt.GetFactoryName( SvtModuleOptions::E_DRAW );
}
@@ -2910,10 +2885,10 @@ void Desktop::OpenClients()
::comphelper::getProcessServiceFactory()->createInstance( OUSTRING(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Desktop")) ),
::com::sun::star::uno::UNO_QUERY_THROW );
Reference< XElementAccess > xList( xTasksSupplier->getFrames(), UNO_QUERY_THROW );
- if ( xList->hasElements() || pArgs->IsServer() )
+ if ( xList->hasElements() || rArgs.IsServer() )
return;
- if ( pArgs->IsQuickstart() || pArgs->IsInvisible() || pArgs->IsBean() || Application::AnyInput( INPUT_APPEVENT ) )
+ if ( rArgs.IsQuickstart() || rArgs.IsInvisible() || rArgs.IsBean() || Application::AnyInput( INPUT_APPEVENT ) )
// soffice was started as tray icon ...
return;
{
@@ -2929,26 +2904,26 @@ void Desktop::OpenDefault()
::rtl::OUString aName;
SvtModuleOptions aOpt;
- CommandLineArgs* pArgs = GetCommandLineArgs();
- if ( pArgs->IsNoDefault() ) return;
- if ( pArgs->HasModuleParam() )
+ const CommandLineArgs& rArgs = GetCommandLineArgs();
+ if ( rArgs.IsNoDefault() ) return;
+ if ( rArgs.HasModuleParam() )
{
// Support new command line parameters to start a module
- if ( pArgs->IsWriter() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SWRITER ) )
+ if ( rArgs.IsWriter() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SWRITER ) )
aName = aOpt.GetFactoryEmptyDocumentURL( SvtModuleOptions::E_WRITER );
- else if ( pArgs->IsCalc() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SCALC ) )
+ else if ( rArgs.IsCalc() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SCALC ) )
aName = aOpt.GetFactoryEmptyDocumentURL( SvtModuleOptions::E_CALC );
- else if ( pArgs->IsImpress() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SIMPRESS ) )
+ else if ( rArgs.IsImpress() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SIMPRESS ) )
aName = aOpt.GetFactoryEmptyDocumentURL( SvtModuleOptions::E_IMPRESS );
- else if ( pArgs->IsBase() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SDATABASE ) )
+ else if ( rArgs.IsBase() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SDATABASE ) )
aName = aOpt.GetFactoryEmptyDocumentURL( SvtModuleOptions::E_DATABASE );
- else if ( pArgs->IsDraw() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SDRAW ) )
+ else if ( rArgs.IsDraw() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SDRAW ) )
aName = aOpt.GetFactoryEmptyDocumentURL( SvtModuleOptions::E_DRAW );
- else if ( pArgs->IsMath() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SMATH ) )
+ else if ( rArgs.IsMath() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SMATH ) )
aName = aOpt.GetFactoryEmptyDocumentURL( SvtModuleOptions::E_MATH );
- else if ( pArgs->IsGlobal() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SWRITER ) )
+ else if ( rArgs.IsGlobal() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SWRITER ) )
aName = aOpt.GetFactoryEmptyDocumentURL( SvtModuleOptions::E_WRITERGLOBAL );
- else if ( pArgs->IsWeb() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SWRITER ) )
+ else if ( rArgs.IsWeb() && aOpt.IsModuleInstalled( SvtModuleOptions::E_SWRITER ) )
aName = aOpt.GetFactoryEmptyDocumentURL( SvtModuleOptions::E_WRITERWEB );
}
@@ -2969,7 +2944,7 @@ void Desktop::OpenDefault()
return;
}
- ProcessDocumentsRequest aRequest(pArgs->getCwdUrl());
+ ProcessDocumentsRequest aRequest(rArgs.getCwdUrl());
aRequest.pcProcessed = NULL;
aRequest.aOpenList = aName;
OfficeIPCThread::ExecuteCmdLineRequests( aRequest );
@@ -2999,7 +2974,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.
@@ -3011,13 +2986,12 @@ String GetURL_Impl(
// Use the provided parameters for smartRel2Abs to support the usage of '%' in system paths.
// Otherwise this char won't get encoded and we are not able to load such files later,
- // see #110156#
bool bWasAbsolute;
INetURLObject aURL = aObj.smartRel2Abs( rName, bWasAbsolute, false, INetURLObject::WAS_ENCODED,
RTL_TEXTENCODING_UTF8, true );
String aFileURL = aURL.GetMainURL(INetURLObject::NO_DECODE);
- ::osl::FileStatus aStatus( FileStatusMask_FileURL );
+ ::osl::FileStatus aStatus( osl_FileStatus_Mask_FileURL );
::osl::DirectoryItem aItem;
if( ::osl::FileBase::E_None == ::osl::DirectoryItem::get( aFileURL, aItem ) &&
::osl::FileBase::E_None == aItem.getFileStatus( aStatus ) )
@@ -3028,7 +3002,7 @@ String GetURL_Impl(
void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
{
- if ( rAppEvent.GetEvent() == "APPEAR" && !GetCommandLineArgs()->IsInvisible() )
+ if ( rAppEvent.GetEvent() == "APPEAR" && !GetCommandLineArgs().IsInvisible() )
{
css::uno::Reference< css::lang::XMultiServiceFactory > xSMGR = ::comphelper::getProcessServiceFactory();
@@ -3084,7 +3058,7 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
}
}
}
- else if ( rAppEvent.GetEvent() == "QUICKSTART" && !GetCommandLineArgs()->IsInvisible() )
+ else if ( rAppEvent.GetEvent() == "QUICKSTART" && !GetCommandLineArgs().IsInvisible() )
{
// If the office has been started the second time its command line arguments are sent through a pipe
// connection to the first office. We want to reuse the quickstart option for the first office.
@@ -3130,11 +3104,11 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
{
OUString aOpenURL(rAppEvent.GetData().GetBuffer());
- CommandLineArgs* pCmdLine = GetCommandLineArgs();
- if ( !pCmdLine->IsInvisible() && !pCmdLine->IsTerminateAfterInit() )
+ const CommandLineArgs& rCmdLine = GetCommandLineArgs();
+ if ( !rCmdLine.IsInvisible() && !rCmdLine.IsTerminateAfterInit() )
{
ProcessDocumentsRequest* pDocsRequest = new ProcessDocumentsRequest(
- pCmdLine->getCwdUrl());
+ rCmdLine.getCwdUrl());
pDocsRequest->aOpenList = aOpenURL;
pDocsRequest->pcProcessed = NULL;
@@ -3146,11 +3120,11 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
{
OUString aPrintURL(rAppEvent.GetData().GetBuffer());
- CommandLineArgs* pCmdLine = GetCommandLineArgs();
- if ( !pCmdLine->IsInvisible() && !pCmdLine->IsTerminateAfterInit() )
+ const CommandLineArgs& rCmdLine = GetCommandLineArgs();
+ if ( !rCmdLine.IsInvisible() && !rCmdLine.IsTerminateAfterInit() )
{
ProcessDocumentsRequest* pDocsRequest = new ProcessDocumentsRequest(
- pCmdLine->getCwdUrl());
+ rCmdLine.getCwdUrl());
pDocsRequest->aPrintList = aPrintURL;
pDocsRequest->pcProcessed = NULL;
@@ -3211,48 +3185,53 @@ void Desktop::HandleAppEvent( const ApplicationEvent& rAppEvent )
void Desktop::OpenSplashScreen()
{
::rtl::OUString aTmpString;
- CommandLineArgs* pCmdLine = GetCommandLineArgs();
+ const CommandLineArgs &rCmdLine = GetCommandLineArgs();
sal_Bool bVisible = sal_False;
// Show intro only if this is normal start (e.g. no server, no quickstart, no printing )
- if ( !pCmdLine->IsInvisible() &&
- !pCmdLine->IsHeadless() &&
- !pCmdLine->IsQuickstart() &&
- !pCmdLine->IsMinimized() &&
- !pCmdLine->IsNoLogo() &&
- !pCmdLine->IsTerminateAfterInit() &&
- !pCmdLine->GetPrintList( aTmpString ) &&
- !pCmdLine->GetPrintToList( aTmpString ) )
+ if ( !rCmdLine.IsInvisible() &&
+ !rCmdLine.IsHeadless() &&
+ !rCmdLine.IsQuickstart() &&
+ !rCmdLine.IsMinimized() &&
+ !rCmdLine.IsNoLogo() &&
+ !rCmdLine.IsTerminateAfterInit() &&
+ !rCmdLine.GetPrintList( aTmpString ) &&
+ !rCmdLine.GetPrintToList( aTmpString ) &&
+ !rCmdLine.GetConversionList( aTmpString ))
{
// Determine application name from command line parameters
OUString aAppName;
- if ( pCmdLine->IsWriter() )
+ if ( rCmdLine.IsWriter() )
aAppName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "writer" ));
- else if ( pCmdLine->IsCalc() )
+ else if ( rCmdLine.IsCalc() )
aAppName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "calc" ));
- else if ( pCmdLine->IsDraw() )
+ else if ( rCmdLine.IsDraw() )
aAppName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "draw" ));
- else if ( pCmdLine->IsImpress() )
+ else if ( rCmdLine.IsImpress() )
aAppName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "impress" ));
- else if ( pCmdLine->IsBase() )
+ else if ( rCmdLine.IsBase() )
aAppName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "base" ));
- else if ( pCmdLine->IsGlobal() )
+ else if ( rCmdLine.IsGlobal() )
aAppName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "global" ));
- else if ( pCmdLine->IsMath() )
+ else if ( rCmdLine.IsMath() )
aAppName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "math" ));
- else if ( pCmdLine->IsWeb() )
+ else if ( rCmdLine.IsWeb() )
aAppName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "web" ));
+ // Which splash to use
+ OUString aSplashService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.office.SplashScreen" ));
+ if ( rCmdLine.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);
}
}
@@ -3287,21 +3266,21 @@ 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&)
{
- OSL_ENSURE( sal_False, "Desktop::DoFirstRunInitializations: caught an exception while trigger job executor ..." );
+ OSL_FAIL( "Desktop::DoFirstRunInitializations: caught an exception while trigger job executor ..." );
}
}
// ========================================================================
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
@@ -3343,3 +3322,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 6adc4b81dc54..a5a161181efa 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,88 +49,6 @@ 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()
-{
- // 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 )
- {
- aLangString += OUString::createFromAscii("-");
- aLangString += aLocale.Country;
- if ( aLocale.Variant.getLength() != 0 )
- {
- aLangString += OUString::createFromAscii("-");
- aLangString += aLocale.Variant;
- }
- }
-#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()
-{
- // Don't show a license
- return sal_False;
-/*
- sal_Bool bShowLicense = sal_True;
- sal_Int32 nOpenSourceContext = 0;
- try
- {
- ::utl::ConfigManager::GetDirectConfigProperty(
- ::utl::ConfigManager::OPENSOURCECONTEXT ) >>= nOpenSourceContext;
- }
- catch( const ::com::sun::star::uno::Exception& ) {}
-
- // open source needs no license
- if ( nOpenSourceContext > 0 )
- bShowLicense = sal_False;
-
- return bShowLicense;
-*/
-}
-
/* Local function - get access to the configuration */
static Reference< XPropertySet > impl_getConfigurationAccess( const OUString& rPath )
{
@@ -146,128 +65,6 @@ static Reference< XPropertySet > impl_getConfigurationAccess( const OUString& rP
xConfigProvider->createInstanceWithArguments( sAccessSrvc, aArgs ), UNO_QUERY_THROW );
}
-/* Local function - was the wizard completed already? */
-static sal_Bool impl_isFirstStart()
-{
- try {
- Reference< XPropertySet > xPSet = impl_getConfigurationAccess( OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Setup/Office" ) ) );
-
- Any result = xPSet->getPropertyValue(OUString::createFromAscii("FirstStartWizardCompleted"));
- sal_Bool bCompleted = sal_False;
- if ((result >>= bCompleted) && bCompleted)
- return sal_False; // wizard was already completed
- else
- return sal_True;
- } catch (const Exception&)
- {
- return sal_True;
- }
-}
-
-/* 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;
-
- OUString aDateTimeSep = OUString::createFromAscii("T");
- OUString aDateSep = OUString::createFromAscii("-");
- OUString aTimeSep = OUString::createFromAscii(":");
- OUString aUTCString = OUString::createFromAscii("Z");
-
- OUString aDateString = aDateTimeString.copy(0, nDateLength);
- OUString aTimeString = aDateTimeString.copy(nDateLength+1, nTimeLength);
-
- sal_Int32 nIndex = 0;
- sal_Int32 nYear = aDateString.getToken(0, '-', nIndex).toInt32();
- sal_Int32 nMonth = aDateString.getToken(0, '-', nIndex).toInt32();
- sal_Int32 nDay = aDateString.getToken(0, '-', nIndex).toInt32();
- nIndex = 0;
- sal_Int32 nHour = aTimeString.getToken(0, ':', nIndex).toInt32();
- sal_Int32 nMinute = aTimeString.getToken(0, ':', nIndex).toInt32();
- sal_Int32 nSecond = aTimeString.getToken(0, ':', nIndex).toInt32();
-
- Date tmpDate((sal_uInt16)nDay, (sal_uInt16)nMonth, (sal_uInt16)nYear);
- Time tmpTime(nHour, nMinute, nSecond);
- DateTime tmpDateTime(tmpDate, tmpTime);
- if (aString.indexOf(aUTCString) < 0)
- tmpDateTime.ConvertToUTC();
-
- aDateTime = tmpDateTime;
- return sal_True;
-}
-
-/* Local function - was the license accepted already? */
-static sal_Bool impl_isLicenseAccepted()
-{
- // If no license will be shown ... it must not be accepted.
- // So it was accepted "hardly" by the outside installer.
- // But if the configuration entry "HideEula" will be removed afterwards ..
- // we have to show the licese page again and user has to accept it here .-)
- if ( ! Desktop::LicenseNeedsAcceptance() )
- return sal_True;
-
- try
- {
- Reference< XPropertySet > xPSet = impl_getConfigurationAccess( OUString( RTL_CONSTASCII_USTRINGPARAM( "org.openoffice.Setup/Office" ) ) );
-
- Any result = xPSet->getPropertyValue(OUString::createFromAscii("LicenseAcceptDate"));
-
- OUString aAcceptDate;
- if (result >>= aAcceptDate)
- {
- // compare to date of license file
- OUString aLicenseURL = Desktop::GetLicensePath();
- osl::DirectoryItem aDirItem;
- if (osl::DirectoryItem::get(aLicenseURL, aDirItem) != osl::FileBase::E_None)
- return sal_False;
- osl::FileStatus aStatus(FileStatusMask_All);
- if (aDirItem.getFileStatus(aStatus) != osl::FileBase::E_None)
- return sal_False;
- TimeValue aTimeVal = aStatus.getModifyTime();
- oslDateTime aDateTimeVal;
- if (!osl_getDateTimeFromTimeValue(&aTimeVal, &aDateTimeVal))
- return sal_False;
-
- // compare dates
- DateTime aLicenseDateTime = impl_oslDateTimeToDateTime(aDateTimeVal);
- DateTime aAcceptDateTime;
- if (!impl_parseDateTime(aAcceptDate, aAcceptDateTime))
- return sal_False;
-
- if ( aAcceptDateTime > aLicenseDateTime )
- return sal_True;
- }
- return sal_False;
- } catch (const Exception&)
- {
- return sal_False;
- }
-}
-
-/* Check if we need the first start wizard. */
-sal_Bool Desktop::IsFirstStartWizardNeeded()
-{
- return impl_isFirstStart() || !impl_isLicenseAccepted();
-}
-
void Desktop::DoRestartActionsIfNecessary( sal_Bool bQuickStart )
{
if ( bQuickStart )
@@ -284,9 +81,9 @@ void Desktop::DoRestartActionsIfNecessary( sal_Bool bQuickStart )
xPSet->setPropertyValue( sPropName, makeAny( sal_False ) );
Reference< util::XChangesBatch >( xPSet, UNO_QUERY_THROW )->commitChanges();
- Sequence< Any > aSeq( 2 );
- aSeq[0] <<= sal_True;
- aSeq[1] <<= sal_True;
+ 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 );
@@ -316,3 +113,4 @@ void Desktop::SetRestartState()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index 97eb3f555f60..be1d1502f683 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>
@@ -81,8 +82,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;
@@ -90,6 +89,8 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::registry;
using namespace ::com::sun::star::ucb;
+using ::rtl::OUString;
+
namespace desktop
{
@@ -102,12 +103,12 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect)
xServiceFactory( comphelper::getProcessServiceFactory() );
if (!xServiceFactory.is())
{
- DBG_ERROR("configureUcb(): No XMultiServiceFactory");
+ OSL_FAIL("configureUcb(): No XMultiServiceFactory");
return false;
}
rtl::OUString aPipe;
- vos::OSecurity().getUserIdent(aPipe);
+ osl::Security().getUserIdent(aPipe);
rtl::OUStringBuffer aPortal;
if (rPortalConnect.getLength() != 0)
@@ -118,14 +119,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,34 +146,13 @@ 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
+ //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
// a different thread. The latter may happen when calling the Office remotely via UNO.
// THIS IS NOT A FIX, JUST A WORKAROUND!
@@ -182,21 +161,20 @@ 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) {
+ } catch (RuntimeException &e) {
}
}
#endif // GNOME_VFS_ENABLED
@@ -254,16 +232,16 @@ void Desktop::RegisterServices( Reference< XMultiServiceFactory >& xSMgr )
sal_Bool bHeadlessMode = sal_False;
// interpret command line arguments
- CommandLineArgs* pCmdLine = GetCommandLineArgs();
+ CommandLineArgs& rCmdLine = GetCommandLineArgs();
// read accept string from configuration
conDcp = SvtStartOptions().GetConnectionURL();
- if ( pCmdLine->GetAcceptString( aTmpString ))
+ if ( rCmdLine.GetAcceptString( aTmpString ))
conDcp = aTmpString;
// Headless mode for FAT Office
- bHeadlessMode = pCmdLine->IsHeadless();
+ bHeadlessMode = rCmdLine.IsHeadless();
if ( bHeadlessMode )
Application::EnableHeadlessMode();
@@ -276,7 +254,7 @@ void Desktop::RegisterServices( Reference< XMultiServiceFactory >& xSMgr )
// improves parallel processing on Sun ONE Webtop
// servicemanager up -> copy user installation
- if ( pCmdLine->IsServer() )
+ if ( rCmdLine.IsServer() )
{
// Check some mandatory environment states if "-server" is possible. Otherwise ignore
// this parameter.
@@ -288,19 +266,19 @@ void Desktop::RegisterServices( Reference< XMultiServiceFactory >& xSMgr )
if ( !rEnum.is() )
{
// Reset server parameter so it is ignored in the furthermore startup process
- pCmdLine->SetBoolParam( CommandLineArgs::CMD_BOOLPARAM_SERVER, sal_False );
+ rCmdLine.SetBoolParam( CommandLineArgs::CMD_BOOLPARAM_SERVER, sal_False );
}
}
}
::rtl::OUString aPortalConnect;
- bool bServer = (bool)pCmdLine->IsServer();
+ bool bServer = (bool)rCmdLine.IsServer();
- pCmdLine->GetPortalConnectString( aPortalConnect );
+ rCmdLine.GetPortalConnectString( aPortalConnect );
if ( !configureUcb( bServer, aPortalConnect ) )
{
- DBG_ERROR( "Can't configure UCB" );
- throw com::sun::star::uno::Exception(rtl::OUString::createFromAscii("RegisterServices, configureUcb"), NULL);
+ OSL_FAIL( "Can't configure UCB" );
+ throw com::sun::star::uno::Exception(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("RegisterServices, configureUcb")), NULL);
}
CreateTemporaryDirectory();
@@ -328,7 +306,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 );
@@ -336,11 +314,11 @@ void Desktop::createAcceptor(const OUString& aAcceptString)
} catch (com::sun::star::uno::Exception&) {
// no error handling needed...
// acceptor just won't come up
- OSL_ENSURE(sal_False, "Acceptor could not be created.");
+ OSL_FAIL("Acceptor could not be created.");
}
} else {
// there is already an acceptor with this description
- OSL_ENSURE(sal_False, "Acceptor already exists.");
+ OSL_FAIL("Acceptor already exists.");
}
}
@@ -390,7 +368,7 @@ void Desktop::destroyAcceptor(const OUString& aAcceptString)
// this is the last reference and the acceptor will be destructed
rMap.erase(aAcceptString);
} else {
- OSL_ENSURE(sal_False, "Found no acceptor to remove");
+ OSL_FAIL("Found no acceptor to remove");
}
}
}
@@ -482,3 +460,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 c5b48fd4a488..b4a756aa31ee 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 4cff81e3bb54..47c7778e56e1 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.
@@ -34,11 +35,10 @@
#include <rtl/ustring.hxx>
#include <tools/solar.h>
-#include <tools/prewin.h>
-#include <winreg.h>
-#include <tools/postwin.h>
#include <tools/urlobj.hxx>
+#include <windows.h>
+
#define U2S(STRING) ::rtl::OUStringToOString(STRING, RTL_TEXTENCODING_UTF8)
@@ -54,7 +54,7 @@ void FATToVFat_Impl( String& aName )
HANDLE h = FindFirstFile( U2S(aName).getStr(), &aData );
if ( h )
{
- // FAT-Kurzname in VFAT-Langname wandeln
+ // Change FAT short filename into VFAT long filename
aObj.removeSegment();
aObj.insertName( String::CreateFromAscii( aData.cFileName ) );
aName = aObj.PathToFileName();
@@ -67,3 +67,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 5d1b06c1bbe7..d2f13ff0aace 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 664e63c7f6ca..fbc5136518c3 100755..100644
--- 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.
@@ -219,8 +220,6 @@ void SilentCommandEnv::pop() throw (uno::RuntimeException)
} // end namespace
//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
-//-----------------------------------------------------------------------------
static const OUString sConfigSrvc( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationProvider" ) );
static const OUString sAccessSrvc( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.configuration.ConfigurationUpdateAccess" ) );
//------------------------------------------------------------------------------
@@ -253,7 +252,7 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext
if ( !xExtensionManager.is() )
{
- OSL_ENSURE( 0, "Could not get the Extension Manager!" );
+ OSL_FAIL( "Could not get the Extension Manager!" );
return true;
}
@@ -300,7 +299,7 @@ static bool impl_checkDependencies( const uno::Reference< uno::XComponentContext
catch ( uno::RuntimeException & ) { throw; }
catch ( uno::Exception & exc) {
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_FAIL( ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
if ( bRegistered )
@@ -333,15 +332,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 +385,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
@@ -429,3 +428,5 @@ void Desktop::SynchronizeExtensionRepositories()
RTL_LOGFILE_CONTEXT(aLog,"desktop (jl) ::Desktop::SynchronizeExtensionRepositories");
dp_misc::syncRepositories( new SilentCommandEnv( this ) );
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/checkinstall.cxx b/desktop/source/app/checkinstall.cxx
index bb7258554cfe..c0e853d9eef5 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.
@@ -38,11 +39,12 @@
#include <vcl/msgbox.hxx>
#include <tools/date.hxx>
-using namespace rtl;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::beans;
+using ::rtl::OUString;
+
namespace desktop
{
@@ -116,3 +118,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 495ea3161bd3..a4ee8c05c9ef 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 14b4fd1d6ddc..6885021718bc 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.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.
@@ -40,11 +41,14 @@
#include <svl/documentlockfile.hxx>
-using namespace rtl;
+#include <cstdio>
+
using namespace com::sun::star::lang;
using namespace com::sun::star::uri;
using namespace com::sun::star::uno;
+using ::rtl::OUString;
+
namespace desktop
{
@@ -57,7 +61,7 @@ public:
m_index(0)
{
rtl::OUString url;
- if (tools::getProcessWorkingDir(&url)) {
+ if (tools::getProcessWorkingDir(url)) {
m_cwdUrl.reset(url);
}
}
@@ -137,8 +141,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
@@ -152,6 +156,11 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bool bForceNewEvent(false);
bool bDisplaySpec(false);
bool bOpenDoc(false);
+ bool bConversionEvent(false);
+ bool bConversionParamsEvent(false);
+ bool bBatchPrintEvent(false);
+ bool bBatchPrinterNameEvent(false);
+ bool bConversionOutEvent(false);
m_eArgumentCount = NONE;
@@ -162,8 +171,8 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
{
break;
}
- // convert file URLs to internal form #112849#
- if (aArg.indexOf(OUString::createFromAscii("file:"))==0 &&
+ // convert file URLs to internal form
+ if (aArg.indexOfAsciiL(RTL_CONSTASCII_STRINGPARAM("file:"))==0 &&
xTranslator.is())
{
OUString tmp(xTranslator->translateToInternal(aArg));
@@ -171,16 +180,16 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
aArg = tmp;
}
- String aArgStr = aArg;
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;
@@ -192,7 +201,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bStartEvent = false;
bDisplaySpec = false;
}
- else if ( aArgStr.EqualsIgnoreCaseAscii( "-o" ))
+ else if ( aArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM( "-o" )))
{
// force open documents regardless if they are templates or not
bForceOpenEvent = true;
@@ -204,7 +213,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bStartEvent = false;
bDisplaySpec = false;
}
- else if ( aArgStr.EqualsIgnoreCaseAscii( "-pt" ))
+ else if ( aArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM( "-pt" )))
{
// Print to special printer
bPrintToEvent = true;
@@ -217,7 +226,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bDisplaySpec = false;
bForceOpenEvent = false;
}
- else if ( aArgStr.EqualsIgnoreCaseAscii( "-p" ))
+ else if ( aArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM( "-p" )))
{
// Print to default printer
bPrintEvent = true;
@@ -229,7 +238,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bStartEvent = false;
bDisplaySpec = false;
}
- else if ( aArgStr.EqualsIgnoreCaseAscii( "-view" ))
+ else if ( aArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM( "-view" )))
{
// open in viewmode
bOpenEvent = false;
@@ -240,9 +249,9 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bViewEvent = true;
bStartEvent = false;
bDisplaySpec = false;
- }
- else if ( aArgStr.EqualsIgnoreCaseAscii( "-show" ))
- {
+ }
+ else if ( aArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM( "-show" )))
+ {
// open in viewmode
bOpenEvent = false;
bViewEvent = false;
@@ -253,7 +262,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bForceOpenEvent = false;
bDisplaySpec = false;
}
- else if ( aArgStr.EqualsIgnoreCaseAscii( "-display" ))
+ else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("display")))
{
// set display
bOpenEvent = false;
@@ -265,7 +274,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bStartEvent = false;
bDisplaySpec = true;
}
- else if ( aArgStr.EqualsIgnoreCaseAscii( "-language" ))
+ else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("language")))
{
bOpenEvent = false;
bPrintEvent = false;
@@ -276,79 +285,108 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bStartEvent = false;
bDisplaySpec = false;
}
-
- #ifdef MACOSX
- /* #i84053# ignore -psn on Mac
- Platform dependent #ifdef here is ugly, however this is currently
- the only platform dependent parameter. Should more appear
- we should find a better solution
- */
- else if ( aArgStr.CompareToAscii( "-psn", 4 ) == COMPARE_EQUAL )
+ else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("convert-to")))
{
- // finder argument from MacOSX
- bOpenEvent = false;
- bPrintEvent = false;
- bForceOpenEvent = false;
- bPrintToEvent = false;
- bForceNewEvent = false;
- bViewEvent = false;
- bStartEvent = false;
- bDisplaySpec = false;
+ bOpenEvent = false;
+ bConversionEvent = true;
+ bConversionParamsEvent = true;
+ }
+ else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("print-to-file")))
+ {
+ bOpenEvent = false;
+ bBatchPrintEvent = true;
+ }
+ else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("printer-name")) &&
+ bBatchPrintEvent )
+ {
+ bBatchPrinterNameEvent = true;
+ }
+ else if ( oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("outdir")) &&
+ (bConversionEvent || bBatchPrintEvent) )
+ {
+ bConversionOutEvent = true;
}
- #endif
}
else
{
if ( bPrinterName && bPrintToEvent )
{
// first argument after "-pt" this must be the printer name
- AddStringListParam_Impl( CMD_STRINGPARAM_PRINTERNAME, aArgStr );
- bPrinterName = sal_False;
+ AddStringListParam_Impl( CMD_STRINGPARAM_PRINTERNAME, aArg );
+ bPrinterName = false;
+ }
+ else if ( bConversionParamsEvent && bConversionEvent )
+ {
+ // first argument must be the the params
+ AddStringListParam_Impl( CMD_STRINGPARAM_CONVERSIONPARAMS, aArg );
+ bConversionParamsEvent = false;
+ }
+ else if ( bBatchPrinterNameEvent && bBatchPrintEvent )
+ {
+ // first argument is the printer name
+ AddStringListParam_Impl( CMD_STRINGPARAM_PRINTERNAME, aArg );
+ bBatchPrinterNameEvent = false;
+ }
+ else if ( (bConversionEvent || bBatchPrintEvent) && bConversionOutEvent )
+ {
+ AddStringListParam_Impl( CMD_STRINGPARAM_CONVERSIONOUT, aArg );
+ bConversionOutEvent = 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 )
{
- AddStringListParam_Impl( CMD_STRINGPARAM_OPENLIST, aArgStr );
+ AddStringListParam_Impl( CMD_STRINGPARAM_OPENLIST, aArg );
bOpenDoc = true;
}
else if ( bViewEvent )
- {
- AddStringListParam_Impl( CMD_STRINGPARAM_VIEWLIST, aArgStr );
+ {
+ AddStringListParam_Impl( CMD_STRINGPARAM_VIEWLIST, aArg );
bOpenDoc = true;
}
else if ( bStartEvent )
{
- AddStringListParam_Impl( CMD_STRINGPARAM_STARTLIST, aArgStr );
+ AddStringListParam_Impl( CMD_STRINGPARAM_STARTLIST, aArg );
bOpenDoc = true;
}
else if ( bPrintEvent )
{
- AddStringListParam_Impl( CMD_STRINGPARAM_PRINTLIST, aArgStr );
+ AddStringListParam_Impl( CMD_STRINGPARAM_PRINTLIST, aArg );
bOpenDoc = true;
}
else if ( bPrintToEvent )
{
- AddStringListParam_Impl( CMD_STRINGPARAM_PRINTTOLIST, aArgStr );
+ AddStringListParam_Impl( CMD_STRINGPARAM_PRINTTOLIST, aArg );
bOpenDoc = true;
}
else if ( bForceNewEvent )
{
- AddStringListParam_Impl( CMD_STRINGPARAM_FORCENEWLIST, aArgStr );
+ AddStringListParam_Impl( CMD_STRINGPARAM_FORCENEWLIST, aArg );
bOpenDoc = true;
}
else if ( bForceOpenEvent )
{
- AddStringListParam_Impl( CMD_STRINGPARAM_FORCEOPENLIST, aArgStr );
+ AddStringListParam_Impl( CMD_STRINGPARAM_FORCEOPENLIST, aArg );
bOpenDoc = true;
}
else if ( bDisplaySpec )
{
- AddStringListParam_Impl( CMD_STRINGPARAM_DISPLAY, aArgStr );
+ AddStringListParam_Impl( CMD_STRINGPARAM_DISPLAY, aArg );
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,250 +412,245 @@ 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 );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-quickstart=no" )))
+ else if ( oArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "quickstart=no" )))
{
SetBoolParam_Impl( CMD_BOOLPARAM_NOQUICKSTART, sal_True );
SetBoolParam_Impl( CMD_BOOLPARAM_QUICKSTART, sal_False );
- return sal_True;
}
- else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-terminate_after_init" )) == sal_True )
+ 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( "-?" )))
+ else if ( oArg.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
- Platform dependent #ifdef here is ugly, however this is currently
- the only platform dependent parameter. Should more appear
- we should find a better solution
- */
- else if ( aArg.compareToAscii( "-psn", 4 ) == 0 )
+ /* #i84053# ignore -psn on Mac
+ Platform dependent #ifdef here is ugly, however this is currently
+ the only platform dependent parameter. Should more appear
+ we should find a better solution
+ */
+ else if ( aArg.matchAsciiL(RTL_CONSTASCII_STRINGPARAM("-psn")) )
{
SetBoolParam_Impl( CMD_BOOLPARAM_PSN, sal_True );
return sal_True;
}
#endif
- else if ( aArgStr.Copy(0, 8).EqualsIgnoreCaseAscii( "-accept=" ))
+ else if ( oArg.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("infilter=")))
{
- 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 )
+ else if ( oArg.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("unaccept=")))
{
- 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 ( aArgStr.Copy( 0, 7 ).EqualsIgnoreCaseAscii( "-userid" ))
+ else if ( oArg.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("portal,")))
{
- if ( aArgStr.Len() > 8 )
+ AddStringListParam_Impl( CMD_STRINGPARAM_PORTAL, oArg.copy(RTL_CONSTASCII_LENGTH("portal,")) );
+ }
+ else if ( oArg.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("userid")))
{
- rtl::OUString aUserDir = aArgStr;
- AddStringListParam_Impl( CMD_STRINGPARAM_USERDIR,
- ::rtl::Uri::decode( aUserDir.copy( 8 ), rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 ) );
+ if ( oArg.getLength() > RTL_CONSTASCII_LENGTH("userid")+1 )
+ {
+ AddStringListParam_Impl(
+ CMD_STRINGPARAM_USERDIR,
+ ::rtl::Uri::decode( oArg.copy(RTL_CONSTASCII_LENGTH("userid")+1),
+ 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;
+ AddStringListParam_Impl( CMD_STRINGPARAM_VERSION, oArg.copy(RTL_CONSTASCII_LENGTH("version=")) );
}
- else if ( aArgStr.Copy(0, 10).EqualsIgnoreCaseAscii( "-language=" ))
+ else if ( oArg.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("language=")))
{
- AddStringListParam_Impl( CMD_STRINGPARAM_LANGUAGE, aArgStr.Copy( 10 ) );
- return sal_True;
+ AddStringListParam_Impl( CMD_STRINGPARAM_LANGUAGE, oArg.copy(RTL_CONSTASCII_LENGTH("language=")) );
}
- 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 )
- SetBoolParam_Impl( CMD_BOOLPARAM_WRITER, sal_True );
+ SetBoolParam_Impl( CMD_BOOLPARAM_WRITER, sal_True );
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 )
- SetBoolParam_Impl( CMD_BOOLPARAM_CALC, sal_True );
+ SetBoolParam_Impl( CMD_BOOLPARAM_CALC, sal_True );
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 )
- SetBoolParam_Impl( CMD_BOOLPARAM_DRAW, sal_True );
+ SetBoolParam_Impl( CMD_BOOLPARAM_DRAW, sal_True );
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 )
- SetBoolParam_Impl( CMD_BOOLPARAM_IMPRESS, sal_True );
+ SetBoolParam_Impl( CMD_BOOLPARAM_IMPRESS, sal_True );
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 )
- SetBoolParam_Impl( CMD_BOOLPARAM_BASE, sal_True );
+ SetBoolParam_Impl( CMD_BOOLPARAM_BASE, sal_True );
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 )
- SetBoolParam_Impl( CMD_BOOLPARAM_GLOBAL, sal_True );
+ SetBoolParam_Impl( CMD_BOOLPARAM_GLOBAL, sal_True );
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 )
- SetBoolParam_Impl( CMD_BOOLPARAM_MATH, sal_True );
+ SetBoolParam_Impl( CMD_BOOLPARAM_MATH, sal_True );
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 )
- SetBoolParam_Impl( CMD_BOOLPARAM_WEB, sal_True );
+ SetBoolParam_Impl( CMD_BOOLPARAM_WEB, sal_True );
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 +685,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 );
@@ -712,12 +753,6 @@ sal_Bool CommandLineArgs::IsTerminateAfterInit() const
return m_aBoolParams[ CMD_BOOLPARAM_TERMINATEAFTERINIT ];
}
-sal_Bool CommandLineArgs::IsNoFirstStartWizard() const
-{
- osl::MutexGuard aMutexGuard( m_aMutex );
- return m_aBoolParams[ CMD_BOOLPARAM_NOFIRSTSTARTWIZARD ];
-}
-
sal_Bool CommandLineArgs::IsNoLogo() const
{
osl::MutexGuard aMutexGuard( m_aMutex );
@@ -823,6 +858,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 );
@@ -913,6 +954,33 @@ sal_Bool CommandLineArgs::GetLanguage( ::rtl::OUString& rPara ) const
return m_aStrSetParams[ CMD_STRINGPARAM_LANGUAGE ];
}
+sal_Bool CommandLineArgs::GetInFilter( ::rtl::OUString& rPara ) const
+{
+ osl::MutexGuard aMutexGuard( m_aMutex );
+ rPara = m_aStrParams[ CMD_STRINGPARAM_INFILTER ];
+ return m_aStrSetParams[ CMD_STRINGPARAM_INFILTER ];
+}
+
+sal_Bool CommandLineArgs::GetConversionList( ::rtl::OUString& rPara ) const
+{
+ osl::MutexGuard aMutexGuard( m_aMutex );
+ rPara = m_aStrParams[ CMD_STRINGPARAM_CONVERSIONLIST ];
+ return m_aStrSetParams[ CMD_STRINGPARAM_CONVERSIONLIST ];
+}
+
+sal_Bool CommandLineArgs::GetConversionParams( ::rtl::OUString& rPara ) const
+{
+ osl::MutexGuard aMutexGuard( m_aMutex );
+ rPara = m_aStrParams[ CMD_STRINGPARAM_CONVERSIONPARAMS ];
+ return m_aStrSetParams[ CMD_STRINGPARAM_CONVERSIONPARAMS ];
+}
+sal_Bool CommandLineArgs::GetConversionOut( ::rtl::OUString& rPara ) const
+{
+ osl::MutexGuard aMutexGuard( m_aMutex );
+ rPara = m_aStrParams[ CMD_STRINGPARAM_CONVERSIONOUT ];
+ return m_aStrSetParams[ CMD_STRINGPARAM_CONVERSIONOUT ];
+}
+
sal_Bool CommandLineArgs::IsEmpty() const
{
osl::MutexGuard aMutexGuard( m_aMutex );
@@ -924,6 +992,7 @@ sal_Bool CommandLineArgs::IsEmptyOrAcceptOnly() const
osl::MutexGuard aMutexGuard( m_aMutex );
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 +1004,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 a1c70bf5df72..bd7e24a81147 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,
@@ -71,12 +72,14 @@ class CommandLineArgs
CMD_BOOLPARAM_HELPIMPRESS,
CMD_BOOLPARAM_HELPBASE,
CMD_BOOLPARAM_PSN,
- CMD_BOOLPARAM_COUNT // must be last element!
+ CMD_BOOLPARAM_VERSION,
+ CMD_BOOLPARAM_COUNT // must be last element!
};
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 +93,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 +104,7 @@ class CommandLineArgs
enum GroupParamId
{
- CMD_GRPID_MODULE,
+ CMD_GRPID_MODULE = 0,
CMD_GRPID_COUNT
};
@@ -125,52 +132,58 @@ 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;
- sal_Bool IsNoRestore() const;
- sal_Bool IsNoDefault() const;
- sal_Bool IsBean() const;
- sal_Bool IsServer() const;
- sal_Bool IsHeadless() const;
- sal_Bool IsQuickstart() const;
- sal_Bool IsNoQuickstart() const;
- sal_Bool IsTerminateAfterInit() const;
- sal_Bool IsNoFirstStartWizard() const;
- sal_Bool IsNoLogo() const;
- sal_Bool IsNoLockcheck() const;
- sal_Bool IsHelp() const;
- sal_Bool IsHelpWriter() const;
- sal_Bool IsHelpCalc() const;
- sal_Bool IsHelpDraw() const;
- sal_Bool IsHelpImpress() const;
- sal_Bool IsHelpBase() const;
- sal_Bool IsHelpMath() const;
- sal_Bool IsHelpBasic() const;
- sal_Bool IsWriter() const;
- sal_Bool IsCalc() const;
- sal_Bool IsDraw() const;
- sal_Bool IsImpress() const;
- sal_Bool IsBase() const;
- sal_Bool IsGlobal() const;
- sal_Bool IsMath() const;
- sal_Bool IsWeb() const;
- sal_Bool HasModuleParam() const;
- sal_Bool WantsToLoadDocument() const;
+ sal_Bool IsMinimized() const;
+ sal_Bool IsInvisible() const;
+ sal_Bool IsNoRestore() const;
+ sal_Bool IsNoDefault() const;
+ sal_Bool IsBean() const;
+ sal_Bool IsServer() const;
+ sal_Bool IsHeadless() const;
+ sal_Bool IsQuickstart() const;
+ sal_Bool IsNoQuickstart() const;
+ sal_Bool IsTerminateAfterInit() const;
+ sal_Bool IsNoLogo() const;
+ sal_Bool IsNoLockcheck() const;
+ sal_Bool IsHelp() const;
+ sal_Bool IsHelpWriter() const;
+ sal_Bool IsHelpCalc() const;
+ sal_Bool IsHelpDraw() const;
+ sal_Bool IsHelpImpress() const;
+ sal_Bool IsHelpBase() const;
+ sal_Bool IsHelpMath() const;
+ sal_Bool IsHelpBasic() const;
+ sal_Bool IsWriter() const;
+ sal_Bool IsCalc() const;
+ sal_Bool IsDraw() const;
+ sal_Bool IsImpress() const;
+ sal_Bool IsBase() const;
+ sal_Bool IsGlobal() const;
+ sal_Bool IsMath() const;
+ sal_Bool IsWeb() const;
+ sal_Bool IsVersion() const;
+ sal_Bool HasModuleParam() const;
+ sal_Bool WantsToLoadDocument() const;
// Access to string parameters
- sal_Bool GetPortalConnectString( ::rtl::OUString& rPara) const;
- sal_Bool GetAcceptString( ::rtl::OUString& rPara) const;
- sal_Bool GetUnAcceptString( ::rtl::OUString& rPara) const;
- sal_Bool GetOpenList( ::rtl::OUString& rPara) const;
- sal_Bool GetViewList( ::rtl::OUString& rPara) const;
- sal_Bool GetStartList( ::rtl::OUString& rPara) const;
- sal_Bool GetForceOpenList( ::rtl::OUString& rPara) const;
- sal_Bool GetForceNewList( ::rtl::OUString& rPara) const;
- sal_Bool GetPrintList( ::rtl::OUString& rPara) const;
- sal_Bool GetPrintToList( ::rtl::OUString& rPara ) const;
- sal_Bool GetPrinterName( ::rtl::OUString& rPara ) const;
- sal_Bool GetLanguage( ::rtl::OUString& rPara ) const;
+ sal_Bool GetPortalConnectString( ::rtl::OUString& rPara) const;
+ sal_Bool GetAcceptString( ::rtl::OUString& rPara) const;
+ sal_Bool GetUnAcceptString( ::rtl::OUString& rPara) const;
+ sal_Bool GetOpenList( ::rtl::OUString& rPara) const;
+ sal_Bool GetViewList( ::rtl::OUString& rPara) const;
+ sal_Bool GetStartList( ::rtl::OUString& rPara) const;
+ sal_Bool GetForceOpenList( ::rtl::OUString& rPara) const;
+ sal_Bool GetForceNewList( ::rtl::OUString& rPara) const;
+ sal_Bool GetPrintList( ::rtl::OUString& rPara) const;
+ sal_Bool GetPrintToList( ::rtl::OUString& rPara ) const;
+ sal_Bool GetPrinterName( ::rtl::OUString& rPara ) const;
+ sal_Bool GetLanguage( ::rtl::OUString& rPara ) const;
+ sal_Bool GetInFilter( ::rtl::OUString& rPara ) const;
+ sal_Bool GetConversionList( ::rtl::OUString& rPara ) const;
+ sal_Bool GetConversionParams( ::rtl::OUString& rPara ) const;
+ sal_Bool GetConversionOut( ::rtl::OUString& rPara ) const;
// Special analyzed states (does not match directly to a command line parameter!)
sal_Bool IsPrinting() const;
@@ -190,10 +203,10 @@ class CommandLineArgs
CommandLineArgs( const CommandLineArgs& );
CommandLineArgs operator=( const CommandLineArgs& );
- sal_Bool InterpretCommandLineParameter( const ::rtl::OUString& );
- void ParseCommandLine_Impl( Supplier& supplier );
- void ResetParamValues();
- sal_Bool CheckGroupMembers( GroupParamId nGroup, BoolParam nExcludeMember ) const;
+ sal_Bool InterpretCommandLineParameter( const ::rtl::OUString&, ::rtl::OUString& );
+ void ParseCommandLine_Impl( Supplier& supplier );
+ void ResetParamValues();
+ sal_Bool CheckGroupMembers( GroupParamId nGroup, BoolParam nExcludeMember ) const;
void AddStringListParam_Impl( StringParam eParam, const rtl::OUString& aParam );
void SetBoolParam_Impl( BoolParam eParam, sal_Bool bValue );
@@ -213,3 +226,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 c4530e9ce61c..00754d91631e 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 4bca6e7e7d1a..5c92512ea1e9 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 0c354c3446c0..16ef67f3b3d7 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.
@@ -175,7 +176,6 @@ uno::Reference< lang::XMultiServiceFactory > CreateApplicationConfigurationProvi
// ----------------------------------------------------------------------------
-// ----------------------------------------------------------------------------
// ConfigurationErrorHandler
// ----------------------------------------------------------------------------
@@ -242,7 +242,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 +301,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 68df86656bea..24fb01881396 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 7439547f62b4..3984a81f26e5 100644..100755
--- 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 c7de54e98fba..c7d6e7e3c08d 100644..100755
--- 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/desktop.hrc b/desktop/source/app/desktop.hrc
index 9c68d7b9fd2d..9c68d7b9fd2d 100644..100755
--- a/desktop/source/app/desktop.hrc
+++ b/desktop/source/app/desktop.hrc
diff --git a/desktop/source/app/desktopcontext.cxx b/desktop/source/app/desktopcontext.cxx
index e516b5eadd46..2a8ed7ef628c 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.
@@ -32,10 +33,11 @@
#include <vcl/svapp.hxx>
#include <svtools/javainteractionhandler.hxx>
-using namespace rtl;
using namespace com::sun::star::uno;
using namespace com::sun::star::task;
+using ::rtl::OUString;
+
namespace desktop
{
@@ -48,7 +50,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 +63,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 88948e753af5..b68a73cd9cf9 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 4aad5ef98036..ac8799a95a23 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( sal_uInt16 nId ) :
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/desktopresid.hxx b/desktop/source/app/desktopresid.hxx
index 767d5fb7849d..14d45a493f0c 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 db7f3c45964f..28182d7e0db6 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,13 @@
// 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 "sfx2/app.hxx"
+#include <svl/fstathelper.hxx>
+
#include "dispatchwatcher.hxx"
#include <rtl/ustring.hxx>
#include <tools/string.hxx>
@@ -48,13 +56,16 @@
#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>
+#include <rtl/instance.hxx>
-using namespace ::rtl;
+using ::rtl::OUString;
using namespace ::osl;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::util;
@@ -80,18 +91,46 @@ struct DispatchHolder
Reference< XDispatch > xDispatch;
};
-Mutex* DispatchWatcher::pWatcherMutex = NULL;
-
-Mutex& DispatchWatcher::GetMutex()
+static String impl_GetFilterFromExt( OUString aUrl, SfxFilterFlags nFlags,
+ String aAppl )
{
- if ( !pWatcherMutex )
+ String aFilter;
+ SfxMedium* pMedium = new SfxMedium( aUrl,
+ STREAM_STD_READ, sal_False );
+
+ const SfxFilter *pSfxFilter = NULL;
+ if( nFlags == SFX_FILTER_EXPORT )
{
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pWatcherMutex )
- pWatcherMutex = new osl::Mutex();
+ SfxFilterMatcher( aAppl ).GuessFilterIgnoringContent( *pMedium, &pSfxFilter, nFlags, 0 );
}
+ else
+ {
+ SFX_APP()->GetFilterMatcher().GuessFilter( *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 );
+}
- return *pWatcherMutex;
+namespace
+{
+ class theWatcherMutex : public rtl::Static<Mutex, theWatcherMutex> {};
+}
+
+Mutex& DispatchWatcher::GetMutex()
+{
+ return theWatcherMutex::get();
}
// Create or get the dispatch watcher implementation. This implementation must be
@@ -138,10 +177,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 +189,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 +249,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 +269,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 +332,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,9 +342,9 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
}
catch ( ::com::sun::star::uno::Exception& )
{
- OUString aMsg = OUString::createFromAscii(
- "Desktop::OpenDefault() IllegalArgumentException while calling XNotifyingDispatch: ");
- OSL_ENSURE( sal_False, OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
+ OUString aMsg = OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Desktop::OpenDefault() IllegalArgumentException while calling XNotifyingDispatch: "));
+ OSL_FAIL( OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
}
}
}
@@ -314,11 +368,10 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
}
// if we are called in viewmode, open document read-only
- // #95425#
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,30 +379,37 @@ 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());
+ OSL_FAIL( 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());
+ OSL_FAIL( OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
}
if ( aDispatchRequest.aRequestType == REQUEST_OPEN ||
aDispatchRequest.aRequestType == REQUEST_VIEW ||
@@ -361,24 +421,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& e )
+ {
+ 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 +580,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 +613,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() )
@@ -473,18 +640,6 @@ void SAL_CALL DispatchWatcher::dispatchFinished( const DispatchResultEvent& ) th
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 +667,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 2b3f1ab54680..7146a29b3fd2 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.
@@ -33,7 +34,7 @@
#include <com/sun/star/frame/XDispatchResultListener.hpp>
#include "officeipcthread.hxx"
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <vector>
namespace desktop
@@ -55,7 +56,7 @@ struct OUStringHashCode
}
};
-class DispatchWatcherHashMap : public ::std::hash_map< ::rtl::OUString, sal_Int32, OUStringHashCode, ::std::equal_to< ::rtl::OUString > >
+class DispatchWatcherHashMap : public ::boost::unordered_map< ::rtl::OUString, sal_Int32, OUStringHashCode, ::std::equal_to< ::rtl::OUString > >
{
public:
inline void free()
@@ -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;
};
@@ -114,11 +118,11 @@ class DispatchWatcher : public ::cppu::WeakImplHelper1< ::com::sun::star::frame:
DispatchWatcherHashMap m_aRequestContainer;
- static ::osl::Mutex* pWatcherMutex;
-
sal_Int16 m_nRequestCount;
};
}
#endif // _DESKTOP_DISPATCHWATCHER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/exports.dxp b/desktop/source/app/exports.dxp
index f0e1c69934bc..f0e1c69934bc 100644..100755
--- a/desktop/source/app/exports.dxp
+++ b/desktop/source/app/exports.dxp
diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx
index 9df8d82a37ff..063fc69b2d35 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.
@@ -53,13 +54,16 @@
#include <osl/process.h>
#include <osl/file.hxx>
-using namespace rtl;
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
using namespace com::sun::star::container;
using namespace com::sun::star::beans;
using namespace com::sun::star::util;
+using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
+using ::rtl::OString;
+
namespace desktop {
static char const SOFFICE_BOOTSTRAP[] = "Bootstrap";
@@ -69,7 +73,7 @@ sal_Bool LanguageSelection::bFoundLanguage = sal_False;
OUString LanguageSelection::aFoundLanguage;
LanguageSelection::LanguageSelectionStatus LanguageSelection::m_eStatus = LS_STATUS_OK;
-const OUString LanguageSelection::usFallbackLanguage = OUString::createFromAscii("en-US");
+const OUString LanguageSelection::usFallbackLanguage(RTL_CONSTASCII_USTRINGPARAM("en-US"));
static sal_Bool existsURL( OUString const& sURL )
{
@@ -125,7 +129,7 @@ Locale LanguageSelection::IsoStringToLocale(const OUString& str)
bool LanguageSelection::prepareLanguage()
{
m_eStatus = LS_STATUS_OK;
- OUString sConfigSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider");
+ OUString sConfigSrvc = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"));
Reference< XMultiServiceFactory > theMSF = comphelper::getProcessServiceFactory();
Reference< XLocalizable > theConfigProvider;
try
@@ -146,7 +150,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())
@@ -163,7 +167,7 @@ bool LanguageSelection::prepareLanguage()
OUString usLocale;
Reference< XPropertySet > xLocaleProp(getConfigAccess(
"org.openoffice.System/L10N", sal_True), UNO_QUERY_THROW);
- xLocaleProp->getPropertyValue(OUString::createFromAscii("Locale")) >>= usLocale;
+ xLocaleProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("Locale"))) >>= usLocale;
setDefaultLanguage(usLocale);
}
catch (Exception&)
@@ -174,24 +178,22 @@ bool LanguageSelection::prepareLanguage()
// get the selected UI language as string
bool bCmdLanguage( false );
bool bIniLanguage( false );
- OUString aEmpty;
OUString aLocaleString = getUserUILanguage();
if ( aLocaleString.getLength() == 0 )
{
- CommandLineArgs* pCmdLineArgs = Desktop::GetCommandLineArgs();
- if ( pCmdLineArgs )
+ OUString aEmpty;
+
+ const CommandLineArgs& rCmdLineArgs = Desktop::GetCommandLineArgs();
+ rCmdLineArgs.GetLanguage(aLocaleString);
+ if (isInstalledLanguage(aLocaleString, sal_False))
{
- pCmdLineArgs->GetLanguage(aLocaleString);
- if (isInstalledLanguage(aLocaleString, sal_False))
- {
- bCmdLanguage = true;
- bFoundLanguage = true;
- aFoundLanguage = aLocaleString;
- }
- else
- aLocaleString = aEmpty;
+ bCmdLanguage = true;
+ bFoundLanguage = true;
+ aFoundLanguage = aLocaleString;
}
+ else
+ aLocaleString = aEmpty;
if ( !bCmdLanguage )
{
@@ -234,7 +236,7 @@ bool LanguageSelection::prepareLanguage()
if ( !bCmdLanguage )
{
// Store language only
- xProp->setPropertyValue(OUString::createFromAscii("ooLocale"), makeAny(aLocaleString));
+ xProp->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("ooLocale")), makeAny(aLocaleString));
Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges();
}
@@ -242,14 +244,14 @@ bool LanguageSelection::prepareLanguage()
{
// Store language only
Reference< XPropertySet > xProp2(getConfigAccess("org.openoffice.Office.Linguistic/General/", sal_True), UNO_QUERY_THROW);
- xProp2->setPropertyValue(OUString::createFromAscii("UILocale"), makeAny(aLocaleString));
+ xProp2->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("UILocale")), makeAny(aLocaleString));
Reference< XChangesBatch >(xProp2, UNO_QUERY_THROW)->commitChanges();
}
MsLangId::setConfiguredSystemUILanguage( MsLangId::convertLocaleToLanguage(loc) );
OUString sLocale;
- xProp->getPropertyValue(OUString::createFromAscii("ooSetupSystemLocale")) >>= sLocale;
+ xProp->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("ooSetupSystemLocale"))) >>= sLocale;
if ( sLocale.getLength() )
{
loc = LanguageSelection::IsoStringToLocale(sLocale);
@@ -267,7 +269,7 @@ bool LanguageSelection::prepareLanguage()
catch (Exception& e)
{
OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, aMsg.getStr());
+ OSL_FAIL(aMsg.getStr());
}
}
@@ -282,7 +284,6 @@ bool LanguageSelection::prepareLanguage()
void LanguageSelection::setDefaultLanguage(const OUString& sLocale)
{
// #i32939# setting of default document language
- //
// See #i42730# for rules for determining source of settings
// determine script type of locale
@@ -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);
@@ -395,7 +396,7 @@ Reference< XNameAccess > LanguageSelection::getConfigAccess(const sal_Char* pPat
} catch (com::sun::star::uno::Exception& e)
{
OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, aMsg.getStr());
+ OSL_FAIL(aMsg.getStr());
}
return xNameAccess;
}
@@ -415,9 +416,9 @@ 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");
+ seqFallbacks[0] = OUString(RTL_CONSTASCII_USTRINGPARAM("zh-TW"));
}
return seqFallbacks;
}
@@ -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& )
@@ -545,7 +546,7 @@ void LanguageSelection::resetUserLanguage()
catch ( Exception& e)
{
OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, aMsg.getStr());
+ OSL_FAIL(aMsg.getStr());
m_eStatus = LS_STATUS_CONFIGURATIONACCESS_BROKEN;
}
}
@@ -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 bdf3cd6364de..fdb229a47956 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 9cc447a6c56b..72632bdb5e27 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.
@@ -29,10 +30,10 @@
#include "precompiled_desktop.hxx"
#include <stdlib.h>
#include <time.h>
-#ifdef WNT
-#include <tools/prewin.h>
+#ifndef WNT
+#include <unistd.h>
+#else
#include <windows.h>
-#include <tools/postwin.h>
#endif
#include <sal/types.h>
#include <osl/file.hxx>
@@ -50,25 +51,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];
- // 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" ); }
+ if ( gethostname( pHostName, sizeof( pHostName ) - 1 ) == 0 )
+ {
+ pHostName[sizeof( pHostName ) - 1] = '\0';
+ aHost = OString( pHostName );
+ }
+ else
+ aHost = OString("UNKNOWN");
+#endif
+
+ return aHost;
+}
+
+namespace desktop {
Lockfile::Lockfile( bool bIPCserver )
:m_bIPCserver(bIPCserver)
@@ -78,7 +92,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;
@@ -88,7 +102,7 @@ namespace desktop {
int tmpByte = 0;
for (int i = 0; i<nIdBytes; i++) {
tmpByte = rand( ) % 0xFF;
- sprintf( tmpId+i*2, "%02X", tmpByte ); // #100211# - checked
+ sprintf( tmpId+i*2, "%02X", tmpByte );
}
tmpId[nIdBytes*2]=0x00;
m_aId = OUString::createFromAscii( tmpId );
@@ -105,7 +119,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 +139,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 +162,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 +188,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 +235,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 248e44c52160..5444714ec88c 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 c155d9e6a3cd..619102b70c2b 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 dceaf1a3fba1..88610ba18ef9 100644..100755
--- 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 085d8520e7ad..4a3d084b8bb0 100644..100755
--- a/desktop/source/app/makefile.mk
+++ b/desktop/source/app/makefile.mk
@@ -47,12 +47,14 @@ CFLAGS+=-DGNOME_VFS_ENABLED
# .ELSE
# DEPLOYMENTMISCLIB = ideploymentmisc$(DLLPOSTFIX).lib
# .ENDIF
-# .ELIF "$(OS)" == "OS2"
-# DEPLOYMENTMISCLIB = ideploymentmisc$(DLLPOSTFIX).lib
# .ELSE
# DEPLOYMENTMISCLIB = -ldeploymentmisc$(DLLPOSTFIX)
# .ENDIF
+.IF "$(GUI)"=="WNT" || "$(GUIBASE)"=="aqua" || "$(ENABLE_SYSTRAY_GTK)"=="TRUE"
+CFLAGS+=-DENABLE_QUICKSTART_APPLET
+.ENDIF
+
SHL1TARGET = sofficeapp
SHL1OBJS = \
$(SLO)$/app.obj \
@@ -91,18 +93,15 @@ SHL1STDLIBS = \
$(UCBHELPERLIB) \
$(UNOTOOLSLIB) \
$(VCLLIB) \
- $(VOSLIB)
+
SHL1VERSIONMAP = version.map
SHL1IMPLIB = i$(SHL1TARGET)
DEF1NAME = $(SHL1TARGET)
OBJFILES = \
$(OBJ)$/copyright_ascii_ooo.obj \
- $(OBJ)$/main.obj
-.IF "$(GUI)" != "OS2"
-OBJFILES += \
+ $(OBJ)$/main.obj \
$(OBJ)$/copyright_ascii_sun.obj
-.ENDIF
SLOFILES = $(SHL1OBJS)
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 5527b8ea2aea..51cb8db878d1 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,17 +49,20 @@
#include <rtl/bootstrap.hxx>
#include <rtl/strbuf.hxx>
#include <comphelper/processfactory.hxx>
-#include "osl/file.hxx"
-#include "rtl/process.h"
+#include <osl/file.hxx>
+#include <rtl/process.h>
+#include <rtl/instance.hxx>
#include "tools/getprocessworkingdir.hxx"
-using namespace vos;
-using namespace rtl;
using namespace desktop;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::frame;
+using ::rtl::OString;
+using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
+
const char *OfficeIPCThread::sc_aTerminationSequence = "InternalIPC::TerminateThread";
const int OfficeIPCThread::sc_nTSeqLength = 28;
const char *OfficeIPCThread::sc_aShowSequence = "-tofront";
@@ -219,14 +223,16 @@ bool addArgument(
}
OfficeIPCThread* OfficeIPCThread::pGlobalOfficeIPCThread = 0;
-namespace { struct Security : public rtl::Static<OSecurity, Security> {}; }
-::osl::Mutex* OfficeIPCThread::pOfficeIPCThreadMutex = 0;
-
+ namespace { struct Security : public rtl::Static<osl::Security, Security> {}; }
+// 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 > 2)
+ fprintf (stderr, "create md5 from '%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 +297,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;
}
// ----------------------------------------------------------------------------
@@ -354,19 +360,15 @@ throw( RuntimeException )
{
}
-// ----------------------------------------------------------------------------
-
-::osl::Mutex& OfficeIPCThread::GetMutex()
+namespace
{
- // Get or create our mutex for thread-saftey
- if ( !pOfficeIPCThreadMutex )
- {
- ::osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() );
- if ( !pOfficeIPCThreadMutex )
- pOfficeIPCThreadMutex = new osl::Mutex;
- }
+ class theOfficeIPCThreadMutex
+ : public rtl::Static<osl::Mutex, theOfficeIPCThreadMutex> {};
+}
- return *pOfficeIPCThreadMutex;
+::osl::Mutex& OfficeIPCThread::GetMutex()
+{
+ return theOfficeIPCThreadMutex::get();
}
void OfficeIPCThread::SetDowning()
@@ -433,7 +435,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_" ) );
@@ -457,13 +458,14 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
OUString aIniName;
- aInfo.getExecutableFile( aIniName );
+ osl_getExecutableFile( &aIniName.pData );
+
sal_uInt32 lastIndex = aIniName.lastIndexOf('/');
if ( lastIndex > 0 )
{
aIniName = aIniName.copy( 0, lastIndex+1 );
aIniName += OUString( RTL_CONSTASCII_USTRINGPARAM( "perftune" ));
-#if defined(WNT) || defined(OS2)
+#if defined(WNT)
aIniName += OUString( RTL_CONSTASCII_USTRINGPARAM( ".ini" ));
#else
aIniName += OUString( RTL_CONSTASCII_USTRINGPARAM( "rc" ));
@@ -480,7 +482,7 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
OUString aUserInstallPathHashCode;
- if ( aPreloadData.equalsAscii( "1" ))
+ if ( aPreloadData.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "1" ) ))
{
sal_Char szBuffer[32];
sprintf( szBuffer, "%d", SUPD );
@@ -499,22 +501,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 +537,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 +550,17 @@ 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 );
+ // finally, write the string onto the pipe
+ 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 +589,14 @@ 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() );
- //Pipe.send( TERMINATION_SEQUENCE, TERMINATION_LENGTH );
- if (Pipe.isValid())
+ osl::StreamPipe aPipe ( pOfficeIPCThread->maPipeIdent, osl_Pipe_OPEN, Security::get() );
+ 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,14 +651,11 @@ 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:
// if we receive a request while the office is displaying some dialog or error during
// bootstrap, that dialogs event loop might get events that are dispatched by this thread
// we have to wait for cReady to be set by the real main loop.
@@ -693,7 +685,7 @@ void SAL_CALL OfficeIPCThread::run()
}
// don't close pipe ...
- // #90717# Is this a lookup message from another application? if so, ignore
+ // Is this a lookup message from another application? if so, ignore
if ( aArguments.Len() == 0 )
continue;
@@ -714,7 +706,7 @@ void SAL_CALL OfficeIPCThread::run()
#endif
continue;
}
- CommandLineArgs *pCurrentCmdLineArgs = Desktop::GetCommandLineArgs();
+ const CommandLineArgs &rCurrentCmdLineArgs = Desktop::GetCommandLineArgs();
if ( aCmdLineArgs->IsQuickstart() )
{
@@ -726,14 +718,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 +732,6 @@ void SAL_CALL OfficeIPCThread::run()
new ApplicationEvent( aEmpty, aEmpty,
"UNACCEPT", aUnAcceptString );
ImplPostForeignAppEvent( pAppEvent );
- bAcceptorRequest = sal_True;
}
#ifndef UNX
@@ -767,7 +756,7 @@ void SAL_CALL OfficeIPCThread::run()
bDocRequestSent |= ( aCmdLineArgs->GetPrintToList( pRequest->aPrintToList ) &&
aCmdLineArgs->GetPrinterName( pRequest->aPrinterName ) );
- if ( !pCurrentCmdLineArgs->IsInvisible() )
+ if ( !rCurrentCmdLineArgs.IsInvisible() )
{
// Read cmdline args that can open/create documents. As they would open a window
// they are only allowed if the "-invisible" is currently not used!
@@ -847,8 +836,6 @@ void SAL_CALL OfficeIPCThread::run()
aHelpURLBuffer.appendAscii("&System=UNX");
#elif defined WNT
aHelpURLBuffer.appendAscii("&System=WIN");
-#elif defined OS2
- aHelpURLBuffer.appendAscii("&System=OS2");
#endif
ApplicationEvent* pAppEvent =
new ApplicationEvent( aEmpty, aEmpty,
@@ -904,9 +891,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 +900,7 @@ void SAL_CALL OfficeIPCThread::run()
TimeValue tval;
tval.Seconds = 1;
tval.Nanosec = 0;
- sleep( tval );
+ wait( tval );
}
} while( schedule() );
}
@@ -943,6 +927,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 +992,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,7 +1000,7 @@ 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 )
@@ -992,3 +1033,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 8f3ddffe8e0a..a1fe4c5f772a 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,21 @@ 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 +162,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 1edb90fec8c6..175eae09fe93 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 ea4e2c7f3757..1e72fa121423 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>
-sal_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
+ const desktop::CommandLineArgs& rCmdLineArgs = aDesktop.GetCommandLineArgs();
+ if ( rCmdLineArgs.IsHelp() )
+ {
+ desktop::displayCmdlineHelp();
+ return EXIT_SUCCESS;
+ }
+ else if ( rCmdLineArgs.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 97775acd7016..539988834a02 100644..100755
--- 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 546a6f0ad13c..592821208a34 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,18 +40,13 @@
#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
#include <unotools/syslocaleoptions.hxx>
-#endif
#include <comphelper/processfactory.hxx>
#include <com/sun/star/container/XNameAccess.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -67,7 +63,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 +97,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 +104,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(
@@ -136,7 +128,7 @@ namespace desktop {
catch (Exception const & e)
{
OString msg(OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US));
- OSL_ENSURE(sal_False, msg.getStr());
+ OSL_FAIL(msg.getStr());
}
return false;
@@ -179,7 +171,7 @@ namespace desktop {
FileBase::RC err;
DirectoryItem aDirItem;
DirectoryItem::get(srcUnqPath, aDirItem);
- FileStatus aFileStatus(FileStatusMask_All);
+ FileStatus aFileStatus(osl_FileStatus_Mask_All);
aDirItem.getFileStatus(aFileStatus);
if( aFileStatus.getFileType() == FileStatus::Directory)
@@ -205,7 +197,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 +238,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, osl_File_Attribute_OwnWrite| osl_File_Attribute_OwnRead| osl_File_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 +261,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& )
@@ -289,7 +284,7 @@ namespace desktop {
{
OString aMsg("create_user_install(): ");
aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, aMsg.getStr());
+ OSL_FAIL(aMsg.getStr());
return UserInstall::E_Creation;
}
@@ -299,3 +294,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 8d6a51cd66be..6dcb5e91db41 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/app/version.map b/desktop/source/app/version.map
index 0ffffcd58635..0ffffcd58635 100644..100755
--- a/desktop/source/app/version.map
+++ b/desktop/source/app/version.map
diff --git a/desktop/source/deployment/deployment.component b/desktop/source/deployment/deployment.component
index 11385c7aa8d9..11385c7aa8d9 100644..100755
--- a/desktop/source/deployment/deployment.component
+++ b/desktop/source/deployment/deployment.component
diff --git a/desktop/source/deployment/dp_log.cxx b/desktop/source/deployment/dp_log.cxx
index 44c5e1efd4ed..24a8b7b40c0d 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.
@@ -88,7 +89,7 @@ void ProgressLogImpl::disposing()
}
catch (Exception & exc) {
(void) exc;
- OSL_ENSURE( 0, OUStringToOString(
+ OSL_FAIL( OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
@@ -152,7 +153,7 @@ void ProgressLogImpl::log_write( OString const & text )
}
catch (io::IOException & exc) {
(void) exc;
- OSL_ENSURE( 0, OUStringToOString(
+ OSL_FAIL( OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
@@ -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 d93c5a52c782..92e4080063f9 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.
@@ -60,7 +61,7 @@ void PersistentMap::throw_rtexc( int err, char const * pmsg ) const
buf.append( OUString( msg.getStr(), msg.getLength(),
osl_getThreadTextEncoding() ) );
const OUString msg_(buf.makeStringAndClear());
- OSL_ENSURE( 0, rtl::OUStringToOString(
+ OSL_FAIL( rtl::OUStringToOString(
msg_, RTL_TEXTENCODING_UTF8 ).getStr() );
throw RuntimeException( msg_, Reference<XInterface>() );
}
@@ -73,7 +74,7 @@ PersistentMap::~PersistentMap()
}
catch (DbException & exc) {
(void) exc; // avoid warnings
- OSL_ENSURE( 0, DbEnv::strerror( exc.get_errno() ) );
+ OSL_FAIL( DbEnv::strerror( exc.get_errno() ) );
}
}
@@ -227,15 +228,14 @@ t_string2string_map PersistentMap::getEntries() const
if (err != 0)
throw_rtexc(err);
- ::std::pair<t_string2string_map::iterator, bool > insertion(
- ret.insert( t_string2string_map::value_type(
- t_string2string_map::value_type(
- OString( static_cast< sal_Char const * >(
- dbKey.get_data()),
- dbKey.get_size() ),
- OString( static_cast< sal_Char const * >(
- dbData.get_data()),
- dbData.get_size() ) ) ) ) );
+#if OSL_DEBUG_LEVEL > 0
+ ::std::pair<t_string2string_map::iterator, bool> insertion =
+#endif
+ ret.insert(
+ t_string2string_map::value_type(
+ OString( static_cast<sal_Char const*>(dbKey.get_data()), dbKey.get_size() ),
+ OString( static_cast<sal_Char const*>(dbData.get_data()), dbData.get_size() )
+ ) );
OSL_ASSERT( insertion.second );
}
err = pcurs->close();
@@ -251,3 +251,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 c302d1d1cc42..a62873d89c5f 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.
@@ -84,13 +85,13 @@ bool singleton_entries( uno::Reference<registry::XRegistryKey> const& );
extern "C" {
-void SAL_CALL component_getImplementationEnvironment(
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-void * SAL_CALL component_getFactory(
+SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
sal_Char const * pImplName,
lang::XMultiServiceFactory * pServiceManager,
registry::XRegistryKey * pRegistryKey )
@@ -111,3 +112,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 65c48d70c92d..b46d9835548c 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.
@@ -44,20 +45,6 @@ namespace dp_misc
//==============================================================================
void xml_parse(
- Reference<xml::input::XRoot> const & xRoot,
- ::ucbhelper::Content & ucb_content,
- Reference<XComponentContext> const & xContext )
-{
- const Any arg(xRoot);
- const Reference<xml::sax::XDocumentHandler> xDocHandler(
- xContext->getServiceManager()->createInstanceWithArgumentsAndContext(
- OUSTR("com.sun.star.xml.input.SaxDocumentHandler"),
- Sequence<Any>( &arg, 1 ), xContext ), UNO_QUERY_THROW );
- xml_parse( xDocHandler, ucb_content, xContext );
- }
-
-//==============================================================================
-void xml_parse(
Reference<xml::sax::XDocumentHandler> const & xDocHandler,
::ucbhelper::Content & ucb_content,
Reference<XComponentContext> const & xContext )
@@ -76,3 +63,5 @@ void xml_parse(
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/deploymentgui.component b/desktop/source/deployment/gui/deploymentgui.component
index d613f482e791..d613f482e791 100644..100755
--- a/desktop/source/deployment/gui/deploymentgui.component
+++ b/desktop/source/deployment/gui/deploymentgui.component
diff --git a/desktop/source/deployment/gui/descedit.cxx b/desktop/source/deployment/gui/descedit.cxx
index af88c6689879..1faaa9f9bae4 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 023551ac360d..ed8b8f9c333f 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 092b232ce96d..1c57aa5b800e 100644..100755
--- 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 dcde55654a30..492405164aa2 100755
--- a/desktop/source/deployment/gui/dp_gui.hrc
+++ b/desktop/source/deployment/gui/dp_gui.hrc
@@ -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
@@ -94,28 +93,27 @@
#define RID_STR_WARNINGBOX_VERSION_GREATER_DIFFERENT_NAMES (RID_DEPLOYMENT_GUI_START + 8)
#define RID_WARNINGBOX_INSTALL_EXTENSION (RID_DEPLOYMENT_GUI_START + 9)
-#define RID_DLG_UPDATE (RID_DEPLOYMENT_GUI_START + 10)
-
-#define RID_DLG_UPDATE_CHECKING 1
-#define RID_DLG_UPDATE_THROBBER 2
-#define RID_DLG_UPDATE_UPDATE 3
-#define RID_DLG_UPDATE_UPDATES 4
-#define RID_DLG_UPDATE_ALL 5
-#define RID_DLG_UPDATE_DESCRIPTION 6
-#define RID_DLG_UPDATE_DESCRIPTIONS 7
-#define RID_DLG_UPDATE_LINE 8
-#define RID_DLG_UPDATE_HELP 9
-#define RID_DLG_UPDATE_OK 10
-#define RID_DLG_UPDATE_CLOSE 11
-#define RID_DLG_UPDATE_NORMALALERT 12
-#define RID_DLG_UPDATE_HIGHCONTRASTALERT 13
-#define RID_DLG_UPDATE_ERROR 14
-#define RID_DLG_UPDATE_NONE 15
-#define RID_DLG_UPDATE_NOINSTALLABLE 16
-#define RID_DLG_UPDATE_FAILURE 17
-#define RID_DLG_UPDATE_UNKNOWNERROR 18
-#define RID_DLG_UPDATE_NODESCRIPTION 19
-#define RID_DLG_UPDATE_NOINSTALL 20
+#define RID_DLG_UPDATE (RID_DEPLOYMENT_GUI_START + 10)
+
+#define RID_DLG_UPDATE_CHECKING 1
+#define RID_DLG_UPDATE_THROBBER 2
+#define RID_DLG_UPDATE_UPDATE 3
+#define RID_DLG_UPDATE_UPDATES 4
+#define RID_DLG_UPDATE_ALL 5
+#define RID_DLG_UPDATE_DESCRIPTION 6
+#define RID_DLG_UPDATE_DESCRIPTIONS 7
+#define RID_DLG_UPDATE_LINE 8
+#define RID_DLG_UPDATE_HELP 9
+#define RID_DLG_UPDATE_OK 10
+#define RID_DLG_UPDATE_CLOSE 11
+#define RID_DLG_UPDATE_NORMALALERT 12
+#define RID_DLG_UPDATE_ERROR 14
+#define RID_DLG_UPDATE_NONE 15
+#define RID_DLG_UPDATE_NOINSTALLABLE 16
+#define RID_DLG_UPDATE_FAILURE 17
+#define RID_DLG_UPDATE_UNKNOWNERROR 18
+#define RID_DLG_UPDATE_NODESCRIPTION 19
+#define RID_DLG_UPDATE_NOINSTALL 20
#define RID_DLG_UPDATE_NODEPENDENCY 21
#define RID_DLG_UPDATE_NODEPENDENCY_CUR_VER 22
#define RID_DLG_UPDATE_NOPERMISSION 23
@@ -138,13 +136,9 @@
#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)
-#define RID_IMG_SHARED_HC (RID_DEPLOYMENT_GUI_START+63)
#define RID_STR_ADD_PACKAGES (RID_DEPLOYMENT_GUI_START+70)
diff --git a/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx b/desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx
index e5dec34962af..5e766b9470cb 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.
@@ -46,7 +47,6 @@ AutoScrollEdit::AutoScrollEdit( Window* pParent, const ResId& rResId )
ScrollBar* pScroll = GetVScrollBar();
if (pScroll)
pScroll->Hide();
-// SetLeftMargin( 0 );
StartListening( *GetTextEngine() );
}
@@ -72,3 +72,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 421b00517998..c49477358c1b 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 4d554ab4ded9..e1f242a600c4 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"; };
+ ImageBitmap = Bitmap { File = "sc_helperdialog.bmp"; };
MASKCOLOR
};
diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
index 4c5dfdfc89d4..7019db610b85 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 98cb7de7a04f..48ef45fd15c0 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 c9fd19c25592..d8c3f77c4635 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog.src
+++ b/desktop/source/deployment/gui/dp_gui_dialog.src
@@ -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";
@@ -183,7 +189,6 @@ ModalDialog RID_DLG_LICENSE
Moveable = TRUE;
Closeable = TRUE;
Sizeable = FALSE;
-// Hide = TRUE;
MultiLineEdit ML_LICENSE
{
@@ -203,6 +208,7 @@ ModalDialog RID_DLG_LICENSE
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);
@@ -210,6 +216,7 @@ ModalDialog RID_DLG_LICENSE
NoLabel = TRUE;
Text [ en-US ] = "1.";
};
+
//spans col3 + col4
FixedText FT_LICENSE_BODY_1_TXT
{
@@ -219,6 +226,7 @@ ModalDialog RID_DLG_LICENSE
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);
@@ -226,6 +234,7 @@ ModalDialog RID_DLG_LICENSE
NoLabel = TRUE;
Text [ en-US ] = "2.";
};
+
FixedText FT_LICENSE_BODY_2_TXT
{
Pos = MAP_APPFONT(COL3_X, ROW4_Y);
@@ -235,6 +244,7 @@ ModalDialog RID_DLG_LICENSE
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";
@@ -244,6 +254,7 @@ ModalDialog RID_DLG_LICENSE
Text [ en-US ] = "~Scroll Down";
};
+
FixedLine FL_LICENSE
{
Pos = MAP_APPFONT ( 0, ROW5_Y) ;
@@ -272,12 +283,6 @@ ModalDialog RID_DLG_LICENSE
};
};
- Image IMG_LICENCE_ARROW_HC
- {
- ImageBitmap = Bitmap { File = "sch06300.png"; };
- MASKCOLOR
- };
-
OKButton BTN_LICENSE_ACCEPT
{
Pos = MAP_APPFONT(COL4_X, ROW6_Y);
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 3db8ec48a86e..01e7f92aac6b 100755..100644
--- 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"
@@ -99,10 +100,10 @@ namespace dp_gui {
#define PROGRESS_HEIGHT 14
//------------------------------------------------------------------------------
-struct StrAllFiles : public rtl::StaticWithInit< const OUString, StrAllFiles >
+struct StrAllFiles : public rtl::StaticWithInit< 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() ) );
@@ -209,8 +210,6 @@ ExtBoxWithBtns_Impl::~ExtBoxWithBtns_Impl()
}
//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
const Size ExtBoxWithBtns_Impl::GetMinOutputSizePixel() const
{
Size aMinSize( ExtensionBox_Impl::GetMinOutputSizePixel() );
@@ -425,6 +424,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 +570,7 @@ DialogHelper::~DialogHelper()
//------------------------------------------------------------------------------
ResId DialogHelper::getResId( sal_uInt16 nId )
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
return ResId( nId, *DeploymentGuiResMgr::get() );
}
@@ -579,7 +579,7 @@ String DialogHelper::getResourceString( sal_uInt16 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 +604,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 +638,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 +648,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 +661,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 +778,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 +792,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() );
@@ -938,7 +939,7 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
xFilterManager->appendFilter( iPos->first, iPos->second );
}
catch (lang::IllegalArgumentException & exc) {
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
(void) exc;
}
@@ -957,7 +958,6 @@ uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
//------------------------------------------------------------------------------
IMPL_LINK( ExtMgrDialog, HandleCancelBtn, void*, EMPTYARG )
{
- // m_dialog->m_cmdEnv->m_aborted = true;
if ( m_xAbortChannel.is() )
{
try
@@ -966,7 +966,7 @@ IMPL_LINK( ExtMgrDialog, HandleCancelBtn, void*, EMPTYARG )
}
catch ( uno::RuntimeException & )
{
- OSL_ENSURE( 0, "### unexpected RuntimeException!" );
+ OSL_FAIL( "### unexpected RuntimeException!" );
}
}
return 1;
@@ -1049,6 +1049,7 @@ void ExtMgrDialog::updateProgress( const OUString &rText,
//------------------------------------------------------------------------------
void ExtMgrDialog::updatePackageInfo( const uno::Reference< deployment::XPackage > &xPackage )
{
+ const SolarMutexGuard aGuard;
m_pExtensionBox->updateEntry( xPackage );
}
@@ -1162,12 +1163,11 @@ void ExtMgrDialog::Resize()
if( IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) )
{
ImplControlValue aValue;
- bool bNativeOK;
Rectangle aControlRegion( Point( 0, 0 ), m_aProgressBar.GetSizePixel() );
Rectangle aNativeControlRegion, aNativeContentRegion;
- if( (bNativeOK = GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
+ if( GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
CTRL_STATE_ENABLED, aValue, rtl::OUString(),
- aNativeControlRegion, aNativeContentRegion ) ) != sal_False )
+ aNativeControlRegion, aNativeContentRegion ) != sal_False )
{
nProgressHeight = aNativeControlRegion.GetHeight();
}
@@ -1334,6 +1334,7 @@ long UpdateRequiredDialog::addPackageToList( const uno::Reference< deployment::X
if ( !bLicenseMissing && !checkDependencies( xPackage ) )
{
m_bHasLockedEntries |= m_pManager->isReadOnly( xPackage );
+ const SolarMutexGuard aGuard;
m_aUpdateBtn.Enable( true );
return m_pExtensionBox->addEntry( xPackage );
}
@@ -1349,7 +1350,7 @@ void UpdateRequiredDialog::prepareChecking()
//------------------------------------------------------------------------------
void UpdateRequiredDialog::checkEntries()
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
m_pExtensionBox->checkEntries();
if ( ! hasActiveEntries() )
@@ -1371,7 +1372,6 @@ bool UpdateRequiredDialog::enablePackage( const uno::Reference< deployment::XPac
//------------------------------------------------------------------------------
IMPL_LINK( UpdateRequiredDialog, HandleCancelBtn, void*, EMPTYARG )
{
- // m_dialog->m_cmdEnv->m_aborted = true;
if ( m_xAbortChannel.is() )
{
try
@@ -1380,7 +1380,7 @@ IMPL_LINK( UpdateRequiredDialog, HandleCancelBtn, void*, EMPTYARG )
}
catch ( uno::RuntimeException & )
{
- OSL_ENSURE( 0, "### unexpected RuntimeException!" );
+ OSL_FAIL( "### unexpected RuntimeException!" );
}
}
return 1;
@@ -1462,6 +1462,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
@@ -1605,12 +1606,11 @@ void UpdateRequiredDialog::Resize()
if( IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) )
{
ImplControlValue aValue;
- bool bNativeOK;
Rectangle aControlRegion( Point( 0, 0 ), m_aProgressBar.GetSizePixel() );
Rectangle aNativeControlRegion, aNativeContentRegion;
- if( (bNativeOK = GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
+ if( GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion,
CTRL_STATE_ENABLED, aValue, rtl::OUString(),
- aNativeControlRegion, aNativeContentRegion ) ) != sal_False )
+ aNativeControlRegion, aNativeContentRegion ) != sal_False )
{
nProgressHeight = aNativeControlRegion.GetHeight();
}
@@ -1688,7 +1688,7 @@ bool UpdateRequiredDialog::isEnabled( const uno::Reference< deployment::XPackage
catch ( uno::RuntimeException & ) { throw; }
catch ( uno::Exception & exc) {
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_FAIL( ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
bRegistered = false;
}
@@ -1820,9 +1820,8 @@ sal_Int16 UpdateRequiredDialogService::execute() throw ( uno::RuntimeException )
}
//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
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 6b546bb3c163..8288d27b5e6f 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.
@@ -222,7 +223,6 @@ public:
virtual short Execute();
virtual void Resize();
virtual sal_Bool Close();
-// virtual long Notify( NotifyEvent& rNEvt );
virtual void showProgress( bool bStart );
virtual void updateProgress( const ::rtl::OUString &rText,
@@ -279,3 +279,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 996c96b1d083..2d11f1175e88 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.src
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.src
@@ -162,41 +162,21 @@ 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
-{
- ImageBitmap = Bitmap { File = "lock_16_h.png"; };
-};
-
Image RID_IMG_SHARED
{
ImageBitmap = Bitmap { File = "shared_16.png"; };
};
-Image RID_IMG_SHARED_HC
-{
- ImageBitmap = Bitmap { File = "shared_16_h.png"; };
-};
-
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;
diff --git a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
index a8a1025959f1..96a279f481a2 100644
--- 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"
@@ -99,9 +102,10 @@
#endif
#ifdef WNT
-#include "tools/prewin.h"
+#define GradientStyle_RECT BLA_GradientStyle_RECT
+#include <windows.h>
#include <objbase.h>
-#include "tools/postwin.h"
+#undef GradientStyle_RECT
#endif
@@ -258,6 +262,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 +433,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 +477,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 +518,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 +529,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 +603,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,57 +651,30 @@ 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 ) );
-
- m_queue.push( pEntry );
- m_eInput = START;
- m_wakeup.set();
+ _insert( pEntry );
}
}
//------------------------------------------------------------------------------
void ExtensionCmdQueue::Thread::removeExtension( const uno::Reference< deployment::XPackage > &rPackage )
{
- ::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( ExtensionCmd::REMOVE, rPackage ) );
-
- m_queue.push( pEntry );
- m_eInput = START;
- m_wakeup.set();
+ _insert( pEntry );
}
}
//------------------------------------------------------------------------------
void ExtensionCmdQueue::Thread::acceptLicense( const uno::Reference< deployment::XPackage > &rPackage )
{
- ::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( ExtensionCmd::ACCEPT_LICENSE, rPackage ) );
-
- m_queue.push( pEntry );
- m_eInput = START;
- m_wakeup.set();
+ _insert( pEntry );
}
}
@@ -703,20 +682,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 +695,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 );
}
//------------------------------------------------------------------------------
@@ -845,12 +808,6 @@ void ExtensionCmdQueue::Thread::execute()
break;
}
}
- //catch ( deployment::DeploymentException &)
- //{
- //}
- //catch ( lang::IllegalArgumentException &)
- //{
- //}
catch ( ucb::CommandAbortedException & )
{
//This exception is thrown when the user clicks cancel on the progressbar.
@@ -888,7 +845,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 )
@@ -912,9 +869,6 @@ void ExtensionCmdQueue::Thread::execute()
currentCmdEnv->stopProgress();
}
//end for
- //enable all buttons
-// m_pDialog->m_bAddingExtensions = false;
-// m_pDialog->updateButtonStates();
#ifdef WNT
CoUninitialize();
#endif
@@ -941,7 +895,7 @@ void ExtensionCmdQueue::Thread::_addExtension( ::rtl::Reference< ProgressCmdEnv
OUString sName;
if ( ! (anyTitle >>= sName) )
{
- OSL_ENSURE(0, "Could not get file name for extension.");
+ OSL_FAIL("Could not get file name for extension.");
return;
}
@@ -1002,7 +956,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 +964,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 +990,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 +1076,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,
@@ -1144,8 +1111,6 @@ OUString ExtensionCmdQueue::Thread::searchAndReplaceAll( const OUString &rSource
//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
ExtensionCmdQueue::ExtensionCmdQueue( DialogHelper * pDialogHelper,
TheExtensionManager *pManager,
const uno::Reference< uno::XComponentContext > &rContext )
@@ -1210,3 +1175,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 7ac00e2740d4..f8fd1f1b2e05 100755..100644
--- 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_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
index 06df7f9ebf51..7b00c4ede248 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.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.
@@ -184,13 +185,9 @@ ExtensionBox_Impl::ExtensionBox_Impl( Dialog* pParent, TheExtensionManager *pMan
m_nActiveHeight( 0 ),
m_nExtraHeight( 2 ),
m_aSharedImage( DialogHelper::getResId( RID_IMG_SHARED ) ),
- m_aSharedImageHC( DialogHelper::getResId( RID_IMG_SHARED_HC ) ),
m_aLockedImage( DialogHelper::getResId( RID_IMG_LOCKED ) ),
- m_aLockedImageHC( DialogHelper::getResId( RID_IMG_LOCKED_HC ) ),
m_aWarningImage( DialogHelper::getResId( RID_IMG_WARNING ) ),
- m_aWarningImageHC( DialogHelper::getResId( RID_IMG_WARNING_HC ) ),
m_aDefaultImage( DialogHelper::getResId( RID_IMG_EXTENSION ) ),
- m_aDefaultImageHC( DialogHelper::getResId( RID_IMG_EXTENSION_HC ) ),
m_pScrollBar( NULL ),
m_pManager( pManager )
{
@@ -355,7 +352,6 @@ void ExtensionBox_Impl::select( const rtl::OUString & sName )
}
//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
// Title + description
void ExtensionBox_Impl::CalcActiveHeight( const long nPos )
{
@@ -531,9 +527,9 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl pEntr
aPos += Point( TOP_OFFSET, TOP_OFFSET );
Image aImage;
if ( ! pEntry->m_aIcon )
- aImage = isHCMode() ? m_aDefaultImageHC : m_aDefaultImage;
+ aImage = m_aDefaultImage;
else
- aImage = isHCMode() ? pEntry->m_aIconHC : pEntry->m_aIcon;
+ aImage = pEntry->m_aIcon;
Size aImageSize = aImage.GetSizePixel();
if ( ( aImageSize.Width() <= ICON_WIDTH ) && ( aImageSize.Height() <= ICON_HEIGHT ) )
DrawImage( Point( aPos.X()+((ICON_WIDTH-aImageSize.Width())/2), aPos.Y()+((ICON_HEIGHT-aImageSize.Height())/2) ), aImage );
@@ -639,14 +635,14 @@ void ExtensionBox_Impl::DrawRow( const Rectangle& rRect, const TEntry_Impl pEntr
{
aPos = rRect.TopRight() + Point( -(RIGHT_ICON_OFFSET + SMALL_ICON_SIZE), TOP_OFFSET );
if ( pEntry->m_bLocked )
- DrawImage( aPos, Size( SMALL_ICON_SIZE, SMALL_ICON_SIZE ), isHCMode() ? m_aLockedImageHC : m_aLockedImage );
+ DrawImage( aPos, Size( SMALL_ICON_SIZE, SMALL_ICON_SIZE ), m_aLockedImage );
else
- DrawImage( aPos, Size( SMALL_ICON_SIZE, SMALL_ICON_SIZE ), isHCMode() ? m_aSharedImageHC : m_aSharedImage );
+ DrawImage( aPos, Size( SMALL_ICON_SIZE, SMALL_ICON_SIZE ), m_aSharedImage );
}
if ( ( pEntry->m_eState == AMBIGUOUS ) || pEntry->m_bMissingDeps || pEntry->m_bMissingLic )
{
aPos = rRect.TopRight() + Point( -(RIGHT_ICON_OFFSET + SPACE_BETWEEN + 2*SMALL_ICON_SIZE), TOP_OFFSET );
- DrawImage( aPos, Size( SMALL_ICON_SIZE, SMALL_ICON_SIZE ), isHCMode() ? m_aWarningImageHC : m_aWarningImage );
+ DrawImage( aPos, Size( SMALL_ICON_SIZE, SMALL_ICON_SIZE ), m_aWarningImage );
}
SetLineColor( Color( COL_LIGHTGRAY ) );
@@ -989,7 +985,7 @@ long ExtensionBox_Impl::addEntry( const uno::Reference< deployment::XPackage > &
}
else if ( !m_bInCheckMode )
{
- OSL_ENSURE( 0, "ExtensionBox_Impl::addEntry(): Will not add duplicate entries" );
+ OSL_FAIL( "ExtensionBox_Impl::addEntry(): Will not add duplicate entries" );
}
}
@@ -1154,7 +1150,7 @@ void ExtensionBox_Impl::checkEntries()
nNewPos = nPos;
if ( nPos <= m_nActive )
m_nActive += 1;
- iIndex++;
+ ++iIndex;
}
else
{ // remove entry from list
@@ -1168,7 +1164,7 @@ void ExtensionBox_Impl::checkEntries()
}
}
else
- iIndex++;
+ ++iIndex;
}
guard.clear();
@@ -1184,11 +1180,6 @@ void ExtensionBox_Impl::checkEntries()
Invalidate();
}
}
-//------------------------------------------------------------------------------
-bool ExtensionBox_Impl::isHCMode()
-{
- return (bool)GetSettings().GetStyleSettings().GetHighContrastMode();
-}
//------------------------------------------------------------------------------
void ExtensionBox_Impl::SetScrollHdl( const Link& rLink )
@@ -1219,3 +1210,5 @@ IMPL_LINK( ExtensionBox_Impl, ScrollHdl, ScrollBar*, pScrBar )
}
} //namespace dp_gui
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx b/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
index 7306459f319e..9dbbb7d33789 100644
--- a/desktop/source/deployment/gui/dp_gui_extlistbox.hxx
+++ b/desktop/source/deployment/gui/dp_gui_extlistbox.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.
@@ -137,13 +138,9 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox
long m_nExtraHeight;
Size m_aOutputSize;
Image m_aSharedImage;
- Image m_aSharedImageHC;
Image m_aLockedImage;
- Image m_aLockedImageHC;
Image m_aWarningImage;
- Image m_aWarningImageHC;
Image m_aDefaultImage;
- Image m_aDefaultImageHC;
Link m_aClickHdl;
ScrollBar *m_pScrollBar;
@@ -172,7 +169,6 @@ class ExtensionBox_Impl : public ::svt::IExtensionListBox
bool HandleTabKey( bool bReverse );
bool HandleCursorKey( sal_uInt16 nKeyCode );
bool FindEntryPos( const TEntry_Impl pEntry, long nStart, long nEnd, long &nFound );
- bool isHCMode();
void DeleteRemoved();
//-----------------
@@ -269,3 +265,5 @@ public:
};
}
+
+/* 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 567eb9756386..25df7f0f4caa 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,11 +80,11 @@ MyApp::MyApp()
}
//______________________________________________________________________________
-void MyApp::Main()
+int MyApp::Main()
{
+ return EXIT_SUCCESS;
}
-//##############################################################################
namespace
{
@@ -206,7 +207,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 +235,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 +279,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,
@@ -350,13 +351,13 @@ sdecl::ServiceDecl const updateDecl(
extern "C" {
-void SAL_CALL component_getImplementationEnvironment(
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-void * SAL_CALL component_getFactory(
+SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
sal_Char const * pImplName,
lang::XMultiServiceFactory * pServiceManager,
registry::XRegistryKey * pRegistryKey )
@@ -366,3 +367,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 08d1cf1f8e54..3e2db45bfdd7 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.
@@ -44,7 +45,7 @@ struct DeploymentGuiResMgr :
}
};
-struct BrandName : public ::rtl::StaticWithInit<const ::rtl::OUString, BrandName> {
+struct BrandName : public ::rtl::StaticWithInit< ::rtl::OUString, BrandName > {
const ::rtl::OUString operator () () {
return ::utl::ConfigManager::GetDirectConfigProperty(
::utl::ConfigManager::PRODUCTNAME ).get< ::rtl::OUString >();
@@ -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 740f598499fe..000000000000
--- 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_system.hxx b/desktop/source/deployment/gui/dp_gui_system.hxx
deleted file mode 100644
index dfdbbdfc0831..000000000000
--- a/desktop/source/deployment/gui/dp_gui_system.hxx
+++ /dev/null
@@ -1,37 +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.
- *
- ************************************************************************/
-
-#ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_SYSTEM_HXX
-#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_GUI_DP_GUI_SYSTEM_HXX
-
-
-/// @HTML
-namespace dp_gui {
-bool isVista();
-
-}
-#endif
diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index 18ab0ef70d65..c86d3e2ba90b 100644
--- 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( sal_uInt16 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;
@@ -360,7 +361,7 @@ PackageState TheExtensionManager::getPackageState( const uno::Reference< deploym
}
catch ( uno::Exception & exc) {
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_FAIL( ::rtl::OUStringToOString( exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
return NOT_AVAILABLE;
}
}
@@ -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 2ed70e4a5c34..39bad610bb9a 100644
--- 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 24055fae72f6..1ad857ad7b86 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 ffcc2a5ddc54..624624b0cb3f 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 8ba7df101ab3..9fb4b9f79816 100755..100644
--- 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 6476667a19d8..66d5ff80633c 100755..100644
--- 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.
@@ -106,7 +107,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"
@@ -123,7 +124,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;
@@ -226,31 +226,10 @@ private:
Thread(UpdateDialog::Thread &); // not defined
void operator =(UpdateDialog::Thread &); // not defined
- struct Entry {
- explicit Entry(
- uno::Reference< deployment::XPackage > const & thePackage,
- rtl::OUString const & theVersion);
-
- uno::Reference< deployment::XPackage > package;
- rtl::OUString version;
- //Indicates that the extension provides its own update URLs.
- //If this is true, then we must not use the default update
- //URL to find the update information.
- bool bProvidesOwnUpdate;
- uno::Reference< xml::dom::XNode > info;
- UpdateDialog::DisabledUpdate disableUpdate;
- dp_gui::UpdateData updateData;
- };
-
- // A multimap in case an extension is installed in "user", "shared" or "bundled"
- typedef std::map< rtl::OUString, Entry > Map;
-
virtual ~Thread();
virtual void execute();
-#if 0
- void handleGeneralError(uno::Any const & exception) const;
-#endif
+
void handleSpecificError(
uno::Reference< deployment::XPackage > const & package,
uno::Any const & exception) const;
@@ -261,10 +240,6 @@ private:
uno::Sequence< rtl::OUString > const & urls,
rtl::OUString const & identifier) const;
- void getOwnUpdateInformation(
- uno::Reference< deployment::XPackage > const & package,
- Map * map);
-
::rtl::OUString getUpdateDisplayString(
dp_gui::UpdateData const & data, ::rtl::OUString const & version = ::rtl::OUString()) const;
@@ -317,7 +292,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;
}
@@ -327,17 +302,6 @@ void UpdateDialog::Thread::stop() {
m_updateInformation->cancel();
}
-UpdateDialog::Thread::Entry::Entry(
- uno::Reference< deployment::XPackage > const & thePackage,
- rtl::OUString const & theVersion):
-
- package(thePackage),
- version(theVersion),
- bProvidesOwnUpdate(false),
- updateData(thePackage)
-{
-}
-
UpdateDialog::Thread::~Thread()
{
if ( m_xInteractionHdl.is() )
@@ -347,7 +311,7 @@ UpdateDialog::Thread::~Thread()
void UpdateDialog::Thread::execute()
{
{
- vos::OGuard g( Application::GetSolarMutex() );
+ SolarMutexGuard g;
if ( m_stop ) {
return;
}
@@ -362,10 +326,10 @@ void UpdateDialog::Thread::execute()
typedef std::vector<std::pair<uno::Reference<deployment::XPackage>,
uno::Any> >::const_iterator ITERROR;
- for (ITERROR ite = errors.begin(); ite != errors.end(); ite ++)
+ for (ITERROR ite = errors.begin(); ite != errors.end(); ++ite )
handleSpecificError(ite->first, ite->second);
- for (dp_misc::UpdateInfoMap::iterator i(updateInfoMap.begin()); i != updateInfoMap.end(); i++)
+ for (dp_misc::UpdateInfoMap::iterator i(updateInfoMap.begin()); i != updateInfoMap.end(); ++i)
{
dp_misc::UpdateInfo const & info = i->second;
UpdateData updateData(info.extension);
@@ -438,26 +402,12 @@ void UpdateDialog::Thread::execute()
}
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_stop) {
m_dialog.checkingDone();
}
}
-#if 0
-void UpdateDialog::Thread::handleGeneralError(uno::Any const & exception)
- const
-{
- rtl::OUString message;
- uno::Exception e;
- if (exception >>= e) {
- message = e.Message;
- }
- vos::OGuard g(Application::GetSolarMutex());
- if (!m_stop) {
- m_dialog.addGeneralError(message);
- }
-}
-#endif
+
//Parameter package can be null
void UpdateDialog::Thread::handleSpecificError(
uno::Reference< deployment::XPackage > const & package,
@@ -470,7 +420,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);
}
@@ -483,7 +433,7 @@ void UpdateDialog::Thread::handleSpecificError(
rtl::OUStringBuffer b(data.aInstalledPackage->getDisplayName());
b.append(static_cast< sal_Unicode >(' '));
{
- vos::OGuard g( Application::GetSolarMutex() );
+ SolarMutexGuard g;
if(!m_stop)
b.append(m_dialog.m_version);
}
@@ -497,7 +447,7 @@ void UpdateDialog::Thread::handleSpecificError(
{
b.append(static_cast< sal_Unicode >(' '));
{
- vos::OGuard g( Application::GetSolarMutex() );
+ SolarMutexGuard g;
if(!m_stop)
b.append(m_dialog.m_browserbased);
}
@@ -545,13 +495,13 @@ bool UpdateDialog::Thread::update(
bool ret = false;
if (du.unsatisfiedDependencies.getLength() == 0)
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_stop) {
m_dialog.addEnabledUpdate(getUpdateDisplayString(data), data);
}
ret = !m_stop;
} else {
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (!m_stop) {
m_dialog.addDisabledUpdate(du);
}
@@ -573,8 +523,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)),
@@ -673,9 +622,8 @@ short UpdateDialog::Execute() {
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
UpdateDialog::CheckListBox::CheckListBox( UpdateDialog & dialog, ResId const & resource,
- Image const & normalStaticImage,
- Image const & highContrastStaticImage ):
- SvxCheckListBox( &dialog, resource, normalStaticImage, highContrastStaticImage ),
+ Image const & normalStaticImage ):
+ SvxCheckListBox( &dialog, resource, normalStaticImage ),
m_ignoreUpdate( String( DpGuiResId( RID_DLG_UPDATE_IGNORE ) ) ),
m_ignoreAllUpdates( String( DpGuiResId( RID_DLG_UPDATE_IGNORE_ALL ) ) ),
m_enableUpdate( String( DpGuiResId( RID_DLG_UPDATE_ENABLE ) ) ),
@@ -954,10 +902,10 @@ void UpdateDialog::notifyMenubar( bool bPrepareOnly, bool bRecheckOnly )
return;
uno::Sequence< uno::Sequence< rtl::OUString > > aItemList;
- sal_Int32 nCount = 0;
if ( ! bRecheckOnly )
{
+ sal_Int32 nCount = 0;
for ( sal_Int16 i = 0; i < m_updates.getItemCount(); ++i )
{
uno::Sequence< rtl::OUString > aItem(2);
@@ -1130,16 +1078,6 @@ bool UpdateDialog::showDescription( const String& rDescription, bool bWithPublis
return true;
}
-bool UpdateDialog::isReadOnly( const uno::Reference< deployment::XPackage > &xPackage ) const
-{
- if ( m_xExtensionManager.is() && xPackage.is() )
- {
- return m_xExtensionManager->isReadOnlyRepository( xPackage->getRepositoryName() );
- }
- else
- return true;
-}
-
//------------------------------------------------------------------------------
void UpdateDialog::getIgnoredUpdates()
{
@@ -1296,6 +1234,7 @@ void UpdateDialog::setIgnoredUpdate( UpdateDialog::Index *pIndex, bool bIgnore,
}
//------------------------------------------------------------------------------
+
IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG)
{
rtl::OUStringBuffer b;
@@ -1324,16 +1263,21 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG)
}
case DISABLED_UPDATE:
{
- bInserted = showDescription( m_disabledUpdates[pos].aUpdateInfo );
+ if ( !m_disabledUpdates.empty() )
+ bInserted = showDescription( m_disabledUpdates[pos].aUpdateInfo );
if ( p->m_bIgnored )
b.append( m_ignoredUpdate );
+ if ( m_disabledUpdates.empty() )
+ break;
+
UpdateDialog::DisabledUpdate & data = m_disabledUpdates[ pos ];
if (data.unsatisfiedDependencies.getLength() != 0)
{
// create error string for version mismatch
::rtl::OUString sVersion( RTL_CONSTASCII_USTRINGPARAM("%VERSION") );
+ ::rtl::OUString sProductName( RTL_CONSTASCII_USTRINGPARAM("%PRODUCTNAME") );
sal_Int32 nPos = m_noDependencyCurVer.indexOf( sVersion );
if ( nPos >= 0 )
{
@@ -1341,6 +1285,16 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG)
::rtl::Bootstrap::expandMacros(sCurVersion);
m_noDependencyCurVer = m_noDependencyCurVer.replaceAt( nPos, sVersion.getLength(), sCurVersion );
}
+ nPos = m_noDependencyCurVer.indexOf( sProductName );
+ if ( nPos >= 0 )
+ {
+ m_noDependencyCurVer = m_noDependencyCurVer.replaceAt( nPos, sProductName.getLength(), BrandName::get() );
+ }
+ nPos = m_noDependency.indexOf( sProductName );
+ if ( nPos >= 0 )
+ {
+ m_noDependency = m_noDependency.replaceAt( nPos, sProductName.getLength(), BrandName::get() );
+ }
b.append(m_noInstall);
b.append(LF);
@@ -1431,21 +1385,11 @@ IMPL_LINK(UpdateDialog, okHandler, void *, EMPTYARG)
//If users are going to update a shared extension then we need
//to warn them
typedef ::std::vector<UpdateData>::const_iterator CIT;
- for (CIT i = m_enabledUpdates.begin(); i < m_enabledUpdates.end(); i++)
+ for (CIT i = m_enabledUpdates.begin(); i < m_enabledUpdates.end(); ++i)
{
OSL_ASSERT(i->aInstalledPackage.is());
//If the user has no write access to the shared folder then the update
//for a shared extension is disable, that is it cannot be in m_enabledUpdates
-// OSL_ASSERT(isReadOnly(i->aInstalledPackage) == sal_False);
-#if 0
- // TODO: check!
- OSL_ASSERT(m_extensionManagerDialog.get());
- if (RET_CANCEL == m_extensionManagerDialog->continueUpdateForSharedExtension(
- this, i->aPackageManager))
- {
- EndDialog(RET_CANCEL);
- }
-#endif
}
@@ -1492,3 +1436,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 a3cc76faaee8..ea1cc8d56201 100755..100644
--- 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 90b764d811b2..b6b6bb7c41e3 100755..100644
--- 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";
};
@@ -243,10 +238,10 @@ ModalDialog RID_DLG_UPDATE {
Text[en-US] = "The extension cannot be updated because:";
};
String RID_DLG_UPDATE_NODEPENDENCY {
- Text[en-US] = "Required OpenOffice.org version doesn't match:";
+ Text[en-US] = "Required %PRODUCTNAME version doesn't match:";
};
String RID_DLG_UPDATE_NODEPENDENCY_CUR_VER {
- Text[en-US] = "You have OpenOffice.org %VERSION";
+ Text[en-US] = "You have %PRODUCTNAME %VERSION";
};
String RID_DLG_UPDATE_BROWSERBASED {
Text[en-US] = "browser based update";
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
index 06bd27780504..696c2fe3ef0c 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;
}
@@ -486,8 +487,6 @@ void UpdateInstallDialog::Thread::installExtensions()
}
m_dialog.m_ft_extension_name.SetText(i->aInstalledPackage->getDisplayName());
}
-// TimeValue v = {1, 0};
-// osl::Thread::wait(v);
bool bError = false;
bool bLicenseDeclined = false;
cssu::Reference<css::deployment::XPackage> xExtension;
@@ -498,7 +497,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 +553,7 @@ void UpdateInstallDialog::Thread::installExtensions()
if (bLicenseDeclined)
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -563,7 +562,7 @@ void UpdateInstallDialog::Thread::installExtensions()
}
else if (!xExtension.is() || bError)
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -572,7 +571,7 @@ void UpdateInstallDialog::Thread::installExtensions()
}
}
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -599,7 +598,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 +633,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 +753,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 4df06a619bb3..4f89fdf4a4d7 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 bed190176d60..ebe7c2b52ecb 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.
@@ -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);
@@ -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 bb4a6b6646c8..2bddfd4f4102 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.
@@ -44,7 +45,6 @@ namespace dp_gui {
class LicenseDialog
: public ::cppu::WeakImplHelper1<ui::dialogs::XExecutableDialog>
-// task::XJobExecutor>
{
Reference<XComponentContext> const m_xComponentContext;
Reference<awt::XWindow> /* const */ m_parent;
@@ -62,10 +62,8 @@ public:
virtual void SAL_CALL setTitle( OUString const & title )
throw (RuntimeException);
virtual sal_Int16 SAL_CALL execute() throw (RuntimeException);
-
- //// XJobExecutor
- //virtual void SAL_CALL trigger( OUString const & event )
- // throw (RuntimeException);
};
}
#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 fe3921bf506b..eed15ac25be7 100644..100755
--- a/desktop/source/deployment/gui/makefile.mk
+++ b/desktop/source/deployment/gui/makefile.mk
@@ -30,16 +30,11 @@ PRJ = ..$/..$/..
PRJNAME = desktop
TARGET = deploymentgui
ENABLE_EXCEPTIONS = TRUE
-#USE_DEFFILE = TRUE
NO_BSYMBOLIC = TRUE
USE_PCH :=
ENABLE_PCH :=
PRJINC:=..$/..
-.IF "$(GUI)"=="OS2"
-TARGET = deplgui
-.ENDIF
-
.INCLUDE : settings.mk
.INCLUDE : $(PRJ)$/source$/deployment$/inc$/dp_misc.mk
DLLPRE =
@@ -55,7 +50,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
@@ -88,8 +82,6 @@ SHL1LIBS = $(SLB)$/$(TARGET).lib
SHL1DEF = $(MISC)$/$(SHL1TARGET).def
DEF1NAME = $(SHL1TARGET)
-#DEFLIB1NAME = $(TARGET)
-#DEF1DEPN =
SRS1NAME = $(TARGET)
SRC1FILES = \
diff --git a/desktop/source/deployment/inc/db.hxx b/desktop/source/deployment/inc/db.hxx
index 75dbd942a7cd..a2dd27df80b2 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,8 +28,10 @@
#ifndef BERKELEYDBPROXY_DB_HXX_
#define BERKELEYDBPROXY_DB_HXX_
-#ifdef SYSTEM_DB
-#include <db.h>
+#include <boost/noncopyable.hpp>
+
+#ifdef SYSTEM_DB_HEADER
+#include SYSTEM_DB_HEADER
#else
#include <berkeleydb/db.h>
#endif
@@ -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 13be1e8612fb..246d176bc4ec 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.
@@ -28,6 +29,7 @@
#ifndef INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_DEPENDENCIES_HXX
#define INCLUDED_DESKTOP_SOURCE_DEPLOYMENT_INC_DP_DEPENDENCIES_HXX
+#include "unotools/configmgr.hxx"
#include "sal/config.h"
#include "com/sun/star/uno/Reference.hxx"
#include "com/sun/star/uno/Sequence.hxx"
@@ -43,6 +45,14 @@ namespace rtl { class OUString; }
namespace dp_misc {
+struct BrandName : public ::rtl::StaticWithInit< ::rtl::OUString, BrandName > {
+ const ::rtl::OUString operator () () {
+ return ::utl::ConfigManager::GetDirectConfigProperty(
+ ::utl::ConfigManager::PRODUCTNAME ).get< ::rtl::OUString >();
+ }
+};
+
+
/**
Dependency handling.
*/
@@ -80,3 +90,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 37e616bb1a0b..d16e9127af8a 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 6fc49c30085c..f58b7663a173 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 b6116b9a1266..7a59e944f6af 100644..100755
--- 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 61e3fcc45418..9e912531e9f8 100644..100755
--- 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.mk b/desktop/source/deployment/inc/dp_misc.mk
index 829a6bb96bbf..a2d3d6e5e05b 100644..100755
--- a/desktop/source/deployment/inc/dp_misc.mk
+++ b/desktop/source/deployment/inc/dp_misc.mk
@@ -35,8 +35,6 @@ DEPLOYMENTMISCLIB = -ldeploymentmisc$(DLLPOSTFIX)
.ELSE
DEPLOYMENTMISCLIB = ideploymentmisc$(DLLPOSTFIX).lib
.ENDIF
-.ELIF "$(OS)" == "OS2"
-DEPLOYMENTMISCLIB = ideploymentmisc$(DLLPOSTFIX).lib
.ELSE
DEPLOYMENTMISCLIB = -ldeploymentmisc$(DLLPOSTFIX)
.ENDIF
diff --git a/desktop/source/deployment/inc/dp_misc_api.hxx b/desktop/source/deployment/inc/dp_misc_api.hxx
index ef34ef06872c..fbc248a1dfb2 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 bb3f58269e62..c078cf902ec5 100644..100755
--- 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.
@@ -30,14 +31,14 @@
#include "rtl/ustring.hxx"
#include "db.hxx"
-#include <hash_map>
+#include <boost/unordered_map.hpp>
using namespace berkeleydbproxy;
namespace dp_misc
{
-typedef ::std::hash_map<
+typedef ::boost::unordered_map<
::rtl::OString, ::rtl::OString, ::rtl::OStringHash > t_string2string_map;
//==============================================================================
@@ -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 95853746bef2..b2b9fad07f49 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 28191bc4e508..d7c16bb69b52 100644..100755
--- 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.
@@ -46,7 +47,7 @@ DESKTOP_DEPLOYMENTMISC_DLLPUBLIC String getResourceString( sal_uInt16 id );
template <typename Unique, sal_uInt16 id>
struct StaticResourceString :
- public ::rtl::StaticWithInit<const ::rtl::OUString, Unique> {
+ public ::rtl::StaticWithInit< ::rtl::OUString, Unique > {
const ::rtl::OUString operator () () { return getResourceString(id); }
};
@@ -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 03144388e8a8..52ac31369ac0 100644..100755
--- 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.
@@ -44,7 +45,7 @@ namespace css = ::com::sun::star;
namespace dp_misc {
struct DESKTOP_DEPLOYMENTMISC_DLLPUBLIC StrTitle :
- public rtl::StaticWithInit<const rtl::OUString, StrTitle>
+ public rtl::StaticWithInit<rtl::OUString, StrTitle>
{
const rtl::OUString operator () ();
};
@@ -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_update.hxx b/desktop/source/deployment/inc/dp_update.hxx
index 01511b1f2d21..1f22b2bb8d40 100755..100644
--- a/desktop/source/deployment/inc/dp_update.hxx
+++ b/desktop/source/deployment/inc/dp_update.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.
@@ -145,3 +146,5 @@ DESKTOP_DEPLOYMENTMISC_DLLPUBLIC
}
#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 c459333f97a9..f335b986c5e3 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 300051bd1512..4e178e1b37bf 100644..100755
--- 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/makefile.mk b/desktop/source/deployment/makefile.mk
index 991ba7026d72..bffc8241c300 100644..100755
--- a/desktop/source/deployment/makefile.mk
+++ b/desktop/source/deployment/makefile.mk
@@ -30,19 +30,12 @@ PRJ = ..$/..
PRJNAME = desktop
TARGET = deployment
ENABLE_EXCEPTIONS = TRUE
-#USE_DEFFILE = TRUE
NO_BSYMBOLIC = TRUE
-.IF "$(GUI)"=="OS2"
-TARGET = deploy
-.ENDIF
-
.INCLUDE : settings.mk
.INCLUDE : $(PRJ)$/source$/deployment$/inc$/dp_misc.mk
-.IF "$(SYSTEM_DB)" == "YES"
-CFLAGS+=-DSYSTEM_DB -I$(DB_INCLUDES)
-.ENDIF
+CFLAGS+= $(SYSTEM_DB_CFLAGS)
INCPRE += inc
@@ -102,11 +95,7 @@ RESLIB1SRSFILES = \
$(SRS)$/deployment_manager.srs \
$(SRS)$/deployment_unopkg.srs
-.IF "$(GUI)"=="OS2"
-RESLIB1SRSFILES += $(SRS)$/deplmisc.srs
-.ELSE
RESLIB1SRSFILES += $(SRS)$/deployment_misc.srs
-.ENDIF
.INCLUDE : target.mk
diff --git a/desktop/source/deployment/manager/dp_activepackages.cxx b/desktop/source/deployment/manager/dp_activepackages.cxx
index 8f6b6b82c0b7..f220aaf40daa 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.
@@ -40,7 +41,7 @@
#include "rtl/uri.h"
#include "rtl/uri.hxx"
#include "rtl/ustring.hxx"
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include "dp_identifier.hxx"
#include "dp_persmap.h"
@@ -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 7d9c7e32cfb4..2a4d18686346 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_commandenvironments.cxx b/desktop/source/deployment/manager/dp_commandenvironments.cxx
index 0de1f9e96e91..f8237f35499f 100644
--- a/desktop/source/deployment/manager/dp_commandenvironments.cxx
+++ b/desktop/source/deployment/manager/dp_commandenvironments.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.
@@ -138,7 +139,6 @@ throw (uno::RuntimeException)
{
}
-
void BaseCommandEnv::update( uno::Any const & /*Status */)
throw (uno::RuntimeException)
{
@@ -200,7 +200,6 @@ void LicenseCommandEnv::handle(
uno::Any request( xRequest->getRequest() );
OSL_ASSERT( request.getValueTypeClass() == uno::TypeClass_EXCEPTION );
-
deployment::LicenseException licExc;
bool approve = false;
@@ -224,7 +223,6 @@ void LicenseCommandEnv::handle(
}
//================================================================================
-//================================================================================
NoLicenseCommandEnv::NoLicenseCommandEnv(
css::uno::Reference< css::task::XInteractionHandler> const & handler):
@@ -239,7 +237,6 @@ void NoLicenseCommandEnv::handle(
uno::Any request( xRequest->getRequest() );
OSL_ASSERT( request.getValueTypeClass() == uno::TypeClass_EXCEPTION );
-
deployment::LicenseException licExc;
bool approve = false;
@@ -252,11 +249,6 @@ void NoLicenseCommandEnv::handle(
handle_(approve, abort, xRequest);
}
-// SilentCheckPrerequisitesCommandEnv::SilentCheckPrerequisitesCommandEnv(
-// css::uno::Reference< css::task::XInteractionHandler> const & handler):
-// BaseCommandEnv(handler)
-// {
-// }
SilentCheckPrerequisitesCommandEnv::SilentCheckPrerequisitesCommandEnv()
{
}
@@ -289,36 +281,7 @@ void SilentCheckPrerequisitesCommandEnv::handle(
m_UnknownException = request;
}
}
-// NoExceptionCommandEnv::NoExceptionCommandEnv(
-// css::uno::Reference< css::task::XInteractionHandler> const & handler,
-// css::uno::Type const & type):
-// BaseCommandEnv(handler),
-// m_type(type)
-// {
-// }
-// // XInteractionHandler
-// void NoExceptionCommandEnv::handle(
-// Reference< task::XInteractionRequest> const & xRequest )
-// throw (uno::RuntimeException)
-// {
-// uno::Any request( xRequest->getRequest() );
-// OSL_ASSERT( request.getValueTypeClass() == uno::TypeClass_EXCEPTION );
-
-
-// deployment::LicenseException licExc;
-
-// bool approve = false;
-// bool abort = false;
-
-// if (request.getValueType() == m_type)
-// {
-// approve = true;
-// }
-// handle_(approve, abort, xRequest);
-// }
-
-
-
-} // namespace dp_manager
+}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/manager/dp_commandenvironments.hxx b/desktop/source/deployment/manager/dp_commandenvironments.hxx
index bea11586d462..59349c469af0 100644
--- a/desktop/source/deployment/manager/dp_commandenvironments.hxx
+++ b/desktop/source/deployment/manager/dp_commandenvironments.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.
@@ -28,19 +29,14 @@
#if ! defined INCLUDED_DP_COMMANDENVIRONMENTS_HXX
#define INCLUDED_DP_COMMANDENVIRONMENTS_HXX
-
#include "cppuhelper/compbase3.hxx"
-//#include "cppuhelper/implbase2.hxx"
#include "ucbhelper/content.hxx"
#include "com/sun/star/uno/Type.hxx"
-
namespace css = ::com::sun::star;
namespace dp_manager {
-
-
/**
This command environment is to be used when an extension is temporarily
stored in the "tmp" repository. It prevents all kind of user interaction.
@@ -104,7 +100,7 @@ private:
::rtl::OUString m_repository;
bool m_bSuppressLicense;
public:
- LicenseCommandEnv(){};
+ LicenseCommandEnv() : m_bSuppressLicense(false) {};
LicenseCommandEnv(
css::uno::Reference< css::task::XInteractionHandler> const & handler,
bool bSuppressLicense,
@@ -158,26 +154,8 @@ public:
css::uno::Any m_UnknownException;
};
-// class NoExceptionCommandEnv : public BaseCommandEnv
-// {
-// css::uno::Type m_type;
-// public:
-// NoExceptionCommandEnv::NoExceptionCommandEnv(){};
-// NoExceptionCommandEnv::NoExceptionCommandEnv(
-// css::uno::Reference< css::task::XInteractionHandler> const & handler,
-// css::uno::Type const & type);
-
-// // XInteractionHandler
-// virtual void SAL_CALL handle(
-// css::uno::Reference<css::task::XInteractionRequest > const & xRequest )
-// throw (css::uno::RuntimeException);
-
-// };
-
}
-
-
-
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx
index 8939bb97d4e8..2151642df43c 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.cxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.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.
@@ -64,7 +65,7 @@
#include "boost/bind.hpp"
#include <list>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <algorithm>
namespace deploy = com::sun::star::deployment;
@@ -77,9 +78,6 @@ namespace beans = com::sun::star::beans;
namespace util = com::sun::star::util;
namespace css = com::sun::star;
-
-//#define OUSTR(s) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(s))
-
using ::com::sun::star::uno::Reference;
using ::rtl::OUString;
@@ -90,7 +88,6 @@ struct CompIdentifiers
bool operator() (::std::vector<Reference<deploy::XPackage> > const & a,
::std::vector<Reference<deploy::XPackage> > const & b)
{
-
if (getName(a).compareTo(getName(b)) < 0)
return true;
return false;
@@ -105,7 +102,7 @@ OUString CompIdentifiers::getName(::std::vector<Reference<deploy::XPackage> > co
//get the first non-null reference
Reference<deploy::XPackage> extension;
::std::vector<Reference<deploy::XPackage> >::const_iterator it = a.begin();
- for (; it != a.end(); it++)
+ for (; it != a.end(); ++it)
{
if (it->is())
{
@@ -170,12 +167,10 @@ ExtensionRemoveGuard::~ExtensionRemoveGuard()
}
}
-} //end namespace
+}
namespace dp_manager {
-
-
//------------------------------------------------------------------------------
//ToDo: bundled extension
@@ -238,12 +233,11 @@ ExtensionManager::getPackageManager(::rtl::OUString const & repository)
return xPackageManager;
}
-
/*
Enters the XPackage objects into a map. They must be all from the
same repository. The value type of the map is a vector, where each vector
represents an extension with a particular identifier. The first member
- is represents the user extension, the second the shared extension and the
+ represents the user extension, the second the shared extension and the
third the bundled extension.
*/
void ExtensionManager::addExtensionsToMap(
@@ -256,13 +250,13 @@ void ExtensionManager::addExtensionsToMap(
::std::list<OUString>::const_iterator citNames =
m_repositoryNames.begin();
int index = 0;
- for (;citNames != m_repositoryNames.end(); citNames++, index++)
+ for (;citNames != m_repositoryNames.end(); ++citNames, ++index)
{
if (citNames->equals(repository))
break;
}
- for (int i = 0; i < seqExt.getLength(); i++)
+ for (int i = 0; i < seqExt.getLength(); ++i)
{
Reference<deploy::XPackage> const & xExtension = seqExt[i];
OUString id = dp_misc::getIdentifier(xExtension);
@@ -282,8 +276,8 @@ void ExtensionManager::addExtensionsToMap(
/*
returns a list containing extensions with the same identifier from
- all repositories (user, shared, bundled) If one repository does not
- have this extension, then the list contains an empty Referenc. The list
+ all repositories (user, shared, bundled). If one repository does not
+ have this extension, then the list contains an empty Reference. The list
is ordered according to the priority of the repostories:
1. user
2. shared
@@ -299,29 +293,21 @@ void ExtensionManager::addExtensionsToMap(
{
::std::list<Reference<deploy::XPackage> > extensionList;
- try
- { //will throw an exception if the extension does not exist
- extensionList.push_back(getUserRepository()->getDeployedPackage(
- identifier, fileName, Reference<ucb::XCommandEnvironment>()));
- } catch(lang::IllegalArgumentException &)
- {
- extensionList.push_back(Reference<deploy::XPackage>());
- }
- try
- {
- extensionList.push_back(getSharedRepository()->getDeployedPackage(
- identifier, fileName, Reference<ucb::XCommandEnvironment>()));
- } catch (lang::IllegalArgumentException &)
- {
- extensionList.push_back(Reference<deploy::XPackage>());
- }
- try
- {
- extensionList.push_back(getBundledRepository()->getDeployedPackage(
- identifier, fileName, Reference<ucb::XCommandEnvironment>()));
- } catch (lang::IllegalArgumentException &)
+ Reference<deploy::XPackageManager> lRepos[] = {
+ getUserRepository(), getSharedRepository(), getBundledRepository() };
+ for (int i(0); i != SAL_N_ELEMENTS(lRepos); ++i)
{
- extensionList.push_back(Reference<deploy::XPackage>());
+ Reference<deploy::XPackage> xPackage;
+ try
+ {
+ xPackage = lRepos[i]->getDeployedPackage(
+ identifier, fileName, Reference<ucb::XCommandEnvironment>());
+ }
+ catch(lang::IllegalArgumentException &)
+ {
+ // thrown if the extension does not exist in this repository
+ }
+ extensionList.push_back(xPackage);
}
OSL_ASSERT(extensionList.size() == 3);
return extensionList;
@@ -347,7 +333,7 @@ ExtensionManager::getExtensionsWithSameIdentifier(
//throw an IllegalArgumentException if there is no extension at all.
typedef ::std::list<Reference<deploy::XPackage> >::const_iterator CIT;
- for (CIT i = listExtensions.begin(); i != listExtensions.end(); i++)
+ for (CIT i = listExtensions.begin(); i != listExtensions.end(); ++i)
bHasExtension |= i->is();
if (!bHasExtension)
throw lang::IllegalArgumentException(
@@ -380,8 +366,6 @@ ExtensionManager::getExtensionsWithSameIdentifier(
}
}
-
-
bool ExtensionManager::isUserDisabled(
OUString const & identifier, OUString const & fileName)
{
@@ -738,7 +722,7 @@ Reference<deploy::XPackage> ExtensionManager::addExtension(
}
//check again dependencies but prevent user interaction,
//We can disregard the license, because the user must have already
- //accepted it, whe we called checkPrerequisites the first time
+ //accepted it, when we called checkPrerequisites the first time
SilentCheckPrerequisitesCommandEnv * pSilentCommandEnv =
new SilentCheckPrerequisitesCommandEnv();
Reference<ucb::XCommandEnvironment> silentCommandEnv(pSilentCommandEnv);
@@ -758,10 +742,13 @@ Reference<deploy::XPackage> ExtensionManager::addExtension(
if (repository.equals(OUSTR("user")))
bUserDisabled2 = false;
- ::rtl::OUString const name(xNewExtension->getName());
+ // pass the two values via variables to workaround gcc-4.3.4 specific bug (bnc#655912)
+ OUString sNewExtensionIdentifier = dp_misc::getIdentifier(xNewExtension);
+ OUString sNewExtensionFileName = xNewExtension->getName();
+
activateExtension(
- dp_misc::getIdentifier(xNewExtension),
- name, bUserDisabled2, false, xAbortChannel,
+ sNewExtensionIdentifier, sNewExtensionFileName,
+ bUserDisabled2, false, xAbortChannel,
Reference<ucb::XCommandEnvironment>());
}
else
@@ -1066,7 +1053,6 @@ sal_Int32 ExtensionManager::checkPrerequisitesAndEnable(
}
}
-
void ExtensionManager::disableExtension(
Reference<deploy::XPackage> const & extension,
Reference<task::XAbortChannel> const & xAbortChannel,
@@ -1187,7 +1173,7 @@ uno::Sequence< uno::Sequence<Reference<deploy::XPackage> > >
::std::vector< ::std::vector<Reference<deploy::XPackage> > >
vecExtensions;
id2extensions::const_iterator mapIt = mapExt.begin();
- for (;mapIt != mapExt.end(); mapIt++)
+ for (;mapIt != mapExt.end(); ++mapIt)
vecExtensions.push_back(mapIt->second);
//sort the element according to the identifier
@@ -1382,7 +1368,7 @@ sal_Bool ExtensionManager::synchronize(
{
//We catch the exception, so we can write the lastmodified file
//so we will no repeat this everytime OOo starts.
- OSL_ENSURE(0, "Extensions Manager: synchronize");
+ OSL_FAIL("Extensions Manager: synchronize");
}
OUString lastSyncBundled(RTL_CONSTASCII_USTRINGPARAM(
"$BUNDLED_EXTENSIONS_USER/lastsynchronized"));
@@ -1513,8 +1499,6 @@ sal_Bool ExtensionManager::isReadOnlyRepository(::rtl::OUString const & reposito
return getPackageManager(repository)->isReadOnly();
}
//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
namespace sdecl = comphelper::service_decl;
sdecl::class_<ExtensionManager> servicePIP;
@@ -1540,7 +1524,7 @@ bool singleton_entries(
}
catch (registry::InvalidRegistryException & exc) {
(void) exc; // avoid warnings
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
return false;
}
@@ -1588,4 +1572,4 @@ void ExtensionManager::fireModified()
} // namespace dp_manager
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/manager/dp_extensionmanager.hxx b/desktop/source/deployment/manager/dp_extensionmanager.hxx
index e7a180a05de1..6c6bd5cb41f3 100644
--- a/desktop/source/deployment/manager/dp_extensionmanager.hxx
+++ b/desktop/source/deployment/manager/dp_extensionmanager.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.
@@ -25,7 +26,6 @@
*
************************************************************************/
-
#if ! defined INCLUDED_DP_EXTENSIONMANAGER_H
#define INCLUDED_DP_EXTENSIONMANAGER_H
@@ -41,17 +41,15 @@
#include "osl/mutex.hxx"
#include <list>
-
namespace css = ::com::sun::star;
namespace dp_manager {
-typedef ::std::hash_map<
+typedef ::boost::unordered_map<
::rtl::OUString,
::std::vector<css::uno::Reference<css::deployment::XPackage> >,
::rtl::OUStringHash > id2extensions;
-
class ExtensionManager : private ::dp_misc::MutexHolder,
public ::cppu::WeakComponentImplHelper1< css::deployment::XExtensionManager >
{
@@ -128,7 +126,6 @@ public:
css::lang::IllegalArgumentException,
css::uno::RuntimeException);
-
virtual sal_Int32 SAL_CALL checkPrerequisitesAndEnable(
css::uno::Reference<css::deployment::XPackage> const & extension,
css::uno::Reference<css::task::XAbortChannel> const & xAbortChannel,
@@ -139,7 +136,6 @@ public:
css::lang::IllegalArgumentException,
css::uno::RuntimeException);
-
virtual css::uno::Sequence< css::uno::Reference<css::deployment::XPackage> >
SAL_CALL getDeployedExtensions(
::rtl::OUString const & repository,
@@ -184,7 +180,6 @@ public:
css::lang::IllegalArgumentException,
css::uno::RuntimeException);
-
virtual void SAL_CALL reinstallDeployedExtensions(
::rtl::OUString const & repository,
css::uno::Reference< css::task::XAbortChannel> const & xAbortChannel,
@@ -269,7 +264,6 @@ private:
css::uno::Reference<css::task::XAbortChannel> const & xAbortChannel,
css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv );
-
::std::list<css::uno::Reference<css::deployment::XPackage> >
getExtensionsWithSameId(::rtl::OUString const & identifier,
::rtl::OUString const & fileName,
@@ -296,7 +290,6 @@ private:
css::uno::Reference<css::task::XAbortChannel> const & xAbortChannel,
css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv);
-
void addExtensionsToMap(
id2extensions & mapExt,
css::uno::Sequence<css::uno::Reference<css::deployment::XPackage> > const & seqExt,
@@ -319,13 +312,10 @@ private:
css::lang::IllegalArgumentException,
css::uno::RuntimeException);
-
};
}
-
-
-
#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 6d4750bb2447..0786e7d84fa3 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.
@@ -149,8 +150,6 @@ rtl::OUString PackageInformationProvider::getPackageLocation(
}
//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
rtl::OUString SAL_CALL
PackageInformationProvider::getPackageLocation( const rtl::OUString& _sExtensionId )
@@ -217,7 +216,7 @@ PackageInformationProvider::isUpdateAvailable( const rtl::OUString& _sExtensionI
}
int nCount = 0;
- for (dp_misc::UpdateInfoMap::iterator i(updateInfoMap.begin()); i != updateInfoMap.end(); i++)
+ for (dp_misc::UpdateInfoMap::iterator i(updateInfoMap.begin()); i != updateInfoMap.end(); ++i)
{
dp_misc::UpdateInfo const & info = i->second;
@@ -332,8 +331,6 @@ uno::Sequence< uno::Sequence< rtl::OUString > > SAL_CALL PackageInformationProvi
//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
-//------------------------------------------------------------------------------
namespace sdecl = comphelper::service_decl;
sdecl::class_<PackageInformationProvider> servicePIP;
@@ -359,7 +356,7 @@ bool singleton_entries(
}
catch (registry::InvalidRegistryException & exc) {
(void) exc; // avoid warnings
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
return false;
}
@@ -368,3 +365,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 89ab4d0b7199..680dbf855d9d 100755..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.
@@ -621,7 +622,7 @@ OUString PackageManagerImpl::detectMediaType(
if (throw_exc)
throw;
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
@@ -1088,13 +1089,13 @@ PackageManagerImpl::getDeployedPackages_(
catch (lang::IllegalArgumentException & exc) {
// ignore
(void) exc; // avoid warnings
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
catch (deployment::DeploymentException& exc) {
// ignore
(void) exc; // avoid warnings
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
@@ -1273,7 +1274,7 @@ bool PackageManagerImpl::synchronizeRemovedExtensions(
typedef ActivePackages::Entries::const_iterator ITActive;
bool bShared = m_context.equals(OUSTR("shared"));
- for (ITActive i = id2temp.begin(); i != id2temp.end(); i++)
+ for (ITActive i = id2temp.begin(); i != id2temp.end(); ++i)
{
try
{
@@ -1317,7 +1318,7 @@ bool PackageManagerImpl::synchronizeRemovedExtensions(
//There may be another extensions at the same place
dp_misc::DescriptionInfoset infoset =
dp_misc::getDescriptionInfoset(url);
- OSL_ENSURE(infoset.hasDescription(),
+ OSL_ENSURE(infoset.hasDescription() && infoset.getIdentifier(),
"Extension Manager: bundled and shared extensions "
"must have an identifer and a version");
if (infoset.hasDescription() &&
@@ -1511,7 +1512,7 @@ Sequence< Reference<deployment::XPackage> > PackageManagerImpl::getExtensionsWit
ActivePackages::Entries::const_iterator i = id2temp.begin();
bool bShared = m_context.equals(OUSTR("shared"));
- for (; i != id2temp.end(); i++ )
+ for (; i != id2temp.end(); ++i )
{
//Get the database entry
ActivePackages::Data const & dbData = i->second;
@@ -1618,7 +1619,6 @@ sal_Int32 PackageManagerImpl::checkPrerequisites(
}
}
-//##############################################################################
//______________________________________________________________________________
PackageManagerImpl::CmdEnvWrapperImpl::~CmdEnvWrapperImpl()
@@ -1686,3 +1686,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 8fe0f662011b..3b335d7e2362 100644..100755
--- 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_manager.hrc b/desktop/source/deployment/manager/dp_manager.hrc
index 6131cc381abf..6131cc381abf 100644..100755
--- a/desktop/source/deployment/manager/dp_manager.hrc
+++ b/desktop/source/deployment/manager/dp_manager.hrc
diff --git a/desktop/source/deployment/manager/dp_managerfac.cxx b/desktop/source/deployment/manager/dp_managerfac.cxx
index f6fde6b07d60..d84abbf0f926 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.
@@ -54,7 +55,7 @@ class PackageManagerFactoryImpl : private MutexHolder, public t_pmfac_helper
Reference<deployment::XPackageManager> m_xUserMgr;
Reference<deployment::XPackageManager> m_xSharedMgr;
Reference<deployment::XPackageManager> m_xBundledMgr;
- typedef ::std::hash_map<
+ typedef ::boost::unordered_map<
OUString, WeakReference<deployment::XPackageManager>,
::rtl::OUStringHash > t_string2weakref;
t_string2weakref m_managers;
@@ -98,7 +99,7 @@ bool singleton_entries(
}
catch (registry::InvalidRegistryException & exc) {
(void) exc; // avoid warnings
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
return false;
}
@@ -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/manager/dp_properties.cxx b/desktop/source/deployment/manager/dp_properties.cxx
index 9a181d1573e5..a2a568287f16 100644
--- a/desktop/source/deployment/manager/dp_properties.cxx
+++ b/desktop/source/deployment/manager/dp_properties.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.
@@ -167,3 +168,4 @@ bool ExtensionProperties::isExtensionUpdate()
} // namespace dp_manager
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/manager/dp_properties.hxx b/desktop/source/deployment/manager/dp_properties.hxx
index a1b953ce8376..103227f29226 100644
--- a/desktop/source/deployment/manager/dp_properties.hxx
+++ b/desktop/source/deployment/manager/dp_properties.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.
@@ -76,3 +77,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/manager/makefile.mk b/desktop/source/deployment/manager/makefile.mk
index 4dc6405e34bf..022f5e27e554 100644..100755
--- a/desktop/source/deployment/manager/makefile.mk
+++ b/desktop/source/deployment/manager/makefile.mk
@@ -33,9 +33,7 @@ ENABLE_EXCEPTIONS = TRUE
.INCLUDE : settings.mk
-.IF "$(SYSTEM_DB)" == "YES"
-CFLAGS+=-DSYSTEM_DB -I$(DB_INCLUDES)
-.ENDIF
+CFLAGS+= $(SYSTEM_DB_CFLAGS)
SRS1NAME = $(TARGET)
SRC1FILES = \
diff --git a/desktop/source/deployment/misc/db.cxx b/desktop/source/deployment/misc/db.cxx
index a394731921c8..909f12f79e18 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.
@@ -151,7 +152,6 @@ int Db::del(Dbt *key, u_int32_t flags)
if ((err = db->del(db, 0, key, flags)) != 0) {
// DB_NOTFOUND is a "normal" return, so should not be
// thrown as an error
- //
if (err != DB_NOTFOUND) {
db_internal::check_error(err, "Db::del");
return (err);
@@ -270,3 +270,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 9534f166f2f0..6b937547ae93 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.
@@ -56,13 +57,25 @@ namespace css = ::com::sun::star;
static char const xmlNamespace[] =
"http://openoffice.org/extensions/description/2006";
-bool satisfiesMinimalVersion(::rtl::OUString const & version) {
- ::rtl::OUString v(
+bool
+lcl_versionIsNot(dp_misc::Order i_eOrder, ::rtl::OUString const& i_rVersion)
+{
+ ::rtl::OUString aVersion(
RTL_CONSTASCII_USTRINGPARAM(
"${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version")
":Version:OOOPackageVersion}"));
- ::rtl::Bootstrap::expandMacros(v);
- return ::dp_misc::compareVersions(v, version) != ::dp_misc::LESS;
+ ::rtl::Bootstrap::expandMacros(aVersion);
+ return ::dp_misc::compareVersions(aVersion, i_rVersion) != i_eOrder;
+}
+
+bool satisfiesMinimalVersion(::rtl::OUString const& i_rVersion)
+{
+ return lcl_versionIsNot(dp_misc::LESS, i_rVersion);
+}
+
+bool satisfiesMaximalVersion(::rtl::OUString const& i_rVersion)
+{
+ return lcl_versionIsNot(dp_misc::GREATER, i_rVersion);
}
}
@@ -80,14 +93,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(
@@ -98,28 +111,18 @@ check(::dp_misc::DescriptionInfoset const & infoset) {
RTL_CONSTASCII_STRINGPARAM(
"OpenOffice.org-maximal-version")))
{
- ::rtl::OUString v(
- RTL_CONSTASCII_USTRINGPARAM(
- "${$OOO_BASE_DIR/program/" SAL_CONFIGFILE("version")
- ":Version:OOOBaseVersion}"));
- ::rtl::Bootstrap::expandMacros(v);
- sat =
- ::dp_misc::compareVersions(
- v,
+ sat = satisfiesMaximalVersion(
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;
@@ -134,6 +137,7 @@ check(::dp_misc::DescriptionInfoset const & infoset) {
::rtl::OUString sReason;
::rtl::OUString sValue;
::rtl::OUString sVersion(RTL_CONSTASCII_USTRINGPARAM("%VERSION"));
+ ::rtl::OUString sProductName(RTL_CONSTASCII_USTRINGPARAM("%PRODUCTNAME"));
if ( dependency->getNamespaceURI().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( xmlNamespace ) )
&& dependency->getTagName().equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "OpenOffice.org-minimal-version" ) ) )
@@ -163,9 +167,14 @@ check(::dp_misc::DescriptionInfoset const & infoset) {
sal_Int32 nPos = sReason.indexOf( sVersion );
if ( nPos >= 0 )
sReason = sReason.replaceAt( nPos, sVersion.getLength(), sValue );
+ nPos = sReason.indexOf( sProductName );
+ if ( nPos >= 0 )
+ sReason = sReason.replaceAt( nPos, sProductName.getLength(), BrandName::get() );
return sReason;
}
}
}
+
+/* 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 b4132db61f03..3c6d21fe6dc6 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.
@@ -127,7 +128,7 @@ class ExtensionDescription
public:
/**throws an exception if the description.xml is not
available, cannot be read, does not contain the expected data,
- or any other error occured. Therefore it shoult only be used with
+ or any other error occurred. Therefore it shoult only be used with
new extensions.
Throws com::sun::star::uno::RuntimeException,
@@ -166,7 +167,6 @@ class FileDoesNotExistFilter
css::task::XInteractionHandler >
{
- //css::uno::Reference<css::task::XInteractionHandler> m_xHandler;
bool m_bExist;
css::uno::Reference< css::ucb::XCommandEnvironment > m_xCommandEnv;
@@ -862,3 +862,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 9659bc6759fd..b24ccd7def52 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 36e7fd037ccf..c42ccd249cb7 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 cfdac4068130..54ee2cb0c4bd 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.
@@ -51,14 +52,13 @@
#include "boost/scoped_array.hpp"
#include "boost/shared_ptr.hpp"
#include <comphelper/processfactory.hxx>
+#include <salhelper/linkhelper.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;
@@ -79,7 +79,7 @@ namespace dp_misc {
namespace {
struct UnoRc : public rtl::StaticWithInit<
- const boost::shared_ptr<rtl::Bootstrap>, UnoRc> {
+ boost::shared_ptr<rtl::Bootstrap>, UnoRc> {
const boost::shared_ptr<rtl::Bootstrap> operator () () {
OUString unorc( RTL_CONSTASCII_USTRINGPARAM(
"$OOO_BASE_DIR/program/" SAL_CONFIGFILE("uno")) );
@@ -91,7 +91,7 @@ struct UnoRc : public rtl::StaticWithInit<
}
};
-struct OfficePipeId : public rtl::StaticWithInit<const OUString, OfficePipeId> {
+struct OfficePipeId : public rtl::StaticWithInit<OUString, OfficePipeId> {
const OUString operator () ();
};
@@ -143,6 +143,18 @@ bool existsOfficePipe()
return pipe.is();
}
+//get modification time
+static bool getModifyTimeTargetFile(const OUString &rFileURL, TimeValue &rTime)
+{
+ salhelper::LinkResolver aResolver(osl_FileStatus_Mask_ModifyTime);
+
+ if (aResolver.fetchFileStatus(rFileURL) != osl::FileBase::E_None)
+ return false;
+
+ rTime = aResolver.m_aStatus.getModifyTime();
+
+ return true;
+}
//Returns true if the Folder was more recently modified then
//the lastsynchronized file. That is the repository needs to
@@ -161,7 +173,7 @@ bool compareExtensionFolderWithLastSynchronizedFile(
}
else if (err1 != ::osl::File::E_None)
{
- OSL_ENSURE(0, "Cannot access extension folder");
+ OSL_FAIL("Cannot access extension folder");
return true; //sync just in case
}
@@ -175,21 +187,18 @@ bool compareExtensionFolderWithLastSynchronizedFile(
}
else if (err2 != ::osl::File::E_None)
{
- OSL_ENSURE(0, "Cannot access file lastsynchronized");
+ OSL_FAIL("Cannot access file lastsynchronized");
return true; //sync just in case
}
//compare the modification time of the extension folder and the last
//modified file
- ::osl::FileStatus statFolder(FileStatusMask_ModifyTime);
- ::osl::FileStatus statFile(FileStatusMask_ModifyTime);
- if (itemExtFolder.getFileStatus(statFolder) == ::osl::File::E_None)
+ TimeValue timeFolder;
+ if (getModifyTimeTargetFile(folderURL, timeFolder))
{
- if (itemFile.getFileStatus(statFile) == ::osl::File::E_None)
+ TimeValue timeFile;
+ if (getModifyTimeTargetFile(fileURL, timeFile))
{
- TimeValue timeFolder = statFolder.getModifyTime();
- TimeValue timeFile = statFile.getModifyTime();
-
if (timeFile.Seconds < timeFolder.Seconds)
bNeedsSync = true;
}
@@ -204,6 +213,7 @@ bool compareExtensionFolderWithLastSynchronizedFile(
OSL_ASSERT(0);
bNeedsSync = true;
}
+
return bNeedsSync;
}
@@ -368,7 +378,7 @@ bool office_is_running()
if (
#if defined UNIX
sFile.equals(OUString(RTL_CONSTASCII_USTRINGPARAM(SOFFICE2)))
-#elif defined WNT || defined OS2
+#elif defined WNT
//osl_getExecutableFile should deliver "soffice.bin" on windows
//even if swriter.exe, scalc.exe etc. was started. This is a bug
//in osl_getExecutableFile
@@ -390,7 +400,7 @@ bool office_is_running()
}
else
{
- OSL_ENSURE(0, "NOT osl_Process_E_None ");
+ OSL_FAIL("NOT osl_Process_E_None ");
//if osl_getExecutable file than we take the risk of creating a pipe
ret = existsOfficePipe();
}
@@ -420,7 +430,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:
@@ -619,6 +629,7 @@ void syncRepositories(Reference<ucb::XCommandEnvironment> const & xCmdEnv)
OUSTR( "/singletons/com.sun.star.task.OfficeRestartManager") ), UNO_QUERY );
if (restarter.is())
{
+ OSL_TRACE( "Request restart for modified extensions manager" );
restarter->requestRestart(xCmdEnv.is() == sal_True ? xCmdEnv->getInteractionHandler() :
Reference<task::XInteractionHandler>());
}
@@ -628,3 +639,5 @@ void syncRepositories(Reference<ucb::XCommandEnvironment> const & xCmdEnv)
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/misc/dp_misc.hrc b/desktop/source/deployment/misc/dp_misc.hrc
index 55fabac5c5b5..55fabac5c5b5 100644..100755
--- a/desktop/source/deployment/misc/dp_misc.hrc
+++ b/desktop/source/deployment/misc/dp_misc.hrc
diff --git a/desktop/source/deployment/misc/dp_misc.src b/desktop/source/deployment/misc/dp_misc.src
index ae810d2c7851..d18fc4c45f16 100755..100644
--- a/desktop/source/deployment/misc/dp_misc.src
+++ b/desktop/source/deployment/misc/dp_misc.src
@@ -32,9 +32,9 @@ String RID_DEPLYOMENT_DEPENDENCIES_UNKNOWN {
};
String RID_DEPLYOMENT_DEPENDENCIES_MIN {
- Text[en-US] = "Extension requires at least OpenOffice.org %VERSION";
+ Text[en-US] = "Extension requires at least %PRODUCTNAME %VERSION";
};
String RID_DEPLYOMENT_DEPENDENCIES_MAX {
- Text[en-US] = "Extension doesn't support versions greater than: OpenOffice.org %VERSION";
+ Text[en-US] = "Extension doesn't support versions greater than: %PRODUCTNAME %VERSION";
};
diff --git a/desktop/source/deployment/misc/dp_platform.cxx b/desktop/source/deployment/misc/dp_platform.cxx
index ac28b6816708..3caf1196df95 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.
@@ -37,6 +38,7 @@
#define PLATFORM_ALL "all"
#define PLATFORM_WIN_X86 "windows_x86"
+#define PLATFORM_WIN_X86_64 "windows_x86_64"
#define PLATFORM_LINUX_X86 "linux_x86"
#define PLATFORM_LINUX_X86_64 "linux_x86_64"
#define PLATFORM_KFREEBSD_X86 "kfreebsd_x86"
@@ -62,11 +64,17 @@
#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_DRAGONFLY_X86 "dragonfly_x86"
+#define PLATFORM_DRAGONFLY_X86_64 "dragonfly_x86_64"
+#define PLATFORM_AIX_POWERPC "aix_powerpc"
@@ -83,7 +91,7 @@ namespace dp_misc
namespace
{
struct StrOperatingSystem :
- public rtl::StaticWithInit<const OUString, StrOperatingSystem> {
+ public rtl::StaticWithInit<OUString, StrOperatingSystem> {
const OUString operator () () {
OUString os( RTL_CONSTASCII_USTRINGPARAM("$_OS") );
::rtl::Bootstrap::expandMacros( os );
@@ -92,7 +100,7 @@ namespace
};
struct StrCPU :
- public rtl::StaticWithInit<const OUString, StrCPU> {
+ public rtl::StaticWithInit<OUString, StrCPU> {
const OUString operator () () {
OUString arch( RTL_CONSTASCII_USTRINGPARAM("$_ARCH") );
::rtl::Bootstrap::expandMacros( arch );
@@ -102,14 +110,12 @@ namespace
struct StrPlatform : public rtl::StaticWithInit<
- const OUString, StrPlatform> {
+ OUString, StrPlatform> {
const OUString operator () () {
::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();
}
};
@@ -127,6 +133,8 @@ namespace
ret = true;
else if (token.equals(OUSTR(PLATFORM_WIN_X86)))
ret = checkOSandCPU(OUSTR("Windows"), OUSTR("x86"));
+ else if (token.equals(OUSTR(PLATFORM_WIN_X86_64)))
+ ret = checkOSandCPU(OUSTR("Windows"), OUSTR("x86_64"));
else if (token.equals(OUSTR(PLATFORM_LINUX_X86)))
ret = checkOSandCPU(OUSTR("Linux"), OUSTR("x86"));
else if (token.equals(OUSTR(PLATFORM_LINUX_X86_64)))
@@ -171,16 +179,28 @@ 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 if (token.equals(OUSTR(PLATFORM_DRAGONFLY_X86)))
+ ret = checkOSandCPU(OUSTR("DragonFly"), OUSTR("x86"));
+ else if (token.equals(OUSTR(PLATFORM_DRAGONFLY_X86_64)))
+ ret = checkOSandCPU(OUSTR("DragonFly"), OUSTR("X86_64"));
else
{
- OSL_ENSURE(0, "Extension Manager: The extension supports an unknown platform. "
- "Check the platform element in the descripion.xml");
+ OSL_FAIL("Extension Manager: The extension supports an unknown platform. "
+ "Check the platform element in the description.xml");
ret = false;
}
return ret;
@@ -230,3 +250,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 32587497e02e..a20f1b3c56d8 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.
@@ -45,7 +46,7 @@ namespace dp_misc {
namespace {
struct OfficeLocale :
- public rtl::StaticWithInit<const OUString, OfficeLocale> {
+ public rtl::StaticWithInit<OUString, OfficeLocale> {
const OUString operator () () {
OUString slang;
if (! (::utl::ConfigManager::GetDirectConfigProperty(
@@ -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 795a492aa0d5..fa3896aab8c4 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.
@@ -160,7 +161,7 @@ bool create_folder(
}
catch (CommandFailedException &) {
// Interaction Handler already handled the error
- // that has occured...
+ // that has occurred...
}
catch (Exception &) {
if (throw_exc)
@@ -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_update.cxx b/desktop/source/deployment/misc/dp_update.cxx
index fb6efe0b79aa..8aee216e44cc 100644
--- a/desktop/source/deployment/misc/dp_update.cxx
+++ b/desktop/source/deployment/misc/dp_update.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.
@@ -97,7 +98,7 @@ void getOwnUpdateInfos(
bool & out_allFound)
{
bool allHaveOwnUpdateInformation = true;
- for (UpdateInfoMap::iterator i = inout_map.begin(); i != inout_map.end(); i++)
+ for (UpdateInfoMap::iterator i = inout_map.begin(); i != inout_map.end(); ++i)
{
OSL_ASSERT(i->second.extension.is());
Sequence<OUString> urls(i->second.extension->getUpdateInformationURLs());
@@ -186,11 +187,9 @@ void getDefaultUpdateInfos(
bool containsBundledOnly(Sequence<Reference<deployment::XPackage> > const & sameIdExtensions)
{
OSL_ASSERT(sameIdExtensions.getLength() == 3);
- if (!sameIdExtensions[0].is() && !sameIdExtensions[1].is() && sameIdExtensions[2].is())
- return true;
- else
- return false;
+ return !sameIdExtensions[0].is() && !sameIdExtensions[1].is() && sameIdExtensions[2].is();
}
+
/** Returns true if the list of extensions are bundled extensions and there are no
other extensions with the same identifier in the shared or user repository.
If extensionList is NULL, then it is checked if there are only bundled extensions.
@@ -204,17 +203,12 @@ bool onlyBundledExtensions(
if (extensionList)
{
typedef std::vector<Reference<deployment::XPackage > >::const_iterator CIT;
- for (CIT i = extensionList->begin(); i != extensionList->end(); i++)
+ for (CIT i(extensionList->begin()), aEnd(extensionList->end()); onlyBundled && i != aEnd; ++i)
{
Sequence<Reference<deployment::XPackage> > seqExt = xExtMgr->getExtensionsWithSameIdentifier(
dp_misc::getIdentifier(*i), (*i)->getName(), Reference<ucb::XCommandEnvironment>());
- if (!containsBundledOnly(seqExt))
- {
- onlyBundled = false;
- break;
- }
-
+ onlyBundled = containsBundledOnly(seqExt);
}
}
else
@@ -222,13 +216,9 @@ bool onlyBundledExtensions(
const uno::Sequence< uno::Sequence< Reference<deployment::XPackage > > > seqAllExt =
xExtMgr->getAllExtensions(Reference<task::XAbortChannel>(), Reference<ucb::XCommandEnvironment>());
- for (int pos = seqAllExt.getLength(); pos --; )
+ for (int pos(0), nLen(seqAllExt.getLength()); onlyBundled && pos != nLen; ++pos)
{
- if (!containsBundledOnly(seqAllExt[pos]))
- {
- onlyBundled = false;
- break;
- }
+ onlyBundled = containsBundledOnly(seqAllExt[pos]);
}
}
return onlyBundled;
@@ -281,14 +271,6 @@ UPDATE_SOURCE isUpdateUserExtension(
retVal = UPDATE_SOURCE_ONLINE;
}
- //No update for bundled extensions, they are updated only by the setup
- //else if (bundledVersion.getLength())
- //{
- // int index = determineHighestVersion(
- // OUString(), OUString(), bundledVersion, onlineVersion);
- // if (index == 3)
- // retVal = UPDATE_SOURCE_ONLINE;
- //}
}
else
{
@@ -327,14 +309,6 @@ UPDATE_SOURCE isUpdateSharedExtension(
else if (index == 3)
retVal = UPDATE_SOURCE_ONLINE;
}
- //No update for bundled extensions, they are updated only by the setup
- //else if (bundledVersion.getLength())
- //{
- // int index = determineHighestVersion(
- // OUString(), OUString(), bundledVersion, onlineVersion);
- // if (index == 3)
- // retVal = UPDATE_SOURCE_ONLINE;
- //}
return retVal;
}
@@ -402,18 +376,20 @@ UpdateInfoMap getOnlineUpdateInfos(
UpdateInfoMap::value_type(
dp_misc::getIdentifier(extension), UpdateInfo(extension)));
OSL_ASSERT(insertRet.second == true);
+ (void)insertRet;
}
}
else
{
typedef std::vector<Reference<deployment::XPackage > >::const_iterator CIT;
- for (CIT i = extensionList->begin(); i != extensionList->end(); i++)
+ for (CIT i = extensionList->begin(); i != extensionList->end(); ++i)
{
OSL_ASSERT(i->is());
std::pair<UpdateInfoMap::iterator, bool> insertRet = infoMap.insert(
UpdateInfoMap::value_type(
dp_misc::getIdentifier(*i), UpdateInfo(*i)));
OSL_ASSERT(insertRet.second == true);
+ (void)insertRet;
}
}
@@ -445,3 +421,5 @@ OUString getHighestVersion(
return OUString();
}
} //namespace dp_misc
+
+/* 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 c0da0533b54c..5c563b7dafb7 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/misc/makefile.mk b/desktop/source/deployment/misc/makefile.mk
index 3e4bd68cb4c0..9c0b33d36698 100644..100755
--- a/desktop/source/deployment/misc/makefile.mk
+++ b/desktop/source/deployment/misc/makefile.mk
@@ -33,28 +33,18 @@ USE_DEFFILE = TRUE
ENABLE_EXCEPTIONS = TRUE
VISIBILITY_HIDDEN=TRUE
-.IF "$(GUI)"=="OS2"
-TARGET = deplmisc
-.ENDIF
-
.INCLUDE : settings.mk
# Reduction of exported symbols:
CDEFS += -DDESKTOP_DEPLOYMENTMISC_DLLIMPLEMENTATION
-.IF "$(SYSTEM_DB)" == "YES"
-CFLAGS+=-DSYSTEM_DB -I$(DB_INCLUDES)
-.ENDIF
+CFLAGS+= $(SYSTEM_DB_CFLAGS)
SRS1NAME = $(TARGET)
SRC1FILES = \
dp_misc.src
-.IF "$(GUI)"=="OS2"
-SHL1TARGET = $(TARGET)
-.ELSE
SHL1TARGET = deploymentmisc$(DLLPOSTFIX)
-.ENDIF
SHL1OBJS = \
$(SLO)$/dp_misc.obj \
$(SLO)$/dp_resource.obj \
@@ -78,14 +68,7 @@ SHL1STDLIBS = \
$(UNOTOOLSLIB) \
$(XMLSCRIPTLIB) \
$(COMPHELPERLIB)
-.IF "$(GUI)"=="OS2"
-SHL1IMPLIB = ideploymentmisc$(DLLPOSTFIX)
-LIB1TARGET = $(SLB)$/_deplmisc.lib
-LIB1OBJFILES = $(SHL1OBJS)
-DEFLIB1NAME = _deplmisc
-.ELSE
SHL1IMPLIB = i$(SHL1TARGET)
-.ENDIF
DEF1NAME = $(SHL1TARGET)
SLOFILES = $(SHL1OBJS)
diff --git a/desktop/source/deployment/registry/component/dp_compbackenddb.cxx b/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
index 458ece3d0bd8..749ec3896e16 100644
--- a/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
+++ b/desktop/source/deployment/registry/component/dp_compbackenddb.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.
@@ -157,3 +158,4 @@ ComponentBackendDb::Data ComponentBackendDb::getEntry(::rtl::OUString const & ur
} // namespace backend
} // namespace dp_registry
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/component/dp_compbackenddb.hxx b/desktop/source/deployment/registry/component/dp_compbackenddb.hxx
index b9a5ed737b7c..2e0e39eea29c 100644
--- a/desktop/source/deployment/registry/component/dp_compbackenddb.hxx
+++ b/desktop/source/deployment/registry/component/dp_compbackenddb.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.
@@ -118,3 +119,4 @@ public:
}
#endif
+/* 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 0035b67d8ef7..6bf37364803f 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.
@@ -54,7 +55,7 @@
#include "com/sun/star/ucb/NameClash.hpp"
#include "com/sun/star/util/XMacroExpander.hpp"
#include <list>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <vector>
#include <memory>
#include <algorithm>
@@ -218,6 +219,42 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
};
friend class TypelibraryPackageImpl;
+ /** Serves for unregistering packages that were registered on a
+ different platform. This can happen if one has remotely mounted
+ /home, for example.
+ */
+ class OtherPlatformPackageImpl : public ::dp_registry::backend::Package
+ {
+ public:
+ OtherPlatformPackageImpl(
+ ::rtl::Reference<PackageRegistryBackend> const & myBackend,
+ OUString const & url, OUString const & name,
+ Reference<deployment::XPackageTypeInfo> const & xPackageType,
+ bool bRemoved, OUString const & identifier, OUString const& rPlatform);
+
+ private:
+ BackendImpl * getMyBackend() const;
+
+ const Reference<registry::XSimpleRegistry> impl_openRDB() const;
+ const Reference<XInterface> impl_createInstance(OUString const& rService) const;
+
+ // Package
+ virtual beans::Optional< beans::Ambiguous<sal_Bool> > isRegistered_(
+ ::osl::ResettableMutexGuard & guard,
+ ::rtl::Reference<AbortChannel> const & abortChannel,
+ Reference<XCommandEnvironment> const & xCmdEnv );
+ virtual void processPackage_(
+ ::osl::ResettableMutexGuard & guard,
+ bool registerPackage,
+ bool startup,
+ ::rtl::Reference<AbortChannel> const & abortChannel,
+ Reference<XCommandEnvironment> const & xCmdEnv );
+
+ private:
+ OUString const m_aPlatform;
+ };
+ friend class OtherPlatformPackageImpl;
+
t_stringlist m_jar_typelibs;
t_stringlist m_rdb_typelibs;
t_stringlist m_components;
@@ -240,7 +277,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
bool m_unorc_modified;
bool bSwitchedRdbFiles;
- typedef ::std::hash_map< OUString, Reference<XInterface>,
+ typedef ::boost::unordered_map< OUString, Reference<XInterface>,
::rtl::OUStringHash > t_string2object;
t_string2object m_backendObjects;
@@ -411,7 +448,6 @@ BackendImpl * BackendImpl::ComponentPackageImpl::getMyBackend() const
//______________________________________________________________________________
void BackendImpl::ComponentPackageImpl::disposing()
{
-// m_xRemoteContext.clear();
Package::disposing();
}
@@ -512,7 +548,6 @@ void BackendImpl::initServiceRdbFiles()
m_xComponentContext ), UNO_QUERY_THROW );
m_xCommonRDB->open(
makeURL( expandUnoRcUrl(getCachePath()), m_commonRDB ),
-// m_readOnly, !m_readOnly );
false, true);
}
if (m_nativeRDB.getLength() > 0) {
@@ -523,7 +558,6 @@ void BackendImpl::initServiceRdbFiles()
m_xComponentContext ), UNO_QUERY_THROW );
m_xNativeRDB->open(
makeURL( expandUnoRcUrl(getCachePath()), m_nativeRDB ),
-// m_readOnly, !m_readOnly );
false, true);
}
}
@@ -574,16 +608,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;"
@@ -591,30 +623,27 @@ BackendImpl::BackendImpl(
OUSTR("*.py"),
getResourceString(
RID_STR_PYTHON_COMPONENT),
- RID_IMG_COMPONENT,
- RID_IMG_COMPONENT_HC ) ),
+ RID_IMG_COMPONENT ) ),
m_xComponentsTypeInfo( new Package::TypeInfo(
OUSTR("application/"
"vnd.sun.star.uno-components"),
OUSTR("*.components"),
getResourceString(RID_STR_COMPONENTS),
- RID_IMG_COMPONENT,
- RID_IMG_COMPONENT_HC ) ),
+ RID_IMG_COMPONENT ) ),
m_xRDBTypelibTypeInfo( new Package::TypeInfo(
OUSTR("application/"
"vnd.sun.star.uno-typelibrary;"
"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;"
"type=Java"),
OUSTR("*.jar"),
getResourceString(RID_STR_JAVA_TYPELIB),
- RID_IMG_JAVA_TYPELIB,
- RID_IMG_JAVA_TYPELIB_HC ) ),
+ RID_IMG_JAVA_TYPELIB ) ),
m_typeInfos( 6 )
{
m_typeInfos[ 0 ] = m_xDynComponentTypeInfo;
@@ -768,16 +797,30 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
INetContentTypeParameter const * param = params.find(
ByteString("platform") );
- if (param == 0 || platform_fits( param->m_sValue )) {
+ bool bPlatformFits(param == 0);
+ String aPlatform;
+ if (!bPlatformFits) // platform is specified, we have to check
+ {
+ aPlatform = param->m_sValue;
+ bPlatformFits = platform_fits(aPlatform);
+ }
+ // If the package is being removed, do not care whether
+ // platform fits. We won't be using it anyway.
+ if (bPlatformFits || bRemoved) {
param = params.find( ByteString("type") );
if (param != 0)
{
String const & value = param->m_sValue;
if (value.EqualsIgnoreCaseAscii("native")) {
- return new BackendImpl::ComponentPackageImpl(
- this, url, name, m_xDynComponentTypeInfo,
- OUSTR("com.sun.star.loader.SharedLibrary"),
- bRemoved, identifier);
+ if (bPlatformFits)
+ return new BackendImpl::ComponentPackageImpl(
+ this, url, name, m_xDynComponentTypeInfo,
+ OUSTR("com.sun.star.loader.SharedLibrary"),
+ bRemoved, identifier);
+ else
+ return new BackendImpl::OtherPlatformPackageImpl(
+ this, url, name, m_xDynComponentTypeInfo,
+ bRemoved, identifier, aPlatform);
}
if (value.EqualsIgnoreCaseAscii("Java")) {
return new BackendImpl::ComponentPackageImpl(
@@ -833,7 +876,6 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
static_cast<sal_Int16>(-1) );
}
-//##############################################################################
//______________________________________________________________________________
void BackendImpl::unorc_verify_init(
@@ -1609,7 +1651,6 @@ void BackendImpl::ComponentPackageImpl::processPackage_(
}
}
-//##############################################################################
BackendImpl::TypelibraryPackageImpl::TypelibraryPackageImpl(
::rtl::Reference<PackageRegistryBackend> const & myBackend,
OUString const & url, OUString const & name,
@@ -1740,6 +1781,110 @@ void BackendImpl::TypelibraryPackageImpl::processPackage_(
}
}
+BackendImpl::OtherPlatformPackageImpl::OtherPlatformPackageImpl(
+ ::rtl::Reference<PackageRegistryBackend> const & myBackend,
+ OUString const & url, OUString const & name,
+ Reference<deployment::XPackageTypeInfo> const & xPackageType,
+ bool bRemoved, OUString const & identifier, OUString const& rPlatform)
+ : Package(myBackend, url, name, name, xPackageType, bRemoved, identifier)
+ , m_aPlatform(rPlatform)
+{
+ OSL_PRECOND(bRemoved, "this class can only be used for removing packages!");
+}
+
+BackendImpl *
+BackendImpl::OtherPlatformPackageImpl::getMyBackend() const
+{
+ BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
+ if (NULL == pBackend)
+ {
+ //Throws a DisposedException
+ check();
+ //We should never get here...
+ throw RuntimeException(
+ OUSTR("Failed to get the BackendImpl"),
+ static_cast<OWeakObject*>(const_cast<OtherPlatformPackageImpl*>(this)));
+ }
+ return pBackend;
+}
+
+Reference<registry::XSimpleRegistry> const
+BackendImpl::OtherPlatformPackageImpl::impl_openRDB() const
+{
+ OUString const aRDB(m_aPlatform + OUString(RTL_CONSTASCII_USTRINGPARAM(".rdb")));
+ OUString const aRDBPath(makeURL(getMyBackend()->getCachePath(), aRDB));
+
+ Reference<registry::XSimpleRegistry> xRegistry;
+
+ try
+ {
+ xRegistry.set(
+ impl_createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.SimpleRegistry"))),
+ UNO_QUERY)
+ ;
+ if (xRegistry.is())
+ xRegistry->open(expandUnoRcUrl(aRDBPath), false, false);
+ }
+ catch (registry::InvalidRegistryException const&)
+ {
+ // If the registry does not exist, we do not need to bother at all
+ xRegistry.set(0);
+ }
+
+ OSL_POSTCOND(xRegistry.is(), "could not create registry for the package's platform");
+ return xRegistry;
+}
+
+Reference<XInterface> const
+BackendImpl::OtherPlatformPackageImpl::impl_createInstance(OUString const& rService)
+const
+{
+ Reference<XComponentContext> const xContext(getMyBackend()->getComponentContext());
+ OSL_ASSERT(xContext.is());
+ Reference<XInterface> xService;
+ if (xContext.is())
+ xService.set(xContext->getServiceManager()->createInstanceWithContext(rService, xContext));
+ return xService;
+}
+
+beans::Optional<beans::Ambiguous<sal_Bool> >
+BackendImpl::OtherPlatformPackageImpl::isRegistered_(
+ ::osl::ResettableMutexGuard& /* guard */,
+ ::rtl::Reference<AbortChannel> const& /* abortChannel */,
+ Reference<XCommandEnvironment> const& /* xCmdEnv */ )
+{
+ return beans::Optional<beans::Ambiguous<sal_Bool> >(sal_True,
+ beans::Ambiguous<sal_Bool>(sal_True, sal_False));
+}
+
+void
+BackendImpl::OtherPlatformPackageImpl::processPackage_(
+ ::osl::ResettableMutexGuard& /* guard */,
+ bool bRegisterPackage,
+ bool /* bStartup */,
+ ::rtl::Reference<AbortChannel> const& /* abortChannel */,
+ Reference<XCommandEnvironment> const& /* xCmdEnv */)
+{
+ OSL_PRECOND(!bRegisterPackage, "this class can only be used for removing packages!");
+ (void) bRegisterPackage;
+
+ OUString const aURL(getURL());
+
+ Reference<registry::XSimpleRegistry> const xServicesRDB(impl_openRDB());
+ Reference<registry::XImplementationRegistration> const xImplReg(
+ impl_createInstance(
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.registry.ImplementationRegistration"))),
+ UNO_QUERY)
+ ;
+ if (xImplReg.is() && xServicesRDB.is())
+ xImplReg->revokeImplementation(aURL, xServicesRDB);
+ if (xServicesRDB.is())
+ xServicesRDB->close();
+
+ getMyBackend()->revokeEntryFromDb(aURL);
+}
+
BackendImpl * BackendImpl::ComponentsPackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
@@ -1851,3 +1996,4 @@ extern sdecl::ServiceDecl const serviceDecl(
} // namespace dp_registry
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/component/dp_component.hrc b/desktop/source/deployment/registry/component/dp_component.hrc
index 4a8c4184a994..4a8c4184a994 100644..100755
--- a/desktop/source/deployment/registry/component/dp_component.hrc
+++ b/desktop/source/deployment/registry/component/dp_component.hrc
diff --git a/desktop/source/deployment/registry/component/makefile.mk b/desktop/source/deployment/registry/component/makefile.mk
index b7ee5c203cd5..b7ee5c203cd5 100644..100755
--- a/desktop/source/deployment/registry/component/makefile.mk
+++ b/desktop/source/deployment/registry/component/makefile.mk
diff --git a/desktop/source/deployment/registry/configuration/dp_configuration.cxx b/desktop/source/deployment/registry/configuration/dp_configuration.cxx
index 24e5587cd0cc..bcf44d359b23 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.
@@ -144,7 +145,6 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
void addDataToDb(OUString const & url, ConfigurationBackendDb::Data const & data);
::boost::optional<ConfigurationBackendDb::Data> readDataFromDb(OUString const & url);
void revokeEntryFromDb(OUString const & url);
- ::std::list<OUString> getAllIniEntries();
bool hasActiveEntry(OUString const & url);
bool activateEntry(OUString const & url);
@@ -193,13 +193,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;
@@ -255,14 +255,6 @@ void BackendImpl::revokeEntryFromDb(OUString const & url)
m_backendDb->revokeEntry(url);
}
-::std::list<OUString> BackendImpl::getAllIniEntries()
-{
- if (m_backendDb.get())
- return m_backendDb->getAllIniEntries();
- else
- return ::std::list<OUString>();
-}
-
bool BackendImpl::hasActiveEntry(OUString const & url)
{
if (m_backendDb.get())
@@ -363,7 +355,6 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
static_cast<sal_Int16>(-1) );
}
-//##############################################################################
//______________________________________________________________________________
void BackendImpl::configmgrini_verify_init(
@@ -527,7 +518,6 @@ bool BackendImpl::removeFromConfigmgrIni(
return true;
}
-//##############################################################################
// Package
//______________________________________________________________________________
@@ -819,3 +809,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/configuration/dp_configuration.hrc b/desktop/source/deployment/registry/configuration/dp_configuration.hrc
index 01e1905228b3..01e1905228b3 100644..100755
--- a/desktop/source/deployment/registry/configuration/dp_configuration.hrc
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.hrc
diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
index 2437c54ec734..bfb1ed9df70e 100644
--- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
+++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.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.
@@ -173,14 +174,8 @@ ConfigurationBackendDb::getEntry(::rtl::OUString const & url)
}
}
-::std::list<OUString> ConfigurationBackendDb::getAllIniEntries()
-{
- return getOneChildFromAllEntries(OUSTR("ini-entry"));
-}
-
-
-
} // namespace configuration
} // namespace backend
} // namespace dp_registry
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx
index 7023897bd8de..00a5515b3780 100644
--- a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx
+++ b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.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.
@@ -81,7 +82,6 @@ public:
::boost::optional<Data> getEntry(::rtl::OUString const & url);
::std::list< ::rtl::OUString> getAllDataUrls();
- ::std::list< ::rtl::OUString> getAllIniEntries();
};
@@ -91,3 +91,4 @@ public:
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/configuration/makefile.mk b/desktop/source/deployment/registry/configuration/makefile.mk
index 9bcbd50d4230..1fb637ef8e3a 100644..100755
--- a/desktop/source/deployment/registry/configuration/makefile.mk
+++ b/desktop/source/deployment/registry/configuration/makefile.mk
@@ -35,9 +35,7 @@ INCPRE += ..$/..$/inc
.INCLUDE : settings.mk
-.IF "$(SYSTEM_DB)" == "YES"
-CFLAGS+=-DSYSTEM_DB -I$(DB_INCLUDES)
-.ENDIF
+CFLAGS+= $(SYSTEM_DB_CFLAGS)
SRS1NAME = $(TARGET)
SRC1FILES = \
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index 32413f3d11ba..cbb0bf53abad 100644
--- 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.
@@ -125,7 +126,7 @@ void PackageRegistryBackend::check()
void PackageRegistryBackend::disposing()
{
try {
- for ( t_string2ref::const_iterator i = m_bound.begin(); i != m_bound.end(); i++)
+ for ( t_string2ref::const_iterator i = m_bound.begin(); i != m_bound.end(); ++i)
i->second->removeEventListener(this);
m_bound.clear();
m_xComponentContext.clear();
@@ -279,10 +280,8 @@ void PackageRegistryBackend::deleteUnusedFolders(
// get all temp directories:
::std::vector<OUString> tempEntries;
- char tmp[] = ".tmp";
+ const char tmp[] = ".tmp";
- //Check for ".tmp_" can be removed after OOo 4.0
- char tmp_[] = ".tmp_";
while (xResultSet->next())
{
OUString title(
@@ -290,8 +289,7 @@ void PackageRegistryBackend::deleteUnusedFolders(
xResultSet, UNO_QUERY_THROW )->getString(
1 /* Title */ ) );
- if (title.endsWithAsciiL(tmp, sizeof(tmp) - 1)
- || title.endsWithAsciiL(tmp_, sizeof(tmp_) - 1))
+ if (title.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM(tmp)))
tempEntries.push_back(
makeURLAppendSysPathSegment(sDataFolder, title));
}
@@ -315,7 +313,6 @@ void PackageRegistryBackend::deleteUnusedFolders(
}
-//##############################################################################
//______________________________________________________________________________
Package::~Package()
@@ -639,7 +636,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 );
}
}
@@ -681,7 +678,7 @@ void Package::processPackage_impl(
}
}
catch (RuntimeException &) {
- OSL_ENSURE( 0, "### unexpected RuntimeException!" );
+ OSL_FAIL( "### unexpected RuntimeException!" );
throw;
}
catch (CommandFailedException &) {
@@ -774,7 +771,6 @@ sal_Bool Package::isRemoved()
return m_bRemoved;
}
-//##############################################################################
//______________________________________________________________________________
Package::TypeInfo::~TypeInfo()
@@ -809,15 +805,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_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx
index 44e11efdef0e..5054564eae25 100755..100644
--- a/desktop/source/deployment/registry/dp_backenddb.cxx
+++ b/desktop/source/deployment/registry/dp_backenddb.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.
@@ -428,7 +429,7 @@ void BackendDb::writeSimpleList(
listNode, css::uno::UNO_QUERY_THROW));
typedef ::std::list<OUString>::const_iterator ITC_ITEMS;
- for (ITC_ITEMS i = list.begin(); i != list.end(); i++)
+ for (ITC_ITEMS i = list.begin(); i != list.end(); ++i)
{
const Reference<css::xml::dom::XNode> memberNode(
doc->createElementNS(sNameSpace, sPrefix + sMemberTagName), css::uno::UNO_QUERY_THROW);
@@ -636,13 +637,10 @@ OUString BackendDb::readSimpleElement(
}
-
-//================================================================================
RegisteredDb::RegisteredDb(
Reference<XComponentContext> const & xContext,
::rtl::OUString const & url):BackendDb(xContext, url)
{
-
}
void RegisteredDb::addEntry(::rtl::OUString const & url)
@@ -698,14 +696,10 @@ bool RegisteredDb::getEntry(::rtl::OUString const & url)
Reference<css::xml::dom::XNode> root = doc->getFirstChild();
Reference<css::xml::xpath::XXPathAPI> xpathApi = getXPathAPI();
- //find the extension element that is to be removed
Reference<css::xml::dom::XNode> aNode =
xpathApi->selectSingleNode(root, sExpression);
- if (!aNode.is())
- {
- return false;
- }
- return true;
+
+ return aNode.is();
}
catch(css::uno::Exception &)
{
@@ -716,7 +710,7 @@ bool RegisteredDb::getEntry(::rtl::OUString const & url)
}
}
-
} // namespace backend
} // namespace dp_registry
+/* 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 eecae4e391b7..9e799dd2d559 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.
@@ -49,9 +50,9 @@
#include "com/sun/star/util/XUpdatable.hpp"
#include "com/sun/star/container/XContentEnumerationAccess.hpp"
#include "com/sun/star/deployment/PackageRegistryBackend.hpp"
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <set>
-#include <hash_set>
+#include <boost/unordered_set.hpp>
#include <memory>
using namespace ::dp_misc;
@@ -90,10 +91,10 @@ class PackageRegistryImpl : private MutexHolder, public t_helper
return str1.equalsIgnoreAsciiCase( str2 );
}
};
- typedef ::std::hash_map<
+ typedef ::boost::unordered_map<
OUString, Reference<deployment::XPackageRegistry>,
ci_string_hash, ci_string_equals > t_string2registry;
- typedef ::std::hash_map<
+ typedef ::boost::unordered_map<
OUString, OUString,
ci_string_hash, ci_string_equals > t_string2string;
typedef ::std::set<
@@ -207,7 +208,7 @@ void PackageRegistryImpl::insertBackend(
Reference<deployment::XPackageRegistry> const & xBackend )
{
m_allBackends.insert( xBackend );
- typedef ::std::hash_set<OUString, ::rtl::OUStringHash> t_stringset;
+ typedef ::boost::unordered_set<OUString, ::rtl::OUStringHash> t_stringset;
t_stringset ambiguousFilters;
const Sequence< Reference<deployment::XPackageTypeInfo> > packageTypes(
@@ -296,7 +297,7 @@ void PackageRegistryImpl::insertBackend(
xBackend, UNO_QUERY_THROW )->
getImplementationName() );
buf.appendAscii( RTL_CONSTASCII_STRINGPARAM("\"!") );
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
buf.makeStringAndClear(),
RTL_TEXTENCODING_UTF8 ) );
}
@@ -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 5ec739153831..3579695ce81a 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.
@@ -84,7 +85,7 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
};
friend class ExecutablePackageImpl;
- typedef ::std::hash_map< OUString, Reference<XInterface>,
+ typedef ::boost::unordered_map< OUString, Reference<XInterface>,
::rtl::OUStringHash > t_string2object;
// PackageRegistryBackend
@@ -121,8 +122,7 @@ BackendImpl::BackendImpl(
OUSTR("application/vnd.sun.star.executable"),
OUSTR(""),
OUSTR("Executable"),
- RID_IMG_COMPONENT,
- RID_IMG_COMPONENT_HC ) )
+ RID_IMG_COMPONENT ) )
{
if (!transientMode())
{
@@ -204,7 +204,6 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
return Reference<deployment::XPackage>();
}
-//##############################################################################
// Package
@@ -326,7 +325,6 @@ bool BackendImpl::ExecutablePackageImpl::getFileAttributes(sal_uInt64& out_Attri
return bSuccess;
}
-//##############################################################################
} // anon namespace
@@ -343,3 +341,4 @@ extern sdecl::ServiceDecl const serviceDecl(
} // namespace dp_registry
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx b/desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx
index ff1044910985..0c65a9bf4d2c 100644
--- a/desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx
+++ b/desktop/source/deployment/registry/executable/dp_executablebackenddb.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.
@@ -79,3 +80,4 @@ OUString ExecutableBackendDb::getKeyElementName()
} // namespace backend
} // namespace dp_registry
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/executable/dp_executablebackenddb.hxx b/desktop/source/deployment/registry/executable/dp_executablebackenddb.hxx
index 80cd33771a34..1a5828015260 100644
--- a/desktop/source/deployment/registry/executable/dp_executablebackenddb.hxx
+++ b/desktop/source/deployment/registry/executable/dp_executablebackenddb.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.
@@ -74,3 +75,4 @@ public:
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/executable/makefile.mk b/desktop/source/deployment/registry/executable/makefile.mk
index 81b2baa44e5d..81b2baa44e5d 100644..100755
--- a/desktop/source/deployment/registry/executable/makefile.mk
+++ b/desktop/source/deployment/registry/executable/makefile.mk
diff --git a/desktop/source/deployment/registry/help/dp_help.cxx b/desktop/source/deployment/registry/help/dp_help.cxx
index 025cbd36cf7d..02bffa948e03 100644
--- a/desktop/source/deployment/registry/help/dp_help.cxx
+++ b/desktop/source/deployment/registry/help/dp_help.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,8 +67,6 @@ class BackendImpl : public ::dp_registry::backend::PackageRegistryBackend
{
BackendImpl * getMyBackend() const;
-// HelpBackendDb::Data m_dbData;
-
// Package
virtual beans::Optional< beans::Ambiguous<sal_Bool> > isRegistered_(
::osl::ResettableMutexGuard & guard,
@@ -142,7 +141,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;
@@ -257,7 +256,6 @@ bool BackendImpl::activateEntry(OUString const & url)
}
-//##############################################################################
BackendImpl::PackageImpl::PackageImpl(
::rtl::Reference<PackageRegistryBackend> const & myBackend,
OUString const & url, OUString const & name,
@@ -301,7 +299,7 @@ bool BackendImpl::PackageImpl::extensionContainsCompiledHelp()
while ((errorNext = helpFolder.getNextItem(item)) == ::osl::File::E_None)
{
//No find the language folders
- ::osl::FileStatus stat(FileStatusMask_Type | FileStatusMask_FileName |FileStatusMask_FileURL);
+ ::osl::FileStatus stat(osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileName |osl_FileStatus_Mask_FileURL);
if (item.getFileStatus(stat) == ::osl::File::E_None)
{
if (stat.getFileType() != ::osl::FileStatus::Directory)
@@ -383,12 +381,8 @@ beans::Optional< OUString > BackendImpl::PackageImpl::getRegistrationDataURL()
return beans::Optional<OUString>(true, OUString());
}
-
-//##############################################################################
-
-static rtl::OUString aSlash( rtl::OUString::createFromAscii( "/" ) );
-static rtl::OUString aHelpStr( rtl::OUString::createFromAscii( "help" ) );
-
+static rtl::OUString aSlash(RTL_CONSTASCII_USTRINGPARAM("/"));
+static rtl::OUString aHelpStr(RTL_CONSTASCII_USTRINGPARAM("help"));
void BackendImpl::implProcessHelp(
PackageImpl * package, bool doRegisterPackage,
@@ -415,7 +409,7 @@ void BackendImpl::implProcessHelp(
if( !xSFA->isFolder( aExpandedHelpURL ) )
{
rtl::OUString aErrStr = getResourceString( RID_STR_HELPPROCESSING_GENERAL_ERROR );
- aErrStr += rtl::OUString::createFromAscii( "No help folder" );
+ aErrStr += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "No help folder" ));
OWeakObject* oWeakThis = static_cast<OWeakObject *>(this);
throw deployment::DeploymentException( rtl::OUString(), oWeakThis,
makeAny( uno::Exception( aErrStr, oWeakThis ) ) );
@@ -428,8 +422,9 @@ void BackendImpl::implProcessHelp(
try
{
xInvocation = Reference< script::XInvocation >(
- xContext->getServiceManager()->createInstanceWithContext( rtl::OUString::createFromAscii(
- "com.sun.star.help.HelpIndexer" ), xContext ) , UNO_QUERY );
+ xContext->getServiceManager()->createInstanceWithContext(
+ rtl::OUString(
+ RTL_CONSTASCII_USTRINGPARAM("com.sun.star.help.HelpIndexer" )), xContext ) , UNO_QUERY );
}
catch (Exception &)
{
@@ -472,9 +467,9 @@ void BackendImpl::implProcessHelp(
aJarFile, rtl_UriCharClassPchar,
rtl_UriEncodeIgnoreEscapes,
RTL_TEXTENCODING_UTF8 );
- rtl::OUString aDestBasePath = rtl::OUString::createFromAscii( "vnd.sun.star.zip://" );
+ rtl::OUString aDestBasePath = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.zip://" ));
aDestBasePath += aEncodedJarFilePath;
- aDestBasePath += rtl::OUString::createFromAscii( "/" );
+ aDestBasePath += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ));
sal_Int32 nLenLangFolderURL = aLangURL.getLength() + 1;
@@ -520,20 +515,20 @@ void BackendImpl::implProcessHelp(
{
Sequence<uno::Any> aParamsSeq( 6 );
- aParamsSeq[0] = uno::makeAny( rtl::OUString::createFromAscii( "-lang" ) );
+ aParamsSeq[0] = uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "-lang" ) ));
rtl::OUString aLang;
sal_Int32 nLastSlash = aLangURL.lastIndexOf( '/' );
if( nLastSlash != -1 )
aLang = aLangURL.copy( nLastSlash + 1 );
else
- aLang = rtl::OUString::createFromAscii( "en" );
+ aLang = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "en" ));
aParamsSeq[1] = uno::makeAny( aLang );
- aParamsSeq[2] = uno::makeAny( rtl::OUString::createFromAscii( "-mod" ) );
- aParamsSeq[3] = uno::makeAny( rtl::OUString::createFromAscii( "help" ) );
+ aParamsSeq[2] = uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "-mod" ) ));
+ aParamsSeq[3] = uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "help" ) ));
- aParamsSeq[4] = uno::makeAny( rtl::OUString::createFromAscii( "-zipdir" ) );
+ aParamsSeq[4] = uno::makeAny( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "-zipdir" ) ));
rtl::OUString aSystemPath;
osl::FileBase::getSystemPathFromFileURL(
langFolderDestExpanded, aSystemPath );
@@ -541,7 +536,7 @@ void BackendImpl::implProcessHelp(
Sequence< sal_Int16 > aOutParamIndex;
Sequence< uno::Any > aOutParam;
- uno::Any aRet = xInvocation->invoke( rtl::OUString::createFromAscii( "createIndex" ),
+ uno::Any aRet = xInvocation->invoke( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "createIndex" )),
aParamsSeq, aOutParamIndex, aOutParam );
}
@@ -581,14 +576,14 @@ void BackendImpl::implProcessHelp(
aErrStr += aErrMsg;
if( nErrStrId == RID_STR_HELPPROCESSING_XMLPARSING_ERROR && aErrorInfo.m_aXMLParsingFile.getLength() )
{
- aErrStr += rtl::OUString::createFromAscii( " in " );
+ aErrStr += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " in " ));
rtl::OUString aDecodedFile = rtl::Uri::decode( aErrorInfo.m_aXMLParsingFile,
rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
aErrStr += aDecodedFile;
if( aErrorInfo.m_nXMLParsingLine != -1 )
{
- aErrStr += rtl::OUString::createFromAscii( ", line " );
+ aErrStr += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( ", line " ));
aErrStr += ::rtl::OUString::valueOf( aErrorInfo.m_nXMLParsingLine );
}
}
@@ -612,7 +607,6 @@ void BackendImpl::implProcessHelp(
}
}
-
void BackendImpl::implCollectXhpFiles( const rtl::OUString& aDir,
std::vector< rtl::OUString >& o_rXhpFileVector )
{
@@ -635,7 +629,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 );
}
}
@@ -651,15 +645,15 @@ Reference< ucb::XSimpleFileAccess > BackendImpl::getFileAccess( void )
{
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 +673,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/help/dp_help.hrc b/desktop/source/deployment/registry/help/dp_help.hrc
index c1e10547ccdd..c1e10547ccdd 100644..100755
--- a/desktop/source/deployment/registry/help/dp_help.hrc
+++ b/desktop/source/deployment/registry/help/dp_help.hrc
diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
index 81057f744640..491f6d6c1db9 100644
--- a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
+++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.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.
@@ -138,41 +139,11 @@ HelpBackendDb::getEntry(::rtl::OUString const & url)
::std::list<OUString> HelpBackendDb::getAllDataUrls()
{
- try
- {
- ::std::list<OUString> listRet;
- Reference<css::xml::dom::XDocument> doc = getDocument();
- Reference<css::xml::dom::XNode> root = doc->getFirstChild();
-
- Reference<css::xml::xpath::XXPathAPI> xpathApi = getXPathAPI();
- const OUString sPrefix = getNSPrefix();
- OUString sExpression(
- sPrefix + OUSTR(":help/") + sPrefix + OUSTR(":data-url/text()"));
- Reference<css::xml::dom::XNodeList> nodes =
- xpathApi->selectNodeList(root, sExpression);
- if (nodes.is())
- {
- sal_Int32 length = nodes->getLength();
- for (sal_Int32 i = 0; i < length; i++)
- listRet.push_back(nodes->item(i)->getNodeValue());
- }
- return listRet;
- }
- catch (css::deployment::DeploymentException& )
- {
- throw;
- }
- catch(css::uno::Exception &)
- {
- Any exc( ::cppu::getCaughtException() );
- throw css::deployment::DeploymentException(
- OUSTR("Extension Manager: failed to read data entry in help backend db: ") +
- m_urlDb, 0, exc);
- }
+ return getOneChildFromAllEntries(OUString(RTL_CONSTASCII_USTRINGPARAM("data-url")));
}
-
} // namespace help
} // namespace backend
} // namespace dp_registry
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx
index bcff008c00ae..34e732d4118d 100644
--- a/desktop/source/deployment/registry/help/dp_helpbackenddb.hxx
+++ b/desktop/source/deployment/registry/help/dp_helpbackenddb.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,4 @@ public:
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/help/makefile.mk b/desktop/source/deployment/registry/help/makefile.mk
index d4934f71a46f..81778bf728c0 100644..100755
--- a/desktop/source/deployment/registry/help/makefile.mk
+++ b/desktop/source/deployment/registry/help/makefile.mk
@@ -35,9 +35,7 @@ INCPRE += ..$/..$/inc
.INCLUDE : settings.mk
-.IF "$(SYSTEM_DB)" == "YES"
-CFLAGS+=-DSYSTEM_DB -I$(DB_INCLUDES)
-.ENDIF
+CFLAGS+= $(SYSTEM_DB_CFLAGS)
SRS1NAME = $(TARGET)
SRC1FILES = \
diff --git a/desktop/source/deployment/registry/inc/dp_backend.h b/desktop/source/deployment/registry/inc/dp_backend.h
index 80aec2402a59..847eb43d5cb2 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.
@@ -42,7 +43,7 @@
#include "com/sun/star/deployment/XPackageManager.hpp"
#include "com/sun/star/deployment/InvalidRemovedParameterException.hpp"
#include <memory>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include <list>
#include "dp_registry.hrc"
@@ -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()
@@ -286,7 +286,7 @@ class PackageRegistryBackend
// XPackageManager::getDeployedPackages is called often. This results in a lot
//of bindPackage calls which are costly. Therefore we keep hard references in
//the map now.
- typedef ::std::hash_map<
+ typedef ::boost::unordered_map<
::rtl::OUString, css::uno::Reference<css::deployment::XPackage>,
::rtl::OUStringHash > t_string2ref;
t_string2ref m_bound;
@@ -398,3 +398,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/inc/dp_backenddb.hxx b/desktop/source/deployment/registry/inc/dp_backenddb.hxx
index 299a6ec328ce..063da7bae1c4 100644
--- a/desktop/source/deployment/registry/inc/dp_backenddb.hxx
+++ b/desktop/source/deployment/registry/inc/dp_backenddb.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.
@@ -139,8 +140,6 @@ protected:
*/
virtual ::rtl::OUString getKeyElementName()=0;
-
-
public:
BackendDb(css::uno::Reference<css::uno::XComponentContext> const & xContext,
::rtl::OUString const & url);
@@ -175,8 +174,8 @@ public:
};
-
}
}
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/inc/dp_registry.hrc b/desktop/source/deployment/registry/inc/dp_registry.hrc
index 4a3b1d0b1a4a..4a3b1d0b1a4a 100644..100755
--- a/desktop/source/deployment/registry/inc/dp_registry.hrc
+++ b/desktop/source/deployment/registry/inc/dp_registry.hrc
diff --git a/desktop/source/deployment/registry/makefile.mk b/desktop/source/deployment/registry/makefile.mk
index e45cec272ca7..e45cec272ca7 100644..100755
--- a/desktop/source/deployment/registry/makefile.mk
+++ b/desktop/source/deployment/registry/makefile.mk
diff --git a/desktop/source/deployment/registry/package/dp_extbackenddb.cxx b/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
index 660d6bb374c3..5331f612c383 100644
--- a/desktop/source/deployment/registry/package/dp_extbackenddb.cxx
+++ b/desktop/source/deployment/registry/package/dp_extbackenddb.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,7 +29,6 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_desktop.hxx"
-#include "rtl/string.h"
#include "rtl/bootstrap.hxx"
#include "cppuhelper/exc_hlp.hxx"
#include "com/sun/star/uno/XComponentContext.hpp"
@@ -137,3 +137,4 @@ ExtensionBackendDb::Data ExtensionBackendDb::getEntry(::rtl::OUString const & ur
} // namespace backend
} // namespace dp_registry
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/package/dp_extbackenddb.hxx b/desktop/source/deployment/registry/package/dp_extbackenddb.hxx
index d09fd0891a32..e94c846887c3 100644
--- a/desktop/source/deployment/registry/package/dp_extbackenddb.hxx
+++ b/desktop/source/deployment/registry/package/dp_extbackenddb.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.
@@ -25,13 +26,14 @@
*
************************************************************************/
-
#if ! defined INCLUDED_DP_EXTBACKENDDB_HXX
#define INCLUDED_DP_EXTBACKENDDB_HXX
-#include "rtl/ustring.hxx"
-#include "rtl/string.hxx"
+#include <utility>
#include <vector>
+
+#include "rtl/ustring.hxx"
+
#include "dp_backenddb.hxx"
namespace css = ::com::sun::star;
@@ -73,11 +75,9 @@ public:
::std::vector< ::std::pair< ::rtl::OUString, ::rtl::OUString> > items;
typedef ::std::vector<
::std::pair< ::rtl::OUString, ::rtl::OUString> >::const_iterator ITC_ITEMS;
-
};
public:
-
ExtensionBackendDb( css::uno::Reference<css::uno::XComponentContext> const & xContext,
::rtl::OUString const & url);
@@ -87,10 +87,9 @@ 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 d247597a808f..f28269411703 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,15 +307,13 @@ 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"),
OUSTR("*.zip"),
m_xBundleTypeInfo->getShortDescription(),
- RID_IMG_DEF_PACKAGE_BUNDLE,
- RID_IMG_DEF_PACKAGE_BUNDLE_HC ) ),
+ RID_IMG_DEF_PACKAGE_BUNDLE ) ),
m_typeInfos(2)
{
m_typeInfos[ 0 ] = m_xBundleTypeInfo;
@@ -352,7 +351,7 @@ Sequence<OUString> BackendImpl::getSupportedServiceNames()
throw (RuntimeException)
{
return comphelper::makeSequence(
- OUString::createFromAscii(BACKEND_SERVICE_NAME) );
+ OUString(RTL_CONSTASCII_USTRINGPARAM(BACKEND_SERVICE_NAME)) );
}
// XPackageRegistry
@@ -485,7 +484,6 @@ void BackendImpl::revokeEntryFromDb(OUString const & url)
}
-//##############################################################################
BackendImpl::PackageImpl::PackageImpl(
::rtl::Reference<PackageRegistryBackend> const & myBackend,
@@ -723,10 +721,6 @@ bool BackendImpl::PackageImpl::checkDependencies(
return true;
else
return false;
- //throw css::deployment::DeploymentException(
- // OUSTR("Extension Manager: User declined the license."),
- // static_cast<OWeakObject*>(this),
- // Any( css::deployment::LicenseException(OUSTR("User declined the license."), 0, m_name, sLicense)));
}
return true;
} catch (css::ucb::CommandFailedException&) {
@@ -923,7 +917,7 @@ void BackendImpl::PackageImpl::processPackage_(
}
catch (Exception &)
{
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
::comphelper::anyToString(
::cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
@@ -1014,7 +1008,7 @@ OUString BackendImpl::PackageImpl::getDescription()
}
catch ( css::deployment::DeploymentException& )
{
- OSL_ENSURE( 0, ::rtl::OUStringToOString( ::comphelper::anyToString( ::cppu::getCaughtException() ), RTL_TEXTENCODING_UTF8 ).getStr() );
+ OSL_FAIL( ::rtl::OUStringToOString( ::comphelper::anyToString( ::cppu::getCaughtException() ), RTL_TEXTENCODING_UTF8 ).getStr() );
}
}
@@ -1142,14 +1136,14 @@ void BackendImpl::PackageImpl::exportTo(
}
// xxx todo: think about exception specs:
catch (deployment::DeploymentException &) {
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
::comphelper::anyToString(
::cppu::getCaughtException() ),
RTL_TEXTENCODING_UTF8 ).getStr() );
}
catch (lang::IllegalArgumentException & exc) {
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, RTL_TEXTENCODING_UTF8 ).getStr() );
}
@@ -1218,7 +1212,7 @@ void BackendImpl::PackageImpl::exportTo(
makeURL( m_url_expanded, OUSTR("META-INF/manifest.xml") ),
xCmdEnv, false ) )
{
- OSL_ENSURE( 0, "### missing META-INF/manifest.xml file!" );
+ OSL_FAIL( "### missing META-INF/manifest.xml file!" );
return;
}
@@ -1442,7 +1436,7 @@ void BackendImpl::PackageImpl::scanBundle(
makeURL( m_url_expanded, OUSTR("META-INF/manifest.xml") ),
xCmdEnv, false /* no throw */ ))
{
- OSL_ENSURE( 0, "### missing META-INF/manifest.xml file!" );
+ OSL_FAIL( "### missing META-INF/manifest.xml file!" );
return;
}
@@ -1665,7 +1659,8 @@ BackendImpl::PackageImpl::getPackagesFromDb(
Reference<deployment::XPackage> xExtension =
bindBundleItem(i->first, i->second, true, m_identifier, xCmdEnv);
OSL_ASSERT(xExtension.is());
- retVector.push_back(xExtension);
+ if (xExtension.is())
+ retVector.push_back(xExtension);
}
return retVector;
@@ -1693,3 +1688,4 @@ Reference<deployment::XPackageRegistry> create(
} // namespace backend
} // namespace dp_registry
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/package/dp_package.hrc b/desktop/source/deployment/registry/package/dp_package.hrc
index 3a840b64f0b6..3a840b64f0b6 100644..100755
--- a/desktop/source/deployment/registry/package/dp_package.hrc
+++ b/desktop/source/deployment/registry/package/dp_package.hrc
diff --git a/desktop/source/deployment/registry/package/makefile.mk b/desktop/source/deployment/registry/package/makefile.mk
index 203ce176d289..203ce176d289 100644..100755
--- a/desktop/source/deployment/registry/package/makefile.mk
+++ b/desktop/source/deployment/registry/package/makefile.mk
diff --git a/desktop/source/deployment/registry/script/dp_lib_container.cxx b/desktop/source/deployment/registry/script/dp_lib_container.cxx
index be6170cdf5d8..2bc2c07130a0 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 3e7cbf54cbae..0cd5cb2cba90 100644..100755
--- 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 dddf82e09790..c9d3b19a5309 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.
@@ -40,7 +41,6 @@
#include "svl/inettype.hxx"
#include "com/sun/star/util/XUpdatable.hpp"
#include "com/sun/star/script/XLibraryContainer3.hpp"
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
#include <com/sun/star/util/XMacroExpander.hpp>
#include <com/sun/star/uri/XUriReferenceFactory.hpp>
#include <memory>
@@ -61,7 +61,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
@@ -162,13 +161,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;
@@ -297,7 +296,6 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
static_cast<sal_Int16>(-1) );
}
-//##############################################################################
// Package
BackendImpl * BackendImpl::PackageImpl::getMyBackend() const
@@ -314,15 +312,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 +328,67 @@ BackendImpl::PackageImpl::isRegistered_(
beans::Ambiguous<sal_Bool>( registered, false /* IsAmbiguous */ ) );
}
-//______________________________________________________________________________
+void
+lcl_maybeRemoveScript(
+ bool const bExists,
+ OUString const& rName,
+ OUString const& rScriptURL,
+ Reference<css::script::XLibraryContainer3> const& xScriptLibs)
+{
+ if (bExists && xScriptLibs.is() && xScriptLibs->hasByName(rName))
+ {
+ const OUString sScriptUrl = xScriptLibs->getOriginalLibraryLinkURL(rName);
+ if (sScriptUrl.equals(rScriptURL))
+ xScriptLibs->removeLibrary(rName);
+ }
+}
+
+bool
+lcl_maybeAddScript(
+ bool const bExists,
+ OUString const& rName,
+ OUString const& rScriptURL,
+ Reference<css::script::XLibraryContainer3> const& xScriptLibs)
+{
+ if (bExists && xScriptLibs.is())
+ {
+ bool bCanAdd = true;
+ if (xScriptLibs->hasByName(rName))
+ {
+ const OUString sOriginalUrl = xScriptLibs->getOriginalLibraryLinkURL(rName);
+ //We assume here that library names in extensions are unique, which may not be the case
+ //ToDo: If the script exist in another extension, then both extensions must have the
+ //same id
+ if (sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE"))
+ || sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE"))
+ || sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$BUNDLED_EXTENSIONS")))
+ {
+ xScriptLibs->removeLibrary(rName);
+ bCanAdd = true;
+ }
+ else
+ {
+ bCanAdd = false;
+ }
+ }
+
+ if (bCanAdd)
+ {
+ xScriptLibs->createLibraryLink(rName, rScriptURL, false);
+ return xScriptLibs->hasByName(rName);
+ }
+ }
+
+ return false;
+}
+
void BackendImpl::PackageImpl::processPackage_(
- ::osl::ResettableMutexGuard &,
+ ::osl::ResettableMutexGuard & /* guard */,
bool doRegisterPackage,
bool startup,
- ::rtl::Reference<AbortChannel> const &,
- Reference<XCommandEnvironment> const & xCmdEnv )
+ ::rtl::Reference<AbortChannel> const & /* abortChannel */,
+ Reference<XCommandEnvironment> const & /* xCmdEnv */ )
{
- (void)xCmdEnv;
-
BackendImpl * that = getMyBackend();
Reference< deployment::XPackage > xThisPackage( this );
@@ -390,19 +437,8 @@ void BackendImpl::PackageImpl::processPackage_(
//we also prevent and live deployment at startup
if (!isRemoved() && !startup)
{
- if (bScript && xScriptLibs.is() && xScriptLibs->hasByName(m_name))
- {
- const OUString sScriptUrl = xScriptLibs->getOriginalLibraryLinkURL(m_name);
- if (sScriptUrl.equals(m_scriptURL))
- xScriptLibs->removeLibrary(m_name);
- }
-
- if (bDialog && xDialogLibs.is() && xDialogLibs->hasByName(m_dialogName))
- {
- const OUString sDialogUrl = xDialogLibs->getOriginalLibraryLinkURL(m_dialogName);
- if (sDialogUrl.equals(m_dialogURL))
- xDialogLibs->removeLibrary(m_dialogName);
- }
+ lcl_maybeRemoveScript(bScript, m_name, m_scriptURL, xScriptLibs);
+ lcl_maybeRemoveScript(bDialog, m_dialogName, m_dialogURL, xDialogLibs);
}
getMyBackend()->revokeEntryFromDb(getURL());
return;
@@ -413,72 +449,14 @@ void BackendImpl::PackageImpl::processPackage_(
// Update LibraryContainer
bool bScriptSuccess = false;
- const bool bReadOnly = false;
-
bool bDialogSuccess = false;
if (!startup)
{
//If there is a bundled extension, and the user installes the same extension
//then the script from the bundled extension must be removed. If this does not work
//then live deployment does not work for scripts.
- if (bScript && xScriptLibs.is())
- {
- bool bCanAdd = true;
- if (xScriptLibs->hasByName(m_name))
- {
- const OUString sOriginalUrl = xScriptLibs->getOriginalLibraryLinkURL(m_name);
- //We assume here that library names in extensions are unique, which may not be the case
- //ToDo: If the script exist in another extension, then both extensions must have the
- //same id
- if (sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE"))
- || sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE"))
- || sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$BUNDLED_EXTENSIONS")))
- {
- xScriptLibs->removeLibrary(m_name);
- bCanAdd = true;
- }
- else
- {
- bCanAdd = false;
- }
- }
-
- if (bCanAdd)
- {
- xScriptLibs->createLibraryLink( m_name, m_scriptURL, bReadOnly );
- bScriptSuccess = xScriptLibs->hasByName( m_name );
- }
- }
-
-
- if (bDialog && xDialogLibs.is())
- {
- bool bCanAdd = true;
- if (xDialogLibs->hasByName(m_dialogName))
- {
- const OUString sOriginalUrl = xDialogLibs->getOriginalLibraryLinkURL(m_dialogName);
- //We assume here that library names in extensions are unique, which may not be the case
- //ToDo: If the script exist in another extension, then both extensions must have the
- //same id
- if (sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$UNO_USER_PACKAGES_CACHE"))
- || sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$UNO_SHARED_PACKAGES_CACHE"))
- || sOriginalUrl.match(OUSTR("vnd.sun.star.expand:$BUNDLED_EXTENSIONS")))
- {
- xDialogLibs->removeLibrary(m_dialogName);
- bCanAdd = true;
- }
- else
- {
- bCanAdd = false;
- }
- }
-
- if (bCanAdd)
- {
- xDialogLibs->createLibraryLink( m_dialogName, m_dialogURL, bReadOnly );
- bDialogSuccess = xDialogLibs->hasByName(m_dialogName);
- }
- }
+ bScriptSuccess = lcl_maybeAddScript(bScript, m_name, m_scriptURL, xScriptLibs);
+ bDialogSuccess = lcl_maybeAddScript(bDialog, m_dialogName, m_dialogURL, xDialogLibs);
}
bool bSuccess = bScript || bDialog; // Something must have happened
if( bRunning && !startup)
@@ -502,3 +480,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_script.hrc b/desktop/source/deployment/registry/script/dp_script.hrc
index 8ddfa6f51ffc..8ddfa6f51ffc 100644..100755
--- a/desktop/source/deployment/registry/script/dp_script.hrc
+++ b/desktop/source/deployment/registry/script/dp_script.hrc
diff --git a/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx b/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx
index 9a84a7286027..8c6a4924212e 100644
--- a/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx
+++ b/desktop/source/deployment/registry/script/dp_scriptbackenddb.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.
@@ -83,3 +84,4 @@ OUString ScriptBackendDb::getKeyElementName()
} // 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 7feaeba5568b..58a749480113 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/script/makefile.mk b/desktop/source/deployment/registry/script/makefile.mk
index 708def358021..708def358021 100644..100755
--- a/desktop/source/deployment/registry/script/makefile.mk
+++ b/desktop/source/deployment/registry/script/makefile.mk
diff --git a/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx b/desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx
index bf35aa2f50a5..11835ddfa957 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 a23e9f865894..83ffddda1aff 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 7e4be0f4e35a..a93069465435 100755..100644
--- 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,47 +179,10 @@ 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())
{
-/*
- if (office_is_running())
- {
- Reference<XComponentContext> xContext( getComponentContext() );
- m_xScriptLibs.set(
- xContext->getServiceManager()->createInstanceWithContext(
- OUSTR("com.sun.star."
- "script.ApplicationScriptLibraryContainer"),
- xContext ), UNO_QUERY_THROW );
- m_xDialogLibs.set(
- xContext->getServiceManager()->createInstanceWithContext(
- OUSTR("com.sun.star."
- "script.ApplicationDialogLibraryContainer"),
- xContext ), UNO_QUERY_THROW );
- }
- else
- {
- OUString basic_path(
- m_eContext == CONTEXT_USER
- ? OUSTR("vnd.sun.star.expand:${$BRAND_BASE_DIR/program/"
- SAL_CONFIGFILE("bootstrap")
- ":UserInstallation}/user/basic")
- : OUSTR("vnd.sun.star.expand:${$BRAND_BASE_DIR/program/"
- SAL_CONFIGFILE("bootstrap")
- ":BaseInstallation}/share/basic") );
- m_basic_script_libs.reset(
- new LibraryContainer(
- makeURL( basic_path, OUSTR("script.xlc") ),
- getMutex(),
- getComponentContext() ) );
- m_dialog_libs.reset(
- new LibraryContainer(
- makeURL( basic_path, OUSTR("dialog.xlc") ),
- getMutex(),
- getComponentContext() ) );
- }
-*/
}
}
@@ -274,7 +238,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") );
@@ -328,7 +292,6 @@ Reference<deployment::XPackage> BackendImpl::bindPackage_(
static_cast<sal_Int16>(-1) );
}
-//##############################################################################
void BackendImpl::PackageImpl:: initPackageHandler()
{
@@ -430,3 +393,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/sfwk/dp_sfwk.hrc b/desktop/source/deployment/registry/sfwk/dp_sfwk.hrc
index 0eb619e839e3..0eb619e839e3 100644..100755
--- a/desktop/source/deployment/registry/sfwk/dp_sfwk.hrc
+++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.hrc
diff --git a/desktop/source/deployment/registry/sfwk/makefile.mk b/desktop/source/deployment/registry/sfwk/makefile.mk
index a052296d5c21..a052296d5c21 100644..100755
--- a/desktop/source/deployment/registry/sfwk/makefile.mk
+++ b/desktop/source/deployment/registry/sfwk/makefile.mk
diff --git a/desktop/source/deployment/target.pmk b/desktop/source/deployment/target.pmk
index 82b41766b253..82b41766b253 100644..100755
--- a/desktop/source/deployment/target.pmk
+++ b/desktop/source/deployment/target.pmk
diff --git a/desktop/source/deployment/unopkg/makefile.mk b/desktop/source/deployment/unopkg/makefile.mk
index 06b39cd2d04e..64fe173f4597 100644..100755
--- a/desktop/source/deployment/unopkg/makefile.mk
+++ b/desktop/source/deployment/unopkg/makefile.mk
@@ -33,10 +33,6 @@ ENABLE_EXCEPTIONS = TRUE
.INCLUDE : settings.mk
-.IF "$(SYSTEM_DB)" == "YES"
-CFLAGS+=-DSYSTEM_DB -I$(DB_INCLUDES)
-.ENDIF
-
SRS1NAME = $(TARGET)
SRC1FILES = \
unopkg.src
diff --git a/desktop/source/inc/exithelper.hxx b/desktop/source/inc/exithelper.hxx
index e2604ce49b68..25cdc3e1b722 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/inc/helpid.hrc b/desktop/source/inc/helpid.hrc
index d96b12196342..d96b12196342 100644..100755
--- a/desktop/source/inc/helpid.hrc
+++ b/desktop/source/inc/helpid.hrc
diff --git a/desktop/source/migration/cfgfilter.cxx b/desktop/source/migration/cfgfilter.cxx
deleted file mode 100644
index e4589e1a10e1..000000000000
--- a/desktop/source/migration/cfgfilter.cxx
+++ /dev/null
@@ -1,333 +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 "cfgfilter.hxx"
-
-#include <com/sun/star/beans/NamedValue.hpp>
-#include <unotools/textsearch.hxx>
-
-using namespace rtl;
-using namespace com::sun::star;
-using namespace com::sun::star::uno;
-using namespace com::sun::star::lang;
-using namespace com::sun::star::beans;
-using namespace com::sun::star::configuration::backend;
-
-namespace desktop {
-
-CConfigFilter::CConfigFilter(const strings_v* include, const strings_v* exclude)
- : m_pvInclude(include)
- , m_pvExclude(exclude)
-{
-}
-
-void SAL_CALL CConfigFilter::initialize(const Sequence< Any >& seqArgs)
- throw (Exception)
-{
- NamedValue nv;
- for (sal_Int32 i=0; i < seqArgs.getLength(); i++)
- {
- if (seqArgs[i] >>= nv)
- {
- if (nv.Name.equalsAscii("Source"))
- nv.Value >>= m_xSourceLayer;
- if (nv.Name.equalsAscii("ComponentName"))
- nv.Value >>= m_aCurrentComponent;
- }
- }
- if (m_aCurrentComponent.getLength() == 0)
- m_aCurrentComponent = OUString::createFromAscii("unknown.component");
-
- if (!m_xSourceLayer.is()) {
- throw Exception();
- }
-
-}
-
-
-void CConfigFilter::pushElement(rtl::OUString aName, sal_Bool bUse)
-{
- OUString aPath;
- if (!m_elementStack.empty()) {
- aPath = m_elementStack.top().path; // or use base path
- aPath += OUString::createFromAscii("/");
- }
- aPath += aName;
-
- // create element
- element elem;
- elem.name = aName;
- elem.path = aPath;
- elem.use = bUse;
- m_elementStack.push(elem);
-}
-
-sal_Bool CConfigFilter::checkCurrentElement()
-{
- return m_elementStack.top().use;
-}
-
-sal_Bool CConfigFilter::checkElement(rtl::OUString aName)
-{
-
- sal_Bool bResult = sal_False;
-
- // get full pathname for element
- OUString aFullPath;
- if (!m_elementStack.empty())
- aFullPath = m_elementStack.top().path + OUString::createFromAscii("/");
-
- aFullPath += aName;
-
- // check whether any include patterns patch this path
- for (strings_v::const_iterator i_in = m_pvInclude->begin();
- i_in != m_pvInclude->end(); i_in++)
- {
- // pattern is beginning of path
- // or path is a begiing for pattern
- if (i_in->match(aFullPath.copy(0, i_in->getLength()>aFullPath.getLength()
- ? aFullPath.getLength() : i_in->getLength()), 0))
- {
- bResult = sal_True;
- break; // one match is enough
- }
- }
- // if match is found, check for exclusion
- if (bResult)
- {
- for (strings_v::const_iterator i_ex = m_pvExclude->begin();
- i_ex != m_pvExclude->end(); i_ex++)
- {
- if (aFullPath.match(*i_ex, 0)) // pattern is beginning of path
- {
- bResult = sal_False;
- break; // one is enough...
- }
- }
- }
- return bResult;
-}
-
-void CConfigFilter::popElement()
-{
- m_elementStack.pop();
-}
-
-
-void SAL_CALL CConfigFilter::readData(
- const Reference< configuration::backend::XLayerHandler >& layerHandler)
- throw (
- com::sun::star::lang::NullPointerException, lang::WrappedTargetException,
- com::sun::star::configuration::backend::MalformedDataException)
-{
- // when readData is called, the submitted handler will be stored
- // in m_xLayerHandler. we will then submit ourself as a handler to
- // the SourceLayer in m_xSourceLayer.
- // when the source calls our handler functions we will use the patterns that
- // where given in the ctor to decide whther they should be relaied to the caller
-
- if (m_xSourceLayer.is() && layerHandler.is())
- {
- m_xLayerHandler = layerHandler;
- m_xSourceLayer->readData(Reference<XLayerHandler>(static_cast< XLayerHandler* >(this)));
- } else
- {
- throw NullPointerException();
- }
-}
-
-// XLayerHandler
-void SAL_CALL CConfigFilter::startLayer()
- throw(::com::sun::star::lang::WrappedTargetException)
-{
- m_xLayerHandler->startLayer();
-}
-
-void SAL_CALL CConfigFilter::endLayer()
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException )
-{
- m_xLayerHandler->endLayer();
-}
-
-void SAL_CALL CConfigFilter::overrideNode(
- const OUString& aName,
- sal_Int16 aAttributes,
- sal_Bool bClear)
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException )
-{
- if (checkElement(aName))
- {
- m_xLayerHandler->overrideNode(aName, aAttributes, bClear);
- pushElement(aName);
- }
- else
- pushElement(aName, sal_False);
-}
-
-void SAL_CALL CConfigFilter::addOrReplaceNode(
- const OUString& aName,
- sal_Int16 aAttributes)
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException )
-{
- if (checkElement(aName))
- {
- m_xLayerHandler->addOrReplaceNode(aName, aAttributes);
- pushElement(aName);
- }
- else
- pushElement(aName, sal_False);
-}
-
-void SAL_CALL CConfigFilter::addOrReplaceNodeFromTemplate(
- const OUString& aName,
- const com::sun::star::configuration::backend::TemplateIdentifier& aTemplate,
- sal_Int16 aAttributes )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException )
-{
- if (checkElement(aName))
- {
- m_xLayerHandler->addOrReplaceNodeFromTemplate(aName, aTemplate, aAttributes);
- pushElement(aName);
- }
- else
- pushElement(aName, sal_False);
-}
-
-void SAL_CALL CConfigFilter::endNode()
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException )
-{
- if (checkCurrentElement())
- {
- m_xLayerHandler->endNode();
- }
- popElement();
-}
-
-void SAL_CALL CConfigFilter::dropNode(
- const OUString& aName )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException )
-{
- // does not get pushed
- if (checkElement(aName))
- {
- m_xLayerHandler->dropNode(aName);
- }
-}
-
-void SAL_CALL CConfigFilter::overrideProperty(
- const OUString& aName,
- sal_Int16 aAttributes,
- const Type& aType,
- sal_Bool bClear )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException )
-{
- if (checkElement(aName)){
- m_xLayerHandler->overrideProperty(aName, aAttributes, aType, bClear);
- pushElement(aName);
- }
- else
- pushElement(aName, sal_False);
-}
-
-void SAL_CALL CConfigFilter::setPropertyValue(
- const Any& aValue )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException )
-{
- if (checkCurrentElement())
- m_xLayerHandler->setPropertyValue(aValue);
-}
-
-void SAL_CALL CConfigFilter::setPropertyValueForLocale(
- const Any& aValue,
- const OUString& aLocale )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException )
-{
- if (checkCurrentElement())
- m_xLayerHandler->setPropertyValueForLocale(aValue, aLocale);
-}
-
-void SAL_CALL CConfigFilter::endProperty()
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException )
-{
- if (checkCurrentElement())
- {
- m_xLayerHandler->endProperty();
- }
- popElement();
-
-}
-
-void SAL_CALL CConfigFilter::addProperty(
- const rtl::OUString& aName,
- sal_Int16 aAttributes,
- const Type& aType )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException )
-{
- if (checkElement(aName))
- m_xLayerHandler->addProperty(aName, aAttributes, aType);
-}
-
-void SAL_CALL CConfigFilter::addPropertyWithValue(
- const rtl::OUString& aName,
- sal_Int16 aAttributes,
- const Any& aValue )
- throw(
- ::com::sun::star::configuration::backend::MalformedDataException,
- ::com::sun::star::lang::WrappedTargetException )
-{
- // add property with value doesn't push the property
- if (checkElement(aName))
- m_xLayerHandler->addPropertyWithValue(aName, aAttributes, aValue);
-
-}
-
-} // namespace desktop
diff --git a/desktop/source/migration/cfgfilter.hxx b/desktop/source/migration/cfgfilter.hxx
deleted file mode 100644
index 605788a12e1b..000000000000
--- 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 bc0cd9a62b10..b20b4c57974f 100644..100755
--- a/desktop/source/migration/makefile.mk
+++ b/desktop/source/migration/makefile.mk
@@ -1,7 +1,7 @@
#*************************************************************************
#
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
+#
# Copyright 2000, 2010 Oracle and/or its affiliates.
#
# OpenOffice.org - a multi-platform office productivity suite
@@ -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 314537836921..2cade3a5faac 100755..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>
@@ -65,7 +65,6 @@
#include <com/sun/star/ui/XUIConfigurationStorage.hpp>
#include <com/sun/star/ui/XUIConfigurationPersistence.hpp>
-using namespace rtl;
using namespace osl;
using namespace std;
using namespace com::sun::star::task;
@@ -76,21 +75,28 @@ using namespace com::sun::star::container;
using com::sun::star::uno::Exception;
using namespace com::sun::star;
+using ::rtl::OUString;
+using ::rtl::OString;
+
namespace desktop {
-static const ::rtl::OUString ITEM_DESCRIPTOR_COMMANDURL = ::rtl::OUString::createFromAscii("CommandURL");
-static const ::rtl::OUString ITEM_DESCRIPTOR_CONTAINER = ::rtl::OUString::createFromAscii("ItemDescriptorContainer");
-static const ::rtl::OUString ITEM_DESCRIPTOR_LABEL = ::rtl::OUString::createFromAscii("Label");
+static const ::rtl::OUString ITEM_DESCRIPTOR_COMMANDURL(RTL_CONSTASCII_USTRINGPARAM("CommandURL"));
+static const ::rtl::OUString ITEM_DESCRIPTOR_CONTAINER(RTL_CONSTASCII_USTRINGPARAM("ItemDescriptorContainer"));
+static const ::rtl::OUString ITEM_DESCRIPTOR_LABEL(RTL_CONSTASCII_USTRINGPARAM("Label"));
+
+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 const ::rtl::OUString MENU_SEPERATOR = ::rtl::OUString::createFromAscii(" | ");
-static const ::rtl::OUString MENU_SUBMENU = ::rtl::OUString::createFromAscii("...");
+static const char XDG_CONFIG_PART[] = "/.config";
::rtl::OUString retrieveLabelFromCommand(const ::rtl::OUString& sCommand, const ::rtl::OUString& sModuleIdentifier)
{
::rtl::OUString sLabel;
uno::Reference< container::XNameAccess > xUICommands;
- uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString::createFromAscii("com.sun.star.frame.UICommandDescription") ), uno::UNO_QUERY );
+ uno::Reference< container::XNameAccess > xNameAccess( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.UICommandDescription")) ), uno::UNO_QUERY );
if ( xNameAccess.is() )
{
uno::Any a = xNameAccess->getByName( sModuleIdentifier );
@@ -109,7 +115,7 @@ static const ::rtl::OUString MENU_SUBMENU = ::rtl::OUString::createFromAscii("..
{
for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
{
- if ( aPropSeq[i].Name.equalsAscii( "Label" ))
+ if ( aPropSeq[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "Label" ) ))
{
aPropSeq[i].Value >>= aStr;
break;
@@ -134,145 +140,117 @@ static const ::rtl::OUString MENU_SUBMENU = ::rtl::OUString::createFromAscii("..
return sLabel;
}
-::rtl::OUString stripHotKey( const ::rtl::OUString& str )
-{
- sal_Int32 index = str.indexOf( '~' );
- if ( index == -1 )
- {
- return str;
- }
- else
- {
- return str.replaceAt( index, 1, ::rtl::OUString() );
- }
-}
-
::rtl::OUString mapModuleShortNameToIdentifier(const ::rtl::OUString& sShortName)
{
::rtl::OUString sIdentifier;
- if (sShortName.equals(::rtl::OUString::createFromAscii("StartModule")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.frame.StartModule");
+ 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::createFromAscii("swriter")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.TextDocument");
+ 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::createFromAscii("scalc")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.sheet.SpreadsheetDocument");
+ 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::createFromAscii("sdraw")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.drawing.DrawingDocument");
+ 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::createFromAscii("simpress")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.presentation.PresentationDocument");
+ 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::createFromAscii("smath")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.formula.FormulaProperties");
+ 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::createFromAscii("schart")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.chart2.ChartDocument");
+ 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::createFromAscii("BasicIDE")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.script.BasicIDE");
+ 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::createFromAscii("dbapp")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.sdb.OfficeDatabaseDocument");
+ 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::createFromAscii("sglobal")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.GlobalDocument");
+ 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::createFromAscii("sweb")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.text.WebDocument");
+ 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::createFromAscii("swxform")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.xforms.XMLFormDocument");
+ 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::createFromAscii("sbibliography")))
- sIdentifier = ::rtl::OUString::createFromAscii("com.sun.star.frame.Bibliography");
+ else if (sShortName.equals(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("sbibliography"))))
+ sIdentifier = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.Bibliography"));
return sIdentifier;
}
-static MigrationImpl *pImpl = 0;
-static Mutex aMutex;
-static MigrationImpl *getImpl()
+bool MigrationImpl::alreadyMigrated()
{
- MutexGuard aGuard(aMutex);
- if (pImpl == 0)
- pImpl = new MigrationImpl(comphelper::getProcessServiceFactory());
- return pImpl;
+ 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;
}
-static void releaseImpl()
+bool MigrationImpl::initializeMigration()
{
- MutexGuard aGuard(aMutex);
- if (pImpl != 0)
- {
- delete pImpl;
- pImpl = 0;
+ 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;
}
-// static main entry point for the migration process
-void Migration::doMigration()
+void Migration::migrateSettingsIfNecessary()
{
+ MigrationImpl aImpl( comphelper::getProcessServiceFactory() );
+
+ if (! aImpl.initializeMigration() )
+ return;
+
sal_Bool bResult = sal_False;
try {
- bResult = getImpl()->doMigration();
+ 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_FAIL(aMsg.getStr());
}
OSL_ENSURE(bResult, "Migration has not been successfull");
- // shut down migration framework
- releaseImpl();
-}
-
-void Migration::cancelMigration()
-{
- releaseImpl();
-}
-
-sal_Bool Migration::checkMigration()
-{
- return getImpl()->checkMigration();
-}
-
-OUString Migration::getOldVersionName()
-{
- return getImpl()->getOldVersionName();
-}
-
-OUString MigrationImpl::getOldVersionName()
-{
- return m_aInfo.productname;
-}
-
-sal_Bool MigrationImpl::checkMigration()
-{
- if (m_aInfo.userdata.getLength() > 0 && ! checkMigrationCompleted())
- return sal_True;
- else
- return sal_False;
+ (void)bResult;
}
MigrationImpl::MigrationImpl(const uno::Reference< XMultiServiceFactory >& xFactory)
: m_vrVersions(new strings_v)
, m_xFactory(xFactory)
{
- readAvailableMigrations(m_vMigrationsAvailable);
- sal_Int32 nIndex = findPreferedMigrationProcess(m_vMigrationsAvailable);
- if ( nIndex >= 0 )
- m_vrMigrations = readMigrationSteps(m_vMigrationsAvailable[nIndex].name);
}
MigrationImpl::~MigrationImpl()
{
-
}
+// The main entry point for migrating settings
sal_Bool MigrationImpl::doMigration()
{
// compile file list for migration
@@ -287,8 +265,8 @@ sal_Bool MigrationImpl::doMigration()
copyFiles();
- const ::rtl::OUString sMenubarResourceURL = ::rtl::OUString::createFromAscii("private:resource/menubar/menubar");
- const ::rtl::OUString sToolbarResourcePre = ::rtl::OUString::createFromAscii("private:resource/toolbar/");
+ const ::rtl::OUString sMenubarResourceURL(RTL_CONSTASCII_USTRINGPARAM("private:resource/menubar/menubar"));
+ const ::rtl::OUString sToolbarResourcePre(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/"));
for (sal_uInt32 i=0; i<vModulesInfo.size(); ++i)
{
::rtl::OUString sModuleIdentifier = mapModuleShortNameToIdentifier(vModulesInfo[i].sModuleShortName);
@@ -296,15 +274,15 @@ sal_Bool MigrationImpl::doMigration()
continue;
uno::Sequence< uno::Any > lArgs(2);
- ::rtl::OUString aOldCfgDataPath = m_aInfo.userdata + ::rtl::OUString::createFromAscii("/user/config/soffice.cfg/modules/");
+ ::rtl::OUString aOldCfgDataPath = m_aInfo.userdata + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/user/config/soffice.cfg/modules/"));
lArgs[0] <<= aOldCfgDataPath + vModulesInfo[i].sModuleShortName;
lArgs[1] <<= embed::ElementModes::READ;
- uno::Reference< lang::XSingleServiceFactory > xStorageFactory(m_xFactory->createInstance(::rtl::OUString::createFromAscii("com.sun.star.embed.FileSystemStorageFactory")), uno::UNO_QUERY);
+ uno::Reference< lang::XSingleServiceFactory > xStorageFactory(m_xFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.FileSystemStorageFactory"))), uno::UNO_QUERY);
uno::Reference< embed::XStorage > xModules;
xModules = uno::Reference< embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY);
- uno::Reference< ui::XUIConfigurationManager > xOldCfgManager( m_xFactory->createInstance( rtl::OUString::createFromAscii("com.sun.star.ui.UIConfigurationManager")), uno::UNO_QUERY );
+ uno::Reference< ui::XUIConfigurationManager > xOldCfgManager( m_xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.UIConfigurationManager"))), uno::UNO_QUERY );
uno::Reference< ui::XUIConfigurationStorage > xOldCfgStorage( xOldCfgManager, uno::UNO_QUERY );
uno::Reference< ui::XUIConfigurationPersistence > xOldCfgPersistence( xOldCfgManager, uno::UNO_QUERY );
@@ -359,7 +337,7 @@ sal_Bool MigrationImpl::doMigration()
OString aMsg("An unexpected exception was thrown during migration");
aMsg += "\nOldVersion: " + OUStringToOString(m_aInfo.productname, RTL_TEXTENCODING_ASCII_US);
aMsg += "\nDataPath : " + OUStringToOString(m_aInfo.userdata, RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, aMsg.getStr());
+ OSL_FAIL(aMsg.getStr());
}
// prevent running the migration multiple times
@@ -370,11 +348,11 @@ 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
- OSL_ENSURE(sal_False, "could not get XRefresh interface from default config provider. No refresh done.");
+ OSL_FAIL("could not get XRefresh interface from default config provider. No refresh done.");
}
@@ -382,24 +360,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;
}
@@ -444,6 +431,8 @@ bool MigrationImpl::readAvailableMigrations(migrations_available& rAvailableMigr
for (sal_Int32 j=0; j<seqVersions.getLength(); j++)
aSupportedMigration.supported_versions.push_back(seqVersions[j].trim());
insertSorted( rAvailableMigrations, aSupportedMigration );
+ OSL_TRACE( " available migration '%s'\n",
+ rtl::OUStringToOString( aSupportedMigration.name, RTL_TEXTENCODING_ASCII_US ).getStr() );
}
return true;
@@ -468,13 +457,12 @@ migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigratio
{
// get current migration step
theNameAccess->getByName(seqMigrations[i]) >>= tmpAccess;
- // tmpStepPtr = new migration_step();
migration_step tmpStep;
tmpStep.name = seqMigrations[i];
// read included files from current step description
::rtl::OUString aSeqEntry;
- if (tmpAccess->getByName(OUString::createFromAscii("IncludedFiles")) >>= tmpSeq)
+ if (tmpAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IncludedFiles"))) >>= tmpSeq)
{
for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
{
@@ -484,35 +472,35 @@ 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]);
}
// included extensions...
- if (tmpAccess->getByName(OUString::createFromAscii("IncludedExtensions")) >>= tmpSeq)
+ if (tmpAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("IncludedExtensions"))) >>= tmpSeq)
{
for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
tmpStep.includeExtensions.push_back(tmpSeq[j]);
}
// excluded extensions...
- if (tmpAccess->getByName(OUString::createFromAscii("ExcludedExtensions")) >>= tmpSeq)
+ if (tmpAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("ExcludedExtensions"))) >>= tmpSeq)
{
for (sal_Int32 j=0; j<tmpSeq.getLength(); j++)
{
@@ -522,7 +510,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);
}
@@ -551,7 +539,7 @@ install_info MigrationImpl::findInstallation(const strings_v& rVersions)
install_info aInfo;
strings_v::const_iterator i_ver = rVersions.begin();
- uno::Reference < util::XStringSubstitution > xSubst( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString::createFromAscii("com.sun.star.util.PathSubstitution")), uno::UNO_QUERY );
+ uno::Reference < util::XStringSubstitution > xSubst( ::comphelper::getProcessServiceFactory()->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.util.PathSubstitution"))), uno::UNO_QUERY );
while (i_ver != rVersions.end())
{
::rtl::OUString aVersion, aProfileName;
@@ -568,11 +556,27 @@ install_info MigrationImpl::findInstallation(const strings_v& rVersions)
{
::rtl::OUString aUserInst;
osl::Security().getConfigDir( aUserInst );
+#if defined UNX && ! defined MACOSX
+ const char* pXDGCfgHome = getenv("XDG_CONFIG_HOME");
+ // cater for XDG_CONFIG_HOME change
+ // If XDG_CONFIG_HOME is set then we;
+ // assume the user knows what they are doing ( room for improvement here, we could
+ // of course search the default config dir etc. also - but this is more complex,
+ // we would need to weigh results from the current config dir against matches in
+ // the 'old' config dir etc. ) - currently we just use the returned config dir.
+ // If XDG_CONFIG_HOME is NOT set;
+ // assume then we should now using the default $HOME/,config config location for
+ // our user profiles, however *all* previous libreoffice and openoffice.org
+ // configurations will be in the 'old' config directory and that's where we need
+ // to search - we convert the returned config dir to the 'old' dir
+ if ( !pXDGCfgHome && aUserInst.endsWithAsciiL( XDG_CONFIG_PART, sizeof( XDG_CONFIG_PART ) - 1 ) )
+ aUserInst = aUserInst.copy( 0, aUserInst.getLength() - sizeof( XDG_CONFIG_PART ) + 2 ); // remove trailing '.config' ( but leave the terminating '/' )
+#endif
if ( aUserInst.getLength() && aUserInst[ aUserInst.getLength()-1 ] != '/' )
- aUserInst += ::rtl::OUString::createFromAscii("/");
+ aUserInst += ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
#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
@@ -610,6 +614,11 @@ sal_Int32 MigrationImpl::findPreferedMigrationProcess(const migrations_available
++rIter;
}
+ OSL_TRACE( " preferred migration is from product '%s'\n",
+ rtl::OUStringToOString( m_aInfo.productname, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_TRACE( " and settings directory '%s'\n",
+ rtl::OUStringToOString( m_aInfo.userdata, RTL_TEXTENCODING_ASCII_US ).getStr() );
+
return nIndex;
}
@@ -633,9 +642,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;
}
@@ -654,7 +663,7 @@ strings_vr MigrationImpl::getAllFiles(const OUString& baseURL) const
// work through directory contents...
DirectoryItem item;
- FileStatus fs(FileStatusMask_Type | FileStatusMask_FileURL);
+ FileStatus fs(osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileURL);
while (dir.getNextItem(item) == FileBase::E_None)
{
if (item.getFileStatus(fs) == FileBase::E_None)
@@ -672,7 +681,7 @@ strings_vr MigrationImpl::getAllFiles(const OUString& baseURL) const
{
vrSubResult = getAllFiles(*i);
vrResult->insert(vrResult->end(), vrSubResult->begin(), vrSubResult->end());
- i++;
+ ++i;
}
}
return vrResult;
@@ -686,11 +695,6 @@ strings_vr MigrationImpl::compileFileList()
strings_vr vrExclude;
strings_vr vrTemp;
-#ifdef SAL_OS2
- if (m_aInfo.userdata.getLength() == 0)
- return vrResult;
-#endif
-
// get a list of all files:
strings_vr vrFiles = getAllFiles(m_aInfo.userdata);
@@ -700,9 +704,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 +813,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 +840,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 +850,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);
@@ -869,7 +873,7 @@ uno::Reference< XNameAccess > MigrationImpl::getConfigAccess(const sal_Char* pPa
} catch (com::sun::star::uno::Exception& e)
{
OString aMsg = OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, aMsg.getStr());
+ OSL_FAIL(aMsg.getStr());
}
return xNameAccess;
}
@@ -886,7 +890,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;
@@ -900,14 +903,14 @@ void MigrationImpl::copyFiles()
OString msg("Cannot copy ");
msg += OUStringToOString(*i_file, RTL_TEXTENCODING_UTF8) + " to "
+ OUStringToOString(destName, RTL_TEXTENCODING_UTF8);
- OSL_ENSURE(sal_False, msg.getStr());
+ OSL_FAIL(msg.getStr());
}
- i_file++;
+ ++i_file;
}
}
else
{
- OSL_ENSURE(sal_False, "copyFiles: UserInstall does not exist");
+ OSL_FAIL("copyFiles: UserInstall does not exist");
}
}
@@ -916,10 +919,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)));
@@ -942,7 +945,7 @@ void MigrationImpl::runServices()
seqExtBlackList = comphelper::arrayToSequence< ::rtl::OUString >(
&i_mig->excludeExtensions[0], nSize );
seqArguments[2] = uno::makeAny(NamedValue(
- OUString::createFromAscii("ExtensionBlackList"),
+ OUString(RTL_CONSTASCII_USTRINGPARAM("ExtensionBlackList")),
uno::makeAny( seqExtBlackList )));
xMigrationJob = uno::Reference< XJob >(m_xFactory->createInstanceWithArguments(
@@ -956,31 +959,31 @@ void MigrationImpl::runServices()
OString aMsg("Execution of migration service failed (Exception caught).\nService: ");
aMsg += OUStringToOString(i_mig->service, RTL_TEXTENCODING_ASCII_US) + "\nMessage: ";
aMsg += OUStringToOString(e.Message, RTL_TEXTENCODING_ASCII_US);
- OSL_ENSURE(sal_False, aMsg.getStr());
+ OSL_FAIL(aMsg.getStr());
} catch (...)
{
OString aMsg("Execution of migration service failed (Exception caught).\nService: ");
aMsg += OUStringToOString(i_mig->service, RTL_TEXTENCODING_ASCII_US) +
"\nNo message available";
- OSL_ENSURE(sal_False, aMsg.getStr());
+ OSL_FAIL(aMsg.getStr());
}
}
- i_mig++;
+ ++i_mig;
}
}
::std::vector< MigrationModuleInfo > MigrationImpl::dectectUIChangesForAllModules() const
{
::std::vector< MigrationModuleInfo > vModulesInfo;
- const ::rtl::OUString MENUBAR = ::rtl::OUString::createFromAscii("menubar");
- const ::rtl::OUString TOOLBAR = ::rtl::OUString::createFromAscii("toolbar");
+ const ::rtl::OUString MENUBAR(RTL_CONSTASCII_USTRINGPARAM("menubar"));
+ const ::rtl::OUString TOOLBAR(RTL_CONSTASCII_USTRINGPARAM("toolbar"));
uno::Sequence< uno::Any > lArgs(2);
- lArgs[0] <<= m_aInfo.userdata + ::rtl::OUString::createFromAscii("/user/config/soffice.cfg/modules");
+ lArgs[0] <<= m_aInfo.userdata + ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/user/config/soffice.cfg/modules"));
lArgs[1] <<= embed::ElementModes::READ;
- uno::Reference< lang::XSingleServiceFactory > xStorageFactory(m_xFactory->createInstance(::rtl::OUString::createFromAscii("com.sun.star.embed.FileSystemStorageFactory")), uno::UNO_QUERY);
+ uno::Reference< lang::XSingleServiceFactory > xStorageFactory(m_xFactory->createInstance(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.embed.FileSystemStorageFactory"))), uno::UNO_QUERY);
uno::Reference< embed::XStorage > xModules;
xModules = uno::Reference< embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY);
@@ -1012,7 +1015,7 @@ void MigrationImpl::runServices()
uno::Reference< embed::XStorage > xToolbar = xModule->openStorageElement(TOOLBAR, embed::ElementModes::READ);
if (xToolbar.is())
{
- const ::rtl::OUString RESOURCEURL_CUSTOM_ELEMENT = ::rtl::OUString::createFromAscii("custom_");
+ const ::rtl::OUString RESOURCEURL_CUSTOM_ELEMENT(RTL_CONSTASCII_USTRINGPARAM("custom_"));
sal_Int32 nCustomLen = 7;
uno::Reference< container::XNameAccess > xNameAccess = uno::Reference< container::XNameAccess >(xToolbar, uno::UNO_QUERY);
@@ -1321,9 +1324,9 @@ void NewVersionUIInfo::init(const ::std::vector< MigrationModuleInfo >& vModules
m_lNewVersionMenubarSettingsSeq.realloc(vModulesInfo.size());
m_lNewVersionToolbarSettingsSeq.realloc(vModulesInfo.size());
- const ::rtl::OUString sModuleCfgSupplier = ::rtl::OUString::createFromAscii("com.sun.star.ui.ModuleUIConfigurationManagerSupplier");
- const ::rtl::OUString sMenubarResourceURL = ::rtl::OUString::createFromAscii("private:resource/menubar/menubar");
- const ::rtl::OUString sToolbarResourcePre = ::rtl::OUString::createFromAscii("private:resource/toolbar/");
+ const ::rtl::OUString sModuleCfgSupplier(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.ModuleUIConfigurationManagerSupplier"));
+ const ::rtl::OUString sMenubarResourceURL(RTL_CONSTASCII_USTRINGPARAM("private:resource/menubar/menubar"));
+ const ::rtl::OUString sToolbarResourcePre(RTL_CONSTASCII_USTRINGPARAM("private:resource/toolbar/"));
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier = uno::Reference< ui::XModuleUIConfigurationManagerSupplier >(::comphelper::getProcessServiceFactory()->createInstance(sModuleCfgSupplier), uno::UNO_QUERY);
@@ -1363,3 +1366,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 f73e44fea523..2d079aeb99a5 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.
@@ -30,7 +31,7 @@
#include <vector>
#include <algorithm>
#include <memory>
-#include <hash_map>
+#include <boost/unordered_map.hpp>
#include "migration.hxx"
@@ -137,7 +138,7 @@ struct MigrationItem
::rtl::OUString GetPrevSibling() const { return m_sPrevSibling; }
};
-typedef ::std::hash_map< ::rtl::OUString,
+typedef ::boost::unordered_map< ::rtl::OUString,
::std::vector< MigrationItem >,
::rtl::OUStringHash,
::std::equal_to< ::rtl::OUString > > MigrationHashMap;
@@ -206,13 +207,14 @@ private:
// functions to control the migration process
bool readAvailableMigrations(migrations_available&);
+ bool alreadyMigrated();
migrations_vr readMigrationSteps(const ::rtl::OUString& rMigrationName);
sal_Int32 findPreferedMigrationProcess(const migrations_available&);
install_info findInstallation(const strings_v& rVersions);
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 +236,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/pages.cxx b/desktop/source/migration/pages.cxx
index eefb529d0ca7..fb86474c8578 100644
--- a/desktop/source/migration/pages.cxx
+++ b/desktop/source/migration/pages.cxx
@@ -117,7 +117,7 @@ void WelcomePage::checkEval()
{
Reference< XMultiServiceFactory > xFactory = ::comphelper::getProcessServiceFactory();
Reference< XMaterialHolder > xHolder(xFactory->createInstance(
- OUString::createFromAscii("com.sun.star.tab.tabreg")), UNO_QUERY);
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.tab.tabreg"))), UNO_QUERY);
if (xHolder.is()) {
Any aData = xHolder->getMaterial();
Sequence < NamedValue > aSeq;
@@ -179,7 +179,7 @@ LicensePage::LicensePage( svt::OWizardMachine* parent, const ResId& resid, const
{
DirectoryItem d;
DirectoryItem::get(rLicensePath, d);
- FileStatus fs(FileStatusMask_FileSize);
+ FileStatus fs(osl_FileStatus_Mask_FileSize);
d.getFileStatus(fs);
sal_uInt64 nBytesRead = 0;
sal_uInt64 nPosition = 0;
@@ -562,9 +562,9 @@ void RegistrationPage::ActivatePage()
void RegistrationPage::impl_retrieveConfigurationData()
{
- static ::rtl::OUString PACKAGE = ::rtl::OUString::createFromAscii("org.openoffice.FirstStartWizard");
- static ::rtl::OUString PATH = ::rtl::OUString::createFromAscii("TabPages/Registration/RegistrationOptions/NeverButton");
- static ::rtl::OUString KEY = ::rtl::OUString::createFromAscii("Visible");
+ static ::rtl::OUString PACKAGE(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.FirstStartWizard"));
+ static ::rtl::OUString PATH(RTL_CONSTASCII_USTRINGPARAM("TabPages/Registration/RegistrationOptions/NeverButton"));
+ static ::rtl::OUString KEY(RTL_CONSTASCII_USTRINGPARAM("Visible"));
::com::sun::star::uno::Any aValue;
try
diff --git a/desktop/source/migration/services/autocorrmigration.cxx b/desktop/source/migration/services/autocorrmigration.cxx
index c416992da13c..c3d24e941375 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.
@@ -114,7 +115,7 @@ namespace migration
::osl::DirectoryItem aItem;
while ( aDir.getNextItem( aItem ) == ::osl::FileBase::E_None )
{
- ::osl::FileStatus aFileStatus( FileStatusMask_Type | FileStatusMask_FileURL );
+ ::osl::FileStatus aFileStatus( osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileURL );
if ( aItem.getFileStatus( aFileStatus ) == ::osl::FileBase::E_None )
{
if ( aFileStatus.getFileType() == ::osl::FileStatus::Directory )
@@ -174,7 +175,7 @@ namespace migration
::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;
@@ -187,14 +188,14 @@ namespace migration
::rtl::OString aMsg( "AutocorrectionMigration::copyFiles: cannot copy " );
aMsg += ::rtl::OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 ) + " to "
+ ::rtl::OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 );
- OSL_ENSURE( sal_False, aMsg.getStr() );
+ OSL_FAIL( aMsg.getStr() );
}
++aI;
}
}
else
{
- OSL_ENSURE( sal_False, "AutocorrectionMigration::copyFiles: no user installation!" );
+ OSL_FAIL( "AutocorrectionMigration::copyFiles: no user installation!" );
}
}
@@ -241,11 +242,11 @@ 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) )
{
- OSL_ENSURE( false, "AutocorrectionMigration::initialize: argument UserData has wrong type!" );
+ OSL_FAIL( "AutocorrectionMigration::initialize: argument UserData has wrong type!" );
}
m_sSourceDir += sSourceSubDir;
break;
@@ -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 715baa6bca12..20021ceb100a 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 3e7384f2262f..40474a23d25e 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.
@@ -42,9 +43,8 @@ namespace migration
//.........................................................................
- static ::rtl::OUString sSourceUserBasic = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/basic" ) );
- static ::rtl::OUString sTargetUserBasic = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/user/__basic_80" ) );
-
+ #define sSourceUserBasic ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/user/basic"))
+ #define sTargetUserBasic ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("/user/__basic_80"))
// =============================================================================
// component operations
@@ -52,35 +52,16 @@ namespace migration
::rtl::OUString BasicMigration_getImplementationName()
{
- static ::rtl::OUString* pImplName = 0;
- if ( !pImplName )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pImplName )
- {
- static ::rtl::OUString aImplName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.desktop.migration.Basic" ) );
- pImplName = &aImplName;
- }
- }
- return *pImplName;
+ return ::rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.desktop.migration.Basic"));
}
// -----------------------------------------------------------------------------
Sequence< ::rtl::OUString > BasicMigration_getSupportedServiceNames()
{
- static Sequence< ::rtl::OUString >* pNames = 0;
- if ( !pNames )
- {
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
- if ( !pNames )
- {
- static Sequence< ::rtl::OUString > aNames(1);
- aNames.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.migration.Basic" ) );
- pNames = &aNames;
- }
- }
- return *pNames;
+ Sequence< ::rtl::OUString > aNames(1);
+ aNames.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.migration.Basic" ) );
+ return aNames;
}
// =============================================================================
@@ -111,7 +92,7 @@ namespace migration
::osl::DirectoryItem aItem;
while ( aDir.getNextItem( aItem ) == ::osl::FileBase::E_None )
{
- ::osl::FileStatus aFileStatus( FileStatusMask_Type | FileStatusMask_FileURL );
+ ::osl::FileStatus aFileStatus( osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileURL );
if ( aItem.getFileStatus( aFileStatus ) == ::osl::FileBase::E_None )
{
if ( aFileStatus.getFileType() == ::osl::FileStatus::Directory )
@@ -176,14 +157,14 @@ namespace migration
::rtl::OString aMsg( "BasicMigration::copyFiles: cannot copy " );
aMsg += ::rtl::OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 ) + " to "
+ ::rtl::OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 );
- OSL_ENSURE( sal_False, aMsg.getStr() );
+ OSL_FAIL( aMsg.getStr() );
}
++aI;
}
}
else
{
- OSL_ENSURE( sal_False, "BasicMigration::copyFiles: no user installation!" );
+ OSL_FAIL( "BasicMigration::copyFiles: no user installation!" );
}
}
@@ -230,11 +211,11 @@ 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) )
{
- OSL_ENSURE( false, "BasicMigration::initialize: argument UserData has wrong type!" );
+ OSL_FAIL( "BasicMigration::initialize: argument UserData has wrong type!" );
}
m_sSourceDir += sSourceUserBasic;
break;
@@ -272,3 +253,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 9b6433ba88e8..49260cadd522 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 d869993f39c3..195cc012b404 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.
@@ -31,7 +32,7 @@
#include "cppuhelper/implementationentry.hxx"
#include "basicmigration.hxx"
#include "wordbookmigration.hxx"
-//#include "extensionmigration.hxx"
+
extern "C"
{
@@ -48,22 +49,25 @@ extern "C"
migration::WordbookMigration_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
0, 0
},
-// {
-// migration::ExtensionMigration_create, migration::ExtensionMigration_getImplementationName,
-// migration::ExtensionMigration_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
-// 0, 0
-// },
+ // Extension migration was disabled by Oracle / OpenOffice.org
+#if 0
+ {
+ migration::ExtensionMigration_create, migration::ExtensionMigration_getImplementationName,
+ migration::ExtensionMigration_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
+#endif
{ 0, 0, 0, 0, 0, 0 }
};
-void SAL_CALL component_getImplementationEnvironment(
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-void * SAL_CALL component_getFactory(
+SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return ::cppu::component_getFactoryHelper(
@@ -71,3 +75,5 @@ void * SAL_CALL component_getFactory(
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/cexportsoo3.cxx b/desktop/source/migration/services/cexportsoo3.cxx
index 589701d534d5..66e45a3f2da2 100644
--- a/desktop/source/migration/services/cexportsoo3.cxx
+++ b/desktop/source/migration/services/cexportsoo3.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,13 +46,13 @@ extern "C"
};
-void SAL_CALL component_getImplementationEnvironment(
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-void * SAL_CALL component_getFactory(
+SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
return ::cppu::component_getFactoryHelper(
@@ -59,3 +60,5 @@ void * SAL_CALL component_getFactory(
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/cppumaker.mk b/desktop/source/migration/services/cppumaker.mk
index 5ab16ed1e3fe..5ab16ed1e3fe 100644..100755
--- a/desktop/source/migration/services/cppumaker.mk
+++ b/desktop/source/migration/services/cppumaker.mk
diff --git a/desktop/source/migration/services/jvmfwk.cxx b/desktop/source/migration/services/jvmfwk.cxx
index 381b6cb378c1..53c3596ae4f4 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.
@@ -51,6 +52,8 @@
#include <stdio.h>
#include "osl/thread.hxx"
+using ::rtl::OUString;
+
#define OUSTR(x) rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( x ))
#define SERVICE_NAME "com.sun.star.migration.Java"
@@ -60,7 +63,6 @@
#define USER_CLASS_PATH 2
namespace css = com::sun::star;
-using namespace rtl;
using namespace com::sun::star::uno;
using namespace com::sun::star::beans;
using namespace com::sun::star::lang;
@@ -77,7 +79,7 @@ public:
JavaInfo* pData;
CJavaInfo();
~CJavaInfo();
- operator JavaInfo* ();
+ operator JavaInfo* () const;
};
CJavaInfo::CJavaInfo(): pData(NULL)
@@ -89,7 +91,7 @@ CJavaInfo::~CJavaInfo()
jfw_freeJavaInfo(pData);
}
-CJavaInfo::operator JavaInfo*()
+CJavaInfo::operator JavaInfo*() const
{
return pData;
}
@@ -276,7 +278,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 +289,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,12 +297,11 @@ 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) )
{
- OSL_ENSURE(
- false,
+ OSL_FAIL(
"[Service implementation " IMPL_NAME
"] XInitialization::initialize: Argument UserData has wrong type.");
}
@@ -342,9 +343,9 @@ void JavaMigration::migrateJavarc()
{
if (jfw_setSelectedJRE(aInfo) != JFW_E_NONE)
{
- OSL_ENSURE(0, "[Service implementation " IMPL_NAME
+ OSL_FAIL("[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 a79d36b8b86b..c1938e03ae87 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/makefile.mk b/desktop/source/migration/services/makefile.mk
index 38f97084b36e..f74dec646b1d 100644..100755
--- a/desktop/source/migration/services/makefile.mk
+++ b/desktop/source/migration/services/makefile.mk
@@ -34,6 +34,7 @@ COMP1TYPELIST = migrationoo2
LIBTARGET=NO
# --- Settings -----------------------------------------------------
+
.INCLUDE : ..$/..$/deployment/inc/dp_misc.mk
.INCLUDE : settings.mk
DLLPRE =
@@ -42,9 +43,7 @@ DLLPRE =
.INCLUDE : cppumaker.mk
-.IF "$(SYSTEM_DB)" == "YES"
-CFLAGS+=-DSYSTEM_DB -I$(DB_INCLUDES)
-.ENDIF
+CFLAGS+= $(SYSTEM_DB_CFLAGS)
SLOFILES= \
$(SLO)$/jvmfwk.obj \
@@ -80,7 +79,6 @@ SHL1STDLIBS= \
SHL1DEPN=
SHL1IMPLIB=imigrationoo2
-#SHL1LIBS=$(SLB)$/$(TARGET).lib
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
@@ -108,7 +106,6 @@ SHL2STDLIBS= \
SHL2DEPN=
SHL2IMPLIB=imigrationoo3
-#SHL2LIBS=$(SLB)$/$(SHL2TARGET).lib
SHL2DEF=$(MISC)$/$(SHL2TARGET).def
DEF2NAME=$(SHL2TARGET)
diff --git a/desktop/source/migration/services/migrationoo2.component b/desktop/source/migration/services/migrationoo2.component
index 2b21ab123b9e..2b21ab123b9e 100644..100755
--- a/desktop/source/migration/services/migrationoo2.component
+++ b/desktop/source/migration/services/migrationoo2.component
diff --git a/desktop/source/migration/services/migrationoo2.xml b/desktop/source/migration/services/migrationoo2.xml
index 5bda732f0fba..5bda732f0fba 100644..100755
--- a/desktop/source/migration/services/migrationoo2.xml
+++ b/desktop/source/migration/services/migrationoo2.xml
diff --git a/desktop/source/migration/services/migrationoo3.component b/desktop/source/migration/services/migrationoo3.component
index 380c389ab7b9..380c389ab7b9 100644..100755
--- a/desktop/source/migration/services/migrationoo3.component
+++ b/desktop/source/migration/services/migrationoo3.component
diff --git a/desktop/source/migration/services/misc.hxx b/desktop/source/migration/services/misc.hxx
index 8bab95c09a57..54396863bb8c 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.cxx b/desktop/source/migration/services/oo3extensionmigration.cxx
index 8bb9e82f3810..dc508e712cc9 100644
--- a/desktop/source/migration/services/oo3extensionmigration.cxx
+++ b/desktop/source/migration/services/oo3extensionmigration.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.
@@ -139,7 +140,7 @@ OO3ExtensionMigration::~OO3ExtensionMigration()
void OO3ExtensionMigration::scanUserExtensions( const ::rtl::OUString& sSourceDir, TStringVector& aMigrateExtensions )
{
osl::Directory aScanRootDir( sSourceDir );
- osl::FileStatus fs(FileStatusMask_Type | FileStatusMask_FileURL);
+ osl::FileStatus fs(osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileURL);
osl::FileBase::RC nRetCode = aScanRootDir.open();
if ( nRetCode == osl::Directory::E_None )
{
@@ -186,7 +187,7 @@ OO3ExtensionMigration::ScanResult OO3ExtensionMigration::scanExtensionFolder( co
{
// work through directory contents...
osl::DirectoryItem item;
- osl::FileStatus fs(FileStatusMask_Type | FileStatusMask_FileURL);
+ osl::FileStatus fs(osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileURL);
TStringVector aDirectories;
while ((aDir.getNextItem(item) == osl::FileBase::E_None ) &&
( aResult == SCANRESULT_NOTFOUND ))
@@ -414,14 +415,14 @@ void OO3ExtensionMigration::initialize( const Sequence< Any >& aArguments ) thro
{
beans::NamedValue aValue;
*pIter >>= aValue;
- if ( aValue.Name.equalsAscii( "UserData" ) )
+ if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UserData" ) ) )
{
if ( !(aValue.Value >>= m_sSourceDir) )
{
- OSL_ENSURE( false, "ExtensionMigration::initialize: argument UserData has wrong type!" );
+ OSL_FAIL( "ExtensionMigration::initialize: argument UserData has wrong type!" );
}
}
- else if ( aValue.Name.equalsAscii( "ExtensionBlackList" ) )
+ else if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "ExtensionBlackList" ) ) )
{
Sequence< ::rtl::OUString > aBlackList;
if ( (aValue.Value >>= aBlackList ) && ( aBlackList.getLength() > 0 ))
@@ -433,28 +434,6 @@ void OO3ExtensionMigration::initialize( const Sequence< Any >& aArguments ) thro
}
}
-// -----------------------------------------------------------------------------
-
-TStringVectorPtr getContent( const ::rtl::OUString& rBaseURL )
-{
- TStringVectorPtr aResult( new TStringVector );
- ::osl::Directory aDir( rBaseURL);
- if ( aDir.open() == ::osl::FileBase::E_None )
- {
- // iterate over directory content
- TStringVector aSubDirs;
- ::osl::DirectoryItem aItem;
- while ( aDir.getNextItem( aItem ) == ::osl::FileBase::E_None )
- {
- ::osl::FileStatus aFileStatus( FileStatusMask_Type | FileStatusMask_FileURL );
- if ( aItem.getFileStatus( aFileStatus ) == ::osl::FileBase::E_None )
- aResult->push_back( aFileStatus.getFileURL() );
- }
- }
-
- return aResult;
-}
-
Any OO3ExtensionMigration::execute( const Sequence< beans::NamedValue >& )
throw (lang::IllegalArgumentException, Exception, RuntimeException)
{
@@ -581,3 +560,5 @@ Reference< XInterface > SAL_CALL OO3ExtensionMigration_create(
// -----------------------------------------------------------------------------
} // namespace migration
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/oo3extensionmigration.hxx b/desktop/source/migration/services/oo3extensionmigration.hxx
index fb58692c81ee..adadb3b293e6 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.
@@ -158,3 +159,5 @@ namespace migration
//.........................................................................
#endif // _DESKTOP_OO3EXTENSIONMIGRATION_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/wordbookmigration.cxx b/desktop/source/migration/services/wordbookmigration.cxx
index fb73a905db6b..dc3c73efff5b 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.
@@ -113,7 +114,7 @@ namespace migration
::osl::DirectoryItem aItem;
while ( aDir.getNextItem( aItem ) == ::osl::FileBase::E_None )
{
- ::osl::FileStatus aFileStatus( FileStatusMask_Type | FileStatusMask_FileURL );
+ ::osl::FileStatus aFileStatus( osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileURL );
if ( aItem.getFileStatus( aFileStatus ) == ::osl::FileBase::E_None )
{
if ( aFileStatus.getFileType() == ::osl::FileStatus::Directory )
@@ -223,7 +224,7 @@ bool IsUserWordbook( const ::rtl::OUString& rFile )
::rtl::OString aMsg( "WordbookMigration::copyFiles: cannot copy " );
aMsg += ::rtl::OUStringToOString( *aI, RTL_TEXTENCODING_UTF8 ) + " to "
+ ::rtl::OUStringToOString( sTargetName, RTL_TEXTENCODING_UTF8 );
- OSL_ENSURE( sal_False, aMsg.getStr() );
+ OSL_FAIL( aMsg.getStr() );
}
}
++aI;
@@ -231,7 +232,7 @@ bool IsUserWordbook( const ::rtl::OUString& rFile )
}
else
{
- OSL_ENSURE( sal_False, "WordbookMigration::copyFiles: no user installation!" );
+ OSL_FAIL( "WordbookMigration::copyFiles: no user installation!" );
}
}
@@ -278,11 +279,11 @@ 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) )
{
- OSL_ENSURE( false, "WordbookMigration::initialize: argument UserData has wrong type!" );
+ OSL_FAIL( "WordbookMigration::initialize: argument UserData has wrong type!" );
}
m_sSourceDir += sSourceSubDir;
break;
@@ -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 f4dc4c0d2628..72077e16b657 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/migration/wizard.cxx b/desktop/source/migration/wizard.cxx
index 3489d7186b4f..bb4be7e9f4e2 100644
--- a/desktop/source/migration/wizard.cxx
+++ b/desktop/source/migration/wizard.cxx
@@ -388,9 +388,7 @@ sal_Bool FirstStartWizard::onFinish()
// return sal_True;
if ( svt::RoadmapWizard::onFinish() )
{
-#ifndef OS2 // cannot enable quickstart on first startup, see shutdownicon.cxx comments.
enableQuickstart();
-#endif
disableWizard();
return sal_True;
}
@@ -447,15 +445,15 @@ void FirstStartWizard::storeAcceptDate()
Reference< XMultiServiceFactory > theConfigProvider = Reference< XMultiServiceFactory >(
xFactory->createInstance(sConfigSrvc), UNO_QUERY_THROW);
Sequence< Any > theArgs(1);
- NamedValue v(OUString::createFromAscii("NodePath"),
- makeAny(OUString::createFromAscii("org.openoffice.Setup/Office")));
+ NamedValue v(OUString(RTL_CONSTASCII_USTRINGPARAM("NodePath")),
+ makeAny(OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup/Office"))));
theArgs[0] <<= v;
Reference< XPropertySet > pset = Reference< XPropertySet >(
theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs), UNO_QUERY_THROW);
- Any result = pset->getPropertyValue(OUString::createFromAscii("LicenseAcceptDate"));
+ Any result = pset->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("LicenseAcceptDate")));
OUString aAcceptDate = _getCurrentDateString();
- pset->setPropertyValue(OUString::createFromAscii("LicenseAcceptDate"), makeAny(aAcceptDate));
+ pset->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("LicenseAcceptDate")), makeAny(aAcceptDate));
Reference< XChangesBatch >(pset, UNO_QUERY_THROW)->commitChanges();
// since the license is accepted the local user registry can be cleaned if required
@@ -474,16 +472,16 @@ void FirstStartWizard::setPatchLevel()
Reference< XMultiServiceFactory > theConfigProvider = Reference< XMultiServiceFactory >(
xFactory->createInstance(sConfigSrvc), UNO_QUERY_THROW);
Sequence< Any > theArgs(1);
- NamedValue v(OUString::createFromAscii("NodePath"),
- makeAny(OUString::createFromAscii("org.openoffice.Office.Common/Help/Registration")));
+ NamedValue v(OUString(RTL_CONSTASCII_USTRINGPARAM("NodePath")),
+ makeAny(OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Office.Common/Help/Registration"))));
theArgs[0] <<= v;
Reference< XPropertySet > pset = Reference< XPropertySet >(
theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs), UNO_QUERY_THROW);
- Any result = pset->getPropertyValue(OUString::createFromAscii("ReminderDate"));
+ Any result = pset->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("ReminderDate")));
OUString aPatchLevel( RTL_CONSTASCII_USTRINGPARAM( "Patch" ));
aPatchLevel += OUString::valueOf( getBuildId(), 10 );
- pset->setPropertyValue(OUString::createFromAscii("ReminderDate"), makeAny(aPatchLevel));
+ pset->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("ReminderDate")), makeAny(aPatchLevel));
Reference< XChangesBatch >(pset, UNO_QUERY_THROW)->commitChanges();
} catch (const Exception&)
{
@@ -546,12 +544,12 @@ void FirstStartWizard::disableWizard()
Reference< XMultiServiceFactory > theConfigProvider = Reference< XMultiServiceFactory >(
xFactory->createInstance(sConfigSrvc), UNO_QUERY_THROW);
Sequence< Any > theArgs(1);
- NamedValue v(OUString::createFromAscii("NodePath"),
- makeAny(OUString::createFromAscii("org.openoffice.Setup/Office")));
+ NamedValue v(OUString(RTL_CONSTASCII_USTRINGPARAM("NodePath")),
+ makeAny(OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup/Office"))));
theArgs[0] <<= v;
Reference< XPropertySet > pset = Reference< XPropertySet >(
theConfigProvider->createInstanceWithArguments(sAccessSrvc, theArgs), UNO_QUERY_THROW);
- pset->setPropertyValue(OUString::createFromAscii("FirstStartWizardCompleted"), makeAny(sal_True));
+ pset->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("FirstStartWizardCompleted")), makeAny(sal_True));
Reference< XChangesBatch >(pset, UNO_QUERY_THROW)->commitChanges();
} catch (const Exception&)
{
@@ -569,7 +567,7 @@ void FirstStartWizard::enableQuickstart()
aSeq[1] <<= bAutostart;
Reference < XInitialization > xQuickstart( ::comphelper::getProcessServiceFactory()->createInstance(
- OUString::createFromAscii( "com.sun.star.office.Quickstart" )),UNO_QUERY );
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.office.Quickstart"))),UNO_QUERY );
if ( xQuickstart.is() )
xQuickstart->initialize( aSeq );
diff --git a/desktop/source/migration/wizard.hrc b/desktop/source/migration/wizard.hrc
index 8f35488c58b3..8f35488c58b3 100644..100755
--- a/desktop/source/migration/wizard.hrc
+++ b/desktop/source/migration/wizard.hrc
diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx
index 430737106a59..5d7561b628e6 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,29 +275,17 @@ 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;
}
}
- /*
- else if ( aName.compareToAscii("com.sun.star.ucb.RemoteContentProviderAcceptor" ))
- {
- Reference< XMultiServiceFactory > rSMgr = ::comphelper::getProcessServiceFactory();
- if ( rSMgr.is() ) {
- try {
- rInstance = rSMgr->createInstance( sObjectName );
- }
- catch (Exception const &) {}
- }
- }
- */
return rInstance;
}
@@ -311,14 +297,12 @@ extern "C"
{
using namespace desktop;
-void SAL_CALL
-component_getImplementationEnvironment(const sal_Char **ppEnvironmentTypeName, uno_Environment **)
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(const sal_Char **ppEnvironmentTypeName, uno_Environment **)
{
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-void * SAL_CALL
-component_getFactory(const sal_Char *pImplementationName, void *pServiceManager, void *)
+SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(const sal_Char *pImplementationName, void *pServiceManager, void *)
{
void* pReturn = NULL ;
if ( pImplementationName && pServiceManager )
@@ -348,3 +332,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 87f50db032dd..e4e22da631bd 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/offacc/makefile.mk b/desktop/source/offacc/makefile.mk
index 809c28414bef..809c28414bef 100644..100755
--- a/desktop/source/offacc/makefile.mk
+++ b/desktop/source/offacc/makefile.mk
diff --git a/desktop/source/offacc/offacc.component b/desktop/source/offacc/offacc.component
index 6f0d4a97a2d2..6f0d4a97a2d2 100644..100755
--- a/desktop/source/offacc/offacc.component
+++ b/desktop/source/offacc/offacc.component
diff --git a/desktop/source/pagein/makefile.mk b/desktop/source/pagein/makefile.mk
index 01452a858e66..1125e45b1a41 100644..100755
--- a/desktop/source/pagein/makefile.mk
+++ b/desktop/source/pagein/makefile.mk
@@ -29,11 +29,6 @@ PRJ=..$/..
PRJNAME=desktop
TARGET=pagein
-TARGETTYPE=CUI
-LIBTARGET=NO
-
-NO_DEFAULT_STL=TRUE
-LIBSALCPPRT=$(0)
# --- Settings -----------------------------------------------------
@@ -41,19 +36,6 @@ LIBSALCPPRT=$(0)
.INCLUDE .IGNORE : icuversion.mk
-# --- Files --------------------------------------------------------
-
-OBJFILES= \
- $(OBJ)$/pagein.obj \
- $(OBJ)$/file_image_unx.obj
-
-APP1TARGET=$(TARGET)
-APP1OBJS=$(OBJFILES)
-APP1CODETYPE=C
-
-# depends on libc only.
-STDLIB=
-
# --- Targets ------------------------------------------------------
ALL: \
@@ -72,28 +54,33 @@ UNODLLPOST=.uno$(DLLPOST)
DFTDLLPOST=$(DLLPOSTFIX)$(DLLPOST) # Default
URELIBPATH=..$/ure-link$/lib
+UREMISCPATH=..$/ure-link$/share$/misc
$(MISC)$/$(TARGET)-calc : makefile.mk
@echo Making: $@
@-echo $(DLLPRE)sc$(DFTDLLPOST) > $@
+ @-echo $(DLLPRE)scui$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)svx$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)svxcore$(DFTDLLPOST) >> $@
$(MISC)$/$(TARGET)-draw : makefile.mk
@echo Making: $@
@-echo $(DLLPRE)sd$(DFTDLLPOST) > $@
+ @-echo $(DLLPRE)sdui$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)svx$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)svxcore$(DFTDLLPOST) >> $@
$(MISC)$/$(TARGET)-impress : makefile.mk
@echo Making: $@
@-echo $(DLLPRE)sd$(DFTDLLPOST) > $@
+ @-echo $(DLLPRE)sdui$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)svx$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)svxcore$(DFTDLLPOST) >> $@
$(MISC)$/$(TARGET)-writer : makefile.mk
@echo Making: $@
@-echo $(DLLPRE)sw$(DFTDLLPOST) > $@
+ @-echo $(DLLPRE)swui$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)svx$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)svxcore$(DFTDLLPOST) >> $@
@@ -105,7 +92,7 @@ $(MISC)$/$(TARGET)-common : makefile.mk
@-echo $(DLLPRE)icui18n$(ICUDLLPOST) >> $@
@-echo $(DLLPRE)icule$(ICUDLLPOST) >> $@
@-echo $(DLLPRE)icuuc$(ICUDLLPOST) >> $@
- @-echo $(DLLPRE)icudata$(ICUDLLPOST) >> $@
+# @-echo $(DLLPRE)icudata$(ICUDLLPOST) >> $@ - a huge dll, almost none of it used
.ENDIF # SYSTEM_ICU
#
@-echo $(DLLPRE)lng$(DFTDLLPOST) >> $@
@@ -119,9 +106,8 @@ $(MISC)$/$(TARGET)-common : makefile.mk
@-echo $(DLLPRE)package2$(DLLPOST) >> $@
@-echo $(DLLPRE)ucpfile1$(DLLPOST) >> $@
@-echo $(DLLPRE)ucb1$(DLLPOST) >> $@
- @-echo $(DLLPRE)configmgr$(DLLPOST) >> $@
+ @-echo configmgr$(UNODLLPOST) >> $@
#
- @-echo $(DLLPRE)dtrans$(DLLPOST) >> $@
@-echo $(DLLPRE)vclplug_gen$(DFTDLLPOST) >> $@
.IF "$(ENABLE_GTK)" != ""
@-echo $(DLLPRE)vclplug_gtk$(DFTDLLPOST) >> $@
@@ -141,14 +127,7 @@ $(MISC)$/$(TARGET)-common : makefile.mk
@-echo $(URELIBPATH)$/bootstrap$(UNODLLPOST) >> $@
@-echo $(URELIBPATH)$/$(DLLPRE)reg$(UDKDLLPOST) >> $@
@-echo $(URELIBPATH)$/$(DLLPRE)store$(UDKDLLPOST) >> $@
-.IF "$(USE_SYSTEM_STL)"!="YES"
-.IF "$(COMNAME)" == "gcc2" || "$(COMNAME)" == "gcc3"
- @-echo $(URELIBPATH)$/$(DLLPRE)stlport_gcc$(DLLPOST) >> $@
-.ENDIF # gcc
-.IF "$(COMNAME)" == "sunpro5"
- @-echo $(URELIBPATH)$/$(DLLPRE)stlport_sunpro$(DLLPOST) >> $@
-.ENDIF # sunpro5
-.ENDIF # SYSTEM_STL
+ @-echo $(URELIBPATH)$/reflection$(UNODLLPOST) >> $@
@-echo $(URELIBPATH)$/$(DLLPRE)uno_cppuhelper$(COMID)$(UDKDLLPOST) >> $@
@-echo $(URELIBPATH)$/$(DLLPRE)uno_cppu$(UDKDLLPOST) >> $@
@-echo $(URELIBPATH)$/$(DLLPRE)uno_sal$(UDKDLLPOST) >> $@
@@ -160,6 +139,31 @@ $(MISC)$/$(TARGET)-common : makefile.mk
@-echo $(DLLPRE)svl$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)vcl$(DFTDLLPOST) >> $@
@-echo $(DLLPRE)tk$(DFTDLLPOST) >> $@
- @-echo $(DLLPRE)svt$(DFTDLLPOST) >> $@
- @-echo $(DLLPRE)sfx$(DFTDLLPOST) >> $@
- @-echo $(DLLPRE)sofficeapp$(DLLPOST) >> $@
+ @-echo $(UREMISCPATH)$/types.rdb >> $@
+ @-echo services.rdb >> $@
+ @-echo oovbaapi.rdb >> $@
+ @-echo deployment$(DLLPOSTFIX)$(UNODLLPOST) >> $@
+ @-echo $(DLLPRE)deploymentmisc$(DFTDLLPOST) >> $@
+ @-echo $(DLLPRE)ucb1$(DLLPOST) >> $@
+ @-echo $(DLLPRE)xstor$(DLLPOST) >> $@
+ @-echo $(DLLPRE)package2$(DLLPOST) >> $@
+ @-echo $(DLLPRE)filterconfig1$(DLLPOST) >> $@
+ @-echo $(DLLPRE)uui$(DFTDLLPOST) >> $@
+ @-echo $(DLLPRE)lng$(DFTDLLPOST) >> $@
+ @-echo $(DLLPRE)svt$(DFTDLLPOST) >> $@
+ @-echo $(DLLPRE)spl$(DFTDLLPOST) >> $@
+ @-echo $(DLLPRE)basegfx$(DFTDLLPOST) >> $@
+ @-echo $(DLLPRE)avmedia$(DFTDLLPOST) >> $@
+ @-echo $(DLLPRE)helplinker$(DFTDLLPOST) >> $@
+ @-echo $(DLLPRE)vclplug_gen$(DFTDLLPOST) >> $@
+ @-echo $(DLLPRE)icule$(ICUDLLPOST) >> $@
+ @-echo sax$(UNODLLPOST) >> $@
+ @-echo gconfbe1$(UNODLLPOST) >> $@
+ @-echo fsstorage$(UNODLLPOST) >> $@
+ @-echo desktopbe1$(UNODLLPOST) >> $@
+ @-echo localebe1$(UNODLLPOST) >> $@
+ @-echo ucpexpand1$(UNODLLPOST) >> $@
+# stoc bits
+ @-echo $(DLLPRE)sfx$(DFTDLLPOST) >> $@
+ @-echo $(DLLPRE)sofficeapp$(DLLPOST) >> $@
+
diff --git a/desktop/source/pkgchk/unopkg/makefile.mk b/desktop/source/pkgchk/unopkg/makefile.mk
index 8384f1b24372..e96cf60f0f42 100644..100755
--- a/desktop/source/pkgchk/unopkg/makefile.mk
+++ b/desktop/source/pkgchk/unopkg/makefile.mk
@@ -29,11 +29,7 @@ PRJ = ..$/..$/..
PRJNAME = desktop
TARGET = unopkg
-.IF "$(GUI)" == "OS2"
-TARGETTYPE = CUI
-.ELSE
TARGETTYPE = GUI
-.ENDIF
ENABLE_EXCEPTIONS = TRUE
LIBTARGET=NO
@@ -41,9 +37,7 @@ PRJINC += ..$/..$/deployment ..$/..
.INCLUDE : settings.mk
.INCLUDE : $(PRJ)$/source$/deployment$/inc$/dp_misc.mk
-.IF "$(SYSTEM_DB)" == "YES"
-CFLAGS+=-DSYSTEM_DB -I$(DB_INCLUDES)
-.ENDIF
+CFLAGS+= $(SYSTEM_DB_CFLAGS)
.IF "$(LINK_SO)"!=""
APP1TARGET = so$/unopkg
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 83552cb7c4c6..5411e40a91ca 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.
@@ -102,8 +103,7 @@ const char s_usingText [] =
" -V, --version version information\n"
" -v, --verbose verbose output to stdout\n"
" -f, --force force overwriting existing extensions\n"
-" -s, --suppress-license prevents showing the license provided that\n"
-" the extension allows it\n"
+" -s, --suppress-license prevents showing the license\n"
" --log-file <file> custom log file; default: <cache-dir>/log.txt\n"
" --shared expert feature: operate on shared installation\n"
" deployment context;\n"
@@ -222,7 +222,6 @@ void disposeBridges(Reference<css::uno::XComponentContext> ctx)
}
}
-//##############################################################################
extern "C" int unopkg_main()
{
tools::extendApplicationEnvironment();
@@ -427,7 +426,7 @@ extern "C" int unopkg_main()
Reference< ::com::sun::star::ucb::XCommandEnvironment > xCmdEnv(
createCmdEnv( xComponentContext, logFile,
- option_force, option_verbose) );
+ option_force, option_verbose, option_suppressLicense) );
//synchronize bundled/shared extensions
//Do not synchronize when command is "reinstall". This could add types and services to UNO and
@@ -517,10 +516,9 @@ extern "C" int unopkg_main()
//Now prepare the vector which tells what extension has an
//unaccepted license
vecUnaccepted.resize(vecExtUnaccepted.size() + vec_packages.size());
- ::std::vector<bool>::iterator i_unaccepted =
- ::std::fill_n(vecUnaccepted.begin(),
- vecExtUnaccepted.size(), true);
- ::std::fill_n(i_unaccepted, vec_packages.size(), false);
+ ::std::fill_n(vecUnaccepted.begin(), vecExtUnaccepted.size(), true);
+ ::std::fill_n(vecUnaccepted.begin() + vecExtUnaccepted.size(),
+ vec_packages.size(), false);
dp_misc::writeConsole(
OUSTR("All deployed ") + repository + OUSTR(" extensions:\n\n"));
@@ -709,3 +707,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 69a973b90a42..1732b3fb5f88 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.
@@ -66,7 +67,7 @@ namespace {
//==============================================================================
struct OfficeLocale :
- public rtl::StaticWithInit<const lang::Locale, OfficeLocale> {
+ public rtl::StaticWithInit<lang::Locale, OfficeLocale> {
const lang::Locale operator () () {
OUString slang;
if (! (::utl::ConfigManager::GetDirectConfigProperty(
@@ -85,6 +86,7 @@ class CommandEnvironmentImpl
sal_Int32 m_logLevel;
bool m_option_force_overwrite;
bool m_option_verbose;
+ bool m_option_suppress_license;
Reference< XComponentContext > m_xComponentContext;
Reference< XProgressHandler > m_xLogFile;
@@ -98,7 +100,8 @@ public:
Reference<XComponentContext> const & xComponentContext,
OUString const & log_file,
bool option_force_overwrite,
- bool option_verbose);
+ bool option_verbose,
+ bool option_suppress_license);
// XCommandEnvironment
virtual Reference< task::XInteractionHandler > SAL_CALL
@@ -123,10 +126,12 @@ CommandEnvironmentImpl::CommandEnvironmentImpl(
Reference<XComponentContext> const & xComponentContext,
OUString const & log_file,
bool option_force_overwrite,
- bool option_verbose)
+ bool option_verbose,
+ bool option_suppressLicense)
: m_logLevel(0),
m_option_force_overwrite( option_force_overwrite ),
m_option_verbose( option_verbose ),
+ m_option_suppress_license( option_suppressLicense ),
m_xComponentContext(xComponentContext)
{
if (log_file.getLength() > 0) {
@@ -150,7 +155,7 @@ CommandEnvironmentImpl::~CommandEnvironmentImpl()
}
catch (RuntimeException & exc) {
(void) exc;
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
exc.Message, osl_getThreadTextEncoding() ).getStr() );
}
}
@@ -279,7 +284,13 @@ void CommandEnvironmentImpl::handle(
}
else if (request >>= licExc)
{
- printLicense(licExc.ExtensionName, licExc.Text, approve, abort);
+ if ( !m_option_suppress_license )
+ printLicense(licExc.ExtensionName, licExc.Text, approve, abort);
+ else
+ {
+ approve = true;
+ abort = false;
+ }
}
else if (request >>= instExc)
{
@@ -424,10 +435,12 @@ Reference< XCommandEnvironment > createCmdEnv(
Reference< XComponentContext > const & xContext,
OUString const & logFile,
bool option_force_overwrite,
- bool option_verbose)
+ bool option_verbose,
+ bool option_suppress_license)
{
return new CommandEnvironmentImpl(
- xContext, logFile, option_force_overwrite, option_verbose);
+ xContext, logFile, option_force_overwrite, option_verbose, option_suppress_license);
}
} // 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 6a6cb846972d..07e310c3b402 100644..100755
--- 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 08f02612a818..a4d66cf17c05 100644..100755
--- 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 f6773b768062..a2c9baf4986e 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.
@@ -104,7 +105,7 @@ OptionInfo const * getOptionInfo(
}
}
}
- OSL_ENSURE( 0, ::rtl::OUStringToOString(
+ OSL_FAIL( ::rtl::OUStringToOString(
opt, osl_getThreadTextEncoding() ).getStr() );
return 0;
}
@@ -176,11 +177,10 @@ bool readArgument(
return false;
}
-//##############################################################################
namespace {
struct ExecutableDir : public rtl::StaticWithInit<
- const OUString, ExecutableDir> {
+ OUString, ExecutableDir> {
const OUString operator () () {
OUString path;
if (osl_getExecutableFile( &path.pData ) != osl_Process_E_None) {
@@ -191,10 +191,10 @@ struct ExecutableDir : public rtl::StaticWithInit<
}
};
struct ProcessWorkingDir : public rtl::StaticWithInit<
- const OUString, ProcessWorkingDir> {
+ OUString, ProcessWorkingDir> {
const OUString operator () () {
OUString workingDir;
- tools::getProcessWorkingDir(&workingDir);
+ tools::getProcessWorkingDir(workingDir);
return workingDir;
}
};
@@ -255,7 +255,6 @@ OUString makeAbsoluteFileUrl(
? abs.copy( 0, abs.getLength() -1 ) : abs;
}
-//##############################################################################
namespace {
@@ -356,7 +355,7 @@ void printf_packages(
{
typedef ::std::vector< Reference<deployment::XPackage> >::const_iterator I_EXT;
int index = 0;
- for (I_EXT i = allExtensions.begin(); i != allExtensions.end(); i++, index++)
+ for (I_EXT i = allExtensions.begin(); i != allExtensions.end(); ++i, ++index)
{
if (vecUnaccepted[index])
printf_unaccepted_licenses(*i);
@@ -368,7 +367,6 @@ void printf_packages(
}
-//##############################################################################
namespace {
@@ -546,7 +544,7 @@ bool hasNoFolder(OUString const & folderUrl)
osl::File::RC rcNext = osl::File::E_None;
while ( (rcNext = dir.getNextItem(i)) == osl::File::E_None)
{
- osl::FileStatus stat(FileStatusMask_Type);
+ osl::FileStatus stat(osl_FileStatus_Mask_Type);
if (i.getFileStatus(stat) == osl::File::E_None)
{
if (stat.getFileType() == osl::FileStatus::Directory)
@@ -598,7 +596,7 @@ void removeFolder(OUString const & folderUrl)
::osl::File::RC rcNext = ::osl::File::E_None;
while ( (rcNext = dir.getNextItem(i)) == ::osl::File::E_None)
{
- ::osl::FileStatus stat(FileStatusMask_Type | FileStatusMask_FileURL);
+ ::osl::FileStatus stat(osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileURL);
if (i.getFileStatus(stat) == ::osl::File::E_None)
{
::osl::FileStatus::Type t = stat.getFileType();
@@ -636,3 +634,5 @@ void removeFolder(OUString const & folderUrl)
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/pkgchk/unopkg/unopkg_shared.h b/desktop/source/pkgchk/unopkg/unopkg_shared.h
index 55c86260ca8f..feffd892a27e 100644..100755
--- 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.
@@ -55,7 +56,7 @@ namespace unopkg {
struct OfficeLocale :
- public rtl::StaticWithInit<const css::lang::Locale, OfficeLocale> {
+ public rtl::StaticWithInit<css::lang::Locale, OfficeLocale> {
const css::lang::Locale operator () () {
::rtl::OUString slang;
if (! (::utl::ConfigManager::GetDirectConfigProperty(
@@ -168,7 +169,8 @@ css::uno::Reference<css::ucb::XCommandEnvironment> createCmdEnv(
css::uno::Reference<css::uno::XComponentContext> const & xContext,
::rtl::OUString const & logFile,
bool option_force_overwrite,
- bool option_verbose);
+ bool option_verbose,
+ bool option_suppressLicense);
//==============================================================================
void printf_packages(
::std::vector<
@@ -192,3 +194,4 @@ void removeFolder(::rtl::OUString const & folderUrl);
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/pkgchk/unopkg/version.map b/desktop/source/pkgchk/unopkg/version.map
index 6d34cb662d2c..6d34cb662d2c 100644..100755
--- a/desktop/source/pkgchk/unopkg/version.map
+++ b/desktop/source/pkgchk/unopkg/version.map
diff --git a/desktop/source/registration/com/sun/star/registration/Registration.java b/desktop/source/registration/com/sun/star/registration/Registration.java
index e5c98dd51ab8..4da6199c621c 100644..100755
--- a/desktop/source/registration/com/sun/star/registration/Registration.java
+++ b/desktop/source/registration/com/sun/star/registration/Registration.java
@@ -311,7 +311,6 @@ public class Registration {
out.close();
int returnCode = con.getResponseCode();
-// if (returnCode == HttpURLConnection.HTTP_OK);
} catch(java.lang.Exception e) {
// IOException and UnknownHostException
}
diff --git a/desktop/source/registration/com/sun/star/registration/makefile.mk b/desktop/source/registration/com/sun/star/registration/makefile.mk
index 859802256256..859802256256 100644..100755
--- a/desktop/source/registration/com/sun/star/registration/makefile.mk
+++ b/desktop/source/registration/com/sun/star/registration/makefile.mk
diff --git a/desktop/source/registration/com/sun/star/registration/manifest b/desktop/source/registration/com/sun/star/registration/manifest
index 952aaa804e96..952aaa804e96 100644..100755
--- a/desktop/source/registration/com/sun/star/registration/manifest
+++ b/desktop/source/registration/com/sun/star/registration/manifest
diff --git a/desktop/source/registration/com/sun/star/registration/productregistration.jar.component b/desktop/source/registration/com/sun/star/registration/productregistration.jar.component
index c022a98ae010..c022a98ae010 100644..100755
--- a/desktop/source/registration/com/sun/star/registration/productregistration.jar.component
+++ b/desktop/source/registration/com/sun/star/registration/productregistration.jar.component
diff --git a/desktop/source/registration/com/sun/star/servicetag/BrowserSupport.java b/desktop/source/registration/com/sun/star/servicetag/BrowserSupport.java
index 87d83d5339ac..87d83d5339ac 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/BrowserSupport.java
+++ b/desktop/source/registration/com/sun/star/servicetag/BrowserSupport.java
diff --git a/desktop/source/registration/com/sun/star/servicetag/Installer.java b/desktop/source/registration/com/sun/star/servicetag/Installer.java
index ba1b5c4b86d5..ba1b5c4b86d5 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/Installer.java
+++ b/desktop/source/registration/com/sun/star/servicetag/Installer.java
diff --git a/desktop/source/registration/com/sun/star/servicetag/LinuxSystemEnvironment.java b/desktop/source/registration/com/sun/star/servicetag/LinuxSystemEnvironment.java
index 6f9cc022d223..ff762d202e35 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/LinuxSystemEnvironment.java
+++ b/desktop/source/registration/com/sun/star/servicetag/LinuxSystemEnvironment.java
@@ -156,7 +156,6 @@ class LinuxSystemEnvironment extends SystemEnvironment {
// reads from dmidecode with the given type and target
// returns an empty string if nothing was found or an error occurred
- //
// Sample output segment:
// Handle 0x0001
// DMI type 1, 25 bytes.
diff --git a/desktop/source/registration/com/sun/star/servicetag/RegistrationData.java b/desktop/source/registration/com/sun/star/servicetag/RegistrationData.java
index 66eb1933210a..66eb1933210a 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/RegistrationData.java
+++ b/desktop/source/registration/com/sun/star/servicetag/RegistrationData.java
diff --git a/desktop/source/registration/com/sun/star/servicetag/RegistrationDocument.java b/desktop/source/registration/com/sun/star/servicetag/RegistrationDocument.java
index fb13b581c0ce..fb13b581c0ce 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/RegistrationDocument.java
+++ b/desktop/source/registration/com/sun/star/servicetag/RegistrationDocument.java
diff --git a/desktop/source/registration/com/sun/star/servicetag/Registry.java b/desktop/source/registration/com/sun/star/servicetag/Registry.java
index 932b0d7e1cb5..1415a75fd28a 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/Registry.java
+++ b/desktop/source/registration/com/sun/star/servicetag/Registry.java
@@ -157,7 +157,6 @@ public class Registry {
// $JAVA_HOME/bin/java -cp $TEST_DIR \
// -Dstclient.registry.path=$TEST_DIR/registry.xml \
// SvcTagClient
- //
// On Windows, the JAVA_HOME and TEST_DIR path could contain
// space e.g. c:\Program Files\Java\jdk1.6.0_05\bin\java.
// The SVCTAG_STCLIENT_CMD must be set with a list of
diff --git a/desktop/source/registration/com/sun/star/servicetag/ServiceTag.java b/desktop/source/registration/com/sun/star/servicetag/ServiceTag.java
index 4adb36772517..4adb36772517 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/ServiceTag.java
+++ b/desktop/source/registration/com/sun/star/servicetag/ServiceTag.java
diff --git a/desktop/source/registration/com/sun/star/servicetag/SolarisServiceTag.java b/desktop/source/registration/com/sun/star/servicetag/SolarisServiceTag.java
index 4f99d890577f..4f99d890577f 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/SolarisServiceTag.java
+++ b/desktop/source/registration/com/sun/star/servicetag/SolarisServiceTag.java
diff --git a/desktop/source/registration/com/sun/star/servicetag/SolarisSystemEnvironment.java b/desktop/source/registration/com/sun/star/servicetag/SolarisSystemEnvironment.java
index fa98580fd6b5..4a5a980938e1 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/SolarisSystemEnvironment.java
+++ b/desktop/source/registration/com/sun/star/servicetag/SolarisSystemEnvironment.java
@@ -309,7 +309,6 @@ class SolarisSystemEnvironment extends SystemEnvironment {
// Sample smbios output segment:
// ID SIZE TYPE
// 1 150 SMB_TYPE_SYSTEM (system information)
- //
// Manufacturer: Sun Microsystems
// Product: Sun Fire X4600
// Version: To Be Filled By O.E.M.
diff --git a/desktop/source/registration/com/sun/star/servicetag/SunConnection.java b/desktop/source/registration/com/sun/star/servicetag/SunConnection.java
index db525ea637f4..db525ea637f4 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/SunConnection.java
+++ b/desktop/source/registration/com/sun/star/servicetag/SunConnection.java
diff --git a/desktop/source/registration/com/sun/star/servicetag/SysnetRegistryHelper.java b/desktop/source/registration/com/sun/star/servicetag/SysnetRegistryHelper.java
index ca0a16858670..362136cc6f46 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/SysnetRegistryHelper.java
+++ b/desktop/source/registration/com/sun/star/servicetag/SysnetRegistryHelper.java
@@ -113,7 +113,6 @@ public class SysnetRegistryHelper {
// $JAVA_HOME/bin/java -cp $TEST_DIR \
// -Dstclient.registry.path=$TEST_DIR/registry.xml \
// SvcTagClient
- //
// On Windows, the JAVA_HOME and TEST_DIR path could contain
// space e.g. c:\Program Files\Java\jdk1.6.0_05\bin\java.
// The SVCTAG_STCLIENT_CMD must be set with a list of
diff --git a/desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java b/desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java
index 76eaca37e39a..76eaca37e39a 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java
+++ b/desktop/source/registration/com/sun/star/servicetag/SystemEnvironment.java
diff --git a/desktop/source/registration/com/sun/star/servicetag/UnauthorizedAccessException.java b/desktop/source/registration/com/sun/star/servicetag/UnauthorizedAccessException.java
index 898fb614c267..898fb614c267 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/UnauthorizedAccessException.java
+++ b/desktop/source/registration/com/sun/star/servicetag/UnauthorizedAccessException.java
diff --git a/desktop/source/registration/com/sun/star/servicetag/Util.java b/desktop/source/registration/com/sun/star/servicetag/Util.java
index 1f54775e7d3c..1f54775e7d3c 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/Util.java
+++ b/desktop/source/registration/com/sun/star/servicetag/Util.java
diff --git a/desktop/source/registration/com/sun/star/servicetag/WindowsSystemEnvironment.java b/desktop/source/registration/com/sun/star/servicetag/WindowsSystemEnvironment.java
index 3aa799e16d5e..3aa799e16d5e 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/WindowsSystemEnvironment.java
+++ b/desktop/source/registration/com/sun/star/servicetag/WindowsSystemEnvironment.java
diff --git a/desktop/source/registration/com/sun/star/servicetag/makefile.mk b/desktop/source/registration/com/sun/star/servicetag/makefile.mk
index 784964652950..784964652950 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/makefile.mk
+++ b/desktop/source/registration/com/sun/star/servicetag/makefile.mk
diff --git a/desktop/source/registration/com/sun/star/servicetag/resources/product_registration.xsd b/desktop/source/registration/com/sun/star/servicetag/resources/product_registration.xsd
index 6681a563a01e..6681a563a01e 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/resources/product_registration.xsd
+++ b/desktop/source/registration/com/sun/star/servicetag/resources/product_registration.xsd
diff --git a/desktop/source/so_comp/evaluation.cxx b/desktop/source/so_comp/evaluation.cxx
index 4cbb38931d37..8890d26462ec 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.
@@ -42,12 +43,13 @@
#include "../app/desktop.hrc"
-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 ::rtl::OUString;
+
namespace desktop {
static SOEvaluation* pSOEval=0;
@@ -66,7 +68,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 +146,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 +205,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 a1225029b297..aff94c3ac6f4 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/makefile.mk b/desktop/source/so_comp/makefile.mk
index 7f9ceb4b646a..4d8d479b9658 100644..100755
--- a/desktop/source/so_comp/makefile.mk
+++ b/desktop/source/so_comp/makefile.mk
@@ -37,11 +37,6 @@ ENABLE_EXCEPTIONS=TRUE
.INCLUDE : settings.mk
-# --- Define time bomb date. Not active for OOo --------------------
-# --- Change something in evaluation.cxx!!! (e.g. line 313)
-# --- You must use the yyyymmdd format!!! --------------------------
-#CDEFS+=-DTIMEBOMB=20050930
-
# --- Files --------------------------------------------------------
SLOFILES = $(SLO)$/evaluation.obj \
diff --git a/desktop/source/so_comp/oemjob.cxx b/desktop/source/so_comp/oemjob.cxx
index 1b78da694ff7..bdb45e5eb0a7 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.
@@ -42,7 +43,6 @@
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
-using namespace rtl;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
@@ -50,6 +50,10 @@ using namespace ::com::sun::star::ui::dialogs;
using namespace ::com::sun::star::frame;
using namespace ::com::sun::star::util;
+using ::rtl::OUString;
+using ::rtl::OUStringBuffer;
+using ::rtl::Bootstrap;
+
namespace desktop{
char const OEM_PRELOAD_SECTION[] = "Bootstrap";
@@ -67,7 +71,7 @@ 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()
@@ -150,7 +154,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
@@ -162,33 +166,6 @@ throw ( RuntimeException )
} else {
// user declined...
// terminate.
- /*
- Reference< XDesktop > xDesktop( m_xServiceManager->createInstance(
- OUString::createFromAscii("com.sun.star.frame.Desktop")),
- UNO_QUERY );
- xDesktop->terminate();
- */
- /*
- OUString aName;
- OUString aEnvType;
- Reference<XFrame> rFrame;
- Reference<XModel> rModel;
- Reference<XCloseable> rClose;
- for (int i=0; i<args.getLength(); i++)
- {
- if (args[i].Name.equalsAscii("EnvType"))
- args[i].Value >>= aEnvType;
- else if (args[i].Name.equalsAscii("Frame")) {
- args[i].Value >>= rFrame;
- rClose = Reference<XCloseable>(rFrame, UNO_QUERY);
- }
- else if (args[i].Name.equalsAscii("Model")) {
- args[i].Value >>= rModel;
- rClose = Reference<XCloseable>(rModel, UNO_QUERY);
- }
- }
- if (rClose.is()) rClose->close(sal_True);
- */
bCont = sal_False;
}
}
@@ -196,19 +173,11 @@ throw ( RuntimeException )
// don't try again
bCont = sal_True;
}
- /*
- NamedValue nv;
- nv.Name = OUString::createFromAscii("Deactivate");
- nv.Value <<= bDeactivate;
- Sequence<NamedValue> s(1);
- s[0] = nv;
- */
Any r;
r <<= bCont;
return r;
}
-
static sal_Bool existsURL( OUString const& _sURL )
{
using namespace osl;
@@ -220,7 +189,6 @@ static sal_Bool existsURL( OUString const& _sURL )
return sal_False;
}
-
// locate soffice.ini/.rc file
static OUString locateIniFile()
{
@@ -278,3 +246,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 16a111badab9..140ee0e9af10 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 e28d762fc69b..014df23af2b6 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.
@@ -41,13 +42,14 @@
#include <string.h>
-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;
+using ::rtl::OUString;
+
static const char* pServices[] =
{
SOEvaluation::serviceName,
@@ -71,7 +73,6 @@ static const fProvider pInstanceProviders[] =
NULL
};
-
static const char** pSupportedServices[] =
{
SOEvaluation::interfaces,
@@ -92,16 +93,14 @@ getSupportedServiceNames(int p) {
extern "C"
{
-void SAL_CALL
-component_getImplementationEnvironment(
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char** ppEnvironmentTypeName,
uno_Environment**)
{
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-void* SAL_CALL
-component_getFactory(
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,
void*)
@@ -132,3 +131,5 @@ component_getFactory(
return NULL;
}
} // extern "C"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/so_comp/socomp.component b/desktop/source/so_comp/socomp.component
index a53035223c39..a53035223c39 100644..100755
--- a/desktop/source/so_comp/socomp.component
+++ b/desktop/source/so_comp/socomp.component
diff --git a/desktop/source/splash/firststart.cxx b/desktop/source/splash/firststart.cxx
deleted file mode 100755
index 21a0a562269a..000000000000
--- a/desktop/source/splash/firststart.cxx
+++ /dev/null
@@ -1,156 +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 "firststart.hxx"
-#include "../migration/wizard.hxx"
-#include <comphelper/sequenceashashmap.hxx>
-
-using namespace rtl;
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::beans;
-
-namespace desktop{
-
-
-const char* FirstStart::interfaces[] =
-{
- "com.sun.star.task.XJob",
- NULL,
-};
-const char* FirstStart::implementationName = "com.sun.star.comp.desktop.FirstStart";
-const char* FirstStart::serviceName = "com.sun.star.task.Job";
-
-OUString FirstStart::GetImplementationName()
-{
- return OUString( RTL_CONSTASCII_USTRINGPARAM( implementationName));
-}
-
-Sequence< OUString > FirstStart::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;
-}
-
-Reference< XInterface > SAL_CALL FirstStart::CreateInstance(
- const Reference< XMultiServiceFactory >& rSMgr )
-{
- static osl::Mutex aMutex;
- osl::MutexGuard guard( aMutex );
- return (XComponent*) ( new FirstStart( rSMgr ) );
-}
-
-FirstStart::FirstStart( const Reference< XMultiServiceFactory >& xFactory ) :
- m_aListeners( m_aMutex ),
- m_xServiceManager( xFactory )
-{
-}
-
-FirstStart::~FirstStart()
-{
-}
-
-// XComponent
-void SAL_CALL FirstStart::dispose() throw ( RuntimeException )
-{
- EventObject aObject;
- aObject.Source = (XComponent*)this;
- m_aListeners.disposeAndClear( aObject );
-}
-
-void SAL_CALL FirstStart::addEventListener( const Reference< XEventListener > & aListener) throw ( RuntimeException )
-{
- m_aListeners.addInterface( aListener );
-}
-
-void SAL_CALL FirstStart::removeEventListener( const Reference< XEventListener > & aListener ) throw ( RuntimeException )
-{
- m_aListeners.removeInterface( aListener );
-}
-
-// XServiceInfo
-::rtl::OUString SAL_CALL FirstStart::getImplementationName()
-throw ( RuntimeException )
-{
- return FirstStart::GetImplementationName();
-}
-
-sal_Bool SAL_CALL FirstStart::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 FirstStart::getSupportedServiceNames()
-throw ( RuntimeException )
-{
- return FirstStart::GetSupportedServiceNames();
-}
-
-// XJob
-Any SAL_CALL FirstStart::execute(const Sequence<NamedValue>& args)
-throw ( RuntimeException )
-{
- static const ::rtl::OUString ARG_LICENSENEEDED( RTL_CONSTASCII_USTRINGPARAM( "LicenseNeedsAcceptance" ) );
- static const ::rtl::OUString ARG_LICENSEPATH( RTL_CONSTASCII_USTRINGPARAM( "LicensePath" ) );
-
- ::comphelper::SequenceAsHashMap lArgs(args);
-
- sal_Bool bLicenseNeeded = lArgs.getUnpackedValueOrDefault( ARG_LICENSENEEDED, (sal_Bool)sal_True );
- rtl::OUString aLicensePath = lArgs.getUnpackedValueOrDefault( ARG_LICENSEPATH, rtl::OUString() );
-
- FirstStartWizard fsw( NULL, bLicenseNeeded && ( aLicensePath.getLength() > 0 ), aLicensePath );
- return makeAny( (sal_Bool)fsw.Execute() );
-}
-
-// XJobExecutor
-void SAL_CALL FirstStart::trigger(const OUString&)
-throw ( RuntimeException )
-{
- // trigger wizard with override, so it gets started regardless of
- // configuration
- Sequence<NamedValue> seq(1);
- seq[0] = NamedValue(
- OUString::createFromAscii("Override"),
- makeAny(sal_True));
- execute(seq);
-}
-
-
-} // namespace desktop
diff --git a/desktop/source/splash/firststart.hxx b/desktop/source/splash/firststart.hxx
deleted file mode 100755
index fe45833cfae7..000000000000
--- a/desktop/source/splash/firststart.hxx
+++ /dev/null
@@ -1,90 +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.
- *
- ************************************************************************/
-
-#ifndef _SOCOMP_FIRSTSTART_HXX_
-#define _SOCOMP_FIRSTSTART_HXX_
-
-#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/XJob.hpp>
-#include <cppuhelper/implbase4.hxx>
-#include <cppuhelper/interfacecontainer.h>
-#include <com/sun/star/task/XJobExecutor.hpp>
-#include <com/sun/star/lang/XSingleServiceFactory.hpp>
-#include <osl/mutex.hxx>
-
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::task;
-
-namespace desktop{
-
-class FirstStart : public ::cppu::WeakImplHelper4< XJob, XJobExecutor, XComponent, XServiceInfo >
-{
-
-private:
- ::osl::Mutex m_aMutex;
- ::cppu::OInterfaceContainerHelper m_aListeners;
- Reference< XMultiServiceFactory > m_xServiceManager;
-
-public:
- FirstStart( const Reference < XMultiServiceFactory >& xFactory );
- virtual ~FirstStart();
-
- static ::rtl::OUString GetImplementationName();
- static Sequence< rtl::OUString > GetSupportedServiceNames();
-
-
- // XComponent
- virtual void SAL_CALL dispose() throw ( RuntimeException );
- virtual void SAL_CALL addEventListener( const Reference< XEventListener > & aListener) throw ( RuntimeException );
- virtual void SAL_CALL removeEventListener(const Reference< XEventListener > & aListener) throw ( RuntimeException );
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName() throw ( RuntimeException );
- virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& rServiceName ) throw ( RuntimeException );
- virtual Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw ( RuntimeException );
-
- //XJob
- virtual Any SAL_CALL execute(const Sequence<NamedValue>& args)throw ( RuntimeException );
- //XJobExecutor
- virtual void SAL_CALL trigger(const rtl::OUString& arg)throw ( RuntimeException );
-
- static const char* interfaces[];
- static const char* implementationName;
- static const char* serviceName;
- static Reference<XInterface> SAL_CALL CreateInstance(
- const Reference< XMultiServiceFactory >&);
-
-
-};
-}
-
-#endif // _SOCOMP_FIRSTSTART_HXX_
diff --git a/desktop/source/splash/makefile.mk b/desktop/source/splash/makefile.mk
index 02483aae83dd..8db499d7c913 100644..100755
--- 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)
@@ -65,10 +61,9 @@ SHL1STDLIBS= \
$(COMPHELPERLIB) \
$(UNOTOOLSLIB) \
$(TOOLSLIB) \
- $(UCBHELPERLIB) \
+ $(UCBHELPERLIB) \
$(CPPUHELPERLIB) \
$(CPPULIB) \
- $(VOSLIB) \
$(SALLIB) \
$(SFXLIB)
@@ -76,18 +71,6 @@ SHL1STDLIBS= \
.INCLUDE : target.mk
-$(SLO)$/splash.obj : $(INCCOM)$/introbmpnames.hxx
-
-.INCLUDE .IGNORE : $(MISC)$/intro_bmp_names.mk
-
-.IF "$(INTRO_BITMAPS:f)"!="$(LASTTIME_INTRO_BITMAPS)"
-DO_PHONY=.PHONY
-.ENDIF # "$(INTRO_BITMAPS:f)"!="$(LASTTIME_INTRO_BITMAPS)"
-
-$(INCCOM)$/introbmpnames.hxx $(DO_PHONY):
- echo const char INTRO_BITMAP_STRINGLIST[]=$(EMQ)"$(INTRO_BITMAPS:f:t",")$(EMQ)"$(EMQ); > $@
- echo LASTTIME_INTRO_BITMAPS=$(INTRO_BITMAPS:f) > $(MISC)$/intro_bmp_names.mk
-
ALLTAR : $(MISC)/spl.component
$(MISC)/spl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
diff --git a/desktop/source/splash/services_spl.cxx b/desktop/source/splash/services_spl.cxx
index 4b1130c71cdf..e01f96655e81 100755..100644
--- a/desktop/source/splash/services_spl.cxx
+++ b/desktop/source/splash/services_spl.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.
@@ -35,27 +36,24 @@
#include <unotools/configmgr.hxx>
#include "splash.hxx"
-#include "firststart.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;
+using ::rtl::OUString;
+
static const char* pServices[] =
{
SplashScreen::serviceName,
- FirstStart::serviceName,
NULL
};
static const char* pImplementations[] =
{
SplashScreen::implementationName,
- FirstStart::implementationName,
NULL
};
@@ -64,15 +62,12 @@ 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
};
@@ -89,16 +84,14 @@ getSupportedServiceNames(int p) {
extern "C"
{
-void SAL_CALL
-component_getImplementationEnvironment(
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char** ppEnvironmentTypeName,
uno_Environment**)
{
*ppEnvironmentTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME ;
}
-void* SAL_CALL
-component_getFactory(
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory(
const sal_Char* pImplementationName,
void* pServiceManager,
void*)
@@ -129,3 +122,5 @@ component_getFactory(
return NULL;
}
} // extern "C"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/splash/spl.component b/desktop/source/splash/spl.component
index 2caecf5c0e4b..2caecf5c0e4b 100644..100755
--- a/desktop/source/splash/spl.component
+++ b/desktop/source/splash/spl.component
diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx
index db14293f789d..42e1dfd51c0d 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( sal_True );
Show();
@@ -138,7 +138,7 @@ void SAL_CALL SplashScreen::reset()
void SAL_CALL SplashScreen::setText(const OUString& rText)
throw (RuntimeException)
{
- ::vos::OGuard aSolarGuard( Application::GetSolarMutex() );
+ SolarMutexGuard aSolarGuard;
if ( _sProgressText != rText )
{
_sProgressText = rText;
@@ -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( sal_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 );
@@ -253,9 +254,7 @@ void SplashScreen::updateStatus()
{
if (!_bVisible || _bProgressEnd) return;
if (!_bPaintProgress) _bPaintProgress = sal_True;
- //_bPaintBitmap=sal_False;
Paint(Rectangle());
- //_bPaintBitmap=sal_True;
Flush();
}
@@ -264,7 +263,6 @@ IMPL_LINK( SplashScreen, AppEventListenerHdl, VclWindowEvent *, inEvent )
{
if ( inEvent != 0 )
{
- // Paint( Rectangle() );
switch ( inEvent->GetId() )
{
case VCLEVENT_WINDOW_SHOW:
@@ -321,8 +319,6 @@ void SplashScreen::loadConfig()
if ( sProgressFrameColor.getLength() )
{
sal_uInt8 nRed = 0;
- sal_uInt8 nGreen = 0;
- sal_uInt8 nBlue = 0;
sal_Int32 idx = 0;
sal_Int32 temp = sProgressFrameColor.getToken( 0, ',', idx ).toInt32();
if ( idx != -1 )
@@ -332,8 +328,8 @@ void SplashScreen::loadConfig()
}
if ( idx != -1 )
{
- nGreen = static_cast< sal_uInt8 >( temp );
- nBlue = static_cast< sal_uInt8 >( sProgressFrameColor.getToken( 0, ',', idx ).toInt32() );
+ sal_uInt8 nGreen = static_cast< sal_uInt8 >( temp );
+ sal_uInt8 nBlue = static_cast< sal_uInt8 >( sProgressFrameColor.getToken( 0, ',', idx ).toInt32() );
_cProgressFrameColor = Color( nRed, nGreen, nBlue );
}
}
@@ -341,8 +337,6 @@ void SplashScreen::loadConfig()
if ( sProgressBarColor.getLength() )
{
sal_uInt8 nRed = 0;
- sal_uInt8 nGreen = 0;
- sal_uInt8 nBlue = 0;
sal_Int32 idx = 0;
sal_Int32 temp = sProgressBarColor.getToken( 0, ',', idx ).toInt32();
if ( idx != -1 )
@@ -352,8 +346,8 @@ void SplashScreen::loadConfig()
}
if ( idx != -1 )
{
- nGreen = static_cast< sal_uInt8 >( temp );
- nBlue = static_cast< sal_uInt8 >( sProgressBarColor.getToken( 0, ',', idx ).toInt32() );
+ sal_uInt8 nGreen = static_cast< sal_uInt8 >( temp );
+ sal_uInt8 nBlue = static_cast< sal_uInt8 >( sProgressBarColor.getToken( 0, ',', idx ).toInt32() );
_cProgressBarColor = Color( nRed, nGreen, nBlue );
}
}
@@ -389,91 +383,7 @@ void SplashScreen::loadConfig()
}
}
-void SplashScreen::initBitmap()
-{
- if ( _bShowLogo )
- {
- OUString sExecutePath;
- ::rtl::Bootstrap::get(
- OUString( RTL_CONSTASCII_USTRINGPARAM( "BRAND_BASE_DIR" ) ),
- sExecutePath );
- sExecutePath += OUString( RTL_CONSTASCII_USTRINGPARAM( "/program/" ) );
-
- bool haveBitmap = false;
-
- // Try all bitmaps in INTRO_BITMAP_NAMES
- sal_Int32 nIndex = 0;
- OUString aIntroBitmapFiles( RTL_CONSTASCII_USTRINGPARAM( INTRO_BITMAP_STRINGLIST ));
- do
- {
- haveBitmap = loadBitmap( sExecutePath, aIntroBitmapFiles.getToken( 0, ',', nIndex ) );
- }
- while ( !haveBitmap && ( nIndex >= 0 ) );
-
- if (!haveBitmap) {
- rtl::OUString edition(
- rtl::OUString(
- RTL_CONSTASCII_USTRINGPARAM(
- "${BRAND_BASE_DIR}/program/edition")));
- rtl::Bootstrap::expandMacros(edition);
- haveBitmap = findBitmap(edition);
- }
- if (!haveBitmap) {
- findBitmap(sExecutePath);
- }
- }
-}
-
-bool SplashScreen::loadBitmap(
- rtl::OUString const & path, const rtl::OUString &rBmpFileName )
-{
- if ( rBmpFileName.getLength() == 0 )
- return false;
-
- INetURLObject aObj( path, INET_PROT_FILE );
- aObj.insertName( rBmpFileName );
-
- SvFileStream aStrm( aObj.PathToFileName(), STREAM_STD_READ );
- if ( !aStrm.GetError() )
- {
- // Use graphic class to also support more graphic formats (bmp,png,...)
- Graphic aGraphic;
-
- GraphicFilter* pGF = GraphicFilter::GetGraphicFilter();
- pGF->ImportGraphic( aGraphic, String(), aStrm, GRFILTER_FORMAT_DONTKNOW );
-
- // Default case, we load the intro bitmap from a seperate file
- // (e.g. staroffice_intro.bmp or starsuite_intro.bmp)
- _aIntroBmp = aGraphic.GetBitmapEx();
- return true;
- }
-
- return false;
-}
-
-bool SplashScreen::findBitmap(rtl::OUString const & path) {
- bool haveBitmap = false;
- if ( _bFullScreenSplash )
- {
- haveBitmap = findScreenBitmap(path);
- if ( haveBitmap )
- _eBitmapMode = BM_FULLSCREEN;
- else
- haveBitmap = findAppBitmap(path);
- }
- if ( !haveBitmap )
- {
- haveBitmap = loadBitmap(
- path, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("intro.png")));
- if ( !haveBitmap )
- haveBitmap = loadBitmap(
- path, rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("intro.bmp")));
- }
-
- return haveBitmap;
-}
-
-bool SplashScreen::findScreenBitmap(rtl::OUString const & path)
+void SplashScreen::SetScreenBitmap(BitmapEx &rBitmap)
{
sal_Int32 nWidth( 0 );
sal_Int32 nHeight( 0 );
@@ -489,70 +399,28 @@ 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 );
- aStrBuf.appendAscii( "_" );
- }
- aStrBuf.append( OUString::valueOf( nWidth ));
- aStrBuf.appendAscii( "x" );
- aStrBuf.append( OUString::valueOf( nHeight ));
-
- OUString aRootIntroFileName = aStrBuf.makeStringAndClear();
- OUString aBmpFileName = aRootIntroFileName + OUString::createFromAscii(".png");
-
- bool haveBitmap = loadBitmap( path, aBmpFileName );
- if ( !haveBitmap )
- {
- aBmpFileName = aRootIntroFileName + OUString::createFromAscii(".bmp");
- haveBitmap = loadBitmap( path, aBmpFileName );
- }
-
- if ( !haveBitmap )
- {
- aStrBuf.appendAscii( "intro_" );
- aStrBuf.appendAscii( "_" );
- aStrBuf.append( OUString::valueOf( nWidth ));
- aStrBuf.appendAscii( "x" );
- aStrBuf.append( OUString::valueOf( nHeight ));
-
- aRootIntroFileName = aStrBuf.makeStringAndClear();
- aBmpFileName = aRootIntroFileName + OUString::createFromAscii(".png");
-
- haveBitmap = loadBitmap( path, aBmpFileName );
- if ( !haveBitmap )
- {
- aBmpFileName = aRootIntroFileName + OUString::createFromAscii(".bmp");
- haveBitmap = loadBitmap( path, aBmpFileName );
- }
+ aStrBuf.append( OUStringToOString(_sAppName, RTL_TEXTENCODING_UTF8) );
+ aStrBuf.append( "_" );
}
- return haveBitmap;
-}
-
-bool SplashScreen::findAppBitmap(rtl::OUString const & path)
-{
- bool haveBitmap = false;
+ aResBuf.append( OString::valueOf( nWidth ));
+ aResBuf.append( "x" );
+ aResBuf.append( OString::valueOf( nHeight ));
- if ( _sAppName.getLength() > 0 )
- {
- OUStringBuffer aStrBuf( 128 );
- aStrBuf.appendAscii( "intro_" );
- aStrBuf.appendAscii( "_" );
- aStrBuf.append( _sAppName );
+ aStrBuf.append( aResBuf.getStr() );
+ if (Application::LoadBrandBitmap (aStrBuf.makeStringAndClear().getStr(), rBitmap))
+ return;
- OUString aRootIntroFileName = aStrBuf.makeStringAndClear();
+ aStrBuf.append( "intro_" );
+ aStrBuf.append( aResBuf.getStr() );
+ if (Application::LoadBrandBitmap (aResBuf.makeStringAndClear().getStr(), rBitmap))
+ return;
- OUString aBmpFileName = aRootIntroFileName + OUString::createFromAscii( ".png" );
- haveBitmap = loadBitmap( path, aBmpFileName );
- if ( !haveBitmap )
- {
- aBmpFileName = aRootIntroFileName + OUString::createFromAscii( ".bmp" );
- haveBitmap = loadBitmap( path, aBmpFileName );
- }
- }
- return haveBitmap;
+ Application::LoadBrandBitmap ("intro", rBitmap);
}
void SplashScreen::determineProgressRatioValues(
@@ -676,12 +544,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 +576,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 8480ed3df9ae..0d4858402b83 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/active/Dispatch.java b/desktop/test/deployment/active/Dispatch.java
index 25443f96e092..25443f96e092 100644..100755
--- a/desktop/test/deployment/active/Dispatch.java
+++ b/desktop/test/deployment/active/Dispatch.java
diff --git a/desktop/test/deployment/active/MANIFEST.MF b/desktop/test/deployment/active/MANIFEST.MF
index 63480874dd55..63480874dd55 100644..100755
--- a/desktop/test/deployment/active/MANIFEST.MF
+++ b/desktop/test/deployment/active/MANIFEST.MF
diff --git a/desktop/test/deployment/active/Provider.java b/desktop/test/deployment/active/Provider.java
index df31979f4b9d..df31979f4b9d 100644..100755
--- a/desktop/test/deployment/active/Provider.java
+++ b/desktop/test/deployment/active/Provider.java
diff --git a/desktop/test/deployment/active/Services.java b/desktop/test/deployment/active/Services.java
index 4ea19f4b7a71..4ea19f4b7a71 100644..100755
--- a/desktop/test/deployment/active/Services.java
+++ b/desktop/test/deployment/active/Services.java
diff --git a/desktop/test/deployment/active/active_native.cxx b/desktop/test/deployment/active/active_native.cxx
index a34d8de88a61..3d3001897859 100644
--- a/desktop/test/deployment/active/active_native.cxx
+++ b/desktop/test/deployment/active/active_native.cxx
@@ -277,14 +277,14 @@ static cppu::ImplementationEntry const services[] = {
}
-extern "C" void * SAL_CALL component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
char const * pImplName, void * pServiceManager, void * pRegistryKey)
{
return cppu::component_getFactoryHelper(
pImplName, pServiceManager, pRegistryKey, services);
}
-extern "C" void SAL_CALL component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
char const ** ppEnvTypeName, uno_Environment **)
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
diff --git a/desktop/test/deployment/active/active_python.py b/desktop/test/deployment/active/active_python.py
index 8ba0947b6bf8..8ba0947b6bf8 100644..100755
--- a/desktop/test/deployment/active/active_python.py
+++ b/desktop/test/deployment/active/active_python.py
diff --git a/desktop/test/deployment/active/description.xml b/desktop/test/deployment/active/description.xml
index fd7049e0cc3d..fd7049e0cc3d 100644..100755
--- a/desktop/test/deployment/active/description.xml
+++ b/desktop/test/deployment/active/description.xml
diff --git a/desktop/test/deployment/active/makefile.mk b/desktop/test/deployment/active/makefile.mk
index 5511a39c8baf..05c19eb236e3 100644..100755
--- a/desktop/test/deployment/active/makefile.mk
+++ b/desktop/test/deployment/active/makefile.mk
@@ -50,6 +50,8 @@ DEF1NAME = $(SHL1TARGET)
.INCLUDE: target.mk
+.IF "$(SOLAR_JAVA)" != ""
+
ALLTAR : $(MISC)/active.oxt
$(MISC)/active.oxt : manifest.xml description.xml Addons.xcu \
@@ -81,3 +83,5 @@ $(MISC)/$(TARGET)/active_java.jar : MANIFEST.MF $(JAVATARGET)
$(MISC)/$(TARGET)/active_java.jar-zip/$(PACKAGE)/
cd $(MISC)/$(TARGET)/active_java.jar-zip && zip ../active_java.jar \
META-INF/MANIFEST.MF $(foreach,i,$(JAVAFILES:b) $(PACKAGE)/$i.class)
+
+.ENDIF
diff --git a/desktop/test/deployment/active/manifest.xml b/desktop/test/deployment/active/manifest.xml
index 4f076696663b..4f076696663b 100644..100755
--- a/desktop/test/deployment/active/manifest.xml
+++ b/desktop/test/deployment/active/manifest.xml
diff --git a/desktop/test/deployment/boxt/boxt.cxx b/desktop/test/deployment/boxt/boxt.cxx
index 245617a2ad12..f96103acea90 100644
--- a/desktop/test/deployment/boxt/boxt.cxx
+++ b/desktop/test/deployment/boxt/boxt.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.
@@ -167,14 +168,14 @@ static cppu::ImplementationEntry const services[] = {
}
-extern "C" void * SAL_CALL component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
char const * pImplName, void * pServiceManager, void * pRegistryKey)
{
return cppu::component_getFactoryHelper(
pImplName, pServiceManager, pRegistryKey, services);
}
-extern "C" void SAL_CALL component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
char const ** ppEnvTypeName, uno_Environment **)
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
@@ -185,3 +186,5 @@ extern "C" sal_Bool SAL_CALL component_writeInfo(
{
return component_writeInfoHelper(pServiceManager, pRegistryKey, services);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/test/deployment/boxt/description.xml b/desktop/test/deployment/boxt/description.xml
index 5a67bf3e949f..5a67bf3e949f 100644..100755
--- a/desktop/test/deployment/boxt/description.xml
+++ b/desktop/test/deployment/boxt/description.xml
diff --git a/desktop/test/deployment/boxt/makefile.mk b/desktop/test/deployment/boxt/makefile.mk
index 88e72aef4ab8..88e72aef4ab8 100644..100755
--- a/desktop/test/deployment/boxt/makefile.mk
+++ b/desktop/test/deployment/boxt/makefile.mk
diff --git a/desktop/test/deployment/boxt/manifest.xml b/desktop/test/deployment/boxt/manifest.xml
index 73ebfc306e30..73ebfc306e30 100644..100755
--- a/desktop/test/deployment/boxt/manifest.xml
+++ b/desktop/test/deployment/boxt/manifest.xml
diff --git a/desktop/test/deployment/dependencies/readme.txt b/desktop/test/deployment/dependencies/readme.txt
index a99fade00225..a99fade00225 100644..100755
--- a/desktop/test/deployment/dependencies/readme.txt
+++ b/desktop/test/deployment/dependencies/readme.txt
diff --git a/desktop/test/deployment/display_name/readme.txt b/desktop/test/deployment/display_name/readme.txt
index 23173bde63dd..23173bde63dd 100644..100755
--- a/desktop/test/deployment/display_name/readme.txt
+++ b/desktop/test/deployment/display_name/readme.txt
diff --git a/desktop/test/deployment/executable_content/build/hello.c b/desktop/test/deployment/executable_content/build/hello.c
index e9442450923a..4af0b02ff888 100644..100755
--- 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/executable_content/build/makefile.mk b/desktop/test/deployment/executable_content/build/makefile.mk
index 038051c97499..038051c97499 100644..100755
--- a/desktop/test/deployment/executable_content/build/makefile.mk
+++ b/desktop/test/deployment/executable_content/build/makefile.mk
diff --git a/desktop/test/deployment/executable_content/build/readme.txt b/desktop/test/deployment/executable_content/build/readme.txt
index 4f956e573e07..4f956e573e07 100644..100755
--- a/desktop/test/deployment/executable_content/build/readme.txt
+++ b/desktop/test/deployment/executable_content/build/readme.txt
diff --git a/desktop/test/deployment/executable_content/readme.txt b/desktop/test/deployment/executable_content/readme.txt
index ad3c01097e14..ad3c01097e14 100644..100755
--- a/desktop/test/deployment/executable_content/readme.txt
+++ b/desktop/test/deployment/executable_content/readme.txt
diff --git a/desktop/test/deployment/identifier/readme.txt b/desktop/test/deployment/identifier/readme.txt
index 8a791c586a78..8a791c586a78 100644..100755
--- a/desktop/test/deployment/identifier/readme.txt
+++ b/desktop/test/deployment/identifier/readme.txt
diff --git a/desktop/test/deployment/locationtest/LocationTest.java b/desktop/test/deployment/locationtest/LocationTest.java
index c5d24f4b0ecc..c5d24f4b0ecc 100644..100755
--- a/desktop/test/deployment/locationtest/LocationTest.java
+++ b/desktop/test/deployment/locationtest/LocationTest.java
diff --git a/desktop/test/deployment/locationtest/MANIFEST.MF b/desktop/test/deployment/locationtest/MANIFEST.MF
index a2fa8c34b7f9..a2fa8c34b7f9 100644..100755
--- a/desktop/test/deployment/locationtest/MANIFEST.MF
+++ b/desktop/test/deployment/locationtest/MANIFEST.MF
diff --git a/desktop/test/deployment/locationtest/delzip b/desktop/test/deployment/locationtest/delzip
index 636fda90bfcb..636fda90bfcb 100644..100755
--- a/desktop/test/deployment/locationtest/delzip
+++ b/desktop/test/deployment/locationtest/delzip
diff --git a/desktop/test/deployment/locationtest/description.xml b/desktop/test/deployment/locationtest/description.xml
index b8874dd4da85..b8874dd4da85 100644..100755
--- a/desktop/test/deployment/locationtest/description.xml
+++ b/desktop/test/deployment/locationtest/description.xml
diff --git a/desktop/test/deployment/locationtest/makefile.mk b/desktop/test/deployment/locationtest/makefile.mk
index 24be56c28d7e..24be56c28d7e 100644..100755
--- a/desktop/test/deployment/locationtest/makefile.mk
+++ b/desktop/test/deployment/locationtest/makefile.mk
diff --git a/desktop/test/deployment/locationtest/manifest.xml b/desktop/test/deployment/locationtest/manifest.xml
index 8791582798bd..3dd6460faffa 100644..100755
--- 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/options/handler/com/sun/star/comp/extensionoptions/MANIFEST.MF b/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/MANIFEST.MF
index fba55a6e0d5a..fba55a6e0d5a 100644..100755
--- a/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/MANIFEST.MF
+++ b/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/MANIFEST.MF
diff --git a/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/OptionsEventHandler.java b/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/OptionsEventHandler.java
index bb38108e5eea..bb38108e5eea 100644..100755
--- a/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/OptionsEventHandler.java
+++ b/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/OptionsEventHandler.java
diff --git a/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/makefile.mk b/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/makefile.mk
index 662fffce407c..662fffce407c 100644..100755
--- a/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/makefile.mk
+++ b/desktop/test/deployment/options/handler/com/sun/star/comp/extensionoptions/makefile.mk
diff --git a/desktop/test/deployment/options/readme.txt b/desktop/test/deployment/options/readme.txt
index 9879a72ceffa..9879a72ceffa 100644..100755
--- a/desktop/test/deployment/options/readme.txt
+++ b/desktop/test/deployment/options/readme.txt
diff --git a/desktop/test/deployment/passive/Dispatch.java b/desktop/test/deployment/passive/Dispatch.java
index 295f34d599da..295f34d599da 100644..100755
--- a/desktop/test/deployment/passive/Dispatch.java
+++ b/desktop/test/deployment/passive/Dispatch.java
diff --git a/desktop/test/deployment/passive/MANIFEST.MF b/desktop/test/deployment/passive/MANIFEST.MF
index 45a04bf263dc..45a04bf263dc 100644..100755
--- a/desktop/test/deployment/passive/MANIFEST.MF
+++ b/desktop/test/deployment/passive/MANIFEST.MF
diff --git a/desktop/test/deployment/passive/Provider.java b/desktop/test/deployment/passive/Provider.java
index 6f74ed9eb89e..6f74ed9eb89e 100644..100755
--- a/desktop/test/deployment/passive/Provider.java
+++ b/desktop/test/deployment/passive/Provider.java
diff --git a/desktop/test/deployment/passive/Services.java b/desktop/test/deployment/passive/Services.java
index 799df3e70222..799df3e70222 100644..100755
--- a/desktop/test/deployment/passive/Services.java
+++ b/desktop/test/deployment/passive/Services.java
diff --git a/desktop/test/deployment/passive/description.xml b/desktop/test/deployment/passive/description.xml
index 468dfa065fb1..468dfa065fb1 100644..100755
--- a/desktop/test/deployment/passive/description.xml
+++ b/desktop/test/deployment/passive/description.xml
diff --git a/desktop/test/deployment/passive/makefile.mk b/desktop/test/deployment/passive/makefile.mk
index 019e5dcab837..05defbe6d16e 100644..100755
--- a/desktop/test/deployment/passive/makefile.mk
+++ b/desktop/test/deployment/passive/makefile.mk
@@ -40,6 +40,7 @@ my_generic_components = passive_java passive_python
.INCLUDE: settings.mk
+
DLLPRE =
SLOFILES = $(SHL1OBJS)
@@ -53,6 +54,8 @@ DEF1NAME = $(SHL1TARGET)
.INCLUDE: target.mk
+.IF "$(SOLAR_JAVA)" != ""
+
ALLTAR : $(MISC)/passive.oxt
$(MISC)/passive.oxt : manifest.xml description.xml Addons.xcu \
@@ -134,3 +137,5 @@ $(MISC)/$(TARGET)/passive_java.jar : MANIFEST.MF $(JAVATARGET)
$(MISC)/$(TARGET)/passive_java.jar-zip/$(PACKAGE)/
cd $(MISC)/$(TARGET)/passive_java.jar-zip && zip ../passive_java.jar \
META-INF/MANIFEST.MF $(foreach,i,$(JAVAFILES:b) $(PACKAGE)/$i.class)
+
+.ENDIF
diff --git a/desktop/test/deployment/passive/manifest.xml b/desktop/test/deployment/passive/manifest.xml
index 5b8ac8419bb9..5b8ac8419bb9 100644..100755
--- a/desktop/test/deployment/passive/manifest.xml
+++ b/desktop/test/deployment/passive/manifest.xml
diff --git a/desktop/test/deployment/passive/passive_java.component b/desktop/test/deployment/passive/passive_java.component
index 74be57177dfe..74be57177dfe 100644..100755
--- a/desktop/test/deployment/passive/passive_java.component
+++ b/desktop/test/deployment/passive/passive_java.component
diff --git a/desktop/test/deployment/passive/passive_native.component b/desktop/test/deployment/passive/passive_native.component
index c14fd7ff0062..c14fd7ff0062 100644..100755
--- a/desktop/test/deployment/passive/passive_native.component
+++ b/desktop/test/deployment/passive/passive_native.component
diff --git a/desktop/test/deployment/passive/passive_native.cxx b/desktop/test/deployment/passive/passive_native.cxx
index 39101257ad67..5eb809d11695 100644
--- a/desktop/test/deployment/passive/passive_native.cxx
+++ b/desktop/test/deployment/passive/passive_native.cxx
@@ -275,14 +275,14 @@ static cppu::ImplementationEntry const services[] = {
}
-extern "C" void * SAL_CALL component_getFactory(
+extern "C" SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
char const * pImplName, void * pServiceManager, void * pRegistryKey)
{
return cppu::component_getFactoryHelper(
pImplName, pServiceManager, pRegistryKey, services);
}
-extern "C" void SAL_CALL component_getImplementationEnvironment(
+extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
char const ** ppEnvTypeName, uno_Environment **)
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
diff --git a/desktop/test/deployment/passive/passive_python.component b/desktop/test/deployment/passive/passive_python.component
index ea7a1992b534..ea7a1992b534 100644..100755
--- a/desktop/test/deployment/passive/passive_python.component
+++ b/desktop/test/deployment/passive/passive_python.component
diff --git a/desktop/test/deployment/passive/passive_python.py b/desktop/test/deployment/passive/passive_python.py
index dda68cccdb2f..dda68cccdb2f 100644..100755
--- a/desktop/test/deployment/passive/passive_python.py
+++ b/desktop/test/deployment/passive/passive_python.py
diff --git a/desktop/test/deployment/simple_license/suppress_license.oxt b/desktop/test/deployment/simple_license/suppress_license.oxt
index 2bacd6aa378b..2bacd6aa378b 100755..100644
--- a/desktop/test/deployment/simple_license/suppress_license.oxt
+++ b/desktop/test/deployment/simple_license/suppress_license.oxt
Binary files differ
diff --git a/desktop/test/deployment/update/changing_display_name/readme.txt b/desktop/test/deployment/update/changing_display_name/readme.txt
index 905f0be9a962..905f0be9a962 100644..100755
--- a/desktop/test/deployment/update/changing_display_name/readme.txt
+++ b/desktop/test/deployment/update/changing_display_name/readme.txt
diff --git a/desktop/test/deployment/update/changing_display_name/update1/change1.update.xml b/desktop/test/deployment/update/changing_display_name/update1/change1.update.xml
index a4fefb6d96ba..a4fefb6d96ba 100644..100755
--- a/desktop/test/deployment/update/changing_display_name/update1/change1.update.xml
+++ b/desktop/test/deployment/update/changing_display_name/update1/change1.update.xml
diff --git a/desktop/test/deployment/update/changing_display_name/update2/change1.update.xml b/desktop/test/deployment/update/changing_display_name/update2/change1.update.xml
index 8e52ce3c2b2d..8e52ce3c2b2d 100644..100755
--- a/desktop/test/deployment/update/changing_display_name/update2/change1.update.xml
+++ b/desktop/test/deployment/update/changing_display_name/update2/change1.update.xml
diff --git a/desktop/test/deployment/update/default_url/readme.txt b/desktop/test/deployment/update/default_url/readme.txt
index 4ae7936bfc18..4ae7936bfc18 100644..100755
--- a/desktop/test/deployment/update/default_url/readme.txt
+++ b/desktop/test/deployment/update/default_url/readme.txt
diff --git a/desktop/test/deployment/update/default_url/update/default1.update.xml b/desktop/test/deployment/update/default_url/update/default1.update.xml
index b3d78e29e814..b3d78e29e814 100644..100755
--- a/desktop/test/deployment/update/default_url/update/default1.update.xml
+++ b/desktop/test/deployment/update/default_url/update/default1.update.xml
diff --git a/desktop/test/deployment/update/default_url/update/default2.update.xml b/desktop/test/deployment/update/default_url/update/default2.update.xml
index a5894a18b05b..a5894a18b05b 100644..100755
--- a/desktop/test/deployment/update/default_url/update/default2.update.xml
+++ b/desktop/test/deployment/update/default_url/update/default2.update.xml
diff --git a/desktop/test/deployment/update/default_url/update/feed1.xml b/desktop/test/deployment/update/default_url/update/feed1.xml
index b504b7b4b00c..b504b7b4b00c 100644..100755
--- a/desktop/test/deployment/update/default_url/update/feed1.xml
+++ b/desktop/test/deployment/update/default_url/update/feed1.xml
diff --git a/desktop/test/deployment/update/defect/readme.txt b/desktop/test/deployment/update/defect/readme.txt
index 5e8322f5cf26..5e8322f5cf26 100644..100755
--- a/desktop/test/deployment/update/defect/readme.txt
+++ b/desktop/test/deployment/update/defect/readme.txt
diff --git a/desktop/test/deployment/update/defect/update/fail1.update.xml b/desktop/test/deployment/update/defect/update/fail1.update.xml
index 40f2d1c7df9f..40f2d1c7df9f 100644..100755
--- a/desktop/test/deployment/update/defect/update/fail1.update.xml
+++ b/desktop/test/deployment/update/defect/update/fail1.update.xml
diff --git a/desktop/test/deployment/update/defect/update/fail2.update.xml b/desktop/test/deployment/update/defect/update/fail2.update.xml
index d6bdaccb30e9..d6bdaccb30e9 100644..100755
--- a/desktop/test/deployment/update/defect/update/fail2.update.xml
+++ b/desktop/test/deployment/update/defect/update/fail2.update.xml
diff --git a/desktop/test/deployment/update/defect/update/fail3.update.xml b/desktop/test/deployment/update/defect/update/fail3.update.xml
index e7f2606d604c..e7f2606d604c 100644..100755
--- a/desktop/test/deployment/update/defect/update/fail3.update.xml
+++ b/desktop/test/deployment/update/defect/update/fail3.update.xml
diff --git a/desktop/test/deployment/update/defect/update/fail4.update.xml b/desktop/test/deployment/update/defect/update/fail4.update.xml
index 4b293f28e034..4b293f28e034 100644..100755
--- a/desktop/test/deployment/update/defect/update/fail4.update.xml
+++ b/desktop/test/deployment/update/defect/update/fail4.update.xml
diff --git a/desktop/test/deployment/update/defect/update/info1.update.xml b/desktop/test/deployment/update/defect/update/info1.update.xml
index e69de29bb2d1..e69de29bb2d1 100644..100755
--- a/desktop/test/deployment/update/defect/update/info1.update.xml
+++ b/desktop/test/deployment/update/defect/update/info1.update.xml
diff --git a/desktop/test/deployment/update/defect/update/info2.update.xml b/desktop/test/deployment/update/defect/update/info2.update.xml
index 1446608022f0..1446608022f0 100644..100755
--- a/desktop/test/deployment/update/defect/update/info2.update.xml
+++ b/desktop/test/deployment/update/defect/update/info2.update.xml
diff --git a/desktop/test/deployment/update/defect/update/info3.update.xml b/desktop/test/deployment/update/defect/update/info3.update.xml
index 62306e55b693..62306e55b693 100644..100755
--- a/desktop/test/deployment/update/defect/update/info3.update.xml
+++ b/desktop/test/deployment/update/defect/update/info3.update.xml
diff --git a/desktop/test/deployment/update/dependencies/publisher_en.html b/desktop/test/deployment/update/dependencies/publisher_en.html
index 37dbc2b9d6ce..37dbc2b9d6ce 100644..100755
--- a/desktop/test/deployment/update/dependencies/publisher_en.html
+++ b/desktop/test/deployment/update/dependencies/publisher_en.html
diff --git a/desktop/test/deployment/update/dependencies/readme.txt b/desktop/test/deployment/update/dependencies/readme.txt
index 3c71da24884d..3c71da24884d 100644..100755
--- a/desktop/test/deployment/update/dependencies/readme.txt
+++ b/desktop/test/deployment/update/dependencies/readme.txt
diff --git a/desktop/test/deployment/update/dependencies/release-notes_en.html b/desktop/test/deployment/update/dependencies/release-notes_en.html
index 0971f78d1484..0971f78d1484 100644..100755
--- a/desktop/test/deployment/update/dependencies/release-notes_en.html
+++ b/desktop/test/deployment/update/dependencies/release-notes_en.html
diff --git a/desktop/test/deployment/update/dependencies/update/update-dependencies.update.xml b/desktop/test/deployment/update/dependencies/update/update-dependencies.update.xml
index bf8a399da116..bf8a399da116 100644..100755
--- a/desktop/test/deployment/update/dependencies/update/update-dependencies.update.xml
+++ b/desktop/test/deployment/update/dependencies/update/update-dependencies.update.xml
diff --git a/desktop/test/deployment/update/license/readme.txt b/desktop/test/deployment/update/license/readme.txt
index 03123d2c5812..03123d2c5812 100644..100755
--- a/desktop/test/deployment/update/license/readme.txt
+++ b/desktop/test/deployment/update/license/readme.txt
diff --git a/desktop/test/deployment/update/license/update/lic1.update.xml b/desktop/test/deployment/update/license/update/lic1.update.xml
index 6b23b97890fc..6b23b97890fc 100644..100755
--- a/desktop/test/deployment/update/license/update/lic1.update.xml
+++ b/desktop/test/deployment/update/license/update/lic1.update.xml
diff --git a/desktop/test/deployment/update/license/update/lic2.update.xml b/desktop/test/deployment/update/license/update/lic2.update.xml
index 40f3fa47bc99..40f3fa47bc99 100644..100755
--- a/desktop/test/deployment/update/license/update/lic2.update.xml
+++ b/desktop/test/deployment/update/license/update/lic2.update.xml
diff --git a/desktop/test/deployment/update/license/update/lic3.update.xml b/desktop/test/deployment/update/license/update/lic3.update.xml
index a9c2a7995d7c..a9c2a7995d7c 100644..100755
--- a/desktop/test/deployment/update/license/update/lic3.update.xml
+++ b/desktop/test/deployment/update/license/update/lic3.update.xml
diff --git a/desktop/test/deployment/update/platform/readme.txt b/desktop/test/deployment/update/platform/readme.txt
index 2ab102a27d3c..2ab102a27d3c 100644..100755
--- a/desktop/test/deployment/update/platform/readme.txt
+++ b/desktop/test/deployment/update/platform/readme.txt
diff --git a/desktop/test/deployment/update/publisher/publisher_de-DE-altmark.html b/desktop/test/deployment/update/publisher/publisher_de-DE-altmark.html
index c770b914ad78..c770b914ad78 100644..100755
--- a/desktop/test/deployment/update/publisher/publisher_de-DE-altmark.html
+++ b/desktop/test/deployment/update/publisher/publisher_de-DE-altmark.html
diff --git a/desktop/test/deployment/update/publisher/publisher_de-DE.html b/desktop/test/deployment/update/publisher/publisher_de-DE.html
index b06ed7088f08..b06ed7088f08 100644..100755
--- a/desktop/test/deployment/update/publisher/publisher_de-DE.html
+++ b/desktop/test/deployment/update/publisher/publisher_de-DE.html
diff --git a/desktop/test/deployment/update/publisher/publisher_de.html b/desktop/test/deployment/update/publisher/publisher_de.html
index 4cba9f423d5b..4cba9f423d5b 100644..100755
--- a/desktop/test/deployment/update/publisher/publisher_de.html
+++ b/desktop/test/deployment/update/publisher/publisher_de.html
diff --git a/desktop/test/deployment/update/publisher/publisher_en-GB.html b/desktop/test/deployment/update/publisher/publisher_en-GB.html
index c73cf6219b78..c73cf6219b78 100644..100755
--- a/desktop/test/deployment/update/publisher/publisher_en-GB.html
+++ b/desktop/test/deployment/update/publisher/publisher_en-GB.html
diff --git a/desktop/test/deployment/update/publisher/publisher_en-US-region1.html b/desktop/test/deployment/update/publisher/publisher_en-US-region1.html
index 68beac724894..68beac724894 100644..100755
--- a/desktop/test/deployment/update/publisher/publisher_en-US-region1.html
+++ b/desktop/test/deployment/update/publisher/publisher_en-US-region1.html
diff --git a/desktop/test/deployment/update/publisher/publisher_en-US-region2.html b/desktop/test/deployment/update/publisher/publisher_en-US-region2.html
index 501adb659664..501adb659664 100644..100755
--- a/desktop/test/deployment/update/publisher/publisher_en-US-region2.html
+++ b/desktop/test/deployment/update/publisher/publisher_en-US-region2.html
diff --git a/desktop/test/deployment/update/publisher/publisher_en-US.html b/desktop/test/deployment/update/publisher/publisher_en-US.html
index fd2575150315..fd2575150315 100644..100755
--- a/desktop/test/deployment/update/publisher/publisher_en-US.html
+++ b/desktop/test/deployment/update/publisher/publisher_en-US.html
diff --git a/desktop/test/deployment/update/publisher/publisher_en-region3.html b/desktop/test/deployment/update/publisher/publisher_en-region3.html
index b9fdc9d657b4..b9fdc9d657b4 100644..100755
--- a/desktop/test/deployment/update/publisher/publisher_en-region3.html
+++ b/desktop/test/deployment/update/publisher/publisher_en-region3.html
diff --git a/desktop/test/deployment/update/publisher/publisher_en.html b/desktop/test/deployment/update/publisher/publisher_en.html
index 416ab8124314..416ab8124314 100644..100755
--- a/desktop/test/deployment/update/publisher/publisher_en.html
+++ b/desktop/test/deployment/update/publisher/publisher_en.html
diff --git a/desktop/test/deployment/update/publisher/readme.txt b/desktop/test/deployment/update/publisher/readme.txt
index 1a659d8e875d..1a659d8e875d 100644..100755
--- a/desktop/test/deployment/update/publisher/readme.txt
+++ b/desktop/test/deployment/update/publisher/readme.txt
diff --git a/desktop/test/deployment/update/publisher/release-notes_de-DE-altmark.html b/desktop/test/deployment/update/publisher/release-notes_de-DE-altmark.html
index 81b38a9f5b44..81b38a9f5b44 100644..100755
--- a/desktop/test/deployment/update/publisher/release-notes_de-DE-altmark.html
+++ b/desktop/test/deployment/update/publisher/release-notes_de-DE-altmark.html
diff --git a/desktop/test/deployment/update/publisher/release-notes_de-DE.html b/desktop/test/deployment/update/publisher/release-notes_de-DE.html
index f8f0121f0215..f8f0121f0215 100644..100755
--- a/desktop/test/deployment/update/publisher/release-notes_de-DE.html
+++ b/desktop/test/deployment/update/publisher/release-notes_de-DE.html
diff --git a/desktop/test/deployment/update/publisher/release-notes_de.html b/desktop/test/deployment/update/publisher/release-notes_de.html
index a9e1dc3647eb..a9e1dc3647eb 100644..100755
--- a/desktop/test/deployment/update/publisher/release-notes_de.html
+++ b/desktop/test/deployment/update/publisher/release-notes_de.html
diff --git a/desktop/test/deployment/update/publisher/release-notes_en-GB.html b/desktop/test/deployment/update/publisher/release-notes_en-GB.html
index ca72ec1b9c6e..ca72ec1b9c6e 100644..100755
--- a/desktop/test/deployment/update/publisher/release-notes_en-GB.html
+++ b/desktop/test/deployment/update/publisher/release-notes_en-GB.html
diff --git a/desktop/test/deployment/update/publisher/release-notes_en-US-region1.html b/desktop/test/deployment/update/publisher/release-notes_en-US-region1.html
index 0e6f99ce4c35..0e6f99ce4c35 100644..100755
--- a/desktop/test/deployment/update/publisher/release-notes_en-US-region1.html
+++ b/desktop/test/deployment/update/publisher/release-notes_en-US-region1.html
diff --git a/desktop/test/deployment/update/publisher/release-notes_en-US-region2.html b/desktop/test/deployment/update/publisher/release-notes_en-US-region2.html
index 597bca0ebeef..597bca0ebeef 100644..100755
--- a/desktop/test/deployment/update/publisher/release-notes_en-US-region2.html
+++ b/desktop/test/deployment/update/publisher/release-notes_en-US-region2.html
diff --git a/desktop/test/deployment/update/publisher/release-notes_en-US.html b/desktop/test/deployment/update/publisher/release-notes_en-US.html
index 7f9d73e338f8..7f9d73e338f8 100644..100755
--- a/desktop/test/deployment/update/publisher/release-notes_en-US.html
+++ b/desktop/test/deployment/update/publisher/release-notes_en-US.html
diff --git a/desktop/test/deployment/update/publisher/release-notes_en-region3.html b/desktop/test/deployment/update/publisher/release-notes_en-region3.html
index 5d62c7bcb4cf..5d62c7bcb4cf 100644..100755
--- a/desktop/test/deployment/update/publisher/release-notes_en-region3.html
+++ b/desktop/test/deployment/update/publisher/release-notes_en-region3.html
diff --git a/desktop/test/deployment/update/publisher/release-notes_en.html b/desktop/test/deployment/update/publisher/release-notes_en.html
index d02e4f3330ee..d02e4f3330ee 100644..100755
--- a/desktop/test/deployment/update/publisher/release-notes_en.html
+++ b/desktop/test/deployment/update/publisher/release-notes_en.html
diff --git a/desktop/test/deployment/update/publisher/update/pub1.update.xml b/desktop/test/deployment/update/publisher/update/pub1.update.xml
index db25b56a8847..db25b56a8847 100644..100755
--- a/desktop/test/deployment/update/publisher/update/pub1.update.xml
+++ b/desktop/test/deployment/update/publisher/update/pub1.update.xml
diff --git a/desktop/test/deployment/update/publisher/update/pub2.update.xml b/desktop/test/deployment/update/publisher/update/pub2.update.xml
index d856348df87f..d856348df87f 100644..100755
--- a/desktop/test/deployment/update/publisher/update/pub2.update.xml
+++ b/desktop/test/deployment/update/publisher/update/pub2.update.xml
diff --git a/desktop/test/deployment/update/publisher/update/pub3.update.xml b/desktop/test/deployment/update/publisher/update/pub3.update.xml
index 29a8e16b2ce4..29a8e16b2ce4 100644..100755
--- a/desktop/test/deployment/update/publisher/update/pub3.update.xml
+++ b/desktop/test/deployment/update/publisher/update/pub3.update.xml
diff --git a/desktop/test/deployment/update/publisher/update/pub4.update.xml b/desktop/test/deployment/update/publisher/update/pub4.update.xml
index 67b79f782412..67b79f782412 100644..100755
--- a/desktop/test/deployment/update/publisher/update/pub4.update.xml
+++ b/desktop/test/deployment/update/publisher/update/pub4.update.xml
diff --git a/desktop/test/deployment/update/publisher/update/pub5.update.xml b/desktop/test/deployment/update/publisher/update/pub5.update.xml
index 3a58b298b549..3a58b298b549 100644..100755
--- a/desktop/test/deployment/update/publisher/update/pub5.update.xml
+++ b/desktop/test/deployment/update/publisher/update/pub5.update.xml
diff --git a/desktop/test/deployment/update/publisher/update/pub6.update.xml b/desktop/test/deployment/update/publisher/update/pub6.update.xml
index ef187ce6cb5a..ef187ce6cb5a 100644..100755
--- a/desktop/test/deployment/update/publisher/update/pub6.update.xml
+++ b/desktop/test/deployment/update/publisher/update/pub6.update.xml
diff --git a/desktop/test/deployment/update/publisher/update/pub7.update.xml b/desktop/test/deployment/update/publisher/update/pub7.update.xml
index 10984e08d72f..10984e08d72f 100644..100755
--- a/desktop/test/deployment/update/publisher/update/pub7.update.xml
+++ b/desktop/test/deployment/update/publisher/update/pub7.update.xml
diff --git a/desktop/test/deployment/update/readme.txt b/desktop/test/deployment/update/readme.txt
index b3fd9126cae3..b3fd9126cae3 100644..100755
--- a/desktop/test/deployment/update/readme.txt
+++ b/desktop/test/deployment/update/readme.txt
diff --git a/desktop/test/deployment/update/simple/readme.txt b/desktop/test/deployment/update/simple/readme.txt
index 34ad6bedabf9..34ad6bedabf9 100644..100755
--- a/desktop/test/deployment/update/simple/readme.txt
+++ b/desktop/test/deployment/update/simple/readme.txt
diff --git a/desktop/test/deployment/update/simple/update/plain1.update.xml b/desktop/test/deployment/update/simple/update/plain1.update.xml
index c9eb679cdba0..c9eb679cdba0 100644..100755
--- a/desktop/test/deployment/update/simple/update/plain1.update.xml
+++ b/desktop/test/deployment/update/simple/update/plain1.update.xml
diff --git a/desktop/test/deployment/update/simple/update/plain2.update.xml b/desktop/test/deployment/update/simple/update/plain2.update.xml
index 5aeb8080446f..5aeb8080446f 100644..100755
--- a/desktop/test/deployment/update/simple/update/plain2.update.xml
+++ b/desktop/test/deployment/update/simple/update/plain2.update.xml
diff --git a/desktop/test/deployment/update/simple/update/plain3.update.xml b/desktop/test/deployment/update/simple/update/plain3.update.xml
index 6c1241dbdede..6c1241dbdede 100644..100755
--- a/desktop/test/deployment/update/simple/update/plain3.update.xml
+++ b/desktop/test/deployment/update/simple/update/plain3.update.xml
diff --git a/desktop/test/deployment/update/updatefeed/update/feed1.update.xml b/desktop/test/deployment/update/updatefeed/update/feed1.update.xml
index 31d0cfa61d3b..31d0cfa61d3b 100644..100755
--- a/desktop/test/deployment/update/updatefeed/update/feed1.update.xml
+++ b/desktop/test/deployment/update/updatefeed/update/feed1.update.xml
diff --git a/desktop/test/deployment/update/updatefeed/update/feed1.xml b/desktop/test/deployment/update/updatefeed/update/feed1.xml
index 1c31851d8cfd..1c31851d8cfd 100644..100755
--- a/desktop/test/deployment/update/updatefeed/update/feed1.xml
+++ b/desktop/test/deployment/update/updatefeed/update/feed1.xml
diff --git a/desktop/test/deployment/update/updatefeed/update/feed2.update.xml b/desktop/test/deployment/update/updatefeed/update/feed2.update.xml
index 8cbc5045fd5d..8cbc5045fd5d 100644..100755
--- a/desktop/test/deployment/update/updatefeed/update/feed2.update.xml
+++ b/desktop/test/deployment/update/updatefeed/update/feed2.update.xml
diff --git a/desktop/test/deployment/update/updateinfocreation/build/TestExtension.idl b/desktop/test/deployment/update/updateinfocreation/build/TestExtension.idl
index 3f5fc3b53bbe..3f5fc3b53bbe 100755..100644
--- a/desktop/test/deployment/update/updateinfocreation/build/TestExtension.idl
+++ b/desktop/test/deployment/update/updateinfocreation/build/TestExtension.idl
diff --git a/desktop/test/deployment/update/updateinfocreation/build/description.xml b/desktop/test/deployment/update/updateinfocreation/build/description.xml
index 257c48a79b79..257c48a79b79 100644..100755
--- a/desktop/test/deployment/update/updateinfocreation/build/description.xml
+++ b/desktop/test/deployment/update/updateinfocreation/build/description.xml
diff --git a/desktop/test/deployment/update/updateinfocreation/build/manifest.xml b/desktop/test/deployment/update/updateinfocreation/build/manifest.xml
index 7e3e7947aa0f..fcedabf96b4b 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/test/deployment/update/updateinfocreation/readme.txt b/desktop/test/deployment/update/updateinfocreation/readme.txt
index c4fc059053e9..c4fc059053e9 100644..100755
--- a/desktop/test/deployment/update/updateinfocreation/readme.txt
+++ b/desktop/test/deployment/update/updateinfocreation/readme.txt
diff --git a/desktop/test/deployment/update/website_update/readme.txt b/desktop/test/deployment/update/website_update/readme.txt
index 4ae5ddd9182f..4ae5ddd9182f 100644..100755
--- a/desktop/test/deployment/update/website_update/readme.txt
+++ b/desktop/test/deployment/update/website_update/readme.txt
diff --git a/desktop/test/deployment/update/website_update/update/web1.update.xml b/desktop/test/deployment/update/website_update/update/web1.update.xml
index ad2379dd43ca..ad2379dd43ca 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web1.update.xml
+++ b/desktop/test/deployment/update/website_update/update/web1.update.xml
diff --git a/desktop/test/deployment/update/website_update/update/web1_de-DE-altmark.html b/desktop/test/deployment/update/website_update/update/web1_de-DE-altmark.html
index ffed5a52e892..ffed5a52e892 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web1_de-DE-altmark.html
+++ b/desktop/test/deployment/update/website_update/update/web1_de-DE-altmark.html
diff --git a/desktop/test/deployment/update/website_update/update/web1_de-DE.html b/desktop/test/deployment/update/website_update/update/web1_de-DE.html
index 33fb7f2ec8bc..33fb7f2ec8bc 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web1_de-DE.html
+++ b/desktop/test/deployment/update/website_update/update/web1_de-DE.html
diff --git a/desktop/test/deployment/update/website_update/update/web1_de.html b/desktop/test/deployment/update/website_update/update/web1_de.html
index 31a53b91dbe4..31a53b91dbe4 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web1_de.html
+++ b/desktop/test/deployment/update/website_update/update/web1_de.html
diff --git a/desktop/test/deployment/update/website_update/update/web1_en-GB.html b/desktop/test/deployment/update/website_update/update/web1_en-GB.html
index c46328a82145..c46328a82145 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web1_en-GB.html
+++ b/desktop/test/deployment/update/website_update/update/web1_en-GB.html
diff --git a/desktop/test/deployment/update/website_update/update/web1_en-US-region1.html b/desktop/test/deployment/update/website_update/update/web1_en-US-region1.html
index 80b41823b70f..80b41823b70f 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web1_en-US-region1.html
+++ b/desktop/test/deployment/update/website_update/update/web1_en-US-region1.html
diff --git a/desktop/test/deployment/update/website_update/update/web1_en-US-region2.html b/desktop/test/deployment/update/website_update/update/web1_en-US-region2.html
index 1a501f520d85..1a501f520d85 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web1_en-US-region2.html
+++ b/desktop/test/deployment/update/website_update/update/web1_en-US-region2.html
diff --git a/desktop/test/deployment/update/website_update/update/web1_en-US.html b/desktop/test/deployment/update/website_update/update/web1_en-US.html
index f861b09c0162..f861b09c0162 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web1_en-US.html
+++ b/desktop/test/deployment/update/website_update/update/web1_en-US.html
diff --git a/desktop/test/deployment/update/website_update/update/web1_en-region3.html b/desktop/test/deployment/update/website_update/update/web1_en-region3.html
index f55bcbe38135..f55bcbe38135 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web1_en-region3.html
+++ b/desktop/test/deployment/update/website_update/update/web1_en-region3.html
diff --git a/desktop/test/deployment/update/website_update/update/web1_en.html b/desktop/test/deployment/update/website_update/update/web1_en.html
index a0b422ebf20e..a0b422ebf20e 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web1_en.html
+++ b/desktop/test/deployment/update/website_update/update/web1_en.html
diff --git a/desktop/test/deployment/update/website_update/update/web2.update.xml b/desktop/test/deployment/update/website_update/update/web2.update.xml
index afdcdf078edf..afdcdf078edf 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web2.update.xml
+++ b/desktop/test/deployment/update/website_update/update/web2.update.xml
diff --git a/desktop/test/deployment/update/website_update/update/web3.update.xml b/desktop/test/deployment/update/website_update/update/web3.update.xml
index ce6263656120..ce6263656120 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web3.update.xml
+++ b/desktop/test/deployment/update/website_update/update/web3.update.xml
diff --git a/desktop/test/deployment/update/website_update/update/web4.update.xml b/desktop/test/deployment/update/website_update/update/web4.update.xml
index d07f1dec149e..d07f1dec149e 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web4.update.xml
+++ b/desktop/test/deployment/update/website_update/update/web4.update.xml
diff --git a/desktop/test/deployment/update/website_update/update/web5.update.xml b/desktop/test/deployment/update/website_update/update/web5.update.xml
index a392466c5785..a392466c5785 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web5.update.xml
+++ b/desktop/test/deployment/update/website_update/update/web5.update.xml
diff --git a/desktop/test/deployment/update/website_update/update/web6/description.xml b/desktop/test/deployment/update/website_update/update/web6/description.xml
index 243c1d8ff962..243c1d8ff962 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web6/description.xml
+++ b/desktop/test/deployment/update/website_update/update/web6/description.xml
diff --git a/desktop/test/deployment/update/website_update/update/web6/readme.txt b/desktop/test/deployment/update/website_update/update/web6/readme.txt
index 7a1ba06efaa3..7a1ba06efaa3 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web6/readme.txt
+++ b/desktop/test/deployment/update/website_update/update/web6/readme.txt
diff --git a/desktop/test/deployment/update/website_update/update/web7/description.xml b/desktop/test/deployment/update/website_update/update/web7/description.xml
index 5b03e12ad436..5b03e12ad436 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web7/description.xml
+++ b/desktop/test/deployment/update/website_update/update/web7/description.xml
diff --git a/desktop/test/deployment/update/website_update/update/web7/readme.txt b/desktop/test/deployment/update/website_update/update/web7/readme.txt
index 8a6721b8e85c..8a6721b8e85c 100644..100755
--- a/desktop/test/deployment/update/website_update/update/web7/readme.txt
+++ b/desktop/test/deployment/update/website_update/update/web7/readme.txt
diff --git a/desktop/test/deployment/update/wrong_url/readme.txt b/desktop/test/deployment/update/wrong_url/readme.txt
index cc2459763ca9..cc2459763ca9 100644..100755
--- a/desktop/test/deployment/update/wrong_url/readme.txt
+++ b/desktop/test/deployment/update/wrong_url/readme.txt
diff --git a/desktop/test/deployment/update/wrong_url/update/url1.update.xml b/desktop/test/deployment/update/wrong_url/update/url1.update.xml
index 5ff3bce7bb2f..5ff3bce7bb2f 100644..100755
--- a/desktop/test/deployment/update/wrong_url/update/url1.update.xml
+++ b/desktop/test/deployment/update/wrong_url/update/url1.update.xml
diff --git a/desktop/test/deployment/update/wrong_url/update/url2.update.xml b/desktop/test/deployment/update/wrong_url/update/url2.update.xml
index 4bf79eb39425..4bf79eb39425 100644..100755
--- a/desktop/test/deployment/update/wrong_url/update/url2.update.xml
+++ b/desktop/test/deployment/update/wrong_url/update/url2.update.xml
diff --git a/desktop/test/deployment/update/wrong_url/update/wrongdownload1.update.xml b/desktop/test/deployment/update/wrong_url/update/wrongdownload1.update.xml
index 0fd5bee55346..0fd5bee55346 100644..100755
--- a/desktop/test/deployment/update/wrong_url/update/wrongdownload1.update.xml
+++ b/desktop/test/deployment/update/wrong_url/update/wrongdownload1.update.xml
diff --git a/desktop/test/deployment/update/wrong_url/update/wrongdownload2.update.xml b/desktop/test/deployment/update/wrong_url/update/wrongdownload2.update.xml
index 124331215215..124331215215 100644..100755
--- a/desktop/test/deployment/update/wrong_url/update/wrongdownload2.update.xml
+++ b/desktop/test/deployment/update/wrong_url/update/wrongdownload2.update.xml
diff --git a/desktop/test/deployment/update/wrong_url/update/wrongdownload3.update.xml b/desktop/test/deployment/update/wrong_url/update/wrongdownload3.update.xml
index 051d33ec4ba4..051d33ec4ba4 100644..100755
--- a/desktop/test/deployment/update/wrong_url/update/wrongdownload3.update.xml
+++ b/desktop/test/deployment/update/wrong_url/update/wrongdownload3.update.xml
diff --git a/desktop/test/deployment/version/readme.txt b/desktop/test/deployment/version/readme.txt
index c2ba28afd916..c2ba28afd916 100644..100755
--- a/desktop/test/deployment/version/readme.txt
+++ b/desktop/test/deployment/version/readme.txt
diff --git a/desktop/unx/source/args.c b/desktop/unx/source/args.c
new file mode 100644
index 000000000000..d69fe62e2466
--- /dev/null
+++ b/desktop/unx/source/args.c
@@ -0,0 +1,152 @@
+/* -*- 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 or as specified alternatively below. 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.
+ *
+ * Major Contributor(s):
+ * Michael Meeks <michael.meeks@novell.com>
+ * Portions created by the Ted are Copyright (C) 2010 Ted. All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * 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 <stdlib.h>
+#include <string.h>
+#include <osl/process.h>
+
+#include "args.h"
+
+/* do we start -env: */
+static int
+is_env_arg (rtl_uString *str)
+{
+ return !rtl_ustr_ascii_compare_WithLength (str->buffer, 5, "-env:");
+}
+
+static struct {
+ const char *name;
+ unsigned int bTwoArgs : 1;
+ unsigned int bInhibitSplash : 1;
+ unsigned int bInhibitPagein : 1;
+ unsigned int bInhibitJavaLdx : 1;
+ const char *pPageinType;
+} pArgDescr[] = {
+ /* have a trailing argument */
+ { "pt", 1, 0, 0, 0, NULL },
+ { "display", 1, 0, 0, 0, NULL },
+
+ /* no splash */
+ { "nologo", 0, 1, 0, 0, NULL },
+ { "headless", 0, 1, 0, 0, NULL },
+ { "invisible", 0, 1, 0, 0, NULL },
+ { "minimized", 0, 1, 0, 0, NULL },
+
+ /* pagein bits */
+ { "writer", 0, 0, 0, 0, "pagein-writer" },
+ { "calc", 0, 0, 0, 0, "pagein-calc" },
+ { "draw", 0, 0, 0, 0, "pagein-draw" },
+ { "impress", 0, 0, 0, 0, "pagein-impress" },
+
+ /* nothing much */
+ { "version", 0, 1, 1, 1, NULL },
+ { "help", 0, 1, 1, 1, NULL },
+ { "h", 0, 1, 1, 1, NULL },
+ { "?", 0, 1, 1, 1, NULL },
+};
+
+Args *args_parse (void)
+{
+ Args *args;
+ sal_uInt32 nArgs, i, j;
+
+ nArgs = osl_getCommandArgCount();
+ i = sizeof (Args) + sizeof (rtl_uString *) * nArgs;
+ args = malloc (i);
+ memset (args, 0, i);
+ args->nArgsTotal = nArgs;
+
+ j = 0;
+
+ /* sort the -env: args to the front */
+ for ( i = 0; i < nArgs; ++i )
+ {
+ rtl_uString *pTmp = NULL;
+ osl_getCommandArg( i, &pTmp );
+ if (is_env_arg (pTmp))
+ args->ppArgs[j++] = pTmp;
+ else
+ rtl_uString_release (pTmp);
+ }
+ args->nArgsEnv = j;
+
+ /* Then the other args */
+ for ( i = 0; i < nArgs; ++i )
+ {
+ rtl_uString *pTmp = NULL;
+
+ osl_getCommandArg( i, &pTmp );
+ if (!is_env_arg (pTmp))
+ args->ppArgs[j++] = pTmp;
+ else
+ rtl_uString_release (pTmp);
+ }
+
+ for ( i = args->nArgsEnv; i < args->nArgsTotal; i++ )
+ {
+ sal_uInt32 j;
+ const sal_Unicode *arg = args->ppArgs[i]->buffer;
+ sal_Int32 length = args->ppArgs[i]->length;
+
+ /* grok only parameters */
+ if (arg[0] != '-')
+ continue;
+
+ while (length > 2 && arg[0] == '-') {
+ arg++;
+ length--;
+ }
+
+ for ( j = 0; j < SAL_N_ELEMENTS (pArgDescr); ++j ) {
+ if (!rtl_ustr_indexOfAscii_WithLength
+ (arg, length, pArgDescr[j].name, strlen (pArgDescr[j].name))) {
+
+ args->bInhibitSplash |= pArgDescr[j].bInhibitSplash;
+ args->bInhibitPagein |= pArgDescr[j].bInhibitPagein;
+ args->bInhibitJavaLdx |= pArgDescr[j].bInhibitJavaLdx;
+ if (pArgDescr[j].pPageinType)
+ args->pPageinType = pArgDescr[j].pPageinType;
+ }
+ }
+ }
+
+ return args;
+}
+
+void
+args_free (Args *args)
+{
+ /* FIXME: free ppArgs */
+ rtl_uString_release( args->pAppPath );
+ free (args);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/unx/source/args.h b/desktop/unx/source/args.h
new file mode 100644
index 000000000000..4a0cb55ffcde
--- /dev/null
+++ b/desktop/unx/source/args.h
@@ -0,0 +1,50 @@
+/* -*- 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 or as specified alternatively below. 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.
+ *
+ * Major Contributor(s):
+ * Michael Meeks <michael.meeks@novell.com>
+ * Portions created by the Ted are Copyright (C) 2010 Ted. All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * 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 <sal/types.h>
+#include <rtl/ustring.h>
+
+typedef struct {
+ rtl_uString *pAppPath;
+ const char *pPageinType; // @pagein-writer for - writer etc. else NULL
+ sal_Bool bInhibitSplash; // should we show a splash screen
+ sal_Bool bInhibitPagein; // should we run pagein ?
+ sal_Bool bInhibitJavaLdx; // should we run javaldx ?
+
+ sal_uInt32 nArgsEnv; // number of -env: style args
+ sal_uInt32 nArgsTotal; // number of -env: as well as -writer style args
+ rtl_uString *ppArgs[1]; // sorted argument array
+} Args;
+
+Args *args_parse (void);
+void args_free (Args *args);
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/pagein/file_image.h b/desktop/unx/source/file_image.h
index 42054291b5fb..4d081713a736 100644..100755
--- a/desktop/source/pagein/file_image.h
+++ b/desktop/unx/source/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/unx/source/file_image_unx.c
index 92b8f49f0e34..fa1af9248d60 100644..100755
--- a/desktop/source/pagein/file_image_unx.c
+++ b/desktop/unx/source/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/unx/source/makefile.mk b/desktop/unx/source/makefile.mk
new file mode 100755
index 000000000000..2dea54a014b2
--- /dev/null
+++ b/desktop/unx/source/makefile.mk
@@ -0,0 +1,72 @@
+#
+# 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 "$(OS)"=="MACOSX"
+dummy:
+ @echo "Not building oosplash.bin for Mac."
+
+.ELSE
+
+.IF "$(ENABLE_QUICKSTART_LIBPNG)"=="TRUE"
+CFLAGS+=-DENABLE_QUICKSTART_LIBPNG
+CFLAGS+=$(LIBPNG_CFLAGS)
+.ENDIF
+
+STDLIB=
+
+OBJFILES= \
+ $(OBJ)$/splashx.obj \
+ $(OBJ)$/start.obj \
+ $(OBJ)$/args.obj \
+ $(OBJ)$/pagein.obj \
+ $(OBJ)$/file_image_unx.obj
+
+APP1TARGET = $(TARGET)
+APP1RPATH = BRAND
+APP1OBJS = $(OBJFILES) $(PAGEIN_OBJS)
+APP1LIBSALCPPRT=
+APP1CODETYPE = C
+APP1STDLIBS = $(PTHREAD_LIBS) $(X11LINK_DYNAMIC) $(SALLIB)
+.IF "$(ENABLE_QUICKSTART_LIBPNG)"=="TRUE"
+APP1STDLIBS += $(LIBPNG_LIBS)
+.ENDIF
+.IF "$(OS)"=="SOLARIS"
+APP1STDLIBS+= -lsocket
+.ENDIF
+
+.ENDIF
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
diff --git a/desktop/unx/source/officeloader/makefile.mk b/desktop/unx/source/officeloader/makefile.mk
index 050da981e88d..050da981e88d 100644..100755
--- a/desktop/unx/source/officeloader/makefile.mk
+++ b/desktop/unx/source/officeloader/makefile.mk
diff --git a/desktop/unx/source/officeloader/officeloader.cxx b/desktop/unx/source/officeloader/officeloader.cxx
index 87621960c61a..3927d8e14714 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.
@@ -34,8 +35,8 @@
#include "../../../source/inc/exithelper.hxx"
-using namespace rtl;
using namespace desktop;
+using ::rtl::OUString;
SAL_IMPLEMENT_MAIN()
{
@@ -108,3 +109,5 @@ SAL_IMPLEMENT_MAIN()
return exitcode;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/pagein/pagein.c b/desktop/unx/source/pagein.c
index 0b93eecab7cf..947b4b7375d5 100644..100755
--- a/desktop/source/pagein/pagein.c
+++ b/desktop/unx/source/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.
@@ -43,7 +44,7 @@ static int do_pagein (const char * filename, size_t * size)
if ((result = file_image_pagein (&image)) != 0)
{
- fprintf (stderr, "file_image_pagein: %s\n", strerror(result));
+ fprintf (stderr, "file_image_pagein %s: %s\n", filename, strerror(result));
goto cleanup_and_leave;
}
@@ -57,8 +58,10 @@ cleanup_and_leave:
return (result);
}
+extern int pagein_execute (int argc, char **argv);
+
/* main */
-int main (int argc, char **argv)
+int pagein_execute (int argc, char **argv)
{
int i, v = 0;
size_t nfiles = 0, nbytes = 0;
@@ -91,7 +94,7 @@ int main (int argc, char **argv)
case 'L':
/* search path */
if (chdir (&(argv[i][2])) == -1)
- fprintf (stderr, "chdir: %s\n", strerror(errno));
+ fprintf (stderr, "chdir %s: %s\n", &(argv[i][2]), strerror(errno));
break;
default:
/* ignored */
@@ -102,19 +105,27 @@ int main (int argc, char **argv)
continue;
}
-
if ((argv[i][0] == '@') && ((fp = fopen (argv[i], "r")) == 0))
{
- char path[1024];
+ char fullpath[4096];
+ char *path;
+ strncpy (fullpath, argv[i] + 1, 3000);
+ if (!(path = strrchr (fullpath, '/')))
+ path = fullpath;
+ else
+ path++;
+
if ((fp = fopen (&(argv[i][1]), "r")) == 0)
{
- fprintf (stderr, "fopen: %s\n", strerror(errno));
+ fprintf (stderr, "fopen %s: %s\n", &(argv[i][1]), strerror(errno));
continue;
}
- while (fgets (path, sizeof(path), fp) != 0)
+ while (fgets (path, 1024, fp) != 0)
{
path[strlen(path) - 1] = '\0', k = 0;
- if (do_pagein (path, &k) == 0)
+
+ /* paths relative to the location of the pagein file */
+ if (do_pagein (fullpath, &k) == 0)
{
/* accumulate total size */
nbytes += k;
@@ -147,3 +158,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/unx/source/splashx.c b/desktop/unx/source/splashx.c
new file mode 100755
index 000000000000..6bcb10ef149d
--- /dev/null
+++ b/desktop/unx/source/splashx.c
@@ -0,0 +1,648 @@
+/* -*- 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.
+ */
+
+#ifdef ENABLE_QUICKSTART_LIBPNG
+
+#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
+
+png_structp png_ptr = NULL;
+png_infop info_ptr = NULL;
+
+int splash_load_bmp( const char *filename )
+{
+ FILE *file;
+
+ 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 );
+
+ 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" );
+
+ 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 ) \
+ { \
+ out = data + y * bytes_per_line; \
+ 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; )
+ else 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;
+ } 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 = "LibreOffice";
+ 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 );
+ }
+}
+
+// Draw the progress
+void splash_draw_progress( int progress )
+{
+ if (!display)
+ return;
+
+ // 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()
+{
+ if (display)
+ XCloseDisplay( display );
+#ifdef USE_LIBPNG
+ png_destroy_read_struct( &png_ptr, &info_ptr, NULL );
+#else
+ free( bitmap_rows );
+#endif
+ bitmap_rows = NULL;
+}
+
+#else /* not ENABLE_QUICKSTART_LIBPNG */
+
+/* Stubs that will never be called in this case */
+
+int splash_load_bmp( const char *filename )
+{
+ (void)filename;
+ return 1;
+}
+void splash_setup( int barc[3], int framec[3], int posx, int posy, int w, int h )
+{
+ (void)barc; (void)framec; (void)posx; (void)posy; (void)w; (void)h;
+}
+int splash_create_window( int argc, char** argv )
+{
+ (void)argc; (void)argv;
+ return 1;
+}
+void splash_close_window()
+{
+}
+void splash_draw_progress( int progress )
+{
+ (void)progress;
+}
+
+#endif // ENABLE_QUICKSTART_LIBPNG
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/unx/source/splashx.h b/desktop/unx/source/splashx.h
new file mode 100755
index 000000000000..537034c6efc8
--- /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 100755
index 000000000000..9ff95533e6b1
--- /dev/null
+++ b/desktop/unx/source/start.c
@@ -0,0 +1,1034 @@
+/* -*- 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 <string.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 "args.h"
+#include "splashx.h"
+
+#define IMG_SUFFIX ".png"
+#define PIPEDEFAULTPATH "/tmp"
+#define PIPEALTERNATEPATH "/var/tmp"
+
+/* 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 > 1
+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
+
+typedef struct {
+ int status_fd;
+ oslProcess child;
+} ChildInfo;
+
+static int
+child_info_get_status_fd (ChildInfo *info)
+{
+ return info->status_fd;
+}
+
+static void
+child_info_destroy (ChildInfo *info)
+{
+ close (info->status_fd);
+ osl_freeProcessHandle (info->child);
+ free (info);
+}
+
+static ChildInfo *
+child_spawn ( Args *args, sal_Bool bAllArgs, sal_Bool bWithStatus )
+{
+ rtl_uString *pApp = NULL, *pTmp = NULL;
+ rtl_uString **ppArgs;
+ sal_uInt32 nArgs, i;
+ char buffer[64];
+ ChildInfo *info;
+ int status_pipe[2];
+ oslProcessError nError;
+
+ info = calloc (1, sizeof (ChildInfo));
+
+ /* create pipe */
+ if ( pipe( status_pipe ) < 0 )
+ {
+ fprintf( stderr, "ERROR: no file handles\n");
+ exit( 1 );
+ }
+ info->status_fd = status_pipe[0];
+
+ /* application name */
+ rtl_uString_newFromAscii( &pApp, "file://" );
+ rtl_uString_newConcat( &pApp, pApp, args->pAppPath );
+ rtl_uString_newFromAscii( &pTmp, "/soffice.bin" );
+ rtl_uString_newConcat( &pApp, pApp, pTmp );
+ rtl_uString_release( pTmp );
+ pTmp = NULL;
+
+ /* copy args */
+ nArgs = bAllArgs ? args->nArgsTotal : args->nArgsEnv;
+ ppArgs = (rtl_uString **)calloc( nArgs + 1, sizeof( rtl_uString* ) );
+ for ( i = 0; i < nArgs; ++i )
+ ppArgs[i] = args->ppArgs[i];
+
+ if( bWithStatus )
+ {
+ /* add the pipe arg */
+ snprintf (buffer, 63, "--splash-pipe=%d", status_pipe[1]);
+ rtl_uString_newFromAscii( &pTmp, buffer );
+ ppArgs[nArgs] = pTmp;
+ ++nArgs;
+ }
+
+ /* start the main process */
+ nError = osl_executeProcess( pApp, ppArgs, nArgs,
+ osl_Process_NORMAL,
+ NULL,
+ NULL,
+ NULL, 0,
+ &info->child );
+
+ if (pTmp)
+ rtl_uString_release( pTmp );
+ free (ppArgs);
+
+ if ( nError != osl_Process_E_None )
+ {
+ fprintf( stderr, "ERROR %d forking process", nError );
+ ustr_debug( "", pApp );
+ rtl_uString_release( pApp );
+ _exit (1);
+ }
+
+ rtl_uString_release( pApp );
+ close( status_pipe[1] );
+
+ return info;
+}
+
+static sal_Bool
+child_exited_wait (ChildInfo *info, sal_Bool bShortWait)
+{
+ TimeValue t = { 0, 250 /* ms */ * 1000 * 1000 };
+ if (!bShortWait)
+ t.Seconds = 1024;
+ return osl_joinProcessWithTimeout (info->child, &t) != osl_Process_E_TimedOut;
+}
+
+static int
+child_get_exit_code (ChildInfo *info)
+{
+ oslProcessInfo inf;
+
+ inf.Code = -1;
+ inf.Size = sizeof (inf);
+ if (osl_getProcessInfo (info->child, osl_Process_EXITCODE, &inf) != osl_Process_E_None)
+ {
+ fprintf (stderr, "Warning: failed to fetch libreoffice exit status\n");
+ return -1;
+ }
+ return inf.Code;
+}
+
+typedef enum { ProgressContinue, ProgressRestart, ProgressExit } ProgressStatus;
+
+/* Path of the application. */
+static rtl_uString *
+get_app_path( const char *pAppExec )
+{
+ char pRealPath[PATH_MAX];
+ rtl_uString *pResult;
+
+ char *pOrigPath = strdup( pAppExec );
+ char *pPath = dirname( pOrigPath );
+
+ realpath( pPath, pRealPath );
+ pResult = charp_to_ustr( pRealPath );
+ free( pOrigPath );
+
+ 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 ( !pText )
+ return NULL;
+
+#if OSL_DEBUG_LEVEL > 1
+ rtl_String *pOut = ustr_to_str( pText );
+ fprintf (stderr, "Generate pipe md5 for '%s'\n", pOut->buffer);
+ rtl_string_release( pOut );
+#endif
+
+ 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( pMd5hash );
+ 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 );
+
+ // this is not a param, we have to prepend filenames with file://
+ // FIXME: improve the check
+ if ( ( pTmp->buffer[0] != (sal_Unicode)'-' ) )
+ {
+ 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
+ // note ".uno" ".slot" & "vnd.sun.star.script" are special urls that
+ // don't expect a following '/'
+
+ const char* schemes[] = { "slot:", ".uno:", "vnd.sun.star.script:" };
+ sal_Bool bIsSpecialURL = sal_False;
+ int index = 0;
+ int len = SAL_N_ELEMENTS(schemes);
+ for ( ; index < len; ++index )
+ {
+ if ( rtl_ustr_indexOfAscii_WithLength( pTmp->buffer
+ , pTmp->length , schemes[ index ], strlen(schemes[ index ] )) == 0 )
+ {
+ bIsSpecialURL = sal_True;
+ break;
+ }
+ }
+
+ if ( !bIsSpecialURL && ( 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);
+
+ rtl_string_release( pCountry );
+ rtl_string_release( pLang );
+
+ pAppPath = ustr_to_str (pUAppPath);
+ pBuffer = malloc (pAppPath->length + nLocSize + 256);
+ strcpy (pBuffer, pAppPath->buffer);
+ pSuffix = pBuffer + pAppPath->length;
+ rtl_string_release( pAppPath );
+
+ 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;
+
+ /* 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;
+ int i = 0;
+ sal_Int32 nIndex = 0;
+ 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 *bNoDefaults )
+{
+ 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 )
+ *bNoDefaults = 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( ChildInfo *info, 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( child_info_get_status_fd (info),
+ 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 > 1
+ 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;
+}
+
+/* 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 - LibreOffice is unlikely to work well if at all" );
+ exit( 1 );
+ }
+#endif
+}
+
+/* re-use the pagein code */
+extern int pagein_execute (int argc, char **argv);
+
+#ifndef MACOSX
+#define REL_PATH "/../basis-link/program/"
+static char *build_pagein_path (Args *args, const char *pagein_name)
+{
+ char *path;
+ rtl_String *app_path;
+
+ app_path = ustr_to_str (args->pAppPath);
+ path = malloc (app_path->length + strlen (pagein_name) + sizeof (REL_PATH) + 1);
+ strcpy (path, "@");
+ strcpy (path + 1, rtl_string_getStr (app_path));
+ strcat (path, REL_PATH);
+ strcat (path, pagein_name);
+
+ rtl_string_release( app_path );
+
+ return path;
+}
+#endif
+
+void
+exec_pagein (Args *args)
+{
+// no pagein for the while on OSX
+#ifdef MACOSX
+ (void)args;
+#else
+ char *argv[3];
+
+ /* don't use -L - since that does a chdir that breaks relative paths */
+ argv[0] = "dummy-pagein";
+ argv[1] = build_pagein_path (args, "pagein-common");
+ if (args->pPageinType) {
+ argv[2] = build_pagein_path (args, args->pPageinType);
+ } else
+ argv[2] = NULL;
+
+ pagein_execute (args->pPageinType ? 3 : 2, argv);
+
+ if (argv[2])
+ free (argv[2]);
+ free (argv[1]);
+#endif
+}
+
+static void extend_library_path (const char *new_element)
+{
+ rtl_uString *pEnvName=NULL, *pOrigEnvVar=NULL, *pNewEnvVar=NULL;
+ const char *pathname;
+#ifdef AIX
+ pathname = "LIBPATH";
+#else
+ pathname = "LD_LIBRARY_PATH";
+#endif
+
+ rtl_uString_newFromAscii( &pEnvName, pathname );
+ rtl_uString_newFromAscii( &pNewEnvVar, new_element );
+
+ osl_getEnvironment( pEnvName, &pOrigEnvVar );
+ if (pOrigEnvVar && pOrigEnvVar->length)
+ {
+ rtl_uString *pDelim = NULL;
+ rtl_uString_newFromAscii( &pDelim, ":" );
+ rtl_uString_newConcat( &pNewEnvVar, pNewEnvVar, pDelim );
+ rtl_uString_newConcat( &pNewEnvVar, pNewEnvVar, pOrigEnvVar );
+ rtl_uString_release( pDelim );
+ }
+
+ osl_setEnvironment( pEnvName, pNewEnvVar );
+
+ if (pOrigEnvVar)
+ rtl_uString_release( pOrigEnvVar );
+ rtl_uString_release( pNewEnvVar );
+ rtl_uString_release( pEnvName );
+}
+
+static void
+exec_javaldx (Args *args)
+{
+ char newpath[4096];
+ sal_uInt32 nArgs;
+ rtl_uString *pApp;
+ rtl_uString **ppArgs;
+ rtl_uString *pTmp, *pTmp2;
+ rtl_uString *pEnvironment[1] = { NULL };
+
+ ppArgs = (rtl_uString **)calloc( args->nArgsEnv + 2, sizeof( rtl_uString* ) );
+
+ for ( nArgs = 0; nArgs < args->nArgsEnv; ++nArgs )
+ ppArgs[nArgs] = args->ppArgs[nArgs];
+
+ /* Use absolute path to redirectrc */
+ pTmp = NULL;
+ rtl_uString_newFromAscii( &pTmp, "-env:INIFILENAME=vnd.sun.star.pathname:" );
+ rtl_uString_newConcat( &pTmp, pTmp, args->pAppPath );
+ pTmp2 = NULL;
+ rtl_uString_newFromAscii( &pTmp2, "/redirectrc" );
+ rtl_uString_newConcat( &pTmp, pTmp, pTmp2 );
+ ppArgs[nArgs] = pTmp;
+ rtl_uString_release (pTmp2);
+ nArgs++;
+
+ oslProcess javaldx = NULL;
+ oslFileHandle fileOut= 0;
+ oslProcessError err;
+
+ /* And also to javaldx */
+ pApp = NULL;
+ rtl_uString_newFromAscii( &pApp, "file://" );
+ rtl_uString_newConcat( &pApp, pApp, args->pAppPath );
+ pTmp = NULL;
+ rtl_uString_newFromAscii( &pTmp, "/../ure/bin/javaldx" );
+ rtl_uString_newConcat( &pApp, pApp, pTmp );
+ rtl_uString_release( pTmp );
+
+ /* unset to avoid bogus console output */
+ rtl_uString_newFromAscii( &pEnvironment[0], "G_SLICE" );
+
+ err = osl_executeProcess_WithRedirectedIO( pApp, ppArgs, nArgs,
+ osl_Process_NORMAL,
+ NULL, // security
+ NULL, // work dir
+ pEnvironment, 1,
+ &javaldx, // process handle
+ NULL,
+ &fileOut,
+ NULL);
+
+ rtl_uString_release( pEnvironment[0] );
+ rtl_uString_release( ppArgs[nArgs-1] );
+ rtl_uString_release( pApp );
+ free( ppArgs );
+
+ if( err != osl_Process_E_None)
+ {
+ fprintf (stderr, "Warning: failed to launch javaldx - java may not fuction correctly\n");
+ return;
+ } else {
+ char *chomp;
+ sal_uInt64 bytes_read;
+
+ /* Magically osl_readLine doesn't work with pipes with E_SPIPE - so be this lame instead: */
+ while (osl_readFile (fileOut, newpath, SAL_N_ELEMENTS (newpath), &bytes_read) == osl_File_E_INTR);
+
+ if (bytes_read <= 0) {
+ fprintf (stderr, "Warning: failed to read path from javaldx\n");
+ return;
+ }
+ newpath[bytes_read] = '\0';
+
+ if ((chomp = strstr (newpath, "\n")))
+ *chomp = '\0';
+ }
+
+#if OSL_DEBUG_LEVEL > 1
+ fprintf (stderr, "Adding javaldx path of '%s'\n", newpath);
+#endif
+ extend_library_path (newpath);
+
+ osl_freeProcessHandle(javaldx);
+}
+
+SAL_IMPLEMENT_MAIN_WITH_ARGS( argc, argv )
+{
+ int fd = 0;
+ sal_Bool bSentArgs = sal_False;
+ const char* pUsePlugin;
+ rtl_uString *pPipePath = NULL;
+ Args *args;
+
+ /* turn SIGPIPE into an error */
+ signal( SIGPIPE, SIG_IGN );
+
+ args = args_parse ();
+ args->pAppPath = get_app_path( argv[0] );
+ if ( !args->pAppPath )
+ {
+ fprintf( stderr, "ERROR: Can't read app link\n" );
+ exit( 1 );
+ }
+ ustr_debug( "App path", args->pAppPath );
+
+#ifndef ENABLE_QUICKSTART_LIBPNG
+ /* we can't load and render it anyway */
+ args->bInhibitSplash = sal_True;
+#endif
+
+ pUsePlugin = getenv( "SAL_USE_VCLPLUGIN" );
+ if ( pUsePlugin && !strcmp(pUsePlugin, "svp") )
+ args->bInhibitSplash = sal_True;
+
+ pPipePath = get_pipe_path( args->pAppPath );
+
+ if ( ( fd = connect_pipe( pPipePath ) ) >= 0 )
+ {
+ rtl_uString *pCwdPath = NULL;
+ osl_getProcessWorkingDir( &pCwdPath );
+
+ bSentArgs = send_args( fd, pCwdPath );
+
+ close( fd );
+ }
+#if OSL_DEBUG_LEVEL > 1
+ else
+ ustr_debug( "Failed to connect to pipe", pPipePath );
+#endif
+
+ if ( !bSentArgs )
+ {
+ /* we have to prepare for, and exec the binary */
+ int nPercent = 0;
+ ChildInfo *info;
+ sal_Bool bAllArgs = sal_True;
+ sal_Bool bHaveWindow = sal_False;
+ sal_Bool bShortWait, bRestart;
+
+ /* sanity check pieces */
+ system_checks();
+
+ /* load splash image and create window */
+ if ( !args->bInhibitSplash )
+ {
+ sal_Bool bNoDefaults = sal_False;
+ load_splash_image( args->pAppPath );
+ load_splash_defaults( args->pAppPath, &bNoDefaults );
+
+ if (!bNoDefaults &&
+ ( bHaveWindow = splash_create_window( argc, argv ) ) )
+ splash_draw_progress( 0 );
+ }
+
+ /* pagein */
+ if (!args->bInhibitJavaLdx)
+ exec_pagein (args);
+
+ /* javaldx */
+ if (!args->bInhibitJavaLdx)
+ exec_javaldx (args);
+
+ do {
+ bRestart = sal_False;
+
+ /* fast updates if we have somewhere to update it to */
+ bShortWait = bHaveWindow;
+
+ /* Periodically update the splash & the percent according
+ to what status_fd says, poll quickly only while starting */
+ info = child_spawn (args, bAllArgs, bShortWait);
+ while (!child_exited_wait (info, bShortWait))
+ {
+ ProgressStatus eResult;
+
+ splash_draw_progress( nPercent );
+ eResult = read_percent( info, &nPercent );
+ if (eResult != ProgressContinue)
+ {
+ splash_close_window ();
+ bShortWait = sal_False;
+ }
+
+#if OSL_DEBUG_LEVEL > 1
+ fprintf( stderr, "Polling, result is %s\n",
+ ( eResult == ProgressContinue )? "continue" :
+ ( ( eResult == ProgressRestart )? "restart" : "exit" ) );
+#endif
+ }
+
+#if OSL_DEBUG_LEVEL > 0
+ fprintf (stderr, "Exited with code '%d'\n", child_get_exit_code (info));
+#endif
+
+ switch (child_get_exit_code (info)) {
+ case 79: // re-start with just -env: parameters
+#if OSL_DEBUG_LEVEL > 0
+ fprintf (stderr, "oosplash: re-start with just -env: params !\n");
+#endif
+ bRestart = sal_True;
+ bAllArgs = sal_False;
+ break;
+ case 81: // re-start with all arguments
+#if OSL_DEBUG_LEVEL > 0
+ fprintf (stderr, "oosplash: re-start with all params !\n");
+#endif
+ bRestart = sal_True;
+ bAllArgs = sal_True;
+ break;
+ default:
+ break;
+ }
+
+ child_info_destroy (info);
+ } while (bRestart);
+ }
+
+ /* cleanup */
+ rtl_uString_release( pPipePath );
+ args_free (args);
+
+ return 0;
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/unx/splash/exports.map b/desktop/unx/splash/exports.map
new file mode 100755
index 000000000000..218f0536d7e2
--- /dev/null
+++ b/desktop/unx/splash/exports.map
@@ -0,0 +1,9 @@
+UDK_3_0_0 {
+ global:
+ GetVersionInfo;
+ component_getImplementationEnvironment;
+ component_getFactory;
+
+ local:
+ *;
+};
diff --git a/desktop/unx/splash/makefile.mk b/desktop/unx/splash/makefile.mk
new file mode 100755
index 000000000000..e338cfe36b83
--- /dev/null
+++ b/desktop/unx/splash/makefile.mk
@@ -0,0 +1,76 @@
+#
+# 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 "$(OS)"=="MACOSX"
+dummy:
+ @echo "Unix quickstarter disabled for mac"
+.ELSE
+
+# --- Files --------------------------------------------------------
+
+SLOFILES = $(SLO)$/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)
+
+# --- Targets ------------------------------------------------------
+
+.INCLUDE : target.mk
+
+ALLTAR : $(MISC)/splash.component
+
+$(MISC)/splash.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ splash.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt splash.component
+
+.ENDIF \ No newline at end of file
diff --git a/desktop/unx/splash/splash.component b/desktop/unx/splash/splash.component
new file mode 100755
index 000000000000..cd7792744ea0
--- /dev/null
+++ b/desktop/unx/splash/splash.component
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.office.comp.PipeSplashScreen">
+ <service name="com.sun.star.office.PipeSplashScreen"/>
+ </implementation>
+</component>
diff --git a/desktop/unx/splash/unxsplash.cxx b/desktop/unx/splash/unxsplash.cxx
new file mode 100644
index 000000000000..ca2b2099be63
--- /dev/null
+++ b/desktop/unx/splash/unxsplash.cxx
@@ -0,0 +1,198 @@
+/* -*- 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 <cppuhelper/implementationentry.hxx>
+#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;
+using namespace ::com::sun::star::registry;
+
+namespace desktop
+{
+ UnxSplashScreen::UnxSplashScreen( const Reference< uno::XComponentContext >& xCtx )
+ : m_xCtx( xCtx ),
+ 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
+ if( !m_pOutFd )
+ return;
+
+ 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
+ if( !m_pOutFd )
+ return;
+
+ 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
+ }
+ }
+}
+}
+
+using namespace desktop;
+
+// get service instance...
+static uno::Reference< uno::XInterface > m_xINSTANCE;
+
+uno::Reference< uno::XInterface > SAL_CALL UnxSplash_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception )
+{
+ static osl::Mutex m_aMutex;
+ if ( !m_xINSTANCE.is() )
+ {
+ osl::MutexGuard guard( m_aMutex );
+ if ( !m_xINSTANCE.is() )
+ m_xINSTANCE = (cppu::OWeakObject*) new UnxSplashScreen( xCtx );
+ }
+
+ return m_xINSTANCE;
+}
+
+OUString UnxSplash_getImplementationName()
+{
+ return OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.office.comp.PipeSplashScreen" ) );
+}
+
+uno::Sequence< OUString > SAL_CALL UnxSplash_getSupportedServiceNames() throw()
+{
+ const OUString aServiceName( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.office.PipeSplashScreen" ) );
+ const uno::Sequence< OUString > aSeq( &aServiceName, 1 );
+ return aSeq;
+}
+
+::cppu::ImplementationEntry aEntries[] =
+{
+ {
+ UnxSplash_createInstance, UnxSplash_getImplementationName,
+ UnxSplash_getSupportedServiceNames,
+ ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
+ { 0, 0, 0, 0, 0, 0 }
+};
+
+extern "C"
+{
+
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName,
+ uno_Environment ** )
+{ *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME; }
+
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* pRegistryKey )
+{
+ return ::cppu::component_getFactoryHelper( pImplName, pServiceManager,
+ pRegistryKey, aEntries );
+}
+
+} // extern "C"
+
+
+/* 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 000000000000..b25e858d9bac
--- /dev/null
+++ b/desktop/unx/splash/unxsplash.hxx
@@ -0,0 +1,83 @@
+/* -*- 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/uno/XComponentContext.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& );
+
+ virtual ~UnxSplashScreen();
+
+ static UnxSplashScreen *m_pINSTANCE;
+
+ static osl::Mutex m_aMutex;
+ Reference< XComponentContext > m_xCtx;
+
+ FILE *m_pOutFd;
+
+public:
+ UnxSplashScreen( const Reference< XComponentContext >& xCtx );
+
+ // 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 8cf03f157254..1c6fb2e0e46b 100644..100755
--- a/desktop/util/makefile.mk
+++ b/desktop/util/makefile.mk
@@ -47,9 +47,6 @@ VERINFONAME=verinfo
.IF "$(GUI)" == "WNT"
RCFILES=verinfo.rc
.ENDIF
-.IF "$(GUI)" == "OS2"
-RCFILES=ooverinfo2.rc
-.ENDIF
# --- Linken der Applikation ---------------------------------------
@@ -57,26 +54,12 @@ 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"
-.IF "$(GUI)" != "OS2"
APP1TARGET=so$/$(TARGET)
APP1NOSAL=TRUE
APP1RPATH=BRAND
@@ -91,15 +74,8 @@ APP1VERINFO=verinfo.rc
APP1LINKRES=$(MISC)$/$(TARGET)1.res
APP1STACK=10000000
-# create a manifest file with the same name as the
-#office executable file soffice.exe.manifest
-#$(BIN)$/$(TARGET).exe.manifest: template.manifest
-#$(COPY) $< $@
-
.ENDIF # WNT
-.ENDIF # "$(GUI)" != "OS2"
-
.ENDIF # "$(LINK_SO)"=="TRUE"
APP5TARGET=soffice
@@ -109,7 +85,6 @@ APP5OBJS=$(OBJ)$/copyright_ascii_ooo.obj $(OBJ)$/main.obj
APP5STDLIBS = $(SALLIB) $(SOFFICELIB)
.IF "$(OS)" == "LINUX"
APP5STDLIBS+= -lXext -lX11
-#APP5STDLIBS+= -lXext -lSM -lICE
.ENDIF # LINUX
APP5DEPN= $(APP1TARGETN) $(APP5RES) ooverinfo.rc
@@ -123,14 +98,6 @@ APP5LINKRES=$(MISC)$/ooffice5.res
APP5STACK=10000000
.ENDIF # WNT
-.IF "$(GUI)" == "OS2"
-APP5DEF= # automatic
-APP5RES= $(RES)$/oodesktop.res
-APP5ICON=$(SOLARRESDIR)$/icons/ooo-main-app.ico
-APP5VERINFO=ooverinfo2.rc
-APP5LINKRES=$(MISC)$/ooffice.res
-.ENDIF # OS2
-
.IF "$(GUI)" == "WNT"
.IF "$(LINK_SO)"=="TRUE"
APP6TARGET=so$/officeloader
@@ -198,14 +165,9 @@ ALLTAR: $(BIN)$/so$/$(TARGET).bin
.ENDIF # "$(LINK_SO)"=="TRUE"
.ENDIF # WNT
-.IF "$(GUI)" == "OS2"
-ALLTAR: $(BIN)$/$(TARGET).bin
-.ENDIF # OS2
-
$(BIN)$/soffice_oo$(EXECPOST) : $(APP5TARGETN)
$(COPY) $< $@
-.IF "$(GUI)" != "OS2"
.IF "$(LINK_SO)"=="TRUE"
$(BIN)$/so$/soffice_so$(EXECPOST) : $(APP1TARGETN)
$(COPY) $< $@
@@ -213,7 +175,6 @@ $(BIN)$/so$/soffice_so$(EXECPOST) : $(APP1TARGETN)
ALLTAR : $(BIN)$/so$/soffice_so$(EXECPOST)
.ENDIF # "$(LINK_SO)"=="TRUE"
ALLTAR : $(BIN)$/soffice_oo$(EXECPOST)
-.ENDIF
.IF "$(OS)" == "MACOSX"
.IF "$(LINK_SO)"=="TRUE"
@@ -266,11 +227,6 @@ $(BIN)$/so$/$(TARGET).bin: $(BIN)$/so$/$(TARGET)$(EXECPOST)
.ENDIF # WNT
-.IF "$(GUI)" == "OS2"
-$(BIN)$/$(TARGET).bin: $(BIN)$/$(TARGET)$(EXECPOST)
- $(COPY) $< $@
-.ENDIF # OS2
-
$(MISC)$/binso_created.flg :
@@-$(MKDIRHIER) $(BIN)$/so && $(TOUCH) $@
diff --git a/desktop/util/ooverinfo.rc b/desktop/util/ooverinfo.rc
index 3ddff6b66b02..be7469563968 100644..100755
--- 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,32 +46,15 @@ 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"
{
-#ifdef LG_D
- block "040704E4"
- {
- // German StringTable
- value "CompanyName", "OpenOffice.org\0"
- value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
- value "FileVersion", PPS(VER_LEVEL) "\0"
- value "ProductVersion", PPS(VER_LEVEL) "\0"
- value "OriginalFilename", "SOFFICE.EXE\0"
- value "InternalName", "SOFFICE\0"
- value "LegalCopyright", S_CRIGHT " Oracle, Inc.\0"
- }
-#else
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 +62,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 dbed81ce3f21..d3bd0c101f2f 100644..100755
--- 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 5a2b03769963..f24dff55169e 100644
--- 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,32 +51,15 @@ 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"
{
-#ifdef LG_D
- block "040704E4"
- {
- // German StringTable
- value "CompanyName", "Oracle\0"
- value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
- value "FileVersion", PPS(VER_LEVEL) "\0"
- value "ProductVersion", PPS(VER_LEVEL) "\0"
- value "OriginalFilename", "SOFFICE.EXE\0"
- value "InternalName", "SOFFICE\0"
- value "LegalCopyright", S_CRIGHT " Oracle and/or its affiliates. All rights reserved.\0"
- }
-#else
block "040904E4"
{
// International StringTable
- value "CompanyName", "Oracle\0"
+ value "CompanyName", "The Document Foundation\0"
value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
value "FileVersion", PPS(VER_LEVEL) "\0"
value "ProductVersion", PPS(VER_LEVEL) "\0"
@@ -88,16 +67,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/QuickStart/OOQuickStart.rc b/desktop/win32/source/QuickStart/OOQuickStart.rc
index 9baf7e864f5f..9baf7e864f5f 100644..100755
--- a/desktop/win32/source/QuickStart/OOQuickStart.rc
+++ b/desktop/win32/source/QuickStart/OOQuickStart.rc
diff --git a/desktop/win32/source/QuickStart/QuickStart.cpp b/desktop/win32/source/QuickStart/QuickStart.cpp
index 3467e35524f8..999701da985a 100644..100755
--- a/desktop/win32/source/QuickStart/QuickStart.cpp
+++ b/desktop/win32/source/QuickStart/QuickStart.cpp
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
// QuickStart.cpp : Defines the entry point for the application.
//
@@ -101,11 +102,11 @@ void NotifyListener( HWND hWnd )
nid.cbSize = sizeof(NOTIFYICONDATA);
nid.hWnd = hWnd;
nid.uID = IDM_QUICKSTART;
- nid.szTip[elementsof(nid.szTip) - 1] = 0;
+ nid.szTip[SAL_N_ELEMENTS(nid.szTip) - 1] = 0;
// nid.hIcon = bTerminateVeto ? hIconActive : hIconInActive;
-// strncpy(nid.szTip, bTerminateVeto ? STRING_QUICKSTARTACTIVE : STRING_QUICKSTARTINACTIVE, elementsof(nid.szTip) - 1 );
+// strncpy(nid.szTip, bTerminateVeto ? STRING_QUICKSTARTACTIVE : STRING_QUICKSTARTINACTIVE, SAL_N_ELEMENTS(nid.szTip) - 1 );
nid.hIcon = hIconActive;
- strncpy(nid.szTip, szTooltipString, elementsof(nid.szTip) - 1);
+ strncpy(nid.szTip, szTooltipString, SAL_N_ELEMENTS(nid.szTip) - 1);
nid.uFlags = NIF_TIP|NIF_ICON;
// update systray
@@ -421,3 +422,5 @@ LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM)
}
return FALSE;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/QuickStart/QuickStart.h b/desktop/win32/source/QuickStart/QuickStart.h
index d0afd98ec430..b61a04075e08 100644..100755
--- a/desktop/win32/source/QuickStart/QuickStart.h
+++ b/desktop/win32/source/QuickStart/QuickStart.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#if !defined(AFX_QUICKSTART_H__7D38EE02_7699_4CF0_AFF9_FD92E05CC009__INCLUDED_)
#define AFX_QUICKSTART_H__7D38EE02_7699_4CF0_AFF9_FD92E05CC009__INCLUDED_
@@ -10,3 +11,5 @@
#endif // !defined(AFX_QUICKSTART_H__7D38EE02_7699_4CF0_AFF9_FD92E05CC009__INCLUDED_)
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/QuickStart/StdAfx.h b/desktop/win32/source/QuickStart/StdAfx.h
index a4bdd66f630c..f5277a01332c 100644..100755
--- a/desktop/win32/source/QuickStart/StdAfx.h
+++ b/desktop/win32/source/QuickStart/StdAfx.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
@@ -37,3 +38,5 @@
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__A9DB83DB_A9FD_11D0_BFD1_444553540000__INCLUDED_)
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/QuickStart/resource.h b/desktop/win32/source/QuickStart/resource.h
index d34beb00c5c9..dc4a70ab5193 100644..100755
--- a/desktop/win32/source/QuickStart/resource.h
+++ b/desktop/win32/source/QuickStart/resource.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by QUICKSTART.RC
@@ -30,3 +31,5 @@
#define _APS_NEXT_SYMED_VALUE 113
#endif
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/QuickStart/so/QuickStart.rc b/desktop/win32/source/QuickStart/so/QuickStart.rc
index 732904dc745a..732904dc745a 100644..100755
--- a/desktop/win32/source/QuickStart/so/QuickStart.rc
+++ b/desktop/win32/source/QuickStart/so/QuickStart.rc
diff --git a/desktop/win32/source/QuickStart/so/makefile.mk b/desktop/win32/source/QuickStart/so/makefile.mk
index 50154c7d50b2..50154c7d50b2 100644..100755
--- a/desktop/win32/source/QuickStart/so/makefile.mk
+++ b/desktop/win32/source/QuickStart/so/makefile.mk
diff --git a/desktop/win32/source/applauncher/launcher.cxx b/desktop/win32/source/applauncher/launcher.cxx
index 386fb7500655..a7a17b59a215 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.
@@ -71,7 +72,6 @@ extern "C" int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
ppArguments = GetArgv( &nArguments );
- // if ( 1 == nArguments )
{
lpCommandLine = (LPTSTR)_alloca( sizeof(_TCHAR) * (_tcslen(lpCommandLine) + _tcslen(APPLICATION_SWITCH) + 2) );
@@ -144,3 +144,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 561b94a8f882..46829d67037c 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/makefile.mk b/desktop/win32/source/applauncher/makefile.mk
index d08309bbed24..d08309bbed24 100644..100755
--- a/desktop/win32/source/applauncher/makefile.mk
+++ b/desktop/win32/source/applauncher/makefile.mk
diff --git a/desktop/win32/source/applauncher/ooo/makefile.mk b/desktop/win32/source/applauncher/ooo/makefile.mk
index 02f240cce9e0..02f240cce9e0 100644..100755
--- a/desktop/win32/source/applauncher/ooo/makefile.mk
+++ b/desktop/win32/source/applauncher/ooo/makefile.mk
diff --git a/desktop/win32/source/applauncher/ooo/verinfo.rc b/desktop/win32/source/applauncher/ooo/verinfo.rc
index c13e723527fc..61e9147a4ab6 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,32 +46,15 @@ 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"
{
-#ifdef LG_D
- block "040704E4"
- {
- // German StringTable
- value "CompanyName", "OpenOffice.org\0"
- value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
- value "FileVersion", PPS(VER_LEVEL) "\0"
- value "ProductVersion", PPS(VER_LEVEL) "\0"
- value "OriginalFilename", PPS(RES_APP_NAME) ".exe\0"
- value "InternalName", PPS(RES_APP_NAME) "\0"
- value "LegalCopyright", S_CRIGHT " Oracle and/or its affiliates. All rights reserved.\0"
- }
-#else
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 +62,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 8f50963ca3ff..9a1f31d3dce0 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 5795cb91d491..ceca63e14450 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 63061aa4994b..034a7c4f949c 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 c3ff3f697225..cd01d01b346d 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 c5574cdb26be..3e670cd8e692 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 a8728f0a1f72..1c2fd8eabd6c 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 21919e0f3bca..1909cb97cded 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 c0ff71494014..afb58f3a377c 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,32 +51,15 @@ 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"
{
-#ifdef LG_D
- block "040704E4"
- {
- // German StringTable
- value "CompanyName", "Oracle\0"
- value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
- value "FileVersion", PPS(VER_LEVEL) "\0"
- value "ProductVersion", PPS(VER_LEVEL) "\0"
- value "OriginalFilename", PPS(RES_APP_NAME) ".exe\0"
- value "InternalName", PPS(RES_APP_NAME) "\0"
- value "LegalCopyright", S_CRIGHT " Oracle and/or its affiliates. All rights reserved.\0"
- }
-#else
block "040904E4"
{
// International StringTable
- value "CompanyName", "Oracle\0"
+ value "CompanyName", "The Document Foundation\0"
value "FileDescription", "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\0"
value "FileVersion", PPS(VER_LEVEL) "\0"
value "ProductVersion", PPS(VER_LEVEL) "\0"
@@ -88,15 +67,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 0092f04549f9..ee9de7f6099f 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 ba90a1b7bd7e..ace91b1a913d 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.
@@ -78,12 +79,10 @@ inline WCHAR * commandLineAppendEncoded(WCHAR * buffer, WCHAR const * text) {
// Set the PATH environment variable in the current (loader) process, so that a
// following CreateProcess has the necessary environment:
-//
// @param binPath
// Must point to an array of size at least MAX_PATH. Is filled with the null
// terminated full path to the "bin" file corresponding to the current
// executable.
-//
// @param iniDirectory
// Must point to an array of size at least MAX_PATH. Is filled with the null
// terminated full directory path (ending in "\") to the "ini" file
@@ -93,3 +92,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 1322c196d8a0..1d2075a65bc8 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/guiloader/makefile.mk b/desktop/win32/source/guiloader/makefile.mk
index 7912471fba13..7912471fba13 100644..100755
--- a/desktop/win32/source/guiloader/makefile.mk
+++ b/desktop/win32/source/guiloader/makefile.mk
diff --git a/desktop/win32/source/guistdio/guistdio.cxx b/desktop/win32/source/guistdio/guistdio.cxx
index 4a0518a75736..1c12089818f0 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 7f2bbe9002d8..05d462d23197 100644..100755
--- 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/makefile.mk b/desktop/win32/source/guistdio/makefile.mk
index 660a48bcdca9..660a48bcdca9 100644..100755
--- a/desktop/win32/source/guistdio/makefile.mk
+++ b/desktop/win32/source/guistdio/makefile.mk
diff --git a/desktop/win32/source/guistdio/unopkgio.cxx b/desktop/win32/source/guistdio/unopkgio.cxx
index 59701d08e1ff..8790cedfe98f 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 0d1931aafb75..eba3059da517 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 734ae4497a39..90a8b5d88f55 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 01a32ace68bb..9e3039da1884 100644..100755
--- 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/makefile.mk b/desktop/win32/source/makefile.mk
index 564ba319eb56..564ba319eb56 100644..100755
--- a/desktop/win32/source/makefile.mk
+++ b/desktop/win32/source/makefile.mk
diff --git a/desktop/win32/source/officeloader/makefile.mk b/desktop/win32/source/officeloader/makefile.mk
index 10758727b743..5609dea25085 100644..100755
--- a/desktop/win32/source/officeloader/makefile.mk
+++ b/desktop/win32/source/officeloader/makefile.mk
@@ -30,7 +30,6 @@ PRJ=..$/..$/..
PRJNAME=desktop
TARGET=officeloader
LIBTARGET=NO
-#TARGETTYPE=GUI
# --- Settings -----------------------------------------------------
@@ -41,23 +40,6 @@ LIBTARGET=NO
OBJFILES = \
$(OBJ)$/officeloader.obj
-#APP1TARGET=so$/officeloader
-#APP1NOSAL=TRUE
-#APP1LINKRES=$(MISC)$/$(TARGET).res
-#APP1ICON=$(SOLARRESDIR)$/icons/001_star_main.ico
-#APP1OBJS = \
-# $(OBJ)$/officeloader.obj
-
-#APP2TARGET=officeloader
-#APP2NOSAL=TRUE
-#APP2LINKRES=$(MISC)$/$(TARGET).res
-#APP2ICON=$(SOLARRESDIR)$/icons/ooo_gulls.ico
-#APP2OBJS = \
-# $(OBJ)$/officeloader.obj
-
-
# --- Targets ------------------------------------------------------
-
.INCLUDE : target.mk
-
diff --git a/desktop/win32/source/officeloader/officeloader.cxx b/desktop/win32/source/officeloader/officeloader.cxx
index b85a72555935..7a08d7ee64c7 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"
@@ -113,7 +115,6 @@ BOOL WINAPI ConvertSidToStringSid( PSID pSid, LPTSTR* StringSid )
}
// Add SID subauthorities to the string.
- //
for (dwCounter=0 ; dwCounter < dwSubAuthorities ; dwCounter++)
{
dwSidSize+=wsprintf(*StringSid + dwSidSize, TEXT("-%lu"),
@@ -200,7 +201,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 +229,7 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
TEXT("FastPipeCommunication"),
TEXT("0"),
szKey,
- elementsof(szKey),
+ SAL_N_ELEMENTS(szKey),
szPerfTuneIniFile
);
@@ -256,10 +257,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 );
@@ -355,7 +356,7 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
BOOL bHeadlessMode( FALSE );
{
- // Check command line arguments for "-headless" parameter. We only
+ // Check command line arguments for "--headless" parameter. We only
// set the environment variable "ATTACHED_PARENT_PROCESSID" for the headless
// mode as self-destruction of the soffice.bin process can lead to
// certain side-effects (log-off can result in data-loss, ".lock" is not deleted.
@@ -369,8 +370,11 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
for ( n = 1; n < argc; n++ )
{
- if ( 0 == _tcsnicmp( argv[n], _T("-headless"), 9 ) )
+ if ( 0 == _tcsnicmp( argv[n], _T("-headless"), 9 ) ||
+ 0 == _tcsnicmp( argv[n], _T("--headless"), 9 ) )
+ {
bHeadlessMode = TRUE;
+ }
}
}
}
@@ -417,9 +421,10 @@ int WINAPI _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int )
CloseHandle( aProcessInfo.hProcess );
CloseHandle( aProcessInfo.hThread );
}
- } while ( fSuccess
- && ( ::desktop::ExitHelper::E_CRASH_WITH_RESTART == dwExitCode || ::desktop::ExitHelper::E_NORMAL_RESTART == dwExitCode ));
+ } while ( false );
delete[] lpCommandLine;
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 b8ad7b0f824a..a8e23f2eba1d 100644..100755
--- 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/makefile.mk b/desktop/win32/source/rebase/makefile.mk
index 724ea0edf465..724ea0edf465 100644..100755
--- a/desktop/win32/source/rebase/makefile.mk
+++ b/desktop/win32/source/rebase/makefile.mk
diff --git a/desktop/win32/source/rebase/rcfooter.txt b/desktop/win32/source/rebase/rcfooter.txt
index 3237729437f5..3237729437f5 100644..100755
--- a/desktop/win32/source/rebase/rcfooter.txt
+++ b/desktop/win32/source/rebase/rcfooter.txt
diff --git a/desktop/win32/source/rebase/rcheader.txt b/desktop/win32/source/rebase/rcheader.txt
index 56afc5377920..56afc5377920 100644..100755
--- a/desktop/win32/source/rebase/rcheader.txt
+++ b/desktop/win32/source/rebase/rcheader.txt
diff --git a/desktop/win32/source/rebase/rctmpl.txt b/desktop/win32/source/rebase/rctmpl.txt
index 97a2775e9b02..97a2775e9b02 100644..100755
--- a/desktop/win32/source/rebase/rctmpl.txt
+++ b/desktop/win32/source/rebase/rctmpl.txt
diff --git a/desktop/win32/source/rebase/rebase.cxx b/desktop/win32/source/rebase/rebase.cxx
index 98d31a337d4f..ba6c3937227a 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.
@@ -43,6 +44,7 @@
#include <time.h>
#include "sal/config.h"
+#include <sal/macros.h>
#include "tools/pathutils.hxx"
#define MY_LENGTH(s) (sizeof (s) / sizeof *(s) - 1)
@@ -119,7 +121,7 @@ void rebaseImagesInFolder( wchar_t* pszFolder, DWORD nNewImageBase )
{
size_t len = lpLastSlash - pszFolder + 1;
wcsncpy( szPattern, pszFolder, len );
- wcsncpy( szPattern + len, TEXT("*.dll"), sizeof(szPattern)/sizeof(szPattern[0]) - len );
+ wcsncpy( szPattern + len, TEXT("*.dll"), SAL_N_ELEMENTS(szPattern) - len );
}
WIN32_FIND_DATA aFindFileData;
@@ -137,7 +139,7 @@ void rebaseImagesInFolder( wchar_t* pszFolder, DWORD nNewImageBase )
{
size_t len = lpLastSlash - pszFolder + 1;
wcsncpy( szLibFilePath, pszFolder, len );
- wcsncpy( szLibFilePath + len, aFindFileData.cFileName, sizeof(szLibFilePath)/sizeof(szLibFilePath[0]) - len );
+ wcsncpy( szLibFilePath + len, aFindFileData.cFileName, SAL_N_ELEMENTS(szLibFilePath) - len );
}
rebaseImage( szLibFilePath, nNewImageBase );
@@ -185,3 +187,5 @@ extern "C" int APIENTRY WinMain( HINSTANCE, HINSTANCE, LPSTR, int )
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/rebase/rebasegui.cxx b/desktop/win32/source/rebase/rebasegui.cxx
index 99585c105b64..71b4f1246447 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.
@@ -195,3 +196,5 @@ extern "C" int APIENTRY WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, int )
return 0;
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/win32/source/rebase/rebasegui.ulf b/desktop/win32/source/rebase/rebasegui.ulf
index ee6b6e828ac1..ee6b6e828ac1 100644..100755
--- a/desktop/win32/source/rebase/rebasegui.ulf
+++ b/desktop/win32/source/rebase/rebasegui.ulf
diff --git a/desktop/win32/source/rwrapa.cxx b/desktop/win32/source/rwrapa.cxx
index de57b2b3f2dc..080cb4e4be05 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 712d2f954efc..15abc299a341 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 a40d72994429..600056d0a8ee 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/makefile.mk b/desktop/win32/source/setup/makefile.mk
index d9105724035c..f0c6e0e955fd 100644
--- a/desktop/win32/source/setup/makefile.mk
+++ b/desktop/win32/source/setup/makefile.mk
@@ -43,9 +43,9 @@ ENABLE_EXCEPTIONS = TRUE
INCPRE+=$(MFC_INCLUDE)
-.IF "$(USE_STLP_DEBUG)"!=""
+.IF "$(USE_DEBUG_RUNTIME)"!=""
CDEFS+=-D_DEBUG
-.ENDIF # "$(USE_STLP_DEBUG)"!=""
+.ENDIF # "$(USE_DEBUG_RUNTIME)"!=""
RCFILES= $(RES)$/$(TARGET).rc
@@ -58,7 +58,6 @@ ULFDIR:=.
.ENDIF # "$(WITH_LANG)"!=""
OBJFILES= $(OBJ)$/setup_main.obj \
- $(OBJ)$/setup_a.obj \
$(OBJ)$/setup_w.obj
# --- Targets ------------------------------------------------------
diff --git a/desktop/win32/source/setup/setup.cpp b/desktop/win32/source/setup/setup.cpp
index edc27751b110..52746837646c 100755..100644
--- 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)
@@ -85,8 +87,8 @@
#define RUNTIME_X64_NAME TEXT( "redist\\vcredist_x64.exe" )
#define RUNTIME_X86_NAME TEXT( "redist\\vcredist_x86.exe" )
-#define PRODUCTCODE_X86 TEXT( "{E503B4BF-F7BB-3D5F-8BC8-F694B1CFF942}" )
-#define PRODUCTCODE_X64 TEXT( "{350AA351-21FA-3270-8B7A-835434E766AD}" )
+#define PRODUCTCODE_X86 TEXT( "{1F1C2DFC-2D24-3E06-BCB8-725134ADF989}" )
+#define PRODUCTCODE_X64 TEXT( "{4B6C7001-C7D6-3710-913E-5BC23FCE91E6}" )
#define MSIAPI_DllGetVersion "DllGetVersion"
#define ADVAPI32API_CheckTokenMembership "CheckTokenMembership"
@@ -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" ) );
@@ -834,10 +835,10 @@ boolean SetupAppX::LaunchInstaller( LPCTSTR pParam )
PROCESS_INFORMATION aPI;
Log( TEXT( " Will install using <%s>\r\n" ), sMsiPath );
- Log( TEXT( " Prameters are: %s\r\n" ), pParam );
+ Log( TEXT( " Parameters are: %s\r\n" ), pParam );
OutputDebugStringFormat( TEXT( " Will install using <%s>\r\n" ), sMsiPath );
- OutputDebugStringFormat( TEXT( " Prameters are: %s\r\n" ), pParam );
+ OutputDebugStringFormat( TEXT( " Parameters are: %s\r\n" ), pParam );
ZeroMemory( (void*)&aPI, sizeof( PROCESS_INFORMATION ) );
ZeroMemory( (void*)&aSUI, sizeof( STARTUPINFO ) );
@@ -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 1744b1aa427a..6eccda100699 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 d0e867d49f3f..85d43f43aa55 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
deleted file mode 100644
index 2264e96dd919..000000000000
--- a/desktop/win32/source/setup/setup_a.cxx
+++ /dev/null
@@ -1,31 +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 "setup.cpp"
diff --git a/desktop/win32/source/setup/setup_help.hxx b/desktop/win32/source/setup/setup_help.hxx
index 2a638ead0811..1330fa70f191 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 2750c87ae08a..0fb9aac2533e 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;
}
@@ -75,8 +75,6 @@ SetupApp::~SetupApp()
}
//--------------------------------------------------------------------------
-//--------------------------------------------------------------------------
-//--------------------------------------------------------------------------
extern "C" int __stdcall WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, int )
{
@@ -88,14 +86,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
{
@@ -134,7 +127,7 @@ extern "C" int __stdcall WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, int )
{
pSetup->DisplayError( ERROR_OUTOFMEMORY );
}
- catch ( UINT nErr )
+ catch ( UINT &nErr )
{
pSetup->DisplayError( nErr );
}
@@ -145,3 +138,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 525d5579a256..dfcb201e3cd3 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 a21dbd685f46..9de15b2e535d 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 4b0292be41a6..f62536a86525 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 c2a98802ccd3..0ce5c98b7215 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 ebb46aa96a1b..f0ff5b617f99 100644..100755
--- 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 e121ce12172a..0a74b1030a3a 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 700f79f60355..d76ca9b678ad 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/delzip b/desktop/zipintro/delzip
index 8b137891791f..8b137891791f 100644..100755
--- a/desktop/zipintro/delzip
+++ b/desktop/zipintro/delzip
diff --git a/desktop/zipintro/makefile.mk b/desktop/zipintro/makefile.mk
index fef106d1e09d..c0f14068823f 100644..100755
--- a/desktop/zipintro/makefile.mk
+++ b/desktop/zipintro/makefile.mk
@@ -29,99 +29,45 @@ 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))
+ $(MISC)$/$(RSCDEFIMG)$/brand$/intro.png \
+ $(MISC)$/$(RSCDEFIMG)$/brand$/about.png
ZIP2LIST= \
- $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/dev_nologo$/introabout$/intro.png $(INTRO_BITMAPS)) \
- $(null,$(ABOUT_BITMAPS) $(MISC)$/$(RSCDEFIMG)$/introabout$/about.png $(ABOUT_BITMAPS))
+ $(MISC)$/$(RSCDEFIMG)$/brand_dev$/intro.png \
+ $(MISC)$/$(RSCDEFIMG)$/brand_dev$/about.png
ZIP3LIST= \
- $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/nologo$/introabout$/intro.png $(INTRO_BITMAPS)) \
- $(null,$(ABOUT_BITMAPS) $(MISC)$/$(RSCDEFIMG)$/introabout$/about.png $(ABOUT_BITMAPS))
-ZIP4LIST= \
- $(null,$(INTRO_BITMAPS) $(MISC)$/$(RSCDEFIMG)$/introabout$/intro.png $(INTRO_BITMAPS)) \
- $(null,$(ABOUT_BITMAPS) $(MISC)$/$(RSCDEFIMG)$/introabout$/about.png $(ABOUT_BITMAPS))
-ZIP5LIST= \
- $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/dev_broffice$/introabout$/intro.png $(INTRO_BITMAPS)) \
- $(null,$(ABOUT_BITMAPS) $(MISC)$/ooo_custom_images$/broffice$/introabout$/about.png $(ABOUT_BITMAPS))
-ZIP6LIST= \
- $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/broffice$/introabout$/intro.png $(INTRO_BITMAPS)) \
- $(null,$(ABOUT_BITMAPS) $(MISC)$/ooo_custom_images$/broffice$/introabout$/about.png $(ABOUT_BITMAPS))
-ZIP7LIST= \
- $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/nologo_broffice$/introabout$/intro.png $(INTRO_BITMAPS)) \
- $(null,$(ABOUT_BITMAPS) $(MISC)$/ooo_custom_images$/broffice$/introabout$/about.png $(ABOUT_BITMAPS))
-ZIP8LIST= \
- $(null,$(INTRO_BITMAPS) $(MISC)$/ooo_custom_images$/dev_nologo_broffice$/introabout$/intro.png $(INTRO_BITMAPS)) \
- $(null,$(ABOUT_BITMAPS) $(MISC)$/ooo_custom_images$/broffice$/introabout$/about.png $(ABOUT_BITMAPS))
+ $(MISC)$/$(RSCDEFIMG)$/brand$/shell$/backing_left.png \
+ $(MISC)$/$(RSCDEFIMG)$/brand$/shell$/backing_right.png \
+ $(MISC)$/$(RSCDEFIMG)$/brand$/shell$/backing_space.png \
+ $(MISC)$/$(RSCDEFIMG)$/brand$/shell$/backing_rtl_left.png \
+ $(MISC)$/$(RSCDEFIMG)$/brand$/shell$/backing_rtl_right.png
-ZIP1TARGET=dev_intro
+ZIP1TARGET=brand
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
-
-$(COMMONBIN)$/dev$/intro.zip : $(COMMONBIN)$/dev_intro.zip
- @@-$(MKDIR) $(@:d)
- @$(COPY) $< $@
-
-$(COMMONBIN)$/dev_nologo$/intro.zip : $(COMMONBIN)$/dev_nologo_intro.zip
- @@-$(MKDIR) $(@:d)
- @$(COPY) $< $@
+ALLTAR : \
+ $(COMMONBIN)$/intro.zip \
+ $(COMMONBIN)$/brand_dev$/intro.zip \
+ $(COMMONBIN)$/shell/shell.zip
-$(COMMONBIN)$/nologo$/intro.zip : $(COMMONBIN)$/nologo_intro.zip
+$(COMMONBIN)$/brand_dev$/intro.zip : $(COMMONBIN)$/brand_dev.zip
@@-$(MKDIR) $(@:d)
@$(COPY) $< $@
-$(COMMONBIN)$/broffice$/intro.zip : $(COMMONBIN)$/broffice_intro.zip
+$(COMMONBIN)$/intro.zip : $(COMMONBIN)$/brand.zip
@@-$(MKDIR) $(@:d)
@$(COPY) $< $@
-$(COMMONBIN)$/dev_broffice$/intro.zip : $(COMMONBIN)$/dev_broffice_intro.zip
- @@-$(MKDIR) $(@:d)
- @$(COPY) $< $@
-
-$(COMMONBIN)$/nologo_broffice$/intro.zip : $(COMMONBIN)$/nologo_broffice_intro.zip
- @@-$(MKDIR) $(@:d)
- @$(COPY) $< $@
-
-$(COMMONBIN)$/nologo_dev_broffice$/intro.zip : $(COMMONBIN)$/nologo_dev_broffice_intro.zip
- @@-$(MKDIR) $(@:d)
- @$(COPY) $< $@
-
-$(COMMONBIN)$/intro$/intro.zip : $(COMMONBIN)$/intro_intro.zip
+$(COMMONBIN)$/shell$/shell.zip : $(COMMONBIN)$/shell.zip
@@-$(MKDIR) $(@:d)
@$(COPY) $< $@
@@ -132,3 +78,15 @@ $(MISC)$/%.bmp : $(SOLARSRC)$/%.bmp
$(MISC)$/%.png : $(SOLARSRC)$/%.png
@@-$(MKDIRHIER) $(@:d)
$(COPY) $< $@
+
+.IF "$(INTRO_BITMAP)" != ""
+$(MISC)$/$(RSCDEFIMG)$/brand$/intro.png : $(INTRO_BITMAP)
+ @@-$(MKDIRHIER) $(@:d)
+ $(COPY) $< $@
+.ENDIF
+
+.IF "$(ABOUT_BITMAP)" != ""
+$(MISC)$/$(RSCDEFIMG)$/brand$/about.png : $(ABOUT_BITMAP)
+ @@-$(MKDIRHIER) $(@:d)
+ $(COPY) $< $@
+.ENDIF