diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-03-06 13:33:15 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-03-07 08:42:04 +0000 |
commit | 08f5355dee375503167989e21271a4601449a257 (patch) | |
tree | 051ae7e50b005417f77ee0fd909fc3c27cbb3bbf /sw/qa | |
parent | 14f982775cdff2e3779f9a9bcbc0341247ed90aa (diff) |
convert RES_FIELDS to scoped enum
and rename to SwFieldIds
Change-Id: I50d2b7550f68b4b020ffc1603f931c671c8e1de6
Reviewed-on: https://gerrit.libreoffice.org/34924
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/core/uwriter.cxx | 2 | ||||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index a32605d932d3..4dcf6e12df74 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -715,7 +715,7 @@ void SwDocTest::testSwScanner() DateTime aDate(DateTime::SYSTEM); SwPostItField aPostIt( - static_cast<SwPostItFieldType*>(m_pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_POSTITFLD)), "An Author", + static_cast<SwPostItFieldType*>(m_pDoc->getIDocumentFieldsAccess().GetSysFieldType(SwFieldIds::Postit)), "An Author", "Some Text", "Initials", "Name", aDate ); m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, SwFormatField(aPostIt)); diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 213b51ad2811..a48caad2e67d 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -737,7 +737,7 @@ void SwUiWriterTest::testFdo74981() // create a document with an input field SwDoc* pDoc = createDoc(); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - SwInputField aField(static_cast<SwInputFieldType*>(pWrtShell->GetFieldType(0, RES_INPUTFLD)), "foo", "bar", 0, 0); + SwInputField aField(static_cast<SwInputFieldType*>(pWrtShell->GetFieldType(0, SwFieldIds::Input)), "foo", "bar", 0, 0); pWrtShell->Insert(aField); { @@ -767,7 +767,7 @@ void SwUiWriterTest::testTdf98512() SwDoc* pDoc = createDoc(); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); SwInputFieldType *const pType(static_cast<SwInputFieldType*>( - pWrtShell->GetFieldType(0, RES_INPUTFLD))); + pWrtShell->GetFieldType(0, SwFieldIds::Input))); SwInputField aField1(pType, "foo", "bar", INP_TXT, 0); pWrtShell->Insert(aField1); pWrtShell->SttEndDoc(/*bStt=*/true); @@ -2086,7 +2086,7 @@ void SwUiWriterTest::testTdf77342() SwPaM* pCursor = pDoc->GetEditShell()->GetCursor(); //inserting first footnote pWrtShell->InsertFootnote(""); - SwFieldType* pField = pWrtShell->GetFieldType(0, RES_GETREFFLD); + SwFieldType* pField = pWrtShell->GetFieldType(0, SwFieldIds::GetRef); SwGetRefFieldType* pRefType = static_cast<SwGetRefFieldType*>(pField); //moving cursor to the starting of document pWrtShell->SttDoc(); @@ -2327,10 +2327,10 @@ void SwUiWriterTest::testTdf63553() SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); SwPaM* pCursor = pDoc->GetEditShell()->GetCursor(); //inserting sequence field 1 - SwSetExpFieldType* pSeqType = static_cast<SwSetExpFieldType*>(pWrtShell->GetFieldType(RES_SETEXPFLD, "Illustration")); + SwSetExpFieldType* pSeqType = static_cast<SwSetExpFieldType*>(pWrtShell->GetFieldType(SwFieldIds::SetExp, "Illustration")); SwSetExpField aSetField1(pSeqType, "", SVX_NUM_ARABIC); pWrtShell->Insert(aSetField1); - SwGetRefFieldType* pRefType = static_cast<SwGetRefFieldType*>(pWrtShell->GetFieldType(0, RES_GETREFFLD)); + SwGetRefFieldType* pRefType = static_cast<SwGetRefFieldType*>(pWrtShell->GetFieldType(0, SwFieldIds::GetRef)); //moving cursor to the starting of document pWrtShell->SttDoc(); //inserting reference field 1 |