Blob Blame History Raw
From e1dad1357ac57009483d232f2c8a9dccebbf69c3 Mon Sep 17 00:00:00 2001
From: Michael Stahl <mstahl@redhat.com>
Date: Mon, 13 Feb 2012 18:21:53 +0100
Subject: [PATCH 1/3] fdo#41712: rename members to track down assignments
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: C├ędric Bosdonnat <cedric.bosdonnat.ooo@free.fr>
---
 sw/source/core/inc/flowfrm.hxx    |   23 ++++++++---------------
 sw/source/core/layout/flowfrm.cxx |   15 ++++++++++++---
 sw/source/core/layout/sectfrm.cxx |    2 +-
 sw/source/core/text/frmform.cxx   |    4 ++--
 sw/source/core/text/xmldump.cxx   |   12 ++++++------
 5 files changed, 29 insertions(+), 27 deletions(-)

diff --git a/sw/source/core/inc/flowfrm.hxx b/sw/source/core/inc/flowfrm.hxx
index bc9557a..1f9009d 100644
--- a/sw/source/core/inc/flowfrm.hxx
+++ b/sw/source/core/inc/flowfrm.hxx
@@ -114,8 +114,8 @@ class SwFlowFrm
 
 protected:
 
-    SwFlowFrm *pFollow;
-    SwFlowFrm *pPrecede;
+    SwFlowFrm *m_pFollow;
+    SwFlowFrm *m_pPrecede;
 
     sal_Bool bIsFollow	:1;	//Ist's ein Follow
     sal_Bool bLockJoin	:1;	//Join (und damit deleten) verboten wenn sal_True!
@@ -166,16 +166,16 @@ public:
     //neuen Parent Moven.
     void MoveSubTree( SwLayoutFrm* pParent, SwFrm* pSibling = 0 );
 
-           sal_Bool 	  HasFollow() const    { return pFollow ? sal_True : sal_False; }
+           sal_Bool 	  HasFollow() const    { return m_pFollow ? sal_True : sal_False; }
            sal_Bool		  IsFollow()     const { return bIsFollow; }
     inline void		  _SetIsFollow( sal_Bool bSet ) { bIsFollow = bSet; }
-    const  SwFlowFrm *GetFollow() const	   { return pFollow;   }
-           SwFlowFrm *GetFollow()	   	   { return pFollow;   }
+    const  SwFlowFrm *GetFollow() const	   { return m_pFollow;   }
+           SwFlowFrm *GetFollow()	   	   { return m_pFollow;   }
            sal_Bool  	  IsAnFollow( const SwFlowFrm *pFlow ) const;
-    inline void       SetFollow( SwFlowFrm *pNew );
+    void       SetFollow( SwFlowFrm *const pFollow );
 
-    const  SwFlowFrm *GetPrecede() const   { return pPrecede;   }
-           SwFlowFrm *GetPrecede()         { return pPrecede;   }
+    const  SwFlowFrm *GetPrecede() const   { return m_pPrecede;   }
+           SwFlowFrm *GetPrecede()         { return m_pPrecede;   }
 
     sal_Bool IsJoinLocked() const { return bLockJoin; }
     sal_Bool IsAnyJoinLocked() const { return bLockJoin || HasLockedFollow(); }
@@ -253,13 +253,6 @@ inline sal_Bool SwFlowFrm::IsFwdMoveAllowed()
     return rThis.GetIndPrev() != 0;
 }
 
-inline void SwFlowFrm::SetFollow( SwFlowFrm *pNew )
-{
-    pFollow = pNew;
-    if ( pFollow != NULL )
-        pFollow->pPrecede = this;
-}
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 51cb49b..738c7e3 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -81,14 +81,23 @@ sal_Bool SwFlowFrm::bMoveBwdJump = sal_False;
 
 SwFlowFrm::SwFlowFrm( SwFrm &rFrm ) :
     rThis( rFrm ),
-    pFollow( 0 ),
-    pPrecede( 0 )
+    m_pFollow( 0 ),
+    m_pPrecede( 0 )
 {
     bLockJoin = bIsFollow = bCntntLock = bOwnFtnNum =
         bFtnLock = bFlyLock = sal_False;
 }
 
 
+void SwFlowFrm::SetFollow(SwFlowFrm *const pFollow)
+{
+    m_pFollow = pFollow;
+    if (m_pFollow != NULL)
+    {
+        m_pFollow->m_pPrecede = this;
+    }
+}
+
 /*************************************************************************
 |*
 |*  SwFlowFrm::IsFollowLocked()
@@ -215,7 +224,7 @@ sal_Bool SwFlowFrm::IsKeep( const SwAttrSet& rAttrs, bool bCheckIfLastRowShouldK
         {
             SwFrm *pNxt;
             if( 0 != (pNxt = rThis.FindNextCnt()) &&
-                (!pFollow || pNxt != pFollow->GetFrm()))
+                (!m_pFollow || pNxt != m_pFollow->GetFrm()))
             {
                 // --> FME 2006-05-15 #135914#
                 // The last row of a table only keeps with the next content
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 6f8bf2f..2b21733 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -223,7 +223,7 @@ void SwSectionFrm::DelEmpty( sal_Bool bRemove )
     }
     else if( HasFollow() )
         GetFollow()->bIsFollow = sal_False;
-    pFollow = NULL;
+    m_pFollow = NULL;
     if( pUp )
     {
         Frm().Height( 0 );
diff --git a/sw/source/core/text/frmform.cxx b/sw/source/core/text/frmform.cxx
index c383c7e..619c700 100644
--- a/sw/source/core/text/frmform.cxx
+++ b/sw/source/core/text/frmform.cxx
@@ -685,7 +685,7 @@ SwCntntFrm *SwTxtFrm::JoinFrm()
     // <--
     pFoll->Cut();
     delete pFoll;
-    pFollow = pNxt;
+    m_pFollow = pNxt;
     return pNxt;
 }
 
@@ -2050,7 +2050,7 @@ sal_Bool SwTxtFrm::FormatQuick( bool bForceQuickFormat )
         return sal_False;
     }
 
-    if( pFollow && nStart != ((SwTxtFrm*)pFollow)->GetOfst() )
+    if( m_pFollow && nStart != (static_cast<SwTxtFrm*>(m_pFollow))->GetOfst() )
         return sal_False; // kann z.B. durch Orphans auftreten (35083,35081)
 
     // Geschafft, wir sind durch ...
diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx
index 2d76660..5a65799 100644
--- a/sw/source/core/text/xmldump.cxx
+++ b/sw/source/core/text/xmldump.cxx
@@ -314,8 +314,8 @@ void SwTxtFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
     if ( HasFollow() )
         xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%p", GetFollow() );
 
-    if ( pPrecede != NULL )
-        xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%p", (SwTxtFrm*)pPrecede );
+    if ( m_pPrecede != NULL )
+        xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%p", (SwTxtFrm*)m_pPrecede );
 }
 
 void SwSectionFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
@@ -324,8 +324,8 @@ void SwSectionFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
     if ( HasFollow() )
         xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%p", GetFollow() );
 
-    if ( pPrecede != NULL )
-        xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%p", (SwSectionFrm*)pPrecede );
+    if ( m_pPrecede != NULL )
+        xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%p", (SwSectionFrm*)m_pPrecede );
 }
 
 void SwTabFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
@@ -334,8 +334,8 @@ void SwTabFrm::dumpAsXmlAttributes( xmlTextWriterPtr writer )
     if ( HasFollow() )
         xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "follow" ), "%p", GetFollow() );
 
-    if ( pPrecede != NULL )
-        xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%p", (SwTabFrm*)pPrecede );
+    if ( m_pPrecede != NULL )
+        xmlTextWriterWriteFormatAttribute( writer, BAD_CAST( "precede" ), "%p", (SwTabFrm*)m_pPrecede );
 }
 
 #endif
-- 
1.7.7.6