[Libreoffice-commits] core.git: sw/source
Stephan Bergmann
sbergman at redhat.com
Thu Feb 8 13:59:40 UTC 2018
sw/source/uibase/config/usrpref.cxx | 4 ++--
sw/source/uibase/inc/usrpref.hxx | 12 ++++++++----
2 files changed, 10 insertions(+), 6 deletions(-)
New commits:
commit 35140501779622194337e630b274e74abeedca4d
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Feb 7 22:33:40 2018 +0100
Add missing no-modify mode for SwMasterUsrPref::Set* functions
...that erroneously called m_aLayoutConfig.SetModified when called from
SwMasterUsrPref ctor -> SwLayoutViewConfig::Load, and thus caused
m_aLayoutConfig to always be written back to the configuration upon
utl::ConfigManager::storeConfigItems during termination.
Change-Id: I85e48c6b5cebe9b2b711c943afa27fbeb1e36c49
Reviewed-on: https://gerrit.libreoffice.org/49408
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sw/source/uibase/config/usrpref.cxx b/sw/source/uibase/config/usrpref.cxx
index f98e575c4bb7..c47f88b6dfaf 100644
--- a/sw/source/uibase/config/usrpref.cxx
+++ b/sw/source/uibase/config/usrpref.cxx
@@ -351,14 +351,14 @@ void SwLayoutViewConfig::Load()
case 8: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll",
case 9: rParent.SetZoom( static_cast< sal_uInt16 >(nInt32Val) ); break;// "Zoom/Value",
case 10: rParent.SetZoomType( static_cast< SvxZoomType >(nInt32Val) ); break;// "Zoom/Type",
- case 11: rParent.SetAlignMathObjectsToBaseline(bSet); break;// "Other/IsAlignMathObjectsToBaseline"
+ case 11: rParent.SetAlignMathObjectsToBaseline(bSet, true); break;// "Other/IsAlignMathObjectsToBaseline"
case 12: rParent.SetMetric(static_cast<FieldUnit>(nInt32Val), true); break;// "Other/MeasureUnit",
case 13: rParent.SetDefTabInMm100(nInt32Val, true); break;// "Other/TabStop",
case 14: rParent.SetVRulerRight(bSet); break;// "Window/IsVerticalRulerRight",
case 15: rParent.SetViewLayoutColumns( static_cast<sal_uInt16>(nInt32Val) ); break;// "ViewLayout/Columns",
case 16: rParent.SetViewLayoutBookMode(bSet); break;// "ViewLayout/BookMode",
case 17: rParent.SetDefaultPageMode(bSet,true); break;// "Other/IsSquaredPageMode",
- case 18: rParent.SetApplyCharUnit(bSet); break;// "Other/ApplyUserChar"
+ case 18: rParent.SetApplyCharUnit(bSet, true); break;// "Other/ApplyUserChar"
case 19: rParent.SetShowScrollBarTips(bSet); break;// "Window/ShowScrollBarTips",
}
}
diff --git a/sw/source/uibase/inc/usrpref.hxx b/sw/source/uibase/inc/usrpref.hxx
index 42d29861dc82..be76a80a979f 100644
--- a/sw/source/uibase/inc/usrpref.hxx
+++ b/sw/source/uibase/inc/usrpref.hxx
@@ -233,10 +233,12 @@ public:
{
return m_bApplyCharUnit;
}
- void SetApplyCharUnit(bool bSet)
+ void SetApplyCharUnit(bool bSet, bool noModify = false)
{
m_bApplyCharUnit = bSet;
- m_aLayoutConfig.SetModified();
+ if (!noModify) {
+ m_aLayoutConfig.SetModified();
+ }
}
sal_Int32 GetDefTabInMm100() const { return m_nDefTabInMm100;}
@@ -257,10 +259,12 @@ public:
}
bool IsAlignMathObjectsToBaseline() const { return m_bIsAlignMathObjectsToBaseline; }
- void SetAlignMathObjectsToBaseline( bool bVal )
+ void SetAlignMathObjectsToBaseline( bool bVal, bool noModify = false )
{
m_bIsAlignMathObjectsToBaseline = bVal;
- m_aLayoutConfig.SetModified();
+ if (!noModify) {
+ m_aLayoutConfig.SetModified();
+ }
}
};
More information about the Libreoffice-commits
mailing list