Kaydet (Commit) bbc1fc16 authored tarafından Michael Stahl's avatar Michael Stahl

sw: prefix members of SwValueFieldType/SwValueField/SwFormulaField

Change-Id: Ibadb4fb3a56c271bb045790ea0544bfa35b327b6
üst 824229a5
...@@ -381,19 +381,20 @@ inline sal_uInt16 SwField::GetLanguage() const ...@@ -381,19 +381,20 @@ inline sal_uInt16 SwField::GetLanguage() const
/// Fields containing values that have to be formatted via number formatter. /// Fields containing values that have to be formatted via number formatter.
class SwValueFieldType : public SwFieldType class SwValueFieldType : public SwFieldType
{ {
SwDoc* pDoc; private:
bool bUseFormat; ///< Use number formatter. SwDoc* m_pDoc;
bool m_bUseFormat; ///< Use number formatter.
protected: protected:
SwValueFieldType( SwDoc* pDocPtr, sal_uInt16 nWhichId ); SwValueFieldType( SwDoc* pDocPtr, sal_uInt16 nWhichId );
SwValueFieldType( const SwValueFieldType& rTyp ); SwValueFieldType( const SwValueFieldType& rTyp );
public: public:
inline SwDoc* GetDoc() const { return pDoc; } inline SwDoc* GetDoc() const { return m_pDoc; }
inline void SetDoc(SwDoc* pNewDoc) { pDoc = pNewDoc; } inline void SetDoc(SwDoc* pNewDoc) { m_pDoc = pNewDoc; }
inline bool UseFormat() const { return bUseFormat; } inline bool UseFormat() const { return m_bUseFormat; }
inline void EnableFormat(bool bFormat = true) { bUseFormat = bFormat; } inline void EnableFormat(bool bFormat = true) { m_bUseFormat = bFormat; }
OUString ExpandValue(const double& rVal, sal_uInt32 nFmt, sal_uInt16 nLng=0) const; OUString ExpandValue(const double& rVal, sal_uInt32 nFmt, sal_uInt16 nLng=0) const;
OUString DoubleToString(const double &rVal, LanguageType eLng) const; OUString DoubleToString(const double &rVal, LanguageType eLng) const;
...@@ -402,7 +403,8 @@ public: ...@@ -402,7 +403,8 @@ public:
class SW_DLLPUBLIC SwValueField : public SwField class SW_DLLPUBLIC SwValueField : public SwField
{ {
double fValue; private:
double m_fValue;
protected: protected:
SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, sal_uInt16 nLang = LANGUAGE_SYSTEM, const double fVal = 0.0 ); SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, sal_uInt16 nLang = LANGUAGE_SYSTEM, const double fVal = 0.0 );
...@@ -427,7 +429,8 @@ public: ...@@ -427,7 +429,8 @@ public:
class SW_DLLPUBLIC SwFormulaField : public SwValueField class SW_DLLPUBLIC SwFormulaField : public SwValueField
{ {
OUString sFormula; private:
OUString m_sFormula;
protected: protected:
SwFormulaField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, const double fVal = 0.0 ); SwFormulaField( SwValueFieldType* pFldType, sal_uInt32 nFmt = 0, const double fVal = 0.0 );
......
...@@ -466,17 +466,17 @@ OUString FormatNumber(sal_uInt32 nNum, sal_uInt32 nFormat) ...@@ -466,17 +466,17 @@ OUString FormatNumber(sal_uInt32 nNum, sal_uInt32 nFormat)
return aNumber.GetNumStr(nNum); return aNumber.GetNumStr(nNum);
} }
SwValueFieldType::SwValueFieldType( SwDoc* pDocPtr, sal_uInt16 nWhichId ) SwValueFieldType::SwValueFieldType(SwDoc *const pDoc, sal_uInt16 const nWhichId)
: SwFieldType(nWhichId), : SwFieldType(nWhichId)
pDoc(pDocPtr), , m_pDoc(pDoc)
bUseFormat(true) , m_bUseFormat(true)
{ {
} }
SwValueFieldType::SwValueFieldType( const SwValueFieldType& rTyp ) SwValueFieldType::SwValueFieldType( const SwValueFieldType& rTyp )
: SwFieldType(rTyp.Which()), : SwFieldType(rTyp.Which())
pDoc(rTyp.GetDoc()), , m_pDoc(rTyp.GetDoc())
bUseFormat(rTyp.UseFormat()) , m_bUseFormat(rTyp.UseFormat())
{ {
} }
...@@ -488,7 +488,7 @@ OUString SwValueFieldType::ExpandValue( const double& rVal, ...@@ -488,7 +488,7 @@ OUString SwValueFieldType::ExpandValue( const double& rVal,
return SwViewShell::GetShellRes()->aCalc_Error; return SwViewShell::GetShellRes()->aCalc_Error;
OUString sExpand; OUString sExpand;
SvNumberFormatter* pFormatter = pDoc->GetNumberFormatter(); SvNumberFormatter* pFormatter = m_pDoc->GetNumberFormatter();
Color* pCol = 0; Color* pCol = 0;
// Bug #60010 // Bug #60010
...@@ -535,7 +535,7 @@ OUString SwValueFieldType::ExpandValue( const double& rVal, ...@@ -535,7 +535,7 @@ OUString SwValueFieldType::ExpandValue( const double& rVal,
OUString SwValueFieldType::DoubleToString(const double &rVal, OUString SwValueFieldType::DoubleToString(const double &rVal,
sal_uInt32 nFmt) const sal_uInt32 nFmt) const
{ {
SvNumberFormatter* pFormatter = pDoc->GetNumberFormatter(); SvNumberFormatter* pFormatter = m_pDoc->GetNumberFormatter();
const SvNumberformat* pEntry = pFormatter->GetEntry(nFmt); const SvNumberformat* pEntry = pFormatter->GetEntry(nFmt);
if (!pEntry) if (!pEntry)
...@@ -547,7 +547,7 @@ OUString SwValueFieldType::DoubleToString(const double &rVal, ...@@ -547,7 +547,7 @@ OUString SwValueFieldType::DoubleToString(const double &rVal,
OUString SwValueFieldType::DoubleToString( const double &rVal, OUString SwValueFieldType::DoubleToString( const double &rVal,
sal_uInt16 nLng ) const sal_uInt16 nLng ) const
{ {
SvNumberFormatter* pFormatter = pDoc->GetNumberFormatter(); SvNumberFormatter* pFormatter = m_pDoc->GetNumberFormatter();
// Bug #60010 // Bug #60010
if( nLng == LANGUAGE_NONE ) if( nLng == LANGUAGE_NONE )
...@@ -560,14 +560,14 @@ OUString SwValueFieldType::DoubleToString( const double &rVal, ...@@ -560,14 +560,14 @@ OUString SwValueFieldType::DoubleToString( const double &rVal,
SwValueField::SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt, SwValueField::SwValueField( SwValueFieldType* pFldType, sal_uInt32 nFmt,
sal_uInt16 nLng, const double fVal ) sal_uInt16 nLng, const double fVal )
: SwField(pFldType, nFmt, nLng), : SwField(pFldType, nFmt, nLng)
fValue(fVal) , m_fValue(fVal)
{ {
} }
SwValueField::SwValueField( const SwValueField& rFld ) SwValueField::SwValueField( const SwValueField& rFld )
: SwField(rFld), : SwField(rFld)
fValue(rFld.GetValue()) , m_fValue(rFld.GetValue())
{ {
} }
...@@ -675,12 +675,12 @@ void SwValueField::SetLanguage( sal_uInt16 nLng ) ...@@ -675,12 +675,12 @@ void SwValueField::SetLanguage( sal_uInt16 nLng )
double SwValueField::GetValue() const double SwValueField::GetValue() const
{ {
return fValue; return m_fValue;
} }
void SwValueField::SetValue( const double& rVal ) void SwValueField::SetValue( const double& rVal )
{ {
fValue = rVal; m_fValue = rVal;
} }
SwFormulaField::SwFormulaField( SwValueFieldType* pFldType, sal_uInt32 nFmt, const double fVal) SwFormulaField::SwFormulaField( SwValueFieldType* pFldType, sal_uInt32 nFmt, const double fVal)
...@@ -696,12 +696,12 @@ SwFormulaField::SwFormulaField( const SwFormulaField& rFld ) ...@@ -696,12 +696,12 @@ SwFormulaField::SwFormulaField( const SwFormulaField& rFld )
OUString SwFormulaField::GetFormula() const OUString SwFormulaField::GetFormula() const
{ {
return sFormula; return m_sFormula;
} }
void SwFormulaField::SetFormula(const OUString& rStr) void SwFormulaField::SetFormula(const OUString& rStr)
{ {
sFormula = rStr; m_sFormula = rStr;
sal_uLong nFmt(GetFormat()); sal_uLong nFmt(GetFormat());
...@@ -728,11 +728,11 @@ void SwFormulaField::SetExpandedFormula( const OUString& rStr ) ...@@ -728,11 +728,11 @@ void SwFormulaField::SetExpandedFormula( const OUString& rStr )
{ {
SwValueField::SetValue(fTmpValue); SwValueField::SetValue(fTmpValue);
sFormula = static_cast<SwValueFieldType *>(GetTyp())->DoubleToString(fTmpValue, nFmt); m_sFormula = static_cast<SwValueFieldType *>(GetTyp())->DoubleToString(fTmpValue, nFmt);
return; return;
} }
} }
sFormula = rStr; m_sFormula = rStr;
} }
OUString SwFormulaField::GetExpandedFormula() const OUString SwFormulaField::GetExpandedFormula() const
......
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