diff options
Diffstat (limited to 'sw/qa/extras/uiwriter/uiwriter.cxx')
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 7e28d0f57ead..eaa2e40bb636 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -1271,7 +1271,7 @@ void SwUiWriterTest::testFdo74981() SwDoc* pDoc = createDoc(); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); SwInputField aField(static_cast<SwInputFieldType*>(pWrtShell->GetFieldType(0, SwFieldIds::Input)), "foo", "bar", 0, 0); - pWrtShell->Insert(aField); + pWrtShell->InsertField2(aField); { // expect hints @@ -1302,10 +1302,10 @@ void SwUiWriterTest::testTdf98512() SwInputFieldType *const pType(static_cast<SwInputFieldType*>( pWrtShell->GetFieldType(0, SwFieldIds::Input))); SwInputField aField1(pType, "foo", "bar", INP_TXT, 0); - pWrtShell->Insert(aField1); + pWrtShell->InsertField2(aField1); pWrtShell->SttEndDoc(/*bStt=*/true); SwInputField aField2(pType, "baz", "quux", INP_TXT, 0); - pWrtShell->Insert(aField2); + pWrtShell->InsertField2(aField2); pWrtShell->SttEndDoc(/*bStt=*/true); pWrtShell->SetMark(); pWrtShell->SttEndDoc(/*bStt=*/false); @@ -2756,14 +2756,14 @@ void SwUiWriterTest::testTdf77342() pWrtShell->StartOfSection(); //inserting reference field 1 SwGetRefField aField1(pRefType, "", "", REF_FOOTNOTE, sal_uInt16(0), REF_CONTENT); - pWrtShell->Insert(aField1); + pWrtShell->InsertField2(aField1); //inserting second footnote pWrtShell->InsertFootnote(""); pWrtShell->StartOfSection(); pCursor->Move(fnMoveForward); //inserting reference field 2 SwGetRefField aField2(pRefType, "", "", REF_FOOTNOTE, sal_uInt16(1), REF_CONTENT); - pWrtShell->Insert(aField2); + pWrtShell->InsertField2(aField2); //inserting third footnote pWrtShell->InsertFootnote(""); pWrtShell->StartOfSection(); @@ -2771,7 +2771,7 @@ void SwUiWriterTest::testTdf77342() pCursor->Move(fnMoveForward); //inserting reference field 3 SwGetRefField aField3(pRefType, "", "", REF_FOOTNOTE, sal_uInt16(2), REF_CONTENT); - pWrtShell->Insert(aField3); + pWrtShell->InsertField2(aField3); //updating the fields IDocumentFieldsAccess& rField(pDoc->getIDocumentFieldsAccess()); rField.UpdateExpFields(nullptr, true); @@ -2992,38 +2992,38 @@ void SwUiWriterTest::testTdf63553() //inserting sequence field 1 SwSetExpFieldType* pSeqType = static_cast<SwSetExpFieldType*>(pWrtShell->GetFieldType(SwFieldIds::SetExp, "Illustration")); SwSetExpField aSetField1(pSeqType, "", SVX_NUM_ARABIC); - pWrtShell->Insert(aSetField1); + pWrtShell->InsertField2(aSetField1); SwGetRefFieldType* pRefType = static_cast<SwGetRefFieldType*>(pWrtShell->GetFieldType(0, SwFieldIds::GetRef)); //moving cursor to the starting of document pWrtShell->StartOfSection(); //inserting reference field 1 SwGetRefField aGetField1(pRefType, "Illustration", "", REF_SEQUENCEFLD, sal_uInt16(0), REF_CONTENT); - pWrtShell->Insert(aGetField1); + pWrtShell->InsertField2(aGetField1); //now we have ref1-seq1 //moving the cursor pCursor->Move(fnMoveForward); //inserting sequence field 2 SwSetExpField aSetField2(pSeqType, "", SVX_NUM_ARABIC); - pWrtShell->Insert(aSetField2); + pWrtShell->InsertField2(aSetField2); //moving the cursor pWrtShell->StartOfSection(); pCursor->Move(fnMoveForward); //inserting reference field 2 SwGetRefField aGetField2(pRefType, "Illustration", "", REF_SEQUENCEFLD, sal_uInt16(1), REF_CONTENT); - pWrtShell->Insert(aGetField2); + pWrtShell->InsertField2(aGetField2); //now we have ref1-ref2-seq1-seq2 //moving the cursor pCursor->Move(fnMoveForward); pCursor->Move(fnMoveForward); //inserting sequence field 3 SwSetExpField aSetField3(pSeqType, "", SVX_NUM_ARABIC); - pWrtShell->Insert(aSetField3); + pWrtShell->InsertField2(aSetField3); pWrtShell->StartOfSection(); pCursor->Move(fnMoveForward); pCursor->Move(fnMoveForward); //inserting reference field 3 SwGetRefField aGetField3(pRefType, "Illustration", "", REF_SEQUENCEFLD, sal_uInt16(2), REF_CONTENT); - pWrtShell->Insert(aGetField3); + pWrtShell->InsertField2(aGetField3); //now after insertion we have ref1-ref2-ref3-seq1-seq2-seq3 //updating the fields IDocumentFieldsAccess& rField(pDoc->getIDocumentFieldsAccess()); @@ -7131,7 +7131,7 @@ void SwUiWriterTest::testTdf115013() // Insert the field into document SwDBField aField(pFieldType); - pWrtShell->Insert(aField); + pWrtShell->InsertField2(aField); } // Save it as DOCX & load it again reload("Office Open XML Text", "mm-field.docx"); |