cui/source/options/appearance.cxx |    4 ++--
 cui/source/options/appearance.hxx |    1 -
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit 7acfec5a8ad8534d4177750aa5b110b16b53378c
Author:     Xisco Fauli <[email protected]>
AuthorDate: Mon Jan 12 14:23:52 2026 +0100
Commit:     Xisco Fauli <[email protected]>
CommitDate: Tue Jan 13 10:09:54 2026 +0100

    crashreporting: fix crash in SvxAppearanceTabPage::SvxAppearanceTabPage
    
    Seen in 
https://crashreport.libreoffice.org/stats/crash_details/ed1c2ca4-f71b-441a-8bf6-48fd965bdb77
    
    Get "Automatic" string using CuiResId instead
    
    Change-Id: Ib973e0139685c4e270a084fb9e878db8c14aace2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197111
    Reviewed-by: Xisco Fauli <[email protected]>
    Tested-by: Jenkins

diff --git a/cui/source/options/appearance.cxx 
b/cui/source/options/appearance.cxx
index bee1a48ef650..dcec8916527e 100644
--- a/cui/source/options/appearance.cxx
+++ b/cui/source/options/appearance.cxx
@@ -119,7 +119,6 @@ SvxAppearanceTabPage::SvxAppearanceTabPage(weld::Container* 
pPage,
     , 
m_xNotebookbarIconSize(m_xBuilder->weld_combo_box(u"notebookbariconsdropdown"_ustr))
     , m_xSizeGrid(m_xBuilder->weld_widget(u"grdIconSize"_ustr))
     , m_xCustomizationFrame(m_xBuilder->weld_widget(u"items"_ustr))
-    , m_sAutoStr(m_xIconsDropDown->get_text(0))
     , m_xVerticalToolbars(m_xBuilder->weld_radio_button(u"rbVertical"_ustr))
     , 
m_xHorizontalToolbars(m_xBuilder->weld_radio_button(u"rbHorizontal"_ustr))
 {
@@ -555,7 +554,8 @@ void SvxAppearanceTabPage::InitIcons()
     const vcl::IconThemeInfo& autoIconTheme
         = vcl::IconThemeInfo::FindIconThemeById(mInstalledIconThemes, 
autoThemeId);
 
-    OUString entryForAuto = m_sAutoStr + " (" + autoIconTheme.GetDisplayName() 
+ ")";
+    OUString sAutoStr(CuiResId(RID_COLOR_SCHEME_LIBREOFFICE_AUTOMATIC));
+    OUString entryForAuto = sAutoStr + " (" + autoIconTheme.GetDisplayName() + 
")";
     m_xIconsDropDown->append(u"auto"_ustr,
                              entryForAuto); // index 0 means choose style 
automatically
 
diff --git a/cui/source/options/appearance.hxx 
b/cui/source/options/appearance.hxx
index 7bfbab2311fb..7cbcd7f93ccf 100644
--- a/cui/source/options/appearance.hxx
+++ b/cui/source/options/appearance.hxx
@@ -45,7 +45,6 @@ private:
     std::unique_ptr<weld::ComboBox> m_xNotebookbarIconSize;
     std::unique_ptr<weld::Widget> m_xSizeGrid;
     std::unique_ptr<weld::Widget> m_xCustomizationFrame;
-    OUString m_sAutoStr;
     std::unique_ptr<weld::RadioButton> m_xVerticalToolbars;
     std::unique_ptr<weld::RadioButton> m_xHorizontalToolbars;
 

Reply via email to