diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-10-10 16:37:11 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-10-11 09:53:14 +0200 |
commit | e44efeea57c1925069b4c772adccd9b19b77cebb (patch) | |
tree | 37f8a8a1b5cb429dcc2f4d56d1f6890496da0084 /sw/source | |
parent | 68dc00e3bfc7a99166196f479f616e9ef222fe8a (diff) |
replace numbers with their enum
Change-Id: I9b4abdea7cf762cda001c39953f7d33219ffd382
Reviewed-on: https://gerrit.libreoffice.org/80623
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/filter/ww8/ww8par5.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 89335622da0f..9dfb5261a263 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -529,7 +529,7 @@ sal_uInt16 SwWW8ImplReader::End_Field() nRet = m_aFieldStack.back().mnFieldId; switch (nRet) { - case 70: + case ww::eFORMTEXT: if (bUseEnhFields && m_pPaM!=nullptr && m_pPaM->GetPoint()!=nullptr) { SwPosition aEndPos = *m_pPaM->GetPoint(); if (!::CheckNodesRange(m_aFieldStack.back().GetPtNode(), @@ -550,8 +550,8 @@ sal_uInt16 SwWW8ImplReader::End_Field() } break; // Doing corresponding status management for TOX field, index field, hyperlink field and page reference field - case 13://TOX - case 8://index + case ww::eTOC://TOX + case ww::eINDEX://index if (m_bLoadingTOXCache) { if (m_nEmbeddedTOXLevel > 0) @@ -582,23 +582,23 @@ sal_uInt16 SwWW8ImplReader::End_Field() } } break; - case 37: //REF + case ww::ePAGEREF: //REF if (m_bLoadingTOXCache && !m_bLoadingTOXHyperlink) { m_xCtrlStck->SetAttr(*m_pPaM->GetPoint(),RES_TXTATR_INETFMT); } break; - case 88: + case ww::eHYPERLINK: if (m_bLoadingTOXHyperlink) m_bLoadingTOXHyperlink = false; m_xCtrlStck->SetAttr(*m_pPaM->GetPoint(), RES_TXTATR_INETFMT); break; - case 36: - case 68: + case ww::eMERGEINC: + case ww::eINCLUDETEXT: //Move outside the section associated with this type of field *m_pPaM->GetPoint() = m_aFieldStack.back().maStartPos; break; - case 7: // IF-field + case ww::eIF: // IF-field { // conditional field parameters const OUString& fieldDefinition = m_aFieldStack.back().GetBookmarkCode(); @@ -704,15 +704,15 @@ static bool AcceptableNestedField(sal_uInt16 nFieldCode) { switch (nFieldCode) { - case 8: // allow recursive field in TOC... - case 13: // allow recursive field in TOC... - case 36: - case 68: - case 79: - case 88: + case ww::eINDEX: // allow recursive field in TOC... + case ww::eTOC: // allow recursive field in TOC... + case ww::eMERGEINC: + case ww::eINCLUDETEXT: + case ww::eAUTOTEXT: + case ww::eHYPERLINK: // Accept AutoTextList field as nested field. // Thus, the field result is imported as plain text. - case 89: + case ww::eAUTOTEXTLIST: return true; default: return false; |