diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-01-07 08:34:52 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-01-07 09:57:19 +0100 |
commit | a87145d3c98fd5aa853ce22b3696189f3d249f04 (patch) | |
tree | 7877940f88cce98e4f35a58934b2ebe5eeb0acd9 /sw | |
parent | da2d11d2efb1c0baaa80b9d7052f7c8da5b5bf45 (diff) |
sw: prefix members of SwSmartTagMgr, SwFormatPageDesc and SwTabCols
Change-Id: I0bb794f500793f6d248186b683e0adb88b3e5a33
Reviewed-on: https://gerrit.libreoffice.org/65922
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/SwSmartTagMgr.hxx | 2 | ||||
-rw-r--r-- | sw/inc/fmtpdsc.hxx | 12 | ||||
-rw-r--r-- | sw/inc/tabcol.hxx | 48 | ||||
-rw-r--r-- | sw/source/core/bastyp/SwSmartTagMgr.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/bastyp/tabcol.cxx | 44 | ||||
-rw-r--r-- | sw/source/core/layout/atrfrm.cxx | 28 |
6 files changed, 72 insertions, 72 deletions
diff --git a/sw/inc/SwSmartTagMgr.hxx b/sw/inc/SwSmartTagMgr.hxx index baa11096f4e0..b8240f685823 100644 --- a/sw/inc/SwSmartTagMgr.hxx +++ b/sw/inc/SwSmartTagMgr.hxx @@ -26,7 +26,7 @@ class SwSmartTagMgr : public SmartTagMgr { private: - static SwSmartTagMgr* mpTheSwSmartTagMgr; + static SwSmartTagMgr* spTheSwSmartTagMgr; SwSmartTagMgr( const OUString& rModuleName ); virtual ~SwSmartTagMgr() override; diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx index 0d6d23943cd8..c44ee75d71a7 100644 --- a/sw/inc/fmtpdsc.hxx +++ b/sw/inc/fmtpdsc.hxx @@ -34,8 +34,8 @@ class IntlWrapper; class SW_DLLPUBLIC SwFormatPageDesc : public SfxPoolItem, public SwClient { - ::boost::optional<sal_uInt16> oNumOffset; ///< Offset page number. - SwModify* pDefinedIn; /**< Points to the object in which the + ::boost::optional<sal_uInt16> m_oNumOffset; ///< Offset page number. + SwModify* m_pDefinedIn; /**< Points to the object in which the attribute was set (ContentNode/Format). */ protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew ) override; @@ -62,12 +62,12 @@ public: SwPageDesc *GetPageDesc() { return static_cast<SwPageDesc*>(GetRegisteredIn()); } const SwPageDesc *GetPageDesc() const { return static_cast<const SwPageDesc*>(GetRegisteredIn()); } - const ::boost::optional<sal_uInt16>& GetNumOffset() const { return oNumOffset; } - void SetNumOffset( const ::boost::optional<sal_uInt16>& oNum ) { oNumOffset = oNum; } + const ::boost::optional<sal_uInt16>& GetNumOffset() const { return m_oNumOffset; } + void SetNumOffset( const ::boost::optional<sal_uInt16>& oNum ) { m_oNumOffset = oNum; } /// Query / set where attribute is anchored. - const SwModify* GetDefinedIn() const { return pDefinedIn; } - void ChgDefinedIn( const SwModify* pNew ) { pDefinedIn = const_cast<SwModify*>(pNew); } + const SwModify* GetDefinedIn() const { return m_pDefinedIn; } + void ChgDefinedIn( const SwModify* pNew ) { m_pDefinedIn = const_cast<SwModify*>(pNew); } void RegisterToPageDesc( SwPageDesc& ); bool KnowsPageDesc() const; void dumpAsXml(struct _xmlTextWriter* pWriter) const override; diff --git a/sw/inc/tabcol.hxx b/sw/inc/tabcol.hxx index 3fee607a881c..79c501a014ba 100644 --- a/sw/inc/tabcol.hxx +++ b/sw/inc/tabcol.hxx @@ -39,52 +39,52 @@ typedef std::vector< SwTabColsEntry > SwTabColsEntries; class SW_DLLPUBLIC SwTabCols { - long nLeftMin, // Leftmost border (reference point) for + long m_nLeftMin, // Leftmost border (reference point) for // document coordinates. // All other values are relative to this point! - nLeft, // Left border of table. - nRight, // Right border of table. - nRightMax; // Maximum right border of table. + m_nLeft, // Left border of table. + m_nRight, // Right border of table. + m_nRightMax; // Maximum right border of table. - bool bLastRowAllowedToChange; // If the last row of the table frame + bool m_bLastRowAllowedToChange; // If the last row of the table frame // is split across pages, it may not // change its size. - SwTabColsEntries aData; + SwTabColsEntries m_aData; //For the CopyCTor. - const SwTabColsEntries& GetData() const { return aData; } + const SwTabColsEntries& GetData() const { return m_aData; } public: SwTabCols( sal_uInt16 nSize = 0 ); SwTabCols( const SwTabCols& ); SwTabCols &operator=( const SwTabCols& ); - long& operator[]( size_t nPos ) { return aData[nPos].nPos; } - long operator[]( size_t nPos ) const { return aData[nPos].nPos; } - size_t Count() const { return aData.size(); } + long& operator[]( size_t nPos ) { return m_aData[nPos].nPos; } + long operator[]( size_t nPos ) const { return m_aData[nPos].nPos; } + size_t Count() const { return m_aData.size(); } - bool IsHidden( size_t nPos ) const { return aData[nPos].bHidden; } - void SetHidden( size_t nPos, bool bValue ) { aData[nPos].bHidden = bValue; } + bool IsHidden( size_t nPos ) const { return m_aData[nPos].bHidden; } + void SetHidden( size_t nPos, bool bValue ) { m_aData[nPos].bHidden = bValue; } void Insert( long nValue, bool bValue, size_t nPos ); void Insert( long nValue, long nMin, long nMax, bool bValue, size_t nPos ); void Remove( size_t nPos, size_t nCount = 1 ); - const SwTabColsEntry& GetEntry( size_t nPos ) const { return aData[nPos]; } - SwTabColsEntry& GetEntry( size_t nPos ) { return aData[nPos]; } + const SwTabColsEntry& GetEntry( size_t nPos ) const { return m_aData[nPos]; } + SwTabColsEntry& GetEntry( size_t nPos ) { return m_aData[nPos]; } - long GetLeftMin() const { return nLeftMin; } - long GetLeft() const { return nLeft; } - long GetRight() const { return nRight; } - long GetRightMax()const { return nRightMax;} + long GetLeftMin() const { return m_nLeftMin; } + long GetLeft() const { return m_nLeft; } + long GetRight() const { return m_nRight; } + long GetRightMax()const { return m_nRightMax;} - void SetLeftMin ( long nNew ) { nLeftMin = nNew; } - void SetLeft ( long nNew ) { nLeft = nNew; } - void SetRight ( long nNew ) { nRight = nNew; } - void SetRightMax( long nNew ) { nRightMax = nNew;} + void SetLeftMin ( long nNew ) { m_nLeftMin = nNew; } + void SetLeft ( long nNew ) { m_nLeft = nNew; } + void SetRight ( long nNew ) { m_nRight = nNew; } + void SetRightMax( long nNew ) { m_nRightMax = nNew;} - bool IsLastRowAllowedToChange() const { return bLastRowAllowedToChange; } - void SetLastRowAllowedToChange( bool bNew ) { bLastRowAllowedToChange = bNew; } + bool IsLastRowAllowedToChange() const { return m_bLastRowAllowedToChange; } + void SetLastRowAllowedToChange( bool bNew ) { m_bLastRowAllowedToChange = bNew; } }; class SwTable; diff --git a/sw/source/core/bastyp/SwSmartTagMgr.cxx b/sw/source/core/bastyp/SwSmartTagMgr.cxx index 80b9a92a0bc4..096705e8ba73 100644 --- a/sw/source/core/bastyp/SwSmartTagMgr.cxx +++ b/sw/source/core/bastyp/SwSmartTagMgr.cxx @@ -26,16 +26,16 @@ using namespace com::sun::star; using namespace com::sun::star::uno; -SwSmartTagMgr* SwSmartTagMgr::mpTheSwSmartTagMgr = nullptr; +SwSmartTagMgr* SwSmartTagMgr::spTheSwSmartTagMgr = nullptr; SwSmartTagMgr& SwSmartTagMgr::Get() { - if ( !mpTheSwSmartTagMgr ) + if ( !spTheSwSmartTagMgr ) { - mpTheSwSmartTagMgr = new SwSmartTagMgr( SwDocShell::Factory().GetModuleName() ); - mpTheSwSmartTagMgr->Init("Writer"); + spTheSwSmartTagMgr = new SwSmartTagMgr( SwDocShell::Factory().GetModuleName() ); + spTheSwSmartTagMgr->Init("Writer"); } - return *mpTheSwSmartTagMgr; + return *spTheSwSmartTagMgr; } SwSmartTagMgr::SwSmartTagMgr( const OUString& rModuleName ) : diff --git a/sw/source/core/bastyp/tabcol.cxx b/sw/source/core/bastyp/tabcol.cxx index 82272b8537d6..3c4e08e32096 100644 --- a/sw/source/core/bastyp/tabcol.cxx +++ b/sw/source/core/bastyp/tabcol.cxx @@ -21,36 +21,36 @@ #include <limits.h> SwTabCols::SwTabCols( sal_uInt16 nSize ) : - nLeftMin( 0 ), - nLeft( 0 ), - nRight( 0 ), - nRightMax( 0 ), - bLastRowAllowedToChange( true ) + m_nLeftMin( 0 ), + m_nLeft( 0 ), + m_nRight( 0 ), + m_nRightMax( 0 ), + m_bLastRowAllowedToChange( true ) { if ( nSize ) - aData.reserve( nSize ); + m_aData.reserve( nSize ); } SwTabCols::SwTabCols( const SwTabCols& rCpy ) : - nLeftMin( rCpy.GetLeftMin() ), - nLeft( rCpy.GetLeft() ), - nRight( rCpy.GetRight() ), - nRightMax( rCpy.GetRightMax() ), - bLastRowAllowedToChange( rCpy.IsLastRowAllowedToChange() ), - aData( rCpy.GetData() ) + m_nLeftMin( rCpy.GetLeftMin() ), + m_nLeft( rCpy.GetLeft() ), + m_nRight( rCpy.GetRight() ), + m_nRightMax( rCpy.GetRightMax() ), + m_bLastRowAllowedToChange( rCpy.IsLastRowAllowedToChange() ), + m_aData( rCpy.GetData() ) { } SwTabCols &SwTabCols::operator=( const SwTabCols& rCpy ) { - nLeftMin = rCpy.GetLeftMin(); - nLeft = rCpy.GetLeft(); - nRight = rCpy.GetRight(); - nRightMax= rCpy.GetRightMax(); - bLastRowAllowedToChange = rCpy.IsLastRowAllowedToChange(); + m_nLeftMin = rCpy.GetLeftMin(); + m_nLeft = rCpy.GetLeft(); + m_nRight = rCpy.GetRight(); + m_nRightMax= rCpy.GetRightMax(); + m_bLastRowAllowedToChange = rCpy.IsLastRowAllowedToChange(); Remove( 0, Count() ); - aData = rCpy.GetData(); + m_aData = rCpy.GetData(); return *this; } @@ -63,7 +63,7 @@ void SwTabCols::Insert( long nValue, long nMin, long nMax, aEntry.nMin = nMin; aEntry.nMax = nMax; aEntry.bHidden = bValue; - aData.insert( aData.begin() + nPos, aEntry ); + m_aData.insert( m_aData.begin() + nPos, aEntry ); } void SwTabCols::Insert( long nValue, bool bValue, size_t nPos ) @@ -73,7 +73,7 @@ void SwTabCols::Insert( long nValue, bool bValue, size_t nPos ) aEntry.nMin = 0; aEntry.nMax = LONG_MAX; aEntry.bHidden = bValue; - aData.insert( aData.begin() + nPos, aEntry ); + m_aData.insert( m_aData.begin() + nPos, aEntry ); #if OSL_DEBUG_LEVEL > 1 for ( const auto& rPos : aData ) @@ -85,8 +85,8 @@ void SwTabCols::Insert( long nValue, bool bValue, size_t nPos ) void SwTabCols::Remove( size_t nPos, size_t nCount ) { - SwTabColsEntries::iterator aStart = aData.begin() + nPos; - aData.erase( aStart, aStart + nCount ); + SwTabColsEntries::iterator aStart = m_aData.begin() + nPos; + m_aData.erase( aStart, aStart + nCount ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx index b293eee9c0d2..2603eb7fb400 100644 --- a/sw/source/core/layout/atrfrm.cxx +++ b/sw/source/core/layout/atrfrm.cxx @@ -585,15 +585,15 @@ void SwFormatContent::dumpAsXml(xmlTextWriterPtr pWriter) const SwFormatPageDesc::SwFormatPageDesc( const SwFormatPageDesc &rCpy ) : SfxPoolItem( RES_PAGEDESC ), SwClient( const_cast<SwPageDesc*>(rCpy.GetPageDesc()) ), - oNumOffset( rCpy.oNumOffset ), - pDefinedIn( nullptr ) + m_oNumOffset( rCpy.m_oNumOffset ), + m_pDefinedIn( nullptr ) { } SwFormatPageDesc::SwFormatPageDesc( const SwPageDesc *pDesc ) : SfxPoolItem( RES_PAGEDESC ), SwClient( const_cast<SwPageDesc*>(pDesc) ), - pDefinedIn( nullptr ) + m_pDefinedIn( nullptr ) { } @@ -601,8 +601,8 @@ SwFormatPageDesc &SwFormatPageDesc::operator=(const SwFormatPageDesc &rCpy) { if (rCpy.GetPageDesc()) RegisterToPageDesc(*const_cast<SwPageDesc*>(rCpy.GetPageDesc())); - oNumOffset = rCpy.oNumOffset; - pDefinedIn = nullptr; + m_oNumOffset = rCpy.m_oNumOffset; + m_pDefinedIn = nullptr; return *this; } @@ -617,8 +617,8 @@ bool SwFormatPageDesc::KnowsPageDesc() const bool SwFormatPageDesc::operator==( const SfxPoolItem& rAttr ) const { assert(SfxPoolItem::operator==(rAttr)); - return ( pDefinedIn == static_cast<const SwFormatPageDesc&>(rAttr).pDefinedIn ) && - ( oNumOffset == static_cast<const SwFormatPageDesc&>(rAttr).oNumOffset ) && + return ( m_pDefinedIn == static_cast<const SwFormatPageDesc&>(rAttr).m_pDefinedIn ) && + ( m_oNumOffset == static_cast<const SwFormatPageDesc&>(rAttr).m_oNumOffset ) && ( GetPageDesc() == static_cast<const SwFormatPageDesc&>(rAttr).GetPageDesc() ); } @@ -662,7 +662,7 @@ void SwFormatPageDesc::RegisterToPageDesc( SwPageDesc& rDesc ) void SwFormatPageDesc::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew ) { - if( !pDefinedIn ) + if( !m_pDefinedIn ) return; const sal_uInt16 nWhichId = pOld ? pOld->Which() : pNew ? pNew->Which() : 0; @@ -671,15 +671,15 @@ void SwFormatPageDesc::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew case RES_OBJECTDYING: //The Pagedesc where I'm registered dies, therefore I unregister //from that format. During this I get deleted! - if( typeid(SwFormat) == typeid( pDefinedIn )) + if( typeid(SwFormat) == typeid( m_pDefinedIn )) { bool const bResult = - static_cast<SwFormat*>(pDefinedIn)->ResetFormatAttr(RES_PAGEDESC); + static_cast<SwFormat*>(m_pDefinedIn)->ResetFormatAttr(RES_PAGEDESC); OSL_ENSURE( bResult, "FormatPageDesc not deleted" ); } - else if( typeid(SwContentNode) == typeid( pDefinedIn )) + else if( typeid(SwContentNode) == typeid( m_pDefinedIn )) { - bool const bResult = static_cast<SwContentNode*>(pDefinedIn) + bool const bResult = static_cast<SwContentNode*>(m_pDefinedIn) ->ResetAttr(RES_PAGEDESC); OSL_ENSURE( bResult, "FormatPageDesc not deleted" ); } @@ -768,8 +768,8 @@ void SwFormatPageDesc::dumpAsXml(xmlTextWriterPtr pWriter) const { xmlTextWriterStartElement(pWriter, BAD_CAST("SwFormatPageDesc")); xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); - if (oNumOffset) - xmlTextWriterWriteAttribute(pWriter, BAD_CAST("oNumOffset"), BAD_CAST(OString::number(*oNumOffset).getStr())); + if (m_oNumOffset) + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("oNumOffset"), BAD_CAST(OString::number(*m_oNumOffset).getStr())); else xmlTextWriterWriteAttribute(pWriter, BAD_CAST("oNumOffset"), BAD_CAST("none")); xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("pPageDesc"), "%p", GetPageDesc()); |