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

sw: prefix members of SwField

Change-Id: If81d5a2ab499837f9e4a38665b0daf2a6bba1269
üst 84a67586
...@@ -284,17 +284,17 @@ private: ...@@ -284,17 +284,17 @@ private:
mutable OUString m_Cache; ///< Cached expansion (for clipboard). mutable OUString m_Cache; ///< Cached expansion (for clipboard).
bool m_bUseFieldValueCache; /// control the usage of the cached field value bool m_bUseFieldValueCache; /// control the usage of the cached field value
sal_uInt16 nLang; ///< Always change via SetLanguage! sal_uInt16 m_nLang; ///< Always change via SetLanguage!
bool bIsAutomaticLanguage; bool m_bIsAutomaticLanguage;
sal_uInt32 nFormat; sal_uInt32 m_nFormat;
SwFieldType* pType; SwFieldType* m_pType;
virtual OUString Expand() const = 0; virtual OUString Expand() const = 0;
virtual SwField* Copy() const = 0; virtual SwField* Copy() const = 0;
protected: protected:
void SetFormat(sal_uInt32 nSet) {nFormat = nSet;} void SetFormat(sal_uInt32 const nSet) { m_nFormat = nSet; }
SwField( SwFieldType* pTyp, SwField( SwFieldType* pTyp,
sal_uInt32 nFmt = 0, sal_uInt32 nFmt = 0,
...@@ -331,7 +331,7 @@ public: ...@@ -331,7 +331,7 @@ public:
#ifdef DBG_UTIL #ifdef DBG_UTIL
; // implemented in fldbas.cxx ; // implemented in fldbas.cxx
#else #else
{ return pType->Which(); } { return m_pType->Which(); }
#endif #endif
// TYP_ID // TYP_ID
...@@ -361,8 +361,8 @@ public: ...@@ -361,8 +361,8 @@ public:
bool HasClickHdl() const; bool HasClickHdl() const;
bool IsFixed() const; bool IsFixed() const;
bool IsAutomaticLanguage() const { return bIsAutomaticLanguage;} bool IsAutomaticLanguage() const { return m_bIsAutomaticLanguage;}
void SetAutomaticLanguage(bool bSet){bIsAutomaticLanguage = bSet;} void SetAutomaticLanguage(bool const bSet) {m_bIsAutomaticLanguage = bSet;}
virtual OUString GetDescription() const; virtual OUString GetDescription() const;
/// Is this field clickable? /// Is this field clickable?
...@@ -370,13 +370,13 @@ public: ...@@ -370,13 +370,13 @@ public:
}; };
inline SwFieldType* SwField::GetTyp() const inline SwFieldType* SwField::GetTyp() const
{ return pType; } { return m_pType; }
inline sal_uInt32 SwField::GetFormat() const inline sal_uInt32 SwField::GetFormat() const
{ return nFormat; } { return m_nFormat; }
inline sal_uInt16 SwField::GetLanguage() const inline sal_uInt16 SwField::GetLanguage() const
{ return nLang; } { return m_nLang; }
/// 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
......
...@@ -187,18 +187,18 @@ void SwFldTypes::dumpAsXml(xmlTextWriterPtr pWriter) const ...@@ -187,18 +187,18 @@ void SwFldTypes::dumpAsXml(xmlTextWriterPtr pWriter) const
// Base class for all fields. // Base class for all fields.
// A field (multiple can exist) references a field type (can exists only once) // A field (multiple can exist) references a field type (can exists only once)
SwField::SwField( SwField::SwField(
SwFieldType* pTyp, SwFieldType* pType,
sal_uInt32 nFmt, sal_uInt32 nFormat,
sal_uInt16 nLng, sal_uInt16 nLang,
bool bUseFieldValueCache ) bool bUseFieldValueCache)
: m_Cache() : m_Cache()
, m_bUseFieldValueCache( bUseFieldValueCache ) , m_bUseFieldValueCache( bUseFieldValueCache )
, nLang( nLng ) , m_nLang( nLang )
, bIsAutomaticLanguage( true ) , m_bIsAutomaticLanguage( true )
, nFormat( nFmt ) , m_nFormat( nFormat )
, pType( pTyp ) , m_pType( pType )
{ {
OSL_ENSURE( pTyp, "SwField: no SwFieldType" ); OSL_ENSURE( pType, "SwField: no SwFieldType" );
} }
SwField::~SwField() SwField::~SwField()
...@@ -210,8 +210,8 @@ SwField::~SwField() ...@@ -210,8 +210,8 @@ SwField::~SwField()
#ifdef DBG_UTIL #ifdef DBG_UTIL
sal_uInt16 SwField::Which() const sal_uInt16 SwField::Which() const
{ {
OSL_ENSURE(pType, "SwField: No FieldType"); OSL_ENSURE(m_pType, "SwField: No FieldType");
return pType->Which(); return m_pType->Which();
} }
#endif #endif
...@@ -219,7 +219,7 @@ sal_uInt16 SwField::GetTypeId() const ...@@ -219,7 +219,7 @@ sal_uInt16 SwField::GetTypeId() const
{ {
sal_uInt16 nRet; sal_uInt16 nRet;
switch( pType->Which() ) switch (m_pType->Which())
{ {
case RES_DATETIMEFLD: case RES_DATETIMEFLD:
if (GetSubType() & FIXEDFLD) if (GetSubType() & FIXEDFLD)
...@@ -255,7 +255,7 @@ sal_uInt16 SwField::GetTypeId() const ...@@ -255,7 +255,7 @@ sal_uInt16 SwField::GetTypeId() const
break; break;
default: default:
nRet = aTypeTab[ pType->Which() ]; nRet = aTypeTab[ m_pType->Which() ];
} }
return nRet; return nRet;
} }
...@@ -312,7 +312,7 @@ bool SwField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const ...@@ -312,7 +312,7 @@ bool SwField::QueryValue( uno::Any& rVal, sal_uInt16 nWhichId ) const
switch( nWhichId ) switch( nWhichId )
{ {
case FIELD_PROP_BOOL4: case FIELD_PROP_BOOL4:
rVal <<= !bIsAutomaticLanguage; rVal <<= !m_bIsAutomaticLanguage;
break; break;
default: default:
OSL_FAIL("illegal property"); OSL_FAIL("illegal property");
...@@ -328,7 +328,7 @@ bool SwField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId ) ...@@ -328,7 +328,7 @@ bool SwField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
{ {
bool bFixed = false; bool bFixed = false;
if(rVal >>= bFixed) if(rVal >>= bFixed)
bIsAutomaticLanguage = !bFixed; m_bIsAutomaticLanguage = !bFixed;
} }
break; break;
default: default:
...@@ -346,11 +346,11 @@ bool SwField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId ) ...@@ -346,11 +346,11 @@ bool SwField::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId )
*/ */
SwFieldType* SwField::ChgTyp( SwFieldType* pNewType ) SwFieldType* SwField::ChgTyp( SwFieldType* pNewType )
{ {
OSL_ENSURE( pNewType && pNewType->Which() == pType->Which(), OSL_ENSURE( pNewType && pNewType->Which() == m_pType->Which(),
"no or different type" ); "no or different type" );
SwFieldType* pOld = pType; SwFieldType* pOld = m_pType;
pType = pNewType; m_pType = pNewType;
return pOld; return pOld;
} }
...@@ -358,7 +358,7 @@ SwFieldType* SwField::ChgTyp( SwFieldType* pNewType ) ...@@ -358,7 +358,7 @@ SwFieldType* SwField::ChgTyp( SwFieldType* pNewType )
bool SwField::HasClickHdl() const bool SwField::HasClickHdl() const
{ {
bool bRet = false; bool bRet = false;
switch( pType->Which() ) switch (m_pType->Which())
{ {
case RES_INTERNETFLD: case RES_INTERNETFLD:
case RES_JUMPEDITFLD: case RES_JUMPEDITFLD:
...@@ -376,20 +376,20 @@ bool SwField::HasClickHdl() const ...@@ -376,20 +376,20 @@ bool SwField::HasClickHdl() const
return bRet; return bRet;
} }
void SwField::SetLanguage(sal_uInt16 nLng) void SwField::SetLanguage(sal_uInt16 const nLang)
{ {
nLang = nLng; m_nLang = nLang;
} }
void SwField::ChangeFormat(sal_uInt32 n) void SwField::ChangeFormat(sal_uInt32 const nFormat)
{ {
nFormat = n; m_nFormat = nFormat;
} }
bool SwField::IsFixed() const bool SwField::IsFixed() const
{ {
bool bRet = false; bool bRet = false;
switch( pType->Which() ) switch (m_pType->Which())
{ {
case RES_FIXDATEFLD: case RES_FIXDATEFLD:
case RES_FIXTIMEFLD: case RES_FIXTIMEFLD:
......
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