diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2020-10-01 15:44:32 +0200 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2020-10-12 17:05:42 +0200 |
commit | acb1c390539730957fb509f18f469fc7f6133082 (patch) | |
tree | 6b929c1f886f5f151401c63050208e64fa4f3c81 /sfx2 | |
parent | 479363562b2148481b3808250575379ca2c9c37e (diff) |
Resolves tdf#137187 - More dictionaries via extensions dialog
UNO command and linkbutton interaction replaced with the internal dialog
DICT_REPO_URL removed, README adjusted
Change-Id: I401737b538da229ac0d432007e7564105672ff40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103769
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appserv.cxx | 33 |
1 files changed, 5 insertions, 28 deletions
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx index 4f6564dee9db..6e7ab0a96298 100644 --- a/sfx2/source/appl/appserv.cxx +++ b/sfx2/source/appl/appserv.cxx @@ -41,6 +41,7 @@ #include <com/sun/star/util/CloseVetoException.hpp> #include <org/freedesktop/PackageKit/SyncDbusSessionHelper.hpp> +#include <comphelper/dispatchcommand.hxx> #include <comphelper/lok.hxx> #include <comphelper/namedvaluecollection.hxx> #include <comphelper/processfactory.hxx> @@ -1336,34 +1337,10 @@ void SfxApplication::OfaExec_Impl( SfxRequest& rReq ) case SID_MORE_DICTIONARIES: { - try - { - uno::Reference< uno::XComponentContext > xContext = - ::comphelper::getProcessComponentContext(); - uno::Reference< css::system::XSystemShellExecute > xSystemShell( - css::system::SystemShellExecute::create(xContext) ); - - // read repository URL from configuration - OUString sTemplRepoURL(officecfg::Office::Common::Dictionaries::RepositoryURL::get()); - - if ( xSystemShell.is() && !sTemplRepoURL.isEmpty() ) - { - // read locale from configuration - OUString sLocale(officecfg::Setup::L10N::ooLocale::get()); - if (sLocale.isEmpty()) - sLocale = "en-US"; - - OUString aURLBuf = sTemplRepoURL + "?lang=" + sLocale; - xSystemShell->execute( - aURLBuf, - OUString(), - css::system::SystemShellExecuteFlags::URIS_ONLY ); - } - } - catch( const css::uno::Exception& ) - { - TOOLS_WARN_EXCEPTION( "sfx.appl", "SfxApplication::OfaExec_Impl(SID_MORE_DICTIONARIES)" ); - } + uno::Sequence<beans::PropertyValue> aArgs(1); + aArgs[0].Name = "AdditionsTag"; + aArgs[0].Value <<= OUString("Dictionary"); + comphelper::dispatchCommand(".uno:AdditionsDialog", aArgs); break; } #if HAVE_FEATURE_SCRIPTING |