From 8e7a3669dd86f86325b3012abc657b5d4665374d Mon Sep 17 00:00:00 2001 From: David Steele Date: Tue, 16 Oct 2012 19:11:37 -0400 Subject: Combine senddoc null and default cases for better mailer selection. --- shell/source/unix/misc/senddoc.sh | 60 ++++++--------------------------------- 1 file changed, 8 insertions(+), 52 deletions(-) (limited to 'shell') diff --git a/shell/source/unix/misc/senddoc.sh b/shell/source/unix/misc/senddoc.sh index 5a755d7042c5..0ff15943d6ce 100644 --- a/shell/source/unix/misc/senddoc.sh +++ b/shell/source/unix/misc/senddoc.sh @@ -369,62 +369,18 @@ case `basename "$MAILER" | sed 's/-.*$//'` in /usr/bin/open -a "${MAILER}" ${ATTACH} ;; - "") - - # DESKTOP_LAUNCH, see http://freedesktop.org/pipermail/xdg/2004-August/004489.html - if [ -n "$DESKTOP_LAUNCH" ]; then - while [ "$1" != "" ]; do - case $1 in - --to) - if [ "${TO}" != "" ]; then - MAILTO="${MAILTO:-}${MAILTO:+&}to=$2" - else - TO="$2" - fi - shift - ;; - --cc) - MAILTO="${MAILTO:-}${MAILTO:+&}cc="`echo "$2" | ${URI_ENCODE}` - shift - ;; - --bcc) - MAILTO="${MAILTO:-}${MAILTO:+&}bcc="`echo "$2" | ${URI_ENCODE}` - shift - ;; - --subject) - MAILTO="${MAILTO:-}${MAILTO:+&}subject="`echo "$2" | ${URI_ENCODE}` - shift - ;; - --body) - MAILTO="${MAILTO:-}${MAILTO:+&}body="`echo "$2" | ${URI_ENCODE}` - shift - ;; - --attach) - MAILTO="${MAILTO:-}${MAILTO:+&}attachment="`echo "$2" | ${URI_ENCODE}` - shift - ;; - *) - ;; - esac - shift; - done - - MAILTO="mailto:${TO}?${MAILTO}" - ${DESKTOP_LAUNCH} "${MAILTO}" & - else - echo "Could not determine a mail client to use." - exit 2 - fi - ;; - *) - # LO is configured to use something we do not recognize. + + # LO is configured to use something we do not recognize, or is not configured. # Try to be smart, and send the mail anyway, if we have the # possibility to do so. - if [ -n "$KDE_FULL_SESSION" -a -x /usr/bin/kde-open ] ; then + if [ -n "$DESKTOP_LAUNCH" ]; then + # http://lists.freedesktop.org/pipermail/xdg/2004-August/002873.html + MAILER=${DESKTOP_LAUNCH} + elif [ -n "$KDE_FULL_SESSION" -a -x /usr/bin/kde-open ] ; then MAILER=/usr/bin/kde-open - elif [ -x /usr/bin/gnome-open ] ; then + elif [ -n "$GNOME_DESKTOP_SESSION_ID" -a -x /usr/bin/gnome-open ] ; then MAILER=/usr/bin/gnome-open elif [ -x /usr/bin/xdg-open ] ; then MAILER=/usr/bin/xdg-open @@ -460,7 +416,7 @@ case `basename "$MAILER" | sed 's/-.*$//'` in shift ;; --attach) - MAILTO="${MAILTO:-}${MAILTO:+&}attach="`echo "file://$2" | ${URI_ENCODE}` + MAILTO="${MAILTO:-}${MAILTO:+&}attachment="`echo "file://$2" | ${URI_ENCODE}` shift ;; *) -- cgit From 8c6276a312a3dd88d7469be3187bf8d9d077f0d8 Mon Sep 17 00:00:00 2001 From: Matúš Kukan Date: Sun, 21 Oct 2012 21:03:06 +0200 Subject: drop rdbmaker completely Change-Id: I313afb391562adae4f91c55480a036c228e0b540 --- shell/prj/build.lst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell') diff --git a/shell/prj/build.lst b/shell/prj/build.lst index 7ce3d91f6edc..47722524f47e 100644 --- a/shell/prj/build.lst +++ b/shell/prj/build.lst @@ -1,2 +1,2 @@ -sl shell : TRANSLATIONS:translations offapi DESKTOP:rdbmaker tools sal EXPAT:expat LIBXSLT:libxslt NULL +sl shell : TRANSLATIONS:translations offapi tools sal EXPAT:expat LIBXSLT:libxslt NULL sl shell\prj nmake - all sl_prj NULL -- cgit From 2ffde7b17192f76f815ab451f08164519f69887e Mon Sep 17 00:00:00 2001 From: David Ostrovsky Date: Fri, 12 Oct 2012 12:28:11 -0700 Subject: gbuildification of expat Two different xmlparse libraries are created: ascii_expat_xmlparse and expat_xmlparse. One without -DXML_UNICODE and one with. Source file are duplicated and renamed with gb_UnpackedTarball_set_post_action function to be able to add artifacts twice to gbuild machinery. On windows 64 bit additional two librares are created: expat_xmlparse_x64 and expat_xmltok_x64. That is due the problem with shell/shlxthandler (comment): ------------------------------------------------------ use UNICODE only because shell/shlxthandler doesn't link against ascii_expat_xmlparse ------------------------------------------------------ Include files are delivered to $(OUTDIR)/inc/external/expat now and not to $(OUTDIR)/inc/external any more. set_include call is added in RepositoryExternal.mk. To define dependency between StaticLibrary and ExternalProject new function was introduced: gb_StaticLibrary_use_external_project. Change-Id: I3b3aa40f39ef82c70f6f28790b582c83e48bdf76 --- shell/Library_ooofilt_x64.mk | 2 +- shell/Library_propertyhdl_x64.mk | 2 +- shell/Library_shlxthdl_x64.mk | 2 +- shell/StaticLibrary_xmlparser_x64.mk | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'shell') diff --git a/shell/Library_ooofilt_x64.mk b/shell/Library_ooofilt_x64.mk index 9c3cb655758d..7ea310914c8b 100644 --- a/shell/Library_ooofilt_x64.mk +++ b/shell/Library_ooofilt_x64.mk @@ -54,7 +54,7 @@ $(eval $(call gb_Library_add_defs,ooofilt_x64,\ )) $(eval $(call gb_Library_use_externals,ooofilt_x64,\ - expat_utf16 \ + expat_utf16_x64 \ zlib \ )) diff --git a/shell/Library_propertyhdl_x64.mk b/shell/Library_propertyhdl_x64.mk index f12ba0c29af6..5b07b4c4ee36 100644 --- a/shell/Library_propertyhdl_x64.mk +++ b/shell/Library_propertyhdl_x64.mk @@ -54,7 +54,7 @@ $(eval $(call gb_Library_add_defs,propertyhdl_x64,\ )) $(eval $(call gb_Library_use_externals,propertyhdl_x64,\ - expat_utf16 \ + expat_utf16_x64 \ zlib \ )) diff --git a/shell/Library_shlxthdl_x64.mk b/shell/Library_shlxthdl_x64.mk index e5deaa9cc46e..0d70683044c6 100644 --- a/shell/Library_shlxthdl_x64.mk +++ b/shell/Library_shlxthdl_x64.mk @@ -54,7 +54,7 @@ $(eval $(call gb_Library_add_defs,shlxthdl_x64,\ )) $(eval $(call gb_Library_use_externals,shlxthdl_x64,\ - expat_utf16 \ + expat_utf16_x64 \ zlib \ )) diff --git a/shell/StaticLibrary_xmlparser_x64.mk b/shell/StaticLibrary_xmlparser_x64.mk index 2f5f510bdd94..bbf7a4a40207 100644 --- a/shell/StaticLibrary_xmlparser_x64.mk +++ b/shell/StaticLibrary_xmlparser_x64.mk @@ -35,7 +35,7 @@ $(eval $(call gb_StaticLibrary_set_include,shell_xmlparser_x64,\ )) $(eval $(call gb_StaticLibrary_use_externals,shell_xmlparser_x64,\ - expat_utf16 \ + expat_utf16_x64 \ )) $(eval $(call gb_StaticLibrary_add_x64_generated_exception_objects,shell_xmlparser_x64,\ -- cgit From ec64bf60d902afbec91e6eed3dbda08e075ffc3f Mon Sep 17 00:00:00 2001 From: Matúš Kukan Date: Sat, 27 Oct 2012 15:23:42 +0200 Subject: shell: use x64 zlib version here Change-Id: Ie61966f28b937db7d4997753cc388332dda25f63 --- shell/Library_ooofilt_x64.mk | 2 +- shell/Library_propertyhdl_x64.mk | 2 +- shell/Library_shlxthdl_x64.mk | 2 +- shell/StaticLibrary_shlxthandler_common_x64.mk | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) (limited to 'shell') diff --git a/shell/Library_ooofilt_x64.mk b/shell/Library_ooofilt_x64.mk index 7ea310914c8b..e3baee3faced 100644 --- a/shell/Library_ooofilt_x64.mk +++ b/shell/Library_ooofilt_x64.mk @@ -55,7 +55,7 @@ $(eval $(call gb_Library_add_defs,ooofilt_x64,\ $(eval $(call gb_Library_use_externals,ooofilt_x64,\ expat_utf16_x64 \ - zlib \ + zlib_x64 \ )) $(eval $(call gb_Library_use_system_win32_libs,ooofilt_x64,\ diff --git a/shell/Library_propertyhdl_x64.mk b/shell/Library_propertyhdl_x64.mk index 5b07b4c4ee36..e6e9c591e44f 100644 --- a/shell/Library_propertyhdl_x64.mk +++ b/shell/Library_propertyhdl_x64.mk @@ -55,7 +55,7 @@ $(eval $(call gb_Library_add_defs,propertyhdl_x64,\ $(eval $(call gb_Library_use_externals,propertyhdl_x64,\ expat_utf16_x64 \ - zlib \ + zlib_x64 \ )) $(eval $(call gb_Library_use_system_win32_libs,propertyhdl_x64,\ diff --git a/shell/Library_shlxthdl_x64.mk b/shell/Library_shlxthdl_x64.mk index 0d70683044c6..33656b49ae8d 100644 --- a/shell/Library_shlxthdl_x64.mk +++ b/shell/Library_shlxthdl_x64.mk @@ -55,7 +55,7 @@ $(eval $(call gb_Library_add_defs,shlxthdl_x64,\ $(eval $(call gb_Library_use_externals,shlxthdl_x64,\ expat_utf16_x64 \ - zlib \ + zlib_x64 \ )) $(eval $(call gb_Library_use_system_win32_libs,shlxthdl_x64,\ diff --git a/shell/StaticLibrary_shlxthandler_common_x64.mk b/shell/StaticLibrary_shlxthandler_common_x64.mk index 175f8ee7b738..41b1ae623184 100644 --- a/shell/StaticLibrary_shlxthandler_common_x64.mk +++ b/shell/StaticLibrary_shlxthandler_common_x64.mk @@ -53,8 +53,8 @@ $(eval $(call gb_StaticLibrary_add_defs,shlxthandler_common_x64,\ )) $(eval $(call gb_StaticLibrary_use_externals,shlxthandler_common_x64,\ - expat_utf16 \ - zlib \ + expat_utf16_x64 \ + zlib_x64 \ )) $(eval $(call gb_StaticLibrary_add_x64_generated_exception_objects,shlxthandler_common_x64,\ -- cgit From 0ac9a10d312dc8f12a74720ce211823ce4addf7b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 30 Oct 2012 14:02:56 +0200 Subject: fdo#46808, Deprecate configuration::ConfigurationProvider old-style service ...in favor of existing new-style configuration::theDefaultProvider singleton. Theoretically, ConfigurationProvider instances can be created with specific Locale and EnableAsync arguments, but this is hardly used in practice, and thus effectively all uses of the ConfigurationProvider service use the theDefaultProvider instance, anyway. theDefaultProvider is restricted to the XMultiServiceFactory interface, while ConfigurationProvider also makes available XComponent. However, dispose must not be called manually on theDefaultProvider singleton anyway, and calls to add-/removeEventListener are so few (and in dubious code that should better be cleaned up) that requiring an explicit queryInterface does not really hurt there. This commit originated as a patch by Noel Grandin to "Adapt configuration::ConfigurationProvider UNO service to new style [by creating] a merged XConfigurationProvider interface for this service to implement." It was then modified by Stephan Bergmann by deprecating ConfigurationProvider instead of adding XConfigurationProvider and by replacing calls to ConfigurationProvider::create with calls to theDefaultProvider::get. Change-Id: I9c16700afe0faff1ef6f20338a66bd7a9af990bd --- shell/source/cmdmail/cmdmailsuppl.cxx | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'shell') diff --git a/shell/source/cmdmail/cmdmailsuppl.cxx b/shell/source/cmdmail/cmdmailsuppl.cxx index 5c0a5bb4c032..d64f0d10e002 100644 --- a/shell/source/cmdmail/cmdmailsuppl.cxx +++ b/shell/source/cmdmail/cmdmailsuppl.cxx @@ -28,6 +28,7 @@ #include "cmdmailmsg.hxx" #include #include +#include #include #include #include @@ -57,6 +58,7 @@ using namespace cppu; using namespace com::sun::star::system::SimpleMailClientFlags; using namespace com::sun::star::uno; using namespace com::sun::star::lang; +using namespace com::sun::star::configuration; #define COMP_IMPL_NAME "com.sun.star.comp.system.SimpleCommandMail2" @@ -80,14 +82,7 @@ namespace // private CmdMailSuppl::CmdMailSuppl( const Reference< XComponentContext >& xContext ) : WeakImplHelper3< XSimpleMailClientSupplier, XSimpleMailClient, XServiceInfo >() { - Reference< XMultiComponentFactory > xServiceManager = xContext->getServiceManager(); - - if ( xServiceManager.is() ) { - m_xConfigurationProvider = Reference< XMultiServiceFactory > ( - xServiceManager->createInstanceWithContext( - OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.configuration.ConfigurationProvider")), xContext ), - UNO_QUERY ); - } + m_xConfigurationProvider = theDefaultProvider::get(xContext); } //------------------------------------------------- -- cgit From 8cd6a947d92a5657e4133693df5392c34bf115ca Mon Sep 17 00:00:00 2001 From: Bjoern Michaelsen Date: Fri, 9 Nov 2012 19:10:38 +0100 Subject: making org.freedesktop.PackageKit.Query and .Modify available - partial implementation of the SessionInstaller interfaces - accessable via service: org.freedesktop.PackageKit.SyncDbusSessionHelper Change-Id: Ica91f481d041a066215fba3e808bf587e1271f1b --- shell/Library_losessioninstall.mk | 41 ++++++++ shell/Module_shell.mk | 1 + .../sessioninstall/SyncDbusSessionHelper.cxx | 113 +++++++++++++++++++++ .../sessioninstall/SyncDbusSessionHelper.hxx | 60 +++++++++++ .../sessioninstall/losessioninstall.component | 15 +++ shell/source/sessioninstall/services.cxx | 31 ++++++ 6 files changed, 261 insertions(+) create mode 100644 shell/Library_losessioninstall.mk create mode 100644 shell/source/sessioninstall/SyncDbusSessionHelper.cxx create mode 100644 shell/source/sessioninstall/SyncDbusSessionHelper.hxx create mode 100644 shell/source/sessioninstall/losessioninstall.component create mode 100644 shell/source/sessioninstall/services.cxx (limited to 'shell') diff --git a/shell/Library_losessioninstall.mk b/shell/Library_losessioninstall.mk new file mode 100644 index 000000000000..eb5f1232e384 --- /dev/null +++ b/shell/Library_losessioninstall.mk @@ -0,0 +1,41 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +$(eval $(call gb_Library_Library,losessioninstall)) + +$(eval $(call gb_Library_set_componentfile,losessioninstall,shell/source/sessioninstall/losessioninstall)) + +$(eval $(call gb_Library_use_api,losessioninstall,\ + offapi \ + udkapi \ +)) + +$(eval $(call gb_Library_use_libraries,losessioninstall,\ + comphelper \ + cppu \ + cppuhelper \ + sal \ + $(gb_STDLIBS) \ +)) + +ifeq ($(RTL_OS),Linux) +ifeq ($(ENABLE_GIO),TRUE) +$(eval $(call gb_Library_use_externals,losessioninstall,\ + dbus \ + gio \ +)) + +$(eval $(call gb_Library_add_exception_objects,losessioninstall,\ + shell/source/sessioninstall/SyncDbusSessionHelper \ + shell/source/sessioninstall/services \ +)) +endif +endif + +# vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/shell/Module_shell.mk b/shell/Module_shell.mk index f520aea372a7..50687acc4e4c 100644 --- a/shell/Module_shell.mk +++ b/shell/Module_shell.mk @@ -30,6 +30,7 @@ $(eval $(call gb_Module_Module,shell)) $(eval $(call gb_Module_add_targets,shell,\ Library_desktopbe \ Library_localebe \ + Library_losessioninstall \ )) ifeq ($(ENABLE_GCONF),TRUE) diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx new file mode 100644 index 000000000000..1653cb3f8603 --- /dev/null +++ b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx @@ -0,0 +1,113 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include + +#include +#include +#include +#include + +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::uno; +using namespace ::comphelper; +using namespace ::std;; +using namespace ::rtl;; + +namespace +{ + struct GVariantDeleter { void operator()(GVariant* pV) { g_variant_unref(pV); } }; + struct GVariantBuilderDeleter { void operator()(GVariantBuilder* pVB) { g_variant_builder_unref(pVB); } }; + template struct GObjectDeleter { void operator()(T* pO) { g_object_unref(pO); } }; + class GErrorWrapper + { + GError* m_pError; + public: + GErrorWrapper(GError* pError) : m_pError(pError) {}; + ~GErrorWrapper() + { + if(!m_pError) + return; + OUString sMsg = OUString::createFromAscii(m_pError->message); + g_error_free(m_pError); + throw RuntimeException(sMsg, NULL); + } + GError** getRef() { return &m_pError; } + }; + static inline GDBusProxy* lcl_GetPackageKitProxy(const OUString sInterface) + { + const OString sFullInterface = rtl::OUStringToOString("org.freedesktop.PackageKit." + sInterface, RTL_TEXTENCODING_ASCII_US); + GErrorWrapper error(NULL); + GDBusProxy* proxy = NULL; + proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION, + G_DBUS_PROXY_FLAGS_NONE, NULL, + "org.freedesktop.PackageKit", + "/org/freedesktop/PackageKit", + reinterpret_cast(sFullInterface.getStr()), + NULL, + error.getRef()); + if(!proxy) + throw RuntimeException(OUString("couldnt get a proxy!"),NULL); + return proxy; + }; +} + +namespace shell { namespace sessioninstall +{ + SyncDbusSessionHelper::SyncDbusSessionHelper(Reference const&) + { + g_type_init (); + } + void SAL_CALL SyncDbusSessionHelper::InstallPackageNames( const ::sal_uInt32 nXid, const Sequence< OUString >& vPackages, const OUString& sInteraction ) throw (RuntimeException) + { + vector< OString > vPackagesOString; + vPackagesOString.reserve(vPackages.getLength()); + boost::shared_ptr pBuilder(g_variant_builder_new(G_VARIANT_TYPE ("as")), GVariantBuilderDeleter()); + for( const OUString* pPackage = stl_begin(vPackages); pPackage != stl_end(vPackages); ++pPackage) + { + vPackagesOString.push_back(rtl::OUStringToOString(*pPackage, RTL_TEXTENCODING_ASCII_US)); + g_variant_builder_add(pBuilder.get(), "s", vPackagesOString.back().getStr()); + } + + const OString sInteractionAscii = OUStringToOString(sInteraction, RTL_TEXTENCODING_ASCII_US); + boost::shared_ptr proxy(lcl_GetPackageKitProxy("Modify"), GObjectDeleter()); + GErrorWrapper error(NULL); + g_dbus_proxy_call_sync (proxy.get(), + "InstallPackageNames", + g_variant_new ("(uass)", + sal::static_int_cast(nXid), + pBuilder.get(), + sInteractionAscii.getStr()), + G_DBUS_CALL_FLAGS_NONE, + -1, /* timeout */ + NULL, /* cancellable */ + error.getRef()); + } + + void SAL_CALL SyncDbusSessionHelper::IsInstalled( const OUString& sPackagename, const OUString& sInteraction, ::sal_Bool& o_isInstalled ) throw (RuntimeException) + { + const OString sPackagenameAscii = OUStringToOString(sPackagename, RTL_TEXTENCODING_ASCII_US); + const OString sInteractionAscii = OUStringToOString(sInteraction, RTL_TEXTENCODING_ASCII_US); + boost::shared_ptr proxy(lcl_GetPackageKitProxy("Query"), GObjectDeleter()); + GErrorWrapper error(NULL); + boost::shared_ptr result(g_dbus_proxy_call_sync (proxy.get(), + "IsInstalled", + g_variant_new ("(ss)", + sPackagenameAscii.getStr(), + sInteractionAscii.getStr()), + G_DBUS_CALL_FLAGS_NONE, + -1, /* timeout */ + NULL, /* cancellable */ + error.getRef()),GVariantDeleter()); + if(result.get()) + o_isInstalled = g_variant_get_boolean(g_variant_get_child_value(result.get(),0)) ? sal_True : sal_False; + } +}} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.hxx b/shell/source/sessioninstall/SyncDbusSessionHelper.hxx new file mode 100644 index 000000000000..bbb1201246fb --- /dev/null +++ b/shell/source/sessioninstall/SyncDbusSessionHelper.hxx @@ -0,0 +1,60 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef SHELL_SESSIONINSTALL_SYNCDBUSSESSIONHELPER_HXX +#define SHELL_SESSIONINSTALL_SYNCDBUSSESSIONHELPER_HXX + +#include +#include +#include +#include + +namespace shell { namespace sessioninstall +{ + class SyncDbusSessionHelper : public ::cppu::WeakImplHelper1< ::org::freedesktop::PackageKit::XSyncDbusSessionHelper > + { + public: + SyncDbusSessionHelper(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> const&); + virtual ~SyncDbusSessionHelper() {}; + // XModify Methods + virtual void SAL_CALL InstallPackageNames( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& packages, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL InstallPackageFiles( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& files, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented + virtual void SAL_CALL InstallProvideFiles( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& files, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented + virtual void SAL_CALL InstallCatalogs( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& files, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented + virtual void SAL_CALL InstallMimeTypes( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& mime_types, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented + virtual void SAL_CALL InstallFontconfigRessources( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& resources, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented + virtual void SAL_CALL InstalliGStreamerRessources( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& resources, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented + virtual void SAL_CALL InstallRessources( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& types, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& resources, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented + virtual void SAL_CALL RemovePackageByFiles( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& files, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented + virtual void SAL_CALL InstallPrinterDrivers( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& files, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented + // XQuery Methods + virtual void SAL_CALL IsInstalled( const ::rtl::OUString& package_name, const ::rtl::OUString& interaction, ::sal_Bool& installed ) throw (::com::sun::star::uno::RuntimeException); + + virtual void SAL_CALL SearchFile( const ::rtl::OUString& file_name, const ::rtl::OUString& interaction, ::sal_Bool& installed, ::rtl::OUString& package_name ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented + + private: + SyncDbusSessionHelper(); // never implemented + SyncDbusSessionHelper( const SyncDbusSessionHelper& ); // never implemented + SyncDbusSessionHelper& operator=( const SyncDbusSessionHelper& ); // never implemented + }; +}} + +#endif // SHELL_SESSIONINSTALL_SYNCDBUSSESSIONHELPER_HXX +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/shell/source/sessioninstall/losessioninstall.component b/shell/source/sessioninstall/losessioninstall.component new file mode 100644 index 000000000000..d01c357ef6cb --- /dev/null +++ b/shell/source/sessioninstall/losessioninstall.component @@ -0,0 +1,15 @@ + + + + + + + diff --git a/shell/source/sessioninstall/services.cxx b/shell/source/sessioninstall/services.cxx new file mode 100644 index 000000000000..caf332197a96 --- /dev/null +++ b/shell/source/sessioninstall/services.cxx @@ -0,0 +1,31 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include + +namespace sdecl = ::comphelper::service_decl; + +sdecl::class_< ::shell::sessioninstall::SyncDbusSessionHelper> SyncDbusSessionHelperServiceImpl; + +const sdecl::ServiceDecl SyncDbusSessionHelperServiceDecl( + SyncDbusSessionHelperServiceImpl, + "org.libreoffice.comp.shell.sessioninstall.SyncDbusSessionHelper", + "org.freedesktop.PackageKit.SyncDbusSessionHelper"); + +COMPHELPER_SERVICEDECL_EXPORTS1(losessioninstall, SyncDbusSessionHelperServiceDecl); +extern "C" +{ + SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( sal_Char const* pImplName, ::com::sun::star::lang::XMultiServiceFactory* pServiceManager, ::com::sun::star::registry::XRegistryKey* pRegistryKey ) + { return losessioninstall_component_getFactory(pImplName, pServiceManager, pRegistryKey); } +} + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit From 7b213e05a4f6aecd8b5388fb8fa8cec355302b07 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 9 Nov 2012 19:20:00 +0100 Subject: shell: explicitly linking gb_STDLIBS breaks the build now Change-Id: If693e440327331ea007722ff575b8015d727e5bc --- shell/Library_losessioninstall.mk | 1 - 1 file changed, 1 deletion(-) (limited to 'shell') diff --git a/shell/Library_losessioninstall.mk b/shell/Library_losessioninstall.mk index eb5f1232e384..ebd98af264bd 100644 --- a/shell/Library_losessioninstall.mk +++ b/shell/Library_losessioninstall.mk @@ -21,7 +21,6 @@ $(eval $(call gb_Library_use_libraries,losessioninstall,\ cppu \ cppuhelper \ sal \ - $(gb_STDLIBS) \ )) ifeq ($(RTL_OS),Linux) -- cgit From 2154fca1fb30dc4b26cac8a98c27d51c78ff6a8f Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 9 Nov 2012 20:54:11 +0100 Subject: scp2: try to move losessioninstall so it does not break WNT build Also MSVC does not like libraries that do not have any objects. Change-Id: I172fe0b61db9de6c7c4975a7b7c7fa63624b1865 --- shell/Library_losessioninstall.mk | 4 ---- shell/Module_shell.mk | 7 +++++++ 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'shell') diff --git a/shell/Library_losessioninstall.mk b/shell/Library_losessioninstall.mk index ebd98af264bd..65dee35586e6 100644 --- a/shell/Library_losessioninstall.mk +++ b/shell/Library_losessioninstall.mk @@ -23,8 +23,6 @@ $(eval $(call gb_Library_use_libraries,losessioninstall,\ sal \ )) -ifeq ($(RTL_OS),Linux) -ifeq ($(ENABLE_GIO),TRUE) $(eval $(call gb_Library_use_externals,losessioninstall,\ dbus \ gio \ @@ -34,7 +32,5 @@ $(eval $(call gb_Library_add_exception_objects,losessioninstall,\ shell/source/sessioninstall/SyncDbusSessionHelper \ shell/source/sessioninstall/services \ )) -endif -endif # vim:set shiftwidth=4 softtabstop=4 expandtab: diff --git a/shell/Module_shell.mk b/shell/Module_shell.mk index 50687acc4e4c..3726c4fa1c1a 100644 --- a/shell/Module_shell.mk +++ b/shell/Module_shell.mk @@ -30,8 +30,15 @@ $(eval $(call gb_Module_Module,shell)) $(eval $(call gb_Module_add_targets,shell,\ Library_desktopbe \ Library_localebe \ +)) + +ifeq ($(OS),LINUX) +ifeq ($(ENABLE_GIO),TRUE) +$(eval $(call gb_Module_add_targets,shell,\ Library_losessioninstall \ )) +endif +endif ifeq ($(ENABLE_GCONF),TRUE) $(eval $(call gb_Module_add_targets,shell,\ -- cgit From 40c1e728c40ac03a2744bccefd0fb64ed5209776 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Sat, 10 Nov 2012 08:46:53 +0100 Subject: WaE: unused parameter Change-Id: Ib9956bd2671434fc15905e7c4fd56bd8f7162b60 --- .../sessioninstall/SyncDbusSessionHelper.cxx | 8 ++-- .../sessioninstall/SyncDbusSessionHelper.hxx | 46 +++++++++++----------- 2 files changed, 27 insertions(+), 27 deletions(-) (limited to 'shell') diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx index 1653cb3f8603..47f0749400a4 100644 --- a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx +++ b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx @@ -17,8 +17,8 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; using namespace ::comphelper; -using namespace ::std;; -using namespace ::rtl;; +using namespace ::std; +using namespace ::rtl; namespace { @@ -29,7 +29,7 @@ namespace { GError* m_pError; public: - GErrorWrapper(GError* pError) : m_pError(pError) {}; + GErrorWrapper(GError* pError) : m_pError(pError) {} ~GErrorWrapper() { if(!m_pError) @@ -55,7 +55,7 @@ namespace if(!proxy) throw RuntimeException(OUString("couldnt get a proxy!"),NULL); return proxy; - }; + } } namespace shell { namespace sessioninstall diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.hxx b/shell/source/sessioninstall/SyncDbusSessionHelper.hxx index bbb1201246fb..4aab68c49851 100644 --- a/shell/source/sessioninstall/SyncDbusSessionHelper.hxx +++ b/shell/source/sessioninstall/SyncDbusSessionHelper.hxx @@ -21,33 +21,33 @@ namespace shell { namespace sessioninstall { public: SyncDbusSessionHelper(::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> const&); - virtual ~SyncDbusSessionHelper() {}; + virtual ~SyncDbusSessionHelper() {} // XModify Methods - virtual void SAL_CALL InstallPackageNames( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& packages, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL InstallPackageNames( ::sal_uInt32 /* xid */, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& /* packages */, const ::rtl::OUString& /* interaction */ ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL InstallPackageFiles( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& files, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) - { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented - virtual void SAL_CALL InstallProvideFiles( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& files, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) - { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented - virtual void SAL_CALL InstallCatalogs( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& files, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) - { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented - virtual void SAL_CALL InstallMimeTypes( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& mime_types, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) - { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented - virtual void SAL_CALL InstallFontconfigRessources( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& resources, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) - { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented - virtual void SAL_CALL InstalliGStreamerRessources( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& resources, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) - { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented - virtual void SAL_CALL InstallRessources( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& types, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& resources, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) - { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented - virtual void SAL_CALL RemovePackageByFiles( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& files, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) - { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented - virtual void SAL_CALL InstallPrinterDrivers( ::sal_uInt32 xid, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& files, const ::rtl::OUString& interaction ) throw (::com::sun::star::uno::RuntimeException) - { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented + virtual void SAL_CALL InstallPackageFiles( ::sal_uInt32 /* xid */, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& /* files */, const ::rtl::OUString& /* interaction */ ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); } // not implemented + virtual void SAL_CALL InstallProvideFiles( ::sal_uInt32 /* xid */, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& /* files */, const ::rtl::OUString& /* interaction */ ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); } // not implemented + virtual void SAL_CALL InstallCatalogs( ::sal_uInt32 /* xid */, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& /* files */, const ::rtl::OUString& /* interaction */ ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); } // not implemented + virtual void SAL_CALL InstallMimeTypes( ::sal_uInt32 /* xid */, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& /* mime_types */, const ::rtl::OUString& /* interaction */ ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); } // not implemented + virtual void SAL_CALL InstallFontconfigRessources( ::sal_uInt32 /* xid */, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& /* resources */, const ::rtl::OUString& /* interaction */ ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); } // not implemented + virtual void SAL_CALL InstalliGStreamerRessources( ::sal_uInt32 /* xid */, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& /* resources */, const ::rtl::OUString& /* interaction */ ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); } // not implemented + virtual void SAL_CALL InstallRessources( ::sal_uInt32 /* xid */, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& /* types */, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& /* resources */, const ::rtl::OUString& /* interaction */ ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); } // not implemented + virtual void SAL_CALL RemovePackageByFiles( SAL_UNUSED_PARAMETER ::sal_uInt32 /* xid */, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& /* files */, const ::rtl::OUString& /* interaction */ ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); } // not implemented + virtual void SAL_CALL InstallPrinterDrivers( ::sal_uInt32 /* xid */, const ::com::sun::star::uno::Sequence< ::rtl::OUString >& /* files */, const ::rtl::OUString& /* interaction */ ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); } // not implemented // XQuery Methods - virtual void SAL_CALL IsInstalled( const ::rtl::OUString& package_name, const ::rtl::OUString& interaction, ::sal_Bool& installed ) throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL IsInstalled( const ::rtl::OUString& /* package_name */, const ::rtl::OUString& /* interaction */, ::sal_Bool& /* installed */ ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL SearchFile( const ::rtl::OUString& file_name, const ::rtl::OUString& interaction, ::sal_Bool& installed, ::rtl::OUString& package_name ) throw (::com::sun::star::uno::RuntimeException) - { throw ::com::sun::star::uno::RuntimeException(); }; // not implemented + virtual void SAL_CALL SearchFile( const ::rtl::OUString& /* file_name */, const ::rtl::OUString& /* interaction */, ::sal_Bool& /* installed */, ::rtl::OUString& /* package_name */ ) throw (::com::sun::star::uno::RuntimeException) + { throw ::com::sun::star::uno::RuntimeException(); } // not implemented private: SyncDbusSessionHelper(); // never implemented -- cgit