cui/source/options/opthtml.cxx    |    3 +--
 include/svtools/htmlcfg.hxx       |    2 --
 svtools/source/config/htmlcfg.cxx |    5 -----
 sw/source/filter/html/wrthtml.cxx |    2 +-
 sw/source/ui/chrdlg/pardlg.cxx    |    4 ++--
 sw/source/ui/fmtui/tmpdlg.cxx     |    4 ++--
 sw/source/ui/table/tabledlg.cxx   |    4 ++--
 sw/source/uibase/app/docst.cxx    |    4 ++--
 8 files changed, 10 insertions(+), 18 deletions(-)

New commits:
commit 08d74d8980d19c7f524c8f60de5c033d026d1c94
Author:     Gabor Kelemen <gabor.kelemen.ext...@allotropia.de>
AuthorDate: Wed Nov 1 22:25:14 2023 +0100
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Nov 2 09:37:08 2023 +0100

    Drop SvxHtmlOptions::IsPrintLayoutExtension
    
    as it is just now a simple wrapper over officecfg
    
    Change-Id: If41c7c9db191af7ebede9072fd995d015056bf1f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158779
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/cui/source/options/opthtml.cxx b/cui/source/options/opthtml.cxx
index 379ccf253c1d..7cd8788dd1d2 100644
--- a/cui/source/options/opthtml.cxx
+++ b/cui/source/options/opthtml.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <svtools/langtab.hxx>
-#include <svtools/htmlcfg.hxx>
 #include <comphelper/configuration.hxx>
 #include <officecfg/Office/Common.hxx>
 #include "opthtml.hxx"
@@ -166,7 +165,7 @@ void OfaHtmlTabPage::Reset( const SfxItemSet* )
     
m_xStarBasicWarningCB->set_active(officecfg::Office::Common::Filter::HTML::Export::Warning::get());
     m_xStarBasicWarningCB->set_sensitive(!m_xStarBasicCB->get_active());
     
m_xSaveGrfLocalCB->set_active(officecfg::Office::Common::Filter::HTML::Export::LocalGraphic::get());
-    m_xPrintExtensionCB->set_active(SvxHtmlOptions::IsPrintLayoutExtension());
+    
m_xPrintExtensionCB->set_active(officecfg::Office::Common::Filter::HTML::Export::PrintLayout::get());
 
     m_xPrintExtensionCB->save_state();
     m_xStarBasicCB->save_state();
diff --git a/include/svtools/htmlcfg.hxx b/include/svtools/htmlcfg.hxx
index 5e474cad33a9..259c7e965887 100644
--- a/include/svtools/htmlcfg.hxx
+++ b/include/svtools/htmlcfg.hxx
@@ -35,8 +35,6 @@ namespace SvxHtmlOptions
 SVT_DLLPUBLIC sal_uInt16 GetFontSize(sal_uInt16 nPos);
 
 SVT_DLLPUBLIC sal_uInt16 GetExportMode();
-
-SVT_DLLPUBLIC bool IsPrintLayoutExtension();
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/config/htmlcfg.cxx 
b/svtools/source/config/htmlcfg.cxx
index 473efc9d45dd..f2a91bf367ef 100644
--- a/svtools/source/config/htmlcfg.cxx
+++ b/svtools/source/config/htmlcfg.cxx
@@ -67,11 +67,6 @@ sal_uInt16 GetExportMode()
     return nExpMode;
 }
 
-bool IsPrintLayoutExtension()
-{
-    return officecfg::Office::Common::Filter::HTML::Export::PrintLayout::get();
-}
-
 } // namespace SvxHtmlOptions
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/html/wrthtml.cxx 
b/sw/source/filter/html/wrthtml.cxx
index e4980b311f5e..738d47c8978a 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -439,7 +439,7 @@ ErrCode SwHTMLWriter::WriteStream()
     m_bCfgFormFeed = !IsHTMLMode(HTMLMODE_PRINT_EXT);
     m_bCfgCpyLinkedGrfs = 
officecfg::Office::Common::Filter::HTML::Export::LocalGraphic::get();
 
-    m_bCfgPrintLayout = SvxHtmlOptions::IsPrintLayoutExtension();
+    m_bCfgPrintLayout = 
officecfg::Office::Common::Filter::HTML::Export::PrintLayout::get();
 
     // get HTML template
     bool bOldHTMLMode = false;
diff --git a/sw/source/ui/chrdlg/pardlg.cxx b/sw/source/ui/chrdlg/pardlg.cxx
index f28acc46bc87..379ee335cad8 100644
--- a/sw/source/ui/chrdlg/pardlg.cxx
+++ b/sw/source/ui/chrdlg/pardlg.cxx
@@ -20,7 +20,6 @@
 #include <sfx2/htmlmode.hxx>
 #include <sfx2/tabdlg.hxx>
 #include <svl/style.hxx>
-#include <svtools/htmlcfg.hxx>
 #include <svl/cjkoptions.hxx>
 #include <docsh.hxx>
 #include <wrtsh.hxx>
@@ -38,6 +37,7 @@
 #include <svx/dialogs.hrc>
 #include <svx/flagsdef.hxx>
 #include <osl/diagnose.h>
+#include <officecfg/Office/Common.hxx>
 
 SwParaDlg::SwParaDlg(weld::Window *pParent,
                     SwView& rVw,
@@ -73,7 +73,7 @@ SwParaDlg::SwParaDlg(weld::Window *pParent,
     AddTabPage("labelTP_PARA_ALIGN", 
pFact->GetTabPageCreatorFunc(RID_SVXPAGE_ALIGN_PARAGRAPH),
                                       
pFact->GetTabPageRangesFunc(RID_SVXPAGE_ALIGN_PARAGRAPH));
 
-    if (!m_bDrawParaDlg && (!bHtmlMode || 
SvxHtmlOptions::IsPrintLayoutExtension()))
+    if (!m_bDrawParaDlg && (!bHtmlMode || 
officecfg::Office::Common::Filter::HTML::Export::PrintLayout::get()))
     {
         OSL_ENSURE(pFact->GetTabPageCreatorFunc(RID_SVXPAGE_EXT_PARAGRAPH), 
"GetTabPageCreatorFunc fail!");
         OSL_ENSURE(pFact->GetTabPageRangesFunc(RID_SVXPAGE_EXT_PARAGRAPH), 
"GetTabPageRangesFunc fail!");
diff --git a/sw/source/ui/fmtui/tmpdlg.cxx b/sw/source/ui/fmtui/tmpdlg.cxx
index 497a8d40e10a..0a5d6686dadd 100644
--- a/sw/source/ui/fmtui/tmpdlg.cxx
+++ b/sw/source/ui/fmtui/tmpdlg.cxx
@@ -25,7 +25,6 @@
 #include <osl/diagnose.h>
 #include <sfx2/htmlmode.hxx>
 #include <sfx2/sfxdlg.hxx>
-#include <svtools/htmlcfg.hxx>
 #include <svl/cjkoptions.hxx>
 #include <vcl/svapp.hxx>
 #include <numpara.hxx>
@@ -58,6 +57,7 @@
 #include <svl/intitem.hxx>
 #include <svx/dialogs.hrc>
 #include <svx/flagsdef.hxx>
+#include <officecfg/Office/Common.hxx>
 
 // the dialog's carrier
 SwTemplateDlgController::SwTemplateDlgController(weld::Window* pParent,
@@ -146,7 +146,7 @@ 
SwTemplateDlgController::SwTemplateDlgController(weld::Window* pParent,
 
             if(m_nHtmlMode & HTMLMODE_ON)
             {
-                if (!SvxHtmlOptions::IsPrintLayoutExtension())
+                if 
(!officecfg::Office::Common::Filter::HTML::Export::PrintLayout::get())
                     RemoveTabPage("textflow");
                 RemoveTabPage("asiantypo");
                 RemoveTabPage("tabs");
diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx
index 51bd2519304d..daedfffe46f1 100644
--- a/sw/source/ui/table/tabledlg.cxx
+++ b/sw/source/ui/table/tabledlg.cxx
@@ -31,7 +31,6 @@
 #include <fmtpdsc.hxx>
 #include <fmtlsplt.hxx>
 
-#include <svtools/htmlcfg.hxx>
 #include <fmtrowsplt.hxx>
 #include <sfx2/htmlmode.hxx>
 #include <sfx2/sfxdlg.hxx>
@@ -57,6 +56,7 @@
 #include <svx/dialogs.hrc>
 #include <svx/flagsdef.hxx>
 #include <osl/diagnose.h>
+#include <officecfg/Office/Common.hxx>
 
 #include <com/sun/star/text/HoriOrientation.hpp>
 #include <com/sun/star/text/VertOrientation.hpp>
@@ -1427,7 +1427,7 @@ bool  SwTextFlowPage::FillItemSet( SfxItemSet* rSet )
 
 void   SwTextFlowPage::Reset( const SfxItemSet* rSet )
 {
-    bool bFlowAllowed = !m_bHtmlMode || 
SvxHtmlOptions::IsPrintLayoutExtension();
+    bool bFlowAllowed = !m_bHtmlMode || 
officecfg::Office::Common::Filter::HTML::Export::PrintLayout::get();
     if(bFlowAllowed)
     {
         //Inserting of the existing page templates in the list box
diff --git a/sw/source/uibase/app/docst.cxx b/sw/source/uibase/app/docst.cxx
index 02e234bdc6df..ba6c850a86d0 100644
--- a/sw/source/uibase/app/docst.cxx
+++ b/sw/source/uibase/app/docst.cxx
@@ -43,7 +43,6 @@
 #include <sfx2/htmlmode.hxx>
 #include <swmodule.hxx>
 #include <fchrfmt.hxx>
-#include <svtools/htmlcfg.hxx>
 #include <svx/xdef.hxx>
 #include <SwStyleNameMapper.hxx>
 #include <SwRewriter.hxx>
@@ -85,6 +84,7 @@
 #include <AccessibilityCheck.hxx>
 #include <docmodel/theme/Theme.hxx>
 #include <svx/svdpage.hxx>
+#include <officecfg/Office/Common.hxx>
 
 using namespace ::com::sun::star;
 
@@ -221,7 +221,7 @@ void  SwDocShell::StateStyleSheet(SfxItemSet& rSet, 
SwWrtShell* pSh)
 
             case SID_STYLE_FAMILY4:
             {
-                if 
(m_xDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) && 
!SvxHtmlOptions::IsPrintLayoutExtension())
+                if 
(m_xDoc->getIDocumentSettingAccess().get(DocumentSettingId::HTML_MODE) && 
!officecfg::Office::Common::Filter::HTML::Export::PrintLayout::get())
                     rSet.DisableItem( nWhich );
                 else
                 {

Reply via email to