[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - include/vcl officecfg/registry sfx2/source svtools/source vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Mar 12 15:43:26 UTC 2019


 include/vcl/settings.hxx                                   |    2 -
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   13 ++++----
 sfx2/source/appl/sfxhelp.cxx                               |    3 +
 svtools/source/config/accessibilityoptions.cxx             |   20 -------------
 vcl/source/app/settings.cxx                                |   20 -------------
 vcl/source/control/button.cxx                              |    3 +
 6 files changed, 12 insertions(+), 49 deletions(-)

New commits:
commit 0c80a474fa9853c173cdff57a200aec78eea5d73
Author:     Ashod Nakashian <ashod.nakashian at collabora.co.uk>
AuthorDate: Tue Mar 12 11:09:29 2019 -0400
Commit:     Andras Timar <andras.timar at collabora.com>
CommitDate: Tue Mar 12 16:43:02 2019 +0100

    Move the Help URL to a different config path
    
    This partially reverts e5a0bafa330c58d6c9352d3acbe4e97fafa1ad56
    and simplifies the Help URL configuration.
    
    Change-Id: Icc7c31b8955f3df978b57dbd8aa8816a9e1f98ad
    Reviewed-on: https://gerrit.libreoffice.org/69106
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 3f03059c7fc3..494e2bb8f24f 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -650,8 +650,6 @@ public:
     void                            SetTipTimeout( sal_uLong nTipTimeout );
     sal_uLong                       GetTipTimeout() const;
     sal_uLong                       GetBalloonDelay() const;
-    OUString                        GetHelpURL() const;
-    void                            SetHelpURL(const OUString& rsHelpURL);
 
     bool                            operator ==( const HelpSettings& rSet ) const;
     bool                            operator !=( const HelpSettings& rSet ) const;
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 8cecbaedc258..05dc0012b1ab 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -3534,6 +3534,13 @@
         </info>
         <value>Default</value>
       </prop>
+      <prop oor:name="HelpRootURL" oor:type="xs:string" oor:nillable="false">
+        <info>
+          <desc>Specifies the root URL to the Office help pages. Blank disables
+          Help buttons on dialogs in LibreOffice Online.</desc>
+        </info>
+        <value>https://help.collaboraoffice.com/help.html?</value>
+      </prop>
       <group oor:name="StartCenter">
         <info>
           <desc>Contains settings for the start center.</desc>
@@ -6043,12 +6050,6 @@
         </info>
         <value>true</value>
       </prop>
-      <prop oor:name="HelpURL" oor:type="xs:string" oor:nillable="false">
-        <info>
-          <desc>Specifies the URL to the Office help page. Blank disables help buttons.</desc>
-        </info>
-        <value>https://help.collaboraoffice.com/help.html?</value>
-      </prop>
       <prop oor:name="HelpTipSeconds" oor:type="xs:short" oor:nillable="false">
         <info>
           <desc>Enables or disables the automatic time out of help tips. You
diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx
index 5ee590123929..dd91e4873df0 100644
--- a/sfx2/source/appl/sfxhelp.cxx
+++ b/sfx2/source/appl/sfxhelp.cxx
@@ -59,6 +59,7 @@
 #include <comphelper/lok.hxx>
 #include <LibreOfficeKit/LibreOfficeKitEnums.h>
 #include <sfx2/viewsh.hxx>
+#include <officecfg/Office/Common.hxx>
 
 #include "newhelp.hxx"
 #include <sfx2/objsh.hxx>
@@ -539,7 +540,7 @@ static bool impl_showOnlineHelp( const OUString& rURL )
     if ( rURL.getLength() <= aInternal.getLength() || !rURL.startsWith(aInternal) )
         return false;
 
-    OUString aHelpLink = Application::GetSettings().GetHelpSettings().GetHelpURL();
+    OUString aHelpLink = officecfg::Office::Common::Help::HelpRootURL::get();
     OUString aTarget = "Target=" + rURL.copy(aInternal.getLength());
     aTarget = aTarget.replaceAll("%2F", "/").replaceAll("?", "&");
     aHelpLink += aTarget;
diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx
index 23c06d4a0d3a..98f5eb96a452 100644
--- a/svtools/source/config/accessibilityoptions.cxx
+++ b/svtools/source/config/accessibilityoptions.cxx
@@ -65,7 +65,6 @@ public:
     sal_Int16   GetListBoxMaximumLineCount() const;
     sal_Int16   GetColorValueSetColumnCount() const;
     bool        GetPreviewUsesCheckeredBackground() const;
-    OUString    GetHelpURL() const;
 };
 
 // initialization of static members --------------------------------------
@@ -135,24 +134,6 @@ bool SvtAccessibilityOptions_Impl::GetIsHelpTipsDisappear() const
     return bRet;
 }
 
-OUString SvtAccessibilityOptions_Impl::GetHelpURL() const
-{
-    css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
-    OUString sRet;
-
-    try
-    {
-        if(xNode.is())
-            xNode->getPropertyValue("HelpURL") >>= sRet;
-    }
-    catch(const css::uno::Exception& ex)
-    {
-        SAL_WARN("svtools.config", "Caught unexpected: " << ex);
-    }
-
-    return sRet;
-}
-
 bool SvtAccessibilityOptions_Impl::GetIsAllowAnimatedGraphics() const
 {
     css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY);
@@ -323,7 +304,6 @@ void SvtAccessibilityOptions_Impl::SetVCLSettings()
     bool StyleSettingsChanged(false);
 
     aHelpSettings.SetTipTimeout( GetIsHelpTipsDisappear() ? GetHelpTipSeconds() * 1000 : HELP_TIP_TIMEOUT);
-    aHelpSettings.SetHelpURL(GetHelpURL());
     aAllSettings.SetHelpSettings(aHelpSettings);
 
     const sal_Int16 nEdgeBlendingCountA(GetEdgeBlending());
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 0490654461ae..e2841b8b4ed2 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -228,7 +228,6 @@ struct ImplHelpData
     sal_uLong                           mnTipDelay;
     sal_uLong                           mnTipTimeout;
     sal_uLong                           mnBalloonDelay;
-    OUString                            msHelpURL;
 };
 
 struct ImplAllSettingsData
@@ -2591,7 +2590,6 @@ ImplHelpData::ImplHelpData( const ImplHelpData& rData )
     mnTipDelay                  = rData.mnTipDelay;
     mnTipTimeout                = rData.mnTipTimeout;
     mnBalloonDelay              = rData.mnBalloonDelay;
-    msHelpURL                   = rData.msHelpURL;
 }
 
 HelpSettings::HelpSettings()
@@ -2610,8 +2608,7 @@ bool HelpSettings::operator ==( const HelpSettings& rSet ) const
 
     return (mxData->mnTipDelay        == rSet.mxData->mnTipDelay ) &&
          (mxData->mnTipTimeout      == rSet.mxData->mnTipTimeout ) &&
-         (mxData->mnBalloonDelay    == rSet.mxData->mnBalloonDelay ) &&
-         (mxData->msHelpURL == rSet.mxData->msHelpURL);
+         (mxData->mnBalloonDelay    == rSet.mxData->mnBalloonDelay );
 }
 
 sal_uLong
@@ -2642,21 +2639,6 @@ HelpSettings::GetBalloonDelay() const
     return mxData->mnBalloonDelay;
 }
 
-OUString
-HelpSettings::GetHelpURL() const
-{
-    return mxData->msHelpURL;
-}
-
-void HelpSettings::SetHelpURL(const OUString& rsHelpURL)
-{
-    // copy if other references exist
-    if ( ! mxData.unique() ) {
-        mxData = std::make_shared<ImplHelpData>(*mxData);
-    }
-    mxData->msHelpURL = rsHelpURL;
-}
-
 bool
 HelpSettings::operator !=( const HelpSettings& rSet ) const
 {
diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx
index 6e44e13bc67b..ecffa1cf5722 100644
--- a/vcl/source/control/button.cxx
+++ b/vcl/source/control/button.cxx
@@ -46,6 +46,7 @@
 
 #include <comphelper/dispatchcommand.hxx>
 #include <comphelper/lok.hxx>
+#include <officecfg/Office/Common.hxx>
 
 
 using namespace css;
@@ -1816,7 +1817,7 @@ void HelpButton::StateChanged( StateChangedType nStateChange )
 {
     // Hide when we have no help URL.
     if (comphelper::LibreOfficeKit::isActive() &&
-        Application::GetSettings().GetHelpSettings().GetHelpURL().isEmpty())
+        officecfg::Office::Common::Help::HelpRootURL::get().isEmpty())
         Hide();
     else
         PushButton::StateChanged(nStateChange);


More information about the Libreoffice-commits mailing list