[Libreoffice-commits] core.git: officecfg/registry sfx2/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Oct 18 18:17:41 UTC 2018


 officecfg/registry/data/org/openoffice/Office/Common.xcu   |   15 +++++++
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   25 +++++++++++++
 sfx2/source/appl/appserv.cxx                               |   18 ++++++---
 3 files changed, 52 insertions(+), 6 deletions(-)

New commits:
commit b2fdf08169fea536bc05e49bf63d70d6fdbfe31b
Author:     heiko tietze <tietze.heiko at gmail.com>
AuthorDate: Wed Oct 17 11:39:25 2018 +0200
Commit:     Heiko Tietze <tietze.heiko at gmail.com>
CommitDate: Thu Oct 18 20:16:23 2018 +0200

    tdf#113415 - Customizable links in Help menu
    
    SendFeedbackURL, QA_URL, DocumentationURL, GetInvolvedURL,
    DonationURL added to global variables under Menus
    
    Change-Id: Ie95ef2795d4079edd204edb1fcd86fde4376cedf
    Reviewed-on: https://gerrit.libreoffice.org/61874
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <tietze.heiko at gmail.com>

diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 5575bbd3d350..9ef049838ffb 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -379,6 +379,21 @@
         </prop>
       </node>
     </node>
+    <prop oor:name="SendFeedbackURL" oor:type="xs:string">
+      <value>https://hub.libreoffice.org/send-feedback/</value>
+    </prop>
+    <prop oor:name="QA_URL" oor:type="xs:string">
+      <value>https://hub.libreoffice.org/forum/</value>
+    </prop>
+    <prop oor:name="DocumentationURL" oor:type="xs:string">
+      <value>https://hub.libreoffice.org/documentation/</value>
+    </prop>
+    <prop oor:name="GetInvolvedURL" oor:type="xs:string">
+      <value>https://hub.libreoffice.org/joinus/</value>
+    </prop>
+    <prop oor:name="DonationURL" oor:type="xs:string">
+      <value>https://hub.libreoffice.org/donation/</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 4525662ec5ae..4ef848e68b0c 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -2049,6 +2049,31 @@
           <desc>Contains all help bookmarks.</desc>
         </info>
       </set>
+      <prop oor:name="SendFeedbackURL" oor:type="xs:string" oor:nillable="false">
+        <info>
+          <desc>Specifies the URL used with the UNO command SendFeedback (SID_SEND_FEEDBACK).</desc>
+        </info>
+      </prop>
+      <prop oor:name="QA_URL" oor:type="xs:string" oor:nillable="false">
+        <info>
+          <desc>Specifies the URL used with the UNO command QuestionAnswers (SID_Q_AND_A).</desc>
+        </info>
+      </prop>
+      <prop oor:name="DocumentationURL" oor:type="xs:string" oor:nillable="false">
+        <info>
+          <desc>Specifies the URL used with the UNO command Documentation (SID_DOCUMENTATION).</desc>
+        </info>
+      </prop>
+      <prop oor:name="GetInvolvedURL" oor:type="xs:string" oor:nillable="false">
+        <info>
+          <desc>Specifies the URL used with the UNO command GetInvolved (SID_GETINVOLVED).</desc>
+        </info>
+      </prop>
+      <prop oor:name="DonationURL" oor:type="xs:string" oor:nillable="false">
+        <info>
+          <desc>Specifies the URL used with the UNO command Donation (SID_DONATION).</desc>
+        </info>
+      </prop>
     </group>
     <group oor:name="History">
       <!-- OldLocation: soffice.ini -->
diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx
index 81b905c91455..58ec3d6506d8 100644
--- a/sfx2/source/appl/appserv.cxx
+++ b/sfx2/source/appl/appserv.cxx
@@ -527,8 +527,10 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
         case SID_SEND_FEEDBACK:
         {
             OUString module = SfxHelp::GetCurrentModuleIdentifier();
-            OUString sURL("https://hub.libreoffice.org/send-feedback/?LOversion=" + utl::ConfigManager::getAboutBoxProductVersion() +
-                "&LOlocale=" + utl::ConfigManager::getUILocale() + "&LOmodule=" + module.copy(module.lastIndexOf('.') + 1 )  );
+            OUString sURL(officecfg::Office::Common::Menus::SendFeedbackURL::get() + //officecfg/registry/data/org/openoffice/Office/Common.xcu => https://hub.libreoffice.org/send-feedback/
+                "?LOversion=" + utl::ConfigManager::getAboutBoxProductVersion() +
+                "&LOlocale=" + utl::ConfigManager::getUILocale() +
+                "&LOmodule=" + module.copy(module.lastIndexOf('.') + 1 )  );
             sfx2::openUriExternally(sURL, false);
             break;
         }
@@ -538,21 +540,24 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
             // Askbot has URL's normalized to languages, not locales
             // Get language from locale: ll or lll or ll-CC or lll-CC
 
-            OUString sURL("https://hub.libreoffice.org/forum/?LOlocale=" + utl::ConfigManager::getUILocale());
+            OUString sURL(officecfg::Office::Common::Menus::QA_URL::get() + //https://hub.libreoffice.org/forum/
+                "?LOlocale=" + utl::ConfigManager::getUILocale());
             sfx2::openUriExternally(sURL, false);
             break;
         }
         case SID_DOCUMENTATION:
         {
             // Open documentation page based on locales
-            OUString sURL("https://hub.libreoffice.org/documentation/?LOlocale=" + utl::ConfigManager::getUILocale());
+            OUString sURL(officecfg::Office::Common::Menus::DocumentationURL::get() + //https://hub.libreoffice.org/documentation/
+                "?LOlocale=" + utl::ConfigManager::getUILocale());
             sfx2::openUriExternally(sURL, false);
             break;
         }
         case SID_GETINVOLVED:
         {
             // Open get involved/join us page based on locales
-            OUString sURL("https://hub.libreoffice.org/joinus/?LOlocale=" + utl::ConfigManager::getUILocale());
+            OUString sURL(officecfg::Office::Common::Menus::GetInvolvedURL::get() + //https://hub.libreoffice.org/joinus/
+                "?LOlocale=" + utl::ConfigManager::getUILocale());
             sfx2::openUriExternally(sURL, false);
             break;
         }
@@ -561,7 +566,8 @@ void SfxApplication::MiscExec_Impl( SfxRequest& rReq )
             // Open donation page based on language + script (BCP47) with language as fall back.
             OUString aLang = LanguageTag(utl::ConfigManager::getUILocale()).getLanguage();
             OUString aBcp47 = LanguageTag(utl::ConfigManager::getUILocale()).getBcp47();
-            OUString sURL("https://hub.libreoffice.org/donation/?BCP47=" + aBcp47 + "&LOlang=" + aLang );
+            OUString sURL(officecfg::Office::Common::Menus::DonationURL::get() + //https://hub.libreoffice.org/donation/
+                "?BCP47=" + aBcp47 + "&LOlang=" + aLang );
             sfx2::openUriExternally(sURL, false);
             break;
         }


More information about the Libreoffice-commits mailing list