Kaydet (Commit) 35140501 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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/49408Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarStephan Bergmann <sbergman@redhat.com>
üst f7011dc1
......@@ -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",
}
}
......
......@@ -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();
}
}
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment