sw: prefix members of SwMasterUsrPref
Change-Id: I4988e6f58cfdabc0abcab56e912d46074b0946fe Reviewed-on: https://gerrit.libreoffice.org/27764 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
This commit is contained in:
@@ -47,40 +47,40 @@ void SwMasterUsrPref::SetUsrPref(const SwViewOption &rCopy)
|
|||||||
}
|
}
|
||||||
|
|
||||||
SwMasterUsrPref::SwMasterUsrPref(bool bWeb) :
|
SwMasterUsrPref::SwMasterUsrPref(bool bWeb) :
|
||||||
eFieldUpdateFlags(AUTOUPD_OFF),
|
m_eFieldUpdateFlags(AUTOUPD_OFF),
|
||||||
nLinkUpdateMode(0),
|
m_nLinkUpdateMode(0),
|
||||||
bIsHScrollMetricSet(false),
|
m_bIsHScrollMetricSet(false),
|
||||||
bIsVScrollMetricSet(false),
|
m_bIsVScrollMetricSet(false),
|
||||||
nDefTab( MM50 * 4 ),
|
m_nDefTab( MM50 * 4 ),
|
||||||
bIsSquaredPageMode(false),
|
m_bIsSquaredPageMode(false),
|
||||||
bIsAlignMathObjectsToBaseline(false),
|
m_bIsAlignMathObjectsToBaseline(false),
|
||||||
aContentConfig(bWeb, *this),
|
m_aContentConfig(bWeb, *this),
|
||||||
aLayoutConfig(bWeb, *this),
|
m_aLayoutConfig(bWeb, *this),
|
||||||
aGridConfig(bWeb, *this),
|
m_aGridConfig(bWeb, *this),
|
||||||
aCursorConfig(*this),
|
m_aCursorConfig(*this),
|
||||||
pWebColorConfig(bWeb ? new SwWebColorConfig(*this) : nullptr),
|
m_pWebColorConfig(bWeb ? new SwWebColorConfig(*this) : nullptr),
|
||||||
bApplyCharUnit(false)
|
m_bApplyCharUnit(false)
|
||||||
{
|
{
|
||||||
if (utl::ConfigManager::IsAvoidConfig())
|
if (utl::ConfigManager::IsAvoidConfig())
|
||||||
{
|
{
|
||||||
eHScrollMetric = eVScrollMetric = eUserMetric = FUNIT_CM;
|
m_eHScrollMetric = m_eVScrollMetric = m_eUserMetric = FUNIT_CM;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
|
MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum();
|
||||||
eUserMetric = MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH;
|
m_eUserMetric = MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH;
|
||||||
eHScrollMetric = eVScrollMetric = eUserMetric;
|
m_eHScrollMetric = m_eVScrollMetric = m_eUserMetric;
|
||||||
|
|
||||||
aContentConfig.Load();
|
m_aContentConfig.Load();
|
||||||
aLayoutConfig.Load();
|
m_aLayoutConfig.Load();
|
||||||
aGridConfig.Load();
|
m_aGridConfig.Load();
|
||||||
aCursorConfig.Load();
|
m_aCursorConfig.Load();
|
||||||
if(pWebColorConfig)
|
if(m_pWebColorConfig)
|
||||||
pWebColorConfig->Load();
|
m_pWebColorConfig->Load();
|
||||||
}
|
}
|
||||||
|
|
||||||
SwMasterUsrPref::~SwMasterUsrPref()
|
SwMasterUsrPref::~SwMasterUsrPref()
|
||||||
{
|
{
|
||||||
delete pWebColorConfig;
|
delete m_pWebColorConfig;
|
||||||
}
|
}
|
||||||
|
|
||||||
Sequence<OUString> SwContentViewConfig::GetPropertyNames()
|
Sequence<OUString> SwContentViewConfig::GetPropertyNames()
|
||||||
@@ -289,12 +289,12 @@ void SwLayoutViewConfig::ImplCommit()
|
|||||||
case 4: rVal <<= rParent.IsViewHRuler(true); break; // "Window/HorizontalRuler",
|
case 4: rVal <<= rParent.IsViewHRuler(true); break; // "Window/HorizontalRuler",
|
||||||
case 5: rVal <<= rParent.IsViewVRuler(true); break; // "Window/VerticalRuler",
|
case 5: rVal <<= rParent.IsViewVRuler(true); break; // "Window/VerticalRuler",
|
||||||
case 6:
|
case 6:
|
||||||
if(rParent.bIsHScrollMetricSet)
|
if(rParent.m_bIsHScrollMetricSet)
|
||||||
rVal <<= (sal_Int32)rParent.eHScrollMetric; // "Window/HorizontalRulerUnit"
|
rVal <<= (sal_Int32)rParent.m_eHScrollMetric; // "Window/HorizontalRulerUnit"
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
if(rParent.bIsVScrollMetricSet)
|
if(rParent.m_bIsVScrollMetricSet)
|
||||||
rVal <<= (sal_Int32)rParent.eVScrollMetric; // "Window/VerticalRulerUnit"
|
rVal <<= (sal_Int32)rParent.m_eVScrollMetric; // "Window/VerticalRulerUnit"
|
||||||
break;
|
break;
|
||||||
case 8: rVal <<= rParent.IsSmoothScroll(); break; // "Window/SmoothScroll",
|
case 8: rVal <<= rParent.IsSmoothScroll(); break; // "Window/SmoothScroll",
|
||||||
case 9: rVal <<= (sal_Int32)rParent.GetZoom(); break; // "Zoom/Value",
|
case 9: rVal <<= (sal_Int32)rParent.GetZoom(); break; // "Zoom/Value",
|
||||||
@@ -340,14 +340,14 @@ void SwLayoutViewConfig::Load()
|
|||||||
case 5: rParent.SetViewVRuler(bSet); break;// "Window/VerticalRuler",
|
case 5: rParent.SetViewVRuler(bSet); break;// "Window/VerticalRuler",
|
||||||
case 6:
|
case 6:
|
||||||
{
|
{
|
||||||
rParent.bIsHScrollMetricSet = true;
|
rParent.m_bIsHScrollMetricSet = true;
|
||||||
rParent.eHScrollMetric = ((FieldUnit)nInt32Val); // "Window/HorizontalRulerUnit"
|
rParent.m_eHScrollMetric = ((FieldUnit)nInt32Val); // "Window/HorizontalRulerUnit"
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
{
|
{
|
||||||
rParent.bIsVScrollMetricSet = true;
|
rParent.m_bIsVScrollMetricSet = true;
|
||||||
rParent.eVScrollMetric = ((FieldUnit)nInt32Val); // "Window/VerticalRulerUnit"
|
rParent.m_eVScrollMetric = ((FieldUnit)nInt32Val); // "Window/VerticalRulerUnit"
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 8: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll",
|
case 8: rParent.SetSmoothScroll(bSet); break;// "Window/SmoothScroll",
|
||||||
|
@@ -127,26 +127,26 @@ class SwMasterUsrPref : public SwViewOption
|
|||||||
friend class SwCursorConfig;
|
friend class SwCursorConfig;
|
||||||
friend class SwWebColorConfig;
|
friend class SwWebColorConfig;
|
||||||
|
|
||||||
SwFieldUpdateFlags eFieldUpdateFlags; //update of fields and charts
|
SwFieldUpdateFlags m_eFieldUpdateFlags; //update of fields and charts
|
||||||
sal_Int32 nLinkUpdateMode;
|
sal_Int32 m_nLinkUpdateMode;
|
||||||
FieldUnit eUserMetric;
|
FieldUnit m_eUserMetric;
|
||||||
FieldUnit eHScrollMetric;
|
FieldUnit m_eHScrollMetric;
|
||||||
bool bIsHScrollMetricSet;
|
bool m_bIsHScrollMetricSet;
|
||||||
FieldUnit eVScrollMetric;
|
FieldUnit m_eVScrollMetric;
|
||||||
bool bIsVScrollMetricSet;
|
bool m_bIsVScrollMetricSet;
|
||||||
|
|
||||||
sal_Int32 nDefTab; //default tab stop distance
|
sal_Int32 m_nDefTab; //default tab stop distance
|
||||||
|
|
||||||
bool bIsSquaredPageMode; //default page mode for text grid
|
bool m_bIsSquaredPageMode; //default page mode for text grid
|
||||||
bool bIsAlignMathObjectsToBaseline;
|
bool m_bIsAlignMathObjectsToBaseline;
|
||||||
|
|
||||||
SwContentViewConfig aContentConfig;
|
SwContentViewConfig m_aContentConfig;
|
||||||
SwLayoutViewConfig aLayoutConfig;
|
SwLayoutViewConfig m_aLayoutConfig;
|
||||||
SwGridConfig aGridConfig;
|
SwGridConfig m_aGridConfig;
|
||||||
SwCursorConfig aCursorConfig;
|
SwCursorConfig m_aCursorConfig;
|
||||||
SwWebColorConfig* pWebColorConfig;
|
SwWebColorConfig* m_pWebColorConfig;
|
||||||
|
|
||||||
bool bApplyCharUnit; // apply_char_unit
|
bool m_bApplyCharUnit; // apply_char_unit
|
||||||
public:
|
public:
|
||||||
SwMasterUsrPref(bool bWeb);
|
SwMasterUsrPref(bool bWeb);
|
||||||
~SwMasterUsrPref();
|
~SwMasterUsrPref();
|
||||||
@@ -155,111 +155,111 @@ public:
|
|||||||
|
|
||||||
void SetModified()
|
void SetModified()
|
||||||
{
|
{
|
||||||
aContentConfig.SetModified();
|
m_aContentConfig.SetModified();
|
||||||
aLayoutConfig.SetModified();
|
m_aLayoutConfig.SetModified();
|
||||||
aGridConfig.SetModified();
|
m_aGridConfig.SetModified();
|
||||||
aCursorConfig.SetModified();
|
m_aCursorConfig.SetModified();
|
||||||
if(pWebColorConfig)
|
if(m_pWebColorConfig)
|
||||||
pWebColorConfig->SetModified();
|
m_pWebColorConfig->SetModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetUpdateLinkMode(sal_Int32 nSet, bool bNoModify = false)
|
void SetUpdateLinkMode(sal_Int32 nSet, bool bNoModify = false)
|
||||||
{
|
{
|
||||||
nLinkUpdateMode = nSet;
|
m_nLinkUpdateMode = nSet;
|
||||||
if(!bNoModify)
|
if(!bNoModify)
|
||||||
aContentConfig.SetModified();
|
m_aContentConfig.SetModified();
|
||||||
}
|
}
|
||||||
sal_Int32 GetUpdateLinkMode() const {return nLinkUpdateMode; }
|
sal_Int32 GetUpdateLinkMode() const {return m_nLinkUpdateMode; }
|
||||||
|
|
||||||
void SetUpdateFields(bool bSet)
|
void SetUpdateFields(bool bSet)
|
||||||
{
|
{
|
||||||
if(bSet && eFieldUpdateFlags == AUTOUPD_OFF)
|
if(bSet && m_eFieldUpdateFlags == AUTOUPD_OFF)
|
||||||
{
|
{
|
||||||
eFieldUpdateFlags = AUTOUPD_FIELD_ONLY;
|
m_eFieldUpdateFlags = AUTOUPD_FIELD_ONLY;
|
||||||
}
|
}
|
||||||
else if(!bSet)
|
else if(!bSet)
|
||||||
{
|
{
|
||||||
eFieldUpdateFlags = AUTOUPD_OFF;
|
m_eFieldUpdateFlags = AUTOUPD_OFF;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
bool IsUpdateFields()const {return eFieldUpdateFlags != AUTOUPD_OFF; }
|
bool IsUpdateFields()const {return m_eFieldUpdateFlags != AUTOUPD_OFF; }
|
||||||
|
|
||||||
SwFieldUpdateFlags GetFieldUpdateFlags()const {return eFieldUpdateFlags;}
|
SwFieldUpdateFlags GetFieldUpdateFlags()const {return m_eFieldUpdateFlags;}
|
||||||
void SetFieldUpdateFlags(SwFieldUpdateFlags eSet)
|
void SetFieldUpdateFlags(SwFieldUpdateFlags eSet)
|
||||||
{
|
{
|
||||||
eFieldUpdateFlags = eSet;
|
m_eFieldUpdateFlags = eSet;
|
||||||
aContentConfig.SetModified();
|
m_aContentConfig.SetModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetUpdateCharts(bool bSet)
|
void SetUpdateCharts(bool bSet)
|
||||||
{
|
{
|
||||||
if(bSet)
|
if(bSet)
|
||||||
{
|
{
|
||||||
eFieldUpdateFlags = AUTOUPD_FIELD_AND_CHARTS;
|
m_eFieldUpdateFlags = AUTOUPD_FIELD_AND_CHARTS;
|
||||||
}
|
}
|
||||||
else if(eFieldUpdateFlags == AUTOUPD_FIELD_AND_CHARTS)
|
else if(m_eFieldUpdateFlags == AUTOUPD_FIELD_AND_CHARTS)
|
||||||
{
|
{
|
||||||
eFieldUpdateFlags = AUTOUPD_FIELD_ONLY;
|
m_eFieldUpdateFlags = AUTOUPD_FIELD_ONLY;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
bool IsUpdateCharts()const {return eFieldUpdateFlags == AUTOUPD_FIELD_AND_CHARTS; }
|
bool IsUpdateCharts()const {return m_eFieldUpdateFlags == AUTOUPD_FIELD_AND_CHARTS; }
|
||||||
|
|
||||||
FieldUnit GetMetric() const { return eUserMetric;}
|
FieldUnit GetMetric() const { return m_eUserMetric;}
|
||||||
void SetMetric(FieldUnit eSet, bool bNoModify = false)
|
void SetMetric(FieldUnit eSet, bool bNoModify = false)
|
||||||
{
|
{
|
||||||
eUserMetric = eSet;
|
m_eUserMetric = eSet;
|
||||||
if(!bNoModify)
|
if(!bNoModify)
|
||||||
aLayoutConfig.SetModified();
|
m_aLayoutConfig.SetModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsHScrollMetric()const {return bIsHScrollMetricSet;}
|
bool IsHScrollMetric()const {return m_bIsHScrollMetricSet;}
|
||||||
FieldUnit GetHScrollMetric() const { return bIsHScrollMetricSet ? eHScrollMetric : eUserMetric;}
|
FieldUnit GetHScrollMetric() const { return m_bIsHScrollMetricSet ? m_eHScrollMetric : m_eUserMetric;}
|
||||||
void SetHScrollMetric(FieldUnit eSet)
|
void SetHScrollMetric(FieldUnit eSet)
|
||||||
{
|
{
|
||||||
eHScrollMetric = eSet; bIsHScrollMetricSet = true;
|
m_eHScrollMetric = eSet; m_bIsHScrollMetricSet = true;
|
||||||
aLayoutConfig.SetModified();
|
m_aLayoutConfig.SetModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsVScrollMetric()const {return bIsVScrollMetricSet;}
|
bool IsVScrollMetric()const {return m_bIsVScrollMetricSet;}
|
||||||
FieldUnit GetVScrollMetric() const { return bIsVScrollMetricSet ? eVScrollMetric : eUserMetric;}
|
FieldUnit GetVScrollMetric() const { return m_bIsVScrollMetricSet ? m_eVScrollMetric : m_eUserMetric;}
|
||||||
void SetVScrollMetric(FieldUnit eSet)
|
void SetVScrollMetric(FieldUnit eSet)
|
||||||
{
|
{
|
||||||
eVScrollMetric = eSet; bIsVScrollMetricSet = true;
|
m_eVScrollMetric = eSet; m_bIsVScrollMetricSet = true;
|
||||||
aLayoutConfig.SetModified();
|
m_aLayoutConfig.SetModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsApplyCharUnit() const
|
bool IsApplyCharUnit() const
|
||||||
{
|
{
|
||||||
return bApplyCharUnit;
|
return m_bApplyCharUnit;
|
||||||
}
|
}
|
||||||
void SetApplyCharUnit(bool bSet)
|
void SetApplyCharUnit(bool bSet)
|
||||||
{
|
{
|
||||||
bApplyCharUnit = bSet;
|
m_bApplyCharUnit = bSet;
|
||||||
aLayoutConfig.SetModified();
|
m_aLayoutConfig.SetModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
sal_Int32 GetDefTab() const { return nDefTab;}
|
sal_Int32 GetDefTab() const { return m_nDefTab;}
|
||||||
void SetDefTab( sal_Int32 nSet, bool bNoModify = false )
|
void SetDefTab( sal_Int32 nSet, bool bNoModify = false )
|
||||||
{
|
{
|
||||||
nDefTab = nSet;
|
m_nDefTab = nSet;
|
||||||
if(!bNoModify)
|
if(!bNoModify)
|
||||||
aLayoutConfig.SetModified();
|
m_aLayoutConfig.SetModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
//default page mode for text grid
|
//default page mode for text grid
|
||||||
bool IsSquaredPageMode() const {return bIsSquaredPageMode;}
|
bool IsSquaredPageMode() const {return m_bIsSquaredPageMode;}
|
||||||
void SetDefaultPageMode( bool bVal, bool bNoModify = false )
|
void SetDefaultPageMode( bool bVal, bool bNoModify = false )
|
||||||
{
|
{
|
||||||
bIsSquaredPageMode = bVal;
|
m_bIsSquaredPageMode = bVal;
|
||||||
if(!bNoModify)
|
if(!bNoModify)
|
||||||
aLayoutConfig.SetModified();
|
m_aLayoutConfig.SetModified();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsAlignMathObjectsToBaseline() const { return bIsAlignMathObjectsToBaseline; }
|
bool IsAlignMathObjectsToBaseline() const { return m_bIsAlignMathObjectsToBaseline; }
|
||||||
void SetAlignMathObjectsToBaseline( bool bVal )
|
void SetAlignMathObjectsToBaseline( bool bVal )
|
||||||
{
|
{
|
||||||
bIsAlignMathObjectsToBaseline = bVal;
|
m_bIsAlignMathObjectsToBaseline = bVal;
|
||||||
aLayoutConfig.SetModified();
|
m_aLayoutConfig.SetModified();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user