[Libreoffice-commits] core.git: sw/inc sw/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Jul 30 09:37:06 UTC 2018


 sw/inc/expfld.hxx                 |   22 ++++++-------
 sw/source/core/access/accpara.cxx |   34 ++++++++++----------
 sw/source/core/fields/expfld.cxx  |   64 +++++++++++++++++++-------------------
 sw/source/core/fields/fldlst.cxx  |   40 +++++++++++------------
 4 files changed, 80 insertions(+), 80 deletions(-)

New commits:
commit 4219a1f8e44aaa44a0baf30af9ebdcbd709f0a56
Author:     Miklos Vajna <vmiklos at collabora.co.uk>
AuthorDate: Mon Jul 30 09:02:17 2018 +0200
Commit:     Miklos Vajna <vmiklos at collabora.co.uk>
CommitDate: Mon Jul 30 11:36:43 2018 +0200

    sw: prefix members of SwHyperlinkIter_Impl and SwInputField
    
    Change-Id: I35bb9f6624a74c8351c094355434417790d6027d
    Reviewed-on: https://gerrit.libreoffice.org/58301
    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 ecdba62d7c9c..b438d80c9896 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -278,22 +278,22 @@ inline bool SwSetExpField::IsSequenceField() const
 
 class SwInputFieldType : public SwFieldType
 {
-    SwDoc* pDoc;
+    SwDoc* mpDoc;
 public:
     SwInputFieldType( SwDoc* pDoc );
 
     virtual SwFieldType* Copy() const override;
 
-    SwDoc* GetDoc() const { return pDoc; }
+    SwDoc* GetDoc() const { return mpDoc; }
 };
 
 class SW_DLLPUBLIC SwInputField : public SwField
 {
-    mutable OUString aContent;
-    OUString aPText;
-    OUString aHelp;
-    OUString aToolTip;
-    sal_uInt16 nSubType;
+    mutable OUString maContent;
+    OUString maPText;
+    OUString maHelp;
+    OUString maToolTip;
+    sal_uInt16 mnSubType;
     bool mbIsFormField;
 
     SwFormatField* mpFormatField; // attribute to which the <SwInputField> belongs to
@@ -302,7 +302,7 @@ class SW_DLLPUBLIC SwInputField : public SwField
     virtual std::unique_ptr<SwField> Copy() const override;
 
     // Accessing Input Field's content
-    const OUString& getContent() const { return aContent;}
+    const OUString& getContent() const { return maContent;}
 
 public:
     /// Direct input via dialog; delete old value.
@@ -366,9 +366,9 @@ public:
     bool        BuildSortLst();
 
 private:
-    SwEditShell*                      pSh;
-    std::unique_ptr<SetGetExpFields>  pSrtLst;
-    std::set<const SwTextField*>      aTmpLst;
+    SwEditShell*                      mpSh;
+    std::unique_ptr<SetGetExpFields>  mpSrtLst;
+    std::set<const SwTextField*>      maTmpLst;
 };
 
  /// Implementation in tblcalc.cxx.
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 14d1f6efb564..f6ccef2903ee 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -2943,49 +2943,49 @@ void SwAccessibleParagraph::deselectAccessibleChild(
 
 class SwHyperlinkIter_Impl
 {
-    const SwpHints *pHints;
-    sal_Int32 nStt;
-    sal_Int32 nEnd;
-    size_t nPos;
+    const SwpHints *m_pHints;
+    sal_Int32 m_nStt;
+    sal_Int32 m_nEnd;
+    size_t m_nPos;
 
 public:
     explicit SwHyperlinkIter_Impl( const SwTextFrame *pTextFrame );
     const SwTextAttr *next();
-    size_t getCurrHintPos() const { return nPos-1; }
+    size_t getCurrHintPos() const { return m_nPos-1; }
 
-    sal_Int32 startIdx() const { return nStt; }
-    sal_Int32 endIdx() const { return nEnd; }
+    sal_Int32 startIdx() const { return m_nStt; }
+    sal_Int32 endIdx() const { return m_nEnd; }
 };
 
 SwHyperlinkIter_Impl::SwHyperlinkIter_Impl( const SwTextFrame *pTextFrame ) :
-    pHints( pTextFrame->GetTextNode()->GetpSwpHints() ),
-    nStt( pTextFrame->GetOfst() ),
-    nPos( 0 )
+    m_pHints( pTextFrame->GetTextNode()->GetpSwpHints() ),
+    m_nStt( pTextFrame->GetOfst() ),
+    m_nPos( 0 )
 {
     const SwTextFrame *pFollFrame = pTextFrame->GetFollow();
-    nEnd = pFollFrame ? pFollFrame->GetOfst() : TextFrameIndex(pTextFrame->GetText().getLength());
+    m_nEnd = pFollFrame ? pFollFrame->GetOfst() : TextFrameIndex(pTextFrame->GetText().getLength());
 }
 
 const SwTextAttr *SwHyperlinkIter_Impl::next()
 {
     const SwTextAttr *pAttr = nullptr;
-    if( pHints )
+    if( m_pHints )
     {
-        while( !pAttr && nPos < pHints->Count() )
+        while( !pAttr && m_nPos < m_pHints->Count() )
         {
-            const SwTextAttr *pHt = pHints->Get(nPos);
+            const SwTextAttr *pHt = m_pHints->Get(m_nPos);
             if( RES_TXTATR_INETFMT == pHt->Which() )
             {
                 const sal_Int32 nHtStt = pHt->GetStart();
                 const sal_Int32 nHtEnd = *pHt->GetAnyEnd();
                 if( nHtEnd > nHtStt &&
-                    ( (nHtStt >= nStt && nHtStt < nEnd) ||
-                      (nHtEnd > nStt && nHtEnd <= nEnd) ) )
+                    ( (nHtStt >= m_nStt && nHtStt < m_nEnd) ||
+                      (nHtEnd > m_nStt && nHtEnd <= m_nEnd) ) )
                 {
                     pAttr = pHt;
                 }
             }
-            ++nPos;
+            ++m_nPos;
         }
     }
 
diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx
index 96ccada206c2..293ec2667ac6 100644
--- a/sw/source/core/fields/expfld.cxx
+++ b/sw/source/core/fields/expfld.cxx
@@ -1111,13 +1111,13 @@ bool SwSetExpField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
 
 SwInputFieldType::SwInputFieldType( SwDoc* pD )
     : SwFieldType( SwFieldIds::Input )
-    , pDoc( pD )
+    , mpDoc( pD )
 {
 }
 
 SwFieldType* SwInputFieldType::Copy() const
 {
-    SwInputFieldType* pType = new SwInputFieldType( pDoc );
+    SwInputFieldType* pType = new SwInputFieldType( mpDoc );
     return pType;
 }
 
@@ -1128,9 +1128,9 @@ SwInputField::SwInputField( SwInputFieldType* pFieldType,
                             sal_uLong nFormat,
                             bool bIsFormField )
     : SwField( pFieldType, nFormat, LANGUAGE_SYSTEM, false )
-    , aContent(rContent)
-    , aPText(rPrompt)
-    , nSubType(nSub)
+    , maContent(rContent)
+    , maPText(rPrompt)
+    , mnSubType(nSub)
     , mbIsFormField( bIsFormField )
     , mpFormatField( nullptr )
 {
@@ -1148,11 +1148,11 @@ void SwInputField::SetFormatField( SwFormatField& rFormatField )
 
 void SwInputField::applyFieldContent( const OUString& rNewFieldContent )
 {
-    if ( (nSubType & 0x00ff) == INP_TXT )
+    if ( (mnSubType & 0x00ff) == INP_TXT )
     {
-        aContent = rNewFieldContent;
+        maContent = rNewFieldContent;
     }
-    else if( (nSubType & 0x00ff) == INP_USR )
+    else if( (mnSubType & 0x00ff) == INP_USR )
     {
         SwUserFieldType* pUserTyp = static_cast<SwUserFieldType*>(
             static_cast<SwInputFieldType*>(GetTyp())->GetDoc()->getIDocumentFieldsAccess().GetFieldType( SwFieldIds::User, getContent(), false ) );
@@ -1185,7 +1185,7 @@ void SwInputField::applyFieldContent( const OUString& rNewFieldContent )
 OUString SwInputField::GetFieldName() const
 {
     OUString aStr(SwField::GetFieldName());
-    if ((nSubType & 0x00ff) == INP_USR)
+    if ((mnSubType & 0x00ff) == INP_USR)
     {
         aStr += GetTyp()->GetName() + " " + getContent();
     }
@@ -1198,13 +1198,13 @@ std::unique_ptr<SwField> SwInputField::Copy() const
         new SwInputField(
             static_cast<SwInputFieldType*>(GetTyp()),
             getContent(),
-            aPText,
+            maPText,
             GetSubType(),
             GetFormat(),
             mbIsFormField ));
 
-    pField->SetHelp( aHelp );
-    pField->SetToolTip( aToolTip );
+    pField->SetHelp( maHelp );
+    pField->SetToolTip( maToolTip );
 
     pField->SetAutomaticLanguage(IsAutomaticLanguage());
     return std::unique_ptr<SwField>(pField.release());
@@ -1212,12 +1212,12 @@ std::unique_ptr<SwField> SwInputField::Copy() const
 
 OUString SwInputField::Expand() const
 {
-    if((nSubType & 0x00ff) == INP_TXT)
+    if((mnSubType & 0x00ff) == INP_TXT)
     {
         return getContent();
     }
 
-    if( (nSubType & 0x00ff) == INP_USR )
+    if( (mnSubType & 0x00ff) == INP_USR )
     {
         SwUserFieldType* pUserTyp = static_cast<SwUserFieldType*>(
             static_cast<SwInputFieldType*>(GetTyp())->GetDoc()->getIDocumentFieldsAccess().GetFieldType( SwFieldIds::User, getContent(), false ) );
@@ -1231,8 +1231,8 @@ OUString SwInputField::Expand() const
 bool SwInputField::isFormField() const
 {
     return mbIsFormField
-           || !aHelp.isEmpty()
-           || !aToolTip.isEmpty();
+           || !maHelp.isEmpty()
+           || !maToolTip.isEmpty();
 }
 
 bool SwInputField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
@@ -1243,13 +1243,13 @@ bool SwInputField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
         rAny <<= getContent();
         break;
     case FIELD_PROP_PAR2:
-        rAny <<= aPText;
+        rAny <<= maPText;
         break;
     case FIELD_PROP_PAR3:
-        rAny <<= aHelp;
+        rAny <<= maHelp;
         break;
     case FIELD_PROP_PAR4:
-        rAny <<= aToolTip;
+        rAny <<= maToolTip;
         break;
     default:
         assert(false);
@@ -1262,16 +1262,16 @@ bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
     switch( nWhichId )
     {
     case FIELD_PROP_PAR1:
-        rAny >>= aContent;
+        rAny >>= maContent;
         break;
     case FIELD_PROP_PAR2:
-        rAny >>= aPText;
+        rAny >>= maPText;
         break;
     case FIELD_PROP_PAR3:
-        rAny >>= aHelp;
+        rAny >>= maHelp;
         break;
     case FIELD_PROP_PAR4:
-        rAny >>= aToolTip;
+        rAny >>= maToolTip;
         break;
     default:
         assert(false);
@@ -1282,7 +1282,7 @@ bool SwInputField::PutValue( const uno::Any& rAny, sal_uInt16 nWhichId )
 /// set condition
 void SwInputField::SetPar1(const OUString& rStr)
 {
-    aContent = rStr;
+    maContent = rStr;
 }
 
 OUString SwInputField::GetPar1() const
@@ -1292,42 +1292,42 @@ OUString SwInputField::GetPar1() const
 
 void SwInputField::SetPar2(const OUString& rStr)
 {
-    aPText = rStr;
+    maPText = rStr;
 }
 
 OUString SwInputField::GetPar2() const
 {
-    return aPText;
+    return maPText;
 }
 
 void SwInputField::SetHelp(const OUString & rStr)
 {
-    aHelp = rStr;
+    maHelp = rStr;
 }
 
 const OUString& SwInputField::GetHelp() const
 {
-    return aHelp;
+    return maHelp;
 }
 
 void SwInputField::SetToolTip(const OUString & rStr)
 {
-    aToolTip = rStr;
+    maToolTip = rStr;
 }
 
 const OUString& SwInputField::GetToolTip() const
 {
-    return aToolTip;
+    return maToolTip;
 }
 
 sal_uInt16 SwInputField::GetSubType() const
 {
-    return nSubType;
+    return mnSubType;
 }
 
 void SwInputField::SetSubType(sal_uInt16 nSub)
 {
-    nSubType = nSub;
+    mnSubType = nSub;
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/fields/fldlst.cxx b/sw/source/core/fields/fldlst.cxx
index 2330da1c0066..a10a2ead4ed5 100644
--- a/sw/source/core/fields/fldlst.cxx
+++ b/sw/source/core/fields/fldlst.cxx
@@ -33,12 +33,12 @@
 // sort input values
 
 SwInputFieldList::SwInputFieldList( SwEditShell* pShell, bool bBuildTmpLst )
-    : pSh(pShell)
+    : mpSh(pShell)
 {
     // create sorted list of all  input fields
-    pSrtLst.reset( new SetGetExpFields );
+    mpSrtLst.reset( new SetGetExpFields );
 
-    const SwFieldTypes& rFieldTypes = *pSh->GetDoc()->getIDocumentFieldsAccess().GetFieldTypes();
+    const SwFieldTypes& rFieldTypes = *mpSh->GetDoc()->getIDocumentFieldsAccess().GetFieldTypes();
     const size_t nSize = rFieldTypes.size();
 
     // iterate over all types
@@ -64,13 +64,13 @@ SwInputFieldList::SwInputFieldList( SwEditShell* pShell, bool bBuildTmpLst )
                 {
                     if( bBuildTmpLst )
                     {
-                        aTmpLst.insert( pTextField );
+                        maTmpLst.insert( pTextField );
                     }
                     else
                     {
                         SwNodeIndex aIdx( rTextNode );
                         SetGetExpField* pNew = new SetGetExpField(aIdx, pTextField );
-                        pSrtLst->insert( pNew );
+                        mpSrtLst->insert( pNew );
                     }
                 }
             }
@@ -84,13 +84,13 @@ SwInputFieldList::~SwInputFieldList()
 
 size_t SwInputFieldList::Count() const
 {
-    return pSrtLst->size();
+    return mpSrtLst->size();
 }
 
 // get field from list in sorted order
 SwField* SwInputFieldList::GetField(size_t nId)
 {
-    const SwTextField* pTextField = (*pSrtLst)[ nId ]->GetTextField();
+    const SwTextField* pTextField = (*mpSrtLst)[ nId ]->GetTextField();
     OSL_ENSURE( pTextField, "no TextField" );
     return const_cast<SwField*>(pTextField->GetFormatField().GetField());
 }
@@ -98,22 +98,22 @@ SwField* SwInputFieldList::GetField(size_t nId)
 /// save cursor
 void SwInputFieldList::PushCursor()
 {
-    pSh->Push();
-    pSh->ClearMark();
+    mpSh->Push();
+    mpSh->ClearMark();
 }
 
 /// get cursor
 void SwInputFieldList::PopCursor()
 {
-    pSh->Pop(SwCursorShell::PopMode::DeleteCurrent);
+    mpSh->Pop(SwCursorShell::PopMode::DeleteCurrent);
 }
 
 /// go to position of a field
 void SwInputFieldList::GotoFieldPos(size_t nId)
 {
-    pSh->StartAllAction();
-    (*pSrtLst)[ nId ]->GetPosOfContent( *pSh->GetCursor()->GetPoint() );
-    pSh->EndAllAction();
+    mpSh->StartAllAction();
+    (*mpSrtLst)[ nId ]->GetPosOfContent( *mpSh->GetCursor()->GetPoint() );
+    mpSh->EndAllAction();
 }
 
 /** Compare TmpLst with current fields.
@@ -125,7 +125,7 @@ void SwInputFieldList::GotoFieldPos(size_t nId)
  */
 bool SwInputFieldList::BuildSortLst()
 {
-    const SwFieldTypes& rFieldTypes = *pSh->GetDoc()->getIDocumentFieldsAccess().GetFieldTypes();
+    const SwFieldTypes& rFieldTypes = *mpSh->GetDoc()->getIDocumentFieldsAccess().GetFieldTypes();
     const size_t nSize = rFieldTypes.size();
 
     // iterate over all types
@@ -150,23 +150,23 @@ bool SwInputFieldList::BuildSortLst()
                 if( rTextNode.GetNodes().IsDocNodes() )
                 {
                     // not in TempList, thus add to SortList
-                    std::set<const SwTextField*>::iterator it = aTmpLst.find( pTextField );
-                    if( aTmpLst.end() == it )
+                    std::set<const SwTextField*>::iterator it = maTmpLst.find( pTextField );
+                    if( maTmpLst.end() == it )
                     {
                         SwNodeIndex aIdx( rTextNode );
                         SetGetExpField* pNew = new SetGetExpField(aIdx, pTextField );
-                        pSrtLst->insert( pNew );
+                        mpSrtLst->insert( pNew );
                     }
                     else
-                        aTmpLst.erase( it );
+                        maTmpLst.erase( it );
                 }
             }
         }
     }
 
     // the pointers are not needed anymore
-    aTmpLst.clear();
-    return !pSrtLst->empty();
+    maTmpLst.clear();
+    return !mpSrtLst->empty();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list