[Libreoffice-commits] core.git: include/svtools sfx2/source svtools/source

Noel Grandin (via logerrit) logerrit at kemper.freedesktop.org
Fri Jul 23 20:18:59 UTC 2021


 include/svtools/helpopt.hxx       |    3 ---
 sfx2/source/appl/appcfg.cxx       |    5 +++--
 svtools/source/config/helpopt.cxx |   23 +----------------------
 3 files changed, 4 insertions(+), 27 deletions(-)

New commits:
commit e7a7f2b237d9b64399d97fd776f343e9ee35d1b2
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Fri Jul 23 12:18:49 2021 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jul 23 22:18:25 2021 +0200

    use officecfg to retrieve help stylesheet
    
    Change-Id: If2a233d44315a2d263671468e4671e0996d315d5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119414
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/include/svtools/helpopt.hxx b/include/svtools/helpopt.hxx
index a532d6dbd698..8d1479609e0c 100644
--- a/include/svtools/helpopt.hxx
+++ b/include/svtools/helpopt.hxx
@@ -40,9 +40,6 @@ public:
     bool            IsHelpTips() const;
     void            SetOfflineHelpPopUp(bool b);
     bool            IsOfflineHelpPopUp() const;
-
-    const OUString& GetHelpStyleSheet()const;
-    void            SetHelpStyleSheet(const OUString& rStyleSheet);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx
index 4595f6508ca0..2aa0a8e22047 100644
--- a/sfx2/source/appl/appcfg.cxx
+++ b/sfx2/source/appl/appcfg.cxx
@@ -226,7 +226,7 @@ void SfxApplication::GetOptions( SfxItemSet& rSet )
                     break;
                 case SID_HELP_STYLESHEET :
                     if(rSet.Put( SfxStringItem ( rPool.GetWhich( SID_HELP_STYLESHEET ),
-                               aHelpOptions.GetHelpStyleSheet() ) ) )
+                               officecfg::Office::Common::Help::HelpStyleSheet::get() ) ) )
                         bRet = true;
                 break;
                 case SID_ATTR_UNDO_COUNT :
@@ -515,7 +515,8 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
     if ( SfxItemState::SET == rSet.GetItemState(rPool.GetWhich(SID_HELP_STYLESHEET ), true, &pItem))
     {
         DBG_ASSERT(dynamic_cast< const SfxStringItem *>( pItem ) !=  nullptr, "StringItem expected");
-        aHelpOptions.SetHelpStyleSheet( static_cast<const SfxStringItem *>(pItem)->GetValue() );
+        OUString sStyleSheet = static_cast<const SfxStringItem *>(pItem)->GetValue();
+        officecfg::Office::Common::Help::HelpStyleSheet::set(sStyleSheet, batch);
     }
 
     // SaveRelINet
diff --git a/svtools/source/config/helpopt.cxx b/svtools/source/config/helpopt.cxx
index 63b128d413fb..2b5b2cb2bbd3 100644
--- a/svtools/source/config/helpopt.cxx
+++ b/svtools/source/config/helpopt.cxx
@@ -44,8 +44,7 @@ enum class HelpProperty
     ExtendedHelp    = 0,
     HelpTips        = 1,
     Locale          = 2,
-    StyleSheet      = 3,
-    OfflineHelpPopUp = 4
+    OfflineHelpPopUp = 3
 };
 
 }
@@ -76,9 +75,6 @@ public:
     void            SetOfflineHelpPopUp(bool b) { bOfflineHelpPopUp = b; SetModified();}
     bool            IsOfflineHelpPopUp() const { return bOfflineHelpPopUp;}
 
-    const OUString& GetHelpStyleSheet()const{return sHelpStyleSheet;}
-    void            SetHelpStyleSheet(const OUString& rStyleSheet){sHelpStyleSheet = rStyleSheet; SetModified();}
-
     static ::osl::Mutex & getInitMutex();
 };
 
@@ -90,7 +86,6 @@ Sequence< OUString > const & SvtHelpOptions_Impl::GetPropertyNames()
         "Tip",
         "Locale",
         "System",
-        "HelpStyleSheet",
         "BuiltInHelpNotInstalledPopUp"
     };
 
@@ -165,9 +160,6 @@ void  SvtHelpOptions_Impl::Load(const uno::Sequence< OUString>& rPropertyNames)
                         aLocale = aTmpStr;
                         break;
 
-                    case HelpProperty::StyleSheet:
-                        sHelpStyleSheet = aTmpStr;
-                    break;
                     default:
                         SAL_WARN( "svtools.config", "Wrong Member!" );
                         break;
@@ -210,9 +202,6 @@ void SvtHelpOptions_Impl::ImplCommit()
                 pValues[nProp] <<= aLocale;
                 break;
 
-            case HelpProperty::StyleSheet:
-                pValues[nProp] <<= sHelpStyleSheet;
-            break;
             case HelpProperty::OfflineHelpPopUp:
               pValues[nProp] <<= bOfflineHelpPopUp;
               break;
@@ -278,14 +267,4 @@ bool SvtHelpOptions::IsHelpTips() const
     return pImpl->IsHelpTips();
 }
 
-const OUString&   SvtHelpOptions::GetHelpStyleSheet()const
-{
-    return pImpl->GetHelpStyleSheet();
-}
-
-void  SvtHelpOptions::SetHelpStyleSheet(const OUString& rStyleSheet)
-{
-    pImpl->SetHelpStyleSheet(rStyleSheet);
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list