sw/source/core/ole/ndole.cxx | 18 ++++++++--------- sw/source/core/text/inftxt.cxx | 42 ++++++++++++++++++++--------------------- sw/source/core/text/inftxt.hxx | 30 ++++++++++++++--------------- sw/source/core/text/porlay.cxx | 18 ++++++++--------- sw/source/core/text/porlay.hxx | 20 +++++++++---------- sw/source/core/text/portxt.cxx | 2 - sw/source/core/text/portxt.hxx | 6 ++--- sw/source/core/text/txttab.cxx | 6 ++--- 8 files changed, 71 insertions(+), 71 deletions(-)
New commits: commit e6d3aa213a36c681571c4b8ef421c5f97d3d8d56 Author: Miklos Vajna <vmik...@collabora.com> AuthorDate: Mon Jan 4 09:03:07 2021 +0100 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Mon Jan 4 19:14:22 2021 +0100 sw: prefix members of SwCharRange, SwEmbedObjectLink, SwHolePortion and ... ... SwLineInfo See tdf#94879 for motivation. Change-Id: I6d397ea717161ad435af903cc236c87731f8a419 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108654 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins diff --git a/sw/source/core/ole/ndole.cxx b/sw/source/core/ole/ndole.cxx index d52cbd09722f..c82128f65ab6 100644 --- a/sw/source/core/ole/ndole.cxx +++ b/sw/source/core/ole/ndole.cxx @@ -150,7 +150,7 @@ void SAL_CALL SwOLEListener_Impl::disposing( const lang::EventObject& ) class SwEmbedObjectLink : public sfx2::SvBaseLink { - SwOLENode* pOleNode; + SwOLENode* m_pOleNode; public: explicit SwEmbedObjectLink(SwOLENode* pNode); @@ -162,9 +162,9 @@ public: void Connect() { GetRealObject(); } }; -SwEmbedObjectLink::SwEmbedObjectLink(SwOLENode* pNode): - ::sfx2::SvBaseLink( ::SfxLinkUpdateMode::ONCALL, SotClipboardFormatId::SVXB ), - pOleNode(pNode) +SwEmbedObjectLink::SwEmbedObjectLink(SwOLENode* pNode) + : ::sfx2::SvBaseLink(::SfxLinkUpdateMode::ONCALL, SotClipboardFormatId::SVXB) + , m_pOleNode(pNode) { SetSynchron( false ); } @@ -172,10 +172,10 @@ SwEmbedObjectLink::SwEmbedObjectLink(SwOLENode* pNode): ::sfx2::SvBaseLink::UpdateResult SwEmbedObjectLink::DataChanged( const OUString&, const uno::Any& ) { - if ( !pOleNode->UpdateLinkURL_Impl() ) + if (!m_pOleNode->UpdateLinkURL_Impl()) { // the link URL was not changed - uno::Reference< embed::XEmbeddedObject > xObject = pOleNode->GetOLEObj().GetOleRef(); + uno::Reference<embed::XEmbeddedObject> xObject = m_pOleNode->GetOLEObj().GetOleRef(); OSL_ENSURE( xObject.is(), "The object must exist always!" ); if ( xObject.is() ) { @@ -198,15 +198,15 @@ SwEmbedObjectLink::SwEmbedObjectLink(SwOLENode* pNode): } } - pOleNode->GetNewReplacement(); - pOleNode->SetChanged(); + m_pOleNode->GetNewReplacement(); + m_pOleNode->SetChanged(); return SUCCESS; } void SwEmbedObjectLink::Closed() { - pOleNode->BreakFileLink_Impl(); + m_pOleNode->BreakFileLink_Impl(); SvBaseLink::Closed(); } diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 54852e600c1b..8ff2aac8d8da 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -84,11 +84,11 @@ using namespace ::com::sun::star::beans; #define DRAW_SPECIAL_OPTIONS_ROTATE 2 SwLineInfo::SwLineInfo() - : pSpace( nullptr ), - nVertAlign( SvxParaVertAlignItem::Align::Automatic ), - nDefTabStop( 0 ), - bListTabStopIncluded( false ), - nListTabStopPosition( 0 ) + : m_pSpace( nullptr ), + m_nVertAlign( SvxParaVertAlignItem::Align::Automatic ), + m_nDefTabStop( 0 ), + m_bListTabStopIncluded( false ), + m_nListTabStopPosition( 0 ) { } @@ -99,23 +99,23 @@ SwLineInfo::~SwLineInfo() void SwLineInfo::CtorInitLineInfo( const SwAttrSet& rAttrSet, const SwTextNode& rTextNode ) { - pRuler.reset( new SvxTabStopItem( rAttrSet.GetTabStops() ) ); - if ( rTextNode.GetListTabStopPosition( nListTabStopPosition ) ) + m_pRuler.reset( new SvxTabStopItem( rAttrSet.GetTabStops() ) ); + if ( rTextNode.GetListTabStopPosition( m_nListTabStopPosition ) ) { - bListTabStopIncluded = true; + m_bListTabStopIncluded = true; // insert the list tab stop into SvxTabItem instance <pRuler> - const SvxTabStop aListTabStop( nListTabStopPosition, + const SvxTabStop aListTabStop( m_nListTabStopPosition, SvxTabAdjust::Left ); - pRuler->Insert( aListTabStop ); + m_pRuler->Insert( aListTabStop ); // remove default tab stops, which are before the inserted list tab stop - for ( sal_uInt16 i = 0; i < pRuler->Count(); i++ ) + for ( sal_uInt16 i = 0; i < m_pRuler->Count(); i++ ) { - if ( (*pRuler)[i].GetTabPos() < nListTabStopPosition && - (*pRuler)[i].GetAdjustment() == SvxTabAdjust::Default ) + if ( (*m_pRuler)[i].GetTabPos() < m_nListTabStopPosition && + (*m_pRuler)[i].GetAdjustment() == SvxTabAdjust::Default ) { - pRuler->Remove(i); + m_pRuler->Remove(i); continue; } } @@ -124,20 +124,20 @@ void SwLineInfo::CtorInitLineInfo( const SwAttrSet& rAttrSet, if ( !rTextNode.getIDocumentSettingAccess()->get(DocumentSettingId::TABS_RELATIVE_TO_INDENT) ) { // remove default tab stop at position 0 - for ( sal_uInt16 i = 0; i < pRuler->Count(); i++ ) + for ( sal_uInt16 i = 0; i < m_pRuler->Count(); i++ ) { - if ( (*pRuler)[i].GetTabPos() == 0 && - (*pRuler)[i].GetAdjustment() == SvxTabAdjust::Default ) + if ( (*m_pRuler)[i].GetTabPos() == 0 && + (*m_pRuler)[i].GetAdjustment() == SvxTabAdjust::Default ) { - pRuler->Remove(i); + m_pRuler->Remove(i); break; } } } - pSpace = &rAttrSet.GetLineSpacing(); - nVertAlign = rAttrSet.GetParaVertAlign().GetValue(); - nDefTabStop = USHRT_MAX; + m_pSpace = &rAttrSet.GetLineSpacing(); + m_nVertAlign = rAttrSet.GetParaVertAlign().GetValue(); + m_nDefTabStop = USHRT_MAX; } void SwTextInfo::CtorInitTextInfo( SwTextFrame *pFrame ) diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index d9f745a2de71..74dae963eafd 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -60,12 +60,12 @@ class SwLineInfo { friend class SwTextIter; - std::unique_ptr<SvxTabStopItem> pRuler; - const SvxLineSpacingItem *pSpace; - SvxParaVertAlignItem::Align nVertAlign; - sal_uInt16 nDefTabStop; - bool bListTabStopIncluded; - tools::Long nListTabStopPosition; + std::unique_ptr<SvxTabStopItem> m_pRuler; + const SvxLineSpacingItem *m_pSpace; + SvxParaVertAlignItem::Align m_nVertAlign; + sal_uInt16 m_nDefTabStop; + bool m_bListTabStopIncluded; + tools::Long m_nListTabStopPosition; void CtorInitLineInfo( const SwAttrSet& rAttrSet, const SwTextNode& rTextNode ); @@ -76,28 +76,28 @@ public: // #i24363# tab stops relative to indent - returns the tab stop following nSearchPos or NULL const SvxTabStop *GetTabStop( const SwTwips nSearchPos, const SwTwips nRight ) const; - const SvxLineSpacingItem *GetLineSpacing() const { return pSpace; } - sal_uInt16 GetDefTabStop() const { return nDefTabStop; } + const SvxLineSpacingItem *GetLineSpacing() const { return m_pSpace; } + sal_uInt16 GetDefTabStop() const { return m_nDefTabStop; } void SetDefTabStop( sal_uInt16 nNew ) const - { const_cast<SwLineInfo*>(this)->nDefTabStop = nNew; } + { const_cast<SwLineInfo*>(this)->m_nDefTabStop = nNew; } // vertical alignment - SvxParaVertAlignItem::Align GetVertAlign() const { return nVertAlign; } + SvxParaVertAlignItem::Align GetVertAlign() const { return m_nVertAlign; } bool HasSpecialAlign( bool bVert ) const { return bVert ? - ( SvxParaVertAlignItem::Align::Baseline != nVertAlign ) : - ( SvxParaVertAlignItem::Align::Baseline != nVertAlign && - SvxParaVertAlignItem::Align::Automatic != nVertAlign ); } + ( SvxParaVertAlignItem::Align::Baseline != m_nVertAlign ) : + ( SvxParaVertAlignItem::Align::Baseline != m_nVertAlign && + SvxParaVertAlignItem::Align::Automatic != m_nVertAlign ); } sal_uInt16 NumberOfTabStops() const; bool IsListTabStopIncluded() const { - return bListTabStopIncluded; + return m_bListTabStopIncluded; } tools::Long GetListTabStopPosition() const { - return nListTabStopPosition; + return m_nListTabStopPosition; } }; diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx index 06a4e5f4b7c7..7787f5c87f40 100644 --- a/sw/source/core/text/porlay.cxx +++ b/sw/source/core/text/porlay.cxx @@ -704,19 +704,19 @@ SwLinePortion *SwLineLayout::GetFirstPortion() const SwCharRange &SwCharRange::operator+=(const SwCharRange &rRange) { - if (TextFrameIndex(0) != rRange.nLen) + if (TextFrameIndex(0) != rRange.m_nLen) { - if (TextFrameIndex(0) == nLen) { - nStart = rRange.nStart; - nLen = rRange.nLen ; + if (TextFrameIndex(0) == m_nLen) { + m_nStart = rRange.m_nStart; + m_nLen = rRange.m_nLen ; } else { - if(rRange.nStart + rRange.nLen > nStart + nLen) { - nLen = rRange.nStart + rRange.nLen - nStart; + if(rRange.m_nStart + rRange.m_nLen > m_nStart + m_nLen) { + m_nLen = rRange.m_nStart + rRange.m_nLen - m_nStart; } - if(rRange.nStart < nStart) { - nLen += nStart - rRange.nStart; - nStart = rRange.nStart; + if(rRange.m_nStart < m_nStart) { + m_nLen += m_nStart - rRange.m_nStart; + m_nStart = rRange.m_nStart; } } } diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx index 0cc2948231a5..e3f6f882eabb 100644 --- a/sw/source/core/text/porlay.hxx +++ b/sw/source/core/text/porlay.hxx @@ -36,23 +36,23 @@ class SwTextFormatter; class SwCharRange { private: - TextFrameIndex nStart; - TextFrameIndex nLen; + TextFrameIndex m_nStart; + TextFrameIndex m_nLen; public: SwCharRange(TextFrameIndex const nInitStart = TextFrameIndex(0), TextFrameIndex const nInitLen = TextFrameIndex(0)) - : nStart( nInitStart ), nLen(nInitLen) {} - TextFrameIndex & Start() { return nStart; } - TextFrameIndex const& Start() const { return nStart; } + : m_nStart( nInitStart ), m_nLen(nInitLen) {} + TextFrameIndex & Start() { return m_nStart; } + TextFrameIndex const& Start() const { return m_nStart; } void LeftMove(TextFrameIndex const nNew) - { if ( nNew < nStart ) { nLen += nStart-nNew; nStart = nNew; } } - TextFrameIndex & Len() { return nLen; } - TextFrameIndex const& Len() const { return nLen; } + { if ( nNew < m_nStart ) { m_nLen += m_nStart-nNew; m_nStart = nNew; } } + TextFrameIndex & Len() { return m_nLen; } + TextFrameIndex const& Len() const { return m_nLen; } bool operator<(const SwCharRange &rRange) const - { return nStart < rRange.nStart; } + { return m_nStart < rRange.m_nStart; } bool operator>(const SwCharRange &rRange) const - { return nStart + nLen > rRange.nStart + rRange.nLen; } + { return m_nStart + m_nLen > rRange.m_nStart + rRange.m_nLen; } bool operator!=(const SwCharRange &rRange) const { return *this < rRange || *this > rRange; } SwCharRange &operator+=(const SwCharRange &rRange); diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 9fbfcd7bb776..ed9d3c517bb5 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -743,7 +743,7 @@ SwPosSize SwTextInputFieldPortion::GetTextSize( const SwTextSizeInfo &rInf ) con } SwHolePortion::SwHolePortion( const SwTextPortion &rPor ) - : nBlankWidth( 0 ) + : m_nBlankWidth( 0 ) { SetLen( TextFrameIndex(1) ); Height( rPor.Height() ); diff --git a/sw/source/core/text/portxt.hxx b/sw/source/core/text/portxt.hxx index 4d08f8dcbc48..b90db2d2b3af 100644 --- a/sw/source/core/text/portxt.hxx +++ b/sw/source/core/text/portxt.hxx @@ -63,11 +63,11 @@ public: class SwHolePortion : public SwLinePortion { - sal_uInt16 nBlankWidth; + sal_uInt16 m_nBlankWidth; public: explicit SwHolePortion( const SwTextPortion &rPor ); - sal_uInt16 GetBlankWidth( ) const { return nBlankWidth; } - void SetBlankWidth( const sal_uInt16 nNew ) { nBlankWidth = nNew; } + sal_uInt16 GetBlankWidth( ) const { return m_nBlankWidth; } + void SetBlankWidth( const sal_uInt16 nNew ) { m_nBlankWidth = nNew; } virtual SwLinePortion *Compress() override; virtual bool Format( SwTextFormatInfo &rInf ) override; virtual void Paint( const SwTextPaintInfo &rInf ) const override; diff --git a/sw/source/core/text/txttab.cxx b/sw/source/core/text/txttab.cxx index 56ae1a0c1ceb..3fde39337859 100644 --- a/sw/source/core/text/txttab.cxx +++ b/sw/source/core/text/txttab.cxx @@ -42,9 +42,9 @@ */ const SvxTabStop *SwLineInfo::GetTabStop( const SwTwips nSearchPos, const SwTwips nRight ) const { - for( sal_uInt16 i = 0; i < pRuler->Count(); ++i ) + for( sal_uInt16 i = 0; i < m_pRuler->Count(); ++i ) { - const SvxTabStop &rTabStop = pRuler->operator[](i); + const SvxTabStop &rTabStop = m_pRuler->operator[](i); if( rTabStop.GetTabPos() > SwTwips(nRight) ) return i ? nullptr : &rTabStop; @@ -56,7 +56,7 @@ const SvxTabStop *SwLineInfo::GetTabStop( const SwTwips nSearchPos, const SwTwip sal_uInt16 SwLineInfo::NumberOfTabStops() const { - return pRuler->Count(); + return m_pRuler->Count(); } SwTabPortion *SwTextFormatter::NewTabPortion( SwTextFormatInfo &rInf, bool bAuto ) const _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits