diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-10-15 09:25:26 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-10-15 10:40:42 +0200 |
commit | 8e3814fd78fa21c7033aa91d58ce7d29ae08f02b (patch) | |
tree | 79f733f7a6aa05aba4fdfdf3c544b557388813e2 | |
parent | d18e27c80d3f1d7c641468b62aa6c26f4100142d (diff) |
sw: prefix members of SwTableRep
Change-Id: Ib5c35ba6e53f70df8fe6dbcaf189590c754bb3cb
Reviewed-on: https://gerrit.libreoffice.org/61773
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins
-rw-r--r-- | sw/source/uibase/inc/swtablerep.hxx | 68 | ||||
-rw-r--r-- | sw/source/uibase/table/swtablerep.cxx | 68 |
2 files changed, 68 insertions, 68 deletions
diff --git a/sw/source/uibase/inc/swtablerep.hxx b/sw/source/uibase/inc/swtablerep.hxx index 59b9dbae73a7..dd7bbbca7ceb 100644 --- a/sw/source/uibase/inc/swtablerep.hxx +++ b/sw/source/uibase/inc/swtablerep.hxx @@ -28,19 +28,19 @@ class SwTabCols; struct TColumn; class SW_DLLPUBLIC SwTableRep { - std::unique_ptr<TColumn[]> pTColumns; - - SwTwips nTableWidth; - SwTwips nSpace; - SwTwips nLeftSpace; - SwTwips nRightSpace; - sal_uInt16 nAlign; - sal_uInt16 nColCount; - sal_uInt16 nAllCols; - sal_uInt16 nWidthPercent; - bool bLineSelected : 1; - bool bWidthChanged : 1; - bool bColsChanged : 1; + std::unique_ptr<TColumn[]> m_pTColumns; + + SwTwips m_nTableWidth; + SwTwips m_nSpace; + SwTwips m_nLeftSpace; + SwTwips m_nRightSpace; + sal_uInt16 m_nAlign; + sal_uInt16 m_nColCount; + sal_uInt16 m_nAllCols; + sal_uInt16 m_nWidthPercent; + bool m_bLineSelected : 1; + bool m_bWidthChanged : 1; + bool m_bColsChanged : 1; public: SwTableRep( const SwTabCols& rTabCol ); @@ -48,37 +48,37 @@ public: bool FillTabCols( SwTabCols& rTabCol ) const; - SwTwips GetLeftSpace() const {return nLeftSpace;} - void SetLeftSpace(SwTwips nSet) {nLeftSpace = nSet;} + SwTwips GetLeftSpace() const {return m_nLeftSpace;} + void SetLeftSpace(SwTwips nSet) {m_nLeftSpace = nSet;} - SwTwips GetRightSpace() const {return nRightSpace;} - void SetRightSpace(SwTwips nSet) {nRightSpace = nSet;} + SwTwips GetRightSpace() const {return m_nRightSpace;} + void SetRightSpace(SwTwips nSet) {m_nRightSpace = nSet;} - SwTwips GetWidth() const {return nTableWidth;} - void SetWidth(SwTwips nSet) {nTableWidth = nSet;} + SwTwips GetWidth() const {return m_nTableWidth;} + void SetWidth(SwTwips nSet) {m_nTableWidth = nSet;} - sal_uInt16 GetWidthPercent() const {return nWidthPercent;} - void SetWidthPercent(sal_uInt16 nSet) {nWidthPercent = nSet;} + sal_uInt16 GetWidthPercent() const {return m_nWidthPercent;} + void SetWidthPercent(sal_uInt16 nSet) {m_nWidthPercent = nSet;} - sal_uInt16 GetAlign() const {return nAlign;} - void SetAlign(sal_uInt16 nSet) {nAlign = nSet;} + sal_uInt16 GetAlign() const {return m_nAlign;} + void SetAlign(sal_uInt16 nSet) {m_nAlign = nSet;} - sal_uInt16 GetColCount() const {return nColCount;} - sal_uInt16 GetAllColCount() const {return nAllCols;} + sal_uInt16 GetColCount() const {return m_nColCount;} + sal_uInt16 GetAllColCount() const {return m_nAllCols;} - bool HasColsChanged() const {return bColsChanged;} - void SetColsChanged() {bColsChanged = true;} + bool HasColsChanged() const {return m_bColsChanged;} + void SetColsChanged() {m_bColsChanged = true;} - bool HasWidthChanged() const {return bWidthChanged;} - void SetWidthChanged() {bWidthChanged = true;} + bool HasWidthChanged() const {return m_bWidthChanged;} + void SetWidthChanged() {m_bWidthChanged = true;} - bool IsLineSelected() const {return bLineSelected;} - void SetLineSelected(bool bSet) {bLineSelected = bSet;} + bool IsLineSelected() const {return m_bLineSelected;} + void SetLineSelected(bool bSet) {m_bLineSelected = bSet;} - SwTwips GetSpace() const { return nSpace;} - void SetSpace(SwTwips nSet) {nSpace = nSet;} + SwTwips GetSpace() const { return m_nSpace;} + void SetSpace(SwTwips nSet) {m_nSpace = nSet;} - TColumn* GetColumns() const {return pTColumns.get();} + TColumn* GetColumns() const {return m_pTColumns.get();} }; #endif diff --git a/sw/source/uibase/table/swtablerep.cxx b/sw/source/uibase/table/swtablerep.cxx index 22b2e1bebd1e..78248cf00b9e 100644 --- a/sw/source/uibase/table/swtablerep.cxx +++ b/sw/source/uibase/table/swtablerep.cxx @@ -53,33 +53,33 @@ SwTableRep::SwTableRep( const SwTabCols& rTabCol ) : - nTableWidth(0), - nSpace(0), - nLeftSpace(0), - nRightSpace(0), - nAlign(0), - nWidthPercent(0), - bLineSelected(false), - bWidthChanged(false), - bColsChanged(false) + m_nTableWidth(0), + m_nSpace(0), + m_nLeftSpace(0), + m_nRightSpace(0), + m_nAlign(0), + m_nWidthPercent(0), + m_bLineSelected(false), + m_bWidthChanged(false), + m_bColsChanged(false) { - nAllCols = nColCount = rTabCol.Count(); - pTColumns.reset( new TColumn[ nColCount + 1 ] ); + m_nAllCols = m_nColCount = rTabCol.Count(); + m_pTColumns.reset( new TColumn[ m_nColCount + 1 ] ); SwTwips nStart = 0, nEnd; - for( sal_uInt16 i = 0; i < nAllCols; ++i ) + for( sal_uInt16 i = 0; i < m_nAllCols; ++i ) { nEnd = rTabCol[ i ] - rTabCol.GetLeft(); - pTColumns[ i ].nWidth = nEnd - nStart; - pTColumns[ i ].bVisible = !rTabCol.IsHidden(i); - if(!pTColumns[ i ].bVisible) - nColCount --; + m_pTColumns[ i ].nWidth = nEnd - nStart; + m_pTColumns[ i ].bVisible = !rTabCol.IsHidden(i); + if(!m_pTColumns[ i ].bVisible) + m_nColCount --; nStart = nEnd; } - pTColumns[ nAllCols ].nWidth = rTabCol.GetRight() - rTabCol.GetLeft() - nStart; - pTColumns[ nAllCols ].bVisible = true; - nColCount++; - nAllCols++; + m_pTColumns[ m_nAllCols ].nWidth = rTabCol.GetRight() - rTabCol.GetLeft() - nStart; + m_pTColumns[ m_nAllCols ].bVisible = true; + m_nColCount++; + m_nAllCols++; } SwTableRep::~SwTableRep() @@ -94,7 +94,7 @@ bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const bool bSingleLine = false; for ( size_t i = 0; i < rTabCols.Count(); ++i ) - if(!pTColumns[i].bVisible) + if(!m_pTColumns[i].bVisible) { bSingleLine = true; break; @@ -107,17 +107,17 @@ bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const { // The invisible separators are taken from the old TabCols, // the visible coming from pTColumns. - std::unique_ptr<TColumn[]> pOldTColumns(new TColumn[nAllCols + 1]); + std::unique_ptr<TColumn[]> pOldTColumns(new TColumn[m_nAllCols + 1]); SwTwips nStart = 0; - for ( sal_uInt16 i = 0; i < nAllCols - 1; ++i ) + for ( sal_uInt16 i = 0; i < m_nAllCols - 1; ++i ) { const SwTwips nEnd = rTabCols[i] - rTabCols.GetLeft(); pOldTColumns[i].nWidth = nEnd - nStart; pOldTColumns[i].bVisible = !rTabCols.IsHidden(i); nStart = nEnd; } - pOldTColumns[nAllCols - 1].nWidth = rTabCols.GetRight() - rTabCols.GetLeft() - nStart; - pOldTColumns[nAllCols - 1].bVisible = true; + pOldTColumns[m_nAllCols - 1].nWidth = rTabCols.GetRight() - rTabCols.GetLeft() - nStart; + pOldTColumns[m_nAllCols - 1].bVisible = true; sal_uInt16 nOldPos = 0; sal_uInt16 nNewPos = 0; @@ -126,18 +126,18 @@ bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const bool bOld = false; bool bFirst = true; - for ( sal_uInt16 i = 0; i < nAllCols - 1; ++i ) + for ( sal_uInt16 i = 0; i < m_nAllCols - 1; ++i ) { - while((bFirst || bOld ) && nOldPos < nAllCols ) + while((bFirst || bOld ) && nOldPos < m_nAllCols ) { nOld += pOldTColumns[nOldPos].nWidth; nOldPos++; if(!pOldTColumns[nOldPos - 1].bVisible) break; } - while((bFirst || !bOld ) && nNewPos < nAllCols ) + while((bFirst || !bOld ) && nNewPos < m_nAllCols ) { - nNew += pTColumns[nNewPos].nWidth; + nNew += m_pTColumns[nNewPos].nWidth; nNewPos++; if(pOldTColumns[nNewPos - 1].bVisible) break; @@ -149,16 +149,16 @@ bool SwTableRep::FillTabCols( SwTabCols& rTabCols ) const rTabCols[i] = nPos + nLeft; rTabCols.SetHidden( i, bOld ); } - rTabCols.SetRight(nLeft + nTableWidth); + rTabCols.SetRight(nLeft + m_nTableWidth); } else { - for ( sal_uInt16 i = 0; i < nAllCols - 1; ++i ) + for ( sal_uInt16 i = 0; i < m_nAllCols - 1; ++i ) { - nPos += pTColumns[i].nWidth; + nPos += m_pTColumns[i].nWidth; rTabCols[i] = nPos + rTabCols.GetLeft(); - rTabCols.SetHidden( i, !pTColumns[i].bVisible ); - rTabCols.SetRight(nLeft + pTColumns[nAllCols - 1].nWidth + nPos); + rTabCols.SetHidden( i, !m_pTColumns[i].bVisible ); + rTabCols.SetRight(nLeft + m_pTColumns[m_nAllCols - 1].nWidth + nPos); } } |