[Libreoffice-commits] core.git: sw/inc sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Feb 4 08:58:18 UTC 2019
sw/inc/dbfld.hxx | 38 +++++++--------
sw/source/core/fields/dbfld.cxx | 96 ++++++++++++++++++++--------------------
2 files changed, 67 insertions(+), 67 deletions(-)
New commits:
commit 162cc2aa04191a87ac97c1ad26400b4f06a39c25
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Feb 4 09:07:01 2019 +0100
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Feb 4 09:57:54 2019 +0100
sw: prefix members of SwDBField
Change-Id: Iac023ddcedce9030dcbfffcf8224d8e6e1402579
Reviewed-on: https://gerrit.libreoffice.org/67341
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Jenkins
diff --git a/sw/inc/dbfld.hxx b/sw/inc/dbfld.hxx
index 9d83bed743d8..4488bc71542a 100644
--- a/sw/inc/dbfld.hxx
+++ b/sw/inc/dbfld.hxx
@@ -28,10 +28,10 @@ class SwDoc;
// Database field.
class SW_DLLPUBLIC SwDBFieldType : public SwValueFieldType
{
- SwDBData aDBData;
- OUString sName; ///< only used in ::GetName() !
- OUString sColumn;
- long nRefCnt;
+ SwDBData m_aDBData;
+ OUString m_sName; ///< only used in ::GetName() !
+ OUString m_sColumn;
+ long m_nRefCnt;
public:
@@ -41,11 +41,11 @@ public:
virtual OUString GetName() const override;
virtual SwFieldType* Copy() const override;
- void AddRef() { nRefCnt++; }
+ void AddRef() { m_nRefCnt++; }
void ReleaseRef();
- const OUString& GetColumnName() const {return sColumn;}
- const SwDBData& GetDBData() const {return aDBData;}
+ const OUString& GetColumnName() const {return m_sColumn;}
+ const SwDBData& GetDBData() const {return m_aDBData;}
virtual void QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
virtual void PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
@@ -55,12 +55,12 @@ public:
// Content is formatted according to the format (if available).
class SW_DLLPUBLIC SwDBField : public SwValueField
{
- OUString aContent;
- OUString sFieldCode; ///< contains Word's field code
- sal_uInt16 nSubType;
- bool bIsInBodyText : 1;
- bool bValidValue : 1;
- bool bInitialized : 1;
+ OUString m_aContent;
+ OUString m_sFieldCode; ///< contains Word's field code
+ sal_uInt16 m_nSubType;
+ bool m_bIsInBodyText : 1;
+ bool m_bValidValue : 1;
+ bool m_bInitialized : 1;
virtual OUString ExpandImpl(SwRootFrame const* pLayout) const override;
virtual std::unique_ptr<SwField> Copy() const override;
@@ -91,15 +91,15 @@ public:
inline void ChgBodyTextFlag( bool bIsInBody );
- bool IsInitialized() const { return bInitialized; }
- void ClearInitialized() { bInitialized = false; }
- void SetInitialized() { bInitialized = true; }
+ bool IsInitialized() const { return m_bInitialized; }
+ void ClearInitialized() { m_bInitialized = false; }
+ void SetInitialized() { m_bInitialized = true; }
/// Get name.
virtual OUString GetPar1() const override;
/// access to the command string
- void SetFieldCode(const OUString& rStr) { sFieldCode = rStr; }
+ void SetFieldCode(const OUString& rStr) { m_sFieldCode = rStr; }
/// DBName
const SwDBData& GetDBData() const { return static_cast<SwDBFieldType*>(GetTyp())->GetDBData(); }
@@ -111,11 +111,11 @@ public:
};
inline void SwDBField::SetExpansion(const OUString& rStr)
- { aContent = rStr; }
+ { m_aContent = rStr; }
/// set from UpdateExpFields (the Node-Position is known there)
inline void SwDBField::ChgBodyTextFlag( bool bIsInBody )
- { bIsInBodyText = bIsInBody; }
+ { m_bIsInBodyText = bIsInBody; }
// Base class for all other database fields.
class SW_DLLPUBLIC SwDBNameInfField : public SwField
diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx
index 5078201b9d6d..396ccba6d332 100644
--- a/sw/source/core/fields/dbfld.cxx
+++ b/sw/source/core/fields/dbfld.cxx
@@ -54,18 +54,18 @@ static OUString lcl_DBSeparatorConvert(const OUString& aContent)
SwDBFieldType::SwDBFieldType(SwDoc* pDocPtr, const OUString& rNam, const SwDBData& rDBData ) :
SwValueFieldType( pDocPtr, SwFieldIds::Database ),
- aDBData(rDBData),
- sName(rNam),
- sColumn(rNam),
- nRefCnt(0)
+ m_aDBData(rDBData),
+ m_sName(rNam),
+ m_sColumn(rNam),
+ m_nRefCnt(0)
{
- if(!aDBData.sDataSource.isEmpty() || !aDBData.sCommand.isEmpty())
+ if(!m_aDBData.sDataSource.isEmpty() || !m_aDBData.sCommand.isEmpty())
{
- sName = aDBData.sDataSource
+ m_sName = m_aDBData.sDataSource
+ OUStringLiteral1(DB_DELIM)
- + aDBData.sCommand
+ + m_aDBData.sCommand
+ OUStringLiteral1(DB_DELIM)
- + sName;
+ + m_sName;
}
}
@@ -75,20 +75,20 @@ SwDBFieldType::~SwDBFieldType()
SwFieldType* SwDBFieldType::Copy() const
{
- SwDBFieldType* pTmp = new SwDBFieldType(GetDoc(), sColumn, aDBData);
+ SwDBFieldType* pTmp = new SwDBFieldType(GetDoc(), m_sColumn, m_aDBData);
return pTmp;
}
OUString SwDBFieldType::GetName() const
{
- return sName;
+ return m_sName;
}
void SwDBFieldType::ReleaseRef()
{
- OSL_ENSURE(nRefCnt > 0, "RefCount < 0!");
+ OSL_ENSURE(m_nRefCnt > 0, "RefCount < 0!");
- if (--nRefCnt <= 0)
+ if (--m_nRefCnt <= 0)
{
size_t nPos = GetDoc()->getIDocumentFieldsAccess().GetFieldTypes()->GetPos(this);
@@ -105,16 +105,16 @@ void SwDBFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
switch( nWhichId )
{
case FIELD_PROP_PAR1:
- rAny <<= aDBData.sDataSource;
+ rAny <<= m_aDBData.sDataSource;
break;
case FIELD_PROP_PAR2:
- rAny <<= aDBData.sCommand;
+ rAny <<= m_aDBData.sCommand;
break;
case FIELD_PROP_PAR3:
- rAny <<= sColumn;
+ rAny <<= m_sColumn;
break;
case FIELD_PROP_SHORT1:
- rAny <<= aDBData.nCommandType;
+ rAny <<= m_aDBData.nCommandType;
break;
default:
assert(false);
@@ -126,18 +126,18 @@ void SwDBFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
switch( nWhichId )
{
case FIELD_PROP_PAR1:
- rAny >>= aDBData.sDataSource;
+ rAny >>= m_aDBData.sDataSource;
break;
case FIELD_PROP_PAR2:
- rAny >>= aDBData.sCommand;
+ rAny >>= m_aDBData.sCommand;
break;
case FIELD_PROP_PAR3:
{
OUString sTmp;
rAny >>= sTmp;
- if( sTmp != sColumn )
+ if( sTmp != m_sColumn )
{
- sColumn = sTmp;
+ m_sColumn = sTmp;
SwIterator<SwFormatField,SwFieldType> aIter( *this );
SwFormatField* pFormatField = aIter.First();
while(pFormatField)
@@ -156,7 +156,7 @@ void SwDBFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
}
break;
case FIELD_PROP_SHORT1:
- rAny >>= aDBData.nCommandType;
+ rAny >>= m_aDBData.nCommandType;
break;
default:
assert(false);
@@ -167,10 +167,10 @@ void SwDBFieldType::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
SwDBField::SwDBField(SwDBFieldType* pTyp, sal_uInt32 nFormat)
: SwValueField(pTyp, nFormat),
- nSubType(0),
- bIsInBodyText(true),
- bValidValue(false),
- bInitialized(false)
+ m_nSubType(0),
+ m_bIsInBodyText(true),
+ m_bValidValue(false),
+ m_bInitialized(false)
{
if (GetTyp())
static_cast<SwDBFieldType*>(GetTyp())->AddRef();
@@ -187,7 +187,7 @@ void SwDBField::InitContent()
{
if (!IsInitialized())
{
- aContent = "<" + static_cast<const SwDBFieldType*>(GetTyp())->GetColumnName() + ">";
+ m_aContent = "<" + static_cast<const SwDBFieldType*>(GetTyp())->GetColumnName() + ">";
}
}
@@ -209,20 +209,20 @@ void SwDBField::InitContent(const OUString& rExpansion)
OUString SwDBField::ExpandImpl(SwRootFrame const*const) const
{
if(0 ==(GetSubType() & nsSwExtendedSubType::SUB_INVISIBLE))
- return lcl_DBSeparatorConvert(aContent);
+ return lcl_DBSeparatorConvert(m_aContent);
return OUString();
}
std::unique_ptr<SwField> SwDBField::Copy() const
{
std::unique_ptr<SwDBField> pTmp(new SwDBField(static_cast<SwDBFieldType*>(GetTyp()), GetFormat()));
- pTmp->aContent = aContent;
- pTmp->bIsInBodyText = bIsInBodyText;
- pTmp->bValidValue = bValidValue;
- pTmp->bInitialized = bInitialized;
- pTmp->nSubType = nSubType;
+ pTmp->m_aContent = m_aContent;
+ pTmp->m_bIsInBodyText = m_bIsInBodyText;
+ pTmp->m_bValidValue = m_bValidValue;
+ pTmp->m_bInitialized = m_bInitialized;
+ pTmp->m_nSubType = m_nSubType;
pTmp->SetValue(GetValue());
- pTmp->sFieldCode = sFieldCode;
+ pTmp->m_sFieldCode = m_sFieldCode;
return std::unique_ptr<SwField>(pTmp.release());
}
@@ -245,11 +245,11 @@ OUString SwDBField::GetFieldName() const
void SwDBField::ChgValue( double d, bool bVal )
{
- bValidValue = bVal;
+ m_bValidValue = bVal;
SetValue(d);
- if( bValidValue )
- aContent = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue(d, GetFormat(), GetLanguage());
+ if( m_bValidValue )
+ m_aContent = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue(d, GetFormat(), GetLanguage());
}
SwFieldType* SwDBField::ChgTyp( SwFieldType* pNewType )
@@ -314,7 +314,7 @@ void SwDBField::Evaluate()
SwDBManager* pMgr = GetDoc()->GetDBManager();
// first delete
- bValidValue = false;
+ m_bValidValue = false;
double nValue = DBL_MAX;
const SwDBData& aTmpData = GetDBData();
@@ -327,8 +327,8 @@ void SwDBField::Evaluate()
OUString aColNm( static_cast<SwDBFieldType*>(GetTyp())->GetColumnName() );
SvNumberFormatter* pDocFormatter = GetDoc()->GetNumberFormatter();
- pMgr->GetMergeColumnCnt(aColNm, GetLanguage(), aContent, &nValue);
- if( !( nSubType & nsSwExtendedSubType::SUB_OWN_FMT ) )
+ pMgr->GetMergeColumnCnt(aColNm, GetLanguage(), m_aContent, &nValue);
+ if( !( m_nSubType & nsSwExtendedSubType::SUB_OWN_FMT ) )
{
nFormat = pMgr->GetColumnFormat( aTmpData.sDataSource, aTmpData.sCommand,
aColNm, pDocFormatter, GetLanguage() );
@@ -339,12 +339,12 @@ void SwDBField::Evaluate()
? 0
: pMgr->GetColumnType(aTmpData.sDataSource, aTmpData.sCommand, aColNm);
- bValidValue = FormatValue( pDocFormatter, aContent, nFormat, nValue, nColumnType, this );
+ m_bValidValue = FormatValue( pDocFormatter, m_aContent, nFormat, nValue, nColumnType, this );
if( DBL_MAX != nValue )
- aContent = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue(nValue, GetFormat(), GetLanguage());
+ m_aContent = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue(nValue, GetFormat(), GetLanguage());
- bInitialized = true;
+ m_bInitialized = true;
}
/// get name
@@ -355,12 +355,12 @@ OUString SwDBField::GetPar1() const
sal_uInt16 SwDBField::GetSubType() const
{
- return nSubType;
+ return m_nSubType;
}
void SwDBField::SetSubType(sal_uInt16 nType)
{
- nSubType = nType;
+ m_nSubType = nType;
}
bool SwDBField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
@@ -377,10 +377,10 @@ bool SwDBField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
rAny <<= static_cast<sal_Int32>(GetFormat());
break;
case FIELD_PROP_PAR1:
- rAny <<= aContent;
+ rAny <<= m_aContent;
break;
case FIELD_PROP_PAR2:
- rAny <<= sFieldCode;
+ rAny <<= m_sFieldCode;
break;
default:
OSL_FAIL("illegal property");
@@ -436,10 +436,10 @@ bool SwDBField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
}
break;
case FIELD_PROP_PAR1:
- rAny >>= aContent;
+ rAny >>= m_aContent;
break;
case FIELD_PROP_PAR2:
- rAny >>= sFieldCode;
+ rAny >>= m_sFieldCode;
break;
default:
OSL_FAIL("illegal property");
More information about the Libreoffice-commits
mailing list