sw/source/core/text/pordrop.hxx |   54 ++++++++++++++++++++--------------------
 sw/source/core/text/porftn.hxx  |   14 +++++-----
 sw/source/core/text/txtdrop.cxx |   54 ++++++++++++++++++++--------------------
 sw/source/core/text/txtftn.cxx  |   18 ++++++-------
 4 files changed, 70 insertions(+), 70 deletions(-)

New commits:
commit 101ca0f9939d80dd8e0b5b638e05c9d3955a5b53
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Mon Mar 1 08:46:05 2021 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Mar 1 10:18:41 2021 +0100

    sw: prefix members of SwDropPortion, SwDropPortionPart, ...
    
    ... SwFootnotePortion and SwQuoVadisPortion
    
    See tdf#94879 for motivation.
    
    Change-Id: I8a2b01892c0198b1fd382eb0c3f29f7df3c6437d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111730
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/core/text/pordrop.hxx b/sw/source/core/text/pordrop.hxx
index 5e01906cdd55..d936a81b896d 100644
--- a/sw/source/core/text/pordrop.hxx
+++ b/sw/source/core/text/pordrop.hxx
@@ -36,24 +36,24 @@ extern SwDropCapCache *pDropCapCache;
 // attribute changes inside them.
 class SwDropPortionPart
 {
-    std::unique_ptr<SwDropPortionPart> pFollow;
-    std::unique_ptr<SwFont> pFnt;
-    TextFrameIndex nLen;
-    sal_uInt16 nWidth;
+    std::unique_ptr<SwDropPortionPart> m_pFollow;
+    std::unique_ptr<SwFont> m_pFnt;
+    TextFrameIndex m_nLen;
+    sal_uInt16 m_nWidth;
     bool m_bJoinBorderWithNext;
     bool m_bJoinBorderWithPrev;
 
 public:
     SwDropPortionPart( SwFont& rFont, const TextFrameIndex nL )
-            : pFnt( &rFont ), nLen( nL ), nWidth( 0 ), 
m_bJoinBorderWithNext(false), m_bJoinBorderWithPrev(false) {};
+            : m_pFnt( &rFont ), m_nLen( nL ), m_nWidth( 0 ), 
m_bJoinBorderWithNext(false), m_bJoinBorderWithPrev(false) {};
     ~SwDropPortionPart();
 
-    SwDropPortionPart* GetFollow() const { return pFollow.get(); };
-    void SetFollow( std::unique_ptr<SwDropPortionPart> pNew ) { pFollow = 
std::move(pNew); };
-    SwFont& GetFont() const { return *pFnt; }
-    TextFrameIndex GetLen() const { return nLen; }
-    sal_uInt16 GetWidth() const { return nWidth; }
-    void SetWidth( sal_uInt16 nNew )  { nWidth = nNew; }
+    SwDropPortionPart* GetFollow() const { return m_pFollow.get(); };
+    void SetFollow( std::unique_ptr<SwDropPortionPart> pNew ) { m_pFollow = 
std::move(pNew); };
+    SwFont& GetFont() const { return *m_pFnt; }
+    TextFrameIndex GetLen() const { return m_nLen; }
+    sal_uInt16 GetWidth() const { return m_nWidth; }
+    void SetWidth( sal_uInt16 nNew )  { m_nWidth = nNew; }
 
     bool GetJoinBorderWithPrev() const { return m_bJoinBorderWithPrev; }
     bool GetJoinBorderWithNext() const { return m_bJoinBorderWithNext; }
@@ -64,13 +64,13 @@ public:
 class SwDropPortion : public SwTextPortion
 {
     friend class SwDropCapCache;
-    std::unique_ptr<SwDropPortionPart> pPart; // due to script/attribute 
changes
-    sal_uInt16 nLines;          // Line count
-    sal_uInt16 nDropHeight;     // Height
-    sal_uInt16 nDropDescent;    // Distance to the next line
-    sal_uInt16 nDistance;       // Distance to the text
-    sal_uInt16 nFix;            // Fixed position
-    short nY;               // Y Offset
+    std::unique_ptr<SwDropPortionPart> m_pPart; // due to script/attribute 
changes
+    sal_uInt16 m_nLines;          // Line count
+    sal_uInt16 m_nDropHeight;     // Height
+    sal_uInt16 m_nDropDescent;    // Distance to the next line
+    sal_uInt16 m_nDistance;       // Distance to the text
+    sal_uInt16 m_nFix;            // Fixed position
+    short m_nY;               // Y Offset
 
     bool FormatText( SwTextFormatInfo &rInf );
     void PaintText( const SwTextPaintInfo &rInf ) const;
@@ -88,18 +88,18 @@ public:
     virtual SwPosSize GetTextSize( const SwTextSizeInfo &rInfo ) const 
override;
     virtual TextFrameIndex GetModelPositionForViewPoint(sal_uInt16 nOfst) 
const override;
 
-    sal_uInt16 GetLines() const { return nLines; }
-    sal_uInt16 GetDistance() const { return nDistance; }
-    sal_uInt16 GetDropHeight() const { return nDropHeight; }
-    sal_uInt16 GetDropDescent() const { return nDropDescent; }
-    sal_uInt16 GetDropLeft() const { return Width() + nFix; }
+    sal_uInt16 GetLines() const { return m_nLines; }
+    sal_uInt16 GetDistance() const { return m_nDistance; }
+    sal_uInt16 GetDropHeight() const { return m_nDropHeight; }
+    sal_uInt16 GetDropDescent() const { return m_nDropDescent; }
+    sal_uInt16 GetDropLeft() const { return Width() + m_nFix; }
 
-    SwDropPortionPart* GetPart() const { return pPart.get(); }
-    void SetPart( std::unique_ptr<SwDropPortionPart> pNew ) { pPart = 
std::move(pNew); }
+    SwDropPortionPart* GetPart() const { return m_pPart.get(); }
+    void SetPart( std::unique_ptr<SwDropPortionPart> pNew ) { m_pPart = 
std::move(pNew); }
 
-    void SetY( short nNew )  { nY = nNew; }
+    void SetY( short nNew )  { m_nY = nNew; }
 
-    SwFont* GetFnt() const { return pPart ? &pPart->GetFont() : nullptr; }
+    SwFont* GetFnt() const { return m_pPart ? &m_pPart->GetFont() : nullptr; }
 
     static void DeleteDropCapCache();
 };
diff --git a/sw/source/core/text/porftn.hxx b/sw/source/core/text/porftn.hxx
index bbaad2aa751b..a5ecda64d072 100644
--- a/sw/source/core/text/porftn.hxx
+++ b/sw/source/core/text/porftn.hxx
@@ -29,15 +29,15 @@ class SwTextFootnote;
 
 class SwFootnotePortion : public SwFieldPortion
 {
-    SwTextFootnote *pFootnote;
-    sal_uInt16 nOrigHeight;
+    SwTextFootnote *m_pFootnote;
+    sal_uInt16 m_nOrigHeight;
     // #i98418#
     bool mbPreferredScriptTypeSet;
     SwFontScript mnPreferredScriptType;
 public:
     SwFootnotePortion( const OUString &rExpand, SwTextFootnote *pFootnote,
                   sal_uInt16 nOrig = USHRT_MAX );
-    sal_uInt16& Orig() { return nOrigHeight; }
+    sal_uInt16& Orig() { return m_nOrigHeight; }
 
     virtual void Paint( const SwTextPaintInfo &rInf ) const override;
     virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) 
const override;
@@ -47,7 +47,7 @@ public:
     // #i98418#
     void SetPreferredScriptType( SwFontScript nPreferredScriptType );
 
-    const SwTextFootnote* GetTextFootnote() const { return pFootnote; };
+    const SwTextFootnote* GetTextFootnote() const { return m_pFootnote; };
 };
 
 class SwFootnoteNumPortion : public SwNumberPortion
@@ -66,16 +66,16 @@ public:
  */
 class SwQuoVadisPortion : public SwFieldPortion
 {
-    OUString   aErgo;
+    OUString   m_aErgo;
 public:
     SwQuoVadisPortion( const OUString &rExp, const OUString& rStr );
     virtual bool Format( SwTextFormatInfo &rInf ) override;
     virtual void Paint( const SwTextPaintInfo &rInf ) const override;
     virtual bool GetExpText( const SwTextSizeInfo &rInf, OUString &rText ) 
const override;
 
-    void SetNumber( const OUString& rStr ) { aErgo = rStr; }
+    void SetNumber( const OUString& rStr ) { m_aErgo = rStr; }
     const OUString& GetQuoText() const { return m_aExpand; }
-    const OUString &GetContText() const { return aErgo; }
+    const OUString &GetContText() const { return m_aErgo; }
 
     // Field cloner for SplitGlue
     virtual SwFieldPortion *Clone( const OUString &rExpand ) const override;
diff --git a/sw/source/core/text/txtdrop.cxx b/sw/source/core/text/txtdrop.cxx
index 8e4a72e6de60..ecd0e19c233c 100644
--- a/sw/source/core/text/txtdrop.cxx
+++ b/sw/source/core/text/txtdrop.cxx
@@ -96,8 +96,8 @@ SwDropSave::~SwDropSave()
 /// SwDropPortionPart DTor
 SwDropPortionPart::~SwDropPortionPart()
 {
-    pFollow.reset();
-    pFnt.reset();
+    m_pFollow.reset();
+    m_pFnt.reset();
 }
 
 /// SwDropPortion CTor, DTor
@@ -105,19 +105,19 @@ SwDropPortion::SwDropPortion( const sal_uInt16 nLineCnt,
                               const sal_uInt16 nDrpHeight,
                               const sal_uInt16 nDrpDescent,
                               const sal_uInt16 nDist )
-  : nLines( nLineCnt ),
-    nDropHeight(nDrpHeight),
-    nDropDescent(nDrpDescent),
-    nDistance(nDist),
-    nFix(0),
-    nY(0)
+  : m_nLines( nLineCnt ),
+    m_nDropHeight(nDrpHeight),
+    m_nDropDescent(nDrpDescent),
+    m_nDistance(nDist),
+    m_nFix(0),
+    m_nY(0)
 {
     SetWhichPor( PortionType::Drop );
 }
 
 SwDropPortion::~SwDropPortion()
 {
-    pPart.reset();
+    m_pPart.reset();
 }
 
 /// nWishLen = 0 indicates that we want a whole word
@@ -299,7 +299,7 @@ bool SwTextNode::GetDropSize(int& rFontHeight, int& 
rDropHeight, int& rDropDesce
 /// Manipulate the width, otherwise the chars are being stretched
 void SwDropPortion::PaintText( const SwTextPaintInfo &rInf ) const
 {
-    OSL_ENSURE( nDropHeight && pPart && nLines != 1, "Drop Portion painted 
twice" );
+    OSL_ENSURE( m_nDropHeight && m_pPart && m_nLines != 1, "Drop Portion 
painted twice" );
 
     const SwDropPortionPart* pCurrPart = GetPart();
     const TextFrameIndex nOldLen = GetLen();
@@ -307,8 +307,8 @@ void SwDropPortion::PaintText( const SwTextPaintInfo &rInf 
) const
     const sal_uInt16 nOldAscent = GetAscent();
 
     const SwTwips nBasePosY  = rInf.Y();
-    const_cast<SwTextPaintInfo&>(rInf).Y( nBasePosY + nY );
-    const_cast<SwDropPortion*>(this)->SetAscent( nOldAscent + nY );
+    const_cast<SwTextPaintInfo&>(rInf).Y( nBasePosY + m_nY );
+    const_cast<SwDropPortion*>(this)->SetAscent( nOldAscent + m_nY );
     SwDropSave aSave( rInf );
     // for text inside drop portions we let vcl handle the text directions
     SwLayoutModeModifier aLayoutModeModifier( *rInf.GetOut() );
@@ -348,7 +348,7 @@ void SwDropPortion::PaintText( const SwTextPaintInfo &rInf 
) const
 void SwDropPortion::PaintDrop( const SwTextPaintInfo &rInf ) const
 {
     // normal output is being done during the normal painting
-    if( ! nDropHeight || ! pPart || nLines == 1 )
+    if( ! m_nDropHeight || ! m_pPart || m_nLines == 1 )
         return;
 
     // set the lying values
@@ -363,11 +363,11 @@ void SwDropPortion::PaintDrop( const SwTextPaintInfo 
&rInf ) const
     // make good for retouching
 
     // Set baseline
-    const_cast<SwTextPaintInfo&>(rInf).Y( aOutPos.Y() + nDropHeight );
+    const_cast<SwTextPaintInfo&>(rInf).Y( aOutPos.Y() + m_nDropHeight );
 
     // for background
-    const_cast<SwDropPortion*>(this)->Height( nDropHeight + nDropDescent );
-    const_cast<SwDropPortion*>(this)->SetAscent( nDropHeight );
+    const_cast<SwDropPortion*>(this)->Height( m_nDropHeight + m_nDropDescent );
+    const_cast<SwDropPortion*>(this)->SetAscent( m_nDropHeight );
 
     // Always adapt Clipregion to us, never set it off using the existing 
ClipRect
     // as that could be set for the line
@@ -393,7 +393,7 @@ void SwDropPortion::PaintDrop( const SwTextPaintInfo &rInf 
) const
 void SwDropPortion::Paint( const SwTextPaintInfo &rInf ) const
 {
     // normal output is being done here
-    if( !(! nDropHeight || ! pPart || 1 == nLines) )
+    if( !(! m_nDropHeight || ! m_pPart || 1 == m_nLines) )
         return;
 
     if ( rInf.OnWin() &&
@@ -982,12 +982,12 @@ void SwDropCapCache::CalcFontSize( SwDropPortion* pDrop, 
SwTextFormatInfo &rInf
 bool SwDropPortion::Format( SwTextFormatInfo &rInf )
 {
     bool bFull = false;
-    nFix = static_cast<sal_uInt16>(rInf.X());
+    m_nFix = static_cast<sal_uInt16>(rInf.X());
 
     SwLayoutModeModifier aLayoutModeModifier( *rInf.GetOut() );
     aLayoutModeModifier.SetAuto();
 
-    if( nDropHeight && pPart && nLines!=1 )
+    if( m_nDropHeight && m_pPart && m_nLines!=1 )
     {
         if( !pDropCapCache )
             pDropCapCache = new SwDropCapCache;
@@ -998,7 +998,7 @@ bool SwDropPortion::Format( SwTextFormatInfo &rInf )
         const tools::Long nOldX = rInf.X();
         {
             SwDropSave aSave( rInf );
-            SwDropPortionPart* pCurrPart = pPart.get();
+            SwDropPortionPart* pCurrPart = m_pPart.get();
 
             while ( pCurrPart )
             {
@@ -1037,7 +1037,7 @@ bool SwDropPortion::Format( SwTextFormatInfo &rInf )
 
         // Quit when Flys are overlapping
         if( ! bFull )
-            bFull = lcl_IsDropFlyInter( rInf, Width(), nDropHeight );
+            bFull = lcl_IsDropFlyInter( rInf, Width(), m_nDropHeight );
 
         if( bFull )
         {
@@ -1046,8 +1046,8 @@ bool SwDropPortion::Format( SwTextFormatInfo &rInf )
                 Height( rInf.GetTextHeight() );
 
             // And now for another round
-            nDropHeight = nLines = 0;
-            pPart.reset();
+            m_nDropHeight = m_nLines = 0;
+            m_pPart.reset();
 
             // Meanwhile use normal formatting
             bFull = SwTextPortion::Format( rInf );
@@ -1062,16 +1062,16 @@ bool SwDropPortion::Format( SwTextFormatInfo &rInf )
         bFull = SwTextPortion::Format( rInf );
 
     if( bFull )
-        nDistance = 0;
+        m_nDistance = 0;
     else
     {
         const sal_uInt16 nWant = Width() + GetDistance();
         const sal_uInt16 nRest = static_cast<sal_uInt16>(rInf.Width() - 
rInf.X());
         if( ( nWant > nRest ) ||
-            lcl_IsDropFlyInter( rInf, Width() + GetDistance(), nDropHeight ) )
-            nDistance = 0;
+            lcl_IsDropFlyInter( rInf, Width() + GetDistance(), m_nDropHeight ) 
)
+            m_nDistance = 0;
 
-        Width( Width() + nDistance );
+        Width( Width() + m_nDistance );
     }
     return bFull;
 }
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index ea326a91ae3f..a7bf0fbcb7b6 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -1346,8 +1346,8 @@ SwFootnoteSave::~SwFootnoteSave() COVERITY_NOEXCEPT_FALSE
 SwFootnotePortion::SwFootnotePortion( const OUString &rExpand,
                             SwTextFootnote *pFootn, sal_uInt16 nReal )
         : SwFieldPortion( rExpand, nullptr )
-        , pFootnote(pFootn)
-        , nOrigHeight( nReal )
+        , m_pFootnote(pFootn)
+        , m_nOrigHeight( nReal )
         // #i98418#
         , mbPreferredScriptTypeSet( false )
         , mnPreferredScriptType( SwFontScript::Latin )
@@ -1366,7 +1366,7 @@ bool SwFootnotePortion::Format( SwTextFormatInfo &rInf )
 {
     // #i98418#
 //    SwFootnoteSave aFootnoteSave( rInf, pFootnote );
-    SwFootnoteSave aFootnoteSave( rInf, pFootnote, mbPreferredScriptTypeSet, 
mnPreferredScriptType );
+    SwFootnoteSave aFootnoteSave( rInf, m_pFootnote, mbPreferredScriptTypeSet, 
mnPreferredScriptType );
     // the idx is manipulated in SwExpandPortion::Format
     // this flag indicates, that a footnote is allowed to trigger
     // an underflow during SwTextGuess::Guess
@@ -1385,7 +1385,7 @@ void SwFootnotePortion::Paint( const SwTextPaintInfo 
&rInf ) const
 {
     // #i98418#
 //    SwFootnoteSave aFootnoteSave( rInf, pFootnote );
-    SwFootnoteSave aFootnoteSave( rInf, pFootnote, mbPreferredScriptTypeSet, 
mnPreferredScriptType );
+    SwFootnoteSave aFootnoteSave( rInf, m_pFootnote, mbPreferredScriptTypeSet, 
mnPreferredScriptType );
     rInf.DrawViewOpt( *this, PortionType::Footnote );
     SwExpandPortion::Paint( rInf );
 }
@@ -1394,7 +1394,7 @@ SwPosSize SwFootnotePortion::GetTextSize( const 
SwTextSizeInfo &rInfo ) const
 {
     // #i98418#
 //    SwFootnoteSave aFootnoteSave( rInfo, pFootnote );
-    SwFootnoteSave aFootnoteSave( rInfo, pFootnote, mbPreferredScriptTypeSet, 
mnPreferredScriptType );
+    SwFootnoteSave aFootnoteSave( rInfo, m_pFootnote, 
mbPreferredScriptTypeSet, mnPreferredScriptType );
     return SwExpandPortion::GetTextSize( rInfo );
 }
 
@@ -1407,11 +1407,11 @@ void SwFootnotePortion::SetPreferredScriptType( 
SwFontScript nPreferredScriptTyp
 
 SwFieldPortion *SwQuoVadisPortion::Clone( const OUString &rExpand ) const
 {
-    return new SwQuoVadisPortion( rExpand, aErgo );
+    return new SwQuoVadisPortion( rExpand, m_aErgo );
 }
 
 SwQuoVadisPortion::SwQuoVadisPortion( const OUString &rExp, const OUString& 
rStr )
-    : SwFieldPortion( rExp ), aErgo(rStr)
+    : SwFieldPortion( rExp ), m_aErgo(rStr)
 {
     SetLen(TextFrameIndex(0));
     SetWhichPor( PortionType::QuoVadis );
@@ -1450,13 +1450,13 @@ bool SwQuoVadisPortion::GetExpText( const 
SwTextSizeInfo &, OUString &rText ) co
     // if this QuoVadisPortion has a follow, the follow is responsible for
     // the ergo text.
     if ( ! HasFollow() )
-        rText += aErgo;
+        rText += m_aErgo;
     return true;
 }
 
 void SwQuoVadisPortion::HandlePortion( SwPortionHandler& rPH ) const
 {
-    rPH.Special( GetLen(), m_aExpand + aErgo, GetWhichPor() );
+    rPH.Special( GetLen(), m_aExpand + m_aErgo, GetWhichPor() );
 }
 
 void SwQuoVadisPortion::Paint( const SwTextPaintInfo &rInf ) const
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to