[Libreoffice-commits] core.git: sw/source
Miklos Vajna (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 28 07:17:21 UTC 2021
sw/source/filter/html/htmltab.cxx | 140 +++++++++++++++++------------------
sw/source/filter/html/htmltabw.cxx | 34 ++++----
sw/source/filter/inc/wrtswtbl.hxx | 52 ++++++-------
sw/source/filter/writer/wrtswtbl.cxx | 40 +++++-----
4 files changed, 133 insertions(+), 133 deletions(-)
New commits:
commit 67a56b7159158cea076df9aa258a36b02e115ec3
Author: Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Jun 28 08:24:22 2021 +0200
Commit: Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Jun 28 09:16:49 2021 +0200
sw: prefix members of HTMLTableColumn, HTMLTableContext, SwWriteTableCol ...
... and SwWriteTableRow
See tdf#94879 for motivation.
Change-Id: I74edd0d6864fd7c2731d904c8bf7cfbd309a226c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117965
Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
Tested-by: Jenkins
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 699a44a89f42..a1177b711d8e 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -114,57 +114,57 @@ struct HTMLTableOptions
class HTMLTableContext
{
- SwHTMLNumRuleInfo aNumRuleInfo; // Numbering valid before the table
+ SwHTMLNumRuleInfo m_aNumRuleInfo; // Numbering valid before the table
- SwTableNode *pTableNd; // table node
- SwFrameFormat *pFrameFormat; // the Fly frame::Frame, containing the table
- std::unique_ptr<SwPosition> pPos; // position behind the table
+ SwTableNode *m_pTableNd; // table node
+ SwFrameFormat *m_pFrameFormat; // the Fly frame::Frame, containing the table
+ std::unique_ptr<SwPosition> m_pPos; // position behind the table
- size_t nContextStAttrMin;
- size_t nContextStMin;
+ size_t m_nContextStAttrMin;
+ size_t m_nContextStMin;
- bool bRestartPRE : 1;
- bool bRestartXMP : 1;
- bool bRestartListing : 1;
+ bool m_bRestartPRE : 1;
+ bool m_bRestartXMP : 1;
+ bool m_bRestartListing : 1;
HTMLTableContext(const HTMLTableContext&) = delete;
HTMLTableContext& operator=(const HTMLTableContext&) = delete;
public:
- std::shared_ptr<HTMLAttrTable> xAttrTab; // attributes
+ std::shared_ptr<HTMLAttrTable> m_xAttrTab; // attributes
HTMLTableContext( SwPosition *pPs, size_t nCntxtStMin,
size_t nCntxtStAttrMin ) :
- pTableNd( nullptr ),
- pFrameFormat( nullptr ),
- pPos( pPs ),
- nContextStAttrMin( nCntxtStAttrMin ),
- nContextStMin( nCntxtStMin ),
- bRestartPRE( false ),
- bRestartXMP( false ),
- bRestartListing( false ),
- xAttrTab(std::make_shared<HTMLAttrTable>())
+ m_pTableNd( nullptr ),
+ m_pFrameFormat( nullptr ),
+ m_pPos( pPs ),
+ m_nContextStAttrMin( nCntxtStAttrMin ),
+ m_nContextStMin( nCntxtStMin ),
+ m_bRestartPRE( false ),
+ m_bRestartXMP( false ),
+ m_bRestartListing( false ),
+ m_xAttrTab(std::make_shared<HTMLAttrTable>())
{
- memset(xAttrTab.get(), 0, sizeof(HTMLAttrTable));
+ memset(m_xAttrTab.get(), 0, sizeof(HTMLAttrTable));
}
- void SetNumInfo( const SwHTMLNumRuleInfo& rInf ) { aNumRuleInfo.Set(rInf); }
- const SwHTMLNumRuleInfo& GetNumInfo() const { return aNumRuleInfo; };
+ void SetNumInfo( const SwHTMLNumRuleInfo& rInf ) { m_aNumRuleInfo.Set(rInf); }
+ const SwHTMLNumRuleInfo& GetNumInfo() const { return m_aNumRuleInfo; };
void SavePREListingXMP( SwHTMLParser& rParser );
void RestorePREListingXMP( SwHTMLParser& rParser );
- SwPosition *GetPos() const { return pPos.get(); }
+ SwPosition *GetPos() const { return m_pPos.get(); }
- void SetTableNode( SwTableNode *pNd ) { pTableNd = pNd; }
- SwTableNode *GetTableNode() const { return pTableNd; }
+ void SetTableNode( SwTableNode *pNd ) { m_pTableNd = pNd; }
+ SwTableNode *GetTableNode() const { return m_pTableNd; }
- void SetFrameFormat( SwFrameFormat *pFormat ) { pFrameFormat = pFormat; }
- SwFrameFormat *GetFrameFormat() const { return pFrameFormat; }
+ void SetFrameFormat( SwFrameFormat *pFormat ) { m_pFrameFormat = pFormat; }
+ SwFrameFormat *GetFrameFormat() const { return m_pFrameFormat; }
- size_t GetContextStMin() const { return nContextStMin; }
- size_t GetContextStAttrMin() const { return nContextStAttrMin; }
+ size_t GetContextStMin() const { return m_nContextStMin; }
+ size_t GetContextStAttrMin() const { return m_nContextStAttrMin; }
};
}
@@ -336,35 +336,35 @@ public:
// Column of a HTML table
class HTMLTableColumn
{
- bool bIsEndOfGroup;
+ bool m_bIsEndOfGroup;
- sal_uInt16 nWidth; // options of <COL>
- bool bRelWidth;
+ sal_uInt16 m_nWidth; // options of <COL>
+ bool m_bRelWidth;
- SvxAdjust eAdjust;
- sal_Int16 eVertOri;
+ SvxAdjust m_eAdjust;
+ sal_Int16 m_eVertOri;
- SwFrameFormat *aFrameFormats[6];
+ SwFrameFormat *m_aFrameFormats[6];
static inline sal_uInt16 GetFrameFormatIdx( bool bBorderLine,
sal_Int16 eVertOri );
public:
- bool bLeftBorder; // is there a line before the column
+ bool m_bLeftBorder; // is there a line before the column
HTMLTableColumn();
inline void SetWidth( sal_uInt16 nWidth, bool bRelWidth);
- void SetAdjust( SvxAdjust eAdj ) { eAdjust = eAdj; }
- SvxAdjust GetAdjust() const { return eAdjust; }
+ void SetAdjust( SvxAdjust eAdj ) { m_eAdjust = eAdj; }
+ SvxAdjust GetAdjust() const { return m_eAdjust; }
- void SetVertOri( sal_Int16 eV) { eVertOri = eV; }
- sal_Int16 GetVertOri() const { return eVertOri; }
+ void SetVertOri( sal_Int16 eV) { m_eVertOri = eV; }
+ sal_Int16 GetVertOri() const { return m_eVertOri; }
- void SetEndOfGroup() { bIsEndOfGroup = true; }
- bool IsEndOfGroup() const { return bIsEndOfGroup; }
+ void SetEndOfGroup() { m_bIsEndOfGroup = true; }
+ bool IsEndOfGroup() const { return m_bIsEndOfGroup; }
inline void SetFrameFormat( SwFrameFormat *pFormat, bool bBorderLine,
sal_Int16 eVertOri );
@@ -858,30 +858,30 @@ void HTMLTableRow::Shrink( sal_uInt16 nCells )
}
HTMLTableColumn::HTMLTableColumn():
- bIsEndOfGroup(false),
- nWidth(0), bRelWidth(false),
- eAdjust(SvxAdjust::End), eVertOri(text::VertOrientation::TOP),
- bLeftBorder(false)
+ m_bIsEndOfGroup(false),
+ m_nWidth(0), m_bRelWidth(false),
+ m_eAdjust(SvxAdjust::End), m_eVertOri(text::VertOrientation::TOP),
+ m_bLeftBorder(false)
{
- for(SwFrameFormat* & rp : aFrameFormats)
+ for(SwFrameFormat* & rp : m_aFrameFormats)
rp = nullptr;
}
inline void HTMLTableColumn::SetWidth( sal_uInt16 nWdth, bool bRelWdth )
{
- if( bRelWidth==bRelWdth )
+ if( m_bRelWidth==bRelWdth )
{
- if( nWdth > nWidth )
- nWidth = nWdth;
+ if( nWdth > m_nWidth )
+ m_nWidth = nWdth;
}
else
- nWidth = nWdth;
- bRelWidth = bRelWdth;
+ m_nWidth = nWdth;
+ m_bRelWidth = bRelWdth;
}
inline std::unique_ptr<SwHTMLTableLayoutColumn> HTMLTableColumn::CreateLayoutInfo()
{
- return std::unique_ptr<SwHTMLTableLayoutColumn>(new SwHTMLTableLayoutColumn( nWidth, bRelWidth, bLeftBorder ));
+ return std::unique_ptr<SwHTMLTableLayoutColumn>(new SwHTMLTableLayoutColumn( m_nWidth, m_bRelWidth, m_bLeftBorder ));
}
inline sal_uInt16 HTMLTableColumn::GetFrameFormatIdx( bool bBorderLine,
@@ -902,13 +902,13 @@ inline sal_uInt16 HTMLTableColumn::GetFrameFormatIdx( bool bBorderLine,
inline void HTMLTableColumn::SetFrameFormat( SwFrameFormat *pFormat, bool bBorderLine,
sal_Int16 eVertOrient )
{
- aFrameFormats[GetFrameFormatIdx(bBorderLine,eVertOrient)] = pFormat;
+ m_aFrameFormats[GetFrameFormatIdx(bBorderLine,eVertOrient)] = pFormat;
}
inline SwFrameFormat *HTMLTableColumn::GetFrameFormat( bool bBorderLine,
sal_Int16 eVertOrient ) const
{
- return aFrameFormats[GetFrameFormatIdx(bBorderLine,eVertOrient)];
+ return m_aFrameFormats[GetFrameFormatIdx(bBorderLine,eVertOrient)];
}
void HTMLTable::InitCtor(const HTMLTableOptions& rOptions)
@@ -1088,7 +1088,7 @@ const std::shared_ptr<SwHTMLTableLayout>& HTMLTable::CreateLayoutInfo()
sal_uInt16 nBorderWidth = GetBorderWidth( m_aBorderLine, true );
sal_uInt16 nLeftBorderWidth =
- m_aColumns[0].bLeftBorder ? GetBorderWidth(m_aLeftBorderLine, true) : 0;
+ m_aColumns[0].m_bLeftBorder ? GetBorderWidth(m_aLeftBorderLine, true) : 0;
sal_uInt16 nRightBorderWidth =
m_bRightBorder ? GetBorderWidth( m_aRightBorderLine, true ) : 0;
@@ -1357,7 +1357,7 @@ void HTMLTable::FixFrameFormat( SwTableBox *pBox,
}
bSet = true;
}
- if (m_aColumns[nCol].bLeftBorder)
+ if (m_aColumns[nCol].m_bLeftBorder)
{
const SvxBorderLine& rBorderLine =
0==nCol ? m_aLeftBorderLine : m_aBorderLine;
@@ -1800,7 +1800,7 @@ void HTMLTable::InheritVertBorders( const HTMLTable *pParent,
GetBorderWidth( m_aInheritedRightBorderLine, true ) + MIN_BORDER_DIST;
}
- if (pParent->m_aColumns[nCol].bLeftBorder)
+ if (pParent->m_aColumns[nCol].m_bLeftBorder)
{
m_bInheritedLeftBorder = true; // just remember for now
m_aInheritedLeftBorderLine = 0==nCol ? pParent->m_aLeftBorderLine
@@ -1818,7 +1818,7 @@ void HTMLTable::InheritVertBorders( const HTMLTable *pParent,
m_bRightAllowed = ( pParent->m_bRightAllowed &&
(nCol+nColSpan==pParent->m_nCols ||
- !pParent->m_aColumns[nCol+nColSpan].bLeftBorder) );
+ !pParent->m_aColumns[nCol+nColSpan].m_bLeftBorder) );
}
void HTMLTable::SetBorders()
@@ -1829,7 +1829,7 @@ void HTMLTable::SetBorders()
((HTMLTableRules::Rows==m_eRules || HTMLTableRules::Groups==m_eRules) &&
m_aColumns[i-1].IsEndOfGroup()))
{
- m_aColumns[i].bLeftBorder = true;
+ m_aColumns[i].m_bLeftBorder = true;
}
for( i=0; i<m_nRows-1; i++ )
@@ -1853,7 +1853,7 @@ void HTMLTable::SetBorders()
m_bRightBorder = true;
if( HTMLTableFrame::LHS==m_eFrame || HTMLTableFrame::VSides==m_eFrame || HTMLTableFrame::Box==m_eFrame )
{
- m_aColumns[0].bLeftBorder = true;
+ m_aColumns[0].m_bLeftBorder = true;
}
for( i=0; i<m_nRows; i++ )
@@ -2497,9 +2497,9 @@ void HTMLTable::MakeParentContents()
void HTMLTableContext::SavePREListingXMP( SwHTMLParser& rParser )
{
- bRestartPRE = rParser.IsReadPRE();
- bRestartXMP = rParser.IsReadXMP();
- bRestartListing = rParser.IsReadListing();
+ m_bRestartPRE = rParser.IsReadPRE();
+ m_bRestartXMP = rParser.IsReadXMP();
+ m_bRestartListing = rParser.IsReadListing();
rParser.FinishPREListingXMP();
}
@@ -2507,13 +2507,13 @@ void HTMLTableContext::RestorePREListingXMP( SwHTMLParser& rParser )
{
rParser.FinishPREListingXMP();
- if( bRestartPRE )
+ if( m_bRestartPRE )
rParser.StartPRE();
- if( bRestartXMP )
+ if( m_bRestartXMP )
rParser.StartXMP();
- if( bRestartListing )
+ if( m_bRestartListing )
rParser.StartListing();
}
@@ -3361,7 +3361,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
std::optional<std::deque<std::unique_ptr<HTMLAttr>>> pPostIts;
if( !bForceFrame && (bTopTable || pCurTable->HasParentSection()) )
{
- SplitAttrTab(pTCntxt->xAttrTab, bTopTable);
+ SplitAttrTab(pTCntxt->m_xAttrTab, bTopTable);
// If we reuse an already existing paragraph, we can't add
// PostIts since the paragraph gets behind that table.
// They're gonna be moved into the first paragraph of the table
@@ -3375,7 +3375,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, bool bReadOptions,
}
else
{
- SaveAttrTab(pTCntxt->xAttrTab);
+ SaveAttrTab(pTCntxt->m_xAttrTab);
if( bTopTable && !bAppended )
{
pPostIts.emplace();
@@ -5176,7 +5176,7 @@ std::shared_ptr<HTMLTable> SwHTMLParser::BuildTable(SvxAdjust eParentAdjust,
GetNumInfo().Set( pTCntxt->GetNumInfo() );
pTCntxt->RestorePREListingXMP( *this );
- RestoreAttrTab(pTCntxt->xAttrTab);
+ RestoreAttrTab(pTCntxt->m_xAttrTab);
if (m_xTable == xCurTable)
{
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 5657b2fe1eb5..c3f49ab9645d 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -576,19 +576,19 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
for( SwWriteTableRows::size_type nRow=1; nRow < m_aRows.size(); ++nRow )
{
SwWriteTableRow *pNextRow = m_aRows[nRow].get();
- bool bBorder = ( pRow->bBottomBorder || pNextRow->bTopBorder );
+ bool bBorder = ( pRow->m_bBottomBorder || pNextRow->m_bTopBorder );
bRowsHaveBorder |= bBorder;
bRowsHaveBorderOnly &= bBorder;
- sal_uInt16 nBorder2 = pRow->bBottomBorder ? pRow->nBottomBorder : USHRT_MAX;
- if( pNextRow->bTopBorder && pNextRow->nTopBorder < nBorder2 )
- nBorder2 = pNextRow->nTopBorder;
+ sal_uInt16 nBorder2 = pRow->m_bBottomBorder ? pRow->m_nBottomBorder : USHRT_MAX;
+ if( pNextRow->m_bTopBorder && pNextRow->m_nTopBorder < nBorder2 )
+ nBorder2 = pNextRow->m_nTopBorder;
- pRow->bBottomBorder = bBorder;
- pRow->nBottomBorder = nBorder2;
+ pRow->m_bBottomBorder = bBorder;
+ pRow->m_nBottomBorder = nBorder2;
- pNextRow->bTopBorder = bBorder;
- pNextRow->nTopBorder = nBorder2;
+ pNextRow->m_bTopBorder = bBorder;
+ pNextRow->m_nTopBorder = nBorder2;
pRow = pNextRow;
}
@@ -599,11 +599,11 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
for( SwWriteTableCols::size_type nCol=1; nCol<m_aCols.size(); ++nCol )
{
SwWriteTableCol *pNextCol = m_aCols[nCol].get();
- bool bBorder = ( pCol->bRightBorder || pNextCol->bLeftBorder );
+ bool bBorder = ( pCol->m_bRightBorder || pNextCol->m_bLeftBorder );
bColsHaveBorder |= bBorder;
bColsHaveBorderOnly &= bBorder;
- pCol->bRightBorder = bBorder;
- pNextCol->bLeftBorder = bBorder;
+ pCol->m_bRightBorder = bBorder;
+ pNextCol->m_bLeftBorder = bBorder;
pCol = pNextCol;
}
@@ -767,7 +767,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
html.attribute(OOO_STRING_SVTOOLS_HTML_O_width, OString::number(SwHTMLWriter::ToPixel(nWidth,false)));
html.end();
- if( bColGroups && pColumn->bRightBorder && nCol<nCols-1 )
+ if( bColGroups && pColumn->m_bRightBorder && nCol<nCols-1 )
{
rWrt.DecIndentLevel(); // indent content of <COLGRP>
rWrt.OutNewLine(); // </COLGRP> in new line
@@ -798,7 +798,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
// can be outputted if there is a line below the cell.
if( bTHead &&
(bTSections || bColGroups) &&
- m_nHeadEndRow<m_aRows.size()-1 && !m_aRows[m_nHeadEndRow]->bBottomBorder )
+ m_nHeadEndRow<m_aRows.size()-1 && !m_aRows[m_nHeadEndRow]->m_bBottomBorder )
bTHead = false;
// Output <TBODY> only if <THEAD> is outputted.
@@ -818,10 +818,10 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
const SwWriteTableRow *pRow2 = m_aRows[nRow].get();
OutTableCells( rWrt, pRow2->GetCells(), pRow2->GetBackground() );
- if( !m_nCellSpacing && nRow < m_aRows.size()-1 && pRow2->bBottomBorder &&
- pRow2->nBottomBorder > DEF_LINE_WIDTH_1 )
+ if( !m_nCellSpacing && nRow < m_aRows.size()-1 && pRow2->m_bBottomBorder &&
+ pRow2->m_nBottomBorder > DEF_LINE_WIDTH_1 )
{
- for( auto nCnt = (pRow2->nBottomBorder / DEF_LINE_WIDTH_1) - 1; nCnt; --nCnt )
+ for( auto nCnt = (pRow2->m_nBottomBorder / DEF_LINE_WIDTH_1) - 1; nCnt; --nCnt )
{
rWrt.OutNewLine();
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OString(rWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_tablerow ));
@@ -830,7 +830,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
}
}
if( ( (bTHead && nRow==m_nHeadEndRow) ||
- (bTBody && pRow2->bBottomBorder) ) &&
+ (bTBody && pRow2->m_bBottomBorder) ) &&
nRow < m_aRows.size()-1 )
{
rWrt.DecIndentLevel(); // indent content of <THEAD>/<TDATA>
diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx
index b343f64ccb75..9ded87a9ce46 100644
--- a/sw/source/filter/inc/wrtswtbl.hxx
+++ b/sw/source/filter/inc/wrtswtbl.hxx
@@ -97,9 +97,9 @@ typedef std::vector<std::unique_ptr<SwWriteTableCell>> SwWriteTableCells;
class SwWriteTableRow final
{
SwWriteTableCells m_Cells; ///< all cells of the rows
- const SvxBrushItem *pBackground; // background
+ const SvxBrushItem *m_pBackground; // background
- tools::Long nPos; // end position (twips) of the row
+ tools::Long m_nPos; // end position (twips) of the row
bool mbUseLayoutHeights;
SwWriteTableRow & operator= (const SwWriteTableRow &) = delete;
@@ -109,11 +109,11 @@ class SwWriteTableRow final
public:
- sal_uInt16 nTopBorder; // thickness of upper/lower border
- sal_uInt16 nBottomBorder;
+ sal_uInt16 m_nTopBorder; // thickness of upper/lower border
+ sal_uInt16 m_nBottomBorder;
- bool bTopBorder : 1; // which borders are there?
- bool bBottomBorder : 1;
+ bool m_bTopBorder : 1; // which borders are there?
+ bool m_bBottomBorder : 1;
SwWriteTableRow( tools::Long nPos, bool bUseLayoutHeights );
@@ -125,12 +125,12 @@ public:
void SetBackground( const SvxBrushItem *pBGround )
{
- pBackground = pBGround;
+ m_pBackground = pBGround;
}
- const SvxBrushItem *GetBackground() const { return pBackground; }
+ const SvxBrushItem *GetBackground() const { return m_pBackground; }
- bool HasTopBorder() const { return bTopBorder; }
- bool HasBottomBorder() const { return bBottomBorder; }
+ bool HasTopBorder() const { return m_bTopBorder; }
+ bool HasBottomBorder() const { return m_bBottomBorder; }
const SwWriteTableCells& GetCells() const { return m_Cells; }
@@ -141,7 +141,7 @@ public:
inline bool SwWriteTableRow::operator==( const SwWriteTableRow& rRow ) const
{
// allow for some fuzzyness
- return (nPos >= rRow.nPos ? nPos - rRow.nPos : rRow.nPos - nPos ) <=
+ return (m_nPos >= rRow.m_nPos ? m_nPos - rRow.m_nPos : rRow.m_nPos - m_nPos ) <=
(mbUseLayoutHeights ? 0 : ROWFUZZY);
}
@@ -149,7 +149,7 @@ inline bool SwWriteTableRow::operator<( const SwWriteTableRow& rRow ) const
{
// Since we only know the degrees of truth of 0 and 1 here, we also prefer to
// not let x==y and x<y at the same time ;-)
- return nPos < rRow.nPos - (mbUseLayoutHeights ? 0 : ROWFUZZY);
+ return m_nPos < rRow.m_nPos - (mbUseLayoutHeights ? 0 : ROWFUZZY);
}
using SwWriteTableRows
@@ -157,47 +157,47 @@ using SwWriteTableRows
class SwWriteTableCol
{
- sal_uInt32 nPos; // end position of the column
+ sal_uInt32 m_nPos; // end position of the column
- sal_uInt32 nWidthOpt;
+ sal_uInt32 m_nWidthOpt;
- bool bRelWidthOpt : 1;
+ bool m_bRelWidthOpt : 1;
public:
- bool bLeftBorder : 1; // which borders are there?
- bool bRightBorder : 1;
+ bool m_bLeftBorder : 1; // which borders are there?
+ bool m_bRightBorder : 1;
SwWriteTableCol( sal_uInt32 nPosition );
- sal_uInt32 GetPos() const { return nPos; }
+ sal_uInt32 GetPos() const { return m_nPos; }
- bool HasLeftBorder() const { return bLeftBorder; }
+ bool HasLeftBorder() const { return m_bLeftBorder; }
- bool HasRightBorder() const { return bRightBorder; }
+ bool HasRightBorder() const { return m_bRightBorder; }
inline bool operator==( const SwWriteTableCol& rCol ) const;
inline bool operator<( const SwWriteTableCol& rCol ) const;
void SetWidthOpt( sal_uInt32 nWidth, bool bRel )
{
- nWidthOpt = nWidth; bRelWidthOpt = bRel;
+ m_nWidthOpt = nWidth; m_bRelWidthOpt = bRel;
}
- sal_uInt32 GetWidthOpt() const { return nWidthOpt; }
- bool HasRelWidthOpt() const { return bRelWidthOpt; }
+ sal_uInt32 GetWidthOpt() const { return m_nWidthOpt; }
+ bool HasRelWidthOpt() const { return m_bRelWidthOpt; }
};
inline bool SwWriteTableCol::operator==( const SwWriteTableCol& rCol ) const
{
// allow for some fuzzyness
- return (nPos >= rCol.nPos ? nPos - rCol.nPos
- : rCol.nPos - nPos ) <= COLFUZZY;
+ return (m_nPos >= rCol.m_nPos ? m_nPos - rCol.m_nPos
+ : rCol.m_nPos - m_nPos ) <= COLFUZZY;
}
inline bool SwWriteTableCol::operator<( const SwWriteTableCol& rCol ) const
{
// Since we only know the degrees of truth of 0 and 1 here, we also prefer to
// not let x==y and x<y at the same time ;-)
- return nPos + COLFUZZY < rCol.nPos;
+ return m_nPos + COLFUZZY < rCol.m_nPos;
}
struct SwWriteTableColLess {
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index e32ec9cdfe1b..6421eeb5c38a 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -55,9 +55,9 @@ sal_Int16 SwWriteTableCell::GetVertOri() const
}
SwWriteTableRow::SwWriteTableRow( tools::Long nPosition, bool bUseLayoutHeights )
- : pBackground(nullptr), nPos(nPosition), mbUseLayoutHeights(bUseLayoutHeights),
- nTopBorder(USHRT_MAX), nBottomBorder(USHRT_MAX), bTopBorder(true),
- bBottomBorder(true)
+ : m_pBackground(nullptr), m_nPos(nPosition), mbUseLayoutHeights(bUseLayoutHeights),
+ m_nTopBorder(USHRT_MAX), m_nBottomBorder(USHRT_MAX), m_bTopBorder(true),
+ m_bBottomBorder(true)
{
}
@@ -76,8 +76,8 @@ SwWriteTableCell *SwWriteTableRow::AddCell( const SwTableBox *pBox,
}
SwWriteTableCol::SwWriteTableCol(sal_uInt32 nPosition)
- : nPos(nPosition), nWidthOpt(0), bRelWidthOpt(false),
- bLeftBorder(true), bRightBorder(true)
+ : m_nPos(nPosition), m_nWidthOpt(0), m_bRelWidthOpt(false),
+ m_bLeftBorder(true), m_bRightBorder(true)
{
}
@@ -684,7 +684,7 @@ void SwWriteTable::FillTableRowsCols( tools::Long nStartRPos, sal_uInt16 nStartR
SwWriteTableCol *pCol = m_aCols[nOldCol].get();
OSL_ENSURE(pCol, "No TableCol found, panic!");
if (pCol)
- pCol->bLeftBorder = false;
+ pCol->m_bLeftBorder = false;
}
if (!(nBorderMask & 8))
@@ -692,22 +692,22 @@ void SwWriteTable::FillTableRowsCols( tools::Long nStartRPos, sal_uInt16 nStartR
SwWriteTableCol *pCol = m_aCols[nCol].get();
OSL_ENSURE(pCol, "No TableCol found, panic!");
if (pCol)
- pCol->bRightBorder = false;
+ pCol->m_bRightBorder = false;
}
if (!(nBorderMask & 1))
- pRow->bTopBorder = false;
- else if (!pRow->nTopBorder || nTopBorder < pRow->nTopBorder)
- pRow->nTopBorder = nTopBorder;
+ pRow->m_bTopBorder = false;
+ else if (!pRow->m_nTopBorder || nTopBorder < pRow->m_nTopBorder)
+ pRow->m_nTopBorder = nTopBorder;
if (!(nBorderMask & 2))
- pEndRow->bBottomBorder = false;
+ pEndRow->m_bBottomBorder = false;
else if (
- !pEndRow->nBottomBorder ||
- nBottomBorder < pEndRow->nBottomBorder
+ !pEndRow->m_nBottomBorder ||
+ nBottomBorder < pEndRow->m_nBottomBorder
)
{
- pEndRow->nBottomBorder = nBottomBorder;
+ pEndRow->m_nBottomBorder = nBottomBorder;
}
}
}
@@ -804,8 +804,8 @@ SwWriteTable::SwWriteTable(const SwTable* pTable, const SwHTMLTableLayout *pLayo
{
std::unique_ptr<SwWriteTableRow> pRow(
new SwWriteTableRow( (nRow+1)*ROW_DFLT_HEIGHT, m_bUseLayoutHeights ));
- pRow->nTopBorder = 0;
- pRow->nBottomBorder = 0;
+ pRow->m_nTopBorder = 0;
+ pRow->m_nBottomBorder = 0;
m_aRows.insert( std::move(pRow) );
}
@@ -854,18 +854,18 @@ SwWriteTable::SwWriteTable(const SwTable* pTable, const SwHTMLTableLayout *pLayo
SwWriteTableCol *pCol = m_aCols[nCol].get();
if( !(nBorderMask & 4) )
- pCol->bLeftBorder = false;
+ pCol->m_bLeftBorder = false;
pCol = m_aCols[nCol+nColSpan-1].get();
if( !(nBorderMask & 8) )
- pCol->bRightBorder = false;
+ pCol->m_bRightBorder = false;
if( !(nBorderMask & 1) )
- pRow->bTopBorder = false;
+ pRow->m_bTopBorder = false;
SwWriteTableRow *pEndRow = m_aRows[nRow+nRowSpan-1].get();
if( !(nBorderMask & 2) )
- pEndRow->bBottomBorder = false;
+ pEndRow->m_bBottomBorder = false;
// The height requires only to be written once
if( nHeight )
More information about the Libreoffice-commits
mailing list