[Libreoffice-commits] core.git: sw/inc sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Oct 1 14:55:35 UTC 2018
sw/inc/expfld.hxx | 62 +++++++++++++++---------------
sw/source/core/fields/expfld.cxx | 80 +++++++++++++++++++--------------------
2 files changed, 71 insertions(+), 71 deletions(-)
New commits:
commit 72f30d79bc58a1f3bc52d2ce01708765f1326416
Author: Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Mon Oct 1 09:06:38 2018 +0200
Commit: Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Mon Oct 1 16:55:14 2018 +0200
sw: prefix members of SwSetExpField / SwSetExpFieldType
Change-Id: I63327930ba5b082bcd82fa107b6c9c73b3b6e627
Reviewed-on: https://gerrit.libreoffice.org/61175
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index b438d80c9896..3081423d3627 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -144,12 +144,12 @@ class SwSetExpField;
class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType
{
- OUString sName;
- const SwNode* pOutlChgNd;
- OUString sDelim;
- sal_uInt16 nType;
- sal_uInt8 nLevel;
- bool bDeleted;
+ OUString m_sName;
+ const SwNode* m_pOutlChgNd;
+ OUString m_sDelim;
+ sal_uInt16 m_nType;
+ sal_uInt8 m_nLevel;
+ bool m_bDeleted;
protected:
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) override;
@@ -166,8 +166,8 @@ public:
void SetSeqFormat(sal_uLong nFormat);
sal_uLong GetSeqFormat();
- bool IsDeleted() const { return bDeleted; }
- void SetDeleted( bool b ) { bDeleted = b; }
+ bool IsDeleted() const { return m_bDeleted; }
+ void SetDeleted( bool b ) { m_bDeleted = b; }
/// Overlay, because set-field takes care for its being updated by itself.
inline const OUString& GetSetRefName() const;
@@ -177,16 +177,16 @@ public:
size_t GetSeqFieldList( SwSeqFieldList& rList );
/// Number sequence fields chapterwise if required.
- const OUString& GetDelimiter() const { return sDelim; }
- void SetDelimiter( const OUString& s ) { sDelim = s; }
- sal_uInt8 GetOutlineLvl() const { return nLevel; }
- void SetOutlineLvl( sal_uInt8 n ) { nLevel = n; }
+ const OUString& GetDelimiter() const { return m_sDelim; }
+ void SetDelimiter( const OUString& s ) { m_sDelim = s; }
+ sal_uInt8 GetOutlineLvl() const { return m_nLevel; }
+ void SetOutlineLvl( sal_uInt8 n ) { m_nLevel = n; }
void SetChapter( SwSetExpField& rField, const SwNode& rNd );
/** Member only for SwDoc::UpdateExpField.
It is needed only at runtime of sequence field types! */
- const SwNode* GetOutlineChgNd() const { return pOutlChgNd; }
- void SetOutlineChgNd( const SwNode* p ) { pOutlChgNd = p; }
+ const SwNode* GetOutlineChgNd() const { return m_pOutlChgNd; }
+ void SetOutlineChgNd( const SwNode* p ) { m_pOutlChgNd = p; }
virtual void QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
virtual void PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
@@ -194,23 +194,23 @@ public:
inline void SwSetExpFieldType::SetType( sal_uInt16 nTyp )
{
- nType = nTyp;
- EnableFormat( !(nType & (nsSwGetSetExpType::GSE_SEQ|nsSwGetSetExpType::GSE_STRING)));
+ m_nType = nTyp;
+ EnableFormat( !(m_nType & (nsSwGetSetExpType::GSE_SEQ|nsSwGetSetExpType::GSE_STRING)));
}
inline sal_uInt16 SwSetExpFieldType::GetType() const
- { return nType; }
+ { return m_nType; }
inline const OUString& SwSetExpFieldType::GetSetRefName() const
- { return sName; }
+ { return m_sName; }
class SW_DLLPUBLIC SwSetExpField : public SwFormulaField
{
- OUString sExpand;
- OUString aPText;
- bool bInput;
- sal_uInt16 nSeqNo;
- sal_uInt16 nSubType;
+ OUString msExpand;
+ OUString maPText;
+ bool mbInput;
+ sal_uInt16 mnSeqNo;
+ sal_uInt16 mnSubType;
SwFormatField * mpFormatField; /// pool item to which the SwSetExpField belongs
virtual OUString Expand() const override;
@@ -242,8 +242,8 @@ public:
inline bool IsSequenceField() const;
/// Logical number, sequence fields.
- void SetSeqNumber( sal_uInt16 n ) { nSeqNo = n; }
- sal_uInt16 GetSeqNumber() const { return nSeqNo; }
+ void SetSeqNumber( sal_uInt16 n ) { mnSeqNo = n; }
+ sal_uInt16 GetSeqNumber() const { return mnSeqNo; }
/// Query name only.
virtual OUString GetPar1() const override;
@@ -256,22 +256,22 @@ public:
};
inline const OUString& SwSetExpField::GetExpStr() const
- { return sExpand; }
+ { return msExpand; }
inline void SwSetExpField::ChgExpStr( const OUString& rExpand )
- { sExpand = rExpand; }
+ { msExpand = rExpand; }
inline void SwSetExpField::SetPromptText(const OUString& rStr)
- { aPText = rStr; }
+ { maPText = rStr; }
inline const OUString& SwSetExpField::GetPromptText() const
- { return aPText; }
+ { return maPText; }
inline void SwSetExpField::SetInputFlag(bool bInp)
- { bInput = bInp; }
+ { mbInput = bInp; }
inline bool SwSetExpField::GetInputFlag() const
- { return bInput; }
+ { return mbInput; }
inline bool SwSetExpField::IsSequenceField() const
{ return 0 != (nsSwGetSetExpType::GSE_SEQ & static_cast<SwSetExpFieldType*>(GetTyp())->GetType()); }
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 9d68652b0573..ec9318e82134 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -489,29 +489,29 @@ bool SwGetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
SwSetExpFieldType::SwSetExpFieldType( SwDoc* pDc, const OUString& rName, sal_uInt16 nTyp )
: SwValueFieldType( pDc, SwFieldIds::SetExp ),
- sName( rName ),
- pOutlChgNd( nullptr ),
- sDelim( "." ),
- nType(nTyp), nLevel( UCHAR_MAX ),
- bDeleted( false )
+ m_sName( rName ),
+ m_pOutlChgNd( nullptr ),
+ m_sDelim( "." ),
+ m_nType(nTyp), m_nLevel( UCHAR_MAX ),
+ m_bDeleted( false )
{
- if( ( nsSwGetSetExpType::GSE_SEQ | nsSwGetSetExpType::GSE_STRING ) & nType )
+ if( ( nsSwGetSetExpType::GSE_SEQ | nsSwGetSetExpType::GSE_STRING ) & m_nType )
EnableFormat(false); // do not use Numberformatter
}
SwFieldType* SwSetExpFieldType::Copy() const
{
- SwSetExpFieldType* pNew = new SwSetExpFieldType(GetDoc(), sName, nType);
- pNew->bDeleted = bDeleted;
- pNew->sDelim = sDelim;
- pNew->nLevel = nLevel;
+ SwSetExpFieldType* pNew = new SwSetExpFieldType(GetDoc(), m_sName, m_nType);
+ pNew->m_bDeleted = m_bDeleted;
+ pNew->m_sDelim = m_sDelim;
+ pNew->m_nLevel = m_nLevel;
return pNew;
}
OUString SwSetExpFieldType::GetName() const
{
- return sName;
+ return m_sName;
}
void SwSetExpFieldType::Modify( const SfxPoolItem*, const SfxPoolItem* )
@@ -537,7 +537,7 @@ sal_uLong SwSetExpFieldType::GetSeqFormat()
void SwSetExpFieldType::SetSeqRefNo( SwSetExpField& rField )
{
- if( !HasWriterListeners() || !(nsSwGetSetExpType::GSE_SEQ & nType) )
+ if( !HasWriterListeners() || !(nsSwGetSetExpType::GSE_SEQ & m_nType) )
return;
std::vector<sal_uInt16> aArr;
@@ -607,7 +607,7 @@ size_t SwSetExpFieldType::GetSeqFieldList( SwSeqFieldList& rList )
void SwSetExpFieldType::SetChapter( SwSetExpField& rField, const SwNode& rNd )
{
- const SwTextNode* pTextNd = rNd.FindOutlineNodeOfLevel( nLevel );
+ const SwTextNode* pTextNd = rNd.FindOutlineNodeOfLevel( m_nLevel );
if( pTextNd )
{
SwNumRule * pRule = pTextNd->GetNumRule();
@@ -623,7 +623,7 @@ void SwSetExpFieldType::SetChapter( SwSetExpField& rField, const SwNode& rNd )
OUString sNumber( pRule->MakeNumString(aNum, false ));
if( !sNumber.isEmpty() )
- rField.ChgExpStr( sNumber + sDelim + rField.GetExpStr() );
+ rField.ChgExpStr( sNumber + m_sDelim + rField.GetExpStr() );
}
else
{
@@ -648,7 +648,7 @@ void SwSetExpFieldType::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
break;
case FIELD_PROP_SHORT1:
{
- sal_Int8 nRet = nLevel < MAXLEVEL? nLevel : -1;
+ sal_Int8 nRet = m_nLevel < MAXLEVEL? m_nLevel : -1;
rAny <<= nRet;
}
break;
@@ -774,13 +774,13 @@ bool SwSeqFieldList::SeekEntry( const SeqFieldLstElem& rNew, size_t* pP ) const
SwSetExpField::SwSetExpField(SwSetExpFieldType* pTyp, const OUString& rFormel,
sal_uLong nFormat)
- : SwFormulaField( pTyp, nFormat, 0.0 ), nSeqNo( USHRT_MAX ),
- nSubType(0)
+ : SwFormulaField( pTyp, nFormat, 0.0 ), mnSeqNo( USHRT_MAX ),
+ mnSubType(0)
, mpFormatField(nullptr)
{
SetFormula(rFormel);
// ignore SubType
- bInput = false;
+ mbInput = false;
if( IsSequenceField() )
{
SwValueField::SetValue(1.0);
@@ -798,13 +798,13 @@ void SwSetExpField::SetFormatField(SwFormatField & rFormatField)
OUString SwSetExpField::Expand() const
{
- if (nSubType & nsSwExtendedSubType::SUB_CMD)
+ if (mnSubType & nsSwExtendedSubType::SUB_CMD)
{ // we need the CommandString
return GetTyp()->GetName() + " = " + GetFormula();
}
- if(!(nSubType & nsSwExtendedSubType::SUB_INVISIBLE))
+ if(!(mnSubType & nsSwExtendedSubType::SUB_INVISIBLE))
{ // value is visible
- return sExpand;
+ return msExpand;
}
return OUString();
}
@@ -814,7 +814,7 @@ OUString SwSetExpField::GetFieldName() const
{
SwFieldTypesEnum const nStrType( (IsSequenceField())
? TYP_SEQFLD
- : (bInput)
+ : (mbInput)
? TYP_SETINPFLD
: TYP_SETFLD );
@@ -836,12 +836,12 @@ std::unique_ptr<SwField> SwSetExpField::Copy() const
std::unique_ptr<SwSetExpField> pTmp(new SwSetExpField(static_cast<SwSetExpFieldType*>(GetTyp()),
GetFormula(), GetFormat()));
pTmp->SwValueField::SetValue(GetValue());
- pTmp->sExpand = sExpand;
+ pTmp->msExpand = msExpand;
pTmp->SetAutomaticLanguage(IsAutomaticLanguage());
pTmp->SetLanguage(GetLanguage());
- pTmp->aPText = aPText;
- pTmp->bInput = bInput;
- pTmp->nSeqNo = nSeqNo;
+ pTmp->maPText = maPText;
+ pTmp->mbInput = mbInput;
+ pTmp->mnSeqNo = mnSeqNo;
pTmp->SetSubType(GetSubType());
return std::unique_ptr<SwField>(pTmp.release());
@@ -850,14 +850,14 @@ std::unique_ptr<SwField> SwSetExpField::Copy() const
void SwSetExpField::SetSubType(sal_uInt16 nSub)
{
static_cast<SwSetExpFieldType*>(GetTyp())->SetType(nSub & 0xff);
- nSubType = nSub & 0xff00;
+ mnSubType = nSub & 0xff00;
OSL_ENSURE( (nSub & 0xff) != 3, "SubType is illegal!" );
}
sal_uInt16 SwSetExpField::GetSubType() const
{
- return static_cast<SwSetExpFieldType*>(GetTyp())->GetType() | nSubType;
+ return static_cast<SwSetExpFieldType*>(GetTyp())->GetType() | mnSubType;
}
void SwSetExpField::SetValue( const double& rAny )
@@ -865,9 +865,9 @@ void SwSetExpField::SetValue( const double& rAny )
SwValueField::SetValue(rAny);
if( IsSequenceField() )
- sExpand = FormatNumber( GetValue(), static_cast<SvxNumType>(GetFormat()), GetLanguage() );
+ msExpand = FormatNumber( GetValue(), static_cast<SvxNumType>(GetFormat()), GetLanguage() );
else
- sExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue( rAny,
+ msExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue( rAny,
GetFormat(), GetLanguage());
}
@@ -975,9 +975,9 @@ bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
{
case FIELD_PROP_BOOL2:
if(*o3tl::doAccess<bool>(rAny))
- nSubType &= ~nsSwExtendedSubType::SUB_INVISIBLE;
+ mnSubType &= ~nsSwExtendedSubType::SUB_INVISIBLE;
else
- nSubType |= nsSwExtendedSubType::SUB_INVISIBLE;
+ mnSubType |= nsSwExtendedSubType::SUB_INVISIBLE;
break;
case FIELD_PROP_FORMAT:
rAny >>= nTmp32;
@@ -996,7 +996,7 @@ bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
break;
case FIELD_PROP_USHORT1:
rAny >>= nTmp16;
- nSeqNo = nTmp16;
+ mnSeqNo = nTmp16;
break;
case FIELD_PROP_PAR1:
{
@@ -1029,13 +1029,13 @@ bool SwSetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
SetSubType(static_cast<sal_uInt16>((GetSubType() & 0xff00) | nTmp32));
break;
case FIELD_PROP_PAR3:
- rAny >>= aPText;
+ rAny >>= maPText;
break;
case FIELD_PROP_BOOL3:
if(*o3tl::doAccess<bool>(rAny))
- nSubType |= nsSwExtendedSubType::SUB_CMD;
+ mnSubType |= nsSwExtendedSubType::SUB_CMD;
else
- nSubType &= (~nsSwExtendedSubType::SUB_CMD);
+ mnSubType &= (~nsSwExtendedSubType::SUB_CMD);
break;
case FIELD_PROP_BOOL1:
SetInputFlag(*o3tl::doAccess<bool>(rAny));
@@ -1058,7 +1058,7 @@ bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
switch( nWhichId )
{
case FIELD_PROP_BOOL2:
- rAny <<= 0 == (nSubType & nsSwExtendedSubType::SUB_INVISIBLE);
+ rAny <<= 0 == (mnSubType & nsSwExtendedSubType::SUB_INVISIBLE);
break;
case FIELD_PROP_FORMAT:
rAny <<= static_cast<sal_Int32>(GetFormat());
@@ -1067,7 +1067,7 @@ bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
rAny <<= static_cast<sal_Int16>(GetFormat());
break;
case FIELD_PROP_USHORT1:
- rAny <<= static_cast<sal_Int16>(nSeqNo);
+ rAny <<= static_cast<sal_Int16>(mnSeqNo);
break;
case FIELD_PROP_PAR1:
rAny <<= SwStyleNameMapper::GetProgName(GetPar1(), SwGetPoolIdFromName::TxtColl );
@@ -1092,10 +1092,10 @@ bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
}
break;
case FIELD_PROP_PAR3:
- rAny <<= aPText;
+ rAny <<= maPText;
break;
case FIELD_PROP_BOOL3:
- rAny <<= 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
+ rAny <<= 0 != (mnSubType & nsSwExtendedSubType::SUB_CMD);
break;
case FIELD_PROP_BOOL1:
rAny <<= GetInputFlag();
More information about the Libreoffice-commits
mailing list