Kaydet (Commit) f051e54a authored tarafından Miklos Vajna's avatar Miklos Vajna

sw: prefix members of HTMLAttr

Change-Id: I9f87913ce537e634f8c10ddfee59002293c1fc3f
Reviewed-on: https://gerrit.libreoffice.org/62872
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst 0c6da44c
...@@ -197,7 +197,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos ) ...@@ -197,7 +197,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
HTMLAttr *pNext = pAttr->GetNext(); HTMLAttr *pNext = pAttr->GetNext();
HTMLAttr *pPrev = pAttr->GetPrev(); HTMLAttr *pPrev = pAttr->GetPrev();
sal_uInt16 nWhich = pAttr->pItem->Which(); sal_uInt16 nWhich = pAttr->m_pItem->Which();
if( !nOldEndCnt && RES_PARATR_BEGIN <= nWhich && if( !nOldEndCnt && RES_PARATR_BEGIN <= nWhich &&
pAttr->GetSttParaIdx() < pOldEndPara->GetIndex() ) pAttr->GetSttParaIdx() < pOldEndPara->GetIndex() )
{ {
...@@ -229,7 +229,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos ) ...@@ -229,7 +229,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
pNext->InsertPrev( pSetAttr ); pNext->InsertPrev( pSetAttr );
else else
{ {
if (pSetAttr->bInsAtStart) if (pSetAttr->m_bInsAtStart)
m_aSetAttrTab.push_front( pSetAttr ); m_aSetAttrTab.push_front( pSetAttr );
else else
m_aSetAttrTab.push_back( pSetAttr ); m_aSetAttrTab.push_back( pSetAttr );
...@@ -243,7 +243,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos ) ...@@ -243,7 +243,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
pNext->InsertPrev( pPrev ); pNext->InsertPrev( pPrev );
else else
{ {
if (pPrev->bInsAtStart) if (pPrev->m_bInsAtStart)
m_aSetAttrTab.push_front( pPrev ); m_aSetAttrTab.push_front( pPrev );
else else
m_aSetAttrTab.push_back( pPrev ); m_aSetAttrTab.push_back( pPrev );
...@@ -251,11 +251,11 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos ) ...@@ -251,11 +251,11 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
} }
// Set the start of the attribute // Set the start of the attribute
pAttr->nSttPara = rNewSttPara; pAttr->m_nStartPara = rNewSttPara;
pAttr->nEndPara = rNewSttPara; pAttr->m_nEndPara = rNewSttPara;
pAttr->nSttContent = nNewSttCnt; pAttr->m_nStartContent = nNewSttCnt;
pAttr->nEndContent = nNewSttCnt; pAttr->m_nEndContent = nNewSttCnt;
pAttr->pPrev = nullptr; pAttr->m_pPrev = nullptr;
pAttr = pNext; pAttr = pNext;
} }
......
...@@ -621,8 +621,8 @@ void SwHTMLParser::InsertComment( const OUString& rComment, const sal_Char *pTag ...@@ -621,8 +621,8 @@ void SwHTMLParser::InsertComment( const OUString& rComment, const sal_Char *pTag
pAttr->GetSttCnt() != nIdx ) pAttr->GetSttCnt() != nIdx )
break; break;
if( RES_TXTATR_FIELD == pAttr->pItem->Which() && if( RES_TXTATR_FIELD == pAttr->m_pItem->Which() &&
SwFieldIds::Script == static_cast<const SwFormatField *>(pAttr->pItem.get())->GetField()->GetTyp()->Which() ) SwFieldIds::Script == static_cast<const SwFormatField *>(pAttr->m_pItem.get())->GetField()->GetTyp()->Which() )
{ {
bMoveFwd = false; bMoveFwd = false;
break; break;
......
...@@ -1360,7 +1360,7 @@ bool SwHTMLParser::HasCurrentParaBookmarks( bool bIgnoreStack ) const ...@@ -1360,7 +1360,7 @@ bool SwHTMLParser::HasCurrentParaBookmarks( bool bIgnoreStack ) const
for( auto i = m_aSetAttrTab.size(); i; ) for( auto i = m_aSetAttrTab.size(); i; )
{ {
HTMLAttr* pAttr = m_aSetAttrTab[ --i ]; HTMLAttr* pAttr = m_aSetAttrTab[ --i ];
if( RES_FLTR_BOOKMARK == pAttr->pItem->Which() ) if( RES_FLTR_BOOKMARK == pAttr->m_pItem->Which() )
{ {
if( pAttr->GetSttParaIdx() == nNodeIdx ) if( pAttr->GetSttParaIdx() == nNodeIdx )
bHasMarks = true; bHasMarks = true;
......
...@@ -3161,10 +3161,10 @@ HTMLTableCnts *SwHTMLParser::InsertTableContents( ...@@ -3161,10 +3161,10 @@ HTMLTableCnts *SwHTMLParser::InsertTableContents(
while( pAttr ) while( pAttr )
{ {
OSL_ENSURE( !pAttr->GetPrev(), "Attribute has previous list" ); OSL_ENSURE( !pAttr->GetPrev(), "Attribute has previous list" );
pAttr->nSttPara = rSttPara; pAttr->m_nStartPara = rSttPara;
pAttr->nEndPara = rSttPara; pAttr->m_nEndPara = rSttPara;
pAttr->nSttContent = nSttCnt; pAttr->m_nStartContent = nSttCnt;
pAttr->nEndContent = nSttCnt; pAttr->m_nEndContent = nSttCnt;
pAttr = pAttr->GetNext(); pAttr = pAttr->GetNext();
} }
......
...@@ -129,17 +129,17 @@ class HTMLAttr ...@@ -129,17 +129,17 @@ class HTMLAttr
friend class SwHTMLParser; friend class SwHTMLParser;
friend class CellSaveStruct; friend class CellSaveStruct;
SwNodeIndex nSttPara, nEndPara; SwNodeIndex m_nStartPara, m_nEndPara;
sal_Int32 nSttContent, nEndContent; sal_Int32 m_nStartContent, m_nEndContent;
bool bInsAtStart : 1; bool m_bInsAtStart : 1;
bool bLikePara : 1; // set attribute above the whole paragraph bool m_bLikePara : 1; // set attribute above the whole paragraph
bool bValid : 1; // is the attribute valid? bool m_bValid : 1; // is the attribute valid?
std::unique_ptr<SfxPoolItem> pItem; std::unique_ptr<SfxPoolItem> m_pItem;
std::shared_ptr<HTMLAttrTable> xAttrTab; std::shared_ptr<HTMLAttrTable> m_xAttrTab;
HTMLAttr *pNext; // still to close attributes with different values HTMLAttr *m_pNext; // still to close attributes with different values
HTMLAttr *pPrev; // already closed but not set attributes HTMLAttr *m_pPrev; // already closed but not set attributes
HTMLAttr **ppHead; // list head HTMLAttr **m_ppHead; // list head
HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem, HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem,
HTMLAttr **pHd, const std::shared_ptr<HTMLAttrTable>& rAttrTab ); HTMLAttr **pHd, const std::shared_ptr<HTMLAttrTable>& rAttrTab );
...@@ -156,39 +156,39 @@ public: ...@@ -156,39 +156,39 @@ public:
HTMLAttr **pHd, const std::shared_ptr<HTMLAttrTable>& rAttrTab ); HTMLAttr **pHd, const std::shared_ptr<HTMLAttrTable>& rAttrTab );
inline void SetStart( const SwPosition& rPos ); inline void SetStart( const SwPosition& rPos );
sal_uInt32 GetSttParaIdx() const { return nSttPara.GetIndex(); } sal_uInt32 GetSttParaIdx() const { return m_nStartPara.GetIndex(); }
sal_uInt32 GetEndParaIdx() const { return nEndPara.GetIndex(); } sal_uInt32 GetEndParaIdx() const { return m_nEndPara.GetIndex(); }
const SwNodeIndex& GetSttPara() const { return nSttPara; } const SwNodeIndex& GetSttPara() const { return m_nStartPara; }
const SwNodeIndex& GetEndPara() const { return nEndPara; } const SwNodeIndex& GetEndPara() const { return m_nEndPara; }
sal_Int32 GetSttCnt() const { return nSttContent; } sal_Int32 GetSttCnt() const { return m_nStartContent; }
sal_Int32 GetEndCnt() const { return nEndContent; } sal_Int32 GetEndCnt() const { return m_nEndContent; }
bool IsLikePara() const { return bLikePara; } bool IsLikePara() const { return m_bLikePara; }
void SetLikePara() { bLikePara = true; } void SetLikePara() { m_bLikePara = true; }
SfxPoolItem& GetItem() { return *pItem; } SfxPoolItem& GetItem() { return *m_pItem; }
const SfxPoolItem& GetItem() const { return *pItem; } const SfxPoolItem& GetItem() const { return *m_pItem; }
HTMLAttr *GetNext() const { return pNext; } HTMLAttr *GetNext() const { return m_pNext; }
void InsertNext( HTMLAttr *pNxt ) { pNext = pNxt; } void InsertNext( HTMLAttr *pNxt ) { m_pNext = pNxt; }
HTMLAttr *GetPrev() const { return pPrev; } HTMLAttr *GetPrev() const { return m_pPrev; }
void InsertPrev( HTMLAttr *pPrv ); void InsertPrev( HTMLAttr *pPrv );
void ClearPrev() { pPrev = nullptr; } void ClearPrev() { m_pPrev = nullptr; }
void SetHead(HTMLAttr **ppHd, const std::shared_ptr<HTMLAttrTable>& rAttrTab) void SetHead(HTMLAttr **ppHd, const std::shared_ptr<HTMLAttrTable>& rAttrTab)
{ {
ppHead = ppHd; m_ppHead = ppHd;
xAttrTab = rAttrTab; m_xAttrTab = rAttrTab;
} }
// During setting attributes from styles it can happen that these // During setting attributes from styles it can happen that these
// shouldn't be set anymore. To delete them would be very expensive, because // shouldn't be set anymore. To delete them would be very expensive, because
// you don't know all the places where they are linked in. Therefore they're // you don't know all the places where they are linked in. Therefore they're
// made invalid and deleted at the next call of SetAttr_(). // made invalid and deleted at the next call of SetAttr_().
void Invalidate() { bValid = false; } void Invalidate() { m_bValid = false; }
}; };
class HTMLAttrContext_SaveDoc; class HTMLAttrContext_SaveDoc;
...@@ -945,10 +945,10 @@ struct SwPending ...@@ -945,10 +945,10 @@ struct SwPending
inline void HTMLAttr::SetStart( const SwPosition& rPos ) inline void HTMLAttr::SetStart( const SwPosition& rPos )
{ {
nSttPara = rPos.nNode; m_nStartPara = rPos.nNode;
nSttContent = rPos.nContent.GetIndex(); m_nStartContent = rPos.nContent.GetIndex();
nEndPara = nSttPara; m_nEndPara = m_nStartPara;
nEndContent = nSttContent; m_nEndContent = m_nStartContent;
} }
inline void HTMLAttrContext::SetMargins( sal_uInt16 nLeft, sal_uInt16 nRight, inline void HTMLAttrContext::SetMargins( sal_uInt16 nLeft, sal_uInt16 nRight,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment