diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-06-26 17:33:17 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-06-26 18:52:36 +0200 |
commit | a6862a26d6cd17f6b4e4f6577bcd778bf952e65b (patch) | |
tree | 988cdb9f3a9fe6e0b92d7590f18cb988d4e99a05 /desktop | |
parent | 389008b0497793283e652050e32267370326855f (diff) |
tdf#134106: Get rid of XDesktopInternal again
For internal functionality that is not meant to be called by client code, I
think it is appropriate to hide it either via XUnoTunnel (but which would have
been a tad incovenient, as it would have meant to make framework::Desktop in
framework/inc/services/desktop.hxx available to the code in
desktop/source/app/app.cxx), or via reuse of some existing, sufficently fitting
interface (as is done here with css.task.XJob). This nicely avoids the
backwards compatibilty issue with remote Python scripts, as discussed in
tdf#134106 "Binary URP bridge disposed during call to
ServiceManager.createInstanceWithContext".
Change-Id: Ic9db9401ddf0f6b696344dd1d5c6ad279ea5a832
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97241
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/app.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 0342be980292..e5ed6e491edb 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -71,12 +71,12 @@ #include <com/sun/star/configuration/backend/BackendAccessException.hpp> #include <com/sun/star/task/theJobExecutor.hpp> #include <com/sun/star/task/OfficeRestartManager.hpp> +#include <com/sun/star/task/XJob.hpp> #include <com/sun/star/task/XRestartManager.hpp> #include <com/sun/star/document/XDocumentEventListener.hpp> #include <com/sun/star/office/Quickstart.hpp> #include <com/sun/star/system/XSystemShellExecute.hpp> #include <com/sun/star/system/SystemShellExecute.hpp> -#include <com/sun/star/frame/XDesktopInternal.hpp> #include <desktop/exithelper.h> #include <sal/log.hxx> @@ -611,8 +611,8 @@ bool Desktop::QueryExit() void Desktop::Shutdown() { Reference<XDesktop2> xDesktop = css::frame::Desktop::create(::comphelper::getProcessComponentContext()); - Reference<XDesktopInternal> xDesktopInternal(xDesktop, UNO_QUERY_THROW); - xDesktopInternal->shutdown(); + Reference<XJob> xDesktopInternal(xDesktop, UNO_QUERY_THROW); + xDesktopInternal->execute({{"shutdown", {}}}); } void Desktop::HandleBootstrapPathErrors( ::utl::Bootstrap::Status aBootstrapStatus, const OUString& aDiagnosticMessage ) |