summaryrefslogtreecommitdiff
path: root/desktop/source
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/source')
-rwxr-xr-x[-rw-r--r--]desktop/source/app/app.cxx481
-rwxr-xr-x[-rw-r--r--]desktop/source/app/appfirststart.cxx212
-rwxr-xr-x[-rw-r--r--]desktop/source/app/appinit.cxx62
-rwxr-xr-x[-rw-r--r--]desktop/source/app/appinit.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/app/appsys.cxx9
-rwxr-xr-x[-rw-r--r--]desktop/source/app/appsys.hxx3
-rwxr-xr-xdesktop/source/app/check_ext_deps.cxx19
-rwxr-xr-x[-rw-r--r--]desktop/source/app/checkinstall.cxx6
-rwxr-xr-x[-rw-r--r--]desktop/source/app/checkinstall.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/app/cmdlineargs.cxx389
-rwxr-xr-x[-rw-r--r--]desktop/source/app/cmdlineargs.hxx117
-rwxr-xr-x[-rw-r--r--]desktop/source/app/cmdlinehelp.cxx111
-rwxr-xr-x[-rw-r--r--]desktop/source/app/cmdlinehelp.hxx6
-rwxr-xr-x[-rw-r--r--]desktop/source/app/configinit.cxx4
-rwxr-xr-x[-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
-rwxr-xr-x[-rw-r--r--]desktop/source/app/desktop.src0
-rwxr-xr-x[-rw-r--r--]desktop/source/app/desktopcontext.cxx8
-rwxr-xr-x[-rw-r--r--]desktop/source/app/desktopcontext.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/app/desktopresid.cxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/app/desktopresid.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/app/dispatchwatcher.cxx267
-rwxr-xr-x[-rw-r--r--]desktop/source/app/dispatchwatcher.hxx14
-rwxr-xr-x[-rw-r--r--]desktop/source/app/exports.dxp0
-rwxr-xr-x[-rw-r--r--]desktop/source/app/langselect.cxx38
-rwxr-xr-x[-rw-r--r--]desktop/source/app/langselect.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/app/lockfile.cxx135
-rwxr-xr-x[-rw-r--r--]desktop/source/app/lockfile.hxx20
-rwxr-xr-x[-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.mk6
-rwxr-xr-x[-rw-r--r--]desktop/source/app/officeipcthread.cxx141
-rwxr-xr-x[-rw-r--r--]desktop/source/app/officeipcthread.hxx28
-rwxr-xr-x[-rw-r--r--]desktop/source/app/omutexmember.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/app/sofficemain.cxx27
-rwxr-xr-x[-rw-r--r--]desktop/source/app/sofficemain.h3
-rwxr-xr-x[-rw-r--r--]desktop/source/app/userinstall.cxx40
-rwxr-xr-x[-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
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/dp_log.cxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/dp_persmap.cxx19
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/dp_services.cxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/dp_xml.cxx17
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/deploymentgui.component0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/descedit.cxx2
-rwxr-xr-x[-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
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_autoscrolledit.cxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_autoscrolledit.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_backend.src45
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_dependencydialog.cxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_dependencydialog.hxx5
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_dependencydialog.src0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_dialog.src19
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_dialog2.cxx39
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_dialog2.hxx4
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_dialog2.src20
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx107
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_extensioncmdqueue.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_extlistbox.cxx26
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_extlistbox.hxx8
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_service.cxx14
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_shared.hxx3
-rw-r--r--desktop/source/deployment/gui/dp_gui_system.cxx59
-rw-r--r--desktop/source/deployment/gui/dp_gui_system.hxx37
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_theextmgr.cxx18
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_theextmgr.hxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_thread.cxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_thread.hxx3
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_updatedata.hxx3
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_updatedialog.cxx122
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_updatedialog.hxx8
-rwxr-xr-xdesktop/source/deployment/gui/dp_gui_updatedialog.src9
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx37
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx5
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_updateinstalldialog.src0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/dp_gui_versionboxes.src0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/license_dialog.cxx9
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/license_dialog.hxx8
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/gui/makefile.mk4
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/inc/db.hxx40
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/inc/dp_dependencies.hxx12
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/inc/dp_descriptioninfoset.hxx3
-rwxr-xr-x[-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.mk0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/inc/dp_misc_api.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/inc/dp_persmap.h7
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/inc/dp_platform.hxx5
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/inc/dp_resource.h3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/inc/dp_ucb.h3
-rwxr-xr-xdesktop/source/deployment/inc/dp_update.hxx3
-rwxr-xr-x[-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.mk1
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/dp_activepackages.cxx5
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/dp_activepackages.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/dp_commandenvironments.cxx42
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/dp_commandenvironments.hxx28
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/dp_extensionmanager.cxx72
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/dp_extensionmanager.hxx16
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/dp_informationprovider.cxx4
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/dp_manager.cxx8
-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
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/dp_manager.src0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/dp_managerfac.cxx4
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/dp_properties.cxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/dp_properties.hxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/manager/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/misc/db.cxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/misc/dp_dependencies.cxx51
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/misc/dp_descriptioninfoset.cxx5
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/misc/dp_identifier.cxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/misc/dp_interact.cxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/misc/dp_misc.cxx8
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/misc/dp_misc.hrc0
-rwxr-xr-xdesktop/source/deployment/misc/dp_misc.src4
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/misc/dp_platform.cxx32
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/misc/dp_resource.cxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/misc/dp_ucb.cxx5
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/misc/dp_update.cxx48
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/misc/dp_version.cxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/misc/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/component/dp_compbackenddb.cxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/component/dp_compbackenddb.hxx2
-rwxr-xr-x[-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/dp_component.src0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/component/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/configuration/dp_configuration.cxx15
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/configuration/dp_configuration.hrc0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/configuration/dp_configuration.src0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx9
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/configuration/dp_configurationbackenddb.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/configuration/makefile.mk0
-rwxr-xr-xdesktop/source/deployment/registry/dp_backend.cxx21
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/dp_backenddb.cxx14
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/dp_registry.cxx12
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/dp_registry.src0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/executable/dp_executable.cxx7
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/executable/dp_executablebackenddb.cxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/executable/dp_executablebackenddb.hxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/executable/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/help/dp_help.cxx46
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/help/dp_help.hrc0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/help/dp_help.src0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/help/dp_helpbackenddb.cxx35
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/help/dp_helpbackenddb.hxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/help/makefile.mk0
-rwxr-xr-xdesktop/source/deployment/registry/inc/dp_backend.h15
-rwxr-xr-x[-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
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/package/dp_extbackenddb.cxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/package/dp_extbackenddb.hxx13
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/package/dp_package.cxx17
-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/dp_package.src0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/package/makefile.mk0
-rwxr-xr-x[-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
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/script/dp_script.cxx158
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/script/dp_script.hrc0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/script/dp_script.src0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/script/dp_scriptbackenddb.hxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/script/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/sfwk/dp_parceldesc.cxx6
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/registry/sfwk/dp_parceldesc.hxx3
-rwxr-xr-xdesktop/source/deployment/registry/sfwk/dp_sfwk.cxx43
-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/dp_sfwk.src0
-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.mk0
-rwxr-xr-x[-rw-r--r--]desktop/source/deployment/unopkg/unopkg.src0
-rwxr-xr-x[-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
-rwxr-xr-xdesktop/source/migration/migration.cxx278
-rw-r--r--desktop/source/migration/migration.hxx46
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/migration_impl.hxx16
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/pages.cxx0
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/pages.hxx0
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/autocorrmigration.cxx7
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/autocorrmigration.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/basicmigration.cxx5
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/basicmigration.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/cexports.cxx18
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/cexportsoo3.cxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/cppumaker.mk0
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/jvmfwk.cxx21
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/jvmfwk.hxx2
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/makefile.mk3
-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
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/misc.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/oo3extensionmigration.cxx29
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/services/oo3extensionmigration.hxx3
-rwxr-xr-xdesktop/source/migration/services/wordbookmigration.cxx5
-rwxr-xr-xdesktop/source/migration/services/wordbookmigration.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/wizard.cxx0
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/wizard.hrc0
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/wizard.hxx0
-rwxr-xr-x[-rw-r--r--]desktop/source/migration/wizard.src0
-rwxr-xr-x[-rw-r--r--]desktop/source/offacc/acceptor.cxx32
-rwxr-xr-x[-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/file_image.h3
-rwxr-xr-x[-rw-r--r--]desktop/source/pagein/file_image_unx.c3
-rwxr-xr-x[-rw-r--r--]desktop/source/pagein/makefile.mk45
-rwxr-xr-x[-rw-r--r--]desktop/source/pagein/pagein.c3
-rwxr-xr-x[-rw-r--r--]desktop/source/pkgchk/unopkg/makefile.mk0
-rwxr-xr-x[-rw-r--r--]desktop/source/pkgchk/unopkg/unopkg_app.cxx14
-rwxr-xr-x[-rw-r--r--]desktop/source/pkgchk/unopkg/unopkg_cmdenv.cxx23
-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
-rwxr-xr-x[-rw-r--r--]desktop/source/pkgchk/unopkg/unopkg_misc.cxx5
-rwxr-xr-x[-rw-r--r--]desktop/source/pkgchk/unopkg/unopkg_shared.h5
-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.java0
-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.java0
-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.java0
-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.java0
-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
-rwxr-xr-x[-rw-r--r--]desktop/source/so_comp/evaluation.cxx14
-rwxr-xr-x[-rw-r--r--]desktop/source/so_comp/evaluation.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/so_comp/makefile.mk5
-rwxr-xr-x[-rw-r--r--]desktop/source/so_comp/oemjob.cxx48
-rwxr-xr-x[-rw-r--r--]desktop/source/so_comp/oemjob.hxx3
-rwxr-xr-x[-rw-r--r--]desktop/source/so_comp/services.cxx7
-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
-rwxr-xr-xdesktop/source/splash/services_spl.cxx13
-rwxr-xr-x[-rw-r--r--]desktop/source/splash/spl.component0
-rwxr-xr-x[-rw-r--r--]desktop/source/splash/splash.cxx196
-rwxr-xr-x[-rw-r--r--]desktop/source/splash/splash.hxx10
265 files changed, 2393 insertions, 3308 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index a2f602082fe4..82d5afd986cc 100644..100755
--- 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 );
}
@@ -319,8 +296,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 )
@@ -632,70 +608,73 @@ throw()
}
else if( TypeToCopy == +1 ) // Folder
{
- osl::Directory aDir( srcUnqPath );
- aDir.open();
-
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 = FileStatusMask_FileURL |
+ FileStatusMask_FileName |
+ FileStatusMask_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( 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 ) )
+ {
+ ::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;
@@ -736,14 +715,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_ENSURE(0, "Service factory should have been crated in soffice_main().");
SetBootstrapError( BE_UNO_SERVICEMANAGER );
}
@@ -762,13 +737,6 @@ void Desktop::Init()
if ( GetBootstrapError() == BE_OK )
{
CommandLineArgs* pCmdLineArgs = GetCommandLineArgs();
-#ifdef UNX
- // check whether we need to print cmdline help
- if ( pCmdLineArgs->IsHelp() ) {
- displayCmdlineHelp();
- SetBootstrapStatus(BS_TERMINATE);
- }
-#endif
// start ipc thread only for non-remote offices
RTL_LOGFILE_CONTEXT( aLog2, "desktop (cd100003) ::OfficeIPCThread::EnableOfficeIPCThread" );
OfficeIPCThread::Status aStatus = OfficeIPCThread::EnableOfficeIPCThread();
@@ -786,7 +754,25 @@ void Desktop::Init()
// disable IPC thread in an instance that is just showing a help message
OfficeIPCThread::DisableOfficeIPCThread();
}
- pSignalHandler = new SalMainPipeExchangeSignalHandler;
+ pSignalHandler = osl_addSignalHandler(SalMainPipeExchangeSignal_impl, NULL);
+ }
+}
+
+void Desktop::InitFinished()
+{
+ RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::Desktop::InitFinished" );
+
+ CloseSplashScreen();
+}
+
+// GetCommandLineArgs() requires this code to work, otherwise it will abort, and
+// on Unix command line args needs to be checked before Desktop::Init()
+void Desktop::CreateProcessServiceFactory()
+{
+ Reference < XMultiServiceFactory > rSMgr = CreateApplicationServiceManager();
+ if( rSMgr.is() )
+ {
+ ::comphelper::setProcessServiceFactory( rSMgr );
}
}
@@ -797,7 +783,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" );
@@ -814,7 +800,7 @@ void Desktop::DeInit()
OfficeIPCThread::DisableOfficeIPCThread();
if( pSignalHandler )
- DELETEZ( pSignalHandler );
+ osl_removeSignalHandler( pSignalHandler );
} catch (RuntimeException&) {
// someone threw an exception during shutdown
// this will leave some garbage behind..
@@ -828,7 +814,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& )
@@ -881,14 +867,10 @@ void Desktop::HandleBootstrapPathErrors( ::utl::Bootstrap::Status aBootstrapStat
{
if ( aBootstrapStatus != ::utl::Bootstrap::DATA_OK )
{
- sal_Bool bWorkstationInstallation = sal_False;
- ::rtl::OUString aBaseInstallURL;
- ::rtl::OUString aUserInstallURL;
::rtl::OUString aProductKey;
::rtl::OUString aTemp;
- ::vos::OStartupInfo aInfo;
- aInfo.getExecutableFile( aProductKey );
+ osl_getExecutableFile( &aProductKey.pData );
sal_uInt32 lastIndex = aProductKey.lastIndexOf('/');
if ( lastIndex > 0 )
aProductKey = aProductKey.copy( lastIndex+1 );
@@ -897,16 +879,6 @@ void Desktop::HandleBootstrapPathErrors( ::utl::Bootstrap::Status aBootstrapStat
if ( aTemp.getLength() > 0 )
aProductKey = aTemp;
- ::utl::Bootstrap::PathStatus aBaseInstallStatus = ::utl::Bootstrap::locateBaseInstallation( aBaseInstallURL );
- ::utl::Bootstrap::PathStatus aUserInstallStatus = ::utl::Bootstrap::locateUserInstallation( aUserInstallURL );
-
- if (( aBaseInstallStatus == ::utl::Bootstrap::PATH_EXISTS &&
- aUserInstallStatus == ::utl::Bootstrap::PATH_EXISTS ))
- {
- if ( aBaseInstallURL != aUserInstallURL )
- bWorkstationInstallation = sal_True;
- }
-
OUString aMessage;
OUStringBuffer aBuffer( 100 );
aBuffer.append( aDiagnosticMessage );
@@ -1213,9 +1185,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();
@@ -1235,9 +1207,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();
@@ -1286,12 +1258,10 @@ void impl_checkRecoveryState(sal_Bool& bCrashed ,
sal_Bool& bRecoveryDataExists,
sal_Bool& bSessionDataExists )
{
- static const ::rtl::OUString SERVICENAME_RECOVERYCORE = ::rtl::OUString::createFromAscii("com.sun.star.frame.AutoRecovery");
- static const ::rtl::OUString PROP_CRASHED = ::rtl::OUString::createFromAscii("Crashed" );
- static const ::rtl::OUString PROP_EXISTSRECOVERY = ::rtl::OUString::createFromAscii("ExistsRecoveryData" );
- static const ::rtl::OUString PROP_EXISTSSESSION = ::rtl::OUString::createFromAscii("ExistsSessionData" );
- static const ::rtl::OUString CFG_PACKAGE_RECOVERY = ::rtl::OUString::createFromAscii("org.openoffice.Office.Recovery/");
- static const ::rtl::OUString CFG_PATH_RECOVERYINFO = ::rtl::OUString::createFromAscii("RecoveryInfo" );
+ static const ::rtl::OUString SERVICENAME_RECOVERYCORE(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.AutoRecovery"));
+ static const ::rtl::OUString PROP_CRASHED(RTL_CONSTASCII_USTRINGPARAM("Crashed"));
+ static const ::rtl::OUString PROP_EXISTSRECOVERY(RTL_CONSTASCII_USTRINGPARAM("ExistsRecoveryData"));
+ static const ::rtl::OUString PROP_EXISTSSESSION(RTL_CONSTASCII_USTRINGPARAM("ExistsSessionData"));
bCrashed = sal_False;
bRecoveryDataExists = sal_False;
@@ -1321,11 +1291,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();
@@ -1509,8 +1479,12 @@ sal_uInt16 Desktop::Exception(sal_uInt16 nError)
{
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
@@ -1531,6 +1505,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;
@@ -1561,12 +1553,12 @@ void Desktop::Main()
if ( eError != BE_OK )
{
HandleBootstrapErrors( eError );
- return;
+ return EXIT_FAILURE;
}
BootstrapStatus eStatus = GetBootstrapStatus();
if (eStatus == BS_TERMINATE) {
- return;
+ return EXIT_FAILURE;
}
// Detect desktop environment - need to do this as early as possible
@@ -1587,6 +1579,7 @@ void Desktop::Main()
OpenSplashScreen();
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main } OpenSplashScreen" );
+ SetSplashScreenProgress(10);
{
UserInstall::UserInstallError instErr_fin = UserInstall::finalize();
if ( instErr_fin != UserInstall::E_None)
@@ -1598,11 +1591,11 @@ void Desktop::Main()
HandleBootstrapErrors( BE_USERINSTALL_NOWRITEACCESS );
else
HandleBootstrapErrors( BE_USERINSTALL_FAILED );
- return;
+ return EXIT_FAILURE;
}
// refresh path information
utl::Bootstrap::reloadData();
- SetSplashScreenProgress(25);
+ SetSplashScreenProgress(20);
}
Reference< XMultiServiceFactory > xSMgr =
@@ -1614,12 +1607,12 @@ void Desktop::Main()
{
RegisterServices( xSMgr );
- //SetSplashScreenProgress(15);
+ SetSplashScreenProgress(25);
#ifndef UNX
if ( pCmdLineArgs->IsHelp() ) {
displayCmdlineHelp();
- return;
+ return EXIT_SUCCESS;
}
#endif
@@ -1629,7 +1622,7 @@ void Desktop::Main()
m_pLockfile = new Lockfile;
if ( !pCmdLineArgs->IsInvisible() && !pCmdLineArgs->IsNoLockcheck() && !m_pLockfile->check( Lockfile_execWarning )) {
// Lockfile exists, and user clicked 'no'
- return;
+ return EXIT_FAILURE;
}
RTL_LOGFILE_CONTEXT_TRACE( aLog, "desktop (lo119109) Desktop::Main <- Lockfile" );
@@ -1641,18 +1634,20 @@ void Desktop::Main()
if( !InitAccessBridge( true, bQuitApp ) )
if( bQuitApp )
- return;
+ return EXIT_FAILURE;
}
RTL_LOGFILE_CONTEXT_TRACE( aLog, "} GetEnableATToolSupport" );
// terminate if requested...
- if( pCmdLineArgs->IsTerminateAfterInit() ) return;
+ if( pCmdLineArgs->IsTerminateAfterInit() )
+ return EXIT_SUCCESS;
// Read the common configuration items for optimization purpose
- if ( !InitializeConfiguration() ) return;
+ if ( !InitializeConfiguration() )
+ return EXIT_FAILURE;
- //SetSplashScreenProgress(20);
+ SetSplashScreenProgress(30);
// set static variable to enabled/disable crash reporter
retrieveCrashReporterState();
@@ -1666,7 +1661,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;
@@ -1674,7 +1669,7 @@ void Desktop::Main()
OUString aTitleString( aTitle );
bCheckOk = CheckInstallation( aTitleString );
if ( !bCheckOk )
- return;
+ return EXIT_FAILURE;
else
aTitle = aTitleString;
@@ -1688,6 +1683,7 @@ void Desktop::Main()
#endif
SetDisplayName( aTitle );
+ SetSplashScreenProgress(35);
RTL_LOGFILE_CONTEXT_TRACE( aLog, "{ create SvtPathOptions and SvtLanguageOptions" );
pExecGlobals->pPathOptions.reset( new SvtPathOptions);
SetSplashScreenProgress(40);
@@ -1728,38 +1724,9 @@ void Desktop::Main()
SynchronizeExtensionRepositories();
bool bAbort = CheckExtensionDependencies();
if ( bAbort )
- return;
- // First Start Wizard allowed ?
- if ( ! pCmdLineArgs->IsNoFirstStartWizard())
- {
- 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();
+ return EXIT_FAILURE;
- RTL_LOGFILE_CONTEXT_TRACE( aLog, "} FirstStartWizard" );
- }
+ Migration::migrateSettingsIfNecessary();
// keep a language options instance...
pExecGlobals->pLanguageOptions.reset( new SvtLanguageOptions(sal_True));
@@ -1767,7 +1734,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);
}
@@ -1812,6 +1779,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;
@@ -1820,13 +1788,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;
@@ -1856,13 +1818,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();
@@ -1871,6 +1834,7 @@ void Desktop::Main()
aAppearanceCfg.SetApplicationDefaults( this );
SvtAccessibilityOptions aOptions;
aOptions.SetVCLSettings();
+ SetSplashScreenProgress(60);
if ( !pExecGlobals->bRestartRequested )
{
@@ -1883,7 +1847,7 @@ void Desktop::Main()
// use system window dialogs
Application::SetSystemWindowMode( SYSTEMWINDOW_MODE_DIALOG );
- // SetSplashScreenProgress(80);
+ SetSplashScreenProgress(80);
if ( !bTerminateRequested && !pCmdLineArgs->IsInvisible() &&
!pCmdLineArgs->IsNoQuickstart() )
@@ -1901,7 +1865,7 @@ void Desktop::Main()
catch ( com::sun::star::uno::Exception& e )
{
FatalError( MakeStartupErrorMessage(e.Message) );
- return;
+ return EXIT_FAILURE;
}
// Post user event to startup first application component window
@@ -1967,7 +1931,7 @@ 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);
}
@@ -2004,9 +1968,12 @@ 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 )
@@ -2082,7 +2049,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();
@@ -2090,12 +2057,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, FALSE, &pItem);
+ if (SFX_ITEM_SET == eState)
+ bQuickstart = ((SfxBoolItem*)pItem)->GetValue();
+ }
+ return bQuickstart;
+}
+
+
sal_Bool Desktop::InitializeQuickstartMode( Reference< XMultiServiceFactory >& rSMgr )
{
try
@@ -2105,9 +2088,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
@@ -2120,6 +2101,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 );
@@ -2168,24 +2151,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 );
}
@@ -2221,7 +2188,6 @@ IMPL_LINK( Desktop, OpenClients_Impl, void*, EMPTYARG )
OfficeIPCThread::SetReady();
- // CloseStartupScreen();
CloseSplashScreen();
CheckFirstRun( );
EnableOleAutomation();
@@ -2254,7 +2220,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;
@@ -2511,7 +2477,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 >(
@@ -2522,7 +2488,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 >(
@@ -2533,7 +2499,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 >(
@@ -2544,7 +2510,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 >(
@@ -2555,7 +2521,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 >(
@@ -2565,7 +2531,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 >(
@@ -2576,7 +2542,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 >(
@@ -2587,7 +2553,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 >(
@@ -2598,7 +2564,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 >(
@@ -2670,9 +2636,8 @@ void Desktop::OpenClients()
else
{
OUString aIniName;
- ::vos::OStartupInfo aInfo;
- aInfo.getExecutableFile( aIniName );
+ osl_getExecutableFile( &aIniName.pData );
sal_uInt32 lastIndex = aIniName.lastIndexOf('/');
if ( lastIndex > 0 )
{
@@ -2691,7 +2656,7 @@ void Desktop::OpenClients()
OUString aPreloadData;
aPerfTuneIniFile.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "QuickstartPreloadConfiguration" )), aPreloadData, aDefault );
- if ( aPreloadData.equalsAscii( "1" ))
+ if ( aPreloadData.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "1" ) ))
{
if ( pArgs->IsWriter() ||
pArgs->IsCalc() ||
@@ -2731,14 +2696,14 @@ void Desktop::OpenClients()
::com::sun::star::uno::UNO_QUERY_THROW );
css::util::URL aCmd;
- aCmd.Complete = ::rtl::OUString::createFromAscii("vnd.sun.star.autorecovery:/disableRecovery");
+ aCmd.Complete = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("vnd.sun.star.autorecovery:/disableRecovery"));
xParser->parseStrict(aCmd);
xRecovery->dispatch(aCmd, css::uno::Sequence< css::beans::PropertyValue >());
}
catch(const css::uno::Exception& e)
{
- OUString aMessage = OUString::createFromAscii("Could not disable AutoRecovery.\n")
+ OUString aMessage = OUString(RTL_CONSTASCII_USTRINGPARAM("Could not disable AutoRecovery.\n"))
+ e.Message;
OSL_ENSURE(sal_False, OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
}
@@ -2780,7 +2745,7 @@ void Desktop::OpenClients()
}
catch(const css::uno::Exception& e)
{
- OUString aMessage = OUString::createFromAscii("Error during recovery\n")
+ OUString aMessage = OUString(RTL_CONSTASCII_USTRINGPARAM("Error during recovery\n"))
+ e.Message;
OSL_ENSURE(sal_False, OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
}
@@ -2790,7 +2755,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();
@@ -2803,7 +2768,7 @@ void Desktop::OpenClients()
}
catch(const com::sun::star::uno::Exception& e)
{
- OUString aMessage = OUString::createFromAscii("Registration of session listener failed\n")
+ OUString aMessage = OUString(RTL_CONSTASCII_USTRINGPARAM("Registration of session listener failed\n"))
+ e.Message;
OSL_ENSURE(sal_False, OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
}
@@ -2821,7 +2786,7 @@ void Desktop::OpenClients()
}
catch(const com::sun::star::uno::Exception& e)
{
- OUString aMessage = OUString::createFromAscii("Error in session management\n")
+ OUString aMessage = OUString(RTL_CONSTASCII_USTRINGPARAM("Error in session management\n"))
+ e.Message;
OSL_ENSURE(sal_False, OUStringToOString(aMessage, RTL_TEXTENCODING_ASCII_US).getStr());
}
@@ -2844,6 +2809,10 @@ void Desktop::OpenClients()
pArgs->GetPrinterName( aRequest.aPrinterName );
pArgs->GetForceOpenList( aRequest.aForceOpenList );
pArgs->GetForceNewList( aRequest.aForceNewList );
+ pArgs->GetConversionList( aRequest.aConversionList );
+ pArgs->GetConversionParams( aRequest.aConversionParams );
+ pArgs->GetConversionOut( aRequest.aConversionOut );
+ pArgs->GetInFilter( aRequest.aInFilter );
if ( aRequest.aOpenList.getLength() > 0 ||
aRequest.aViewList.getLength() > 0 ||
@@ -2851,7 +2820,8 @@ void Desktop::OpenClients()
aRequest.aPrintList.getLength() > 0 ||
aRequest.aForceOpenList.getLength() > 0 ||
aRequest.aForceNewList.getLength() > 0 ||
- ( aRequest.aPrintToList.getLength() > 0 && aRequest.aPrinterName.getLength() > 0 ))
+ ( aRequest.aPrintToList.getLength() > 0 && aRequest.aPrinterName.getLength() > 0 ) ||
+ aRequest.aConversionList.getLength() > 0 )
{
bLoaded = sal_True;
@@ -2987,7 +2957,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.
@@ -3208,7 +3178,8 @@ void Desktop::OpenSplashScreen()
!pCmdLine->IsNoLogo() &&
!pCmdLine->IsTerminateAfterInit() &&
!pCmdLine->GetPrintList( aTmpString ) &&
- !pCmdLine->GetPrintToList( aTmpString ) )
+ !pCmdLine->GetPrintToList( aTmpString ) &&
+ !pCmdLine->GetConversionList( aTmpString ))
{
// Determine application name from command line parameters
OUString aAppName;
@@ -3229,17 +3200,21 @@ void Desktop::OpenSplashScreen()
else if ( pCmdLine->IsWeb() )
aAppName = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "web" ));
+ // Which splash to use
+ OUString aSplashService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.office.SplashScreen" ));
+ if ( pCmdLine->GetStringParam( CommandLineArgs::CMD_STRINGPARAM_SPLASHPIPE ).getLength() )
+ aSplashService = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.office.PipeSplashScreen"));
+
bVisible = sal_True;
Sequence< Any > aSeq( 2 );
aSeq[0] <<= bVisible;
aSeq[1] <<= aAppName;
m_rSplashScreen = Reference<XStatusIndicator>(
comphelper::getProcessServiceFactory()->createInstanceWithArguments(
- OUString::createFromAscii("com.sun.star.office.SplashScreen"),
- aSeq), UNO_QUERY);
+ aSplashService, aSeq), UNO_QUERY);
if(m_rSplashScreen.is())
- m_rSplashScreen->start(OUString::createFromAscii("SplashScreen"), 100);
+ m_rSplashScreen->start(OUString(RTL_CONSTASCII_USTRINGPARAM("SplashScreen")), 100);
}
}
@@ -3274,9 +3249,9 @@ void Desktop::DoFirstRunInitializations()
{
try
{
- Reference< XJobExecutor > xExecutor( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString::createFromAscii( "com.sun.star.task.JobExecutor" ) ), UNO_QUERY );
+ Reference< XJobExecutor > xExecutor( ::comphelper::getProcessServiceFactory()->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.JobExecutor")) ), UNO_QUERY );
if( xExecutor.is() )
- xExecutor->trigger( ::rtl::OUString::createFromAscii("onFirstRunInitialization") );
+ xExecutor->trigger( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("onFirstRunInitialization")) );
}
catch(const ::com::sun::star::uno::Exception&)
{
@@ -3287,8 +3262,8 @@ void Desktop::DoFirstRunInitializations()
// ========================================================================
void Desktop::CheckFirstRun( )
{
- const ::rtl::OUString sCommonMiscNodeName = ::rtl::OUString::createFromAscii( "/org.openoffice.Office.Common/Misc" );
- const ::rtl::OUString sFirstRunNodeName = ::rtl::OUString::createFromAscii( "FirstRun" );
+ const ::rtl::OUString sCommonMiscNodeName(RTL_CONSTASCII_USTRINGPARAM("/org.openoffice.Office.Common/Misc"));
+ const ::rtl::OUString sFirstRunNodeName(RTL_CONSTASCII_USTRINGPARAM("FirstRun"));
// --------------------------------------------------------------------
// check if this is the first office start
@@ -3330,3 +3305,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..100755
--- 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..973a88357f46 100644..100755
--- 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,32 +146,11 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect)
);
rtl::OUString aDesktopEnvironment;
if ((aValue >>= aDesktopEnvironment)
- && aDesktopEnvironment.equalsAscii("GNOME"))
+ && aDesktopEnvironment.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("GNOME")))
{
Reference<XContentProviderManager> xCPM =
cb->getContentProviderManagerInterface();
-#if 0
- try
- {
- Reference<XContentProviderFactory> xCPF(
- xServiceFactory->createInstance(
- rtl::OUString::createFromAscii(
- "com.sun.star.ucb.ContentProviderProxyFactory")),
- UNO_QUERY);
- if(xCPF.is())
- xCPM->registerContentProvider(
- xCPF->createContentProvider(
- rtl::OUString::createFromAscii(
- "com.sun.star.ucb.GnomeVFSContentProvider"
- )
- ),
- rtl::OUString::createFromAscii(".*"),
- false);
- } catch (...)
- {
- }
-#else
// Workaround for P1 #124597#. Instanciate GNOME-VFS-UCP in the thread that initialized
// GNOME in order to avoid a deadlock that may occure in case UCP gets initialized from
@@ -182,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
@@ -299,8 +277,8 @@ void Desktop::RegisterServices( Reference< XMultiServiceFactory >& xSMgr )
pCmdLine->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 );
@@ -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..100755
--- 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..287a9464793e 100644..100755
--- 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,9 +35,8 @@
#include <rtl/ustring.hxx>
#include <tools/solar.h>
-#include <tools/prewin.h>
-#include <winreg.h>
-#include <tools/postwin.h>
+#include <prewin.h>
+#include <postwin.h>
#include <tools/urlobj.hxx>
@@ -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..100755
--- 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..20bad6f4504a 100755
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -333,15 +334,15 @@ static void impl_setNeedsCompatCheck()
xFactory->createInstance(sConfigSrvc), UNO_QUERY_THROW);
Sequence< Any > theArgs(1);
- beans::NamedValue v( OUString::createFromAscii("NodePath"),
- makeAny( OUString::createFromAscii("org.openoffice.Setup/Office") ) );
+ beans::NamedValue v( OUString(RTL_CONSTASCII_USTRINGPARAM("NodePath")),
+ makeAny( OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup/Office")) ) );
theArgs[0] <<= v;
Reference< beans::XPropertySet > pset = Reference< beans::XPropertySet >(
theConfigProvider->createInstanceWithArguments( sAccessSrvc, theArgs ), UNO_QUERY_THROW );
- Any value = makeAny( OUString::createFromAscii("never") );
+ Any value = makeAny( OUString(RTL_CONSTASCII_USTRINGPARAM("never")) );
- pset->setPropertyValue( OUString::createFromAscii("LastCompatibilityCheckID"), value );
+ pset->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LastCompatibilityCheckID")), value );
Reference< util::XChangesBatch >( pset, UNO_QUERY_THROW )->commitChanges();
}
catch (const Exception&) {}
@@ -386,20 +387,20 @@ static bool impl_needsCompatCheck()
xFactory->createInstance(sConfigSrvc), UNO_QUERY_THROW);
Sequence< Any > theArgs(1);
- beans::NamedValue v( OUString::createFromAscii("NodePath"),
- makeAny( OUString::createFromAscii("org.openoffice.Setup/Office") ) );
+ beans::NamedValue v( OUString(RTL_CONSTASCII_USTRINGPARAM("NodePath")),
+ makeAny( OUString(RTL_CONSTASCII_USTRINGPARAM("org.openoffice.Setup/Office")) ) );
theArgs[0] <<= v;
Reference< beans::XPropertySet > pset = Reference< beans::XPropertySet >(
theConfigProvider->createInstanceWithArguments( sAccessSrvc, theArgs ), UNO_QUERY_THROW );
- Any result = pset->getPropertyValue( OUString::createFromAscii("LastCompatibilityCheckID") );
+ Any result = pset->getPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LastCompatibilityCheckID")) );
result >>= aLastCheckBuildID;
if ( aLastCheckBuildID != aCurrentBuildID )
{
bNeedsCheck = true;
result <<= aCurrentBuildID;
- pset->setPropertyValue( OUString::createFromAscii("LastCompatibilityCheckID"), result );
+ pset->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("LastCompatibilityCheckID")), result );
Reference< util::XChangesBatch >( pset, UNO_QUERY_THROW )->commitChanges();
}
#ifdef DEBUG
@@ -429,3 +430,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..100755
--- 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..100755
--- 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..998f414c6887 100644..100755
--- 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;
@@ -163,7 +172,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
break;
}
// convert file URLs to internal form #112849#
- if (aArg.indexOf(OUString::createFromAscii("file:"))==0 &&
+ if (aArg.indexOfAsciiL(RTL_CONSTASCII_STRINGPARAM("file:"))==0 &&
xTranslator.is())
{
OUString tmp(xTranslator->translateToInternal(aArg));
@@ -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..100755
--- 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..100755
--- 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..100755
--- 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..7a4bf00671b2 100644..100755
--- a/desktop/source/app/configinit.cxx
+++ b/desktop/source/app/configinit.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -242,7 +243,7 @@ private:
uno::Any SAL_CALL ConfigurationErrorHandler::Context::getValueByName( OUString const & aName)
throw (uno::RuntimeException)
{
- if ( aName.equalsAscii( CONFIG_ERROR_HANDLER ) )
+ if ( aName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(CONFIG_ERROR_HANDLER)) )
{
if ( !m_xHandler.is() )
m_xHandler = ConfigurationErrorHandler::getDefaultInteractionHandler();
@@ -301,3 +302,4 @@ ConfigurationErrorHandler::InteractionHandler ConfigurationErrorHandler::getDefa
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/configinit.hxx b/desktop/source/app/configinit.hxx
index 68df86656bea..24fb01881396 100644..100755
--- 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/desktop.src b/desktop/source/app/desktop.src
index 98ee68685917..98ee68685917 100644..100755
--- a/desktop/source/app/desktop.src
+++ b/desktop/source/app/desktop.src
diff --git a/desktop/source/app/desktopcontext.cxx b/desktop/source/app/desktopcontext.cxx
index e516b5eadd46..2a8ed7ef628c 100644..100755
--- 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..100755
--- 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..100755
--- 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..100755
--- 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..501fdc19bfd5 100644..100755
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,6 +29,12 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_desktop.hxx"
+#include <sfx2/docfile.hxx>
+#include <sfx2/docfilt.hxx>
+#include <sfx2/fcontnr.hxx>
+#include "osl/file.hxx"
+#include <svl/fstathelper.hxx>
+
#include "dispatchwatcher.hxx"
#include <rtl/ustring.hxx>
#include <tools/string.hxx>
@@ -48,13 +55,15 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/document/MacroExecMode.hpp>
#include <com/sun/star/document/UpdateDocMode.hpp>
+#include <com/sun/star/frame/XStorable.hpp>
#include <tools/urlobj.hxx>
#include <comphelper/mediadescriptor.hxx>
#include <vector>
+#include <osl/thread.hxx>
-using namespace ::rtl;
+using ::rtl::OUString;
using namespace ::osl;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::util;
@@ -80,6 +89,32 @@ struct DispatchHolder
Reference< XDispatch > xDispatch;
};
+static String impl_GetFilterFromExt( OUString aUrl, SfxFilterFlags nFlags,
+ String aAppl )
+{
+ String aFilter;
+ SfxMedium* pMedium = new SfxMedium( aUrl,
+ STREAM_STD_READ, FALSE );
+ const SfxFilter *pSfxFilter = NULL;
+ SfxFilterMatcher aMatcher;
+ if( nFlags == SFX_FILTER_EXPORT )
+ aMatcher = SfxFilterMatcher( aAppl );
+ aMatcher.GuessFilterIgnoringContent( *pMedium, &pSfxFilter, nFlags, 0 );
+ if( pSfxFilter )
+ aFilter = ( nFlags == SFX_FILTER_EXPORT ) ? pSfxFilter->GetFilterName() :
+ pSfxFilter->GetServiceName();
+
+ delete pMedium;
+ return aFilter;
+}
+static OUString impl_GuessFilter( OUString aUrlIn, OUString aUrlOut )
+{
+ /* aAppl can also be set to Factory like scalc, swriter... */
+ String aAppl;
+ aAppl = impl_GetFilterFromExt( aUrlIn, SFX_FILTER_IMPORT, aAppl );
+ return impl_GetFilterFromExt( aUrlOut, SFX_FILTER_EXPORT, aAppl );
+}
+
Mutex* DispatchWatcher::pWatcherMutex = NULL;
Mutex& DispatchWatcher::GetMutex()
@@ -138,10 +173,11 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
DispatchList::const_iterator p;
std::vector< DispatchHolder > aDispatches;
::rtl::OUString aAsTemplateArg( RTL_CONSTASCII_USTRINGPARAM( "AsTemplate"));
+ sal_Bool bSetInputFilter = sal_False;
+ ::rtl::OUString aForcedInputFilter;
- for ( p = aDispatchRequestsList.begin(); p != aDispatchRequestsList.end(); p++ )
+ for ( p = aDispatchRequestsList.begin(); p != aDispatchRequestsList.end(); ++p )
{
- String aPrinterName;
const DispatchRequest& aDispatchRequest = *p;
// create parameter array
@@ -149,40 +185,53 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
if ( aDispatchRequest.aPreselectedFactory.getLength() )
nCount++;
+ // Set Input Filter
+ if ( aDispatchRequest.aRequestType == REQUEST_INFILTER )
+ {
+ bSetInputFilter = sal_True;
+ aForcedInputFilter = aDispatchRequest.aURL;
+ OfficeIPCThread::RequestsCompleted( 1 );
+ continue;
+ }
+
// we need more properties for a print/print to request
if ( aDispatchRequest.aRequestType == REQUEST_PRINT ||
- aDispatchRequest.aRequestType == REQUEST_PRINTTO )
+ aDispatchRequest.aRequestType == REQUEST_PRINTTO ||
+ aDispatchRequest.aRequestType == REQUEST_BATCHPRINT ||
+ aDispatchRequest.aRequestType == REQUEST_CONVERSION)
nCount++;
Sequence < PropertyValue > aArgs( nCount );
// mark request as user interaction from outside
- aArgs[0].Name = ::rtl::OUString::createFromAscii("Referer");
- aArgs[0].Value <<= ::rtl::OUString::createFromAscii("private:OpenEvent");
+ aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Referer"));
+ aArgs[0].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:OpenEvent"));
if ( aDispatchRequest.aRequestType == REQUEST_PRINT ||
- aDispatchRequest.aRequestType == REQUEST_PRINTTO )
+ aDispatchRequest.aRequestType == REQUEST_PRINTTO ||
+ aDispatchRequest.aRequestType == REQUEST_BATCHPRINT ||
+ aDispatchRequest.aRequestType == REQUEST_CONVERSION)
{
- aArgs[1].Name = ::rtl::OUString::createFromAscii("ReadOnly");
- aArgs[2].Name = ::rtl::OUString::createFromAscii("OpenNewView");
- aArgs[3].Name = ::rtl::OUString::createFromAscii("Hidden");
- aArgs[4].Name = ::rtl::OUString::createFromAscii("Silent");
+ aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly"));
+ aArgs[2].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("OpenNewView"));
+ aArgs[3].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Hidden"));
+ aArgs[4].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Silent"));
}
else
{
Reference < com::sun::star::task::XInteractionHandler > xInteraction(
- ::comphelper::getProcessServiceFactory()->createInstance( OUString::createFromAscii("com.sun.star.task.InteractionHandler") ),
+ ::comphelper::getProcessServiceFactory()->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.task.InteractionHandler")) ),
com::sun::star::uno::UNO_QUERY );
- aArgs[1].Name = OUString::createFromAscii( "InteractionHandler" );
+ aArgs[1].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "InteractionHandler" ));
aArgs[1].Value <<= xInteraction;
sal_Int16 nMacroExecMode = ::com::sun::star::document::MacroExecMode::USE_CONFIG;
- aArgs[2].Name = OUString::createFromAscii( "MacroExecutionMode" );
+ aArgs[2].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "MacroExecutionMode" ));
aArgs[2].Value <<= nMacroExecMode;
sal_Int16 nUpdateDoc = ::com::sun::star::document::UpdateDocMode::ACCORDING_TO_CONFIG;
- aArgs[3].Name = OUString::createFromAscii( "UpdateDocMode" );
+ aArgs[3].Name = OUString(RTL_CONSTASCII_USTRINGPARAM( "UpdateDocMode" ));
aArgs[3].Value <<= nUpdateDoc;
}
@@ -196,7 +245,9 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
::rtl::OUString aTarget( RTL_CONSTASCII_USTRINGPARAM("_default") );
if ( aDispatchRequest.aRequestType == REQUEST_PRINT ||
- aDispatchRequest.aRequestType == REQUEST_PRINTTO )
+ aDispatchRequest.aRequestType == REQUEST_PRINTTO ||
+ aDispatchRequest.aRequestType == REQUEST_BATCHPRINT ||
+ aDispatchRequest.aRequestType == REQUEST_CONVERSION)
{
// documents opened for printing are opened readonly because they must be opened as a new document and this
// document could be open already
@@ -214,7 +265,6 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
// hidden documents should never be put into open tasks
aTarget = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("_blank") );
}
-
// load the document ... if they are loadable!
// Otherwise try to dispatch it ...
Reference < XPrintable > xDoc;
@@ -278,7 +328,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
// Otherwise it would be possible to have an office running without an open
// window!!
Sequence < PropertyValue > aArgs2(1);
- aArgs2[0].Name = ::rtl::OUString::createFromAscii("SynchronMode");
+ aArgs2[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SynchronMode"));
aArgs2[0].Value <<= sal_True;
Reference < XNotifyingDispatch > xDisp( xDispatcher, UNO_QUERY );
if ( xDisp.is() )
@@ -288,8 +338,8 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
}
catch ( ::com::sun::star::uno::Exception& )
{
- OUString aMsg = OUString::createFromAscii(
- "Desktop::OpenDefault() IllegalArgumentException while calling XNotifyingDispatch: ");
+ OUString aMsg = OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Desktop::OpenDefault() IllegalArgumentException while calling XNotifyingDispatch: "));
OSL_ENSURE( sal_False, OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
}
}
@@ -318,7 +368,7 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
if(aDispatchRequest.aRequestType == REQUEST_VIEW) {
sal_Int32 nIndex = aArgs.getLength();
aArgs.realloc(nIndex+1);
- aArgs[nIndex].Name = OUString::createFromAscii("ReadOnly");
+ aArgs[nIndex].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("ReadOnly"));
aArgs[nIndex].Value <<= sal_True;
}
@@ -326,28 +376,35 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
if(aDispatchRequest.aRequestType == REQUEST_START) {
sal_Int32 nIndex = aArgs.getLength();
aArgs.realloc(nIndex+1);
- aArgs[nIndex].Name = OUString::createFromAscii("StartPresentation");
+ aArgs[nIndex].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("StartPresentation"));
aArgs[nIndex].Value <<= sal_True;
}
- // This is a synchron loading of a component so we don't have to deal with our statusChanged listener mechanism.
+ // Force input filter, if possible
+ if( bSetInputFilter )
+ {
+ sal_Int32 nIndex = aArgs.getLength();
+ aArgs.realloc(nIndex+1);
+ aArgs[nIndex].Name = OUString(RTL_CONSTASCII_USTRINGPARAM("FilterName"));
+ aArgs[nIndex].Value <<= aForcedInputFilter;
+ }
+ // This is a synchron loading of a component so we don't have to deal with our statusChanged listener mechanism.
try
{
xDoc = Reference < XPrintable >( ::comphelper::SynchronousDispatch::dispatch( xDesktop, aName, aTarget, 0, aArgs ), UNO_QUERY );
- //xDoc = Reference < XPrintable >( xDesktop->loadComponentFromURL( aName, aTarget, 0, aArgs ), UNO_QUERY );
}
catch ( ::com::sun::star::lang::IllegalArgumentException& iae)
{
- OUString aMsg = OUString::createFromAscii(
- "Dispatchwatcher IllegalArgumentException while calling loadComponentFromURL: ")
+ OUString aMsg = OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Dispatchwatcher IllegalArgumentException while calling loadComponentFromURL: "))
+ iae.Message;
OSL_ENSURE( sal_False, OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
}
catch (com::sun::star::io::IOException& ioe)
{
- OUString aMsg = OUString::createFromAscii(
- "Dispatchwatcher IOException while calling loadComponentFromURL: ")
+ OUString aMsg = OUString(RTL_CONSTASCII_USTRINGPARAM(
+ "Dispatchwatcher IOException while calling loadComponentFromURL: "))
+ ioe.Message;
OSL_ENSURE( sal_False, OUStringToOString(aMsg, RTL_TEXTENCODING_ASCII_US).getStr());
}
@@ -361,24 +418,132 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
OfficeIPCThread::RequestsCompleted( 1 );
}
else if ( aDispatchRequest.aRequestType == REQUEST_PRINT ||
- aDispatchRequest.aRequestType == REQUEST_PRINTTO )
+ aDispatchRequest.aRequestType == REQUEST_PRINTTO ||
+ aDispatchRequest.aRequestType == REQUEST_BATCHPRINT ||
+ aDispatchRequest.aRequestType == REQUEST_CONVERSION )
{
if ( xDoc.is() )
{
- if ( aDispatchRequest.aRequestType == REQUEST_PRINTTO )
- {
- // create the printer
+ if ( aDispatchRequest.aRequestType == REQUEST_CONVERSION ) {
+ Reference< XStorable > xStorable( xDoc, UNO_QUERY );
+ if ( xStorable.is() ) {
+ rtl::OUString aParam = aDispatchRequest.aPrinterName;
+ sal_Int32 nPathIndex = aParam.lastIndexOfAsciiL( ";", 1 );
+ sal_Int32 nFilterIndex = aParam.indexOfAsciiL( ":", 1 );
+ if( nPathIndex < nFilterIndex )
+ nFilterIndex = -1;
+ rtl::OUString aFilterOut=aParam.copy( nPathIndex+1 );
+ rtl::OUString aFilter;
+ rtl::OUString aFilterExt;
+ sal_Bool bGuess = sal_False;
+
+ if( nFilterIndex >= 0 )
+ {
+ aFilter = aParam.copy( nFilterIndex+1, nPathIndex-nFilterIndex-1 );
+ aFilterExt = aParam.copy( 0, nFilterIndex );
+ }
+ else
+ {
+ // Guess
+ bGuess = sal_True;
+ aFilterExt = aParam.copy( 0, nPathIndex );
+ }
+ INetURLObject aOutFilename( aObj );
+ aOutFilename.SetExtension( aFilterExt );
+ FileBase::getFileURLFromSystemPath( aFilterOut, aFilterOut );
+ rtl::OUString aOutFile = aFilterOut+
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ))+
+ aOutFilename.getName();
+
+ if ( bGuess )
+ {
+ aFilter = impl_GuessFilter( aName, aOutFile );
+ }
+
+ Sequence<PropertyValue> conversionProperties( 2 );
+ conversionProperties[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Overwrite" ));
+ conversionProperties[0].Value <<= sal_True;
+
+ conversionProperties[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "FilterName" ));
+ conversionProperties[1].Value <<= aFilter;
+
+ rtl::OUString aTempName;
+ FileBase::getSystemPathFromFileURL( aName, aTempName );
+ rtl::OString aSource8 = ::rtl::OUStringToOString ( aTempName, RTL_TEXTENCODING_UTF8 );
+ FileBase::getSystemPathFromFileURL( aOutFile, aTempName );
+ rtl::OString aTargetURL8 = ::rtl::OUStringToOString(aTempName, RTL_TEXTENCODING_UTF8 );
+ printf("convert %s -> %s using %s\n", aSource8.getStr(), aTargetURL8.getStr(),
+ ::rtl::OUStringToOString( aFilter, RTL_TEXTENCODING_UTF8 ).getStr());
+ if( FStatHelper::IsDocument(aOutFile) )
+ printf("Overwriting: %s\n",::rtl::OUStringToOString( aTempName, RTL_TEXTENCODING_UTF8 ).getStr() );
+ try
+ {
+ xStorable->storeToURL( aOutFile, conversionProperties );
+ }
+ catch ( Exception& )
+ {
+ fprintf( stderr, "Error: Please reverify input parameters...\n" );
+ }
+ }
+ } else if ( aDispatchRequest.aRequestType == REQUEST_BATCHPRINT ) {
+ rtl::OUString aParam = aDispatchRequest.aPrinterName;
+ sal_Int32 nPathIndex = aParam.lastIndexOfAsciiL( ";", 1 );
+
+ rtl::OUString aFilterOut;
+ rtl::OUString aPrinterName;
+ if( nPathIndex != -1 )
+ aFilterOut=aParam.copy( nPathIndex+1 );
+ if( nPathIndex != 0 )
+ aPrinterName=aParam.copy( 0, nPathIndex );
+
+ INetURLObject aOutFilename( aObj );
+ aOutFilename.SetExtension( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ps")) );
+ FileBase::getFileURLFromSystemPath( aFilterOut, aFilterOut );
+ rtl::OUString aOutFile = aFilterOut+
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "/" ))+
+ aOutFilename.getName();
+
+ rtl::OUString aTempName;
+ FileBase::getSystemPathFromFileURL( aName, aTempName );
+ rtl::OString aSource8 = ::rtl::OUStringToOString ( aTempName, RTL_TEXTENCODING_UTF8 );
+ FileBase::getSystemPathFromFileURL( aOutFile, aTempName );
+ rtl::OString aTargetURL8 = ::rtl::OUStringToOString(aTempName, RTL_TEXTENCODING_UTF8 );
+ printf("print %s -> %s using %s\n", aSource8.getStr(), aTargetURL8.getStr(),
+ aPrinterName.getLength() ?
+ ::rtl::OUStringToOString( aPrinterName, RTL_TEXTENCODING_UTF8 ).getStr() : "<default_printer>");
+
+ // create the custom printer, if given
+ Sequence < PropertyValue > aPrinterArgs( 1 );
+ if( aPrinterName.getLength() )
+ {
+ aPrinterArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"));
+ aPrinterArgs[0].Value <<= aPrinterName;
+ xDoc->setPrinter( aPrinterArgs );
+ }
+
+ // print ( also without user interaction )
+ aPrinterArgs.realloc(2);
+ aPrinterArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("FileName"));
+ aPrinterArgs[0].Value <<= aOutFile;
+ aPrinterArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wait"));
+ aPrinterArgs[1].Value <<= ( sal_Bool ) sal_True;
+ xDoc->print( aPrinterArgs );
+ } else {
+ if ( aDispatchRequest.aRequestType == REQUEST_PRINTTO )
+ {
+ // create the printer
+ Sequence < PropertyValue > aPrinterArgs( 1 );
+ aPrinterArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Name"));
+ aPrinterArgs[0].Value <<= ::rtl::OUString( aDispatchRequest.aPrinterName );
+ xDoc->setPrinter( aPrinterArgs );
+ }
+
+ // print ( also without user interaction )
Sequence < PropertyValue > aPrinterArgs( 1 );
- aPrinterArgs[0].Name = ::rtl::OUString::createFromAscii("Name");
- aPrinterArgs[0].Value <<= ::rtl::OUString( aDispatchRequest.aPrinterName );
- xDoc->setPrinter( aPrinterArgs );
+ aPrinterArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Wait"));
+ aPrinterArgs[0].Value <<= ( sal_Bool ) sal_True;
+ xDoc->print( aPrinterArgs );
}
-
- // print ( also without user interaction )
- Sequence < PropertyValue > aPrinterArgs( 1 );
- aPrinterArgs[0].Name = ::rtl::OUString::createFromAscii("Wait");
- aPrinterArgs[0].Value <<= ( sal_Bool ) sal_True;
- xDoc->print( aPrinterArgs );
}
else
{
@@ -412,9 +577,9 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
{
// Execute all asynchronous dispatches now after we placed them into our request container!
Sequence < PropertyValue > aArgs( 2 );
- aArgs[0].Name = ::rtl::OUString::createFromAscii("Referer");
- aArgs[0].Value <<= ::rtl::OUString::createFromAscii("private:OpenEvent");
- aArgs[1].Name = ::rtl::OUString::createFromAscii("SynchronMode");
+ aArgs[0].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Referer"));
+ aArgs[0].Value <<= ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("private:OpenEvent"));
+ aArgs[1].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SynchronMode"));
aArgs[1].Value <<= sal_True;
for ( sal_uInt32 n = 0; n < aDispatches.size(); n++ )
@@ -445,7 +610,6 @@ sal_Bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatch
// We have to check if we have an open task otherwise we have to shutdown the office.
Reference< XFramesSupplier > xTasksSupplier( xDesktop, UNO_QUERY );
aGuard.clear();
-
Reference< XElementAccess > xList( xTasksSupplier->getFrames(), UNO_QUERY );
if ( !xList->hasElements() )
@@ -473,18 +637,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 +664,4 @@ void SAL_CALL DispatchWatcher::dispatchFinished( const DispatchResultEvent& ) th
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/dispatchwatcher.hxx b/desktop/source/app/dispatchwatcher.hxx
index 2b3f1ab54680..0fde60da603f 100644..100755
--- 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;
};
@@ -122,3 +126,5 @@ class DispatchWatcher : public ::cppu::WeakImplHelper1< ::com::sun::star::frame:
}
#endif // _DESKTOP_DISPATCHWATCHER_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/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..d70703103967 100644..100755
--- 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&)
@@ -234,7 +238,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 +246,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);
@@ -370,12 +374,12 @@ Reference< XNameAccess > LanguageSelection::getConfigAccess(const sal_Char* pPat
{
Reference< XNameAccess > xNameAccess;
try{
- OUString sConfigSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider");
+ OUString sConfigSrvc(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"));
OUString sAccessSrvc;
if (bUpdate)
- sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationUpdateAccess");
+ sAccessSrvc = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationUpdateAccess"));
else
- sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess");
+ sAccessSrvc = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess"));
OUString sConfigURL = OUString::createFromAscii(pPath);
@@ -415,9 +419,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 +493,7 @@ OUString LanguageSelection::getUserLanguage()
{
try
{
- xAccess->getByName(OUString::createFromAscii("UILocale")) >>= aUserLanguage;
+ xAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("UILocale"))) >>= aUserLanguage;
}
catch ( NoSuchElementException const & )
{
@@ -513,7 +517,7 @@ OUString LanguageSelection::getSystemLanguage()
{
try
{
- xAccess->getByName(OUString::createFromAscii("UILocale")) >>= aUserLanguage;
+ xAccess->getByName(OUString(RTL_CONSTASCII_USTRINGPARAM("UILocale"))) >>= aUserLanguage;
}
catch ( NoSuchElementException const & )
{
@@ -535,7 +539,7 @@ void LanguageSelection::resetUserLanguage()
try
{
Reference< XPropertySet > xProp(getConfigAccess("org.openoffice.Office.Linguistic/General", sal_True), UNO_QUERY_THROW);
- xProp->setPropertyValue(OUString::createFromAscii("UILocale"), makeAny(OUString::createFromAscii("")));
+ xProp->setPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("UILocale")), makeAny(OUString()));
Reference< XChangesBatch >(xProp, UNO_QUERY_THROW)->commitChanges();
}
catch ( PropertyVetoException& )
@@ -556,3 +560,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..100755
--- 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..5e534f2b2107 100644..100755
--- 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.
@@ -30,9 +31,10 @@
#include <stdlib.h>
#include <time.h>
#ifdef WNT
-#include <tools/prewin.h>
-#include <windows.h>
-#include <tools/postwin.h>
+#include <prewin.h>
+#include <postwin.h>
+#else
+#include <unistd.h>
#endif
#include <sal/types.h>
#include <osl/file.hxx>
@@ -50,25 +52,38 @@ using namespace ::rtl;
using namespace ::utl;
-namespace desktop {
+static rtl::OString impl_getHostname()
+{
+ rtl::OString aHost;
+#ifdef WNT
+ /*
+ prevent windows from connecting to the net to get it's own
+ hostname by using the netbios name
+ */
+ sal_Int32 sz = MAX_COMPUTERNAME_LENGTH + 1;
+ char* szHost = new char[sz];
+ if (GetComputerName(szHost, (LPDWORD)&sz))
+ aHost = OString(szHost);
+ else
+ aHost = OString("UNKNOWN");
+ delete[] szHost;
+#else
+ /* Don't do dns lookup on Linux either */
+ sal_Char pHostName[1024];
+
+ if ( gethostname( pHostName, sizeof( pHostName ) - 1 ) == 0 )
+ {
+ pHostName[sizeof( pHostName ) - 1] = '\0';
+ aHost = OString( pHostName );
+ }
+ else
+ aHost = OString("UNKNOWN");
+#endif
+
+ return aHost;
+}
- // initialize static members...
- // lock suffix
- const OUString Lockfile::Suffix()
- { return OUString::createFromAscii( "/.lock" ); }
- // values for datafile
- const ByteString Lockfile::Group()
- { return ByteString( "Lockdata" ); }
- const ByteString Lockfile::Userkey()
- { return ByteString( "User" ); }
- const ByteString Lockfile::Hostkey()
- { return ByteString( "Host" ); }
- const ByteString Lockfile::Stampkey()
- { return ByteString( "Stamp" ); }
- const ByteString Lockfile::Timekey()
- { return ByteString( "Time" ); }
- const ByteString Lockfile::IPCkey()
- { return ByteString( "IPCServer" ); }
+namespace desktop {
Lockfile::Lockfile( bool bIPCserver )
:m_bIPCserver(bIPCserver)
@@ -78,7 +93,7 @@ namespace desktop {
// build the file-url to use for the lock
OUString aUserPath;
utl::Bootstrap::locateUserInstallation( aUserPath );
- m_aLockname = aUserPath + Suffix();
+ m_aLockname = aUserPath + LOCKFILE_SUFFIX;
// generate ID
const int nIdBytes = 16;
@@ -105,7 +120,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 +140,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 +163,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 +189,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 +236,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..100755
--- 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..100755
--- 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..e7c30a2ca70f 100644..100755
--- a/desktop/source/app/makefile.mk
+++ b/desktop/source/app/makefile.mk
@@ -53,6 +53,10 @@ CFLAGS+=-DGNOME_VFS_ENABLED
# DEPLOYMENTMISCLIB = -ldeploymentmisc$(DLLPOSTFIX)
# .ENDIF
+.IF "$(GUI)"=="WNT" || "$(GUI)"=="OS2" || "$(GUIBASE)"=="aqua" || "$(ENABLE_SYSTRAY_GTK)"=="TRUE"
+CFLAGS+=-DENABLE_QUICKSTART_APPLET
+.ENDIF
+
SHL1TARGET = sofficeapp
SHL1OBJS = \
$(SLO)$/app.obj \
@@ -91,7 +95,7 @@ SHL1STDLIBS = \
$(UCBHELPERLIB) \
$(UNOTOOLSLIB) \
$(VCLLIB) \
- $(VOSLIB)
+
SHL1VERSIONMAP = version.map
SHL1IMPLIB = i$(SHL1TARGET)
DEF1NAME = $(SHL1TARGET)
diff --git a/desktop/source/app/officeipcthread.cxx b/desktop/source/app/officeipcthread.cxx
index 5527b8ea2aea..6088ee383022 100644..100755
--- 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,19 @@
#include <rtl/bootstrap.hxx>
#include <rtl/strbuf.hxx>
#include <comphelper/processfactory.hxx>
-#include "osl/file.hxx"
+#include <osl/file.hxx>
#include "rtl/process.h"
#include "tools/getprocessworkingdir.hxx"
-using namespace vos;
-using namespace rtl;
using namespace desktop;
using namespace ::com::sun::star::uno;
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 +222,17 @@ bool addArgument(
}
OfficeIPCThread* OfficeIPCThread::pGlobalOfficeIPCThread = 0;
-namespace { struct Security : public rtl::Static<OSecurity, Security> {}; }
+ namespace { struct Security : public rtl::Static<osl::Security, Security> {}; }
::osl::Mutex* OfficeIPCThread::pOfficeIPCThreadMutex = 0;
-
+// Turns a string in aMsg such as file:///home/foo/.libreoffice/3
+// Into a hex string of well known length ff132a86...
String CreateMD5FromString( const OUString& aMsg )
{
- // PRE: aStr "file"
- // BACK: Str "ababab....0f" Hexcode String
+#if (OSL_DEBUG_LEVEL > 1) || defined DBG_UTIL
+ fprintf (stderr, "create md5 frim '%s'\n",
+ (const sal_Char *)rtl::OUStringToOString (aMsg, RTL_TEXTENCODING_UTF8));
+#endif
rtlDigest handle = rtl_digest_create( rtl_Digest_AlgorithmMD5 );
if ( handle > 0 )
@@ -291,11 +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;
}
// ----------------------------------------------------------------------------
@@ -433,7 +439,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,7 +462,8 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
OUString aIniName;
- aInfo.getExecutableFile( aIniName );
+ osl_getExecutableFile( &aIniName.pData );
+
sal_uInt32 lastIndex = aIniName.lastIndexOf('/');
if ( lastIndex > 0 )
{
@@ -480,7 +486,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 +505,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 +541,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 +554,18 @@ OfficeIPCThread::Status OfficeIPCThread::EnableOfficeIPCThread()
for( sal_uInt32 i=0; i < nCount; i++ )
{
rtl_getAppCommandArg( i, &aDummy.pData );
- if( aDummy.indexOf('-',0) != 0 )
- {
- bWaitBeforeClose = sal_True;
- }
if (!addArgument(&aArguments, ',', aDummy)) {
return IPC_STATUS_BOOTSTRAP_ERROR;
}
}
- // finaly, write the string onto the pipe
- pThread->maStreamPipe.write( aArguments.GetBuffer(), aArguments.Len() );
- pThread->maStreamPipe.write( "\0", 1 );
+ // 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 +594,15 @@ void OfficeIPCThread::DisableOfficeIPCThread()
// send thread a termination message
// this is done so the subsequent join will not hang
// because the thread hangs in accept of pipe
- OPipe Pipe( pOfficeIPCThread->maPipeIdent, OPipe::TOption_Open, Security::get() );
+ osl::StreamPipe aPipe ( pOfficeIPCThread->maPipeIdent, osl_Pipe_OPEN, Security::get() );
//Pipe.send( TERMINATION_SEQUENCE, TERMINATION_LENGTH );
- if (Pipe.isValid())
+ if (aPipe.is())
{
- Pipe.send( sc_aTerminationSequence, sc_nTSeqLength+1 ); // also send 0-byte
+ aPipe.send( sc_aTerminationSequence, sc_nTSeqLength+1 ); // also send 0-byte
// close the pipe so that the streampipe on the other
// side produces EOF
- Pipe.close();
+ aPipe.close();
}
// release mutex to avoid deadlocks
@@ -656,11 +657,10 @@ void SAL_CALL OfficeIPCThread::run()
{
do
{
- OPipe::TPipeError
- nError = maPipe.accept( maStreamPipe );
+ oslPipeError nError = maPipe.accept( maStreamPipe );
- if( nError == OStreamPipe::E_None )
+ if( nError == osl_Pipe_E_None )
{
// #111143# and others:
@@ -726,14 +726,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 +740,6 @@ void SAL_CALL OfficeIPCThread::run()
new ApplicationEvent( aEmpty, aEmpty,
"UNACCEPT", aUnAcceptString );
ImplPostForeignAppEvent( pAppEvent );
- bAcceptorRequest = sal_True;
}
#ifndef UNX
@@ -904,9 +901,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 +910,7 @@ void SAL_CALL OfficeIPCThread::run()
TimeValue tval;
tval.Seconds = 1;
tval.Nanosec = 0;
- sleep( tval );
+ wait( tval );
}
} while( schedule() );
}
@@ -943,6 +937,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 +1002,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 +1010,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 +1043,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..e50e46c280ea 100644..100755
--- a/desktop/source/app/officeipcthread.hxx
+++ b/desktop/source/app/officeipcthread.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -30,24 +31,19 @@
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/frame/XTerminateListener.hpp>
-#include <vos/pipe.hxx>
-#include <vos/security.hxx>
-#include <vos/thread.hxx>
-#include <vos/signal.hxx>
+#include <osl/pipe.hxx>
+#include <osl/security.hxx>
+#include <osl/signal.h>
#include <rtl/ustring.hxx>
-#ifndef _CPPUHELPER_WEAKBASE2_HXX_
#include <cppuhelper/implbase2.hxx>
-#endif
#include <osl/conditn.hxx>
+#include <osl/thread.hxx>
#include "boost/optional.hpp"
namespace desktop
{
-class SalMainPipeExchangeSignalHandler : public vos::OSignalHandler
-{
- virtual TSignalAction SAL_CALL signal(TSignalInfo *pInfo);
-};
+oslSignalAction SAL_CALL SalMainPipeExchangeSignal_impl(void* /*pData*/, oslSignalInfo* pInfo);
// A request for the current office
// that was given by command line or by IPC pipe communication.
@@ -66,18 +62,22 @@ struct ProcessDocumentsRequest
::rtl::OUString aForceNewList; // Documents that should be forced to create a new document
::rtl::OUString aPrinterName; // The printer name that should be used for printing
::rtl::OUString aPrintToList; // Documents that should be printed on the given printer
+ ::rtl::OUString aConversionList;
+ ::rtl::OUString aConversionParams;
+ ::rtl::OUString aConversionOut;
+ ::rtl::OUString aInFilter;
::osl::Condition *pcProcessed; // pointer condition to be set when the request has been processed
};
class DispatchWatcher;
-class OfficeIPCThread : public vos::OThread
+class OfficeIPCThread : public osl::Thread
{
private:
static OfficeIPCThread* pGlobalOfficeIPCThread;
static ::osl::Mutex* pOfficeIPCThreadMutex;
- vos::OPipe maPipe;
- vos::OStreamPipe maStreamPipe;
+ osl::Pipe maPipe;
+ osl::StreamPipe maStreamPipe;
rtl::OUString maPipeIdent;
bool mbDowning;
bool mbRequestsEnabled;
@@ -163,3 +163,5 @@ class OfficeIPCThreadController : public ::cppu::WeakImplHelper2<
}
#endif // _DESKTOP_OFFICEIPCTHREAD_HXX_
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/omutexmember.hxx b/desktop/source/app/omutexmember.hxx
index 1edb90fec8c6..175eae09fe93 100644..100755
--- 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..a4207ef97bfd 100644..100755
--- 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
+ desktop::CommandLineArgs* pCmdLineArgs = aDesktop.GetCommandLineArgs();
+ if ( pCmdLineArgs->IsHelp() )
+ {
+ desktop::displayCmdlineHelp();
+ return EXIT_SUCCESS;
+ }
+ else if ( pCmdLineArgs->IsVersion() )
+ {
+ desktop::displayVersion();
+ return EXIT_SUCCESS;
+ }
+#endif
+ return SVMain();
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/app/sofficemain.h b/desktop/source/app/sofficemain.h
index 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..bc7a1219cdaa 100644..100755
--- 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(
@@ -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, Attribute_OwnWrite| Attribute_OwnRead| Attribute_OwnExe);
+#endif
+
// copy data from shared data directory of base installation
for (sal_Int32 i=0; pszSrcList[i]!=NULL && pszDstList[i]!=NULL; i++)
{
@@ -264,21 +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& )
@@ -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..100755
--- 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..0fc8b08a15b7 100644..100755
--- a/desktop/source/deployment/dp_log.cxx
+++ b/desktop/source/deployment/dp_log.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -209,3 +210,4 @@ extern sdecl::ServiceDecl const serviceDecl(
} // namespace dp_log
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/dp_persmap.cxx b/desktop/source/deployment/dp_persmap.cxx
index d93c5a52c782..78d4a64d3242 100644..100755
--- 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.
@@ -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 f3dc75ae39c5..16372bfbe0b9 100644..100755
--- a/desktop/source/deployment/dp_services.cxx
+++ b/desktop/source/deployment/dp_services.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -113,3 +114,4 @@ void * SAL_CALL component_getFactory(
} // extern "C"
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/dp_xml.cxx b/desktop/source/deployment/dp_xml.cxx
index 65c48d70c92d..b46d9835548c 100644..100755
--- 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..100755
--- 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..100755
--- 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..d3671fddf06f 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_CANCEL 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..100755
--- 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..100755
--- 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..e5adb84ba596 100644..100755
--- a/desktop/source/deployment/gui/dp_gui_backend.src
+++ b/desktop/source/deployment/gui/dp_gui_backend.src
@@ -33,11 +33,6 @@ Image RID_IMG_DEF_PACKAGE_BUNDLE
ImageBitmap = Bitmap { File = "sx03256.bmp"; };
MASKCOLOR
};
-Image RID_IMG_DEF_PACKAGE_BUNDLE_HC
-{
- ImageBitmap = Bitmap { File = "sxh03256.bmp"; };
- MASKCOLOR
-};
// script, dialog:
Image RID_IMG_SCRIPTLIB
@@ -45,22 +40,12 @@ Image RID_IMG_SCRIPTLIB
ImageBitmap = Bitmap { File = "im30820.bmp"; };
MASKCOLOR
};
-Image RID_IMG_SCRIPTLIB_HC
-{
- ImageBitmap = Bitmap { File = "imh30820.bmp"; };
- MASKCOLOR
-};
Image RID_IMG_DIALOGLIB
{
ImageBitmap = Bitmap { File = "dialogfolder_16.bmp"; };
MASKCOLOR
};
-Image RID_IMG_DIALOGLIB_HC
-{
- ImageBitmap = Bitmap { File = "dialogfolder_16_h.bmp"; };
- MASKCOLOR
-};
// configuration:
Image RID_IMG_CONF_XML
@@ -68,11 +53,6 @@ Image RID_IMG_CONF_XML
ImageBitmap = Bitmap { File = "xml_16.bmp"; };
MASKCOLOR
};
-Image RID_IMG_CONF_XML_HC
-{
- ImageBitmap = Bitmap { File = "xml_16_h.bmp"; };
- MASKCOLOR
-};
// component, typelib:
Image RID_IMG_COMPONENT
@@ -80,52 +60,27 @@ Image RID_IMG_COMPONENT
ImageBitmap = Bitmap { File = "component_16.bmp"; };
MASKCOLOR
};
-Image RID_IMG_COMPONENT_HC
-{
- ImageBitmap = Bitmap { File = "component_16_h.bmp"; };
- MASKCOLOR
-};
Image RID_IMG_JAVA_COMPONENT
{
ImageBitmap = Bitmap { File = "javacomponent_16.bmp"; };
MASKCOLOR
};
-Image RID_IMG_JAVA_COMPONENT_HC
-{
- ImageBitmap = Bitmap { File = "javacomponent_16_h.bmp"; };
- MASKCOLOR
-};
Image RID_IMG_TYPELIB
{
ImageBitmap = Bitmap { File = "library_16.bmp"; };
MASKCOLOR
};
-Image RID_IMG_TYPELIB_HC
-{
- ImageBitmap = Bitmap { File = "library_16_h.bmp"; };
- MASKCOLOR
-};
Image RID_IMG_JAVA_TYPELIB
{
ImageBitmap = Bitmap { File = "javalibrary_16.bmp"; };
MASKCOLOR
};
-Image RID_IMG_JAVA_TYPELIB_HC
-{
- ImageBitmap = Bitmap { File = "javalibrary_16_h.bmp"; };
- MASKCOLOR
-};
Image RID_IMG_HELP
{
ImageBitmap = Bitmap { File = "commandimagelist/sc_helperdialog.bmp"; };
MASKCOLOR
};
-Image RID_IMG_HELP_HC
-{
- ImageBitmap = Bitmap { File = "commandimagelist/sch_helperdialog.bmp"; };
- MASKCOLOR
-};
diff --git a/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx b/desktop/source/deployment/gui/dp_gui_dependencydialog.cxx
index 4c5dfdfc89d4..7019db610b85 100644..100755
--- 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..100755
--- 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_dependencydialog.src b/desktop/source/deployment/gui/dp_gui_dependencydialog.src
index e7adbce9992b..e7adbce9992b 100644..100755
--- a/desktop/source/deployment/gui/dp_gui_dependencydialog.src
+++ b/desktop/source/deployment/gui/dp_gui_dependencydialog.src
diff --git a/desktop/source/deployment/gui/dp_gui_dialog.src b/desktop/source/deployment/gui/dp_gui_dialog.src
index c9fd19c25592..d8c3f77c4635 100644..100755
--- 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..f39242d9f005 100755
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -50,7 +51,7 @@
#include "vcl/scrbar.hxx"
#include "vcl/svapp.hxx"
-#include "vos/mutex.hxx"
+#include "osl/mutex.hxx"
#include "svtools/extensionlistbox.hxx"
@@ -102,7 +103,7 @@ namespace dp_gui {
struct StrAllFiles : public rtl::StaticWithInit< const OUString, StrAllFiles >
{
const OUString operator () () {
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
::std::auto_ptr< ResMgr > const resmgr( ResMgr::CreateResMgr( "fps_office" ) );
OSL_ASSERT( resmgr.get() != 0 );
String ret( ResId( STR_FILTERNAME_ALL, *resmgr.get() ) );
@@ -425,6 +426,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 +572,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 +581,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 +606,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 +640,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 +650,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 +663,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 +780,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 +794,14 @@ void ExtMgrDialog::prepareChecking()
//------------------------------------------------------------------------------
void ExtMgrDialog::checkEntries()
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
m_pExtensionBox->checkEntries();
}
//------------------------------------------------------------------------------
bool ExtMgrDialog::removeExtensionWarn( const OUString &rExtensionName ) const
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
WarningBox aInfo( const_cast< ExtMgrDialog* >(this), getResId( RID_WARNINGBOX_REMOVE_EXTENSION ) );
String sText( aInfo.GetMessText() );
@@ -1049,6 +1052,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 +1166,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 +1337,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 +1353,7 @@ void UpdateRequiredDialog::prepareChecking()
//------------------------------------------------------------------------------
void UpdateRequiredDialog::checkEntries()
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
m_pExtensionBox->checkEntries();
if ( ! hasActiveEntries() )
@@ -1462,6 +1466,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 +1610,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();
}
@@ -1826,3 +1830,4 @@ SelectedPackage::~SelectedPackage() {}
} //namespace dp_gui
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx
index 6b546bb3c163..8288d27b5e6f 100644..100755
--- 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..100755
--- 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 8bd8a6191201..a5f3dc60cfa0 100755
--- a/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
+++ b/desktop/source/deployment/gui/dp_gui_extensioncmdqueue.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -25,6 +26,8 @@
*
************************************************************************/
+#define _WIN32_WINNT 0x0500
+
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_desktop.hxx"
@@ -99,9 +102,9 @@
#endif
#ifdef WNT
-#include "tools/prewin.h"
+#include "prewin.h"
#include <objbase.h>
-#include "tools/postwin.h"
+#include "postwin.h"
#endif
@@ -165,7 +168,7 @@ public:
m_bWarnUser( false )
{}
- Dialog * activeDialog() { return m_pDialogHelper->getWindow(); }
+ Dialog * activeDialog() { return m_pDialogHelper ? m_pDialogHelper->getWindow() : NULL; }
void setTitle( const OUString& rNewTitle ) { m_sTitle = rNewTitle; }
void startProgress();
@@ -258,6 +261,8 @@ private:
virtual void execute();
virtual void SAL_CALL onTerminated();
+ void _insert(const TExtensionCmd& rExtCmd);
+
void _addExtension( ::rtl::Reference< ProgressCmdEnv > &rCmdEnv,
const OUString &rPackageURL,
const OUString &rRepository,
@@ -427,7 +432,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
dp_misc::Dependencies::getErrorText( depExc.UnsatisfiedDependencies[i]) );
}
{
- vos::OGuard guard(Application::GetSolarMutex());
+ SolarMutexGuard guard;
short n = DependencyDialog( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, deps ).Execute();
// Distinguish between closing the dialog and programatically
// canceling the dialog (headless VCL):
@@ -471,7 +476,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
bool bEqualNames = verExc.NewDisplayName.equals(
verExc.Deployed->getDisplayName());
{
- vos::OGuard guard(Application::GetSolarMutex());
+ SolarMutexGuard guard;
WarningBox box( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, ResId(id, *DeploymentGuiResMgr::get()));
String s;
if (bEqualNames)
@@ -512,7 +517,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
{
if ( m_pDialogHelper )
{
- vos::OGuard guard(Application::GetSolarMutex());
+ SolarMutexGuard guard;
approve = m_pDialogHelper->installExtensionWarn( instExc.displayName );
}
@@ -523,7 +528,7 @@ void ProgressCmdEnv::handle( uno::Reference< task::XInteractionRequest > const &
}
else if (request >>= platExc)
{
- vos::OGuard guard( Application::GetSolarMutex() );
+ SolarMutexGuard guard;
String sMsg( ResId( RID_STR_UNSUPPORTED_PLATFORM, *DeploymentGuiResMgr::get() ) );
sMsg.SearchAndReplaceAllAscii( "%Name", platExc.package->getDisplayName() );
ErrorBox box( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, WB_OK, sMsg );
@@ -597,7 +602,7 @@ void ProgressCmdEnv::update_( uno::Any const & rStatus )
if ( text.getLength() == 0 )
text = ::comphelper::anyToString( rStatus ); // fallback
- const ::vos::OGuard aGuard( Application::GetSolarMutex() );
+ const SolarMutexGuard aGuard;
const ::std::auto_ptr< ErrorBox > aBox( new ErrorBox( m_pDialogHelper? m_pDialogHelper->getWindow() : NULL, WB_OK, text ) );
aBox->Execute();
}
@@ -645,57 +650,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 +681,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 +694,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 +807,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 +844,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 +868,6 @@ void ExtensionCmdQueue::Thread::execute()
currentCmdEnv->stopProgress();
}
//end for
- //enable all buttons
-// m_pDialog->m_bAddingExtensions = false;
-// m_pDialog->updateButtonStates();
#ifdef WNT
CoUninitialize();
#endif
@@ -1002,7 +955,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 +963,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 +989,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 +1075,19 @@ void ExtensionCmdQueue::Thread::onTerminated()
m_bTerminated = true;
}
+void ExtensionCmdQueue::Thread::_insert(const TExtensionCmd& rExtCmd)
+{
+ ::osl::MutexGuard aGuard( m_mutex );
+
+ // If someone called stop then we do not process the command -> game over!
+ if ( m_bStopped )
+ return;
+
+ m_queue.push( rExtCmd );
+ m_eInput = START;
+ m_wakeup.set();
+}
+
//------------------------------------------------------------------------------
OUString ExtensionCmdQueue::Thread::searchAndReplaceAll( const OUString &rSource,
const OUString &rWhat,
@@ -1210,3 +1176,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
--- 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..17650b7a92d1 100644..100755
--- 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 )
{
@@ -531,9 +528,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 +636,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 ) );
@@ -1154,7 +1151,7 @@ void ExtensionBox_Impl::checkEntries()
nNewPos = nPos;
if ( nPos <= m_nActive )
m_nActive += 1;
- iIndex++;
+ ++iIndex;
}
else
{ // remove entry from list
@@ -1168,7 +1165,7 @@ void ExtensionBox_Impl::checkEntries()
}
}
else
- iIndex++;
+ ++iIndex;
}
guard.clear();
@@ -1184,11 +1181,6 @@ void ExtensionBox_Impl::checkEntries()
Invalidate();
}
}
-//------------------------------------------------------------------------------
-bool ExtensionBox_Impl::isHCMode()
-{
- return (bool)GetSettings().GetStyleSettings().GetHighContrastMode();
-}
//------------------------------------------------------------------------------
void ExtensionBox_Impl::SetScrollHdl( const Link& rLink )
@@ -1219,3 +1211,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..100755
--- 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..0853f9995d09 100644..100755
--- a/desktop/source/deployment/gui/dp_gui_service.cxx
+++ b/desktop/source/deployment/gui/dp_gui_service.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -65,7 +66,7 @@ public:
virtual ~MyApp();
// Application
- virtual void Main();
+ virtual int Main();
};
//______________________________________________________________________________
@@ -79,8 +80,9 @@ MyApp::MyApp()
}
//______________________________________________________________________________
-void MyApp::Main()
+int MyApp::Main()
{
+ return EXIT_SUCCESS;
}
//##############################################################################
@@ -206,7 +208,7 @@ void ServiceImpl::setDialogTitle( OUString const & title )
{
if ( dp_gui::TheExtensionManager::s_ExtMgr.is() )
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
::rtl::Reference< ::dp_gui::TheExtensionManager > dialog(
::dp_gui::TheExtensionManager::get( m_xComponentContext,
m_parent ? *m_parent : Reference<awt::XWindow>(),
@@ -234,7 +236,7 @@ void ServiceImpl::startExecuteModal(
}
catch (Exception & exc) {
if (bAppUp) {
- const vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
std::auto_ptr<ErrorBox> box(
new ErrorBox( Application::GetActiveTopWindow(),
WB_OK, exc.Message ) );
@@ -278,7 +280,7 @@ void ServiceImpl::startExecuteModal(
}
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
::rtl::Reference< ::dp_gui::TheExtensionManager > myExtMgr(
::dp_gui::TheExtensionManager::get(
m_xComponentContext,
@@ -366,3 +368,5 @@ void * SAL_CALL component_getFactory(
}
} // extern "C"
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_shared.hxx b/desktop/source/deployment/gui/dp_gui_shared.hxx
index 08d1cf1f8e54..e056e81fa395 100644..100755
--- a/desktop/source/deployment/gui/dp_gui_shared.hxx
+++ b/desktop/source/deployment/gui/dp_gui_shared.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -60,3 +61,5 @@ public:
} // namespace dp_gui
#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_system.cxx b/desktop/source/deployment/gui/dp_gui_system.cxx
deleted file mode 100644
index 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..8adda1f85431 100644..100755
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -31,7 +32,7 @@
#include "vcl/svapp.hxx"
#include "vcl/msgbox.hxx"
-#include "vos/mutex.hxx"
+#include "osl/mutex.hxx"
#include "toolkit/helper/vclunohelper.hxx"
@@ -126,7 +127,7 @@ TheExtensionManager::~TheExtensionManager()
//------------------------------------------------------------------------------
void TheExtensionManager::createDialog( const bool bCreateUpdDlg )
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
if ( bCreateUpdDlg )
{
@@ -151,7 +152,7 @@ void TheExtensionManager::createDialog( const bool bCreateUpdDlg )
//------------------------------------------------------------------------------
void TheExtensionManager::Show()
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
getDialog()->Show();
}
@@ -159,7 +160,7 @@ void TheExtensionManager::Show()
//------------------------------------------------------------------------------
void TheExtensionManager::SetText( const ::rtl::OUString &rTitle )
{
- const ::vos::OGuard guard( Application::GetSolarMutex() );
+ const SolarMutexGuard guard;
getDialog()->SetText( rTitle );
}
@@ -167,7 +168,7 @@ void TheExtensionManager::SetText( const ::rtl::OUString &rTitle )
//------------------------------------------------------------------------------
void TheExtensionManager::ToTop( 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;
@@ -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..100755
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -129,3 +130,4 @@ public:
#endif
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_thread.cxx b/desktop/source/deployment/gui/dp_gui_thread.cxx
index 24055fae72f6..1ad857ad7b86 100644..100755
--- 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..100755
--- 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
--- 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..d678c8626465 100755
--- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -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;
@@ -1334,6 +1273,7 @@ IMPL_LINK(UpdateDialog, selectionHandler, void *, EMPTYARG)
{
// 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 +1281,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);
@@ -1436,16 +1386,6 @@ IMPL_LINK(UpdateDialog, okHandler, void *, EMPTYARG)
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 +1432,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
--- 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
--- 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..928561ff9d0b 100644..100755
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -41,7 +42,7 @@
#include "vcl/dialog.hxx"
#include "vcl/msgbox.hxx"
#include "vcl/svapp.hxx"
-#include "vos/mutex.hxx"
+#include "osl/mutex.hxx"
#include "vcl/dialog.hxx"
#include "cppuhelper/implbase3.hxx"
@@ -79,7 +80,7 @@
#include "dp_gui_extensioncmdqueue.hxx"
#include "ucbhelper/content.hxx"
#include "osl/mutex.hxx"
-#include "vos/mutex.hxx"
+#include "osl/mutex.hxx"
#include "rtl/ref.hxx"
#include "com/sun/star/uno/Sequence.h"
#include "comphelper/anytostring.hxx"
@@ -187,7 +188,7 @@ UpdateInstallDialog::Thread::Thread(
void UpdateInstallDialog::Thread::stop() {
cssu::Reference< css::task::XAbortChannel > abort;
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
abort = m_abort;
m_stop = true;
}
@@ -216,7 +217,7 @@ void UpdateInstallDialog::Thread::execute()
{
//make sure m_dialog is still alive
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (! m_stop)
m_dialog.updateDone();
}
@@ -376,7 +377,7 @@ void UpdateInstallDialog::Thread::downloadExtensions()
sal_uInt16 count = 0;
typedef std::vector<UpdateData>::iterator It;
- for (It i = m_aVecUpdateData.begin(); i != m_aVecUpdateData.end(); i++)
+ for (It i = m_aVecUpdateData.begin(); i != m_aVecUpdateData.end(); ++i)
{
UpdateData & curData = *i;
@@ -388,7 +389,7 @@ void UpdateInstallDialog::Thread::downloadExtensions()
//update the name of the extension which is to be downloaded
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -422,7 +423,7 @@ void UpdateInstallDialog::Thread::downloadExtensions()
}
//update the progress and display download error
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -449,7 +450,7 @@ void UpdateInstallDialog::Thread::downloadExtensions()
}
catch (cssu::Exception & e)
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -460,7 +461,7 @@ void UpdateInstallDialog::Thread::installExtensions()
{
//Update the fix text in the dialog to "Installing extensions..."
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -470,11 +471,11 @@ void UpdateInstallDialog::Thread::installExtensions()
sal_uInt16 count = 0;
typedef std::vector<UpdateData>::iterator It;
- for (It i = m_aVecUpdateData.begin(); i != m_aVecUpdateData.end(); i++, count++)
+ for (It i = m_aVecUpdateData.begin(); i != m_aVecUpdateData.end(); ++i, ++count)
{
//update the name of the extension which is to be installed
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -498,7 +499,7 @@ void UpdateInstallDialog::Thread::installExtensions()
cssu::Reference< css::task::XAbortChannel > xAbortChannel(
curData.aInstalledPackage->createAbortChannel() );
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -554,7 +555,7 @@ void UpdateInstallDialog::Thread::installExtensions()
if (bLicenseDeclined)
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -563,7 +564,7 @@ void UpdateInstallDialog::Thread::installExtensions()
}
else if (!xExtension.is() || bError)
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -572,7 +573,7 @@ void UpdateInstallDialog::Thread::installExtensions()
}
}
{
- vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -599,7 +600,7 @@ void UpdateInstallDialog::Thread::removeTempDownloads()
void UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, UpdateData & aUpdateData)
{
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -634,7 +635,7 @@ void UpdateInstallDialog::Thread::download(OUString const & sDownloadURL, Update
{
//the user may have cancelled the dialog because downloading took to long
{
- ::vos::OGuard g(Application::GetSolarMutex());
+ SolarMutexGuard g;
if (m_stop) {
return;
}
@@ -754,3 +755,5 @@ void UpdateCommandEnv::pop() throw (cssu::RuntimeException)
} //end namespace dp_gui
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx
index 4df06a619bb3..4f89fdf4a4d7 100644..100755
--- 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/dp_gui_updateinstalldialog.src b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.src
index f7cc93493b5d..f7cc93493b5d 100644..100755
--- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.src
+++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.src
diff --git a/desktop/source/deployment/gui/dp_gui_versionboxes.src b/desktop/source/deployment/gui/dp_gui_versionboxes.src
index 878521ad6dd2..878521ad6dd2 100644..100755
--- a/desktop/source/deployment/gui/dp_gui_versionboxes.src
+++ b/desktop/source/deployment/gui/dp_gui_versionboxes.src
diff --git a/desktop/source/deployment/gui/license_dialog.cxx b/desktop/source/deployment/gui/license_dialog.cxx
index bed190176d60..ebe7c2b52ecb 100644..100755
--- 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..100755
--- 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..73ca83792592 100644..100755
--- a/desktop/source/deployment/gui/makefile.mk
+++ b/desktop/source/deployment/gui/makefile.mk
@@ -30,7 +30,6 @@ PRJ = ..$/..$/..
PRJNAME = desktop
TARGET = deploymentgui
ENABLE_EXCEPTIONS = TRUE
-#USE_DEFFILE = TRUE
NO_BSYMBOLIC = TRUE
USE_PCH :=
ENABLE_PCH :=
@@ -55,7 +54,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 +86,6 @@ SHL1LIBS = $(SLB)$/$(TARGET).lib
SHL1DEF = $(MISC)$/$(SHL1TARGET).def
DEF1NAME = $(SHL1TARGET)
-#DEFLIB1NAME = $(TARGET)
-#DEF1DEPN =
SRS1NAME = $(TARGET)
SRC1FILES = \
diff --git a/desktop/source/deployment/inc/db.hxx b/desktop/source/deployment/inc/db.hxx
index 75dbd942a7cd..22e9e357b549 100644..100755
--- a/desktop/source/deployment/inc/db.hxx
+++ b/desktop/source/deployment/inc/db.hxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -27,6 +28,8 @@
#ifndef BERKELEYDBPROXY_DB_HXX_
#define BERKELEYDBPROXY_DB_HXX_
+#include <boost/noncopyable.hpp>
+
#ifdef SYSTEM_DB
#include <db.h>
#else
@@ -42,26 +45,12 @@ extern "C" {
typedef void (*db_free_fcn_type)(void *);
}
-
namespace berkeleydbproxy {
class DbEnv;
class Dbc;
class Dbt;
- namespace db_internal
- {
- class Noncopyable
- {
- // not implemented
- Noncopyable(const Noncopyable&);
- void operator=(const Noncopyable&);
- protected:
- Noncopyable() {}
- ~Noncopyable() {}
- };
- }
-
class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC DbException
{
rtl::OString what_;
@@ -77,7 +66,7 @@ namespace berkeleydbproxy {
};
- class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC DbEnv : db_internal::Noncopyable
+ class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC DbEnv : boost::noncopyable
{
friend class Db;
@@ -88,7 +77,7 @@ namespace berkeleydbproxy {
static char *strerror(int);
};
- class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC Db : db_internal::Noncopyable
+ class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC Db : boost::noncopyable
{
private:
DB* m_pDBP;
@@ -115,7 +104,7 @@ namespace berkeleydbproxy {
int cursor(DB_TXN *txnid, Dbc **cursorp, u_int32_t flags);
};
- class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC Dbc : db_internal::Noncopyable
+ class DESKTOP_DEPLOYMENTMISC_DLLPUBLIC Dbc : boost::noncopyable
{
friend class Db;
friend class Dbt;
@@ -155,19 +144,4 @@ namespace berkeleydbproxy {
}
#endif
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/inc/dp_dependencies.hxx b/desktop/source/deployment/inc/dp_dependencies.hxx
index 13be1e8612fb..e39c70c99a91 100644..100755
--- 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<const ::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..100755
--- 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..100755
--- 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..829a6bb96bbf 100644..100755
--- a/desktop/source/deployment/inc/dp_misc.mk
+++ b/desktop/source/deployment/inc/dp_misc.mk
diff --git a/desktop/source/deployment/inc/dp_misc_api.hxx b/desktop/source/deployment/inc/dp_misc_api.hxx
index ef34ef06872c..fbc248a1dfb2 100644..100755
--- 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..100755
--- 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..d23b187c2275 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.
@@ -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..22d54de5885a 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.
@@ -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
--- 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..100755
--- 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..877379ad7300 100644..100755
--- a/desktop/source/deployment/makefile.mk
+++ b/desktop/source/deployment/makefile.mk
@@ -30,7 +30,6 @@ PRJ = ..$/..
PRJNAME = desktop
TARGET = deployment
ENABLE_EXCEPTIONS = TRUE
-#USE_DEFFILE = TRUE
NO_BSYMBOLIC = TRUE
.IF "$(GUI)"=="OS2"
diff --git a/desktop/source/deployment/manager/dp_activepackages.cxx b/desktop/source/deployment/manager/dp_activepackages.cxx
index 8f6b6b82c0b7..f220aaf40daa 100644..100755
--- 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..100755
--- 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..78448cfa1726 100644..100755
--- 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;
@@ -239,7 +238,6 @@ void NoLicenseCommandEnv::handle(
uno::Any request( xRequest->getRequest() );
OSL_ASSERT( request.getValueTypeClass() == uno::TypeClass_EXCEPTION );
-
deployment::LicenseException licExc;
bool approve = false;
@@ -252,11 +250,6 @@ void NoLicenseCommandEnv::handle(
handle_(approve, abort, xRequest);
}
-// SilentCheckPrerequisitesCommandEnv::SilentCheckPrerequisitesCommandEnv(
-// css::uno::Reference< css::task::XInteractionHandler> const & handler):
-// BaseCommandEnv(handler)
-// {
-// }
SilentCheckPrerequisitesCommandEnv::SilentCheckPrerequisitesCommandEnv()
{
}
@@ -289,36 +282,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..100755
--- 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..f1236a5406dc 100644..100755
--- 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;
@@ -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(
@@ -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
+ Reference<deploy::XPackageManager> lRepos[] = {
+ getUserRepository(), getSharedRepository(), getBundledRepository() };
+ for (int i(0); i != SAL_N_ELEMENTS(lRepos); ++i)
{
- extensionList.push_back(getBundledRepository()->getDeployedPackage(
- identifier, fileName, Reference<ucb::XCommandEnvironment>()));
- } catch (lang::IllegalArgumentException &)
- {
- 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;
@@ -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
@@ -1588,4 +1574,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..100755
--- 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..75fd006814bb 100644..100755
--- 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.
@@ -217,7 +218,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;
@@ -368,3 +369,4 @@ bool singleton_entries(
} // namespace dp_info
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx
index 2e2c5e2a2f53..1158056e64c8 100644..100755
--- 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.
@@ -1281,7 +1282,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
{
@@ -1325,7 +1326,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() &&
@@ -1519,7 +1520,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;
@@ -1694,3 +1695,4 @@ void PackageManagerImpl::CmdEnvWrapperImpl::pop() throw (RuntimeException)
} // namespace dp_manager
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/manager/dp_manager.h b/desktop/source/deployment/manager/dp_manager.h
index 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_manager.src b/desktop/source/deployment/manager/dp_manager.src
index 7d38b880c37a..7d38b880c37a 100644..100755
--- a/desktop/source/deployment/manager/dp_manager.src
+++ b/desktop/source/deployment/manager/dp_manager.src
diff --git a/desktop/source/deployment/manager/dp_managerfac.cxx b/desktop/source/deployment/manager/dp_managerfac.cxx
index f6fde6b07d60..cb2f3b7f4387 100644..100755
--- 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;
@@ -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..100755
--- 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..100755
--- 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..4dc6405e34bf 100644..100755
--- a/desktop/source/deployment/manager/makefile.mk
+++ b/desktop/source/deployment/manager/makefile.mk
diff --git a/desktop/source/deployment/misc/db.cxx b/desktop/source/deployment/misc/db.cxx
index a394731921c8..6ba2c25bc92c 100644..100755
--- a/desktop/source/deployment/misc/db.cxx
+++ b/desktop/source/deployment/misc/db.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -270,3 +271,4 @@ void db_internal::raise_error(int dberr, const char * where)
//----------------------------------------------------------------------------
} // namespace ecomp
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/misc/dp_dependencies.cxx b/desktop/source/deployment/misc/dp_dependencies.cxx
index 9534f166f2f0..6b937547ae93 100644..100755
--- 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..90592c645c93 100644..100755
--- 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,
@@ -862,3 +863,5 @@ DescriptionInfoset::getChildWithDefaultLocale(css::uno::Reference< css::xml::dom
}
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/misc/dp_identifier.cxx b/desktop/source/deployment/misc/dp_identifier.cxx
index 9659bc6759fd..b24ccd7def52 100644..100755
--- 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..100755
--- 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..ba7952364663 100644..100755
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -53,12 +54,10 @@
#include <comphelper/processfactory.hxx>
#ifdef WNT
-//#include "tools/prewin.h"
#define UNICODE
#define _UNICODE
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
-//#include "tools/postwin.h"
#endif
using namespace ::com::sun::star;
@@ -420,7 +419,7 @@ oslProcess raiseProcess(
case osl_Process_E_NotFound:
throw RuntimeException( OUSTR("image not found!"), 0 );
case osl_Process_E_TimedOut:
- throw RuntimeException( OUSTR("timout occured!"), 0 );
+ throw RuntimeException( OUSTR("timout occurred!"), 0 );
case osl_Process_E_NoPermission:
throw RuntimeException( OUSTR("permission denied!"), 0 );
case osl_Process_E_Unknown:
@@ -619,6 +618,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 +628,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
--- 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..eefe9282c69d 100644..100755
--- 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,18 @@
#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"
@@ -107,9 +116,7 @@ namespace
::rtl::OUStringBuffer buf;
buf.append( StrOperatingSystem::get() );
buf.append( static_cast<sal_Unicode>('_') );
- OUString arch( RTL_CONSTASCII_USTRINGPARAM("$_ARCH") );
- ::rtl::Bootstrap::expandMacros( arch );
- buf.append( arch );
+ buf.append( StrCPU::get() );
return buf.makeStringAndClear();
}
};
@@ -127,6 +134,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 +180,30 @@ 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");
+ "Check the platform element in the description.xml");
ret = false;
}
return ret;
@@ -230,3 +253,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..82c5847811e5 100644..100755
--- a/desktop/source/deployment/misc/dp_resource.cxx
+++ b/desktop/source/deployment/misc/dp_resource.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -231,3 +232,4 @@ lang::Locale getOfficeLocale()
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/misc/dp_ucb.cxx b/desktop/source/deployment/misc/dp_ucb.cxx
index 795a492aa0d5..fa3896aab8c4 100644..100755
--- 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..100755
--- 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..100755
--- 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..3e4bd68cb4c0 100644..100755
--- a/desktop/source/deployment/misc/makefile.mk
+++ b/desktop/source/deployment/misc/makefile.mk
diff --git a/desktop/source/deployment/registry/component/dp_compbackenddb.cxx b/desktop/source/deployment/registry/component/dp_compbackenddb.cxx
index 458ece3d0bd8..749ec3896e16 100644..100755
--- 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..100755
--- 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 650a7585d929..b163a99d3432 100644..100755
--- 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;
@@ -512,7 +549,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 +559,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 +609,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,31 +624,28 @@ 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 ) ),
- m_typeInfos( 6 )
+ RID_IMG_JAVA_TYPELIB ) ),
+ m_typeInfos( 5 )
{
m_typeInfos[ 0 ] = m_xDynComponentTypeInfo;
m_typeInfos[ 1 ] = m_xJavaComponentTypeInfo;
@@ -768,16 +798,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(
@@ -1740,6 +1784,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()->deleteDataFromDb(aURL);
+}
+
BackendImpl * BackendImpl::ComponentsPackageImpl::getMyBackend() const
{
BackendImpl * pBackend = static_cast<BackendImpl *>(m_myBackend.get());
@@ -1830,6 +1978,7 @@ BackendImpl::ComponentsPackageImpl::ComponentsPackageImpl(
: Package( myBackend, url, name, name /* display-name */,
xPackageType, bRemoved, identifier)
{}
+>>>>>>> ooo/DEV300_m101
} // anon namespace
@@ -1845,3 +1994,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/dp_component.src b/desktop/source/deployment/registry/component/dp_component.src
index 9e9ab1a82bbf..9e9ab1a82bbf 100644..100755
--- a/desktop/source/deployment/registry/component/dp_component.src
+++ b/desktop/source/deployment/registry/component/dp_component.src
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..2401a5e858fc 100644..100755
--- 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())
@@ -819,3 +811,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_configuration.src b/desktop/source/deployment/registry/configuration/dp_configuration.src
index 7ff749b18459..7ff749b18459 100644..100755
--- a/desktop/source/deployment/registry/configuration/dp_configuration.src
+++ b/desktop/source/deployment/registry/configuration/dp_configuration.src
diff --git a/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx b/desktop/source/deployment/registry/configuration/dp_configurationbackenddb.cxx
index 2437c54ec734..bfb1ed9df70e 100644..100755
--- 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..100755
--- 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..9bcbd50d4230 100644..100755
--- a/desktop/source/deployment/registry/configuration/makefile.mk
+++ b/desktop/source/deployment/registry/configuration/makefile.mk
diff --git a/desktop/source/deployment/registry/dp_backend.cxx b/desktop/source/deployment/registry/dp_backend.cxx
index 266d4406cfde..a57ea2a6bbb4 100755
--- a/desktop/source/deployment/registry/dp_backend.cxx
+++ b/desktop/source/deployment/registry/dp_backend.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -124,7 +125,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();
@@ -277,7 +278,7 @@ void PackageRegistryBackend::deleteUnusedFolders(
// get all temp directories:
::std::vector<OUString> tempEntries;
- char tmp[] = ".tmp";
+ const char tmp[] = ".tmp";
while (xResultSet->next())
{
@@ -286,7 +287,7 @@ void PackageRegistryBackend::deleteUnusedFolders(
xResultSet, UNO_QUERY_THROW )->getString(
1 /* Title */ ) );
- if (title.endsWithAsciiL(tmp, sizeof(tmp) - 1))
+ if (title.endsWithAsciiL(RTL_CONSTASCII_STRINGPARAM(tmp)))
tempEntries.push_back(
makeURLAppendSysPathSegment(sDataFolder, title));
}
@@ -638,7 +639,7 @@ beans::Optional< beans::Ambiguous<sal_Bool> > Package::isRegistered(
catch (Exception &) {
Any exc( ::cppu::getCaughtException() );
throw deployment::DeploymentException(
- OUSTR("unexpected exception occured!"),
+ OUSTR("unexpected exception occurred!"),
static_cast<OWeakObject *>(this), exc );
}
}
@@ -808,15 +809,23 @@ OUString Package::TypeInfo::getFileFilter() throw (RuntimeException)
}
//______________________________________________________________________________
-Any Package::TypeInfo::getIcon( sal_Bool highContrast, sal_Bool smallIcon )
+/**************************
+ * Get Icon
+ *
+ * @param highContrast NOTE: disabled the returning of high contrast icons.
+ * This bool is a noop now.
+ * @param smallIcon Return the small version of the icon
+ */
+Any Package::TypeInfo::getIcon( sal_Bool /*highContrast*/, sal_Bool smallIcon )
throw (RuntimeException)
{
if (! smallIcon)
return Any();
- const sal_uInt16 nIconId = (highContrast ? m_smallIcon_HC : m_smallIcon);
+ const sal_uInt16 nIconId = m_smallIcon;
return Any( &nIconId, getCppuType( static_cast<sal_uInt16 const *>(0) ) );
}
}
}
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx
index 9629855aaf11..f7ad8cb8c5a9 100644..100755
--- 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.
@@ -633,13 +634,10 @@ OUString BackendDb::readSimpleElement(
}
-
-//================================================================================
RegisteredDb::RegisteredDb(
Reference<XComponentContext> const & xContext,
::rtl::OUString const & url):BackendDb(xContext, url)
{
-
}
void RegisteredDb::addEntry(::rtl::OUString const & url)
@@ -695,14 +693,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 &)
{
@@ -713,7 +707,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..16d89523dbf8 100644..100755
--- 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(
@@ -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/dp_registry.src b/desktop/source/deployment/registry/dp_registry.src
index 68a52621741f..68a52621741f 100644..100755
--- a/desktop/source/deployment/registry/dp_registry.src
+++ b/desktop/source/deployment/registry/dp_registry.src
diff --git a/desktop/source/deployment/registry/executable/dp_executable.cxx b/desktop/source/deployment/registry/executable/dp_executable.cxx
index 5ec739153831..5e59a6fd8fc9 100644..100755
--- 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())
{
@@ -343,3 +343,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..100755
--- 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..100755
--- 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..b7129bc43955 100644..100755
--- 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.
@@ -142,7 +143,7 @@ BackendImpl::BackendImpl(
OUSTR("application/vnd.sun.star.help"),
rtl::OUString(),
getResourceString(RID_STR_HELP),
- RID_IMG_HELP, RID_IMG_HELP_HC ) ),
+ RID_IMG_HELP ) ),
m_typeInfos( 1 )
{
m_typeInfos[ 0 ] = m_xHelpTypeInfo;
@@ -383,12 +384,10 @@ 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 +414,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 +427,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 +472,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 +520,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 +541,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 +581,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 +612,6 @@ void BackendImpl::implProcessHelp(
}
}
-
void BackendImpl::implCollectXhpFiles( const rtl::OUString& aDir,
std::vector< rtl::OUString >& o_rXhpFileVector )
{
@@ -635,7 +634,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 +650,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 +678,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_help.src b/desktop/source/deployment/registry/help/dp_help.src
index 6b6a3f9a6508..6b6a3f9a6508 100644..100755
--- a/desktop/source/deployment/registry/help/dp_help.src
+++ b/desktop/source/deployment/registry/help/dp_help.src
diff --git a/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx b/desktop/source/deployment/registry/help/dp_helpbackenddb.cxx
index 81057f744640..491f6d6c1db9 100644..100755
--- 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..100755
--- 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..d4934f71a46f 100644..100755
--- a/desktop/source/deployment/registry/help/makefile.mk
+++ b/desktop/source/deployment/registry/help/makefile.mk
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..100755
--- 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..100755
--- 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..100755
--- 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..7390460cdacb 100644..100755
--- 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
@@ -723,10 +722,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&) {
@@ -1665,7 +1660,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 +1689,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/dp_package.src b/desktop/source/deployment/registry/package/dp_package.src
index 57307040bba4..57307040bba4 100644..100755
--- a/desktop/source/deployment/registry/package/dp_package.src
+++ b/desktop/source/deployment/registry/package/dp_package.src
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..100755
--- 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..959140f35641 100644..100755
--- 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;
@@ -314,15 +313,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 +329,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 +438,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 +450,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 +481,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_script.src b/desktop/source/deployment/registry/script/dp_script.src
index 117f4eac945a..117f4eac945a 100644..100755
--- a/desktop/source/deployment/registry/script/dp_script.src
+++ b/desktop/source/deployment/registry/script/dp_script.src
diff --git a/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx b/desktop/source/deployment/registry/script/dp_scriptbackenddb.cxx
index 9a84a7286027..8c6a4924212e 100644..100755
--- 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..100755
--- 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..100755
--- 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..100755
--- 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..539e1c844e99 100755
--- a/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
+++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -178,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") );
@@ -430,3 +394,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/dp_sfwk.src b/desktop/source/deployment/registry/sfwk/dp_sfwk.src
index c8d37ce067ac..c8d37ce067ac 100644..100755
--- a/desktop/source/deployment/registry/sfwk/dp_sfwk.src
+++ b/desktop/source/deployment/registry/sfwk/dp_sfwk.src
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..06b39cd2d04e 100644..100755
--- a/desktop/source/deployment/unopkg/makefile.mk
+++ b/desktop/source/deployment/unopkg/makefile.mk
diff --git a/desktop/source/deployment/unopkg/unopkg.src b/desktop/source/deployment/unopkg/unopkg.src
index dc204e265ec6..dc204e265ec6 100644..100755
--- a/desktop/source/deployment/unopkg/unopkg.src
+++ b/desktop/source/deployment/unopkg/unopkg.src
diff --git a/desktop/source/inc/exithelper.hxx b/desktop/source/inc/exithelper.hxx
index e2604ce49b68..25cdc3e1b722 100644..100755
--- 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..8505a64064bf 100755
--- 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,25 @@ 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::OUString::createFromAscii(" | ");
-static const ::rtl::OUString MENU_SUBMENU = ::rtl::OUString::createFromAscii("...");
+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"));
::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 +112,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,91 +137,96 @@ 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: ");
@@ -226,53 +234,20 @@ void Migration::doMigration()
OSL_ENSURE(sal_False, 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 +262,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 +271,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 );
@@ -370,7 +345,7 @@ sal_Bool MigrationImpl::doMigration()
void MigrationImpl::refresh()
{
uno::Reference< XRefreshable > xRefresh(m_xFactory->createInstance(
- OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider")), uno::UNO_QUERY);
+ OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"))), uno::UNO_QUERY);
if (xRefresh.is())
xRefresh->refresh();
else
@@ -382,24 +357,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 +428,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;
@@ -474,7 +460,7 @@ migrations_vr MigrationImpl::readMigrationSteps(const ::rtl::OUString& rMigratio
// 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 +470,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 +508,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 +537,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;
@@ -569,10 +555,10 @@ install_info MigrationImpl::findInstallation(const strings_v& rVersions)
::rtl::OUString aUserInst;
osl::Security().getConfigDir( aUserInst );
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 +596,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 +624,9 @@ strings_vr MigrationImpl::applyPatterns(const strings_v& vSet, const strings_v&
end = (xub_StrLen)(i_set->getLength());
if (ts.SearchFrwrd(*i_set, &start, &end))
vrResult->push_back(*i_set);
- i_set++;
+ ++i_set;
}
- i_pat++;
+ ++i_pat;
}
return vrResult;
}
@@ -672,7 +663,7 @@ strings_vr MigrationImpl::getAllFiles(const OUString& baseURL) const
{
vrSubResult = getAllFiles(*i);
vrResult->insert(vrResult->end(), vrSubResult->begin(), vrSubResult->end());
- i++;
+ ++i;
}
}
return vrResult;
@@ -700,9 +691,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 +800,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 +827,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 +837,12 @@ uno::Reference< XNameAccess > MigrationImpl::getConfigAccess(const sal_Char* pPa
{
uno::Reference< XNameAccess > xNameAccess;
try{
- OUString sConfigSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationProvider");
+ OUString sConfigSrvc(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider"));
OUString sAccessSrvc;
if (bUpdate)
- sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationUpdateAccess");
+ sAccessSrvc = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationUpdateAccess"));
else
- sAccessSrvc = OUString::createFromAscii("com.sun.star.configuration.ConfigurationAccess");
+ sAccessSrvc = OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationAccess"));
OUString sConfigURL = OUString::createFromAscii(pPath);
@@ -886,7 +877,6 @@ void MigrationImpl::copyFiles()
{
while (i_file != m_vrFileList->end())
{
-
// remove installation prefix from file
localName = i_file->copy(m_aInfo.userdata.getLength());
destName = userInstall + localName;
@@ -902,7 +892,7 @@ void MigrationImpl::copyFiles()
+ OUStringToOString(destName, RTL_TEXTENCODING_UTF8);
OSL_ENSURE(sal_False, msg.getStr());
}
- i_file++;
+ ++i_file;
}
}
else
@@ -916,10 +906,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 +932,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(
@@ -966,21 +956,21 @@ void MigrationImpl::runServices()
}
}
- 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 +1002,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 +1311,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 +1353,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.hxx b/desktop/source/migration/migration.hxx
deleted file mode 100644
index 5ac8c5f5702c..000000000000
--- a/desktop/source/migration/migration.hxx
+++ /dev/null
@@ -1,46 +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 _DESKTOP_MIGRATION_HXX_
-#define _DESKTOP_MIGRATION_HXX_
-
-#include <sal/types.h>
-#include <rtl/ustring.hxx>
-
-namespace desktop {
-
-class Migration
-{
-public:
- // starts the migration process
- static void doMigration();
- static void cancelMigration();
- static sal_Bool checkMigration();
- static rtl::OUString getOldVersionName();
-};
-}
-#endif
diff --git a/desktop/source/migration/migration_impl.hxx b/desktop/source/migration/migration_impl.hxx
index f73e44fea523..2d079aeb99a5 100644..100755
--- 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..eefb529d0ca7 100644..100755
--- a/desktop/source/migration/pages.cxx
+++ b/desktop/source/migration/pages.cxx
diff --git a/desktop/source/migration/pages.hxx b/desktop/source/migration/pages.hxx
index 47eae23ff58c..47eae23ff58c 100644..100755
--- a/desktop/source/migration/pages.hxx
+++ b/desktop/source/migration/pages.hxx
diff --git a/desktop/source/migration/services/autocorrmigration.cxx b/desktop/source/migration/services/autocorrmigration.cxx
index c416992da13c..b6e8a13b4335 100644..100755
--- 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.
@@ -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;
@@ -241,7 +242,7 @@ namespace migration
{
beans::NamedValue aValue;
*pIter >>= aValue;
- if ( aValue.Name.equalsAscii( "UserData" ) )
+ if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UserData" ) ) )
{
if ( !(aValue.Value >>= m_sSourceDir) )
{
@@ -283,3 +284,5 @@ namespace migration
//.........................................................................
} // namespace migration
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/autocorrmigration.hxx b/desktop/source/migration/services/autocorrmigration.hxx
index 715baa6bca12..20021ceb100a 100644..100755
--- 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..33b9cf9a4ef7 100644..100755
--- 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.
@@ -230,7 +231,7 @@ namespace migration
{
beans::NamedValue aValue;
*pIter >>= aValue;
- if ( aValue.Name.equalsAscii( "UserData" ) )
+ if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UserData" ) ) )
{
if ( !(aValue.Value >>= m_sSourceDir) )
{
@@ -272,3 +273,5 @@ namespace migration
//.........................................................................
} // namespace migration
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/basicmigration.hxx b/desktop/source/migration/services/basicmigration.hxx
index 9b6433ba88e8..49260cadd522 100644..100755
--- 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..359470ea2865 100644..100755
--- 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,11 +49,14 @@ 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 }
};
@@ -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..95eaba845ac5 100644..100755
--- 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.
@@ -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..05c359c500a0 100644..100755
--- 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,7 +297,7 @@ void SAL_CALL JavaMigration::initialize( const css::uno::Sequence< css::uno::Any
}
}
}
- else if (aValue.Name.equalsAscii("UserData"))
+ else if (aValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("UserData")))
{
if ( !(aValue.Value >>= m_sUserDir) )
{
@@ -344,7 +346,7 @@ void JavaMigration::migrateJavarc()
{
OSL_ENSURE(0, "[Service implementation " IMPL_NAME
"] XJob::execute: jfw_setSelectedJRE failed.");
- fprintf(stderr, "\nCannot migrate Java. An error occured.\n");
+ fprintf(stderr, "\nCannot migrate Java. An error occurred.\n");
}
}
else if (err == JFW_E_FAILED_VERSION)
@@ -419,9 +421,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 +529,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..100755
--- 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..718ac0387cb9 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 =
@@ -80,7 +81,6 @@ SHL1STDLIBS= \
SHL1DEPN=
SHL1IMPLIB=imigrationoo2
-#SHL1LIBS=$(SLB)$/$(TARGET).lib
SHL1DEF=$(MISC)$/$(SHL1TARGET).def
DEF1NAME=$(SHL1TARGET)
@@ -108,7 +108,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..100755
--- 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..3eb779b2be32 100644..100755
--- 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.
@@ -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!" );
}
}
- 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..100755
--- 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..3e36003725d1 100755
--- a/desktop/source/migration/services/wordbookmigration.cxx
+++ b/desktop/source/migration/services/wordbookmigration.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -278,7 +279,7 @@ bool IsUserWordbook( const ::rtl::OUString& rFile )
{
beans::NamedValue aValue;
*pIter >>= aValue;
- if ( aValue.Name.equalsAscii( "UserData" ) )
+ if ( aValue.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "UserData" ) ) )
{
if ( !(aValue.Value >>= m_sSourceDir) )
{
@@ -320,3 +321,5 @@ bool IsUserWordbook( const ::rtl::OUString& rFile )
//.........................................................................
} // namespace migration
//.........................................................................
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/migration/services/wordbookmigration.hxx b/desktop/source/migration/services/wordbookmigration.hxx
index f4dc4c0d2628..72077e16b657 100755
--- 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..3489d7186b4f 100644..100755
--- a/desktop/source/migration/wizard.cxx
+++ b/desktop/source/migration/wizard.cxx
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/migration/wizard.hxx b/desktop/source/migration/wizard.hxx
index 96bd74dcd859..96bd74dcd859 100644..100755
--- a/desktop/source/migration/wizard.hxx
+++ b/desktop/source/migration/wizard.hxx
diff --git a/desktop/source/migration/wizard.src b/desktop/source/migration/wizard.src
index 78bd3a0e8197..78bd3a0e8197 100644..100755
--- a/desktop/source/migration/wizard.src
+++ b/desktop/source/migration/wizard.src
diff --git a/desktop/source/offacc/acceptor.cxx b/desktop/source/offacc/acceptor.cxx
index 430737106a59..4c69ceaa7c12 100644..100755
--- 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;
}
@@ -348,3 +334,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..100755
--- 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/file_image.h b/desktop/source/pagein/file_image.h
index 42054291b5fb..4d081713a736 100644..100755
--- a/desktop/source/pagein/file_image.h
+++ b/desktop/source/pagein/file_image.h
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -76,3 +77,5 @@ int file_image_close (
#endif
#endif /* INCLUDED_ODEP_IMAGE_H */
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/pagein/file_image_unx.c b/desktop/source/pagein/file_image_unx.c
index 92b8f49f0e34..fa1af9248d60 100644..100755
--- a/desktop/source/pagein/file_image_unx.c
+++ b/desktop/source/pagein/file_image_unx.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -148,3 +149,5 @@ int file_image_close (file_image * image)
image->m_base = 0, image->m_size = 0;
return (0);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/pagein/makefile.mk b/desktop/source/pagein/makefile.mk
index 01452a858e66..09248d4f9469 100644..100755
--- a/desktop/source/pagein/makefile.mk
+++ b/desktop/source/pagein/makefile.mk
@@ -72,6 +72,7 @@ UNODLLPOST=.uno$(DLLPOST)
DFTDLLPOST=$(DLLPOSTFIX)$(DLLPOST) # Default
URELIBPATH=..$/ure-link$/lib
+UREMISCPATH=..$/ure-link$/share$/misc
$(MISC)$/$(TARGET)-calc : makefile.mk
@echo Making: $@
@@ -105,7 +106,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 +120,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 +141,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 +153,30 @@ $(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/pagein/pagein.c b/desktop/source/pagein/pagein.c
index 0b93eecab7cf..39c319fc2d72 100644..100755
--- a/desktop/source/pagein/pagein.c
+++ b/desktop/source/pagein/pagein.c
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -147,3 +148,5 @@ int main (int argc, char **argv)
fprintf (stderr, "Total: %d files (%d bytes)\n", (int) nfiles, (int) nbytes);
return (0);
}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/desktop/source/pkgchk/unopkg/makefile.mk b/desktop/source/pkgchk/unopkg/makefile.mk
index 8384f1b24372..8384f1b24372 100644..100755
--- a/desktop/source/pkgchk/unopkg/makefile.mk
+++ b/desktop/source/pkgchk/unopkg/makefile.mk
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 83552cb7c4c6..d58bda4fe07b 100644..100755
--- 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"
@@ -427,7 +427,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 +517,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 +708,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..09ad55cac8e4 100644..100755
--- 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.
@@ -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) {
@@ -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..67c6306a3c9f 100644..100755
--- a/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_misc.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -194,7 +195,7 @@ struct ProcessWorkingDir : public rtl::StaticWithInit<
const OUString, ProcessWorkingDir> {
const OUString operator () () {
OUString workingDir;
- tools::getProcessWorkingDir(&workingDir);
+ tools::getProcessWorkingDir(workingDir);
return workingDir;
}
};
@@ -636,3 +637,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..eddb5b3e0f09 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.
@@ -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..6f9cc022d223 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/LinuxSystemEnvironment.java
+++ b/desktop/source/registration/com/sun/star/servicetag/LinuxSystemEnvironment.java
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..932b0d7e1cb5 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/Registry.java
+++ b/desktop/source/registration/com/sun/star/servicetag/Registry.java
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..fa98580fd6b5 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/SolarisSystemEnvironment.java
+++ b/desktop/source/registration/com/sun/star/servicetag/SolarisSystemEnvironment.java
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..ca0a16858670 100644..100755
--- a/desktop/source/registration/com/sun/star/servicetag/SysnetRegistryHelper.java
+++ b/desktop/source/registration/com/sun/star/servicetag/SysnetRegistryHelper.java
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..100755
--- 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..100755
--- 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..100755
--- 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..100755
--- 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..a2bd31eec013 100644..100755
--- 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,
@@ -132,3 +133,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..e4e80fbe13f3 100755
--- 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
};
@@ -129,3 +124,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..bdcda986a08f 100644..100755
--- 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();
}
@@ -321,8 +320,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 +329,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 +338,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 +347,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 +384,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 +400,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 +545,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 +577,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..100755
--- 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: */