diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-06-26 17:33:17 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-06-26 19:39:59 +0200 |
commit | 2562df42f8a95f33f339405354b422e52cf42fbf (patch) | |
tree | 54266c71696ed26c035a2c7642c5acd3bd887886 /framework/source | |
parent | 69d476ae67ee4b96e5ff3b8d7a2587644c4af97f (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
(cherry picked from commit a6862a26d6cd17f6b4e4f6577bcd778bf952e65b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97146
Diffstat (limited to 'framework/source')
-rw-r--r-- | framework/source/services/desktop.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/framework/source/services/desktop.cxx b/framework/source/services/desktop.cxx index 260ddcb5dd43..998f0af29a62 100644 --- a/framework/source/services/desktop.cxx +++ b/framework/source/services/desktop.cxx @@ -334,6 +334,17 @@ sal_Bool SAL_CALL Desktop::terminate() return true; } +css::uno::Any Desktop::execute(css::uno::Sequence<css::beans::NamedValue> const & Arguments) +{ + if (Arguments.getLength() == 1 && Arguments[0].Name == "shutdown" + && !Arguments[0].Value.hasValue()) + { + shutdown(); + return {}; + } + throw css::lang::IllegalArgumentException("unsupported job request", {}, 0); +} + void Desktop::shutdown() { TransactionGuard aTransaction(m_aTransactionManager, E_HARDEXCEPTIONS); |