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

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Mon Aug 2 08:47:44 UTC 2021


 sw/source/filter/xml/xmltble.cxx |   44 +++++++++++++++++++--------------------
 sw/source/filter/xml/xmltbli.cxx |   28 ++++++++++++------------
 2 files changed, 36 insertions(+), 36 deletions(-)

New commits:
commit c1f16d3882c60f4a9ffccfc69003e09f19b99abe
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Aug 2 09:14:06 2021 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Aug 2 10:47:07 2021 +0200

    sw: prefix members of SwXMLTableColsContext_Impl, ...
    
    ... SwXMLTableFrameFormatsSort_Impl, SwXMLTableLines_Impl and
    SwXMLTableRowContext_Impl
    
    See tdf#94879 for motivation.
    
    Change-Id: I2a9d92d469e79ff0ca4af4ae9d631479a8080673
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119845
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 90764b3ee19f..4787961efcb4 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -108,23 +108,23 @@ class SwXMLTableColumnsSortByWidth_Impl : public o3tl::sorted_vector<SwXMLTableC
 
 class SwXMLTableLines_Impl
 {
-    SwXMLTableColumns_Impl  aCols;
-    const SwTableLines      *pLines;
-    sal_uInt32              nWidth;
+    SwXMLTableColumns_Impl  m_aCols;
+    const SwTableLines      *m_pLines;
+    sal_uInt32              m_nWidth;
 
 public:
 
     explicit SwXMLTableLines_Impl( const SwTableLines& rLines );
 
-    sal_uInt32 GetWidth() const { return nWidth; }
-    const SwTableLines *GetLines() const { return pLines; }
+    sal_uInt32 GetWidth() const { return m_nWidth; }
+    const SwTableLines *GetLines() const { return m_pLines; }
 
-    const SwXMLTableColumns_Impl& GetColumns() const { return aCols; }
+    const SwXMLTableColumns_Impl& GetColumns() const { return m_aCols; }
 };
 
 SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
-    pLines( &rLines ),
-    nWidth( 0 )
+    m_pLines( &rLines ),
+    m_nWidth( 0 )
 {
 #if OSL_DEBUG_LEVEL > 0
     sal_uInt32 nEndCPos = 0U;
@@ -141,19 +141,19 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
         {
             const SwTableBox *pBox = rBoxes[nBox];
 
-            if( nBox < nBoxes-1U || nWidth==0 )
+            if( nBox < nBoxes-1U || m_nWidth==0 )
             {
                 nCPos = nCPos + SwWriteTable::GetBoxWidth( pBox );
                 std::unique_ptr<SwXMLTableColumn_Impl> pCol(
                     new SwXMLTableColumn_Impl( nCPos ));
 
-                aCols.insert( std::move(pCol) );
+                m_aCols.insert( std::move(pCol) );
 
                 if( nBox==nBoxes-1U )
                 {
-                    OSL_ENSURE( nLine==0U && nWidth==0,
+                    OSL_ENSURE( nLine==0U && m_nWidth==0,
                             "parent width will be lost" );
-                    nWidth = nCPos;
+                    m_nWidth = nCPos;
                 }
             }
             else
@@ -166,10 +166,10 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
                     nEndCPos = nCheckPos;
                 }
 #endif
-                nCPos = nWidth;
+                nCPos = m_nWidth;
 #if OSL_DEBUG_LEVEL > 0
-                SwXMLTableColumn_Impl aCol( nWidth );
-                OSL_ENSURE( aCols.find(&aCol) != aCols.end(), "couldn't find last column" );
+                SwXMLTableColumn_Impl aCol( m_nWidth );
+                OSL_ENSURE( m_aCols.find(&aCol) != m_aCols.end(), "couldn't find last column" );
                 OSL_ENSURE( SwXMLTableColumn_Impl(nCheckPos) ==
                                             SwXMLTableColumn_Impl(nCPos),
                         "rows have different total widths" );
@@ -184,7 +184,7 @@ typedef vector< SwFrameFormat* > SwXMLFrameFormats_Impl;
 class SwXMLTableFrameFormatsSort_Impl
 {
 private:
-    SwXMLFrameFormats_Impl aFormatList;
+    SwXMLFrameFormats_Impl m_aFormatList;
 public:
     bool AddRow( SwFrameFormat& rFrameFormat, std::u16string_view rNamePrefix, sal_uInt32 nLine );
     bool AddCell( SwFrameFormat& rFrameFormat, std::u16string_view rNamePrefix,
@@ -221,7 +221,7 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat,
     // order is: -/brush, size/-, size/brush
     bool bInsert = true;
     SwXMLFrameFormats_Impl::iterator i;
-    for( i = aFormatList.begin(); i < aFormatList.end(); ++i )
+    for( i = m_aFormatList.begin(); i < m_aFormatList.end(); ++i )
     {
         const SwFormatFrameSize *pTestFrameSize = nullptr;
         const SwFormatRowSplit* pTestRowSplit = nullptr;
@@ -308,8 +308,8 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat,
     if( bInsert )
     {
         rFrameFormat.SetName( OUString::Concat(rNamePrefix) + "." + OUString::number(nLine+1) );
-        if ( i != aFormatList.end() ) ++i;
-        aFormatList.insert( i, &rFrameFormat );
+        if ( i != m_aFormatList.end() ) ++i;
+        m_aFormatList.insert( i, &rFrameFormat );
     }
 
     return bInsert;
@@ -374,7 +374,7 @@ bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat,
     //           vert/brush/box/num
     bool bInsert = true;
     SwXMLFrameFormats_Impl::iterator i;
-    for( i = aFormatList.begin(); i < aFormatList.end(); ++i )
+    for( i = m_aFormatList.begin(); i < m_aFormatList.end(); ++i )
     {
         const SwFormatVertOrient *pTestVertOrient = nullptr;
         const SvxBrushItem *pTestBrush = nullptr;
@@ -498,8 +498,8 @@ bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat,
     if( bInsert )
     {
         rFrameFormat.SetName( lcl_xmltble_appendBoxPrefix( rNamePrefix, nCol, nRow, bTop ) );
-        if ( i != aFormatList.end() ) ++i;
-        aFormatList.insert( i, &rFrameFormat );
+        if ( i != m_aFormatList.end() ) ++i;
+        m_aFormatList.insert( i, &rFrameFormat );
     }
 
     return bInsert;
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index ffd284926fcf..8166a7579c0b 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -725,9 +725,9 @@ namespace {
 
 class SwXMLTableColsContext_Impl : public SvXMLImportContext
 {
-    SvXMLImportContextRef   xMyTable;
+    SvXMLImportContextRef   m_xMyTable;
 
-    SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(xMyTable.get()); }
+    SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(m_xMyTable.get()); }
 
 public:
 
@@ -747,7 +747,7 @@ SwXMLTableColsContext_Impl::SwXMLTableColsContext_Impl(
         SwXMLImport& rImport,
         SwXMLTableContext *pTable ) :
     SvXMLImportContext( rImport ),
-    xMyTable( pTable )
+    m_xMyTable( pTable )
 {
 }
 
@@ -769,11 +769,11 @@ namespace {
 
 class SwXMLTableRowContext_Impl : public SvXMLImportContext
 {
-    SvXMLImportContextRef   xMyTable;
+    SvXMLImportContextRef   m_xMyTable;
 
-    sal_uInt32                  nRowRepeat;
+    sal_uInt32                  m_nRowRepeat;
 
-    SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(xMyTable.get()); }
+    SwXMLTableContext *GetTable() { return static_cast<SwXMLTableContext *>(m_xMyTable.get()); }
 
 public:
 
@@ -798,8 +798,8 @@ SwXMLTableRowContext_Impl::SwXMLTableRowContext_Impl( SwXMLImport& rImport,
         SwXMLTableContext *pTable,
         bool bInHead ) :
     SvXMLImportContext( rImport ),
-    xMyTable( pTable ),
-    nRowRepeat( 1 )
+    m_xMyTable( pTable ),
+    m_nRowRepeat( 1 )
 {
     OUString aStyleName, aDfltCellStyleName;
 
@@ -812,11 +812,11 @@ SwXMLTableRowContext_Impl::SwXMLTableRowContext_Impl( SwXMLImport& rImport,
                 break;
             case XML_ELEMENT(STYLE,  XML_NUMBER_ROWS_REPEATED):
             {
-                nRowRepeat = static_cast<sal_uInt32>(std::max<sal_Int32>(1, aIter.toInt32()));
-                if (nRowRepeat > 8192 || (nRowRepeat > 256 && utl::ConfigManager::IsFuzzing()))
+                m_nRowRepeat = static_cast<sal_uInt32>(std::max<sal_Int32>(1, aIter.toInt32()));
+                if (m_nRowRepeat > 8192 || (m_nRowRepeat > 256 && utl::ConfigManager::IsFuzzing()))
                 {
-                    SAL_INFO("sw.xml", "ignoring huge table:number-rows-repeated " << nRowRepeat);
-                    nRowRepeat = 1;
+                    SAL_INFO("sw.xml", "ignoring huge table:number-rows-repeated " << m_nRowRepeat);
+                    m_nRowRepeat = 1;
                 }
                 break;
             }
@@ -839,8 +839,8 @@ void SwXMLTableRowContext_Impl::endFastElement(sal_Int32 )
     {
         GetTable()->FinishRow();
 
-        if( nRowRepeat > 1 )
-            GetTable()->InsertRepRows( nRowRepeat );
+        if( m_nRowRepeat > 1 )
+            GetTable()->InsertRepRows( m_nRowRepeat );
     }
 }
 


More information about the Libreoffice-commits mailing list