diff options
Diffstat (limited to 'sw/qa')
-rw-r--r-- | sw/qa/core/uwriter.cxx | 12 | ||||
-rw-r--r-- | sw/qa/extras/mailmerge/mailmerge.cxx | 22 | ||||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 24 |
3 files changed, 29 insertions, 29 deletions
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index 2792ec32aac1..4a123fc462eb 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -182,7 +182,7 @@ void SwDocTest::testFileNameFields() { //Here's a file name with some chars in it that will be %% encoded, when expanding //SwFileNameFields we want to restore the original readable filename - utl::TempFile aTempFile(OUString("demo [name]")); + utl::TempFile aTempFile("demo [name]"); aTempFile.EnableKillingFile(); INetURLObject aTempFileURL(aTempFile.GetURL()); @@ -190,9 +190,9 @@ void SwDocTest::testFileNameFields() SfxMedium aDstMed(sFileURL, StreamMode::STD_READWRITE); std::shared_ptr<SfxFilter> pFilter(new SfxFilter( - OUString("Text"), + "Text", OUString(), SfxFilterFlags::NONE, SotClipboardFormatId::NONE, OUString(), 0, OUString(), - OUString("TEXT"), OUString() )); + "TEXT", OUString() )); aDstMed.SetFilter(pFilter); m_xDocShRef->DoSaveAs(aDstMed); @@ -574,7 +574,7 @@ void SwDocTest::testSwScanner() //fdo#40449 and fdo#39365 { SwScanner aScanner(*pTextNode, - OUString("Hello World"), + "Hello World", nullptr, ModelToViewHelper(), i18n::WordType::DICTIONARY_WORD, 0, RTL_CONSTASCII_LENGTH("Hello World")); @@ -716,8 +716,8 @@ void SwDocTest::testSwScanner() DateTime aDate(DateTime::SYSTEM); SwPostItField aPostIt( - static_cast<SwPostItFieldType*>(m_pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_POSTITFLD)), OUString("An Author"), - OUString("Some Text"), OUString("Initials"), OUString("Name"), aDate ); + static_cast<SwPostItFieldType*>(m_pDoc->getIDocumentFieldsAccess().GetSysFieldType(RES_POSTITFLD)), "An Author", + "Some Text", "Initials", "Name", aDate ); m_pDoc->getIDocumentContentOperations().InsertPoolItem(aPaM, SwFormatField(aPostIt)); m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "Apple"); diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx index ec5d66ca0ee0..8abf06e12a06 100644 --- a/sw/qa/extras/mailmerge/mailmerge.cxx +++ b/sw/qa/extras/mailmerge/mailmerge.cxx @@ -147,28 +147,28 @@ public: mMMargs.reserve( 15 ); - mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_OUTPUT_TYPE ), uno::Any( file ? text::MailMergeType::FILE : text::MailMergeType::SHELL ) ) ); - mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_DOCUMENT_URL ), uno::Any( + mMMargs.push_back( beans::NamedValue( UNO_NAME_OUTPUT_TYPE, uno::Any( file ? text::MailMergeType::FILE : text::MailMergeType::SHELL ) ) ); + mMMargs.push_back( beans::NamedValue( UNO_NAME_DOCUMENT_URL, uno::Any( ( OUString( m_directories.getURLFromSrc(mpTestDocumentPath) + OUString::createFromAscii(filename)) ) ) ) ); - mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_DATA_SOURCE_NAME ), uno::Any( aDBName ) ) ); - mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_OUTPUT_URL ), uno::Any( aWorkDir ) ) ); + mMMargs.push_back( beans::NamedValue( UNO_NAME_DATA_SOURCE_NAME, uno::Any( aDBName ) ) ); + mMMargs.push_back( beans::NamedValue( UNO_NAME_OUTPUT_URL, uno::Any( aWorkDir ) ) ); if (file) - mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_FILE_NAME_PREFIX ), uno::Any( aPrefix )) ); + mMMargs.push_back( beans::NamedValue( UNO_NAME_FILE_NAME_PREFIX, uno::Any( aPrefix )) ); if (bPrefixIsColumn) - mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_FILE_NAME_FROM_COLUMN ), uno::Any( true ) ) ); + mMMargs.push_back( beans::NamedValue( UNO_NAME_FILE_NAME_FROM_COLUMN, uno::Any( true ) ) ); if (tablename) { - mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_DAD_COMMAND_TYPE ), uno::Any( sdb::CommandType::TABLE ) ) ); - mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_DAD_COMMAND ), uno::Any( OUString::createFromAscii(tablename) ) ) ); + mMMargs.push_back( beans::NamedValue( UNO_NAME_DAD_COMMAND_TYPE, uno::Any( sdb::CommandType::TABLE ) ) ); + mMMargs.push_back( beans::NamedValue( UNO_NAME_DAD_COMMAND, uno::Any( OUString::createFromAscii(tablename) ) ) ); } if (nDataSets > 0) { mxCurResultSet = getXResultFromDataset( tablename, aDBName ); uno::Reference< sdbcx::XRowLocate > xCurRowLocate( mxCurResultSet, uno::UNO_QUERY ); - mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_RESULT_SET ), uno::Any( mxCurResultSet ) ) ); + mMMargs.push_back( beans::NamedValue( UNO_NAME_RESULT_SET, uno::Any( mxCurResultSet ) ) ); std::vector< uno::Any > vResult; vResult.reserve( nDataSets ); sal_Int32 i; @@ -176,7 +176,7 @@ public: { vResult.push_back( uno::Any( xCurRowLocate->getBookmark() ) ); } - mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_SELECTION ), uno::Any( comphelper::containerToSequence(vResult) ) ) ); + mMMargs.push_back( beans::NamedValue( UNO_NAME_SELECTION, uno::Any( comphelper::containerToSequence(vResult) ) ) ); } } @@ -638,7 +638,7 @@ DECLARE_FILE_MAILMERGE_TEST(testTdf102010, "empty.odt", "10-testing-addresses.od ++aNamedValueIter; } } - mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_SAVE_AS_SINGLE_FILE ), uno::Any( true ) ) ); + mMMargs.push_back( beans::NamedValue( UNO_NAME_SAVE_AS_SINGLE_FILE, uno::Any( true ) ) ); // Generate correct mail merge result filename executeMailMerge(); diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 217a65102d22..0ddc4397b8a7 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -730,7 +730,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)), OUString("foo"), OUString("bar"), 0, 0); + SwInputField aField(static_cast<SwInputFieldType*>(pWrtShell->GetFieldType(0, RES_INPUTFLD)), "foo", "bar", 0, 0); pWrtShell->Insert(aField); { @@ -761,10 +761,10 @@ void SwUiWriterTest::testTdf98512() SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); SwInputFieldType *const pType(static_cast<SwInputFieldType*>( pWrtShell->GetFieldType(0, RES_INPUTFLD))); - SwInputField aField1(pType, OUString("foo"), OUString("bar"), INP_TXT, 0); + SwInputField aField1(pType, "foo", "bar", INP_TXT, 0); pWrtShell->Insert(aField1); pWrtShell->SttEndDoc(/*bStt=*/true); - SwInputField aField2(pType, OUString("baz"), OUString("quux"), INP_TXT, 0); + SwInputField aField2(pType, "baz", "quux", INP_TXT, 0); pWrtShell->Insert(aField2); pWrtShell->SttEndDoc(/*bStt=*/true); pWrtShell->SetMark(); @@ -2084,14 +2084,14 @@ void SwUiWriterTest::testTdf77342() //moving cursor to the starting of document pWrtShell->SttDoc(); //inserting reference field 1 - SwGetRefField aField1(pRefType, OUString(""), REF_FOOTNOTE, sal_uInt16(0), REF_CONTENT); + SwGetRefField aField1(pRefType, "", REF_FOOTNOTE, sal_uInt16(0), REF_CONTENT); pWrtShell->Insert(aField1); //inserting second footnote pWrtShell->InsertFootnote(""); pWrtShell->SttDoc(); pCursor->Move(fnMoveForward); //inserting reference field 2 - SwGetRefField aField2(pRefType, OUString(""), REF_FOOTNOTE, sal_uInt16(1), REF_CONTENT); + SwGetRefField aField2(pRefType, "", REF_FOOTNOTE, sal_uInt16(1), REF_CONTENT); pWrtShell->Insert(aField2); //inserting third footnote pWrtShell->InsertFootnote(""); @@ -2099,7 +2099,7 @@ void SwUiWriterTest::testTdf77342() pCursor->Move(fnMoveForward); pCursor->Move(fnMoveForward); //inserting reference field 3 - SwGetRefField aField3(pRefType, OUString(""), REF_FOOTNOTE, sal_uInt16(2), REF_CONTENT); + SwGetRefField aField3(pRefType, "", REF_FOOTNOTE, sal_uInt16(2), REF_CONTENT); pWrtShell->Insert(aField3); //updating the fields IDocumentFieldsAccess& rField(pDoc->getIDocumentFieldsAccess()); @@ -2321,38 +2321,38 @@ void SwUiWriterTest::testTdf63553() SwPaM* pCursor = pDoc->GetEditShell()->GetCursor(); //inserting sequence field 1 SwSetExpFieldType* pSeqType = static_cast<SwSetExpFieldType*>(pWrtShell->GetFieldType(RES_SETEXPFLD, "Illustration")); - SwSetExpField aSetField1(pSeqType, OUString(""), SVX_NUM_ARABIC); + SwSetExpField aSetField1(pSeqType, "", SVX_NUM_ARABIC); pWrtShell->Insert(aSetField1); SwGetRefFieldType* pRefType = static_cast<SwGetRefFieldType*>(pWrtShell->GetFieldType(0, RES_GETREFFLD)); //moving cursor to the starting of document pWrtShell->SttDoc(); //inserting reference field 1 - SwGetRefField aGetField1(pRefType, OUString("Illustration"), REF_SEQUENCEFLD, sal_uInt16(0), REF_CONTENT); + SwGetRefField aGetField1(pRefType, "Illustration", REF_SEQUENCEFLD, sal_uInt16(0), REF_CONTENT); pWrtShell->Insert(aGetField1); //now we have ref1-seq1 //moving the cursor pCursor->Move(fnMoveForward); //inserting sequence field 2 - SwSetExpField aSetField2(pSeqType, OUString(""), SVX_NUM_ARABIC); + SwSetExpField aSetField2(pSeqType, "", SVX_NUM_ARABIC); pWrtShell->Insert(aSetField2); //moving the cursor pWrtShell->SttDoc(); pCursor->Move(fnMoveForward); //inserting reference field 2 - SwGetRefField aGetField2(pRefType, OUString("Illustration"), REF_SEQUENCEFLD, sal_uInt16(1), REF_CONTENT); + SwGetRefField aGetField2(pRefType, "Illustration", REF_SEQUENCEFLD, sal_uInt16(1), REF_CONTENT); pWrtShell->Insert(aGetField2); //now we have ref1-ref2-seq1-seq2 //moving the cursor pCursor->Move(fnMoveForward); pCursor->Move(fnMoveForward); //inserting sequence field 3 - SwSetExpField aSetField3(pSeqType, OUString(""), SVX_NUM_ARABIC); + SwSetExpField aSetField3(pSeqType, "", SVX_NUM_ARABIC); pWrtShell->Insert(aSetField3); pWrtShell->SttDoc(); pCursor->Move(fnMoveForward); pCursor->Move(fnMoveForward); //inserting reference field 3 - SwGetRefField aGetField3(pRefType, OUString("Illustration"), REF_SEQUENCEFLD, sal_uInt16(2), REF_CONTENT); + SwGetRefField aGetField3(pRefType, "Illustration", REF_SEQUENCEFLD, sal_uInt16(2), REF_CONTENT); pWrtShell->Insert(aGetField3); //now after insertion we have ref1-ref2-ref3-seq1-seq2-seq3 //updating the fields |