sw/source/uibase/config/usrpref.cxx | 4 ++-- sw/source/uibase/inc/usrpref.hxx | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-)
New commits: commit 274eec284c2181136ff304089b5011aa8727f0e6 Author: Caolán McNamara <caolan.mcnam...@collabora.com> AuthorDate: Fri Mar 7 15:59:46 2025 +0000 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Mar 10 10:18:52 2025 +0100 Resolves: tdf#165603 zoom settings reset to default in ctor after they were loaded from the config Change-Id: Id58d997d620b00f7e7ae9a7b9d71fd628d44db8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182700 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx index 6bbb381fea9f..033780cda000 100644 --- a/sw/source/uibase/config/usrpref.cxx +++ b/sw/source/uibase/config/usrpref.cxx @@ -58,12 +58,12 @@ SwMasterUsrPref::SwMasterUsrPref(bool bWeb) : m_nDefTabInMm100( 2000 ), // 2 cm m_bIsSquaredPageMode(false), m_bIsAlignMathObjectsToBaseline(false), + m_bApplyCharUnit(false), m_aContentConfig(bWeb, *this), m_aLayoutConfig(bWeb, *this), m_aGridConfig(bWeb, *this), m_aCursorConfig(*this), - m_pWebColorConfig(bWeb ? new SwWebColorConfig(*this) : nullptr), - m_bApplyCharUnit(false) + m_pWebColorConfig(bWeb ? new SwWebColorConfig(*this) : nullptr) { if (utl::ConfigManager::IsFuzzing()) { diff --git a/sw/source/uibase/inc/usrpref.hxx b/sw/source/uibase/inc/usrpref.hxx index 1464c90bce3c..cd625cd0fb73 100644 --- a/sw/source/uibase/inc/usrpref.hxx +++ b/sw/source/uibase/inc/usrpref.hxx @@ -141,13 +141,17 @@ class SwMasterUsrPref : public SwViewOption bool m_bIsSquaredPageMode; //default page mode for text grid bool m_bIsAlignMathObjectsToBaseline; + bool m_bApplyCharUnit; // apply_char_unit + + // Note that these write to SwMasterUsrPref during their ctor + // so any members initialized after their ctor's are called + // will overwrite their loaded config settings SwContentViewConfig m_aContentConfig; SwLayoutViewConfig m_aLayoutConfig; SwGridConfig m_aGridConfig; SwCursorConfig m_aCursorConfig; std::unique_ptr<SwWebColorConfig> m_pWebColorConfig; - bool m_bApplyCharUnit; // apply_char_unit public: SwMasterUsrPref(bool bWeb); ~SwMasterUsrPref();