[Libreoffice-commits] core.git: sw/inc sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Mon Feb 19 08:22:05 UTC 2018
sw/inc/docufld.hxx | 42 +++++++++---------
sw/source/core/fields/docufld.cxx | 86 +++++++++++++++++++-------------------
2 files changed, 64 insertions(+), 64 deletions(-)
New commits:
commit 2ab300bfa18cdcc91a9311c4c9710254b0ad7753
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Mon Feb 19 08:05:29 2018 +0100
sw: prefix members of SwPostItField, SwRefPageGetField and SwRefPageSetField
Change-Id: I37f72fd65ff7d9e6c992f92e770f0897f80aaf7b
Reviewed-on: https://gerrit.libreoffice.org/49961
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index 13af74471311..0cc2cce18d2c 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -439,11 +439,11 @@ public:
class SW_DLLPUBLIC SwPostItField : public SwField
{
- OUString sText;
- OUString sAuthor;
- OUString sInitials; ///< Initials of the author.
- OUString sName; ///< Name of the comment.
- DateTime aDateTime;
+ OUString m_sText;
+ OUString m_sAuthor;
+ OUString m_sInitials; ///< Initials of the author.
+ OUString m_sName; ///< Name of the comment.
+ DateTime m_aDateTime;
OutlinerParaObject* mpText;
rtl::Reference<SwTextAPIObject> m_xTextObject;
sal_uInt32 m_nPostItId;
@@ -467,9 +467,9 @@ public:
virtual OUString Expand() const override;
virtual SwField* Copy() const override;
- const DateTime& GetDateTime() const { return aDateTime; }
- const Date GetDate() const { return Date(aDateTime.GetDate()); }
- const tools::Time GetTime() const { return tools::Time(aDateTime.GetTime()); }
+ const DateTime& GetDateTime() const { return m_aDateTime; }
+ const Date GetDate() const { return Date(m_aDateTime.GetDate()); }
+ const tools::Time GetTime() const { return tools::Time(m_aDateTime.GetTime()); }
sal_uInt32 GetPostItId() const { return m_nPostItId; }
/// Author
@@ -479,10 +479,10 @@ public:
/// Text
virtual OUString GetPar2() const override;
virtual void SetPar2(const OUString& rStr) override;
- const OUString& GetText() const { return sText; }
- const OUString& GetInitials() const { return sInitials;}
+ const OUString& GetText() const { return m_sText; }
+ const OUString& GetInitials() const { return m_sInitials;}
void SetName(const OUString& rStr);
- const OUString& GetName() const { return sName;}
+ const OUString& GetName() const { return m_sName;}
const OutlinerParaObject* GetTextObject() const { return mpText;}
void SetTextObject( OutlinerParaObject* pText );
@@ -574,8 +574,8 @@ protected:
// Relative page numbering.
class SwRefPageSetField : public SwField
{
- short nOffset;
- bool bOn;
+ short m_nOffset;
+ bool m_bOn;
public:
SwRefPageSetField( SwRefPageSetFieldType*, short nOff, bool bOn );
@@ -586,10 +586,10 @@ public:
virtual OUString GetPar2() const override;
virtual void SetPar2(const OUString& rStr) override;
- bool IsOn() const { return bOn; }
+ bool IsOn() const { return m_bOn; }
- short GetOffset() const { return nOffset; }
- void SetOffset( short nOff ) { nOffset = nOff; }
+ short GetOffset() const { return m_nOffset; }
+ void SetOffset( short nOff ) { m_nOffset = nOff; }
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt16 nWhich ) override;
};
@@ -597,8 +597,8 @@ public:
// Relative page numbers - query field.
class SwRefPageGetFieldType : public SwFieldType
{
- SwDoc* pDoc;
- sal_Int16 nNumberingType;
+ SwDoc* m_pDoc;
+ sal_Int16 m_nNumberingType;
void UpdateField( SwTextField const * pTextField, SetGetExpFields const & rSetList );
protected:
@@ -608,20 +608,20 @@ public:
SwRefPageGetFieldType( SwDoc* pDoc );
virtual SwFieldType* Copy() const override;
bool MakeSetList( SetGetExpFields& rTmpLst );
- SwDoc* GetDoc() const { return pDoc; }
+ SwDoc* GetDoc() const { return m_pDoc; }
};
// Query relative page numbering.
class SwRefPageGetField : public SwField
{
- OUString sText;
+ OUString m_sText;
public:
SwRefPageGetField( SwRefPageGetFieldType*, sal_uInt32 nFormat );
virtual OUString Expand() const override;
virtual SwField* Copy() const override;
- void SetText( const OUString& rText ) { sText = rText; }
+ void SetText( const OUString& rText ) { m_sText = rText; }
void ChangeExpansion( const SwFrame* pFrame, const SwTextField* pField );
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt16 nWhich ) const override;
diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx
index 249f3ccabcc8..dd97dd56f37c 100644
--- a/sw/source/core/fields/docufld.cxx
+++ b/sw/source/core/fields/docufld.cxx
@@ -1742,11 +1742,11 @@ SwPostItField::SwPostItField( SwPostItFieldType* pT,
const DateTime& rDateTime,
const sal_uInt32 nPostItId)
: SwField( pT )
- , sText( rText )
- , sAuthor( rAuthor )
- , sInitials( rInitials )
- , sName( rName )
- , aDateTime( rDateTime )
+ , m_sText( rText )
+ , m_sAuthor( rAuthor )
+ , m_sInitials( rInitials )
+ , m_sName( rName )
+ , m_aDateTime( rDateTime )
, mpText( nullptr )
{
m_nPostItId = nPostItId == 0 ? m_nLastPostItId++ : nPostItId;
@@ -1774,8 +1774,8 @@ OUString SwPostItField::GetDescription() const
SwField* SwPostItField::Copy() const
{
- SwPostItField* pRet = new SwPostItField( static_cast<SwPostItFieldType*>(GetTyp()), sAuthor, sText, sInitials, sName,
- aDateTime, m_nPostItId);
+ SwPostItField* pRet = new SwPostItField( static_cast<SwPostItFieldType*>(GetTyp()), m_sAuthor, m_sText, m_sInitials, m_sName,
+ m_aDateTime, m_nPostItId);
if (mpText)
pRet->SetTextObject( new OutlinerParaObject(*mpText) );
@@ -1787,31 +1787,31 @@ SwField* SwPostItField::Copy() const
/// set author
void SwPostItField::SetPar1(const OUString& rStr)
{
- sAuthor = rStr;
+ m_sAuthor = rStr;
}
/// get author
OUString SwPostItField::GetPar1() const
{
- return sAuthor;
+ return m_sAuthor;
}
/// set the PostIt's text
void SwPostItField::SetPar2(const OUString& rStr)
{
- sText = rStr;
+ m_sText = rStr;
}
/// get the PostIt's text
OUString SwPostItField::GetPar2() const
{
- return sText;
+ return m_sText;
}
void SwPostItField::SetName(const OUString& rName)
{
- sName = rName;
+ m_sName = rName;
}
@@ -1831,18 +1831,18 @@ bool SwPostItField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
switch( nWhichId )
{
case FIELD_PROP_PAR1:
- rAny <<= sAuthor;
+ rAny <<= m_sAuthor;
break;
case FIELD_PROP_PAR2:
{
- rAny <<= sText;
+ rAny <<= m_sText;
break;
}
case FIELD_PROP_PAR3:
- rAny <<= sInitials;
+ rAny <<= m_sInitials;
break;
case FIELD_PROP_PAR4:
- rAny <<= sName;
+ rAny <<= m_sName;
break;
case FIELD_PROP_TEXT:
{
@@ -1857,7 +1857,7 @@ bool SwPostItField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
if ( mpText )
m_xTextObject->SetText( *mpText );
else
- m_xTextObject->SetString( sText );
+ m_xTextObject->SetString( m_sText );
uno::Reference < text::XText > xText( m_xTextObject.get() );
rAny <<= xText;
@@ -1865,12 +1865,12 @@ bool SwPostItField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
}
case FIELD_PROP_DATE:
{
- rAny <<= aDateTime.GetUNODate();
+ rAny <<= m_aDateTime.GetUNODate();
}
break;
case FIELD_PROP_DATE_TIME:
{
- rAny <<= aDateTime.GetUNODateTime();
+ rAny <<= m_aDateTime.GetUNODateTime();
}
break;
default:
@@ -1884,10 +1884,10 @@ bool SwPostItField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
switch( nWhichId )
{
case FIELD_PROP_PAR1:
- rAny >>= sAuthor;
+ rAny >>= m_sAuthor;
break;
case FIELD_PROP_PAR2:
- rAny >>= sText;
+ rAny >>= m_sText;
//#i100374# new string via api, delete complex text object so SwPostItNote picks up the new string
if (mpText)
{
@@ -1896,10 +1896,10 @@ bool SwPostItField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
}
break;
case FIELD_PROP_PAR3:
- rAny >>= sInitials;
+ rAny >>= m_sInitials;
break;
case FIELD_PROP_PAR4:
- rAny >>= sName;
+ rAny >>= m_sName;
break;
case FIELD_PROP_TEXT:
OSL_FAIL("Not implemented!");
@@ -1907,7 +1907,7 @@ bool SwPostItField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
case FIELD_PROP_DATE:
if( auto aSetDate = o3tl::tryAccess<util::Date>(rAny) )
{
- aDateTime = Date(aSetDate->Day, aSetDate->Month, aSetDate->Year);
+ m_aDateTime = Date(aSetDate->Day, aSetDate->Month, aSetDate->Year);
}
break;
case FIELD_PROP_DATE_TIME:
@@ -1915,7 +1915,7 @@ bool SwPostItField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
util::DateTime aDateTimeValue;
if(!(rAny >>= aDateTimeValue))
return false;
- aDateTime = DateTime(aDateTimeValue);
+ m_aDateTime = DateTime(aDateTimeValue);
}
break;
default:
@@ -2091,7 +2091,7 @@ void SwRefPageSetFieldType::Modify( const SfxPoolItem*, const SfxPoolItem * )
SwRefPageSetField::SwRefPageSetField( SwRefPageSetFieldType* pTyp,
short nOff, bool bFlag )
- : SwField( pTyp ), nOffset( nOff ), bOn( bFlag )
+ : SwField( pTyp ), m_nOffset( nOff ), m_bOn( bFlag )
{
}
@@ -2102,7 +2102,7 @@ OUString SwRefPageSetField::Expand() const
SwField* SwRefPageSetField::Copy() const
{
- return new SwRefPageSetField( static_cast<SwRefPageSetFieldType*>(GetTyp()), nOffset, bOn );
+ return new SwRefPageSetField( static_cast<SwRefPageSetFieldType*>(GetTyp()), m_nOffset, m_bOn );
}
OUString SwRefPageSetField::GetPar2() const
@@ -2120,10 +2120,10 @@ bool SwRefPageSetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
switch( nWhichId )
{
case FIELD_PROP_BOOL1:
- rAny <<= bOn;
+ rAny <<= m_bOn;
break;
case FIELD_PROP_USHORT1:
- rAny <<= static_cast<sal_Int16>(nOffset);
+ rAny <<= static_cast<sal_Int16>(m_nOffset);
break;
default:
assert(false);
@@ -2136,10 +2136,10 @@ bool SwRefPageSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
switch( nWhichId )
{
case FIELD_PROP_BOOL1:
- bOn = *o3tl::doAccess<bool>(rAny);
+ m_bOn = *o3tl::doAccess<bool>(rAny);
break;
case FIELD_PROP_USHORT1:
- rAny >>=nOffset;
+ rAny >>=m_nOffset;
break;
default:
assert(false);
@@ -2150,14 +2150,14 @@ bool SwRefPageSetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
// relative page numbers - query field
SwRefPageGetFieldType::SwRefPageGetFieldType( SwDoc* pDc )
- : SwFieldType( SwFieldIds::RefPageGet ), pDoc( pDc ), nNumberingType( SVX_NUM_ARABIC )
+ : SwFieldType( SwFieldIds::RefPageGet ), m_pDoc( pDc ), m_nNumberingType( SVX_NUM_ARABIC )
{
}
SwFieldType* SwRefPageGetFieldType::Copy() const
{
- SwRefPageGetFieldType* pNew = new SwRefPageGetFieldType( pDoc );
- pNew->nNumberingType = nNumberingType;
+ SwRefPageGetFieldType* pNew = new SwRefPageGetFieldType( m_pDoc );
+ pNew->m_nNumberingType = m_nNumberingType;
return pNew;
}
@@ -2184,7 +2184,7 @@ void SwRefPageGetFieldType::Modify( const SfxPoolItem* pOld, const SfxPoolItem*
bool SwRefPageGetFieldType::MakeSetList( SetGetExpFields& rTmpLst )
{
- SwIterator<SwFormatField,SwFieldType> aIter(*pDoc->getIDocumentFieldsAccess().GetSysFieldType( SwFieldIds::RefPageSet));
+ SwIterator<SwFormatField,SwFieldType> aIter(*m_pDoc->getIDocumentFieldsAccess().GetSysFieldType( SwFieldIds::RefPageSet));
for ( SwFormatField* pFormatField = aIter.First(); pFormatField; pFormatField = aIter.Next() )
{
// update only the GetRef fields
@@ -2212,8 +2212,8 @@ bool SwRefPageGetFieldType::MakeSetList( SetGetExpFields& rTmpLst )
else
{
// create index for determination of the TextNode
- SwPosition aPos( pDoc->GetNodes().GetEndOfPostIts() );
- bool const bResult = GetBodyTextNode( *pDoc, aPos, *pFrame );
+ SwPosition aPos( m_pDoc->GetNodes().GetEndOfPostIts() );
+ bool const bResult = GetBodyTextNode( *m_pDoc, aPos, *pFrame );
OSL_ENSURE(bResult, "where is the Field?");
pNew = new SetGetExpField( aPos.nNode, pTField,
&aPos.nContent );
@@ -2236,7 +2236,7 @@ void SwRefPageGetFieldType::UpdateField( SwTextField const * pTextField,
// then search the correct RefPageSet field
SwTextNode* pTextNode = &pTextField->GetTextNode();
if( pTextNode->StartOfSectionIndex() >
- pDoc->GetNodes().GetEndOfExtras().GetIndex() )
+ m_pDoc->GetNodes().GetEndOfExtras().GetIndex() )
{
SwNodeIndex aIdx( *pTextNode );
SetGetExpField aEndField( aIdx, pTextField );
@@ -2285,14 +2285,14 @@ SwRefPageGetField::SwRefPageGetField( SwRefPageGetFieldType* pTyp,
OUString SwRefPageGetField::Expand() const
{
- return sText;
+ return m_sText;
}
SwField* SwRefPageGetField::Copy() const
{
SwRefPageGetField* pCpy = new SwRefPageGetField(
static_cast<SwRefPageGetFieldType*>(GetTyp()), GetFormat() );
- pCpy->SetText( sText );
+ pCpy->SetText( m_sText );
return pCpy;
}
@@ -2306,7 +2306,7 @@ void SwRefPageGetField::ChangeExpansion( const SwFrame* pFrame,
pDoc->GetNodes().GetEndOfExtras().GetIndex() )
return;
- sText.clear();
+ m_sText.clear();
OSL_ENSURE( !pFrame->IsInDocBody(), "Flag incorrect, frame is in DocBody" );
@@ -2361,7 +2361,7 @@ bool SwRefPageGetField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
rAny <<= static_cast<sal_Int16>(GetFormat());
break;
case FIELD_PROP_PAR1:
- rAny <<= sText;
+ rAny <<= m_sText;
break;
default:
assert(false);
@@ -2382,7 +2382,7 @@ bool SwRefPageGetField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
}
break;
case FIELD_PROP_PAR1:
- rAny >>= sText;
+ rAny >>= m_sText;
break;
default:
assert(false);
More information about the Libreoffice-commits
mailing list