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

Miklos Vajna vmiklos at collabora.co.uk
Mon Jun 20 11:02:44 UTC 2016


 sw/source/filter/html/htmltabw.cxx   |   58 +++++-----
 sw/source/filter/inc/wrtswtbl.hxx    |   40 +++----
 sw/source/filter/writer/wrtswtbl.cxx |  198 +++++++++++++++++------------------
 3 files changed, 148 insertions(+), 148 deletions(-)

New commits:
commit aab2af1557d00a76258899c97bc024e85adb0ba0
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon Jun 20 09:15:18 2016 +0200

    sw: prefix members of SwWriteTable
    
    Change-Id: I4e8885b9fd85fdecec4f936c3c306887f1964c4b
    Reviewed-on: https://gerrit.libreoffice.org/26498
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 9582d1f..fb3fa03 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -107,7 +107,7 @@ SwHTMLWrtTable::SwHTMLWrtTable( const SwHTMLTableLayout *pLayoutInfo )
     : SwWriteTable(nullptr, pLayoutInfo)
 {
     // Einige Twip-Werte an Pixel-Grenzen anpassen
-    if( bCollectBorderWidth )
+    if( m_bCollectBorderWidth )
         PixelizeBorders();
 }
 
@@ -126,9 +126,9 @@ void SwHTMLWrtTable::Pixelize( sal_uInt16& rValue )
 
 void SwHTMLWrtTable::PixelizeBorders()
 {
-    Pixelize( nBorder );
-    Pixelize( nCellSpacing );
-    Pixelize( nCellPadding );
+    Pixelize( m_nBorder );
+    Pixelize( m_nCellSpacing );
+    Pixelize( m_nCellPadding );
 }
 
 bool SwHTMLWrtTable::HasTabBackground( const SwTableBox& rBox,
@@ -269,7 +269,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
     if ( !nRowSpan )
         return;
 
-    SwWriteTableCol *pCol = aCols[nCol];
+    SwWriteTableCol *pCol = m_aCols[nCol];
     bool bOutWidth = true;
 
     const SwStartNode* pSttNd = pBox->GetSttNd();
@@ -328,7 +328,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
     sal_uInt32 nPrcWidth = SAL_MAX_UINT32;
     if( bOutWidth )
     {
-        if( bLayoutExport )
+        if( m_bLayoutExport )
         {
             if( pCell->HasPrcWidthOpt() )
             {
@@ -381,7 +381,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
             sOut.append(static_cast<sal_Int32>(aPixelSz.Width()));
         }
         sOut.append("\"");
-        if( !bLayoutExport && nColSpan==1 )
+        if( !m_bLayoutExport && nColSpan==1 )
             pCol->SetOutWidth( false );
     }
 
@@ -572,10 +572,10 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
     // Wert fur RULES bestimmen
     bool bRowsHaveBorder = false;
     bool bRowsHaveBorderOnly = true;
-    SwWriteTableRow *pRow = aRows[0];
-    for( SwWriteTableRows::size_type nRow=1; nRow < aRows.size(); ++nRow )
+    SwWriteTableRow *pRow = m_aRows[0];
+    for( SwWriteTableRows::size_type nRow=1; nRow < m_aRows.size(); ++nRow )
     {
-        SwWriteTableRow *pNextRow = aRows[nRow];
+        SwWriteTableRow *pNextRow = m_aRows[nRow];
         bool bBorder = ( pRow->bBottomBorder || pNextRow->bTopBorder );
         bRowsHaveBorder |= bBorder;
         bRowsHaveBorderOnly &= bBorder;
@@ -595,10 +595,10 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
 
     bool bColsHaveBorder = false;
     bool bColsHaveBorderOnly = true;
-    SwWriteTableCol *pCol = aCols[0];
-    for( SwWriteTableCols::size_type nCol=1; nCol<aCols.size(); ++nCol )
+    SwWriteTableCol *pCol = m_aCols[0];
+    for( SwWriteTableCols::size_type nCol=1; nCol<m_aCols.size(); ++nCol )
     {
-        SwWriteTableCol *pNextCol = aCols[nCol];
+        SwWriteTableCol *pNextCol = m_aCols[nCol];
         bool bBorder = ( pCol->bRightBorder || pNextCol->bLeftBorder );
         bColsHaveBorder |= bBorder;
         bColsHaveBorderOnly &= bBorder;
@@ -642,16 +642,16 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
     }
 
     // WIDTH ausgeben: Stammt aus Layout oder ist berechnet
-    if( nTabWidth )
+    if( m_nTabWidth )
     {
         sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_width).
             append("=\"");
         if( HasRelWidths() )
-            sOut.append(static_cast<sal_Int32>(nTabWidth)).append('%');
+            sOut.append(static_cast<sal_Int32>(m_nTabWidth)).append('%');
         else if( Application::GetDefaultDevice() )
         {
             sal_Int32 nPixWidth = Application::GetDefaultDevice()->LogicToPixel(
-                        Size(nTabWidth,0), MapMode(MAP_TWIP) ).Width();
+                        Size(m_nTabWidth,0), MapMode(MAP_TWIP) ).Width();
             if( !nPixWidth )
                 nPixWidth = 1;
 
@@ -690,11 +690,11 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
 
     // CELLPADDING ausgeben: Stammt aus Layout oder ist berechnet
     sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cellpadding).
-        append("=\"").append(static_cast<sal_Int32>(SwHTMLWriter::ToPixel(nCellPadding,false))).append("\"");
+        append("=\"").append(static_cast<sal_Int32>(SwHTMLWriter::ToPixel(m_nCellPadding,false))).append("\"");
 
     // CELLSPACING ausgeben: Stammt aus Layout oder ist berechnet
     sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_cellspacing).
-        append("=\"").append(static_cast<sal_Int32>(SwHTMLWriter::ToPixel(nCellSpacing,false))).append("\"");
+        append("=\"").append(static_cast<sal_Int32>(SwHTMLWriter::ToPixel(m_nCellSpacing,false))).append("\"");
 
     rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
 
@@ -725,12 +725,12 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
         HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_caption, false );
     }
 
-    const SwWriteTableCols::size_type nCols = aCols.size();
+    const SwWriteTableCols::size_type nCols = m_aCols.size();
 
     // <COLGRP>/<COL> ausgeben: Bei Export ueber Layout nur wenn beim
     // Import welche da waren, sonst immer.
     bool bColGroups = (bColsHaveBorder && !bColsHaveBorderOnly);
-    if( bColTags )
+    if( m_bColTags )
     {
         if( bColGroups )
         {
@@ -744,14 +744,14 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
         {
             rWrt.OutNewLine(); // <COL> in neue Zeile
 
-            const SwWriteTableCol *pColumn = aCols[nCol];
+            const SwWriteTableCol *pColumn = m_aCols[nCol];
 
             OStringBuffer sOutStr;
             sOutStr.append('<').append(OOO_STRING_SVTOOLS_HTML_col);
 
             sal_uInt32 nWidth;
             bool bRel;
-            if( bLayoutExport )
+            if( m_bLayoutExport )
             {
                 bRel = pColumn->HasRelWidthOpt();
                 nWidth = pColumn->GetWidthOpt();
@@ -802,7 +802,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
     // Zeile nur ausgegeben werden, wenn unter der Zeile eine Linie ist
     if( bTHead &&
         (bTSections || bColGroups) &&
-        nHeadEndRow<aRows.size()-1 && !aRows[nHeadEndRow]->bBottomBorder )
+        m_nHeadEndRow<m_aRows.size()-1 && !m_aRows[m_nHeadEndRow]->bBottomBorder )
         bTHead = false;
 
     // <TBODY> aus ausgeben, wenn <THEAD> ausgegeben wird.
@@ -817,12 +817,12 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
         rWrt.IncIndentLevel(); // Inhalt von <THEAD>/<TDATA> einr.
     }
 
-    for( SwWriteTableRows::size_type nRow = 0; nRow < aRows.size(); ++nRow )
+    for( SwWriteTableRows::size_type nRow = 0; nRow < m_aRows.size(); ++nRow )
     {
-        const SwWriteTableRow *pRow2 = aRows[nRow];
+        const SwWriteTableRow *pRow2 = m_aRows[nRow];
 
         OutTableCells( rWrt, pRow2->GetCells(), pRow2->GetBackground() );
-        if( !nCellSpacing && nRow < aRows.size()-1 && pRow2->bBottomBorder &&
+        if( !m_nCellSpacing && nRow < m_aRows.size()-1 && pRow2->bBottomBorder &&
             pRow2->nBottomBorder > DEF_LINE_WIDTH_1 )
         {
             for( auto nCnt = (pRow2->nBottomBorder / DEF_LINE_WIDTH_1) - 1; nCnt; --nCnt )
@@ -833,9 +833,9 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
                                             false );
             }
         }
-        if( ( (bTHead && nRow==nHeadEndRow) ||
+        if( ( (bTHead && nRow==m_nHeadEndRow) ||
               (bTBody && pRow2->bBottomBorder) ) &&
-            nRow < aRows.size()-1 )
+            nRow < m_aRows.size()-1 )
         {
             rWrt.DecIndentLevel(); // Inhalt von <THEAD>/<TDATA> einr.
             rWrt.OutNewLine(); // </THEAD>/</TDATA> in neue Zeile
@@ -843,7 +843,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
                             bTHead ? OOO_STRING_SVTOOLS_HTML_thead : OOO_STRING_SVTOOLS_HTML_tbody, false );
             rWrt.OutNewLine(); // <THEAD>/<TDATA> in neue Zeile
 
-            if( bTHead && nRow==nHeadEndRow )
+            if( bTHead && nRow==m_nHeadEndRow )
                 bTHead = false;
 
             HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(),
diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx
index e518f8c..57bb117 100644
--- a/sw/source/filter/inc/wrtswtbl.hxx
+++ b/sw/source/filter/inc/wrtswtbl.hxx
@@ -223,34 +223,34 @@ class SW_DLLPUBLIC SwWriteTable
 private:
     const SwTable* m_pTable;
 protected:
-    SwWriteTableCols aCols; // alle Spalten
-    SwWriteTableRows aRows; // alle Zellen
+    SwWriteTableCols m_aCols; // alle Spalten
+    SwWriteTableRows m_aRows; // alle Zellen
 
-    sal_uInt32 nBorderColor;        // Umrandungsfarbe
+    sal_uInt32 m_nBorderColor;        // Umrandungsfarbe
 
-    sal_uInt16 nCellSpacing;        // Dicke der inneren Umrandung
-    sal_uInt16 nCellPadding;        // Absatnd Umrandung-Inhalt
+    sal_uInt16 m_nCellSpacing;        // Dicke der inneren Umrandung
+    sal_uInt16 m_nCellPadding;        // Absatnd Umrandung-Inhalt
 
-    sal_uInt16 nBorder;             // Dicke der ausseren Umrandung
-    sal_uInt16 nInnerBorder;        // Dicke der inneren Umrandung
-    sal_uInt32 nBaseWidth;            // Bezugsgroesse fur Breiten SwFormatFrameSize
+    sal_uInt16 m_nBorder;             // Dicke der ausseren Umrandung
+    sal_uInt16 m_nInnerBorder;        // Dicke der inneren Umrandung
+    sal_uInt32 m_nBaseWidth;            // Bezugsgroesse fur Breiten SwFormatFrameSize
 
-    sal_uInt16 nHeadEndRow;         // letzte Zeile des Tabellen-Kopfes
+    sal_uInt16 m_nHeadEndRow;         // letzte Zeile des Tabellen-Kopfes
 
-    sal_uInt16 nLeftSub;
-    sal_uInt16 nRightSub;
+    sal_uInt16 m_nLeftSub;
+    sal_uInt16 m_nRightSub;
 
-    sal_uInt32 nTabWidth;              // Absolute/Relative Breite der Tabelle
+    sal_uInt32 m_nTabWidth;              // Absolute/Relative Breite der Tabelle
 
-    bool bRelWidths : 1;        // Breiten relativ ausgeben?
-    bool bUseLayoutHeights : 1; // Layout zur Hoehenbestimmung nehmen?
+    bool m_bRelWidths : 1;        // Breiten relativ ausgeben?
+    bool m_bUseLayoutHeights : 1; // Layout zur Hoehenbestimmung nehmen?
 #ifdef DBG_UTIL
     bool m_bGetLineHeightCalled : 1;
 #endif
 
-    bool bColTags : 1;
-    bool bLayoutExport : 1;
-    bool bCollectBorderWidth : 1;
+    bool m_bColTags : 1;
+    bool m_bLayoutExport : 1;
+    bool m_bCollectBorderWidth : 1;
 
     virtual bool ShouldExpandSub( const SwTableBox *pBox,
                                 bool bExpandedBefore, sal_uInt16 nDepth ) const;
@@ -276,9 +276,9 @@ protected:
                             sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
                             sal_uInt16 &rTopBorder, sal_uInt16 &rBottomBorder );
 
-    sal_uInt32 GetBaseWidth() const { return nBaseWidth; }
+    sal_uInt32 GetBaseWidth() const { return m_nBaseWidth; }
 
-    bool HasRelWidths() const { return bRelWidths; }
+    bool HasRelWidths() const { return m_bRelWidths; }
 
 public:
     static sal_uInt32 GetBoxWidth( const SwTableBox *pBox );
@@ -306,7 +306,7 @@ public:
     SwWriteTable(const SwTable* pTable, const SwHTMLTableLayout *pLayoutInfo);
     virtual ~SwWriteTable();
 
-    const SwWriteTableRows& GetRows() const { return aRows; }
+    const SwWriteTableRows& GetRows() const { return m_aRows; }
 
     const SwTable* GetTable() const { return m_pTable; }
 };
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index 4dbb131..2836639 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -95,7 +95,7 @@ long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
 #endif
 
     long nHeight = 0;
-    if( bUseLayoutHeights )
+    if( m_bUseLayoutHeights )
     {
         // At first we try to get the height of the layout.
         bool bLayoutAvailable = false;
@@ -107,7 +107,7 @@ long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
         // #i60390# - in some cases we still want to continue
         // to use the layout heights even if one of the rows has a height of 0
         // ('hidden' rows)
-        bUseLayoutHeights = bLayoutAvailable;
+        m_bUseLayoutHeights = bLayoutAvailable;
 
 #ifdef DBG_UTIL
         SAL_WARN_IF( !bLayoutAvailable && bOldGetLineHeightCalled, "sw", "Layout invalid?" );
@@ -190,32 +190,32 @@ const SvxBrushItem *SwWriteTable::GetLineBrush( const SwTableBox *pBox,
 void SwWriteTable::MergeBorders( const SvxBorderLine* pBorderLine,
                                    bool bTable )
 {
-    if( (sal_uInt32)-1 == nBorderColor )
+    if( (sal_uInt32)-1 == m_nBorderColor )
     {
         Color aGrayColor( COL_GRAY );
         if( !pBorderLine->GetColor().IsRGBEqual( aGrayColor ) )
-            nBorderColor = pBorderLine->GetColor().GetColor();
+            m_nBorderColor = pBorderLine->GetColor().GetColor();
     }
 
-    if( !bCollectBorderWidth )
+    if( !m_bCollectBorderWidth )
         return;
 
     const sal_uInt16 nOutWidth = pBorderLine->GetOutWidth();
     if( bTable )
     {
-        if( nOutWidth && (!nBorder || nOutWidth < nBorder) )
-            nBorder = nOutWidth;
+        if( nOutWidth && (!m_nBorder || nOutWidth < m_nBorder) )
+            m_nBorder = nOutWidth;
     }
     else
     {
-        if( nOutWidth && (!nInnerBorder || nOutWidth < nInnerBorder) )
-            nInnerBorder = nOutWidth;
+        if( nOutWidth && (!m_nInnerBorder || nOutWidth < m_nInnerBorder) )
+            m_nInnerBorder = nOutWidth;
     }
 
     const sal_uInt16 nDist = pBorderLine->GetInWidth() ? pBorderLine->GetDistance()
                                                 : 0;
-    if( nDist && (!nCellSpacing || nDist < nCellSpacing) )
-        nCellSpacing = nDist;
+    if( nDist && (!m_nCellSpacing || nDist < m_nCellSpacing) )
+        m_nCellSpacing = nDist;
 }
 
 sal_uInt16 SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
@@ -245,33 +245,33 @@ sal_uInt16 SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
     if( rBoxItem.GetBottom() )
     {
         nBorderMask |= 2;
-        MergeBorders( rBoxItem.GetBottom(), nRow+nRowSpan==aRows.size() );
+        MergeBorders( rBoxItem.GetBottom(), nRow+nRowSpan==m_aRows.size() );
         rBottomBorder = rBoxItem.GetBottom()->GetOutWidth();
     }
 
     if( rBoxItem.GetRight() )
     {
         nBorderMask |= 8;
-        MergeBorders( rBoxItem.GetRight(), nCol+nColSpan==aCols.size() );
+        MergeBorders( rBoxItem.GetRight(), nCol+nColSpan==m_aCols.size() );
     }
 
     // If any distance is set, the smallest one is used. This holds for
     // the four distance of a box as well as for the distances of different
     // boxes.
-    if( bCollectBorderWidth )
+    if( m_bCollectBorderWidth )
     {
         sal_uInt16 nDist = rBoxItem.GetDistance( SvxBoxItemLine::TOP );
-        if( nDist && (!nCellPadding || nDist < nCellPadding) )
-            nCellPadding = nDist;
+        if( nDist && (!m_nCellPadding || nDist < m_nCellPadding) )
+            m_nCellPadding = nDist;
         nDist = rBoxItem.GetDistance( SvxBoxItemLine::BOTTOM );
-        if( nDist && (!nCellPadding || nDist < nCellPadding) )
-            nCellPadding = nDist;
+        if( nDist && (!m_nCellPadding || nDist < m_nCellPadding) )
+            m_nCellPadding = nDist;
         nDist = rBoxItem.GetDistance( SvxBoxItemLine::LEFT );
-        if( nDist && (!nCellPadding || nDist < nCellPadding) )
-            nCellPadding = nDist;
+        if( nDist && (!m_nCellPadding || nDist < m_nCellPadding) )
+            m_nCellPadding = nDist;
         nDist = rBoxItem.GetDistance( SvxBoxItemLine::RIGHT );
-        if( nDist && (!nCellPadding || nDist < nCellPadding) )
-            nCellPadding = nDist;
+        if( nDist && (!m_nCellPadding || nDist < m_nCellPadding) )
+            m_nCellPadding = nDist;
     }
 
     return nBorderMask;
@@ -279,25 +279,25 @@ sal_uInt16 SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
 
 sal_uInt32  SwWriteTable::GetRawWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
 {
-    sal_uInt32 nWidth = aCols[nCol+nColSpan-1]->GetPos();
+    sal_uInt32 nWidth = m_aCols[nCol+nColSpan-1]->GetPos();
     if( nCol > 0 )
-        nWidth = nWidth - aCols[nCol-1]->GetPos();
+        nWidth = nWidth - m_aCols[nCol-1]->GetPos();
 
     return nWidth;
 }
 
 sal_uInt16 SwWriteTable::GetLeftSpace( sal_uInt16 nCol ) const
 {
-    sal_uInt16 nSpace = nCellPadding + nCellSpacing;
+    sal_uInt16 nSpace = m_nCellPadding + m_nCellSpacing;
 
     // Additional subtract the line thickness in the first column.
     if( nCol==0 )
     {
-        nSpace = nSpace + nLeftSub;
+        nSpace = nSpace + m_nLeftSub;
 
-        const SwWriteTableCol *pCol = aCols[nCol];
+        const SwWriteTableCol *pCol = m_aCols[nCol];
         if( pCol->HasLeftBorder() )
-            nSpace = nSpace + nBorder;
+            nSpace = nSpace + m_nBorder;
     }
 
     return nSpace;
@@ -306,17 +306,17 @@ sal_uInt16 SwWriteTable::GetLeftSpace( sal_uInt16 nCol ) const
 sal_uInt16
 SwWriteTable::GetRightSpace(size_t const nCol, sal_uInt16 nColSpan) const
 {
-    sal_uInt16 nSpace = nCellPadding;
+    sal_uInt16 nSpace = m_nCellPadding;
 
     // Additional subtract in the last column CELLSPACING and
     // line thickness once again.
-    if( nCol+nColSpan==aCols.size() )
+    if( nCol+nColSpan==m_aCols.size() )
     {
-        nSpace += (nCellSpacing + nRightSub);
+        nSpace += (m_nCellSpacing + m_nRightSub);
 
-        const SwWriteTableCol *pCol = aCols[nCol+nColSpan-1];
+        const SwWriteTableCol *pCol = m_aCols[nCol+nColSpan-1];
         if( pCol->HasRightBorder() )
-            nSpace = nSpace + nBorder;
+            nSpace = nSpace + m_nBorder;
     }
 
     return nSpace;
@@ -325,10 +325,10 @@ SwWriteTable::GetRightSpace(size_t const nCol, sal_uInt16 nColSpan) const
 sal_uInt16 SwWriteTable::GetAbsWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
 {
     sal_uInt32 nWidth = GetRawWidth( nCol, nColSpan );
-    if( nBaseWidth != nTabWidth )
+    if( m_nBaseWidth != m_nTabWidth )
     {
-        nWidth *= nTabWidth;
-        nWidth /= nBaseWidth;
+        nWidth *= m_nTabWidth;
+        nWidth /= m_nBaseWidth;
     }
 
     nWidth -= GetLeftSpace( nCol ) + GetRightSpace( nCol, nColSpan );
@@ -358,26 +358,26 @@ sal_uInt16 SwWriteTable::GetPrcWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) con
 long SwWriteTable::GetAbsHeight(long nRawHeight, size_t const nRow,
                                    sal_uInt16 nRowSpan ) const
 {
-    nRawHeight -= (2*nCellPadding + nCellSpacing);
+    nRawHeight -= (2*m_nCellPadding + m_nCellSpacing);
 
     // Additional subtract in the first column CELLSPACING and
     // line thickness once again.
     const SwWriteTableRow *pRow = nullptr;
     if( nRow==0 )
     {
-        nRawHeight -= nCellSpacing;
-        pRow = aRows[nRow];
+        nRawHeight -= m_nCellSpacing;
+        pRow = m_aRows[nRow];
         if( pRow->HasTopBorder() )
-            nRawHeight -= nBorder;
+            nRawHeight -= m_nBorder;
     }
 
     // Subtract the line thickness in the last column
-    if( nRow+nRowSpan==aRows.size() )
+    if( nRow+nRowSpan==m_aRows.size() )
     {
         if( !pRow || nRowSpan > 1 )
-            pRow = aRows[nRow+nRowSpan-1];
+            pRow = m_aRows[nRow+nRowSpan-1];
         if( pRow->HasBottomBorder() )
-            nRawHeight -= nBorder;
+            nRawHeight -= m_nBorder;
     }
 
     OSL_ENSURE( nRawHeight > 0, "Row Height <= 0. OK?" );
@@ -431,8 +431,8 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
                 nLineHeight /= nLines - nLine; // divided through the number of remaining sub rows
                 nRPos += nLineHeight;
             }
-            SwWriteTableRow *pRow = new SwWriteTableRow( nRPos, bUseLayoutHeights);
-            if( !aRows.insert( pRow ).second )
+            SwWriteTableRow *pRow = new SwWriteTableRow( nRPos, m_bUseLayoutHeights);
+            if( !m_aRows.insert( pRow ).second )
                 delete pRow;
         }
         else
@@ -442,11 +442,11 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
 #endif
             nRPos = nStartRPos + nParentLineHeight;
 #if OSL_DEBUG_LEVEL > 0
-            SwWriteTableRow aSrchRow( nRPos, bUseLayoutHeights );
-            OSL_ENSURE( aRows.find( &aSrchRow ) != aRows.end(), "Parent-Row not found" );
-            SwWriteTableRow aRowCheckPos(nCheckPos,bUseLayoutHeights);
-            SwWriteTableRow aRowRPos(nRPos,bUseLayoutHeights);
-            OSL_ENSURE( !bUseLayoutHeights ||
+            SwWriteTableRow aSrchRow( nRPos, m_bUseLayoutHeights );
+            OSL_ENSURE( m_aRows.find( &aSrchRow ) != m_aRows.end(), "Parent-Row not found" );
+            SwWriteTableRow aRowCheckPos(nCheckPos,m_bUseLayoutHeights);
+            SwWriteTableRow aRowRPos(nRPos,m_bUseLayoutHeights);
+            OSL_ENSURE( !m_bUseLayoutHeights ||
                     aRowCheckPos == aRowRPos,
                     "Height of the rows does not correspond with the parent" );
 #endif
@@ -468,7 +468,7 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
                 nCPos = nCPos + GetBoxWidth( pBox );
                 SwWriteTableCol *pCol = new SwWriteTableCol( nCPos );
 
-                if( !aCols.insert( pCol ).second )
+                if( !m_aCols.insert( pCol ).second )
                     delete pCol;
 
                 if( nBox==nBoxes-1 )
@@ -497,7 +497,7 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
 
 #if OSL_DEBUG_LEVEL > 0
                 SwWriteTableCol aSrchCol( nCPos );
-                OSL_ENSURE( aCols.find( &aSrchCol ) != aCols.end(),
+                OSL_ENSURE( m_aCols.find( &aSrchCol ) != m_aCols.end(),
                         "Parent-Cell not found" );
                 OSL_ENSURE( SwWriteTableCol(nCheckPos) ==
                                             SwWriteTableCol(nCPos),
@@ -559,12 +559,12 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
 
         // And their index
         sal_uInt16 nOldRow = nRow;
-        SwWriteTableRow aSrchRow( nRPos,bUseLayoutHeights );
-        SwWriteTableRows::const_iterator it2 = aRows.find( &aSrchRow );
+        SwWriteTableRow aSrchRow( nRPos,m_bUseLayoutHeights );
+        SwWriteTableRows::const_iterator it2 = m_aRows.find( &aSrchRow );
 
         // coupled methods out of sync ...
-        assert( it2 != aRows.end() );
-        nRow = it2 - aRows.begin();
+        assert( it2 != m_aRows.end() );
+        nRow = it2 - m_aRows.begin();
 
         OSL_ENSURE( nOldRow <= nRow, "Don't look back!" );
         if( nOldRow > nRow )
@@ -574,10 +574,10 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
                 --nOldRow;
         }
 
-        SwWriteTableRow *pRow = aRows[nOldRow];
-        SwWriteTableRow *pEndRow = aRows[nRow];
+        SwWriteTableRow *pRow = m_aRows[nOldRow];
+        SwWriteTableRow *pEndRow = m_aRows[nRow];
         if( nLine+1==nNumOfHeaderRows && nParentLineHeight==0 )
-            nHeadEndRow = nRow;
+            m_nHeadEndRow = nRow;
 
         const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
 
@@ -602,7 +602,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
             if( !bOutAtRow && nStartCPos==0 )
             {
                 SwWriteTableCol aCol( nParentLineWidth );
-                bOutAtRow = aCols.find( &aCol ) == (aCols.end() - 1);
+                bOutAtRow = m_aCols.find( &aCol ) == (m_aCols.end() - 1);
             }
             if( bOutAtRow )
             {
@@ -640,12 +640,12 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
             // And their index
             sal_uInt16 nOldCol = nCol;
             SwWriteTableCol aSrchCol( nCPos );
-            SwWriteTableCols::const_iterator it = aCols.find( &aSrchCol );
-            OSL_ENSURE( it != aCols.end(), "missing column" );
-            if(it != aCols.end())
+            SwWriteTableCols::const_iterator it = m_aCols.find( &aSrchCol );
+            OSL_ENSURE( it != m_aCols.end(), "missing column" );
+            if(it != m_aCols.end())
             {
                 // if find fails for some nCPos value then it used to set nCol value with size of aCols.
-                nCol = it - aCols.begin();
+                nCol = it - m_aCols.begin();
             }
 
             if( !ShouldExpandSub( pBox, bSubExpanded, nDepth ) )
@@ -674,9 +674,9 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
                     // #i30094# add a sanity check here to ensure that
                     // we don't access an invalid aCols[] as &nCol
                     // above can be changed.
-                    if (!(nBorderMask & 4) && nOldCol < aCols.size())
+                    if (!(nBorderMask & 4) && nOldCol < m_aCols.size())
                     {
-                        SwWriteTableCol *pCol = aCols[nOldCol];
+                        SwWriteTableCol *pCol = m_aCols[nOldCol];
                         OSL_ENSURE(pCol, "No TableCol found, panic!");
                         if (pCol)
                             pCol->bLeftBorder = false;
@@ -684,7 +684,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
 
                     if (!(nBorderMask & 8))
                     {
-                        SwWriteTableCol *pCol = aCols[nCol];
+                        SwWriteTableCol *pCol = m_aCols[nCol];
                         OSL_ENSURE(pCol, "No TableCol found, panic!");
                         if (pCol)
                             pCol->bRightBorder = false;
@@ -725,54 +725,54 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
 
 SwWriteTable::SwWriteTable(const SwTable* pTable, const SwTableLines& rLines, long nWidth,
     sal_uInt32 nBWidth, bool bRel, sal_uInt16 nMaxDepth, sal_uInt16 nLSub, sal_uInt16 nRSub, sal_uInt32 nNumOfRowsToRepeat)
-    : m_pTable(pTable), nBorderColor((sal_uInt32)-1), nCellSpacing(0), nCellPadding(0), nBorder(0),
-    nInnerBorder(0), nBaseWidth(nBWidth), nHeadEndRow(USHRT_MAX),
-     nLeftSub(nLSub), nRightSub(nRSub), nTabWidth(nWidth), bRelWidths(bRel),
-    bUseLayoutHeights(true),
+    : m_pTable(pTable), m_nBorderColor((sal_uInt32)-1), m_nCellSpacing(0), m_nCellPadding(0), m_nBorder(0),
+    m_nInnerBorder(0), m_nBaseWidth(nBWidth), m_nHeadEndRow(USHRT_MAX),
+     m_nLeftSub(nLSub), m_nRightSub(nRSub), m_nTabWidth(nWidth), m_bRelWidths(bRel),
+    m_bUseLayoutHeights(true),
 #ifdef DBG_UTIL
     m_bGetLineHeightCalled(false),
 #endif
-    bColTags(true), bLayoutExport(false),
-    bCollectBorderWidth(true)
+    m_bColTags(true), m_bLayoutExport(false),
+    m_bCollectBorderWidth(true)
 {
-    sal_uInt32 nParentWidth = nBaseWidth + nLeftSub + nRightSub;
+    sal_uInt32 nParentWidth = m_nBaseWidth + m_nLeftSub + m_nRightSub;
 
     // First the table structure set. Behind the table is in each
     // case the end of a column
     SwWriteTableCol *pCol = new SwWriteTableCol( nParentWidth );
-    aCols.insert( pCol );
-    bUseLayoutHeights = true;
+    m_aCols.insert( pCol );
+    m_bUseLayoutHeights = true;
     CollectTableRowsCols( 0, 0, 0, nParentWidth, rLines, nMaxDepth - 1 );
 
     // FIXME: awfully GetLineHeight writes to this in its first call
     // and proceeds to return a rather odd number fdo#62336, we have to
     // behave identically since the code in FillTableRowsCols duplicates
     // and is highly coupled to CollectTableRowsCols - sadly.
-    bUseLayoutHeights = true;
+    m_bUseLayoutHeights = true;
     // And now fill with life
     FillTableRowsCols( 0, 0, 0, 0, 0, nParentWidth, rLines, nullptr, nMaxDepth - 1, static_cast< sal_uInt16 >(nNumOfRowsToRepeat) );
 
     // Adjust some Twip values to pixel boundaries
-    if( !nBorder )
-        nBorder = nInnerBorder;
+    if( !m_nBorder )
+        m_nBorder = m_nInnerBorder;
 }
 
 SwWriteTable::SwWriteTable(const SwTable* pTable, const SwHTMLTableLayout *pLayoutInfo)
-    : m_pTable(pTable), nBorderColor((sal_uInt32)-1), nCellSpacing(0), nCellPadding(0), nBorder(0),
-    nInnerBorder(0), nBaseWidth(pLayoutInfo->GetWidthOption()), nHeadEndRow(0),
-    nLeftSub(0), nRightSub(0), nTabWidth(pLayoutInfo->GetWidthOption()),
-    bRelWidths(pLayoutInfo->HasPrcWidthOption()), bUseLayoutHeights(false),
+    : m_pTable(pTable), m_nBorderColor((sal_uInt32)-1), m_nCellSpacing(0), m_nCellPadding(0), m_nBorder(0),
+    m_nInnerBorder(0), m_nBaseWidth(pLayoutInfo->GetWidthOption()), m_nHeadEndRow(0),
+    m_nLeftSub(0), m_nRightSub(0), m_nTabWidth(pLayoutInfo->GetWidthOption()),
+    m_bRelWidths(pLayoutInfo->HasPrcWidthOption()), m_bUseLayoutHeights(false),
 #ifdef DBG_UTIL
     m_bGetLineHeightCalled(false),
 #endif
-    bColTags(pLayoutInfo->HasColTags()), bLayoutExport(true),
-    bCollectBorderWidth(pLayoutInfo->HaveBordersChanged())
+    m_bColTags(pLayoutInfo->HasColTags()), m_bLayoutExport(true),
+    m_bCollectBorderWidth(pLayoutInfo->HaveBordersChanged())
 {
-    if( !bCollectBorderWidth )
+    if( !m_bCollectBorderWidth )
     {
-        nBorder = pLayoutInfo->GetBorder();
-        nCellPadding = pLayoutInfo->GetCellPadding();
-        nCellSpacing = pLayoutInfo->GetCellSpacing();
+        m_nBorder = pLayoutInfo->GetBorder();
+        m_nCellPadding = pLayoutInfo->GetCellPadding();
+        m_nCellSpacing = pLayoutInfo->GetCellSpacing();
     }
 
     const sal_uInt16 nCols = pLayoutInfo->GetColCount();
@@ -784,7 +784,7 @@ SwWriteTable::SwWriteTable(const SwTable* pTable, const SwHTMLTableLayout *pLayo
         SwWriteTableCol *pCol =
             new SwWriteTableCol( (nCol+1)*COL_DFLT_WIDTH );
 
-        if( bColTags )
+        if( m_bColTags )
         {
             const SwHTMLTableLayoutColumn *pLayoutCol =
                 pLayoutInfo->GetColumn( nCol );
@@ -792,22 +792,22 @@ SwWriteTable::SwWriteTable(const SwTable* pTable, const SwHTMLTableLayout *pLayo
                                pLayoutCol->IsRelWidthOption() );
         }
 
-        aCols.insert( pCol );
+        m_aCols.insert( pCol );
     }
 
     for( sal_uInt16 nRow=0; nRow<nRows; ++nRow )
     {
         SwWriteTableRow *pRow =
-            new SwWriteTableRow( (nRow+1)*ROW_DFLT_HEIGHT, bUseLayoutHeights );
+            new SwWriteTableRow( (nRow+1)*ROW_DFLT_HEIGHT, m_bUseLayoutHeights );
         pRow->nTopBorder = 0;
         pRow->nBottomBorder = 0;
-        aRows.insert( pRow );
+        m_aRows.insert( pRow );
     }
 
     // And now fill with life
     for( sal_uInt16 nRow=0; nRow<nRows; ++nRow )
     {
-        SwWriteTableRow *pRow = aRows[nRow];
+        SwWriteTableRow *pRow = m_aRows[nRow];
 
         bool bHeightExported = false;
         for( sal_uInt16 nCol=0; nCol<nCols; nCol++ )
@@ -847,18 +847,18 @@ SwWriteTable::SwWriteTable(const SwTable* pTable, const SwHTMLTableLayout *pLayo
             MergeBoxBorders( pBox, nRow, nCol, nRowSpan, nColSpan,
                                 nTopBorder, nBottomBorder );
 
-            SwWriteTableCol *pCol = aCols[nCol];
+            SwWriteTableCol *pCol = m_aCols[nCol];
             if( !(nBorderMask & 4) )
                 pCol->bLeftBorder = false;
 
-            pCol = aCols[nCol+nColSpan-1];
+            pCol = m_aCols[nCol+nColSpan-1];
             if( !(nBorderMask & 8) )
                 pCol->bRightBorder = false;
 
             if( !(nBorderMask & 1) )
                 pRow->bTopBorder = false;
 
-            SwWriteTableRow *pEndRow = aRows[nRow+nRowSpan-1];
+            SwWriteTableRow *pEndRow = m_aRows[nRow+nRowSpan-1];
             if( !(nBorderMask & 2) )
                 pEndRow->bBottomBorder = false;
 
@@ -869,8 +869,8 @@ SwWriteTable::SwWriteTable(const SwTable* pTable, const SwHTMLTableLayout *pLayo
     }
 
     // Adjust some Twip values to pixel boundaries
-    if( bCollectBorderWidth && !nBorder )
-        nBorder = nInnerBorder;
+    if( m_bCollectBorderWidth && !m_nBorder )
+        m_nBorder = m_nInnerBorder;
 }
 
 SwWriteTable::~SwWriteTable()


More information about the Libreoffice-commits mailing list