summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-04-21 17:41:03 +0200
committerMichael Stahl <mstahl@redhat.com>2015-04-21 20:36:27 +0200
commitbbc1fc161d1f6aeb476970aa04534bd5480e757c (patch)
treecd01f2e95e5e897c9cd5773c83b0cccd9ebe2bf9 /sw
parent824229a55e5f5bf0e7bd8e2917635175c9c82dc4 (diff)
sw: prefix members of SwValueFieldType/SwValueField/SwFormulaField
Change-Id: Ibadb4fb3a56c271bb045790ea0544bfa35b327b6
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/fldbas.hxx19
-rw-r--r--sw/source/core/fields/fldbas.cxx40
2 files changed, 31 insertions, 28 deletions
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 8cc63afbf575..cc365ed6b2ec 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -381,19 +381,20 @@ inline sal_uInt16 SwField::GetLanguage() const
/// Fields containing values that have to be formatted via number formatter.
class SwValueFieldType : public SwFieldType
{
- SwDoc* pDoc;
- bool bUseFormat; ///< Use number formatter.
+private:
+ SwDoc* m_pDoc;
+ bool m_bUseFormat; ///< Use number formatter.
protected:
SwValueFieldType( SwDoc* pDocPtr, sal_uInt16 nWhichId );
SwValueFieldType( const SwValueFieldType& rTyp );
public:
- inline SwDoc* GetDoc() const { return pDoc; }
- inline void SetDoc(SwDoc* pNewDoc) { pDoc = pNewDoc; }
+ inline SwDoc* GetDoc() const { return m_pDoc; }
+ inline void SetDoc(SwDoc* pNewDoc) { m_pDoc = pNewDoc; }
- inline bool UseFormat() const { return bUseFormat; }
- inline void EnableFormat(bool bFormat = true) { bUseFormat = bFormat; }
+ inline bool UseFormat() const { return m_bUseFormat; }
+ inline void EnableFormat(bool bFormat = true) { m_bUseFormat = bFormat; }
OUString ExpandValue(const double& rVal, sal_uInt32 nFmt, sal_uInt16 nLng=0) const;
OUString DoubleToString(const double &rVal, LanguageType eLng) const;
@@ -402,7 +403,8 @@ public:
class SW_DLLPUBLIC SwValueField : public SwField
{
- double fValue;
+private:
+ double m_fValue;
protected:
SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, sal_uInt16 nLang = LANGUAGE_SYSTEM, const double fVal = 0.0 );
@@ -427,7 +429,8 @@ public:
class SW_DLLPUBLIC SwFormulaField : public SwValueField
{
- OUString sFormula;
+private:
+ OUString m_sFormula;
protected:
SwFormulaField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, const double fVal = 0.0 );
diff --git a/sw/source/core/fields/fldbas.cxx b/sw/source/core/fields/fldbas.cxx
index a9e6b71930c3..f2132be00442 100644
--- a/sw/source/core/fields/fldbas.cxx
+++ b/sw/source/core/fields/fldbas.cxx
@@ -466,17 +466,17 @@ OUString FormatNumber(sal_uInt32 nNum, sal_uInt32 nFormat)
return aNumber.GetNumStr(nNum);
}
-SwValueFieldType::SwValueFieldType( SwDoc* pDocPtr, sal_uInt16 nWhichId )
- : SwFieldType(nWhichId),
- pDoc(pDocPtr),
- bUseFormat(true)
+SwValueFieldType::SwValueFieldType(SwDoc *const pDoc, sal_uInt16 const nWhichId)
+ : SwFieldType(nWhichId)
+ , m_pDoc(pDoc)
+ , m_bUseFormat(true)
{
}
SwValueFieldType::SwValueFieldType( const SwValueFieldType& rTyp )
- : SwFieldType(rTyp.Which()),
- pDoc(rTyp.GetDoc()),
- bUseFormat(rTyp.UseFormat())
+ : SwFieldType(rTyp.Which())
+ , m_pDoc(rTyp.GetDoc())
+ , m_bUseFormat(rTyp.UseFormat())
{
}
@@ -488,7 +488,7 @@ OUString SwValueFieldType::ExpandValue( const double& rVal,
return SwViewShell::GetShellRes()->aCalc_Error;
OUString sExpand;
- SvNumberFormatter* pFormatter = pDoc->GetNumberFormatter();
+ SvNumberFormatter* pFormatter = m_pDoc->GetNumberFormatter();
Color* pCol = 0;
// Bug #60010
@@ -535,7 +535,7 @@ OUString SwValueFieldType::ExpandValue( const double& rVal,
OUString SwValueFieldType::DoubleToString(const double &rVal,
sal_uInt32 nFmt) const
{
- SvNumberFormatter* pFormatter = pDoc->GetNumberFormatter();
+ SvNumberFormatter* pFormatter = m_pDoc->GetNumberFormatter();
const SvNumberformat* pEntry = pFormatter->GetEntry(nFmt);
if (!pEntry)
@@ -547,7 +547,7 @@ OUString SwValueFieldType::DoubleToString(const double &rVal,
OUString SwValueFieldType::DoubleToString( const double &rVal,
sal_uInt16 nLng ) const
{
- SvNumberFormatter* pFormatter = pDoc->GetNumberFormatter();
+ SvNumberFormatter* pFormatter = m_pDoc->GetNumberFormatter();
// Bug #60010
if( nLng == LANGUAGE_NONE )
@@ -560,14 +560,14 @@ OUString SwValueFieldType::DoubleToString( const double &rVal,
SwValueField::SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt,
sal_uInt16 nLng, const double fVal )
- : SwField(pFldType, nFmt, nLng),
- fValue(fVal)
+ : SwField(pFldType, nFmt, nLng)
+ , m_fValue(fVal)
{
}
SwValueField::SwValueField( const SwValueField& rFld )
- : SwField(rFld),
- fValue(rFld.GetValue())
+ : SwField(rFld)
+ , m_fValue(rFld.GetValue())
{
}
@@ -675,12 +675,12 @@ void SwValueField::SetLanguage( sal_uInt16 nLng )
double SwValueField::GetValue() const
{
- return fValue;
+ return m_fValue;
}
void SwValueField::SetValue( const double& rVal )
{
- fValue = rVal;
+ m_fValue = rVal;
}
SwFormulaField::SwFormulaField( SwValueFieldType* pFldType, sal_uInt32 nFmt, const double fVal)
@@ -696,12 +696,12 @@ SwFormulaField::SwFormulaField( const SwFormulaField& rFld )
OUString SwFormulaField::GetFormula() const
{
- return sFormula;
+ return m_sFormula;
}
void SwFormulaField::SetFormula(const OUString& rStr)
{
- sFormula = rStr;
+ m_sFormula = rStr;
sal_uLong nFmt(GetFormat());
@@ -728,11 +728,11 @@ void SwFormulaField::SetExpandedFormula( const OUString& rStr )
{
SwValueField::SetValue(fTmpValue);
- sFormula = static_cast<SwValueFieldType *>(GetTyp())->DoubleToString(fTmpValue, nFmt);
+ m_sFormula = static_cast<SwValueFieldType *>(GetTyp())->DoubleToString(fTmpValue, nFmt);
return;
}
}
- sFormula = rStr;
+ m_sFormula = rStr;
}
OUString SwFormulaField::GetExpandedFormula() const