officecfg/registry/data/org/openoffice/Office/Common.xcu | 3 + officecfg/registry/schema/org/openoffice/Office/Common.xcs | 5 +++ sfx2/source/dialog/backingwindow.cxx | 21 ++++--------- 3 files changed, 16 insertions(+), 13 deletions(-)
New commits: commit 4af07053517ba3526d4050ffc29993a65b54352b Author: Venetia Furtado <venetiaros...@gmail.com> AuthorDate: Thu Aug 10 15:08:50 2023 -0600 Commit: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> CommitDate: Fri Nov 3 11:49:42 2023 +0100 tdf#140314:Use hub.libreoffice.org URL with params in Extensions Change-Id: Iccf76581de8dc44fe80aa818e9fb81c2cdf0967b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155571 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org> diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu index 23fa2f977764..ebfc18b4e005 100644 --- a/officecfg/registry/data/org/openoffice/Office/Common.xcu +++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu @@ -372,6 +372,9 @@ <prop oor:name="PrivacyPolicyURL" oor:type="xs:string"> <value>${PRIVACY_POLICY_URL}</value> </prop> + <prop oor:name="ExtensionsURL" oor:type="xs:string"> + <value>https://hub.libreoffice.org/extensions/</value> + </prop> </node> <node oor:name="Forms"> <node oor:name="ControlLayout"> diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs index afa217c3bbd5..fcb8392436a9 100644 --- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs +++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs @@ -1880,6 +1880,11 @@ <desc>Specifies the URL for a privacy policy.</desc> </info> </prop> + <prop oor:name="ExtensionsURL" oor:type="xs:string" oor:nillable="false"> + <info> + <desc>Specifies the URL used for Extensions box.</desc> + </info> + </prop> </group> <group oor:name="History"> <info> diff --git a/sfx2/source/dialog/backingwindow.cxx b/sfx2/source/dialog/backingwindow.cxx index 553577a846df..846fa2ffb70e 100644 --- a/sfx2/source/dialog/backingwindow.cxx +++ b/sfx2/source/dialog/backingwindow.cxx @@ -28,6 +28,7 @@ #include <unotools/historyoptions.hxx> #include <unotools/moduleoptions.hxx> +#include <unotools/configmgr.hxx> #include <svtools/openfiledroptargetlistener.hxx> #include <svtools/colorcfg.hxx> #include <svtools/langhelp.hxx> @@ -39,6 +40,7 @@ #include <sfx2/app.hxx> #include <officecfg/Office/Common.hxx> +#include <i18nlangtag/languagetag.hxx> #include <comphelper/diagnose_ex.hxx> #include <com/sun/star/configuration/theDefaultProvider.hpp> @@ -519,15 +521,10 @@ void BackingWindow::setOwningFrame( const css::uno::Reference< css::frame::XFram xFramesSupplier->setActiveFrame(mxFrame); } -IMPL_LINK(BackingWindow, ExtLinkClickHdl, weld::Button&, rButton, void) +IMPL_LINK(BackingWindow, ExtLinkClickHdl, weld::Button&, rButton,void) { - OUString aNode; - - if (&rButton == mxExtensionsButton.get()) - aNode = "AddFeatureURL"; - - if (aNode.isEmpty()) - return; + if (&rButton != mxExtensionsButton.get()) + return; try { @@ -540,11 +537,9 @@ IMPL_LINK(BackingWindow, ExtLinkClickHdl, weld::Button&, rButton, void) Reference<container::XNameAccess> xNameAccess(xConfig->createInstanceWithArguments(SERVICENAME_CFGREADACCESS, args), UNO_QUERY); if (xNameAccess.is()) { - OUString sURL; - Any value(xNameAccess->getByName(aNode)); - - sURL = value.get<OUString>(); - localizeWebserviceURI(sURL); + OUString sURL(officecfg::Office::Common::Menus::ExtensionsURL::get() + + "?LOvers=" + utl::ConfigManager::getProductVersion() + + "&LOlocale=" + LanguageTag(utl::ConfigManager::getUILocale()).getBcp47() ); Reference<css::system::XSystemShellExecute> const xSystemShellExecute(