editeng/source/items/borderline.cxx |   40 ++--
 editeng/source/items/frmitems.cxx   |  333 +++++++++++++++++-------------------
 include/editeng/borderline.hxx      |    6 
 include/editeng/boxitem.hxx         |  116 +++++++-----
 4 files changed, 254 insertions(+), 241 deletions(-)

New commits:
commit 358668852337fac9535a12c0150ee8ffc83c666b
Author:     Tomaž Vajngerl <[email protected]>
AuthorDate: Fri May 12 16:05:36 2023 +0900
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Tue Jun 6 02:20:38 2023 +0200

    prefix members and cleanup SvxBoxItem, SvxBoxInfoItem
    
    Change-Id: I9f3d36257175a5118a2b8ddca981815b24b8d243
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151718
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <[email protected]>
    (cherry picked from commit ef106661fcc40cfdd406064cbf73fd62477d0e79)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152624
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/editeng/source/items/frmitems.cxx 
b/editeng/source/items/frmitems.cxx
index 890d74a75510..82e81f59d9e4 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -1283,29 +1283,23 @@ void SvxShadowItem::dumpAsXml(xmlTextWriterPtr pWriter) 
const
 
 // class SvxBoxItem ------------------------------------------------------
 
-SvxBoxItem::SvxBoxItem( const SvxBoxItem& rCpy ) :
-
-    SfxPoolItem ( rCpy ),
-    pTop        ( rCpy.pTop     ? new SvxBorderLine( *rCpy.pTop )    : nullptr 
),
-    pBottom     ( rCpy.pBottom  ? new SvxBorderLine( *rCpy.pBottom ) : nullptr 
),
-    pLeft       ( rCpy.pLeft    ? new SvxBorderLine( *rCpy.pLeft )   : nullptr 
),
-    pRight      ( rCpy.pRight   ? new SvxBorderLine( *rCpy.pRight )  : nullptr 
),
-    nTopDist    ( rCpy.nTopDist ),
-    nBottomDist ( rCpy.nBottomDist ),
-    nLeftDist   ( rCpy.nLeftDist ),
-    nRightDist  ( rCpy.nRightDist ),
-    bRemoveAdjCellBorder ( rCpy.bRemoveAdjCellBorder )
+SvxBoxItem::SvxBoxItem(const SvxBoxItem& rCopy)
+    : SfxPoolItem (rCopy)
+    , mpTopBorderLine(rCopy.mpTopBorderLine ? new 
SvxBorderLine(*rCopy.mpTopBorderLine) : nullptr)
+    , mpBottomBorderLine(rCopy.mpBottomBorderLine ? new 
SvxBorderLine(*rCopy.mpBottomBorderLine) : nullptr)
+    , mpLeftBorderLine(rCopy.mpLeftBorderLine ? new 
SvxBorderLine(*rCopy.mpLeftBorderLine) : nullptr)
+    , mpRightBorderLine(rCopy.mpRightBorderLine ? new 
SvxBorderLine(*rCopy.mpRightBorderLine) : nullptr)
+    , mnTopDistance(rCopy.mnTopDistance)
+    , mnBottomDistance(rCopy.mnBottomDistance)
+    , mnLeftDistance(rCopy.mnLeftDistance)
+    , mnRightDistance(rCopy.mnRightDistance)
+    , mbRemoveAdjCellBorder(rCopy.mbRemoveAdjCellBorder)
 {
 }
 
 
-SvxBoxItem::SvxBoxItem( const sal_uInt16 nId ) :
-    SfxPoolItem( nId ),
-    nTopDist    ( 0 ),
-    nBottomDist ( 0 ),
-    nLeftDist   ( 0 ),
-    nRightDist  ( 0 ),
-    bRemoveAdjCellBorder ( false )
+SvxBoxItem::SvxBoxItem(const sal_uInt16 nId)
+    : SfxPoolItem(nId)
 {
 }
 
@@ -1318,13 +1312,13 @@ void SvxBoxItem::dumpAsXml(xmlTextWriterPtr pWriter) 
const
 {
     (void)xmlTextWriterStartElement(pWriter, BAD_CAST("SvxBoxItem"));
     (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("top-dist"),
-                                      
BAD_CAST(OString::number(nTopDist).getStr()));
+                                      
BAD_CAST(OString::number(mnTopDistance).getStr()));
     (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("bottom-dist"),
-                                      
BAD_CAST(OString::number(nBottomDist).getStr()));
+                                      
BAD_CAST(OString::number(mnBottomDistance).getStr()));
     (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("left-dist"),
-                                      
BAD_CAST(OString::number(nLeftDist).getStr()));
+                                      
BAD_CAST(OString::number(mnLeftDistance).getStr()));
     (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("right-dist"),
-                                      
BAD_CAST(OString::number(nRightDist).getStr()));
+                                      
BAD_CAST(OString::number(mnRightDistance).getStr()));
     SfxPoolItem::dumpAsXml(pWriter);
     (void)xmlTextWriterEndElement(pWriter);
 }
@@ -1346,7 +1340,7 @@ boost::property_tree::ptree SvxBoxItem::dumpAsJSON() const
 }
 
 
-static bool CmpBrdLn( const std::unique_ptr<SvxBorderLine> & pBrd1, const 
SvxBorderLine* pBrd2 )
+static bool CompareBorderLine(const std::unique_ptr<SvxBorderLine> & pBrd1, 
const SvxBorderLine* pBrd2)
 {
     if( pBrd1.get() == pBrd2 )
         return true;
@@ -1362,15 +1356,15 @@ bool SvxBoxItem::operator==( const SfxPoolItem& rAttr ) 
const
 
     const SvxBoxItem& rBoxItem = static_cast<const SvxBoxItem&>(rAttr);
     return (
-        ( nTopDist == rBoxItem.nTopDist ) &&
-        ( nBottomDist == rBoxItem.nBottomDist )   &&
-        ( nLeftDist == rBoxItem.nLeftDist )   &&
-        ( nRightDist == rBoxItem.nRightDist ) &&
-        ( bRemoveAdjCellBorder == rBoxItem.bRemoveAdjCellBorder ) &&
-        CmpBrdLn( pTop, rBoxItem.GetTop() )           &&
-        CmpBrdLn( pBottom, rBoxItem.GetBottom() )     &&
-        CmpBrdLn( pLeft, rBoxItem.GetLeft() )         &&
-        CmpBrdLn( pRight, rBoxItem.GetRight() ) );
+        (mnTopDistance == rBoxItem.mnTopDistance) &&
+        (mnBottomDistance == rBoxItem.mnBottomDistance) &&
+        (mnLeftDistance == rBoxItem.mnLeftDistance) &&
+        (mnRightDistance == rBoxItem.mnRightDistance) &&
+        (mbRemoveAdjCellBorder == rBoxItem.mbRemoveAdjCellBorder ) &&
+        CompareBorderLine(mpTopBorderLine, rBoxItem.GetTop()) &&
+        CompareBorderLine(mpBottomBorderLine, rBoxItem.GetBottom()) &&
+        CompareBorderLine(mpLeftBorderLine, rBoxItem.GetLeft()) &&
+        CompareBorderLine(mpRightBorderLine, rBoxItem.GetRight()));
 }
 
 
@@ -1411,11 +1405,11 @@ bool SvxBoxItem::QueryValue( uno::Any& rVal, sal_uInt8 
nMemberId ) const
                 uno::Any(SvxBoxItem::SvxLineToLine(GetRight(), bConvert)),
                 uno::Any(SvxBoxItem::SvxLineToLine(GetBottom(), bConvert)),
                 uno::Any(SvxBoxItem::SvxLineToLine(GetTop(), bConvert)),
-                uno::Any(static_cast<sal_Int32>(bConvert ? convertTwipToMm100( 
GetSmallestDistance()) : GetSmallestDistance())),
-                uno::Any(static_cast<sal_Int32>(bConvert ? convertTwipToMm100( 
nTopDist ) : nTopDist )),
-                uno::Any(static_cast<sal_Int32>(bConvert ? convertTwipToMm100( 
nBottomDist ) : nBottomDist )),
-                uno::Any(static_cast<sal_Int32>(bConvert ? convertTwipToMm100( 
nLeftDist ) : nLeftDist )),
-                uno::Any(static_cast<sal_Int32>(bConvert ? convertTwipToMm100( 
nRightDist ) : nRightDist ))
+                uno::Any(static_cast<sal_Int32>(bConvert ? 
convertTwipToMm100(GetSmallestDistance()) : GetSmallestDistance())),
+                uno::Any(static_cast<sal_Int32>(bConvert ? 
convertTwipToMm100(mnTopDistance) : mnTopDistance)),
+                uno::Any(static_cast<sal_Int32>(bConvert ? 
convertTwipToMm100(mnBottomDistance) : mnBottomDistance)),
+                uno::Any(static_cast<sal_Int32>(bConvert ? 
convertTwipToMm100(mnLeftDistance) : mnLeftDistance)),
+                uno::Any(static_cast<sal_Int32>(bConvert ? 
convertTwipToMm100(mnRightDistance) : mnRightDistance))
             };
             rVal <<= aSeq;
             return true;
@@ -1441,19 +1435,19 @@ bool SvxBoxItem::QueryValue( uno::Any& rVal, sal_uInt8 
nMemberId ) const
             bDistMember = true;
             break;
         case TOP_BORDER_DISTANCE:
-            nDist = nTopDist;
+            nDist = mnTopDistance;
             bDistMember = true;
             break;
         case BOTTOM_BORDER_DISTANCE:
-            nDist = nBottomDist;
+            nDist = mnBottomDistance;
             bDistMember = true;
             break;
         case LEFT_BORDER_DISTANCE:
-            nDist = nLeftDist;
+            nDist = mnLeftDistance;
             bDistMember = true;
             break;
         case RIGHT_BORDER_DISTANCE:
-            nDist = nRightDist;
+            nDist = mnRightDistance;
             bDistMember = true;
             break;
         case LINE_STYLE:
@@ -1778,112 +1772,111 @@ bool SvxBoxItem::GetPresentation
         {
             rText.clear();
 
-            if ( pTop )
+            if (mpTopBorderLine)
             {
-                rText = pTop->GetValueString( eCoreUnit, ePresUnit, &rIntl ) + 
cpDelimTmp;
+                rText = mpTopBorderLine->GetValueString( eCoreUnit, ePresUnit, 
&rIntl ) + cpDelimTmp;
             }
-            if( !(pTop && pBottom && pLeft && pRight &&
-                  *pTop == *pBottom && *pTop == *pLeft && *pTop == *pRight) )
+            if ( !(mpTopBorderLine && mpBottomBorderLine && mpLeftBorderLine 
&& mpRightBorderLine &&
+                  *mpTopBorderLine == *mpBottomBorderLine &&
+                  *mpTopBorderLine == *mpLeftBorderLine &&
+                  *mpTopBorderLine == *mpRightBorderLine))
             {
-                if ( pBottom )
+                if (mpBottomBorderLine)
                 {
-                    rText += pBottom->GetValueString( eCoreUnit, ePresUnit, 
&rIntl ) + cpDelimTmp;
+                    rText += mpBottomBorderLine->GetValueString( eCoreUnit, 
ePresUnit, &rIntl ) + cpDelimTmp;
                 }
-                if ( pLeft )
+                if (mpLeftBorderLine)
                 {
-                    rText += pLeft->GetValueString( eCoreUnit, ePresUnit, 
&rIntl ) + cpDelimTmp;
+                    rText += mpLeftBorderLine->GetValueString( eCoreUnit, 
ePresUnit, &rIntl ) + cpDelimTmp;
                 }
-                if ( pRight )
+                if (mpRightBorderLine)
                 {
-                    rText += pRight->GetValueString( eCoreUnit, ePresUnit, 
&rIntl ) + cpDelimTmp;
+                    rText += mpRightBorderLine->GetValueString( eCoreUnit, 
ePresUnit, &rIntl ) + cpDelimTmp;
                 }
             }
-            rText += GetMetricText( static_cast<tools::Long>(nTopDist), 
eCoreUnit, ePresUnit, &rIntl );
-            if( nTopDist != nBottomDist || nTopDist != nLeftDist ||
-                nTopDist != nRightDist )
+            rText += GetMetricText( static_cast<tools::Long>(mnTopDistance), 
eCoreUnit, ePresUnit, &rIntl );
+            if (mnTopDistance != mnBottomDistance ||
+                mnTopDistance != mnLeftDistance ||
+                mnTopDistance != mnRightDistance)
             {
                 rText += cpDelimTmp +
-                        GetMetricText( static_cast<tools::Long>(nBottomDist), 
eCoreUnit,
-                                        ePresUnit, &rIntl ) +
+                        GetMetricText( tools::Long(mnBottomDistance), 
eCoreUnit, ePresUnit, &rIntl ) +
                         cpDelimTmp +
-                        GetMetricText( static_cast<tools::Long>(nLeftDist), 
eCoreUnit, ePresUnit, &rIntl ) +
+                        GetMetricText( tools::Long(mnLeftDistance), eCoreUnit, 
ePresUnit, &rIntl ) +
                         cpDelimTmp +
-                        GetMetricText( static_cast<tools::Long>(nRightDist), 
eCoreUnit,
-                                        ePresUnit, &rIntl );
+                        GetMetricText( tools::Long(mnRightDistance), 
eCoreUnit, ePresUnit, &rIntl );
             }
             return true;
         }
         case SfxItemPresentation::Complete:
         {
-            if( !(pTop || pBottom || pLeft || pRight) )
+            if (!(mpTopBorderLine || mpBottomBorderLine || mpLeftBorderLine || 
mpRightBorderLine))
             {
                 rText = EditResId(RID_SVXITEMS_BORDER_NONE) + cpDelimTmp;
             }
             else
             {
                 rText = EditResId(RID_SVXITEMS_BORDER_COMPLETE);
-                if( pTop && pBottom && pLeft && pRight &&
-                    *pTop == *pBottom && *pTop == *pLeft && *pTop == *pRight )
+                if (mpTopBorderLine && mpBottomBorderLine && mpLeftBorderLine 
&& mpRightBorderLine &&
+                    *mpTopBorderLine == *mpBottomBorderLine &&
+                    *mpTopBorderLine == *mpLeftBorderLine &&
+                    *mpTopBorderLine == *mpRightBorderLine)
                 {
-                    rText += pTop->GetValueString( eCoreUnit, ePresUnit, 
&rIntl, true ) + cpDelimTmp;
+                    rText += mpTopBorderLine->GetValueString( eCoreUnit, 
ePresUnit, &rIntl, true ) + cpDelimTmp;
                 }
                 else
                 {
-                    if ( pTop )
+                    if (mpTopBorderLine)
                     {
                         rText += EditResId(RID_SVXITEMS_BORDER_TOP) +
-                                pTop->GetValueString( eCoreUnit, ePresUnit, 
&rIntl, true ) +
+                                mpTopBorderLine->GetValueString( eCoreUnit, 
ePresUnit, &rIntl, true ) +
                                 cpDelimTmp;
                     }
-                    if ( pBottom )
+                    if (mpBottomBorderLine)
                     {
                         rText += EditResId(RID_SVXITEMS_BORDER_BOTTOM) +
-                                pBottom->GetValueString( eCoreUnit, ePresUnit, 
&rIntl, true ) +
+                                mpBottomBorderLine->GetValueString( eCoreUnit, 
ePresUnit, &rIntl, true ) +
                                 cpDelimTmp;
                     }
-                    if ( pLeft )
+                    if (mpLeftBorderLine)
                     {
                         rText += EditResId(RID_SVXITEMS_BORDER_LEFT) +
-                                pLeft->GetValueString( eCoreUnit, ePresUnit, 
&rIntl, true ) +
+                                mpLeftBorderLine->GetValueString( eCoreUnit, 
ePresUnit, &rIntl, true ) +
                                 cpDelimTmp;
                     }
-                    if ( pRight )
+                    if (mpRightBorderLine)
                     {
                         rText += EditResId(RID_SVXITEMS_BORDER_RIGHT) +
-                                pRight->GetValueString( eCoreUnit, ePresUnit, 
&rIntl, true ) +
+                                mpRightBorderLine->GetValueString( eCoreUnit, 
ePresUnit, &rIntl, true ) +
                                 cpDelimTmp;
                     }
                 }
             }
 
             rText += EditResId(RID_SVXITEMS_BORDER_DISTANCE);
-            if( nTopDist == nBottomDist && nTopDist == nLeftDist &&
-                nTopDist == nRightDist )
+            if (mnTopDistance == mnBottomDistance &&
+                mnTopDistance == mnLeftDistance &&
+                mnTopDistance == mnRightDistance)
             {
-                rText += GetMetricText( static_cast<tools::Long>(nTopDist), 
eCoreUnit,
-                                            ePresUnit, &rIntl ) +
+                rText += GetMetricText(tools::Long(mnTopDistance), eCoreUnit, 
ePresUnit, &rIntl ) +
                         " " + EditResId(GetMetricId(ePresUnit));
             }
             else
             {
                 rText += EditResId(RID_SVXITEMS_BORDER_TOP) +
-                        GetMetricText( static_cast<tools::Long>(nTopDist), 
eCoreUnit,
-                                        ePresUnit, &rIntl ) +
+                        GetMetricText(tools::Long(mnTopDistance), eCoreUnit, 
ePresUnit, &rIntl) +
                         " " + EditResId(GetMetricId(ePresUnit)) +
                         cpDelimTmp +
                         EditResId(RID_SVXITEMS_BORDER_BOTTOM) +
-                        GetMetricText( static_cast<tools::Long>(nBottomDist), 
eCoreUnit,
-                                        ePresUnit, &rIntl ) +
+                        GetMetricText(tools::Long(mnBottomDistance), 
eCoreUnit, ePresUnit, &rIntl) +
                         " " + EditResId(GetMetricId(ePresUnit)) +
                         cpDelimTmp +
                         EditResId(RID_SVXITEMS_BORDER_LEFT) +
-                        GetMetricText( static_cast<tools::Long>(nLeftDist), 
eCoreUnit,
-                                        ePresUnit, &rIntl ) +
+                        GetMetricText(tools::Long(mnLeftDistance), eCoreUnit, 
ePresUnit, &rIntl) +
                         " " + EditResId(GetMetricId(ePresUnit)) +
                         cpDelimTmp +
                         EditResId(RID_SVXITEMS_BORDER_RIGHT) +
-                        GetMetricText( static_cast<tools::Long>(nRightDist), 
eCoreUnit,
-                                        ePresUnit, &rIntl ) +
+                        GetMetricText(tools::Long(mnRightDistance), eCoreUnit, 
ePresUnit, &rIntl) +
                         " " + EditResId(GetMetricId(ePresUnit));
             }
             return true;
@@ -1896,14 +1889,19 @@ bool SvxBoxItem::GetPresentation
 
 void SvxBoxItem::ScaleMetrics( tools::Long nMult, tools::Long nDiv )
 {
-    if ( pTop )     pTop->ScaleMetrics( nMult, nDiv );
-    if ( pBottom )  pBottom->ScaleMetrics( nMult, nDiv );
-    if ( pLeft )    pLeft->ScaleMetrics( nMult, nDiv );
-    if ( pRight )   pRight->ScaleMetrics( nMult, nDiv );
-    nTopDist = static_cast<sal_Int16>(BigInt::Scale( nTopDist, nMult, nDiv ));
-    nBottomDist = static_cast<sal_Int16>(BigInt::Scale( nBottomDist, nMult, 
nDiv ));
-    nLeftDist = static_cast<sal_Int16>(BigInt::Scale( nLeftDist, nMult, nDiv 
));
-    nRightDist = static_cast<sal_Int16>(BigInt::Scale( nRightDist, nMult, nDiv 
));
+    if (mpTopBorderLine)
+        mpTopBorderLine->ScaleMetrics( nMult, nDiv );
+    if (mpBottomBorderLine)
+        mpBottomBorderLine->ScaleMetrics( nMult, nDiv );
+    if (mpLeftBorderLine)
+        mpLeftBorderLine->ScaleMetrics( nMult, nDiv );
+    if (mpRightBorderLine)
+        mpRightBorderLine->ScaleMetrics( nMult, nDiv );
+
+    mnTopDistance = static_cast<sal_Int16>(BigInt::Scale(mnTopDistance, nMult, 
nDiv));
+    mnBottomDistance = static_cast<sal_Int16>(BigInt::Scale(mnBottomDistance, 
nMult, nDiv));
+    mnLeftDistance = static_cast<sal_Int16>(BigInt::Scale(mnLeftDistance, 
nMult, nDiv));
+    mnRightDistance = static_cast<sal_Int16>(BigInt::Scale(mnRightDistance, 
nMult, nDiv));
 }
 
 
@@ -1920,16 +1918,16 @@ const SvxBorderLine *SvxBoxItem::GetLine( 
SvxBoxItemLine nLine ) const
     switch ( nLine )
     {
         case SvxBoxItemLine::TOP:
-            pRet = pTop.get();
+            pRet = mpTopBorderLine.get();
             break;
         case SvxBoxItemLine::BOTTOM:
-            pRet = pBottom.get();
+            pRet = mpBottomBorderLine.get();
             break;
         case SvxBoxItemLine::LEFT:
-            pRet = pLeft.get();
+            pRet = mpLeftBorderLine.get();
             break;
         case SvxBoxItemLine::RIGHT:
-            pRet = pRight.get();
+            pRet = mpRightBorderLine.get();
             break;
         default:
             OSL_FAIL( "wrong line" );
@@ -1947,16 +1945,16 @@ void SvxBoxItem::SetLine( const SvxBorderLine* pNew, 
SvxBoxItemLine nLine )
     switch ( nLine )
     {
         case SvxBoxItemLine::TOP:
-            pTop = std::move( pTmp );
+            mpTopBorderLine = std::move(pTmp);
             break;
         case SvxBoxItemLine::BOTTOM:
-            pBottom = std::move( pTmp );
+            mpBottomBorderLine = std::move(pTmp);
             break;
         case SvxBoxItemLine::LEFT:
-            pLeft = std::move( pTmp );
+            mpLeftBorderLine = std::move(pTmp);
             break;
         case SvxBoxItemLine::RIGHT:
-            pRight = std::move( pTmp );
+            mpRightBorderLine = std::move(pTmp);
             break;
         default:
             OSL_FAIL( "wrong line" );
@@ -1967,13 +1965,13 @@ void SvxBoxItem::SetLine( const SvxBorderLine* pNew, 
SvxBoxItemLine nLine )
 sal_uInt16 SvxBoxItem::GetSmallestDistance() const
 {
     // The smallest distance that is not 0 will be returned.
-    sal_uInt16 nDist = nTopDist;
-    if( nBottomDist && (!nDist || nBottomDist < nDist) )
-        nDist = nBottomDist;
-    if( nLeftDist && (!nDist || nLeftDist < nDist) )
-        nDist = nLeftDist;
-    if( nRightDist && (!nDist || nRightDist < nDist) )
-        nDist = nRightDist;
+    sal_uInt16 nDist = mnTopDistance;
+    if (mnBottomDistance && (!nDist || mnBottomDistance < nDist))
+        nDist = mnBottomDistance;
+    if (mnLeftDistance && (!nDist || mnLeftDistance < nDist))
+        nDist = mnLeftDistance;
+    if (mnRightDistance && (!nDist || mnRightDistance < nDist))
+        nDist = mnRightDistance;
 
     return nDist;
 }
@@ -1985,16 +1983,16 @@ sal_Int16 SvxBoxItem::GetDistance( SvxBoxItemLine 
nLine, bool bAllowNegative ) c
     switch ( nLine )
     {
         case SvxBoxItemLine::TOP:
-            nDist = nTopDist;
+            nDist = mnTopDistance;
             break;
         case SvxBoxItemLine::BOTTOM:
-            nDist = nBottomDist;
+            nDist = mnBottomDistance;
             break;
         case SvxBoxItemLine::LEFT:
-            nDist = nLeftDist;
+            nDist = mnLeftDistance;
             break;
         case SvxBoxItemLine::RIGHT:
-            nDist = nRightDist;
+            nDist = mnRightDistance;
             break;
         default:
             OSL_FAIL( "wrong line" );
@@ -2013,16 +2011,16 @@ void SvxBoxItem::SetDistance( sal_Int16 nNew, 
SvxBoxItemLine nLine )
     switch ( nLine )
     {
         case SvxBoxItemLine::TOP:
-            nTopDist = nNew;
+            mnTopDistance = nNew;
             break;
         case SvxBoxItemLine::BOTTOM:
-            nBottomDist = nNew;
+            mnBottomDistance = nNew;
             break;
         case SvxBoxItemLine::LEFT:
-            nLeftDist = nNew;
+            mnLeftDistance = nNew;
             break;
         case SvxBoxItemLine::RIGHT:
-            nRightDist = nNew;
+            mnRightDistance = nNew;
             break;
         default:
             OSL_FAIL( "wrong line" );
@@ -2036,16 +2034,16 @@ sal_uInt16 SvxBoxItem::CalcLineWidth( SvxBoxItemLine 
nLine ) const
     switch ( nLine )
     {
     case SvxBoxItemLine::TOP:
-        pTmp = pTop.get();
+        pTmp = mpTopBorderLine.get();
         break;
     case SvxBoxItemLine::BOTTOM:
-        pTmp = pBottom.get();
+        pTmp = mpBottomBorderLine.get();
         break;
     case SvxBoxItemLine::LEFT:
-        pTmp = pLeft.get();
+        pTmp = mpLeftBorderLine.get();
         break;
     case SvxBoxItemLine::RIGHT:
-        pTmp = pRight.get();
+        pTmp = mpRightBorderLine.get();
         break;
     default:
         OSL_FAIL( "wrong line" );
@@ -2064,20 +2062,20 @@ sal_Int16 SvxBoxItem::CalcLineSpace( SvxBoxItemLine 
nLine, bool bEvenIfNoLine, b
     switch ( nLine )
     {
     case SvxBoxItemLine::TOP:
-        pTmp = pTop.get();
-        nDist = nTopDist;
+        pTmp = mpTopBorderLine.get();
+        nDist = mnTopDistance;
         break;
     case SvxBoxItemLine::BOTTOM:
-        pTmp = pBottom.get();
-        nDist = nBottomDist;
+        pTmp = mpBottomBorderLine.get();
+        nDist = mnBottomDistance;
         break;
     case SvxBoxItemLine::LEFT:
-        pTmp = pLeft.get();
-        nDist = nLeftDist;
+        pTmp = mpLeftBorderLine.get();
+        nDist = mnLeftDistance;
         break;
     case SvxBoxItemLine::RIGHT:
-        pTmp = pRight.get();
-        nDist = nRightDist;
+        pTmp = mpRightBorderLine.get();
+        nDist = mnRightDistance;
         break;
     default:
         OSL_FAIL( "wrong line" );
@@ -2108,27 +2106,25 @@ bool SvxBoxItem::HasBorder( bool bTreatPaddingAsBorder 
) const
 
 // class SvxBoxInfoItem --------------------------------------------------
 
-SvxBoxInfoItem::SvxBoxInfoItem( const sal_uInt16 nId ) :
-    SfxPoolItem( nId ),
-    mbEnableHor( false ),
-    mbEnableVer( false ),
-    nDefDist( 0 )
+SvxBoxInfoItem::SvxBoxInfoItem(const sal_uInt16 nId)
+    : SfxPoolItem(nId)
+    , mbDistance(false)
+    , mbMinimumDistance(false)
 {
-    bDist = bMinDist = false;
     ResetFlags();
 }
 
 
-SvxBoxInfoItem::SvxBoxInfoItem( const SvxBoxInfoItem& rCpy ) :
-    SfxPoolItem( rCpy ),
-    pHori( rCpy.pHori ? new SvxBorderLine( *rCpy.pHori ) : nullptr ),
-    pVert( rCpy.pVert ? new SvxBorderLine( *rCpy.pVert ) : nullptr ),
-    mbEnableHor( rCpy.mbEnableHor ),
-    mbEnableVer( rCpy.mbEnableVer ),
-    bDist( rCpy.bDist ),
-    bMinDist ( rCpy.bMinDist ),
-    nValidFlags( rCpy.nValidFlags ),
-    nDefDist( rCpy.nDefDist )
+SvxBoxInfoItem::SvxBoxInfoItem( const SvxBoxInfoItem& rCopy )
+    : SfxPoolItem(rCopy)
+    , mpHorizontalLine(rCopy.mpHorizontalLine ? new 
SvxBorderLine(*rCopy.mpHorizontalLine) : nullptr)
+    , mpVerticalLine(rCopy.mpVerticalLine ? new 
SvxBorderLine(*rCopy.mpVerticalLine) : nullptr)
+    , mbEnableHorizontalLine(rCopy.mbEnableHorizontalLine)
+    , mbEnableVerticalLine(rCopy.mbEnableVerticalLine)
+    , mbDistance(rCopy.mbDistance)
+    , mbMinimumDistance (rCopy.mbMinimumDistance)
+    , mnValidFlags(rCopy.mnValidFlags)
+    , mnDefaultMinimumDistance(rCopy.mnDefaultMinimumDistance)
 {
 }
 
@@ -2158,29 +2154,28 @@ bool SvxBoxInfoItem::operator==( const SfxPoolItem& 
rAttr ) const
 
     const SvxBoxInfoItem& rBoxInfo = static_cast<const SvxBoxInfoItem&>(rAttr);
 
-    return (   mbEnableHor               == rBoxInfo.mbEnableHor
-            && mbEnableVer               == rBoxInfo.mbEnableVer
-            && bDist                     == rBoxInfo.IsDist()
-            && bMinDist                  == rBoxInfo.IsMinDist()
-            && nValidFlags               == rBoxInfo.nValidFlags
-            && nDefDist                  == rBoxInfo.GetDefDist()
-            && CmpBrdLn( pHori, rBoxInfo.GetHori() )
-            && CmpBrdLn( pVert, rBoxInfo.GetVert() )
-           );
+    return (mbEnableHorizontalLine == rBoxInfo.mbEnableHorizontalLine
+            && mbEnableVerticalLine == rBoxInfo.mbEnableVerticalLine
+            && mbDistance == rBoxInfo.mbDistance
+            && mbMinimumDistance == rBoxInfo.mbMinimumDistance
+            && mnValidFlags == rBoxInfo.mnValidFlags
+            && mnDefaultMinimumDistance == rBoxInfo.mnDefaultMinimumDistance
+            && CompareBorderLine(mpHorizontalLine, rBoxInfo.GetHori())
+            && CompareBorderLine(mpVerticalLine, rBoxInfo.GetVert()));
 }
 
 
 void SvxBoxInfoItem::SetLine( const SvxBorderLine* pNew, SvxBoxInfoItemLine 
nLine )
 {
-    std::unique_ptr<SvxBorderLine> pTmp( pNew ? new SvxBorderLine( *pNew ) : 
nullptr );
+    std::unique_ptr<SvxBorderLine> pCopy(pNew ? new SvxBorderLine(*pNew) : 
nullptr);
 
     if ( SvxBoxInfoItemLine::HORI == nLine )
     {
-        pHori = std::move(pTmp);
+        mpHorizontalLine = std::move(pCopy);
     }
     else if ( SvxBoxInfoItemLine::VERT == nLine )
     {
-        pVert = std::move(pTmp);
+        mpVerticalLine = std::move(pCopy);
     }
     else
     {
@@ -2208,9 +2203,11 @@ bool SvxBoxInfoItem::GetPresentation
 
 void SvxBoxInfoItem::ScaleMetrics( tools::Long nMult, tools::Long nDiv )
 {
-    if ( pHori ) pHori->ScaleMetrics( nMult, nDiv );
-    if ( pVert ) pVert->ScaleMetrics( nMult, nDiv );
-    nDefDist = static_cast<sal_uInt16>(BigInt::Scale( nDefDist, nMult, nDiv ));
+    if (mpHorizontalLine)
+        mpHorizontalLine->ScaleMetrics(nMult, nDiv);
+    if (mpVerticalLine)
+        mpVerticalLine->ScaleMetrics(nMult, nDiv);
+    mnDefaultMinimumDistance = 
sal_uInt16(BigInt::Scale(mnDefaultMinimumDistance, nMult, nDiv));
 }
 
 
@@ -2222,7 +2219,7 @@ bool SvxBoxInfoItem::HasMetrics() const
 
 void SvxBoxInfoItem::ResetFlags()
 {
-    nValidFlags = static_cast<SvxBoxInfoItemValidFlags>(0x7F); // all valid 
except Disable
+    mnValidFlags = static_cast<SvxBoxInfoItemValidFlags>(0x7F); // all valid 
except Disable
 }
 
 bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, sal_uInt8 nMemberId ) const
@@ -2244,10 +2241,10 @@ bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, 
sal_uInt8 nMemberId ) const
             if ( IsMinDist() )
                 nVal |= 0x04;
             css::uno::Sequence< css::uno::Any > aSeq{
-                uno::Any(SvxBoxItem::SvxLineToLine( pHori.get(), bConvert)),
-                uno::Any(SvxBoxItem::SvxLineToLine( pVert.get(), bConvert)),
+                uno::Any(SvxBoxItem::SvxLineToLine(mpHorizontalLine.get(), 
bConvert)),
+                uno::Any(SvxBoxItem::SvxLineToLine(mpVerticalLine.get(), 
bConvert)),
                 uno::Any(nVal),
-                uno::Any(static_cast<sal_Int16>(nValidFlags)),
+                uno::Any(static_cast<sal_Int16>(mnValidFlags)),
                 uno::Any(static_cast<sal_Int32>(bConvert ? 
convertTwipToMm100(GetDefDist()) : GetDefDist()))
             };
             rVal <<= aSeq;
@@ -2255,10 +2252,10 @@ bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, 
sal_uInt8 nMemberId ) const
         }
 
         case MID_HORIZONTAL:
-            aRetLine = SvxBoxItem::SvxLineToLine( pHori.get(), bConvert);
+            aRetLine = SvxBoxItem::SvxLineToLine(mpHorizontalLine.get(), 
bConvert);
             break;
         case MID_VERTICAL:
-            aRetLine = SvxBoxItem::SvxLineToLine( pVert.get(), bConvert);
+            aRetLine = SvxBoxItem::SvxLineToLine(mpVerticalLine.get(), 
bConvert);
             break;
         case MID_FLAGS:
             bIntMember = true;
@@ -2272,7 +2269,7 @@ bool SvxBoxInfoItem::QueryValue( uno::Any& rVal, 
sal_uInt8 nMemberId ) const
             break;
         case MID_VALIDFLAGS:
             bIntMember = true;
-            rVal <<= static_cast<sal_Int16>(nValidFlags);
+            rVal <<= static_cast<sal_Int16>(mnValidFlags);
             break;
         case MID_DISTANCE:
             bIntMember = true;
@@ -2317,7 +2314,7 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
                 else
                     return false;
                 if ( aSeq[3] >>= nFlags )
-                    nValidFlags = 
static_cast<SvxBoxInfoItemValidFlags>(nFlags);
+                    mnValidFlags = 
static_cast<SvxBoxInfoItemValidFlags>(nFlags);
                 else
                     return false;
                 if (( aSeq[4] >>= nVal ) && ( nVal >= 0 ))
@@ -2430,7 +2427,7 @@ bool SvxBoxInfoItem::PutValue( const uno::Any& rVal, 
sal_uInt8 nMemberId )
             sal_Int16 nFlags = sal_Int16();
             bRet = (rVal >>= nFlags);
             if ( bRet )
-                nValidFlags = static_cast<SvxBoxInfoItemValidFlags>(nFlags);
+                mnValidFlags = static_cast<SvxBoxInfoItemValidFlags>(nFlags);
             break;
         }
         case MID_DISTANCE:
@@ -2722,7 +2719,7 @@ bool SvxLineItem::operator==( const SfxPoolItem& rAttr ) 
const
 {
     assert(SfxPoolItem::operator==(rAttr));
 
-    return CmpBrdLn( pLine, static_cast<const SvxLineItem&>(rAttr).GetLine() );
+    return CompareBorderLine(pLine, static_cast<const 
SvxLineItem&>(rAttr).GetLine());
 }
 
 SvxLineItem* SvxLineItem::Clone( SfxItemPool* ) const
diff --git a/include/editeng/boxitem.hxx b/include/editeng/boxitem.hxx
index 786821c02ff0..7b1058f570a9 100644
--- a/include/editeng/boxitem.hxx
+++ b/include/editeng/boxitem.hxx
@@ -54,16 +54,17 @@ constexpr sal_uInt16 BOX_BORDER_STYLE_VERSION = 2;
 
 class EDITENG_DLLPUBLIC SvxBoxItem final : public SfxPoolItem
 {
-    std::unique_ptr<editeng::SvxBorderLine>
-                    pTop,
-                    pBottom,
-                    pLeft,
-                    pRight;
-    sal_Int16       nTopDist,
-                    nBottomDist,
-                    nLeftDist,
-                    nRightDist;
-    bool            bRemoveAdjCellBorder;
+    std::unique_ptr<editeng::SvxBorderLine> mpTopBorderLine;
+    std::unique_ptr<editeng::SvxBorderLine> mpBottomBorderLine;
+    std::unique_ptr<editeng::SvxBorderLine> mpLeftBorderLine;
+    std::unique_ptr<editeng::SvxBorderLine> mpRightBorderLine;
+
+    sal_Int16 mnTopDistance = 0;
+    sal_Int16 mnBottomDistance = 0;
+    sal_Int16 mnLeftDistance = 0;
+    sal_Int16 mnRightDistance = 0;
+
+    bool mbRemoveAdjCellBorder = false;
 
 public:
     static SfxPoolItem* CreateDefault();
@@ -87,10 +88,22 @@ public:
     virtual void             ScaleMetrics( tools::Long nMult, tools::Long nDiv 
) override;
     virtual bool             HasMetrics() const override;
 
-    const   editeng::SvxBorderLine* GetTop()    const { return pTop.get(); }
-    const   editeng::SvxBorderLine* GetBottom() const { return pBottom.get(); }
-    const   editeng::SvxBorderLine* GetLeft()   const { return pLeft.get(); }
-    const   editeng::SvxBorderLine* GetRight()  const { return pRight.get(); }
+    const editeng::SvxBorderLine* GetTop() const
+    {
+        return mpTopBorderLine.get();
+    }
+    const editeng::SvxBorderLine* GetBottom() const
+    {
+        return mpBottomBorderLine.get();
+    }
+    const editeng::SvxBorderLine* GetLeft() const
+    {
+        return mpLeftBorderLine.get();
+    }
+    const editeng::SvxBorderLine* GetRight() const
+    {
+        return mpRightBorderLine.get();
+    }
 
     const   editeng::SvxBorderLine* GetLine( SvxBoxItemLine nLine ) const;
 
@@ -100,12 +113,15 @@ public:
     sal_Int16  GetDistance( SvxBoxItemLine nLine, bool bAllowNegative = false 
) const;
     sal_uInt16  GetSmallestDistance() const;
 
-    bool IsRemoveAdjacentCellBorder() const { return bRemoveAdjCellBorder; }
+    bool IsRemoveAdjacentCellBorder() const { return mbRemoveAdjCellBorder; }
 
     void    SetDistance( sal_Int16 nNew, SvxBoxItemLine nLine );
-    inline void SetAllDistances( sal_Int16 nNew );
+    void SetAllDistances(sal_Int16 nNew)
+    {
+        mnTopDistance = mnBottomDistance = mnLeftDistance = mnRightDistance = 
nNew;
+    }
 
-    void SetRemoveAdjacentCellBorder( bool bSet ) { bRemoveAdjCellBorder = 
bSet; }
+    void SetRemoveAdjacentCellBorder( bool bSet ) { mbRemoveAdjCellBorder = 
bSet; }
 
     // Line width plus Space plus inward distance
     // bEvenIfNoLine = TRUE -> Also return distance, when no Line is set
@@ -120,11 +136,6 @@ public:
     void dumpAsXml(xmlTextWriterPtr pWriter) const override;
 };
 
-inline void SvxBoxItem::SetAllDistances(sal_Int16 const nNew)
-{
-    nTopDist = nBottomDist = nLeftDist = nRightDist = nNew;
-}
-
 // class SvxBoxInfoItem --------------------------------------------------
 
 /*  [Description]
@@ -160,11 +171,11 @@ namespace o3tl
 
 class EDITENG_DLLPUBLIC SvxBoxInfoItem final : public SfxPoolItem
 {
-    std::unique_ptr<editeng::SvxBorderLine> pHori;   //inner horizontal Line
-    std::unique_ptr<editeng::SvxBorderLine> pVert;   //inner vertical Line
+    std::unique_ptr<editeng::SvxBorderLine> mpHorizontalLine; //inner 
horizontal Line
+    std::unique_ptr<editeng::SvxBorderLine> mpVerticalLine; //inner vertical 
Line
 
-    bool                mbEnableHor;   /// true = Enable inner horizontal line.
-    bool                mbEnableVer;   /// true = Enable inner vertical line.
+    bool mbEnableHorizontalLine = false; /// true = Enable inner horizontal 
line.
+    bool mbEnableVerticalLine = false; /// true = Enable inner vertical line.
 
     /*
      Currently only for StarWriter: distance inward from SvxBoxItem. If the
@@ -176,11 +187,11 @@ class EDITENG_DLLPUBLIC SvxBoxInfoItem final : public 
SfxPoolItem
      forth to the dialogue.
     */
 
-    bool        bDist      :1;  // TRUE, Unlock Distance.
-    bool        bMinDist   :1;  // TRUE, Going below minimum Distance is 
prohibited
+    bool mbDistance :1;  // TRUE, Unlock Distance.
+    bool mbMinimumDistance :1;  // TRUE, Going below minimum Distance is 
prohibited
 
-    SvxBoxInfoItemValidFlags nValidFlags;
-    sal_uInt16  nDefDist;       // The default or minimum distance.
+    SvxBoxInfoItemValidFlags mnValidFlags;
+    sal_uInt16 mnDefaultMinimumDistance = 0; // The default or minimum 
distance.
 
 public:
     static SfxPoolItem* CreateDefault();
@@ -202,37 +213,42 @@ public:
     virtual void            ScaleMetrics( tools::Long nMult, tools::Long nDiv 
) override;
     virtual bool            HasMetrics() const override;
 
-    const editeng::SvxBorderLine*   GetHori() const { return pHori.get(); }
-    const editeng::SvxBorderLine*   GetVert() const { return pVert.get(); }
+    const editeng::SvxBorderLine*   GetHori() const { return 
mpHorizontalLine.get(); }
+    const editeng::SvxBorderLine*   GetVert() const { return 
mpVerticalLine.get(); }
 
     //The Pointers are being copied!
     void                    SetLine( const editeng::SvxBorderLine* pNew, 
SvxBoxInfoItemLine nLine );
 
-    bool                    IsTable() const             { return mbEnableHor 
&& mbEnableVer; }
-    void                    SetTable( bool bNew )       { mbEnableHor = 
mbEnableVer = bNew; }
+    bool IsTable() const { return mbEnableHorizontalLine && 
mbEnableVerticalLine; }
+    void SetTable(bool bNew) { mbEnableHorizontalLine = mbEnableVerticalLine = 
bNew; }
 
-    bool             IsHorEnabled() const { return mbEnableHor; }
-    void             EnableHor( bool bEnable ) { mbEnableHor = bEnable; }
-    bool             IsVerEnabled() const { return mbEnableVer; }
-    void             EnableVer( bool bEnable ) { mbEnableVer = bEnable; }
+    bool IsHorEnabled() const { return mbEnableHorizontalLine; }
+    void EnableHor( bool bEnable ) { mbEnableHorizontalLine = bEnable; }
+    bool IsVerEnabled() const { return mbEnableVerticalLine; }
+    void EnableVer( bool bEnable ) { mbEnableVerticalLine = bEnable; }
 
-    bool                    IsDist() const              { return bDist; }
-    void                    SetDist( bool bNew )        { bDist = bNew; }
-    bool                    IsMinDist() const           { return bMinDist; }
-    void                    SetMinDist( bool bNew )     { bMinDist = bNew; }
-    sal_uInt16              GetDefDist() const            { return nDefDist; }
-    void                    SetDefDist( sal_uInt16 nNew ) { nDefDist = nNew; }
+    bool IsDist() const { return mbDistance; }
+    void SetDist(bool bNew)
+    {
+        mbDistance = bNew;
+    }
+    bool IsMinDist() const { return mbMinimumDistance; }
+    void SetMinDist(bool bNew) { mbMinimumDistance = bNew; }
+    sal_uInt16 GetDefDist() const { return mnDefaultMinimumDistance; }
+    void SetDefDist(sal_uInt16 nNew) { mnDefaultMinimumDistance = nNew; }
 
-    bool                    IsValid( SvxBoxInfoItemValidFlags nValid ) const
-                                { return bool( nValidFlags & nValid ); }
-    void                    SetValid( SvxBoxInfoItemValidFlags nValid, bool 
bValid = true )
+    bool IsValid( SvxBoxInfoItemValidFlags nValid ) const
+    {
+        return bool(mnValidFlags & nValid);
+    }
+    void SetValid(SvxBoxInfoItemValidFlags nValid, bool bValid = true)
     {
         if (bValid)
-            nValidFlags |= nValid;
+            mnValidFlags |= nValid;
         else
-            nValidFlags &= ~nValid;
+            mnValidFlags &= ~nValid;
     }
-    void                    ResetFlags();
+    void ResetFlags();
 
     virtual boost::property_tree::ptree dumpAsJSON() const override;
 };
commit 48a61d577a87fbd72c61fe45c6e3c97b5b2be262
Author:     Tomaž Vajngerl <[email protected]>
AuthorDate: Wed May 17 14:27:49 2023 +0900
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Tue Jun 6 02:20:31 2023 +0200

    prefix SvxBorderLine aColor attribute
    
    Change-Id: I77f950a88e5875469a95c3ec37716b99328672f8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151855
    Tested-by: Jenkins
    Reviewed-by: Tomaž Vajngerl <[email protected]>
    (cherry picked from commit 028c974cf2fcb9494f42267edf1427cb45342f39)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152605
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/editeng/source/items/borderline.cxx 
b/editeng/source/items/borderline.cxx
index 42d61b5daa43..698fd2b964b0 100644
--- a/editeng/source/items/borderline.cxx
+++ b/editeng/source/items/borderline.cxx
@@ -109,8 +109,8 @@ SvxBorderLine::SvxBorderLine( const Color *pCol, 
tools::Long nWidth,
     , m_bMirrorWidths(false)
     , m_bUseLeftTop(false)
 {
-    if ( pCol )
-        aColor = *pCol;
+    if (pCol)
+        m_aColor = *pCol;
 }
 
 SvxBorderLineStyle
@@ -518,15 +518,15 @@ sal_uInt16 SvxBorderLine::GetDistance() const
 
 bool SvxBorderLine::operator==( const SvxBorderLine& rCmp ) const
 {
-    return ( ( aColor    == rCmp.aColor )            &&
-             ( m_nWidth == rCmp.m_nWidth )           &&
-             ( m_bMirrorWidths  == rCmp.m_bMirrorWidths )  &&
-             ( m_aWidthImpl  == rCmp.m_aWidthImpl )  &&
-             ( m_nStyle == rCmp.GetBorderLineStyle()) &&
-             ( m_bUseLeftTop == rCmp.m_bUseLeftTop ) &&
-             ( m_pColorOutFn == rCmp.m_pColorOutFn ) &&
-             ( m_pColorInFn == rCmp.m_pColorInFn )   &&
-             ( m_pColorGapFn == rCmp.m_pColorGapFn ) );
+    return (m_aColor == rCmp.m_aColor &&
+            m_nWidth == rCmp.m_nWidth &&
+            m_bMirrorWidths == rCmp.m_bMirrorWidths &&
+            m_aWidthImpl == rCmp.m_aWidthImpl &&
+            m_nStyle == rCmp.GetBorderLineStyle() &&
+            m_bUseLeftTop == rCmp.m_bUseLeftTop &&
+            m_pColorOutFn == rCmp.m_pColorOutFn &&
+            m_pColorInFn == rCmp.m_pColorInFn &&
+            m_pColorGapFn == rCmp.m_pColorGapFn);
 }
 
 void SvxBorderLine::SetBorderLineStyle( SvxBorderLineStyle nNew )
@@ -571,14 +571,14 @@ void SvxBorderLine::SetBorderLineStyle( 
SvxBorderLineStyle nNew )
 
 Color SvxBorderLine::GetColorOut( bool bLeftOrTop ) const
 {
-    Color aResult = aColor;
+    Color aResult = m_aColor;
 
     if ( m_aWidthImpl.IsDouble() && m_pColorOutFn != nullptr )
     {
         if ( !bLeftOrTop && m_bUseLeftTop )
-            aResult = (*m_pColorInFn)( aColor );
+            aResult = (*m_pColorInFn)(m_aColor);
         else
-            aResult = (*m_pColorOutFn)( aColor );
+            aResult = (*m_pColorOutFn)(m_aColor);
     }
 
     return aResult;
@@ -586,14 +586,14 @@ Color SvxBorderLine::GetColorOut( bool bLeftOrTop ) const
 
 Color SvxBorderLine::GetColorIn( bool bLeftOrTop ) const
 {
-    Color aResult = aColor;
+    Color aResult = m_aColor;
 
     if ( m_aWidthImpl.IsDouble() && m_pColorInFn != nullptr )
     {
         if ( !bLeftOrTop && m_bUseLeftTop )
-            aResult = (*m_pColorOutFn)( aColor );
+            aResult = (*m_pColorOutFn)(m_aColor);
         else
-            aResult = (*m_pColorInFn)( aColor );
+            aResult = (*m_pColorInFn)(m_aColor);
     }
 
     return aResult;
@@ -601,11 +601,11 @@ Color SvxBorderLine::GetColorIn( bool bLeftOrTop ) const
 
 Color SvxBorderLine::GetColorGap( ) const
 {
-    Color aResult = aColor;
+    Color aResult = m_aColor;
 
     if ( m_aWidthImpl.IsDouble() && m_pColorGapFn != nullptr )
     {
-        aResult = (*m_pColorGapFn)( aColor );
+        aResult = (*m_pColorGapFn)(m_aColor);
     }
 
     return aResult;
@@ -642,7 +642,7 @@ OUString SvxBorderLine::GetValueString(MapUnit eSrcUnit,
         RID_DASH_DOT,
         RID_DASH_DOT_DOT
     };
-    OUString aStr = "(" + ::GetColorString( aColor ) + cpDelim;
+    OUString aStr = "(" + ::GetColorString(m_aColor) + cpDelim;
 
     if ( static_cast<int>(m_nStyle) < int(SAL_N_ELEMENTS(aStyleIds)) )
     {
diff --git a/include/editeng/borderline.hxx b/include/editeng/borderline.hxx
index 6cf1c45120be..affd513e853e 100644
--- a/include/editeng/borderline.hxx
+++ b/include/editeng/borderline.hxx
@@ -153,7 +153,7 @@ class EDITENG_DLLPUBLIC SvxBorderLine final
     Color (*m_pColorInFn)(Color);
     Color (*m_pColorGapFn)(Color);
     BorderWidthImpl m_aWidthImpl;
-    Color aColor;
+    Color m_aColor;
     SvxBorderLineStyle   m_nStyle;
     bool m_bMirrorWidths;
     bool m_bUseLeftTop;
@@ -165,7 +165,7 @@ public:
             Color (*pColorOutFn)( Color ) = &darkColor,
             Color (*pColorInFn)( Color ) = &darkColor );
 
-    const Color&    GetColor() const { return aColor; }
+    const Color&    GetColor() const { return m_aColor; }
     Color           GetColorOut( bool bLeftOrTop = true ) const;
     Color           GetColorIn( bool bLeftOrTop = true ) const;
     bool            HasGapColor() const { return m_pColorGapFn != nullptr; }
@@ -208,7 +208,7 @@ public:
 
     SvxBorderLineStyle  GetBorderLineStyle() const { return m_nStyle; }
 
-    void            SetColor( const Color &rColor ) { aColor = rColor; }
+    void            SetColor( const Color &rColor ) { m_aColor = rColor; }
     void            SetBorderLineStyle( SvxBorderLineStyle nNew );
     void            ScaleMetrics( tools::Long nMult, tools::Long nDiv );
 

Reply via email to