[Libreoffice-commits] core.git: sw/inc sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Jul 25 08:06:43 UTC 2018
sw/inc/expfld.hxx | 16 ++--
sw/inc/reffld.hxx | 22 +++---
sw/source/core/fields/expfld.cxx | 50 +++++++-------
sw/source/core/fields/reffld.cxx | 134 +++++++++++++++++++--------------------
4 files changed, 111 insertions(+), 111 deletions(-)
New commits:
commit 921f285c7ff713ad219d3e3385d7e7d12d33581e
Author: Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Wed Jul 25 09:07:32 2018 +0200
Commit: Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Wed Jul 25 10:06:18 2018 +0200
sw: prefix members of SwGetExpField and SwGetRefField
Change-Id: I703357694eb2f880fa9cc5240fcc5610bd34e924
Reviewed-on: https://gerrit.libreoffice.org/57950
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 952e7fcc5402..ecdba62d7c9c 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -85,11 +85,11 @@ protected:
class SW_DLLPUBLIC SwGetExpField : public SwFormulaField
{
- OUString sExpand;
- bool bIsInBodyText;
- sal_uInt16 nSubType;
+ OUString m_sExpand;
+ bool m_bIsInBodyText;
+ sal_uInt16 m_nSubType;
- bool bLateInitialization; // #i82544#
+ bool m_bLateInitialization; // #i82544#
virtual OUString Expand() const override;
virtual std::unique_ptr<SwField> Copy() const override;
@@ -126,19 +126,19 @@ public:
static sal_Int32 GetReferenceTextPos( const SwFormatField& rFormat, SwDoc& rDoc, sal_Int32 nHint = 0);
// #i82544#
- void SetLateInitialization() { bLateInitialization = true;}
+ void SetLateInitialization() { m_bLateInitialization = true;}
};
inline void SwGetExpField::ChgExpStr(const OUString& rExpand)
- { sExpand = rExpand;}
+ { m_sExpand = rExpand;}
/// Called by formatting.
inline bool SwGetExpField::IsInBodyText() const
- { return bIsInBodyText; }
+ { return m_bIsInBodyText; }
/// Set by UpdateExpFields where node position is known.
inline void SwGetExpField::ChgBodyTextFlag( bool bIsInBody )
- { bIsInBodyText = bIsInBody; }
+ { m_bIsInBodyText = bIsInBody; }
class SwSetExpField;
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
index 45ce7ddbc11c..a3764451f5a4 100644
--- a/sw/inc/reffld.hxx
+++ b/sw/inc/reffld.hxx
@@ -61,7 +61,7 @@ enum REFERENCEMARK
class SwGetRefFieldType : public SwFieldType
{
- SwDoc* pDoc;
+ SwDoc* m_pDoc;
protected:
/// Overlay in order to update all ref-fields.
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* ) override;
@@ -69,7 +69,7 @@ public:
SwGetRefFieldType(SwDoc* pDoc );
virtual SwFieldType* Copy() const override;
- SwDoc* GetDoc() const { return pDoc; }
+ SwDoc* GetDoc() const { return m_pDoc; }
void MergeWithOtherDoc( SwDoc& rDestDoc );
@@ -81,11 +81,11 @@ public:
class SW_DLLPUBLIC SwGetRefField : public SwField
{
private:
- OUString sSetRefName;
- OUString sSetReferenceLanguage;
- OUString sText;
- sal_uInt16 nSubType;
- sal_uInt16 nSeqNo;
+ OUString m_sSetRefName;
+ OUString m_sSetReferenceLanguage;
+ OUString m_sText;
+ sal_uInt16 m_nSubType;
+ sal_uInt16 m_nSeqNo;
virtual OUString Expand() const override;
virtual std::unique_ptr<SwField> Copy() const override;
@@ -103,7 +103,7 @@ public:
virtual OUString GetFieldName() const override;
- const OUString& GetSetRefName() const { return sSetRefName; }
+ const OUString& GetSetRefName() const { return m_sSetRefName; }
// #i81002#
/** The <SwTextField> instance, which represents the text attribute for the
@@ -114,7 +114,7 @@ public:
no update for these reference format types. */
void UpdateField( const SwTextField* pFieldTextAttr );
- void SetExpand( const OUString& rStr ) { sText = rStr; }
+ void SetExpand( const OUString& rStr ) { m_sText = rStr; }
/// Get/set sub type.
virtual sal_uInt16 GetSubType() const override;
@@ -128,8 +128,8 @@ public:
OUString GetExpandedTextOfReferencedTextNode() const;
/// Get/set SequenceNo (of interest only for REF_SEQUENCEFLD).
- sal_uInt16 GetSeqNo() const { return nSeqNo; }
- void SetSeqNo( sal_uInt16 n ) { nSeqNo = n; }
+ sal_uInt16 GetSeqNo() const { return m_nSeqNo; }
+ void SetSeqNo( sal_uInt16 n ) { m_nSeqNo = n; }
// Name of reference.
virtual OUString GetPar1() const override;
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index e06bafe103be..96ccada206c2 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -284,25 +284,25 @@ void SwGetExpFieldType::Modify( const SfxPoolItem*, const SfxPoolItem* pNew )
SwGetExpField::SwGetExpField(SwGetExpFieldType* pTyp, const OUString& rFormel,
sal_uInt16 nSub, sal_uLong nFormat)
: SwFormulaField( pTyp, nFormat, 0.0 ),
- bIsInBodyText( true ),
- nSubType(nSub),
- bLateInitialization( false )
+ m_bIsInBodyText( true ),
+ m_nSubType(nSub),
+ m_bLateInitialization( false )
{
SetFormula( rFormel );
}
OUString SwGetExpField::Expand() const
{
- if(nSubType & nsSwExtendedSubType::SUB_CMD)
+ if(m_nSubType & nsSwExtendedSubType::SUB_CMD)
return GetFormula();
- return sExpand;
+ return m_sExpand;
}
OUString SwGetExpField::GetFieldName() const
{
const sal_uInt16 nType = static_cast<sal_uInt16>(
- (nsSwGetSetExpType::GSE_FORMULA & nSubType)
+ (nsSwGetSetExpType::GSE_FORMULA & m_nSubType)
? TYP_FORMELFLD
: TYP_GETFLD);
@@ -312,13 +312,13 @@ OUString SwGetExpField::GetFieldName() const
std::unique_ptr<SwField> SwGetExpField::Copy() const
{
std::unique_ptr<SwGetExpField> pTmp(new SwGetExpField(static_cast<SwGetExpFieldType*>(GetTyp()),
- GetFormula(), nSubType, GetFormat()));
+ GetFormula(), m_nSubType, GetFormat()));
pTmp->SetLanguage(GetLanguage());
pTmp->SwValueField::SetValue(GetValue());
- pTmp->sExpand = sExpand;
- pTmp->bIsInBodyText = bIsInBodyText;
+ pTmp->m_sExpand = m_sExpand;
+ pTmp->m_bIsInBodyText = m_bIsInBodyText;
pTmp->SetAutomaticLanguage(IsAutomaticLanguage());
- if( bLateInitialization )
+ if( m_bLateInitialization )
pTmp->SetLateInitialization();
return std::unique_ptr<SwField>(pTmp.release());
@@ -326,7 +326,7 @@ std::unique_ptr<SwField> SwGetExpField::Copy() const
void SwGetExpField::ChangeExpansion( const SwFrame& rFrame, const SwTextField& rField )
{
- if( bIsInBodyText ) // only fields in Footer, Header, FootNote, Flys
+ if( m_bIsInBodyText ) // only fields in Footer, Header, FootNote, Flys
return;
OSL_ENSURE( !rFrame.IsInDocBody(), "Flag incorrect, frame is in DocBody" );
@@ -344,12 +344,12 @@ void SwGetExpField::ChangeExpansion( const SwFrame& rFrame, const SwTextField& r
if(!pTextNode)
return;
// #i82544#
- if( bLateInitialization )
+ if( m_bLateInitialization )
{
SwFieldType* pSetExpField = rDoc.getIDocumentFieldsAccess().GetFieldType(SwFieldIds::SetExp, GetFormula(), false);
if( pSetExpField )
{
- bLateInitialization = false;
+ m_bLateInitialization = false;
if( !(GetSubType() & nsSwGetSetExpType::GSE_STRING) &&
static_cast< SwSetExpFieldType* >(pSetExpField)->GetType() == nsSwGetSetExpType::GSE_STRING )
SetSubType( nsSwGetSetExpType::GSE_STRING );
@@ -361,7 +361,7 @@ void SwGetExpField::ChangeExpansion( const SwFrame& rFrame, const SwTextField& r
{
SwHashTable<HashStr> aHashTable(0);
rDoc.getIDocumentFieldsAccess().FieldsToExpand( aHashTable, aEndField );
- sExpand = LookString( aHashTable, GetFormula() );
+ m_sExpand = LookString( aHashTable, GetFormula() );
}
else
{
@@ -373,7 +373,7 @@ void SwGetExpField::ChangeExpansion( const SwFrame& rFrame, const SwTextField& r
SetValue(aCalc.Calculate(GetFormula()).GetDouble());
// analyse based on format
- sExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue(
+ m_sExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue(
GetValue(), GetFormat(), GetLanguage());
}
}
@@ -390,17 +390,17 @@ void SwGetExpField::SetPar2(const OUString& rStr)
sal_uInt16 SwGetExpField::GetSubType() const
{
- return nSubType;
+ return m_nSubType;
}
void SwGetExpField::SetSubType(sal_uInt16 nType)
{
- nSubType = nType;
+ m_nSubType = nType;
}
void SwGetExpField::SetLanguage(LanguageType nLng)
{
- if (nSubType & nsSwExtendedSubType::SUB_CMD)
+ if (m_nSubType & nsSwExtendedSubType::SUB_CMD)
SwField::SetLanguage(nLng);
else
SwValueField::SetLanguage(nLng);
@@ -417,7 +417,7 @@ bool SwGetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
rAny <<= static_cast<sal_Int32>(GetFormat());
break;
case FIELD_PROP_USHORT1:
- rAny <<= static_cast<sal_Int16>(nSubType);
+ rAny <<= static_cast<sal_Int16>(m_nSubType);
break;
case FIELD_PROP_PAR1:
rAny <<= GetFormula();
@@ -429,10 +429,10 @@ bool SwGetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
}
break;
case FIELD_PROP_BOOL2:
- rAny <<= 0 != (nSubType & nsSwExtendedSubType::SUB_CMD);
+ rAny <<= 0 != (m_nSubType & nsSwExtendedSubType::SUB_CMD);
break;
case FIELD_PROP_PAR4:
- rAny <<= sExpand;
+ rAny <<= m_sExpand;
break;
default:
return SwField::QueryValue(rAny, nWhichId);
@@ -454,7 +454,7 @@ bool SwGetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
break;
case FIELD_PROP_USHORT1:
rAny >>= nTmp;
- nSubType = static_cast<sal_uInt16>(nTmp);
+ m_nSubType = static_cast<sal_uInt16>(nTmp);
break;
case FIELD_PROP_PAR1:
{
@@ -470,9 +470,9 @@ bool SwGetExpField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
break;
case FIELD_PROP_BOOL2:
if(*o3tl::doAccess<bool>(rAny))
- nSubType |= nsSwExtendedSubType::SUB_CMD;
+ m_nSubType |= nsSwExtendedSubType::SUB_CMD;
else
- nSubType &= (~nsSwExtendedSubType::SUB_CMD);
+ m_nSubType &= (~nsSwExtendedSubType::SUB_CMD);
break;
case FIELD_PROP_PAR4:
{
@@ -874,7 +874,7 @@ void SwSetExpField::SetValue( const double& rAny )
void SwGetExpField::SetValue( const double& rAny )
{
SwValueField::SetValue(rAny);
- sExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue( rAny, GetFormat(),
+ m_sExpand = static_cast<SwValueFieldType*>(GetTyp())->ExpandValue( rAny, GetFormat(),
GetLanguage());
}
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index da737a26d342..b7ad1cb81f33 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -343,10 +343,10 @@ SwGetRefField::SwGetRefField( SwGetRefFieldType* pFieldType,
const OUString& rSetRef, const OUString& rSetReferenceLanguage, sal_uInt16 nSubTyp,
sal_uInt16 nSequenceNo, sal_uLong nFormat )
: SwField( pFieldType, nFormat ),
- sSetRefName( rSetRef ),
- sSetReferenceLanguage( rSetReferenceLanguage ),
- nSubType( nSubTyp ),
- nSeqNo( nSequenceNo )
+ m_sSetRefName( rSetRef ),
+ m_sSetReferenceLanguage( rSetReferenceLanguage ),
+ m_nSubType( nSubTyp ),
+ m_nSeqNo( nSequenceNo )
{
}
@@ -361,25 +361,25 @@ OUString SwGetRefField::GetDescription() const
sal_uInt16 SwGetRefField::GetSubType() const
{
- return nSubType;
+ return m_nSubType;
}
void SwGetRefField::SetSubType( sal_uInt16 n )
{
- nSubType = n;
+ m_nSubType = n;
}
// #i81002#
bool SwGetRefField::IsRefToHeadingCrossRefBookmark() const
{
return GetSubType() == REF_BOOKMARK &&
- ::sw::mark::CrossRefHeadingBookmark::IsLegalName(sSetRefName);
+ ::sw::mark::CrossRefHeadingBookmark::IsLegalName(m_sSetRefName);
}
bool SwGetRefField::IsRefToNumItemCrossRefBookmark() const
{
return GetSubType() == REF_BOOKMARK &&
- ::sw::mark::CrossRefNumItemBookmark::IsLegalName(sSetRefName);
+ ::sw::mark::CrossRefNumItemBookmark::IsLegalName(m_sSetRefName);
}
const SwTextNode* SwGetRefField::GetReferencedTextNode() const
@@ -388,7 +388,7 @@ const SwTextNode* SwGetRefField::GetReferencedTextNode() const
if (!pTyp)
return nullptr;
sal_Int32 nDummy = -1;
- return SwGetRefFieldType::FindAnchor( pTyp->GetDoc(), sSetRefName, nSubType, nSeqNo, &nDummy );
+ return SwGetRefFieldType::FindAnchor( pTyp->GetDoc(), m_sSetRefName, m_nSubType, m_nSeqNo, &nDummy );
}
// #i85090#
@@ -402,15 +402,15 @@ OUString SwGetRefField::GetExpandedTextOfReferencedTextNode() const
OUString SwGetRefField::Expand() const
{
- return sText;
+ return m_sText;
}
OUString SwGetRefField::GetFieldName() const
{
const OUString aName = GetTyp()->GetName();
- if ( !aName.isEmpty() || !sSetRefName.isEmpty() )
+ if ( !aName.isEmpty() || !m_sSetRefName.isEmpty() )
{
- return aName + " " + sSetRefName;
+ return aName + " " + m_sSetRefName;
}
return Expand();
}
@@ -418,26 +418,26 @@ OUString SwGetRefField::GetFieldName() const
// #i81002# - parameter <pFieldTextAttr> added
void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr )
{
- sText.clear();
+ m_sText.clear();
SwDoc* pDoc = static_cast<SwGetRefFieldType*>(GetTyp())->GetDoc();
// finding the reference target (the number)
sal_Int32 nNumStart = -1;
sal_Int32 nNumEnd = -1;
SwTextNode* pTextNd = SwGetRefFieldType::FindAnchor(
- pDoc, sSetRefName, nSubType, nSeqNo, &nNumStart, &nNumEnd
+ pDoc, m_sSetRefName, m_nSubType, m_nSeqNo, &nNumStart, &nNumEnd
);
// not found?
if ( !pTextNd )
{
- sText = SwViewShell::GetShellRes()->aGetRefField_RefItemNotFound;
+ m_sText = SwViewShell::GetShellRes()->aGetRefField_RefItemNotFound;
return ;
}
// where is the category name (e.g. "Illustration")?
const OUString aText = pTextNd->GetText();
- const sal_Int32 nCatStart = aText.indexOf(sSetRefName);
+ const sal_Int32 nCatStart = aText.indexOf(m_sSetRefName);
const bool bHasCat = nCatStart>=0;
- const sal_Int32 nCatEnd = bHasCat ? nCatStart + sSetRefName.getLength() : -1;
+ const sal_Int32 nCatEnd = bHasCat ? nCatStart + m_sSetRefName.getLength() : -1;
// length of the referenced text
const sal_Int32 nLen = aText.getLength();
@@ -454,7 +454,7 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr )
sal_Int32 nStart;
sal_Int32 nEnd;
- switch( nSubType )
+ switch( m_nSubType )
{
case REF_SEQUENCEFLD:
@@ -520,11 +520,11 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr )
for( size_t i = 0; i < pDoc->GetFootnoteIdxs().size(); ++i )
{
SwTextFootnote* const pFootnoteIdx = pDoc->GetFootnoteIdxs()[i];
- if( nSeqNo == pFootnoteIdx->GetSeqRefNo() )
+ if( m_nSeqNo == pFootnoteIdx->GetSeqRefNo() )
{
- sText = pFootnoteIdx->GetFootnote().GetViewNumStr( *pDoc );
- if (!sSetReferenceLanguage.isEmpty())
- lcl_formatReferenceLanguage(sText, false, GetLanguage(), sSetReferenceLanguage);
+ m_sText = pFootnoteIdx->GetFootnote().GetViewNumStr( *pDoc );
+ if (!m_sSetReferenceLanguage.isEmpty())
+ lcl_formatReferenceLanguage(m_sText, false, GetLanguage(), m_sSetReferenceLanguage);
break;
}
}
@@ -538,13 +538,13 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr )
if( nStart != nEnd ) // a section?
{
- sText = pTextNd->GetExpandText( nStart, nEnd - nStart, false, false, false, false );
+ m_sText = pTextNd->GetExpandText( nStart, nEnd - nStart, false, false, false, false );
// remove all special characters (replace them with blanks)
- if( !sText.isEmpty() )
+ if( !m_sText.isEmpty() )
{
- sText = sText.replaceAll(OUStringLiteral1(0xad), "");
- OUStringBuffer aBuf(sText);
+ m_sText = m_sText.replaceAll(OUStringLiteral1(0xad), "");
+ OUStringBuffer aBuf(m_sText);
const sal_Int32 l = aBuf.getLength();
for (sal_Int32 i=0; i<l; ++i)
{
@@ -557,9 +557,9 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr )
aBuf[i]='-';
}
}
- sText = aBuf.makeStringAndClear();
- if (!sSetReferenceLanguage.isEmpty())
- lcl_formatReferenceLanguage(sText, false, GetLanguage(), sSetReferenceLanguage);
+ m_sText = aBuf.makeStringAndClear();
+ if (!m_sSetReferenceLanguage.isEmpty())
+ lcl_formatReferenceLanguage(m_sText, false, GetLanguage(), m_sSetReferenceLanguage);
}
}
}
@@ -584,12 +584,12 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr )
if( REF_PAGE_PGDESC == GetFormat() &&
nullptr != ( pPage = pFrame->FindPageFrame() ) &&
pPage->GetPageDesc() )
- sText = pPage->GetPageDesc()->GetNumType().GetNumStr( nPageNo );
+ m_sText = pPage->GetPageDesc()->GetNumType().GetNumStr( nPageNo );
else
- sText = OUString::number(nPageNo);
+ m_sText = OUString::number(nPageNo);
- if (!sSetReferenceLanguage.isEmpty())
- lcl_formatReferenceLanguage(sText, false, GetLanguage(), sSetReferenceLanguage);
+ if (!m_sSetReferenceLanguage.isEmpty())
+ lcl_formatReferenceLanguage(m_sText, false, GetLanguage(), m_sSetReferenceLanguage);
}
}
break;
@@ -604,10 +604,10 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr )
SwChapterField aField( &aFieldTyp, 0 );
aField.SetLevel( MAXLEVEL - 1 );
aField.ChangeExpansion( pFrame, pTextNd, true );
- sText = aField.GetNumber();
+ m_sText = aField.GetNumber();
- if (!sSetReferenceLanguage.isEmpty())
- lcl_formatReferenceLanguage(sText, false, GetLanguage(), sSetReferenceLanguage);
+ if (!m_sSetReferenceLanguage.isEmpty())
+ lcl_formatReferenceLanguage(m_sText, false, GetLanguage(), m_sSetReferenceLanguage);
}
}
@@ -626,19 +626,19 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr )
// first a "short" test - in case both are in the same node
if( pFieldTextAttr->GetpTextNode() == pTextNd )
{
- sText = nNumStart < pFieldTextAttr->GetStart()
+ m_sText = nNumStart < pFieldTextAttr->GetStart()
? aLocaleData.getAboveWord()
: aLocaleData.getBelowWord();
break;
}
- sText = ::IsFrameBehind( *pFieldTextAttr->GetpTextNode(), pFieldTextAttr->GetStart(),
+ m_sText = ::IsFrameBehind( *pFieldTextAttr->GetpTextNode(), pFieldTextAttr->GetStart(),
*pTextNd, nNumStart )
? aLocaleData.getAboveWord()
: aLocaleData.getBelowWord();
- if (!sSetReferenceLanguage.isEmpty())
- lcl_formatReferenceLanguage(sText, false, GetLanguage(), sSetReferenceLanguage);
+ if (!m_sSetReferenceLanguage.isEmpty())
+ lcl_formatReferenceLanguage(m_sText, false, GetLanguage(), m_sSetReferenceLanguage);
}
break;
// #i81002#
@@ -651,13 +651,13 @@ void SwGetRefField::UpdateField( const SwTextField* pFieldTextAttr )
if ( pFieldTextAttr && pFieldTextAttr->GetpTextNode() )
{
- sText = MakeRefNumStr( pFieldTextAttr->GetTextNode(), *pTextNd, GetFormat() );
- if ( !sText.isEmpty() && !sSetReferenceLanguage.isEmpty() )
+ m_sText = MakeRefNumStr( pFieldTextAttr->GetTextNode(), *pTextNd, GetFormat() );
+ if ( !m_sText.isEmpty() && !m_sSetReferenceLanguage.isEmpty() )
bClosingParenthesis = pTextNd->GetNumRule()->MakeNumString( *(pTextNd->GetNum()), true).endsWith(")");
}
- if (!sSetReferenceLanguage.isEmpty())
- lcl_formatReferenceLanguage(sText, bClosingParenthesis, GetLanguage(), sSetReferenceLanguage);
+ if (!m_sSetReferenceLanguage.isEmpty())
+ lcl_formatReferenceLanguage(m_sText, bClosingParenthesis, GetLanguage(), m_sSetReferenceLanguage);
}
break;
@@ -745,22 +745,22 @@ OUString SwGetRefField::MakeRefNumStr( const SwTextNode& rTextNodeOfField,
std::unique_ptr<SwField> SwGetRefField::Copy() const
{
std::unique_ptr<SwGetRefField> pField( new SwGetRefField( static_cast<SwGetRefFieldType*>(GetTyp()),
- sSetRefName, sSetReferenceLanguage, nSubType,
- nSeqNo, GetFormat() ) );
- pField->sText = sText;
+ m_sSetRefName, m_sSetReferenceLanguage, m_nSubType,
+ m_nSeqNo, GetFormat() ) );
+ pField->m_sText = m_sText;
return std::unique_ptr<SwField>(pField.release());
}
/// get reference name
OUString SwGetRefField::GetPar1() const
{
- return sSetRefName;
+ return m_sSetRefName;
}
/// set reference name
void SwGetRefField::SetPar1( const OUString& rName )
{
- sSetRefName = rName;
+ m_sSetRefName = rName;
}
OUString SwGetRefField::GetPar2() const
@@ -796,7 +796,7 @@ bool SwGetRefField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
case FIELD_PROP_USHORT2:
{
sal_Int16 nSource = 0;
- switch(nSubType)
+ switch(m_nSubType)
{
case REF_SETREFATTR : nSource = ReferenceFieldSource::REFERENCE_MARK; break;
case REF_SEQUENCEFLD: nSource = ReferenceFieldSource::SEQUENCE_FIELD; break;
@@ -811,7 +811,7 @@ bool SwGetRefField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
case FIELD_PROP_PAR1:
{
OUString sTmp(GetPar1());
- if(REF_SEQUENCEFLD == nSubType)
+ if(REF_SEQUENCEFLD == m_nSubType)
{
sal_uInt16 nPoolId = SwStyleNameMapper::GetPoolIdFromUIName( sTmp, SwGetPoolIdFromName::TxtColl );
switch( nPoolId )
@@ -832,10 +832,10 @@ bool SwGetRefField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
rAny <<= Expand();
break;
case FIELD_PROP_PAR4:
- rAny <<= sSetReferenceLanguage;
+ rAny <<= m_sSetReferenceLanguage;
break;
case FIELD_PROP_SHORT1:
- rAny <<= static_cast<sal_Int16>(nSeqNo);
+ rAny <<= static_cast<sal_Int16>(m_nSeqNo);
break;
default:
assert(false);
@@ -876,18 +876,18 @@ bool SwGetRefField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
rAny >>= nSource;
switch(nSource)
{
- case ReferenceFieldSource::REFERENCE_MARK : nSubType = REF_SETREFATTR ; break;
+ case ReferenceFieldSource::REFERENCE_MARK : m_nSubType = REF_SETREFATTR ; break;
case ReferenceFieldSource::SEQUENCE_FIELD :
{
- if(REF_SEQUENCEFLD == nSubType)
+ if(REF_SEQUENCEFLD == m_nSubType)
break;
- nSubType = REF_SEQUENCEFLD;
+ m_nSubType = REF_SEQUENCEFLD;
ConvertProgrammaticToUIName();
}
break;
- case ReferenceFieldSource::BOOKMARK : nSubType = REF_BOOKMARK ; break;
- case ReferenceFieldSource::FOOTNOTE : nSubType = REF_FOOTNOTE ; break;
- case ReferenceFieldSource::ENDNOTE : nSubType = REF_ENDNOTE ; break;
+ case ReferenceFieldSource::BOOKMARK : m_nSubType = REF_BOOKMARK ; break;
+ case ReferenceFieldSource::FOOTNOTE : m_nSubType = REF_FOOTNOTE ; break;
+ case ReferenceFieldSource::ENDNOTE : m_nSubType = REF_ENDNOTE ; break;
}
}
break;
@@ -907,14 +907,14 @@ bool SwGetRefField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
}
break;
case FIELD_PROP_PAR4:
- rAny >>= sSetReferenceLanguage;
+ rAny >>= m_sSetReferenceLanguage;
break;
case FIELD_PROP_SHORT1:
{
sal_Int16 nSetSeq = 0;
rAny >>= nSetSeq;
if(nSetSeq >= 0)
- nSeqNo = nSetSeq;
+ m_nSeqNo = nSetSeq;
}
break;
default:
@@ -925,7 +925,7 @@ bool SwGetRefField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
void SwGetRefField::ConvertProgrammaticToUIName()
{
- if(GetTyp() && REF_SEQUENCEFLD == nSubType)
+ if(GetTyp() && REF_SEQUENCEFLD == m_nSubType)
{
SwDoc* pDoc = static_cast<SwGetRefFieldType*>(GetTyp())->GetDoc();
const OUString rPar1 = GetPar1();
@@ -959,12 +959,12 @@ void SwGetRefField::ConvertProgrammaticToUIName()
}
SwGetRefFieldType::SwGetRefFieldType( SwDoc* pDc )
- : SwFieldType( SwFieldIds::GetRef ), pDoc( pDc )
+ : SwFieldType( SwFieldIds::GetRef ), m_pDoc( pDc )
{}
SwFieldType* SwGetRefFieldType::Copy() const
{
- return new SwGetRefFieldType( pDoc );
+ return new SwGetRefFieldType( m_pDoc );
}
void SwGetRefFieldType::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
@@ -1264,7 +1264,7 @@ void RefIdsMap::Check( SwDoc& rDoc, SwDoc& rDestDoc, SwGetRefField& rField,
/// what is most desirable since it's going to be wrong anyway
void SwGetRefFieldType::MergeWithOtherDoc( SwDoc& rDestDoc )
{
- if( &rDestDoc != pDoc )
+ if( &rDestDoc != m_pDoc )
{
if (rDestDoc.IsClipBoard())
{
@@ -1302,13 +1302,13 @@ void SwGetRefFieldType::MergeWithOtherDoc( SwDoc& rDestDoc )
aFieldMap.push_back(std::unique_ptr<RefIdsMap>(pMap));
}
- pMap->Check( *pDoc, rDestDoc, rRefField, true );
+ pMap->Check( *m_pDoc, rDestDoc, rRefField, true );
}
break;
case REF_FOOTNOTE:
case REF_ENDNOTE:
- aFntMap.Check( *pDoc, rDestDoc, rRefField, false );
+ aFntMap.Check( *m_pDoc, rDestDoc, rRefField, false );
break;
}
}
More information about the Libreoffice-commits
mailing list