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.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 23fa2f9..ebfc18b 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 afa217c..fcb8392 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 553577a..846fa2f 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(