cui/inc/treeopt.hrc                  |    1 -
 cui/source/factory/dlgfact.cxx       |    2 --
 cui/source/options/treeopt.cxx       |    1 -
 cui/source/options/treeopthelper.cxx |    1 -
 include/svx/dialogs.hrc              |    1 -
 sw/source/uibase/app/appopt.cxx      |    8 --------
 6 files changed, 14 deletions(-)

New commits:
commit 8eb123f94540974053ab5c0f6f592d79b31e61b2
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Fri Jul 11 19:43:15 2025 +0200
Commit:     Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
CommitDate: Fri Aug 8 12:48:09 2025 +0200

    tdf#167466: drop background tab from Writer/Web options tree
    
    it started to crash after
    commit ca6b1677cc3d923f0c13b2253b48a0ea90485b41
    Author: Xisco Fauli <xiscofa...@libreoffice.org>
    Date:   Tue Jun 3 11:59:57 2025 +0200
    
        sw: no need to create a dummy attr pool
    
    because that target pool is nullptr in SfxItemPool::GetUserOrPoolDefaultItem
    now.
    
    After some testing, there are some reasons why I believe it should be
    dropped:
    * Although it's an Writer/Web option it only works on Web ( File - New -
      HTML document )
    * Even if set in a web document, it won't be exported to html. To do so,
    it has to be set in the Page Style dialog
    * The document background can be changed from the Apperance tab so
    basically this tab is duplicated now
    
    This issue would have be caught if tdf#49895 had a test.
    I will write a UItest in a follow-up commit
    
    Change-Id: I3087a6942b9e5406de936fdde47d4c9143be55e8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187754
    Tested-by: Jenkins
    Reviewed-by: Sahil Gautam <sahil.gau...@collabora.com>
    (cherry picked from commit 08cb3671487b9e28a0bae3b133260e144d7e1160)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188720
    Tested-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>
    Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakan...@libreoffice.org>
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com>

diff --git a/cui/inc/treeopt.hrc b/cui/inc/treeopt.hrc
index 2b17970e9976..55c4e52a5563 100644
--- a/cui/inc/treeopt.hrc
+++ b/cui/inc/treeopt.hrc
@@ -93,7 +93,6 @@ const std::pair<TranslateId, sal_uInt16> 
SID_SW_ONLINEOPTIONS_RES[] =
     { NC_("SID_SW_ONLINEOPTIONS_RES", "Grid"),        
RID_SW_TP_HTML_OPTGRID_PAGE  },
     { NC_("SID_SW_ONLINEOPTIONS_RES", "Print"),         
RID_SW_TP_HTML_OPTPRINT_PAGE   },
     { NC_("SID_SW_ONLINEOPTIONS_RES", "Table"),         
RID_SW_TP_HTML_OPTTABLE_PAGE   },
-    { NC_("SID_SW_ONLINEOPTIONS_RES", "Background"),    RID_SW_TP_BACKGROUND   
}
 };
 
 const std::pair<TranslateId, sal_uInt16> SID_SM_EDITOPTIONS_RES[] =
diff --git a/cui/source/factory/dlgfact.cxx b/cui/source/factory/dlgfact.cxx
index fdb404398c89..bcd1f8009b43 100644
--- a/cui/source/factory/dlgfact.cxx
+++ b/cui/source/factory/dlgfact.cxx
@@ -1190,7 +1190,6 @@ CreateTabPage 
AbstractDialogFactory_Impl::GetTabPageCreatorFunc( sal_uInt16 nId
 {
     switch ( nId )
     {
-        case RID_SW_TP_BACKGROUND :
         case RID_SVXPAGE_BKG :
             return SvxBkgTabPage::Create;
         case RID_SVXPAGE_TEXTANIMATION :
@@ -1299,7 +1298,6 @@ GetTabPageRanges 
AbstractDialogFactory_Impl::GetTabPageRangesFunc( sal_uInt16 nI
             return SvxTextAttrPage::GetRanges;
         case RID_SVXPAGE_ALIGNMENT :
             return svx::AlignmentTabPage::GetRanges;
-        case RID_SW_TP_BACKGROUND :
         case RID_SVXPAGE_BKG:
             return SvxBkgTabPage::GetRanges;
         case RID_SVXPAGE_BORDER :
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index e139862bf981..f959109783d0 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -349,7 +349,6 @@ constexpr OptionsMapping_Impl OptionsMap_Impl[]
     { u"WriterWeb"_ustr,          u"Grid"_ustr,                 
RID_SW_TP_HTML_OPTGRID_PAGE },
     { u"WriterWeb"_ustr,          u"Print"_ustr,                
RID_SW_TP_HTML_OPTPRINT_PAGE },
     { u"WriterWeb"_ustr,          u"Table"_ustr,                
RID_SW_TP_HTML_OPTTABLE_PAGE },
-    { u"WriterWeb"_ustr,          u"Background"_ustr,           
RID_SW_TP_BACKGROUND },
     { u"Math"_ustr,               u""_ustr,                SID_SM_EDITOPTIONS 
},
     { u"Math"_ustr,               u"Settings"_ustr,             
SID_SM_TP_PRINTOPTIONS },
     { u"Calc"_ustr,               u""_ustr,                SID_SC_EDITOPTIONS 
},
diff --git a/cui/source/options/treeopthelper.cxx 
b/cui/source/options/treeopthelper.cxx
index 4dde62e5690a..5b15603929bb 100644
--- a/cui/source/options/treeopthelper.cxx
+++ b/cui/source/options/treeopthelper.cxx
@@ -102,7 +102,6 @@ static PageIdToFileNameMap_Impl FileMap_Impl[] = {
     { RID_SW_TP_HTML_OPTGRID_PAGE, u""_ustr }, // Grid
     { RID_SW_TP_HTML_OPTPRINT_PAGE, u""_ustr }, // Print
     { RID_SW_TP_HTML_OPTTABLE_PAGE, u""_ustr }, // Table
-    { RID_SW_TP_BACKGROUND, u""_ustr }, // Background
     { RID_SW_TP_OPTTEST_PAGE, u""_ustr }, // Internal Test (only in dev build)
 
     // Math, SID_SM_EDITOPTIONS
diff --git a/include/svx/dialogs.hrc b/include/svx/dialogs.hrc
index f03600a74fe0..2f3868e2570d 100644
--- a/include/svx/dialogs.hrc
+++ b/include/svx/dialogs.hrc
@@ -80,7 +80,6 @@
 #define RID_SW_TP_HTML_OPTTABLE_PAGE    (RID_OFA_START + 243)
 #define RID_SW_TP_HTML_OPTGRID_PAGE     (RID_OFA_START + 244)
 #define RID_SW_TP_HTML_OPTSHDWCRSR      (RID_OFA_START + 246)
-#define RID_SW_TP_BACKGROUND            (RID_OFA_START + 217)
 #define RID_SW_TP_OPTCAPTION_PAGE       (RID_OFA_START + 256)
 #define SID_SC_TP_LAYOUT                (RID_OFA_START + 218)
 #define SID_SC_TP_CONTENT               (RID_OFA_START + 219)
diff --git a/sw/source/uibase/app/appopt.cxx b/sw/source/uibase/app/appopt.cxx
index 74d650ccf341..0bb46eb85279 100644
--- a/sw/source/uibase/app/appopt.cxx
+++ b/sw/source/uibase/app/appopt.cxx
@@ -525,14 +525,6 @@ std::unique_ptr<SfxTabPage> SwModule::CreateTabPage( 
sal_uInt16 nId, weld::Conta
             xRet = (*fnCreatePage)( pPage, pController, &rSet );
             break;
         }
-        case  RID_SW_TP_BACKGROUND:
-        {
-            SfxAbstractDialogFactory* pFact = 
SfxAbstractDialogFactory::Create();
-            ::CreateTabPage fnCreatePage = pFact->GetTabPageCreatorFunc( 
RID_SVXPAGE_BKG );
-            xRet = (*fnCreatePage)( pPage, pController, &rSet );
-            xRet->PageCreated( rSet );
-            break;
-        }
         case RID_SW_TP_OPTCAPTION_PAGE:
         {
             SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();

Reply via email to