sw/source/uibase/inc/tablemgr.hxx            |    8 -
 sw/source/uibase/sidebar/PageFooterPanel.cxx |   14 +--
 sw/source/uibase/sidebar/PageFooterPanel.hxx |    2 
 sw/source/uibase/sidebar/PageFormatPanel.cxx |    8 -
 sw/source/uibase/sidebar/PageFormatPanel.hxx |    2 
 sw/source/uibase/sidebar/PageHeaderPanel.cxx |   14 +--
 sw/source/uibase/sidebar/PageHeaderPanel.hxx |    2 
 sw/source/uibase/table/tablemgr.cxx          |  116 +++++++++++++--------------
 8 files changed, 83 insertions(+), 83 deletions(-)

New commits:
commit d64afaac3411ef74d16ca24cb4b5aa5254ea6f36
Author:     Miklos Vajna <vmik...@collabora.com>
AuthorDate: Mon Jan 17 08:06:45 2022 +0100
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Jan 17 09:00:17 2022 +0100

    sw: prefix members of SwTableFUNC, sw::sidebar::PageFooterPanel, ...
    
    ... sw::sidebar::PageFormatPanel and sw::sidebar::PageHeaderPanel
    
    See tdf#94879 for motivation.
    
    Change-Id: I68ac0ba7d36ae9217a98d90245cac104c636fe1e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128492
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/uibase/inc/tablemgr.hxx 
b/sw/source/uibase/inc/tablemgr.hxx
index 8f30412f9482..d382d29b6c6e 100644
--- a/sw/source/uibase/inc/tablemgr.hxx
+++ b/sw/source/uibase/inc/tablemgr.hxx
@@ -41,9 +41,9 @@ const char cParaDelim = 0x0a;
 
 class SW_DLLPUBLIC SwTableFUNC
 {
-    SwFrameFormat    *pFormat;
-    SwWrtShell  *pSh;
-    SwTabCols   aCols;
+    SwFrameFormat    *m_pFormat;
+    SwWrtShell  *m_pSh;
+    SwTabCols   m_aCols;
 
 private:
     SAL_DLLPRIVATE int GetRightSeparator(int nNum) const;
@@ -60,7 +60,7 @@ public:
     sal_uInt16  GetColCount() const;
     sal_uInt16  GetCurColNum() const;
 
-    SwWrtShell* GetShell() const { return pSh; }
+    SwWrtShell* GetShell() const { return m_pSh; }
 
     // @deprecated
     void UpdateChart();
diff --git a/sw/source/uibase/sidebar/PageFooterPanel.cxx 
b/sw/source/uibase/sidebar/PageFooterPanel.cxx
index 4abe1b471464..5d177bdb27ab 100644
--- a/sw/source/uibase/sidebar/PageFooterPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFooterPanel.cxx
@@ -100,7 +100,7 @@ void PageFooterPanel::Initialize()
 
     SetMarginsAndSpacingFieldUnit();
 
-    aCustomEntry = mxCustomEntry->get_label();
+    m_aCustomEntry = mxCustomEntry->get_label();
     mxFooterToggle->connect_toggled( LINK(this, PageFooterPanel, 
FooterToggleHdl) );
     mxFooterMarginPresetLB->connect_changed( LINK(this, PageFooterPanel, 
FooterLRMarginHdl));
     mxFooterSpacingLB->connect_changed( LINK(this, PageFooterPanel, 
FooterSpacingHdl));
@@ -141,15 +141,15 @@ void PageFooterPanel::UpdateMarginControl()
             if (mxFooterMarginPresetLB->get_id(i).toUInt32() == nLeft)
             {
                 mxFooterMarginPresetLB->set_active(i);
-                int nCustomEntry = 
mxFooterMarginPresetLB->find_text(aCustomEntry);
+                int nCustomEntry = 
mxFooterMarginPresetLB->find_text(m_aCustomEntry);
                 if (nCustomEntry != -1)
                     mxFooterMarginPresetLB->remove(nCustomEntry);
                 return;
             }
         }
     }
-    mxFooterMarginPresetLB->append_text(aCustomEntry);
-    mxFooterMarginPresetLB->set_active_text(aCustomEntry);
+    mxFooterMarginPresetLB->append_text(m_aCustomEntry);
+    mxFooterMarginPresetLB->set_active_text(m_aCustomEntry);
 }
 
 void PageFooterPanel::UpdateSpacingControl()
@@ -161,14 +161,14 @@ void PageFooterPanel::UpdateSpacingControl()
         if (mxFooterSpacingLB->get_id(i).toUInt32() == nBottom)
         {
             mxFooterSpacingLB->set_active(i);
-            int nCustomEntry = mxFooterSpacingLB->find_text(aCustomEntry);
+            int nCustomEntry = mxFooterSpacingLB->find_text(m_aCustomEntry);
             if (nCustomEntry != -1)
                 mxFooterSpacingLB->remove(nCustomEntry);
             return;
         }
     }
-    mxFooterSpacingLB->append_text(aCustomEntry);
-    mxFooterSpacingLB->set_active_text(aCustomEntry);
+    mxFooterSpacingLB->append_text(m_aCustomEntry);
+    mxFooterSpacingLB->set_active_text(m_aCustomEntry);
 }
 
 void PageFooterPanel::UpdateLayoutControl()
diff --git a/sw/source/uibase/sidebar/PageFooterPanel.hxx 
b/sw/source/uibase/sidebar/PageFooterPanel.hxx
index 33294bf5fbb5..6f5397a16cc7 100644
--- a/sw/source/uibase/sidebar/PageFooterPanel.hxx
+++ b/sw/source/uibase/sidebar/PageFooterPanel.hxx
@@ -66,7 +66,7 @@ private:
 
     FieldUnit meFUnit;
 
-    OUString aCustomEntry;
+    OUString m_aCustomEntry;
 
     void Initialize();
     void SetMarginsAndSpacingFieldUnit();
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.cxx 
b/sw/source/uibase/sidebar/PageFormatPanel.cxx
index 3839b7719147..189b43bfbe57 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.cxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.cxx
@@ -130,7 +130,7 @@ void PageFormatPanel::Initialize()
     mxPaperWidth->SetFieldUnit(meFUnit);
     mxPaperHeight->SetFieldUnit(meFUnit);
     SetMarginFieldUnit();
-    aCustomEntry = mxCustomEntry->get_label();
+    m_aCustomEntry = mxCustomEntry->get_label();
 
     
mxPaperWidth->set_max(mxPaperWidth->normalize(SvtOptionsDrawinglayer::GetMaximumPaperWidth()),
 FieldUnit::CM);
     
mxPaperHeight->set_max(mxPaperHeight->normalize(SvtOptionsDrawinglayer::GetMaximumPaperHeight()),
 FieldUnit::CM);
@@ -354,7 +354,7 @@ void PageFormatPanel::UpdateMarginBox()
     mnPageTopMargin = mpPageULMarginItem->GetUpper();
     mnPageBottomMargin = mpPageULMarginItem->GetLower();
 
-    int nCustomEntry = mxMarginSelectBox->find_text(aCustomEntry);
+    int nCustomEntry = mxMarginSelectBox->find_text(m_aCustomEntry);
 
     bool bMirrored = (mpPageItem->GetPageUsage() == SvxPageUsage::Mirror);
     if( IsNone(mnPageLeftMargin, mnPageRightMargin, mnPageTopMargin, 
mnPageBottomMargin, bMirrored) )
@@ -408,8 +408,8 @@ void PageFormatPanel::UpdateMarginBox()
     else
     {
         if (nCustomEntry == -1)
-            mxMarginSelectBox->append_text(aCustomEntry);
-        mxMarginSelectBox->set_active_text(aCustomEntry);
+            mxMarginSelectBox->append_text(m_aCustomEntry);
+        mxMarginSelectBox->set_active_text(m_aCustomEntry);
     }
 }
 
diff --git a/sw/source/uibase/sidebar/PageFormatPanel.hxx 
b/sw/source/uibase/sidebar/PageFormatPanel.hxx
index e5fd689982a8..a1eb2f109bca 100644
--- a/sw/source/uibase/sidebar/PageFormatPanel.hxx
+++ b/sw/source/uibase/sidebar/PageFormatPanel.hxx
@@ -86,7 +86,7 @@ private:
     tools::Long mnPageRightMargin;
     tools::Long mnPageTopMargin;
     tools::Long mnPageBottomMargin;
-    OUString aCustomEntry;
+    OUString m_aCustomEntry;
 
     void Initialize();
     void SetMarginFieldUnit();
diff --git a/sw/source/uibase/sidebar/PageHeaderPanel.cxx 
b/sw/source/uibase/sidebar/PageHeaderPanel.cxx
index bb64c5c651fc..d799247adbc1 100644
--- a/sw/source/uibase/sidebar/PageHeaderPanel.cxx
+++ b/sw/source/uibase/sidebar/PageHeaderPanel.cxx
@@ -103,7 +103,7 @@ void PageHeaderPanel::Initialize()
 
     SetMarginsAndSpacingFieldUnit();
 
-    aCustomEntry = mxCustomEntry->get_label();
+    m_aCustomEntry = mxCustomEntry->get_label();
     mxHeaderToggle->connect_toggled( LINK(this, PageHeaderPanel, 
HeaderToggleHdl) );
     mxHeaderMarginPresetLB->connect_changed( LINK(this, PageHeaderPanel, 
HeaderLRMarginHdl));
     mxHeaderSpacingLB->connect_changed( LINK(this, PageHeaderPanel, 
HeaderSpacingHdl));
@@ -144,15 +144,15 @@ void PageHeaderPanel::UpdateMarginControl()
             if (mxHeaderMarginPresetLB->get_id(i).toUInt32() == nLeft)
             {
                 mxHeaderMarginPresetLB->set_active(i);
-                int nCustomEntry = 
mxHeaderMarginPresetLB->find_text(aCustomEntry);
+                int nCustomEntry = 
mxHeaderMarginPresetLB->find_text(m_aCustomEntry);
                 if (nCustomEntry != -1)
                     mxHeaderMarginPresetLB->remove(nCustomEntry);
                 return;
             }
         }
     }
-    mxHeaderMarginPresetLB->append_text(aCustomEntry);
-    mxHeaderMarginPresetLB->set_active_text(aCustomEntry);
+    mxHeaderMarginPresetLB->append_text(m_aCustomEntry);
+    mxHeaderMarginPresetLB->set_active_text(m_aCustomEntry);
 }
 
 void PageHeaderPanel::UpdateSpacingControl()
@@ -164,14 +164,14 @@ void PageHeaderPanel::UpdateSpacingControl()
         if (mxHeaderSpacingLB->get_id(i).toUInt32() == nBottom)
         {
             mxHeaderSpacingLB->set_active(i);
-            int nCustomEntry = mxHeaderSpacingLB->find_text(aCustomEntry);
+            int nCustomEntry = mxHeaderSpacingLB->find_text(m_aCustomEntry);
             if (nCustomEntry != -1)
                 mxHeaderSpacingLB->remove(nCustomEntry);
             return;
         }
     }
-    mxHeaderSpacingLB->append_text(aCustomEntry);
-    mxHeaderSpacingLB->set_active_text(aCustomEntry);
+    mxHeaderSpacingLB->append_text(m_aCustomEntry);
+    mxHeaderSpacingLB->set_active_text(m_aCustomEntry);
 }
 
 void PageHeaderPanel::UpdateLayoutControl()
diff --git a/sw/source/uibase/sidebar/PageHeaderPanel.hxx 
b/sw/source/uibase/sidebar/PageHeaderPanel.hxx
index 589c959eaafc..7ccd7268c89c 100644
--- a/sw/source/uibase/sidebar/PageHeaderPanel.hxx
+++ b/sw/source/uibase/sidebar/PageHeaderPanel.hxx
@@ -65,7 +65,7 @@ private:
 
     FieldUnit meFUnit;
 
-    OUString aCustomEntry;
+    OUString m_aCustomEntry;
 
     void Initialize();
     void SetMarginsAndSpacingFieldUnit();
diff --git a/sw/source/uibase/table/tablemgr.cxx 
b/sw/source/uibase/table/tablemgr.cxx
index 2c20defc8b66..e062a305a279 100644
--- a/sw/source/uibase/table/tablemgr.cxx
+++ b/sw/source/uibase/table/tablemgr.cxx
@@ -59,39 +59,39 @@ SwTwips SwTableFUNC::GetColWidth(sal_uInt16 nNum) const
 {
     SwTwips nWidth = 0;
 
-    if( aCols.Count() > 0 )
+    if( m_aCols.Count() > 0 )
     {
-        if(aCols.Count() == GetColCount())
+        if(m_aCols.Count() == GetColCount())
         {
-            if(nNum == aCols.Count())
-                nWidth = aCols.GetRight() - aCols[nNum-1];
+            if(nNum == m_aCols.Count())
+                nWidth = m_aCols.GetRight() - m_aCols[nNum-1];
             else
             {
                 if(nNum == 0)
-                    nWidth = aCols[nNum] - aCols.GetLeft();
+                    nWidth = m_aCols[nNum] - m_aCols.GetLeft();
                 else
-                    nWidth = aCols[nNum] - aCols[nNum-1];
+                    nWidth = m_aCols[nNum] - m_aCols[nNum-1];
             }
         }
         else
         {
             SwTwips nRValid = nNum < GetColCount() ?
-                              aCols[GetRightSeparator(nNum)] :
-                              aCols.GetRight();
+                              m_aCols[GetRightSeparator(nNum)] :
+                              m_aCols.GetRight();
             SwTwips nLValid = nNum ?
-                              aCols[GetRightSeparator(nNum - 1)] :
-                              aCols.GetLeft();
+                              m_aCols[GetRightSeparator(nNum - 1)] :
+                              m_aCols.GetLeft();
             nWidth = nRValid - nLValid;
         }
     }
     else
-        nWidth = aCols.GetRight();
+        nWidth = m_aCols.GetRight();
     return nWidth;
 }
 
 SwTwips SwTableFUNC::GetMaxColWidth( sal_uInt16 nNum ) const
 {
-    OSL_ENSURE(nNum <= aCols.Count(), "Index out of Area");
+    OSL_ENSURE(nNum <= m_aCols.Count(), "Index out of Area");
 
     if ( GetColCount() > 0 )
     {
@@ -120,48 +120,48 @@ void SwTableFUNC::SetColWidth(sal_uInt16 nNum, SwTwips 
nNewWidth )
     // move all of the following
     bool bCurrentOnly = false;
 
-    if ( aCols.Count() > 0 )
+    if ( m_aCols.Count() > 0 )
     {
-        if(aCols.Count() != GetColCount())
+        if(m_aCols.Count() != GetColCount())
             bCurrentOnly = true;
         SwTwips nWidth = GetColWidth(nNum);
 
         int nDiff = static_cast<int>(nNewWidth - nWidth);
         if( !nNum )
-            aCols[ GetRightSeparator(0) ] += nDiff;
+            m_aCols[ GetRightSeparator(0) ] += nDiff;
         else if( nNum < GetColCount()  )
         {
             if(nDiff < GetColWidth(nNum + 1) - MINLAY)
-                aCols[ GetRightSeparator(nNum) ] += nDiff;
+                m_aCols[ GetRightSeparator(nNum) ] += nDiff;
             else
             {
                 int nDiffLeft = nDiff - static_cast<int>(GetColWidth(nNum + 
1)) + int(MINLAY);
-                aCols[ GetRightSeparator(nNum) ] += (nDiff - nDiffLeft);
-                aCols[ GetRightSeparator(nNum - 1) ] -= nDiffLeft;
+                m_aCols[ GetRightSeparator(nNum) ] += (nDiff - nDiffLeft);
+                m_aCols[ GetRightSeparator(nNum - 1) ] -= nDiffLeft;
             }
         }
         else
-            aCols[ GetRightSeparator(nNum-1) ] -= nDiff;
+            m_aCols[ GetRightSeparator(nNum-1) ] -= nDiff;
     }
     else
-        aCols.SetRight( std::min( nNewWidth, SwTwips(aCols.GetRightMax()) ) );
+        m_aCols.SetRight( std::min( nNewWidth, SwTwips(m_aCols.GetRightMax()) 
) );
 
-    pSh->StartAllAction();
-    pSh->SetTabCols( aCols, bCurrentOnly );
-    pSh->EndAllAction();
+    m_pSh->StartAllAction();
+    m_pSh->SetTabCols( m_aCols, bCurrentOnly );
+    m_pSh->EndAllAction();
 }
 
 void SwTableFUNC::InitTabCols()
 {
-    OSL_ENSURE(pSh, "no Shell");
+    OSL_ENSURE(m_pSh, "no Shell");
 
-    if( pFormat && pSh)
-        pSh->GetTabCols( aCols );
+    if( m_pFormat && m_pSh)
+        m_pSh->GetTabCols( m_aCols );
 }
 
 SwTableFUNC::SwTableFUNC(SwWrtShell *pShell)
-    : pFormat(pShell->GetTableFormat()),
-      pSh(pShell)
+    : m_pFormat(pShell->GetTableFormat()),
+      m_pSh(pShell)
 {
 }
 
@@ -173,12 +173,12 @@ void SwTableFUNC::UpdateChart()
 {
     //Update of the fields triggered by the user, all Charts of
     //the table will be brought up to date
-    SwFrameFormat *pFormat2 = pSh->GetTableFormat();
-    if ( pFormat2 && pSh->HasOLEObj( pFormat2->GetName() ) )
+    SwFrameFormat *pFormat2 = m_pSh->GetTableFormat();
+    if ( pFormat2 && m_pSh->HasOLEObj( pFormat2->GetName() ) )
     {
-        pSh->StartAllAction();
-        pSh->UpdateCharts( pFormat2->GetName() );
-        pSh->EndAllAction();
+        m_pSh->StartAllAction();
+        m_pSh->UpdateCharts( pFormat2->GetName() );
+        m_pSh->EndAllAction();
     }
 }
 
@@ -189,22 +189,22 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
         SwFlyFrameFormat** ppFlyFrameFormat )
 {
     uno::Reference< frame::XModel > xChartModel;
-    pSh->StartUndo( SwUndoId::UI_INSERT_CHART );
-    pSh->StartAllAction();
+    m_pSh->StartUndo( SwUndoId::UI_INSERT_CHART );
+    m_pSh->StartAllAction();
 
     OUString aName;
-    if (pSh->IsCursorInTable())
+    if (m_pSh->IsCursorInTable())
     {
-        aName = pSh->GetTableFormat()->GetName();
+        aName = m_pSh->GetTableFormat()->GetName();
         // insert node before table
-        pSh->MoveTable( GotoCurrTable, fnTableStart );
-        pSh->Up( false );
-        if ( pSh->IsCursorInTable() )
+        m_pSh->MoveTable( GotoCurrTable, fnTableStart );
+        m_pSh->Up( false );
+        if ( m_pSh->IsCursorInTable() )
         {
-            if ( aName != pSh->GetTableFormat()->GetName() )
-                pSh->Down( false ); // two adjacent tables
+            if ( aName != m_pSh->GetTableFormat()->GetName() )
+                m_pSh->Down( false ); // two adjacent tables
         }
-        pSh->SplitNode();
+        m_pSh->SplitNode();
     }
 
     // insert chart
@@ -218,7 +218,7 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
     {
 
         SwFlyFrameFormat* pTmp = nullptr;
-        pSh->InsertOleObject( aEmbObjRef, &pTmp );
+        m_pSh->InsertOleObject( aEmbObjRef, &pTmp );
         if (ppFlyFrameFormat)
             *ppFlyFrameFormat = pTmp;
 
@@ -235,21 +235,21 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
 
         // set the table name at the OLE-node
         if (!aName.isEmpty())
-            pSh->SetChartName( aName );
+            m_pSh->SetChartName( aName );
     }
-    pSh->EndAllAction();
+    m_pSh->EndAllAction();
 
     if (xObj.is() && !comphelper::LibreOfficeKit::isActive())
     {
         // Let the chart be activated after the inserting (unless
         // via LibreOfficeKit)
-        SfxInPlaceClient* pClient = pSh->GetView().FindIPClient( xObj, 
&pSh->GetView().GetEditWin() );
+        SfxInPlaceClient* pClient = m_pSh->GetView().FindIPClient( xObj, 
&m_pSh->GetView().GetEditWin() );
         if ( !pClient )
         {
-            pClient = new SwOleClient( &pSh->GetView(), 
&pSh->GetView().GetEditWin(), aEmbObjRef );
-            pSh->SetCheckForOLEInCaption( true );
+            pClient = new SwOleClient( &m_pSh->GetView(), 
&m_pSh->GetView().GetEditWin(), aEmbObjRef );
+            m_pSh->SetCheckForOLEInCaption( true );
         }
-        pSh->CalcAndSetScale( aEmbObjRef );
+        m_pSh->CalcAndSetScale( aEmbObjRef );
         //#50270# We don't need to handle errors,
         //this does the DoVerb in the SfxViewShell.
         ErrCode nErr = pClient->DoVerb(embed::EmbedVerbs::MS_OLEVERB_SHOW);
@@ -264,7 +264,7 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
     {
         xDataReceiver->attachDataProvider( rxDataProvider );
 
-        uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( 
pSh->GetView().GetDocShell()->GetModel(), uno::UNO_QUERY );
+        uno::Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( 
m_pSh->GetView().GetDocShell()->GetModel(), uno::UNO_QUERY );
         xDataReceiver->attachNumberFormatsSupplier( xNumberFormatsSupplier );
 
         // default values for ranges that do not consist of a single row or 
column
@@ -310,7 +310,7 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
         xDataReceiver->setArguments( aArgs );
     }
 
-    pSh->EndUndo( SwUndoId::UI_INSERT_CHART );
+    m_pSh->EndUndo( SwUndoId::UI_INSERT_CHART );
 
     if( xChartModel.is() )
         xChartModel->unlockControllers(); //#i79578# don't request a new 
replacement image for charts to often
@@ -319,10 +319,10 @@ uno::Reference< frame::XModel > SwTableFUNC::InsertChart(
 
 sal_uInt16  SwTableFUNC::GetCurColNum() const
 {
-    const size_t nPos = pSh->GetCurTabColNum();
+    const size_t nPos = m_pSh->GetCurTabColNum();
     size_t nCount = 0;
     for( size_t i = 0; i < nPos; i++ )
-        if(aCols.IsHidden(i))
+        if(m_aCols.IsHidden(i))
             nCount ++;
     return nPos - nCount;
 }
@@ -330,10 +330,10 @@ sal_uInt16  SwTableFUNC::GetCurColNum() const
 sal_uInt16  SwTableFUNC::GetColCount() const
 {
     size_t nCount = 0;
-    for(size_t i = 0; i < aCols.Count(); i++ )
-        if(aCols.IsHidden(i))
+    for(size_t i = 0; i < m_aCols.Count(); i++ )
+        if(m_aCols.IsHidden(i))
             nCount ++;
-    return aCols.Count() - nCount;
+    return m_aCols.Count() - nCount;
 }
 
 int SwTableFUNC::GetRightSeparator(int nNum) const
@@ -342,7 +342,7 @@ int SwTableFUNC::GetRightSeparator(int nNum) const
     int i = 0;
     while( nNum >= 0 )
     {
-        if( !aCols.IsHidden(i) )
+        if( !m_aCols.IsHidden(i) )
             nNum--;
         i++;
     }

Reply via email to