From 8b4719c29fc9bd7e198ad6ced301e1ff7a350f16 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Wed, 16 Oct 2019 15:06:23 +0200 Subject: Rename OUStringLiteral1 to OUStringChar It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- sw/qa/core/uwriter.cxx | 16 +++++++-------- sw/qa/extras/odfimport/odfimport.cxx | 4 ++-- sw/qa/extras/uiwriter/uiwriter.cxx | 26 ++++++++++++------------ sw/source/core/access/accportions.cxx | 2 +- sw/source/core/bastyp/calc.cxx | 2 +- sw/source/core/crsr/crstrvl.cxx | 2 +- sw/source/core/doc/DocumentFieldsManager.cxx | 4 ++-- sw/source/core/doc/acmplwrd.cxx | 4 ++-- sw/source/core/doc/docfld.cxx | 10 +++++----- sw/source/core/doc/doctxm.cxx | 6 +++--- sw/source/core/docnode/ndsect.cxx | 2 +- sw/source/core/docnode/section.cxx | 4 ++-- sw/source/core/edit/autofmt.cxx | 14 ++++++------- sw/source/core/edit/editsh.cxx | 2 +- sw/source/core/edit/edlingu.cxx | 4 ++-- sw/source/core/fields/authfld.cxx | 2 +- sw/source/core/fields/cellfml.cxx | 6 +++--- sw/source/core/fields/dbfld.cxx | 12 +++++------ sw/source/core/fields/ddefld.cxx | 2 +- sw/source/core/fields/docufld.cxx | 4 ++-- sw/source/core/fields/reffld.cxx | 2 +- sw/source/core/frmedt/fetab.cxx | 4 ++-- sw/source/core/graphic/ndgrf.cxx | 4 ++-- sw/source/core/table/swtable.cxx | 4 ++-- sw/source/core/text/porfld.cxx | 2 +- sw/source/core/tox/tox.cxx | 8 ++++---- sw/source/core/tox/txmsrt.cxx | 6 +++--- sw/source/core/txtnode/thints.cxx | 4 ++-- sw/source/core/undo/unins.cxx | 2 +- sw/source/core/undo/unovwr.cxx | 8 ++++---- sw/source/core/unocore/unofield.cxx | 6 +++--- sw/source/core/unocore/unosect.cxx | 14 ++++++------- sw/source/filter/ascii/ascatr.cxx | 2 +- sw/source/filter/html/css1atr.cxx | 4 ++-- sw/source/filter/html/htmlfld.cxx | 2 +- sw/source/filter/html/htmlftn.cxx | 6 +++--- sw/source/filter/html/htmlsect.cxx | 4 ++-- sw/source/filter/html/wrthtml.cxx | 2 +- sw/source/filter/ww8/docxattributeoutput.cxx | 2 +- sw/source/filter/ww8/rtfattributeoutput.cxx | 2 +- sw/source/filter/ww8/wrtw8nds.cxx | 6 +++--- sw/source/filter/ww8/ww8atr.cxx | 4 ++-- sw/source/filter/ww8/ww8par2.cxx | 2 +- sw/source/filter/ww8/ww8par3.cxx | 2 +- sw/source/filter/ww8/ww8par5.cxx | 6 +++--- sw/source/filter/xml/xmltbli.cxx | 4 ++-- sw/source/ui/dbui/dbinsdlg.cxx | 2 +- sw/source/ui/dbui/mmlayoutpage.cxx | 12 +++++------ sw/source/ui/dialog/ascfldlg.cxx | 2 +- sw/source/ui/dialog/uiregionsw.cxx | 30 ++++++++++++++-------------- sw/source/ui/envelp/envlop1.cxx | 4 ++-- sw/source/ui/fldui/changedb.cxx | 6 +++--- sw/source/ui/fldui/flddb.cxx | 8 ++++---- sw/source/ui/fldui/fldfunc.cxx | 2 +- sw/source/ui/fldui/fldvar.cxx | 12 +++++------ sw/source/ui/index/cnttab.cxx | 22 ++++++++++---------- sw/source/ui/misc/bookmark.cxx | 6 +++--- sw/source/ui/misc/glosbib.cxx | 10 +++++----- sw/source/ui/misc/glossary.cxx | 6 +++--- sw/source/ui/vba/vbalisthelper.cxx | 2 +- sw/source/ui/vba/vbatablehelper.cxx | 4 ++-- sw/source/uibase/app/applab.cxx | 4 ++-- sw/source/uibase/app/docstyle.cxx | 4 ++-- sw/source/uibase/dbui/dbmgr.cxx | 8 ++++---- sw/source/uibase/dbui/mmconfigitem.cxx | 2 +- sw/source/uibase/dialog/regionsw.cxx | 4 ++-- sw/source/uibase/dochdl/gloshdl.cxx | 4 ++-- sw/source/uibase/docvw/edtwin.cxx | 2 +- sw/source/uibase/docvw/edtwin2.cxx | 2 +- sw/source/uibase/fldui/fldmgr.cxx | 8 ++++---- sw/source/uibase/misc/glosdoc.cxx | 10 +++++----- sw/source/uibase/ribbar/inputwin.cxx | 12 +++++------ sw/source/uibase/shells/textfld.cxx | 6 +++--- sw/source/uibase/shells/textsh2.cxx | 6 +++--- sw/source/uibase/sidebar/PageSizeControl.cxx | 2 +- sw/source/uibase/uno/unoatxt.cxx | 4 ++-- sw/source/uibase/utlui/content.cxx | 2 +- sw/source/uibase/utlui/glbltree.cxx | 4 ++-- sw/source/uibase/utlui/gloslst.cxx | 6 +++--- sw/source/uibase/wrtsh/wrtsh1.cxx | 2 +- sw/source/uibase/wrtsh/wrtsh2.cxx | 4 ++-- 81 files changed, 232 insertions(+), 232 deletions(-) (limited to 'sw') diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index 64ad23f53001..62756392113f 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -397,7 +397,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsExpandFootnoteReplaceMode() ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode); OUString sViewText = aModelToViewHelper.getViewText(); CPPUNIT_ASSERT_EQUAL( - OUString("AAAAA BBBBB " + OUStringLiteral1(CHAR_ZWSP) + " CCCCC " + OUStringLiteral1(CHAR_ZWSP) + " DDDDD"), + OUString("AAAAA BBBBB " + OUStringChar(CHAR_ZWSP) + " CCCCC " + OUStringChar(CHAR_ZWSP) + " DDDDD"), sViewText); CPPUNIT_ASSERT_EQUAL(static_cast(2), aModelToViewHelper.getFootnotePositions().size()); @@ -441,7 +441,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisible() ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr, ExpandMode::HideInvisible); OUString sViewText = aModelToViewHelper.getViewText(); CPPUNIT_ASSERT_EQUAL( - OUString("AAAAA CCCCC " + OUStringLiteral1(CH_TXTATR_BREAKWORD) + " DDDDD"), + OUString("AAAAA CCCCC " + OUStringChar(CH_TXTATR_BREAKWORD) + " DDDDD"), sViewText); } @@ -452,7 +452,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideRedlined() ModelToViewHelper aModelToViewHelper(*pTextNode, nullptr, ExpandMode::HideDeletions); OUString sViewText = aModelToViewHelper.getViewText(); CPPUNIT_ASSERT_EQUAL( - OUString("AAAABB " + OUStringLiteral1(CH_TXTATR_BREAKWORD) + " CCCCC " + OUStringLiteral1(CH_TXTATR_BREAKWORD) + " DDDDD"), + OUString("AAAABB " + OUStringChar(CH_TXTATR_BREAKWORD) + " CCCCC " + OUStringChar(CH_TXTATR_BREAKWORD) + " DDDDD"), sViewText); } @@ -474,7 +474,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisibleExpandFootnoteRepl ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode); OUString sViewText = aModelToViewHelper.getViewText(); CPPUNIT_ASSERT_EQUAL( - OUString("AAAAA CCCCC " + OUStringLiteral1(CHAR_ZWSP) + " DDDDD"), + OUString("AAAAA CCCCC " + OUStringChar(CHAR_ZWSP) + " DDDDD"), sViewText); CPPUNIT_ASSERT_EQUAL(static_cast(1), aModelToViewHelper.getFootnotePositions().size()); @@ -503,7 +503,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideHideRedlinedExpandFootnoteR ExpandMode::ExpandFields | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode); OUString sViewText = aModelToViewHelper.getViewText(); CPPUNIT_ASSERT_EQUAL( - OUString("AAAABB " + OUStringLiteral1(CHAR_ZWSP) + " CCCCC " + OUStringLiteral1(CHAR_ZWSP) + " DDDDD"), + OUString("AAAABB " + OUStringChar(CHAR_ZWSP) + " CCCCC " + OUStringChar(CHAR_ZWSP) + " DDDDD"), sViewText); CPPUNIT_ASSERT_EQUAL(static_cast(2), aModelToViewHelper.getFootnotePositions().size()); @@ -523,7 +523,7 @@ void SwDocTest::testModelToViewHelperHideInvisibleHideRedlined() ExpandMode::HideInvisible | ExpandMode::HideDeletions); OUString sViewText = aModelToViewHelper.getViewText(); OUString aBuffer = "AAAACCCCC " + - OUStringLiteral1(CH_TXTATR_BREAKWORD) + + OUStringChar(CH_TXTATR_BREAKWORD) + " DDDDD"; CPPUNIT_ASSERT_EQUAL(aBuffer, sViewText); } @@ -546,7 +546,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsHideInvisibleHideRedlinedExpand ExpandMode::ExpandFields | ExpandMode::HideInvisible | ExpandMode::HideDeletions | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode); OUString sViewText = aModelToViewHelper.getViewText(); CPPUNIT_ASSERT_EQUAL(sViewText, - OUString("AAAACCCCC " + OUStringLiteral1(CHAR_ZWSP) + " DDDDD")); + OUString("AAAACCCCC " + OUStringChar(CHAR_ZWSP) + " DDDDD")); CPPUNIT_ASSERT_EQUAL(static_cast(1), aModelToViewHelper.getFootnotePositions().size()); CPPUNIT_ASSERT_EQUAL(static_cast(10), @@ -573,7 +573,7 @@ void SwDocTest::testModelToViewHelperExpandFieldsExpandFootnoteReplaceMode2() ExpandMode::ExpandFields | ExpandMode::ExpandFootnote | ExpandMode::ReplaceMode); OUString sViewText = aModelToViewHelper.getViewText(); CPPUNIT_ASSERT_EQUAL( - OUString("AAAAA" + OUStringLiteral1(CHAR_ZWSP) + "CCCCC"), + OUString("AAAAA" + OUStringChar(CHAR_ZWSP) + "CCCCC"), sViewText); CPPUNIT_ASSERT_EQUAL(static_cast(0), aModelToViewHelper.getFootnotePositions().size()); diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx index 8703385f2398..08495526e572 100644 --- a/sw/qa/extras/odfimport/odfimport.cxx +++ b/sw/qa/extras/odfimport/odfimport.cxx @@ -968,8 +968,8 @@ DECLARE_ODFIMPORT_TEST(testTdf123968, "tdf123968.odt") SwTextNode& rStart = dynamic_cast(pShellCursor->Start()->nNode.GetNode()); // The field is now editable like any text, thus the field content "New value" shows up for the cursor. - CPPUNIT_ASSERT_EQUAL(OUString("inputfield: " + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDSTART) - + "New value" + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDEND)), + CPPUNIT_ASSERT_EQUAL(OUString("inputfield: " + OUStringChar(CH_TXT_ATR_INPUTFIELDSTART) + + "New value" + OUStringChar(CH_TXT_ATR_INPUTFIELDEND)), rStart.GetText()); } diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index a859f152400e..2b1b04f8ae80 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -1217,9 +1217,9 @@ void SwUiWriterTest::testTdf98512() pWrtShell->SetMark(); pWrtShell->SttEndDoc(/*bStt=*/false); OUString const expected1( - OUStringLiteral1(CH_TXT_ATR_INPUTFIELDSTART) + "foo" + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDEND)); + OUStringChar(CH_TXT_ATR_INPUTFIELDSTART) + "foo" + OUStringChar(CH_TXT_ATR_INPUTFIELDEND)); OUString const expected2( - OUStringLiteral1(CH_TXT_ATR_INPUTFIELDSTART) + "baz" + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDEND) + OUStringChar(CH_TXT_ATR_INPUTFIELDSTART) + "baz" + OUStringChar(CH_TXT_ATR_INPUTFIELDEND) + expected1); CPPUNIT_ASSERT_EQUAL(expected2, pWrtShell->getShellCursor(false)->GetText()); sw::UndoManager& rUndoManager = pDoc->GetUndoManager(); @@ -2582,10 +2582,10 @@ void SwUiWriterTest::testTdf73660() { SwDoc* pDoc = createDoc(); SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); - OUString aData1 = "First" + OUStringLiteral1(CHAR_SOFTHYPHEN) + "Word"; - OUString aData2 = "Seco" + OUStringLiteral1(CHAR_SOFTHYPHEN) + "nd"; - OUString aData3 = OUStringLiteral1(CHAR_SOFTHYPHEN) + "Third"; - OUString aData4 = "Fourth" + OUStringLiteral1(CHAR_SOFTHYPHEN); + OUString aData1 = "First" + OUStringChar(CHAR_SOFTHYPHEN) + "Word"; + OUString aData2 = "Seco" + OUStringChar(CHAR_SOFTHYPHEN) + "nd"; + OUString aData3 = OUStringChar(CHAR_SOFTHYPHEN) + "Third"; + OUString aData4 = "Fourth" + OUStringChar(CHAR_SOFTHYPHEN); OUString aData5 = "Fifth"; pWrtShell->Insert("We are inserting some text in the document to check the search feature "); pWrtShell->Insert(aData1 + " "); @@ -3716,7 +3716,7 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512() // now we have "\1foo\1" with the "foo" hidden CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(0, RES_TXTATR_FLYCNT)); CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT)); - CPPUNIT_ASSERT_EQUAL(OUString(OUStringLiteral1(CH_TXTATR_BREAKWORD) + u"foo" + OUStringLiteral1(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText()); SfxPoolItem const* pItem; SfxItemSet query(pDoc->GetAttrPool(), svl::Items{}); pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 1, 4); @@ -3738,7 +3738,7 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512() CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT)); CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetNode().GetTextNode()->Len()); - CPPUNIT_ASSERT_EQUAL(OUString(OUStringLiteral1(CH_TXTATR_BREAKWORD) + u"foo" + OUStringLiteral1(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText()); pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 0, 1); CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); query.ClearItem(RES_CHRATR_HIDDEN); @@ -3758,7 +3758,7 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512() CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT)); CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetNode().GetTextNode()->Len()); - CPPUNIT_ASSERT_EQUAL(OUString(OUStringLiteral1(CH_TXTATR_BREAKWORD) + u"foo" + OUStringLiteral1(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText()); pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 0, 1); CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); query.ClearItem(RES_CHRATR_HIDDEN); @@ -3781,7 +3781,7 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512() CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT)); CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetNode().GetTextNode()->Len()); - CPPUNIT_ASSERT_EQUAL(OUString(OUStringLiteral1(CH_TXTATR_BREAKWORD) + u"foo" + OUStringLiteral1(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText()); pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 4, 5); CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); query.ClearItem(RES_CHRATR_HIDDEN); @@ -3801,7 +3801,7 @@ void SwUiWriterTest::testUndoDelAsCharTdf107512() CPPUNIT_ASSERT(pShell->GetCursor()->GetNode().GetTextNode()->GetTextAttrForCharAt(4, RES_TXTATR_FLYCNT)); CPPUNIT_ASSERT_EQUAL(size_t(2), pDoc->GetFlyCount(FLYCNTTYPE_GRF)); CPPUNIT_ASSERT_EQUAL(sal_Int32(5), pShell->GetCursor()->GetNode().GetTextNode()->Len()); - CPPUNIT_ASSERT_EQUAL(OUString(OUStringLiteral1(CH_TXTATR_BREAKWORD) + u"foo" + OUStringLiteral1(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText()); + CPPUNIT_ASSERT_EQUAL(OUString(OUStringChar(CH_TXTATR_BREAKWORD) + u"foo" + OUStringChar(CH_TXTATR_BREAKWORD)), pShell->GetCursor()->GetNode().GetTextNode()->GetText()); pShell->GetCursor()->GetNode().GetTextNode()->GetParaAttr(query, 4, 5); CPPUNIT_ASSERT_EQUAL(SfxItemState::DEFAULT, query.GetItemState(RES_CHRATR_HIDDEN, false, &pItem)); query.ClearItem(RES_CHRATR_HIDDEN); @@ -4570,7 +4570,7 @@ void SwUiWriterTest::testTdf96479() { // We want to verify the empty input text field in the bookmark static const OUString emptyInputTextField = - OUStringLiteral1(CH_TXT_ATR_INPUTFIELDSTART) + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDEND); + OUStringChar(CH_TXT_ATR_INPUTFIELDSTART) + OUStringChar(CH_TXT_ATR_INPUTFIELDEND); SwDoc* pDoc = createDoc(); SwXTextDocument *pTextDoc = dynamic_cast(mxComponent.get()); @@ -6945,7 +6945,7 @@ void SwUiWriterTest::testTdf108423() pWrtShell->AutoCorrect(corr, cChar); // The word "i" should be capitalized due to autocorrect, followed by a typographical apostrophe sal_uLong nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); - OUString sIApostrophe(u"I" + OUStringLiteral1(0x2019)); + OUString sIApostrophe(u"I" + OUStringChar(0x2019)); CPPUNIT_ASSERT_EQUAL(sIApostrophe, static_cast(pDoc->GetNodes()[nIndex])->GetText()); pWrtShell->Insert(" i"); pWrtShell->AutoCorrect(corr, cChar); diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx index 367630cdbd4e..00cabbe14eba 100644 --- a/sw/source/core/access/accportions.cxx +++ b/sw/source/core/access/accportions.cxx @@ -168,7 +168,7 @@ void SwAccessiblePortionData::Special( // #i111768# - apply patch from kstribley: // Include the control characters. case PortionType::ControlChar: - sDisplay = rText + OUStringLiteral1(m_pTextFrame->GetText()[sal_Int32(m_nViewPosition)]); + sDisplay = rText + OUStringChar(m_pTextFrame->GetText()[sal_Int32(m_nViewPosition)]); break; default: sDisplay = rText; diff --git a/sw/source/core/bastyp/calc.cxx b/sw/source/core/bastyp/calc.cxx index 41b4352eee7a..19dd4e7751f0 100644 --- a/sw/source/core/bastyp/calc.cxx +++ b/sw/source/core/bastyp/calc.cxx @@ -1307,7 +1307,7 @@ OUString SwCalc::GetDBName(const OUString& rName) return rName.copy( 0, nPos ); } SwDBData aData = m_rDoc.GetDBData(); - return aData.sDataSource + OUStringLiteral1(DB_DELIM) + aData.sCommand; + return aData.sDataSource + OUStringChar(DB_DELIM) + aData.sCommand; } namespace diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx index eed25eb2617e..374d0d940c7f 100644 --- a/sw/source/core/crsr/crstrvl.cxx +++ b/sw/source/core/crsr/crstrvl.cxx @@ -2452,7 +2452,7 @@ bool SwCursorShell::SelectNxtPrvHyperlink( bool bNext ) rAttr.GetStart(), *rAttr.GetEnd() - rAttr.GetStart() ) ); - sText = sText.replaceAll(OUStringLiteral1(0x0a), ""); + sText = sText.replaceAll(OUStringChar(0x0a), ""); sText = comphelper::string::strip(sText, ' '); if( !sText.isEmpty() ) diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index a76701348a1d..9d391b47fb83 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -87,8 +87,8 @@ namespace if( aDBData != aDocData ) { - sDBNumNm = aDBData.sDataSource + OUStringLiteral1(DB_DELIM) - + aDBData.sCommand + OUStringLiteral1(DB_DELIM); + sDBNumNm = aDBData.sDataSource + OUStringChar(DB_DELIM) + + aDBData.sCommand + OUStringChar(DB_DELIM); } sDBNumNm += SwFieldType::GetTypeStr(SwFieldTypesEnum::DatabaseSetNumber); diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx index db2472e76407..4a4c01de5b12 100644 --- a/sw/source/core/doc/acmplwrd.cxx +++ b/sw/source/core/doc/acmplwrd.cxx @@ -235,8 +235,8 @@ bool SwAutoCompleteWord::InsertWord( const OUString& rWord, SwDoc& rDoc ) return false; } - OUString aNewWord = rWord.replaceAll(OUStringLiteral1(CH_TXTATR_INWORD), "") - .replaceAll(OUStringLiteral1(CH_TXTATR_BREAKWORD), ""); + OUString aNewWord = rWord.replaceAll(OUStringChar(CH_TXTATR_INWORD), "") + .replaceAll(OUStringChar(CH_TXTATR_BREAKWORD), ""); m_pImpl->AddDocument(rDoc); bool bRet = false; diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx index bd62b5842b6a..1032f43ab260 100644 --- a/sw/source/core/doc/docfld.cxx +++ b/sw/source/core/doc/docfld.cxx @@ -414,8 +414,8 @@ void SwDoc::SetInitDBFields( bool b ) /// Get all databases that are used by fields static OUString lcl_DBDataToString(const SwDBData& rData) { - return rData.sDataSource + OUStringLiteral1(DB_DELIM) - + rData.sCommand + OUStringLiteral1(DB_DELIM) + return rData.sDataSource + OUStringChar(DB_DELIM) + + rData.sCommand + OUStringChar(DB_DELIM) + OUString::number(rData.nCommandType); } @@ -510,7 +510,7 @@ void SwDoc::GetAllDBNames( std::vector& rAllDBNames ) const SwDSParams_t& rArr = pMgr->GetDSParamArray(); for (const auto& pParam : rArr) { - rAllDBNames.emplace_back(pParam->sDataSource + OUStringLiteral1(DB_DELIM) + pParam->sCommand); + rAllDBNames.emplace_back(pParam->sDataSource + OUStringChar(DB_DELIM) + pParam->sCommand); } #endif } @@ -538,7 +538,7 @@ std::vector& SwDoc::FindUsedDBs( const std::vector& rAllDBNa const sal_Int32 nEndPos = sFormula.indexOf('.', nPos); if( nEndPos>=0 ) { - rUsedDBNames.emplace_back(sItem + OUStringLiteral1(DB_DELIM) + sFormula.copy( nPos, nEndPos - nPos )); + rUsedDBNames.emplace_back(sItem + OUStringChar(DB_DELIM) + sFormula.copy( nPos, nEndPos - nPos )); } } } @@ -686,7 +686,7 @@ namespace OUString lcl_CutOffDBCommandType(const OUString& rName) { - return rName.replaceFirst(OUStringLiteral1(DB_DELIM), ".").getToken(0, DB_DELIM); + return rName.replaceFirst(OUStringChar(DB_DELIM), ".").getToken(0, DB_DELIM); } } diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index d5645c8ff312..7653ea4543a8 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -1337,7 +1337,7 @@ void SwTOXBaseSection::UpdateSequence(const SwTextNode* pOwnChapterNode, { const SwSetExpField& rSeqField = dynamic_cast(*(pFormatField->GetField())); const OUString sName = GetSequenceName() - + OUStringLiteral1(cSequenceMarkSeparator) + + OUStringChar(cSequenceMarkSeparator) + OUString::number( rSeqField.GetSeqNumber() ); std::unique_ptr pNew(new SwTOXPara( rTextNode, SwTOXElement::Sequence, 1, sName )); // set indexes if the number or the reference text are to be displayed @@ -1728,9 +1728,9 @@ void SwTOXBaseSection::UpdatePageNum_( SwTextNode* pNd, // collect starts end ends of main entry character style std::unique_ptr< std::vector > xCharStyleIdx(pMainEntryNums ? new std::vector : nullptr); - OUString sSrchStr = OUStringLiteral1(C_NUM_REPL) + S_PAGE_DELI + OUStringLiteral1(C_NUM_REPL); + OUString sSrchStr = OUStringChar(C_NUM_REPL) + S_PAGE_DELI + OUStringChar(C_NUM_REPL); sal_Int32 nStartPos = pNd->GetText().indexOf(sSrchStr); - sSrchStr = OUStringLiteral1(C_NUM_REPL) + OUStringLiteral1(C_END_PAGE_NUM); + sSrchStr = OUStringChar(C_NUM_REPL) + OUStringChar(C_END_PAGE_NUM); sal_Int32 nEndPos = pNd->GetText().indexOf(sSrchStr); if (-1 == nEndPos || rNums.empty()) diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx index 5be1211da092..bf6fe8b71e31 100644 --- a/sw/source/core/docnode/ndsect.cxx +++ b/sw/source/core/docnode/ndsect.cxx @@ -679,7 +679,7 @@ void SwDoc::UpdateSection( size_t const nPos, SwSectionData & rNewData, ::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo()); // The LinkFileName could only consist of separators - OUString sCompareString = OUStringLiteral1(sfx2::cTokenSeparator) + OUStringLiteral1(sfx2::cTokenSeparator); + OUString sCompareString = OUStringChar(sfx2::cTokenSeparator) + OUStringChar(sfx2::cTokenSeparator); const bool bUpdate = (!pSection->IsLinkType() && rNewData.IsLinkType()) || (!rNewData.GetLinkFileName().isEmpty() diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx index be3d20e48869..7aff426c62cd 100644 --- a/sw/source/core/docnode/section.cxx +++ b/sw/source/core/docnode/section.cxx @@ -564,8 +564,8 @@ OUString const & SwSection::GetLinkFileName() const sfx2::LinkManager::GetDisplayNames( m_RefLink.get(), nullptr, &sTmp, &sRange, &sFilter )) { - sTmp += OUStringLiteral1(sfx2::cTokenSeparator) + sFilter - + OUStringLiteral1(sfx2::cTokenSeparator) + sRange; + sTmp += OUStringChar(sfx2::cTokenSeparator) + sFilter + + OUStringChar(sfx2::cTokenSeparator) + sRange; } else if( GetFormat() && !GetFormat()->GetSectionNode() ) { diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx index 6b6a3b9ff9fb..59de10036107 100644 --- a/sw/source/core/edit/autofmt.cxx +++ b/sw/source/core/edit/autofmt.cxx @@ -788,12 +788,12 @@ SwAutoFormat::GetDigitLevel(const SwTextFrame& rFrame, TextFrameIndex& rPos, } if( pNumTypes ) - *pNumTypes += OUStringLiteral1('0' + SVX_NUM_ARABIC); + *pNumTypes += OUStringChar('0' + SVX_NUM_ARABIC); eScan = eScan | CHG; } else if( pNumTypes && !(eScan & DIGIT) ) - *pNumTypes += OUStringLiteral1('0' + SVX_NUM_ARABIC); + *pNumTypes += OUStringChar('0' + SVX_NUM_ARABIC); eScan &= ~DELIM; // remove Delim if( 0 != (eScan & ~CHG) && DIGIT != (eScan & ~CHG)) @@ -875,11 +875,11 @@ SwAutoFormat::GetDigitLevel(const SwTextFrame& rFrame, TextFrameIndex& rPos, } if( pNumTypes ) - *pNumTypes += OUStringLiteral1(cNumTyp); + *pNumTypes += OUStringChar(cNumTyp); eScan = eScan | CHG; } else if( pNumTypes && !(eScan & eTmpScan) ) - *pNumTypes += OUStringLiteral1(cNumTyp); + *pNumTypes += OUStringChar(cNumTyp); eScan &= ~DELIM; // remove Delim @@ -973,9 +973,9 @@ CHECK_ROMAN_5: nClosingParentheses++; // only if no numbers were read until here if( pPrefix && !( eScan & ( NO_DELIM | CHG )) ) - *pPrefix += OUStringLiteral1(rText[nPos]); + *pPrefix += OUStringChar(rText[nPos]); else if( pPostfix ) - *pPostfix += OUStringLiteral1(rText[nPos]); + *pPostfix += OUStringChar(rText[nPos]); if( NO_DELIM & eScan ) { @@ -1734,7 +1734,7 @@ void SwAutoFormat::BuildEnum( sal_uInt16 nLvl, sal_uInt16 nDigitLevel ) { OUString sChgStr('\t'); if( bChgBullet ) - sChgStr = OUStringLiteral1( m_aFlags.cBullet ) + sChgStr; + sChgStr = OUStringChar( m_aFlags.cBullet ) + sChgStr; m_pDoc->getIDocumentContentOperations().InsertString( m_aDelPam, sChgStr ); SfxItemSet aSet( m_pDoc->GetAttrPool(), aTextNodeSetRange ); diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index 26a0a411d159..cc19ed2b2e5b 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -714,7 +714,7 @@ void SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr ) OUString sText( pTextNd->GetExpandText(GetLayout(), rAttr.GetStart(), *rAttr.GetEnd() - rAttr.GetStart()) ); - sText = sText.replaceAll(OUStringLiteral1(0x0a), ""); + sText = sText.replaceAll(OUStringChar(0x0a), ""); sText = comphelper::string::strip(sText, ' '); if( !sText.isEmpty() ) diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 40df71f1500a..6d13356cee13 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -909,8 +909,8 @@ uno::Reference< XSpellAlternatives > if (pWrong->InWrongWord(nBegin, nLen) && !pNode->IsSymbolAt(nBegin)) { const OUString aText(pNode->GetText().copy(nBegin, nLen)); - OUString aWord = aText.replaceAll(OUStringLiteral1(CH_TXTATR_BREAKWORD), "") - .replaceAll(OUStringLiteral1(CH_TXTATR_INWORD), ""); + OUString aWord = aText.replaceAll(OUStringChar(CH_TXTATR_BREAKWORD), "") + .replaceAll(OUStringChar(CH_TXTATR_INWORD), ""); uno::Reference< XSpellChecker1 > xSpell( ::GetSpellChecker() ); if( xSpell.is() ) diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx index f6215b8cff9b..06e9ccabceba 100644 --- a/sw/source/core/fields/authfld.cxx +++ b/sw/source/core/fields/authfld.cxx @@ -515,7 +515,7 @@ OUString SwAuthorityField::ConditionalExpandAuthIdentifier( } } if(pAuthType->GetSuffix()) - sRet += OUStringLiteral1(pAuthType->GetSuffix()); + sRet += OUStringChar(pAuthType->GetSuffix()); return sRet; } diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx index bb0aad922518..c4232accddfa 100644 --- a/sw/source/core/fields/cellfml.cxx +++ b/sw/source/core/fields/cellfml.cxx @@ -868,12 +868,12 @@ static OUString lcl_BoxNmToRel( const SwTable& rTable, const SwTableNode& rTable const OUString sCpy = sTmp; //JP 01.11.95: add rest from box name - sTmp = OUStringLiteral1(cRelIdentifier) + OUString::number( nBox ) - + OUStringLiteral1(cRelSeparator) + OUString::number( nLine ); + sTmp = OUStringChar(cRelIdentifier) + OUString::number( nBox ) + + OUStringChar(cRelSeparator) + OUString::number( nLine ); if (!sCpy.isEmpty()) { - sTmp += OUStringLiteral1(cRelSeparator) + sCpy; + sTmp += OUStringChar(cRelSeparator) + sCpy; } } diff --git a/sw/source/core/fields/dbfld.cxx b/sw/source/core/fields/dbfld.cxx index 2cf0f3c181c9..8b161561d846 100644 --- a/sw/source/core/fields/dbfld.cxx +++ b/sw/source/core/fields/dbfld.cxx @@ -47,7 +47,7 @@ using namespace ::com::sun::star; /// replace database separator by dots for display static OUString lcl_DBSeparatorConvert(const OUString& aContent) { - return aContent.replaceAll(OUStringLiteral1(DB_DELIM), "."); + return aContent.replaceAll(OUStringChar(DB_DELIM), "."); } // database field type @@ -62,9 +62,9 @@ SwDBFieldType::SwDBFieldType(SwDoc* pDocPtr, const OUString& rNam, const SwDBDat if(!m_aDBData.sDataSource.isEmpty() || !m_aDBData.sCommand.isEmpty()) { m_sName = m_aDBData.sDataSource - + OUStringLiteral1(DB_DELIM) + + OUStringChar(DB_DELIM) + m_aDBData.sCommand - + OUStringLiteral1(DB_DELIM) + + OUStringChar(DB_DELIM) + m_sName; } } @@ -239,9 +239,9 @@ OUString SwDBField::GetFieldName() const if (sContent.getLength() > 1) { - sContent += OUStringLiteral1(DB_DELIM) + sContent += OUStringChar(DB_DELIM) + rDBName.getToken(1, DB_DELIM) - + OUStringLiteral1(DB_DELIM) + + OUStringChar(DB_DELIM) + rDBName.getToken(2, DB_DELIM); } return lcl_DBSeparatorConvert(sContent); @@ -482,7 +482,7 @@ OUString SwDBNameInfField::GetFieldName() const { sStr += ":" + m_aDBData.sDataSource - + OUStringLiteral1(DB_DELIM) + + OUStringChar(DB_DELIM) + m_aDBData.sCommand; } return lcl_DBSeparatorConvert(sStr); diff --git a/sw/source/core/fields/ddefld.cxx b/sw/source/core/fields/ddefld.cxx index 4aaeadb7274e..700c3de2fc92 100644 --- a/sw/source/core/fields/ddefld.cxx +++ b/sw/source/core/fields/ddefld.cxx @@ -323,7 +323,7 @@ void SwDDEFieldType::PutValue( const uno::Any& rVal, sal_uInt16 nWhichId ) rVal >>= sToken; } sNewCmd.append((i < 2) - ? sToken + OUStringLiteral1(sfx2::cTokenSeparator) : sToken); + ? sToken + OUStringChar(sfx2::cTokenSeparator) : sToken); } SetCmd( sNewCmd.makeStringAndClear() ); } diff --git a/sw/source/core/fields/docufld.cxx b/sw/source/core/fields/docufld.cxx index 6e9c1f1533e6..37a3a67d59f6 100644 --- a/sw/source/core/fields/docufld.cxx +++ b/sw/source/core/fields/docufld.cxx @@ -1076,7 +1076,7 @@ OUString SwDocInfoField::ExpandImpl(SwRootFrame const*const) const } else if( aAny >>= aDuration ) { - sVal = OUStringLiteral1(aDuration.Negative ? '-' : '+') + sVal = OUStringChar(aDuration.Negative ? '-' : '+') + SwViewShell::GetShellRes()->sDurationFormat; sVal = sVal.replaceFirst("%1", OUString::number( aDuration.Years ) ); sVal = sVal.replaceFirst("%2", OUString::number( aDuration.Months ) ); @@ -1532,7 +1532,7 @@ OUString SwHiddenTextField::GetDBName(const OUString& rName, SwDoc *pDoc) } SwDBData aData = pDoc->GetDBData(); - return aData.sDataSource + OUStringLiteral1(DB_DELIM) + aData.sCommand; + return aData.sDataSource + OUStringChar(DB_DELIM) + aData.sCommand; } // [aFieldDefinition] value sample : " IF A == B \"TrueText\" \"FalseText\"" diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index 2d954c15db9c..e2262dff3a1e 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -439,7 +439,7 @@ static void FilterText(OUString & rText, LanguageType const eLang, // remove all special characters (replace them with blanks) if (!rText.isEmpty()) { - rText = rText.replaceAll(OUStringLiteral1(0xad), ""); + rText = rText.replaceAll(OUStringChar(0xad), ""); OUStringBuffer aBuf(rText); const sal_Int32 l = aBuf.getLength(); for (sal_Int32 i = 0; i < l; ++i) diff --git a/sw/source/core/frmedt/fetab.cxx b/sw/source/core/frmedt/fetab.cxx index f4f7cac1accf..bf345ad64457 100644 --- a/sw/source/core/frmedt/fetab.cxx +++ b/sw/source/core/frmedt/fetab.cxx @@ -2257,7 +2257,7 @@ void SwFEShell::GetAutoSum( OUString& rFormula ) const GetTabBox()->GetFrameFormat()->GetTableBoxFormula(), aCells )) break; else if( USHRT_MAX != nBoxW ) - sFields = OUStringLiteral1(cListDelim) + sFields; + sFields = OUStringChar(cListDelim) + sFields; else break; } @@ -2282,7 +2282,7 @@ void SwFEShell::GetAutoSum( OUString& rFormula ) const } } else - sFields = OUStringLiteral1(cListDelim) + sFields; + sFields = OUStringChar(cListDelim) + sFields; } else if( USHRT_MAX == nBoxW ) break; diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx index fdeaf2491a2d..f52780ae9001 100644 --- a/sw/source/core/graphic/ndgrf.cxx +++ b/sw/source/core/graphic/ndgrf.cxx @@ -502,8 +502,8 @@ bool SwGrfNode::GetFileFilterNms( OUString* pFileNm, OUString* pFilterNm ) const if( sfx2::LinkManager::GetDisplayNames( refLink.get(), &sApp, &sTopic, &sItem ) ) { - *pFileNm = sApp + OUStringLiteral1(sfx2::cTokenSeparator) - + sTopic + OUStringLiteral1(sfx2::cTokenSeparator) + *pFileNm = sApp + OUStringChar(sfx2::cTokenSeparator) + + sTopic + OUStringChar(sfx2::cTokenSeparator) + sItem; *pFilterNm = "DDE"; bRet = true; diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx index 4723ba3e5fe6..9c9a4b95b03d 100644 --- a/sw/source/core/table/swtable.cxx +++ b/sw/source/core/table/swtable.cxx @@ -1790,9 +1790,9 @@ void sw_GetTableBoxColStr( sal_uInt16 nCol, OUString& rNm ) do { const sal_uInt16 nCalc = nCol % coDiff; if( nCalc >= 26 ) - rNm = OUStringLiteral1( 'a' - 26 + nCalc ) + rNm; + rNm = OUStringChar( 'a' - 26 + nCalc ) + rNm; else - rNm = OUStringLiteral1( 'A' + nCalc ) + rNm; + rNm = OUStringChar( 'A' + nCalc ) + rNm; if( 0 == (nCol = nCol - nCalc) ) break; diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx index 87a9b2524093..a964cfb9d51a 100644 --- a/sw/source/core/text/porfld.cxx +++ b/sw/source/core/text/porfld.cxx @@ -742,7 +742,7 @@ SwBulletPortion::SwBulletPortion( const sal_Unicode cBullet, const bool bCntr, const sal_uInt16 nMinDst, const bool bLabelAlignmentPosAndSpaceModeActive ) - : SwNumberPortion( OUStringLiteral1(cBullet) + rBulletFollowedBy, + : SwNumberPortion( OUStringChar(cBullet) + rBulletFollowedBy, std::move(pFont), bLft, bCntr, nMinDst, bLabelAlignmentPosAndSpaceModeActive ) { diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx index 95e160190fe6..c3167246fa2c 100644 --- a/sw/source/core/tox/tox.cxx +++ b/sw/source/core/tox/tox.cxx @@ -699,7 +699,7 @@ OUString SwFormToken::GetString() const case TOKEN_TAB_STOP: sData += OUString::number( nTabStopPosition ) + "," + OUString::number( static_cast< sal_Int32 >(eTabAlign) ) + "," - + OUStringLiteral1(cTabFillChar) + "," + + OUStringChar(cTabFillChar) + "," + OUString::number( bWithTab ? 1 : 0 ); break; case TOKEN_CHAPTER_INFO: @@ -709,9 +709,9 @@ OUString SwFormToken::GetString() const + OUString::number( nOutlineLevel ); break; case TOKEN_TEXT: - sData += OUStringLiteral1(TOX_STYLE_DELIMITER) - + sText.replaceAll(OUStringLiteral1(TOX_STYLE_DELIMITER), "") - + OUStringLiteral1(TOX_STYLE_DELIMITER); + sData += OUStringChar(TOX_STYLE_DELIMITER) + + sText.replaceAll(OUStringChar(TOX_STYLE_DELIMITER), "") + + OUStringChar(TOX_STYLE_DELIMITER); break; case TOKEN_AUTHORITY: if (nAuthorityField<10) diff --git a/sw/source/core/tox/txmsrt.cxx b/sw/source/core/tox/txmsrt.cxx index 1d14bbf9510e..aeb0f36f6a3d 100644 --- a/sw/source/core/tox/txmsrt.cxx +++ b/sw/source/core/tox/txmsrt.cxx @@ -681,7 +681,7 @@ OUString SwTOXPara::GetURL() const SwFrameFormat* pFly = pNd->GetFlyFormat(); if( pFly ) { - aText = "#" + pFly->GetName() + OUStringLiteral1(cMarkSeparator); + aText = "#" + pFly->GetName() + OUStringChar(cMarkSeparator); const sal_Char* pStr; switch( eType ) { @@ -697,7 +697,7 @@ OUString SwTOXPara::GetURL() const break; case SwTOXElement::Sequence: { - aText = "#" + m_sSequenceName + OUStringLiteral1(cMarkSeparator) + aText = "#" + m_sSequenceName + OUStringChar(cMarkSeparator) + "sequence"; } break; @@ -762,7 +762,7 @@ OUString SwTOXTable::GetURL() const if ( sName.isEmpty() ) return OUString(); - return "#" + sName + OUStringLiteral1(cMarkSeparator) + "table"; + return "#" + sName + OUStringChar(cMarkSeparator) + "table"; } SwTOXAuthority::SwTOXAuthority( const SwContentNode& rNd, diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx index 79ab2193b5cf..1e4009a50f64 100644 --- a/sw/source/core/txtnode/thints.cxx +++ b/sw/source/core/txtnode/thints.cxx @@ -1509,8 +1509,8 @@ bool SwTextNode::InsertHint( SwTextAttr * const pAttr, const SetAttrMode nMode ) if( !(SetAttrMode::NOTXTATRCHR & nMode) ) { SwIndex aIdx( this, pAttr->GetStart() ); - const OUString aContent = OUStringLiteral1(CH_TXT_ATR_INPUTFIELDSTART) - + pTextInputField->GetFieldContent() + OUStringLiteral1(CH_TXT_ATR_INPUTFIELDEND); + const OUString aContent = OUStringChar(CH_TXT_ATR_INPUTFIELDSTART) + + pTextInputField->GetFieldContent() + OUStringChar(CH_TXT_ATR_INPUTFIELDEND); InsertText( aContent, aIdx, nInsertFlags ); const sal_Int32* const pEnd(pAttr->GetEnd()); diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx index b1f1cb4ab25a..4ebe984116ae 100644 --- a/sw/source/core/undo/unins.cxx +++ b/sw/source/core/undo/unins.cxx @@ -139,7 +139,7 @@ bool SwUndoInsert::CanGrouping( sal_Unicode cIns ) nContent++; if (maUndoText) - (*maUndoText) += OUStringLiteral1(cIns); + (*maUndoText) += OUStringChar(cIns); return true; } diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx index 0ce97ace711c..c5173a496454 100644 --- a/sw/source/core/undo/unovwr.cxx +++ b/sw/source/core/undo/unovwr.cxx @@ -68,7 +68,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos, bInsChar = true; if( nSttContent < nTextNdLen ) // no pure insert? { - aDelStr += OUStringLiteral1( pTextNd->GetText()[nSttContent] ); + aDelStr += OUStringChar( pTextNd->GetText()[nSttContent] ); if( !m_pHistory ) m_pHistory.reset( new SwHistory ); SwRegHistory aRHst( *pTextNd, m_pHistory.get() ); @@ -83,7 +83,7 @@ SwUndoOverwrite::SwUndoOverwrite( SwDoc* pDoc, SwPosition& rPos, pTextNd->InsertText( OUString(cIns), rPos.nContent, SwInsertFlags::EMPTYEXPAND ); - aInsStr += OUStringLiteral1( cIns ); + aInsStr += OUStringChar( cIns ); if( !bInsChar ) { @@ -148,7 +148,7 @@ bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos, { if (rPos.nContent.GetIndex() < pDelTextNd->GetText().getLength()) { - aDelStr += OUStringLiteral1( pDelTextNd->GetText()[rPos.nContent.GetIndex()] ); + aDelStr += OUStringChar( pDelTextNd->GetText()[rPos.nContent.GetIndex()] ); ++rPos.nContent; } else @@ -162,7 +162,7 @@ bool SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos, SwInsertFlags::EMPTYEXPAND) ); assert(ins.getLength() == 1); // check in SwDoc::Overwrite => cannot fail (void) ins; - aInsStr += OUStringLiteral1( cIns ); + aInsStr += OUStringChar( cIns ); if( !bInsChar ) { diff --git a/sw/source/core/unocore/unofield.cxx b/sw/source/core/unocore/unofield.cxx index 51ea73498e46..35dc5e95d3bc 100644 --- a/sw/source/core/unocore/unofield.cxx +++ b/sw/source/core/unocore/unofield.cxx @@ -755,8 +755,8 @@ void SAL_CALL SwXFieldMaster::setPropertyValue( if (m_pImpl->m_sParam1.isEmpty()) { m_pImpl->m_sParam1 - = OUStringLiteral1(sfx2::cTokenSeparator) - + OUStringLiteral1(sfx2::cTokenSeparator); + = OUStringChar(sfx2::cTokenSeparator) + + OUStringChar(sfx2::cTokenSeparator); } OUString sTmp; rValue >>= sTmp; @@ -2802,7 +2802,7 @@ bool SwXTextFieldMasters::getInstanceName( break; case SwFieldIds::Database: - sField = "DataBase." + rFieldType.GetName().replaceAll(OUStringLiteral1(DB_DELIM), "."); + sField = "DataBase." + rFieldType.GetName().replaceAll(OUStringChar(DB_DELIM), "."); break; case SwFieldIds::TableOfAuthorities: diff --git a/sw/source/core/unocore/unosect.cxx b/sw/source/core/unocore/unosect.cxx index 142c1e475881..05c4ba13275a 100644 --- a/sw/source/core/unocore/unosect.cxx +++ b/sw/source/core/unocore/unosect.cxx @@ -349,9 +349,9 @@ SwXTextSection::attach(const uno::Reference< text::XTextRange > & xTextRange) SwSectionData aSect(eType, pDoc->GetUniqueSectionName(&m_pImpl->m_sName)); aSect.SetCondition(m_pImpl->m_pProps->m_sCondition); aSect.SetLinkFileName(m_pImpl->m_pProps->m_sLinkFileName + - OUStringLiteral1(sfx2::cTokenSeparator) + + OUStringChar(sfx2::cTokenSeparator) + m_pImpl->m_pProps->m_sSectionFilter + - OUStringLiteral1(sfx2::cTokenSeparator) + + OUStringChar(sfx2::cTokenSeparator) + m_pImpl->m_pProps->m_sSectionRegion); aSect.SetHidden(m_pImpl->m_pProps->m_bHidden); @@ -618,7 +618,7 @@ void SwXTextSection::Impl::SetPropertyValues_Impl( if (!m_pProps->m_bDDE) { m_pProps->m_sLinkFileName = - OUStringLiteral1(sfx2::cTokenSeparator) + OUStringLiteral1(sfx2::cTokenSeparator); + OUStringChar(sfx2::cTokenSeparator) + OUStringChar(sfx2::cTokenSeparator); m_pProps->m_bDDE = true; } m_pProps->m_sLinkFileName = comphelper::string::setToken( @@ -630,7 +630,7 @@ void SwXTextSection::Impl::SetPropertyValues_Impl( OUString sLinkFileName(pSectionData->GetLinkFileName()); if (pSectionData->GetType() != DDE_LINK_SECTION) { - sLinkFileName = OUStringLiteral1(sfx2::cTokenSeparator) + OUStringLiteral1(sfx2::cTokenSeparator); + sLinkFileName = OUStringChar(sfx2::cTokenSeparator) + OUStringChar(sfx2::cTokenSeparator); pSectionData->SetType(DDE_LINK_SECTION); } sLinkFileName = comphelper::string::setToken(sLinkFileName, @@ -684,8 +684,8 @@ void SwXTextSection::Impl::SetPropertyValues_Impl( aLink.FileURL, URIHelper::GetMaybeFileHdl()) : OUString()); const OUString sFileName( - sTmp + OUStringLiteral1(sfx2::cTokenSeparator) + - aLink.FilterName + OUStringLiteral1(sfx2::cTokenSeparator) + + sTmp + OUStringChar(sfx2::cTokenSeparator) + + aLink.FilterName + OUStringChar(sfx2::cTokenSeparator) + pSectionData->GetLinkFileName().getToken(2, sfx2::cTokenSeparator)); pSectionData->SetLinkFileName(sFileName); if (sFileName.getLength() < 3) @@ -715,7 +715,7 @@ void SwXTextSection::Impl::SetPropertyValues_Impl( for (sal_Int32 i = comphelper::string::getTokenCount(sSectLink, sfx2::cTokenSeparator); i < 3; ++i) { - sSectLink += OUStringLiteral1(sfx2::cTokenSeparator); + sSectLink += OUStringChar(sfx2::cTokenSeparator); } sSectLink = comphelper::string::setToken(sSectLink, 2, sfx2::cTokenSeparator, sLink); pSectionData->SetLinkFileName(sSectLink); diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx index 3da9c5a2117b..9490e1bfc926 100644 --- a/sw/source/filter/ascii/ascatr.cxx +++ b/sw/source/filter/ascii/ascatr.cxx @@ -339,7 +339,7 @@ static Writer& OutASC_SwTextNode( Writer& rWrt, SwContentNode& rNode ) } OUString aOutStr(buf.makeStringAndClear()); if ( !bExportSoftHyphens ) - aOutStr = aOutStr.replaceAll(OUStringLiteral1(CHAR_SOFTHYPHEN), ""); + aOutStr = aOutStr.replaceAll(OUStringChar(CHAR_SOFTHYPHEN), ""); // all INWORD/BREAKWORD should be already removed by OutAttr // but the field-marks are not attributes so filter those diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx index 0e0192063e31..1a5b304443e4 100644 --- a/sw/source/filter/html/css1atr.cxx +++ b/sw/source/filter/html/css1atr.cxx @@ -1135,10 +1135,10 @@ void SwHTMLWriter::PrepareFontList( const SvxFontItem& rFontItem, if( !rNames.isEmpty() ) rNames += ", "; if( cQuote && !bIsKeyword ) - rNames += OUStringLiteral1( cQuote ); + rNames += OUStringChar( cQuote ); rNames += aName; if( cQuote && !bIsKeyword ) - rNames += OUStringLiteral1( cQuote ); + rNames += OUStringChar( cQuote ); } } diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx index ef27a0e91049..92ecf5578909 100644 --- a/sw/source/filter/html/htmlfld.cxx +++ b/sw/source/filter/html/htmlfld.cxx @@ -588,7 +588,7 @@ void SwHTMLParser::InsertCommentText( const sal_Char *pTag ) m_aContents += aToken; if( bEmpty && pTag ) { - m_aContents = OUStringLiteral("HTML: <") + OUStringLiteral1(*pTag) + ">" + m_aContents; + m_aContents = OUStringLiteral("HTML: <") + OUStringChar(*pTag) + ">" + m_aContents; } } diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx index f0f2f6c5ac0f..f543fd279fae 100644 --- a/sw/source/filter/html/htmlftn.cxx +++ b/sw/source/filter/html/htmlftn.cxx @@ -51,20 +51,20 @@ static sal_Int32 lcl_html_getNextPart( OUString& rPart, const OUString& rContent { case '\\': if( bQuoted ) - rPart += OUStringLiteral1( c ); + rPart += OUStringChar( c ); bQuoted = !bQuoted; break; case ';': if( bQuoted ) - rPart += OUStringLiteral1( c ); + rPart += OUStringChar( c ); else bDone = true; bQuoted = false; break; default: - rPart += OUStringLiteral1( c ); + rPart += OUStringChar( c ); bQuoted = false; break; } diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx index 0e0d6378ddfb..7e4e4a2358a8 100644 --- a/sw/source/filter/html/htmlsect.cxx +++ b/sw/source/filter/html/htmlsect.cxx @@ -291,7 +291,7 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken ) else { aURL = URIHelper::SmartRel2Abs(INetURLObject( m_sBaseURL ), aHRef.copy( 0, nPos ), Link(), false ) - + OUStringLiteral1(sfx2::cTokenSeparator); + + OUStringChar(sfx2::cTokenSeparator); if( nPos2 == -1 ) { aURL += aHRef.copy( nPos+1 ); @@ -299,7 +299,7 @@ void SwHTMLParser::NewDivision( HtmlTokenId nToken ) else { aURL += aHRef.copy( nPos+1, nPos2 - (nPos+1) ) - + OUStringLiteral1(sfx2::cTokenSeparator) + + OUStringChar(sfx2::cTokenSeparator) + rtl::Uri::decode( aHRef.copy( nPos2+1 ), rtl_UriDecodeWithCharset, RTL_TEXTENCODING_ISO_8859_1 ); diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index 9fc8d8298dd5..0f0b90fb6c9f 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -1211,7 +1211,7 @@ void SwHTMLWriter::OutImplicitMark( const OUString& rMark, { if( !rMark.isEmpty() && !m_aImplicitMarks.empty() ) { - OUString sMark(rMark + OUStringLiteral1(cMarkSeparator) + OUString::createFromAscii(pMarkType)); + OUString sMark(rMark + OUStringChar(cMarkSeparator) + OUString::createFromAscii(pMarkType)); if( 0 != m_aImplicitMarks.erase( sMark ) ) { OutAnchor(sMark.replace('?', '_')); // '?' causes problems in IE/Netscape 5 diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 866cc7f0c863..7bbf9179b211 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -6675,7 +6675,7 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel, aBuffer.append( pPrev, pIt - pPrev ); // If bullet char is empty, set lvlText as empty - if ( rNumberingString == OUStringLiteral1(0) && nNumberingType == SVX_NUM_CHAR_SPECIAL ) + if ( rNumberingString == OUStringChar(0) && nNumberingType == SVX_NUM_CHAR_SPECIAL ) { m_pSerializer->singleElementNS(XML_w, XML_lvlText, FSNS(XML_w, XML_val), ""); } diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 65c1158686e0..1fdbcd307541 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -517,7 +517,7 @@ void RtfAttributeOutput::StartRuby(const SwTextNode& rNode, sal_Int32 nPos, aStr += " \\o"; if (aWW8Ruby.GetDirective()) { - aStr += "\\a" + OUStringLiteral1(aWW8Ruby.GetDirective()); + aStr += "\\a" + OUStringChar(aWW8Ruby.GetDirective()); } aStr += "(\\s\\up "; diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx index ad1768d25d84..08e29ddb1a8f 100644 --- a/sw/source/filter/ww8/wrtw8nds.cxx +++ b/sw/source/filter/ww8/wrtw8nds.cxx @@ -837,7 +837,7 @@ void WW8AttributeOutput::StartRuby( const SwTextNode& rNode, sal_Int32 /*nPos*/, aStr += " \\o"; if (aWW8Ruby.GetDirective()) { - aStr += OUStringLiteral("\\a") + OUStringLiteral1(aWW8Ruby.GetDirective()); + aStr += OUStringLiteral("\\a") + OUStringChar(aWW8Ruby.GetDirective()); } aStr += "(\\s\\up "; @@ -1241,7 +1241,7 @@ void AttributeOutputBase::TOXMark( const SwTextNode& rNode, const SwTOXMark& rAt break; case TOX_USER: - sText += "\" \\f \"" + OUStringLiteral1(static_cast( 'A' + GetExport( ).GetId( *rAttr.GetTOXType() ) )); + sText += "\" \\f \"" + OUStringChar(static_cast( 'A' + GetExport( ).GetId( *rAttr.GetTOXType() ) )); [[fallthrough]]; case TOX_CONTENT: { @@ -1725,7 +1725,7 @@ OUString SwWW8AttrIter::GetSnippet(const OUString &rStr, sal_Int32 nCurrentPos, rStr, nCurrentPos, g_pBreakIt->GetLocale(nLanguage), i18n::WordType::ANYWORD_IGNOREWHITESPACES ) ) { - aSnippet = OUStringLiteral1(rStr[nCurrentPos]) + aSnippet.copy(1); + aSnippet = OUStringChar(rStr[nCurrentPos]) + aSnippet.copy(1); } } m_rExport.m_aCurrentCharPropStarts.pop(); diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx index 4f959c18a28b..8672ec47de69 100644 --- a/sw/source/filter/ww8/ww8atr.cxx +++ b/sw/source/filter/ww8/ww8atr.cxx @@ -2289,7 +2289,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect ) if( TOX_USER == pTOX->GetType() ) { sStr += "\"" - + OUStringLiteral1(static_cast( 'A' + GetExport( ).GetId( *pTOX->GetTOXType() ) )) + + OUStringChar(static_cast( 'A' + GetExport( ).GetId( *pTOX->GetTOXType() ) )) + sEntryEnd; } } @@ -2799,7 +2799,7 @@ void AttributeOutputBase::TextField( const SwFormatField& rField ) SwDBData aData = GetExport().m_pDoc->GetDBData(); const OUString sStr = FieldString(ww::eDATABASE) + aData.sDataSource - + OUStringLiteral1(DB_DELIM) + + OUStringChar(DB_DELIM) + aData.sCommand; GetExport().OutputField(pField, ww::eDATABASE, sStr); } diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 936bf6789018..b02d1441e691 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -200,7 +200,7 @@ sal_uInt16 SwWW8ImplReader::End_Footnote() //There should have been a footnote char, we will replace this. if (pText && nPos) { - sChar += OUStringLiteral1(pText->GetText()[--nPos]); + sChar += OUStringChar(pText->GetText()[--nPos]); m_pPaM->SetMark(); --m_pPaM->GetMark()->nContent; std::shared_ptr xLastAnchorCursor(m_pLastAnchorPos ? m_rDoc.CreateUnoCursor(*m_pLastAnchorPos) : nullptr); diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx index 3b5deed3e5ff..d9cce7602e21 100644 --- a/sw/source/filter/ww8/ww8par3.cxx +++ b/sw/source/filter/ww8/ww8par3.cxx @@ -485,7 +485,7 @@ static void lcl_CopyGreaterEight(OUString &rDest, OUString const &rSrc, { sal_Unicode nChar = rSrc[nI]; if (nChar > WW8ListManager::nMaxLevel) - rDest += OUStringLiteral1(nChar); + rDest += OUStringChar(nChar); } } diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index 3cd069d56dba..1c27d73c3021 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -2483,8 +2483,8 @@ eF_ResT SwWW8ImplReader::Read_F_IncludeText( WW8FieldDesc* /*pF*/, OUString& rSt { // Section from Source (no switch)? ConvertUFName(aBook); - aPara += OUStringLiteral1(sfx2::cTokenSeparator) - + OUStringLiteral1(sfx2::cTokenSeparator) + aBook; + aPara += OUStringChar(sfx2::cTokenSeparator) + + OUStringChar(sfx2::cTokenSeparator) + aBook; } /* @@ -2874,7 +2874,7 @@ static void lcl_toxMatchTSwitch(SwWW8ImplReader const & rReader, SwTOXBase& rBas OUString sStyles( rBase.GetStyleNames( nLevel ) ); if( !sStyles.isEmpty() ) - sStyles += OUStringLiteral1(TOX_STYLE_DELIMITER); + sStyles += OUStringChar(TOX_STYLE_DELIMITER); sStyles += sTemplate; rBase.SetStyleNames( sStyles, nLevel ); } diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 3f6fff362ff6..ed0049353326 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -1117,9 +1117,9 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext, { // make command string const OUString sCommand(pContext->GetDDEApplication() - + OUStringLiteral1(sfx2::cTokenSeparator) + + OUStringChar(sfx2::cTokenSeparator) + pContext->GetDDEItem() - + OUStringLiteral1(sfx2::cTokenSeparator) + + OUStringChar(sfx2::cTokenSeparator) + pContext->GetDDETopic()); const SfxLinkUpdateMode nType = pContext->GetIsAutomaticUpdate() diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index 3a130a79d317..4ead5f41f49b 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -567,7 +567,7 @@ IMPL_LINK( SwInsertDBColAutoPilot, TableToFromHdl, weld::Button&, rButton, void // first delete the existing selection aStr = aStr.replaceAt( nPos, nSel, "" ); - aField = OUStringLiteral1(cDBFieldStart) + aField + OUStringLiteral1(cDBFieldEnd); + aField = OUStringChar(cDBFieldStart) + aField + OUStringChar(cDBFieldEnd); if( !aStr.isEmpty() ) { if( nPos ) // one blank in front diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx index ad2c452eae3b..8a2dcf3f6766 100644 --- a/sw/source/ui/dbui/mmlayoutpage.cxx +++ b/sw/source/ui/dbui/mmlayoutpage.cxx @@ -296,10 +296,10 @@ SwFrameFormat* SwMailMergeLayoutPage::InsertAddressFrame( SwFieldMgr aFieldMgr(&rShell); //create a database string source.command.commandtype.column const SwDBData& rData = rConfigItem.GetCurrentDBData(); - OUString sDBName(rData.sDataSource + OUStringLiteral1(DB_DELIM) - + rData.sCommand + OUStringLiteral1(DB_DELIM)); + OUString sDBName(rData.sDataSource + OUStringChar(DB_DELIM) + + rData.sCommand + OUStringChar(DB_DELIM)); const OUString sDatabaseConditionPrefix(sDBName.replace(DB_DELIM, '.')); - sDBName += OUString::number(rData.nCommandType) + OUStringLiteral1(DB_DELIM); + sDBName += OUString::number(rData.nCommandType) + OUStringChar(DB_DELIM); // if only the country is in an address line the // paragraph has to be hidden depending on the @@ -487,9 +487,9 @@ void SwMailMergeLayoutPage::InsertGreeting(SwWrtShell& rShell, SwMailMergeConfig const OUString sConditionBase("[" + sCommonBase + sGenderColumn + "]"); const OUString sNameColumnBase("[" + sCommonBase + sNameColumn + "]"); - const OUString sDBName(rData.sDataSource + OUStringLiteral1(DB_DELIM) - + rData.sCommand + OUStringLiteral1(DB_DELIM) - + OUString::number(rData.nCommandType) + OUStringLiteral1(DB_DELIM)); + const OUString sDBName(rData.sDataSource + OUStringChar(DB_DELIM) + + rData.sCommand + OUStringChar(DB_DELIM) + + OUString::number(rData.nCommandType) + OUStringChar(DB_DELIM)); // Female: [database.sGenderColumn] != "rFemaleGenderValue" && [database.NameColumn] // Male: [database.sGenderColumn] == "rFemaleGenderValue" && [database.rGenderColumn] diff --git a/sw/source/ui/dialog/ascfldlg.cxx b/sw/source/ui/dialog/ascfldlg.cxx index 0715f8e85009..a37be3c24dff 100644 --- a/sw/source/ui/dialog/ascfldlg.cxx +++ b/sw/source/ui/dialog/ascfldlg.cxx @@ -296,7 +296,7 @@ void SwAsciiFilterDlg::FillOptions( SwAsciiOptions& rOptions ) if( -1 != nEnd ) m_sExtraData = m_sExtraData.replaceAt( nStt, nEnd - nStt + 1, "" ); } - m_sExtraData += sFindNm + sData + OUStringLiteral1(cDialogExtraDataClose); + m_sExtraData += sFindNm + sData + OUStringChar(cDialogExtraDataClose); } } diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 49f398fc5777..e4147262859e 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -223,11 +223,11 @@ void SectRepr::SetFile( const OUString& rFile ) if( !rFile.isEmpty() || !sSub.isEmpty() ) { - sNewFile += OUStringLiteral1(sfx2::cTokenSeparator); + sNewFile += OUStringChar(sfx2::cTokenSeparator); if( !rFile.isEmpty() ) // Filter only with FileName sNewFile += sOldFileName.getToken( 1, sfx2::cTokenSeparator ); - sNewFile += OUStringLiteral1(sfx2::cTokenSeparator) + sSub; + sNewFile += OUStringChar(sfx2::cTokenSeparator) + sSub; } m_SectionData.SetLinkFileName( sNewFile ); @@ -251,10 +251,10 @@ void SectRepr::SetFilter( const OUString& rFilter ) const OUString sSub( sOldFileName.getToken( 1, sfx2::cTokenSeparator, nIdx ) ); // token 2 if( !sFile.isEmpty() ) - sNewFile = sFile + OUStringLiteral1(sfx2::cTokenSeparator) + - rFilter + OUStringLiteral1(sfx2::cTokenSeparator) + sSub; + sNewFile = sFile + OUStringChar(sfx2::cTokenSeparator) + + rFilter + OUStringChar(sfx2::cTokenSeparator) + sSub; else if( !sSub.isEmpty() ) - sNewFile = OUStringLiteral1(sfx2::cTokenSeparator) + OUStringLiteral1(sfx2::cTokenSeparator) + sSub; + sNewFile = OUStringChar(sfx2::cTokenSeparator) + OUStringChar(sfx2::cTokenSeparator) + sSub; m_SectionData.SetLinkFileName( sNewFile ); @@ -273,8 +273,8 @@ void SectRepr::SetSubRegion(const OUString& rSubRegion) const OUString sFilter( sLinkFileName.getToken( 0, sfx2::cTokenSeparator, n ) ); if( !rSubRegion.isEmpty() || !sOldFileName.isEmpty() ) - sNewFile = sOldFileName + OUStringLiteral1(sfx2::cTokenSeparator) + - sFilter + OUStringLiteral1(sfx2::cTokenSeparator) + rSubRegion; + sNewFile = sOldFileName + OUStringChar(sfx2::cTokenSeparator) + + sFilter + OUStringChar(sfx2::cTokenSeparator) + rSubRegion; m_SectionData.SetLinkFileName( sNewFile ); @@ -299,8 +299,8 @@ OUString SectRepr::GetFile() const if (DDE_LINK_SECTION == m_SectionData.GetType()) { sal_Int32 n = 0; - return sLinkFile.replaceFirst( OUStringLiteral1(sfx2::cTokenSeparator), " ", &n ) - .replaceFirst( OUStringLiteral1(sfx2::cTokenSeparator), " ", &n ); + return sLinkFile.replaceFirst( OUStringChar(sfx2::cTokenSeparator), " ", &n ) + .replaceFirst( OUStringChar(sfx2::cTokenSeparator), " ", &n ); } return INetURLObject::decode( sLinkFile.getToken( 0, sfx2::cTokenSeparator ), INetURLObject::DecodeMechanism::Unambiguous ); @@ -1133,10 +1133,10 @@ IMPL_LINK(SwEditRegionDlg, FileNameEntryHdl, weld::Entry&, rEdit, void) { OUString sLink( SwSectionData::CollapseWhiteSpaces(rEdit.get_text()) ); sal_Int32 nPos = 0; - sLink = sLink.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nPos ); + sLink = sLink.replaceFirst( " ", OUStringChar(sfx2::cTokenSeparator), &nPos ); if (nPos>=0) { - sLink = sLink.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nPos ); + sLink = sLink.replaceFirst( " ", OUStringChar(sfx2::cTokenSeparator), &nPos ); } pSectRepr->GetSectionData().SetLinkFileName( sLink ); @@ -1576,10 +1576,10 @@ bool SwInsertSectionTabPage::FillItemSet( SfxItemSet* ) { aLinkFile = SwSectionData::CollapseWhiteSpaces(sFileName); sal_Int32 nPos = 0; - aLinkFile = aLinkFile.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nPos ); + aLinkFile = aLinkFile.replaceFirst( " ", OUStringChar(sfx2::cTokenSeparator), &nPos ); if (nPos>=0) { - aLinkFile = aLinkFile.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nPos ); + aLinkFile = aLinkFile.replaceFirst( " ", OUStringChar(sfx2::cTokenSeparator), &nPos ); } } else @@ -1595,8 +1595,8 @@ bool SwInsertSectionTabPage::FillItemSet( SfxItemSet* ) aSection.SetLinkFilePassword( m_sFilePasswd ); } - aLinkFile += OUStringLiteral1(sfx2::cTokenSeparator) + m_sFilterName - + OUStringLiteral1(sfx2::cTokenSeparator) + sSubRegion; + aLinkFile += OUStringChar(sfx2::cTokenSeparator) + m_sFilterName + + OUStringChar(sfx2::cTokenSeparator) + sSubRegion; } aSection.SetLinkFileName(aLinkFile); diff --git a/sw/source/ui/envelp/envlop1.cxx b/sw/source/ui/envelp/envlop1.cxx index 23117247e948..8bf64749c9bd 100644 --- a/sw/source/ui/envelp/envlop1.cxx +++ b/sw/source/ui/envelp/envlop1.cxx @@ -220,7 +220,7 @@ void SwEnvPage::Init(SwEnvDlg* pDialog) m_xSenderBox->connect_clicked(LINK(this, SwEnvPage, SenderHdl)); SwDBData aData = m_pSh->GetDBData(); - m_sActDBName = aData.sDataSource + OUStringLiteral1(DB_DELIM) + aData.sCommand; + m_sActDBName = aData.sDataSource + OUStringChar(DB_DELIM) + aData.sCommand; InitDatabaseBox(); } @@ -236,7 +236,7 @@ IMPL_LINK( SwEnvPage, DatabaseHdl, weld::ComboBox&, rListBox, void ) { m_sActDBName = rListBox.get_active_text(); m_pSh->GetDBManager()->GetTableNames(*m_xTableLB, m_sActDBName); - m_sActDBName += OUStringLiteral1(DB_DELIM); + m_sActDBName += OUStringChar(DB_DELIM); } else { diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx index 5f076a0681c7..4586a067cff7 100644 --- a/sw/source/ui/fldui/changedb.cxx +++ b/sw/source/ui/fldui/changedb.cxx @@ -184,7 +184,7 @@ void SwChangeDBDlg::UpdateFields() std::unique_ptr xIter(m_xUsedDBTLB->make_iterator(&rEntry)); m_xUsedDBTLB->iter_parent(*xIter); OUString sTmp(m_xUsedDBTLB->get_text(*xIter) + - OUStringLiteral1(DB_DELIM) + m_xUsedDBTLB->get_text(rEntry) + OUStringLiteral1(DB_DELIM) + + OUStringChar(DB_DELIM) + m_xUsedDBTLB->get_text(rEntry) + OUStringChar(DB_DELIM) + m_xUsedDBTLB->get_id(rEntry)); aDBNames.push_back(sTmp); } @@ -197,9 +197,9 @@ void SwChangeDBDlg::UpdateFields() sal_Bool bIsTable = false; const OUString DBName(m_xAvailDBTLB->GetDBName(sTableName, sColumnName, &bIsTable)); const OUString sTemp = DBName - + OUStringLiteral1(DB_DELIM) + + OUStringChar(DB_DELIM) + sTableName - + OUStringLiteral1(DB_DELIM) + + OUStringChar(DB_DELIM) + OUString::number(bIsTable ? CommandType::TABLE : CommandType::QUERY); diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index fc4dbde5f978..dfa97a5c1a5b 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -210,14 +210,14 @@ bool SwFieldDBPage::FillItemSet(SfxItemSet* ) sal_uInt16 nSubType = 0; OUString sDBName = aData.sDataSource - + OUStringLiteral1(DB_DELIM) + + OUStringChar(DB_DELIM) + aData.sCommand - + OUStringLiteral1(DB_DELIM) + + OUStringChar(DB_DELIM) + OUString::number(aData.nCommandType) - + OUStringLiteral1(DB_DELIM); + + OUStringChar(DB_DELIM); if (!sColumnName.isEmpty()) { - sDBName += sColumnName + OUStringLiteral1(DB_DELIM); + sDBName += sColumnName + OUStringChar(DB_DELIM); } OUString aName = sDBName + m_xConditionED->get_text(); diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index 38ec5c9d2952..1a3b94d2d19a 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -550,7 +550,7 @@ bool SwFieldFuncPage::FillItemSet(SfxItemSet* ) for (sal_Int32 i = 0, nEntryCount = m_xListItemsLB->n_children(); i < nEntryCount; ++i) { if(i) - aVal += OUStringLiteral1(DB_DELIM); + aVal += OUStringChar(DB_DELIM); aVal += m_xListItemsLB->get_text(i); } } diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index 38a5b6a81520..f3626ddac505 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -438,8 +438,8 @@ void SwFieldVarPage::SubTypeHdl(const weld::TreeView* pBox) // That's not considered here yet OUString sCmd( pType->GetCmd() ); sal_Int32 nTmpPos = 0; - sCmd = sCmd.replaceFirst( OUStringLiteral1(sfx2::cTokenSeparator), " ", &nTmpPos ); - sCmd = sCmd.replaceFirst( OUStringLiteral1(sfx2::cTokenSeparator), " ", &nTmpPos ); + sCmd = sCmd.replaceFirst( OUStringChar(sfx2::cTokenSeparator), " ", &nTmpPos ); + sCmd = sCmd.replaceFirst( OUStringChar(sfx2::cTokenSeparator), " ", &nTmpPos ); m_xValueED->set_text( sCmd ); m_xFormatLB->select(static_cast(pType->GetType())); @@ -1005,8 +1005,8 @@ IMPL_LINK(SwFieldVarPage, TBClickHdl, weld::Button&, rBox, void) // DDE-Topics/-Items can have blanks in their names! // That's not being considered here yet. sal_Int32 nTmpPos = 0; - sValue = sValue.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nTmpPos ); - sValue = sValue.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nTmpPos ); + sValue = sValue.replaceFirst( " ", OUStringChar(sfx2::cTokenSeparator), &nTmpPos ); + sValue = sValue.replaceFirst( " ", OUStringChar(sfx2::cTokenSeparator), &nTmpPos ); static_cast(pType)->SetCmd(sValue); static_cast(pType)->SetType(static_cast(nFormat)); } @@ -1044,8 +1044,8 @@ IMPL_LINK(SwFieldVarPage, TBClickHdl, weld::Button&, rBox, void) // DDE-Topics/-Items can have blanks in their names! // That's not being considered here yet. sal_Int32 nTmpPos = 0; - sValue = sValue.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nTmpPos ); - sValue = sValue.replaceFirst( " ", OUStringLiteral1(sfx2::cTokenSeparator), &nTmpPos ); + sValue = sValue.replaceFirst( " ", OUStringChar(sfx2::cTokenSeparator), &nTmpPos ); + sValue = sValue.replaceFirst( " ", OUStringChar(sfx2::cTokenSeparator), &nTmpPos ); SwDDEFieldType aType(sName, sValue, static_cast(nFormat)); m_xSelectionLB->append_text(sName); diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 3600d05bcb8e..33febe28630a 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -263,9 +263,9 @@ SwMultiTOXTabDialog::SwMultiTOXTabDialog(weld::Window* pParent, const SfxItemSet { OUString sBrackets; if(pFType->GetPrefix()) - sBrackets += OUStringLiteral1(pFType->GetPrefix()); + sBrackets += OUStringChar(pFType->GetPrefix()); if(pFType->GetSuffix()) - sBrackets += OUStringLiteral1(pFType->GetSuffix()); + sBrackets += OUStringChar(pFType->GetSuffix()); m_vTypeData[nArrayIndex].m_pDescription->SetAuthBrackets(sBrackets); m_vTypeData[nArrayIndex].m_pDescription->SetAuthSequence(pFType->IsSequence()); } @@ -377,8 +377,8 @@ SwTOXDescription& SwMultiTOXTabDialog::GetTOXDescription(CurTOXType eType) m_rWrtShell.GetFieldType(SwFieldIds::TableOfAuthorities, OUString())); if(pFType) { - m_vTypeData[nIndex].m_pDescription->SetAuthBrackets(OUStringLiteral1(pFType->GetPrefix()) + - OUStringLiteral1(pFType->GetSuffix())); + m_vTypeData[nIndex].m_pDescription->SetAuthBrackets(OUStringChar(pFType->GetPrefix()) + + OUStringChar(pFType->GetSuffix())); m_vTypeData[nIndex].m_pDescription->SetAuthSequence(pFType->IsSequence()); } else @@ -654,7 +654,7 @@ IMPL_LINK_NOARG(SwAddStylesDlg_Impl, OkHdl, weld::Button&, void) { int nLevel = nToggleColumn - 1; if(!pStyleArr[nLevel].isEmpty()) - pStyleArr[nLevel] += OUStringLiteral1(TOX_STYLE_DELIMITER); + pStyleArr[nLevel] += OUStringChar(TOX_STYLE_DELIMITER); pStyleArr[nLevel] += m_xHeaderTree->get_text(i, 0); } } @@ -3397,9 +3397,9 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& ) OUString aStr( SwResId( STR_TITLE )); if( !m_pCurrentForm->GetTemplate( 0 ).isEmpty() ) { - aStr += " " + OUStringLiteral1(aDeliStart) + aStr += " " + OUStringChar(aDeliStart) + m_pCurrentForm->GetTemplate( 0 ) - + OUStringLiteral1(aDeliEnd); + + OUStringChar(aDeliEnd); } m_xLevelLB->append_text(aStr); @@ -3417,9 +3417,9 @@ void SwTOXStylesTabPage::ActivatePage( const SfxItemSet& ) } if( !m_pCurrentForm->GetTemplate( i ).isEmpty() ) { - aStr += " " + OUStringLiteral1(aDeliStart) + aStr += " " + OUStringChar(aDeliStart) + m_pCurrentForm->GetTemplate( i ) - + OUStringLiteral1(aDeliEnd); + + OUStringChar(aDeliEnd); } m_xLevelLB->append_text(aStr); } @@ -3483,9 +3483,9 @@ IMPL_LINK_NOARG(SwTOXStylesTabPage, AssignHdl, weld::Button&, void) if (nLevPos != -1 && nTemplPos != -1) { const OUString aStr(m_xLevelLB->get_text(nLevPos).getToken(0, aDeliStart) - + OUStringLiteral1(aDeliStart) + + OUStringChar(aDeliStart) + m_xParaLayLB->get_selected_text() - + OUStringLiteral1(aDeliEnd)); + + OUStringChar(aDeliEnd)); m_pCurrentForm->SetTemplate(nLevPos, m_xParaLayLB->get_selected_text()); diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index faf59a18c107..5d6f08cf48fa 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -55,9 +55,9 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, ModifyHdl, weld::Entry&, void) for (sal_Int32 i = 0; i < BookmarkTable::aForbiddenChars.getLength(); i++) { const sal_Int32 nTmpLen = sTmp.getLength(); - sTmp = sTmp.replaceAll(OUStringLiteral1(BookmarkTable::aForbiddenChars[i]), ""); + sTmp = sTmp.replaceAll(OUStringChar(BookmarkTable::aForbiddenChars[i]), ""); if (sTmp.getLength() != nTmpLen) - sMsg += OUStringLiteral1(BookmarkTable::aForbiddenChars[i]); + sMsg += OUStringChar(BookmarkTable::aForbiddenChars[i]); } if (sTmp.getLength() != nLen) { @@ -196,7 +196,7 @@ IMPL_LINK_NOARG(SwInsertBookmarkDlg, RenameHdl, weld::Button&, void) uno::Reference xNamed(xTmp, uno::UNO_QUERY); SwAbstractDialogFactory& rFact = swui::GetFactory(); ScopedVclPtr pDlg(rFact.CreateSwRenameXNamedDlg(m_xDialog.get(), xNamed, xNameAccess)); - pDlg->SetForbiddenChars(BookmarkTable::aForbiddenChars + OUStringLiteral1(BookmarkTable::cSeparator)); + pDlg->SetForbiddenChars(BookmarkTable::aForbiddenChars + OUStringChar(BookmarkTable::cSeparator)); if (pDlg->Execute()) { diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx index c653199e74ae..746fca46ef87 100644 --- a/sw/source/ui/misc/glosbib.cxx +++ b/sw/source/ui/misc/glosbib.cxx @@ -220,7 +220,7 @@ IMPL_LINK_NOARG( SwGlossaryGroupDlg, SelectHdl, weld::TreeView&, void ) IMPL_LINK_NOARG(SwGlossaryGroupDlg, NewHdl, weld::Button&, void) { OUString sGroup = m_xNameED->get_text() - + OUStringLiteral1(GLOS_DELIM) + + OUStringChar(GLOS_DELIM) + OUString::number(m_xPathLB->get_active()); OSL_ENSURE(!pGlosHdl->FindGroupName(sGroup), "group already available!"); m_InsertedArr.push_back(sGroup); @@ -298,7 +298,7 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, RenameHdl, weld::Button&, void) const OUString sNewTitle(m_xNameED->get_text()); OUString sNewName = sNewTitle - + OUStringLiteral1(GLOS_DELIM) + + OUStringChar(GLOS_DELIM) + OUString::number(m_xPathLB->get_active()); OSL_ENSURE(!pGlosHdl->FindGroupName(sNewName), "group already available!"); @@ -313,8 +313,8 @@ IMPL_LINK_NOARG(SwGlossaryGroupDlg, RenameHdl, weld::Button&, void) } if(!bDone) { - sEntry += OUStringLiteral1(RENAME_TOKEN_DELIM) + sNewName - + OUStringLiteral1(RENAME_TOKEN_DELIM) + sNewTitle; + sEntry += OUStringChar(RENAME_TOKEN_DELIM) + sNewName + + OUStringChar(RENAME_TOKEN_DELIM) + sNewTitle; m_RenamedArr.push_back(sEntry); } delete pUserData; @@ -407,7 +407,7 @@ bool SwGlossaryGroupDlg::IsDeleteAllowed(const OUString &rGroup) IMPL_STATIC_LINK(SwGlossaryGroupDlg, EditInsertTextHdl, OUString&, rText, bool) { - rText = rText.replaceAll(OUStringLiteral1(SVT_SEARCHPATH_DELIMITER), ""); + rText = rText.replaceAll(OUStringChar(SVT_SEARCHPATH_DELIMITER), ""); return true; } diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index 9585129767a0..3fd85a31895a 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -288,7 +288,7 @@ IMPL_LINK(SwGlossaryDlg, GrpSelect, weld::TreeView&, rBox, void) pParent = xEntry.get(); GroupUserData* pGroupData = reinterpret_cast(rBox.get_id(*pParent).toInt64()); ::SetCurrGlosGroup(pGroupData->sGroupName - + OUStringLiteral1(GLOS_DELIM) + + OUStringChar(GLOS_DELIM) + OUString::number(pGroupData->nPathIdx)); m_pGlossaryHdl->SetCurGroup(::GetCurrGlosGroup()); // set current text block @@ -668,7 +668,7 @@ IMPL_LINK_NOARG(SwGlossaryDlg, BibHdl, weld::Button&, void) { GroupUserData* pGroupData = reinterpret_cast(m_xCategoryBox->get_id(*xEntry).toInt64()); const OUString sGroup = pGroupData->sGroupName - + OUStringLiteral1(GLOS_DELIM) + + OUStringChar(GLOS_DELIM) + OUString::number(pGroupData->nPathIdx); if(sGroup == sNewGroup) { @@ -863,7 +863,7 @@ OUString SwGlossaryDlg::GetCurrGrpName() const if (m_xCategoryBox->get_iter_depth(*xEntry)) m_xCategoryBox->iter_parent(*xEntry); GroupUserData* pGroupData = reinterpret_cast(m_xCategoryBox->get_id(*xEntry).toInt64()); - return pGroupData->sGroupName + OUStringLiteral1(GLOS_DELIM) + OUString::number(pGroupData->nPathIdx); + return pGroupData->sGroupName + OUStringChar(GLOS_DELIM) + OUString::number(pGroupData->nPathIdx); } return OUString(); } diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx index 1bc73773ac2c..7f83374990d1 100644 --- a/sw/source/ui/vba/vbalisthelper.cxx +++ b/sw/source/ui/vba/vbalisthelper.cxx @@ -149,7 +149,7 @@ void SwVbaListHelper::CreateBulletListTemplate() } case 2: { - aBulletChar = OUStringLiteral1(CHAR_EMPTY_DOT); + aBulletChar = OUStringChar(CHAR_EMPTY_DOT); break; } case 3: diff --git a/sw/source/ui/vba/vbatablehelper.cxx b/sw/source/ui/vba/vbatablehelper.cxx index 50c3493a5973..45de339fb978 100644 --- a/sw/source/ui/vba/vbatablehelper.cxx +++ b/sw/source/ui/vba/vbatablehelper.cxx @@ -104,9 +104,9 @@ OUString SwVbaTableHelper::getColumnStr( sal_Int32 nCol ) do{ nCalc = nCol % coDiff; if( nCalc >= 26 ) - sRet = OUStringLiteral1( 'a' - 26 + nCalc ) + sRet; + sRet = OUStringChar( 'a' - 26 + nCalc ) + sRet; else - sRet = OUStringLiteral1( 'A' + nCalc ) + sRet; + sRet = OUStringChar( 'A' + nCalc ) + sRet; if( 0 == ( nCol = nCol - nCalc ) ) break; diff --git a/sw/source/uibase/app/applab.cxx b/sw/source/uibase/app/applab.cxx index d59ad9cd171e..edd697814378 100644 --- a/sw/source/uibase/app/applab.cxx +++ b/sw/source/uibase/app/applab.cxx @@ -341,8 +341,8 @@ void SwModule::InsertLab(SfxRequest& rReq, bool bLabel) SwSectionData aSect(FILE_LINK_SECTION, pSh->GetUniqueSectionName()); OUString sLinkName = - OUStringLiteral1(sfx2::cTokenSeparator) + - OUStringLiteral1(sfx2::cTokenSeparator) + + OUStringChar(sfx2::cTokenSeparator) + + OUStringChar(sfx2::cTokenSeparator) + MASTER_LABEL; aSect.SetLinkFileName(sLinkName); aSect.SetProtectFlag(true); diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx index 10a1ed6a9fed..7c191a16a7e3 100644 --- a/sw/source/uibase/app/docstyle.cxx +++ b/sw/source/uibase/app/docstyle.cxx @@ -401,7 +401,7 @@ sal_uInt32 SwStyleSheetIterator::SwPoolFormatList::FindName(SfxStyleFamily eFam, cStyle = ' '; break; } - const OUString sSrch = OUStringLiteral1(cStyle) + rName; + const OUString sSrch = OUStringChar(cStyle) + rName; UniqueHash::const_iterator it = maUnique.find(sSrch); if (it != maUnique.end()) @@ -438,7 +438,7 @@ void SwStyleSheetIterator::SwPoolFormatList::RemoveName(SfxStyleFamily eFam, // Add Strings to the list of templates void SwStyleSheetIterator::SwPoolFormatList::Append( char cChar, const OUString& rStr ) { - const OUString aStr = OUStringLiteral1(cChar) + rStr; + const OUString aStr = OUStringChar(cChar) + rStr; UniqueHash::const_iterator it = maUnique.find(aStr); if (it != maUnique.end()) diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 58bba479a432..4eeb3a32a3a9 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -532,8 +532,8 @@ bool SwDBManager::Merge( const SwMergeDescriptor& rMergeDesc ) aDBNames.emplace_back(); SwDBData aInsertData = pWorkShell->GetDBData(); OUString sDBName = aInsertData.sDataSource - + OUStringLiteral1(DB_DELIM) + aInsertData.sCommand - + OUStringLiteral1(DB_DELIM) + + OUStringChar(DB_DELIM) + aInsertData.sCommand + + OUStringChar(DB_DELIM) + OUString::number(aInsertData.nCommandType); pWorkShell->ChangeDBFields( aDBNames, sDBName); SetInitDBFields(false); @@ -666,9 +666,9 @@ void SwDBManager::ImportDBEntry(SwWrtShell* pSh) SwDBFormatData aDBFormat; OUString sInsert = GetDBField( xColumnProp, aDBFormat); if( DB_SEP_SPACE == nSeparator ) - sInsert += OUStringLiteral1(cSpace); + sInsert += OUStringChar(cSpace); else if( DB_SEP_TAB == nSeparator) - sInsert += OUStringLiteral1(cTab); + sInsert += OUStringChar(cTab); pSh->Insert(sInsert); if( DB_SEP_RETURN == nSeparator) pSh->SplitNode(); diff --git a/sw/source/uibase/dbui/mmconfigitem.cxx b/sw/source/uibase/dbui/mmconfigitem.cxx index 2a0cb3aa7ff9..51df1fc8b202 100644 --- a/sw/source/uibase/dbui/mmconfigitem.cxx +++ b/sw/source/uibase/dbui/mmconfigitem.cxx @@ -373,7 +373,7 @@ static void lcl_ConvertToNumbers(OUString& rBlock, const std::vector"; - OUString sReplace = "<" + OUStringLiteral1('0' + i) + ">"; + OUString sReplace = "<" + OUStringChar('0' + i) + ">"; sBlock = sBlock.replaceAll(sHeader, sReplace); } rBlock = sBlock; diff --git a/sw/source/uibase/dialog/regionsw.cxx b/sw/source/uibase/dialog/regionsw.cxx index 79586fe54033..40b20a9c268a 100644 --- a/sw/source/uibase/dialog/regionsw.cxx +++ b/sw/source/uibase/dialog/regionsw.cxx @@ -153,8 +153,8 @@ void SwBaseShell::InsertRegionDialog(SfxRequest& rReq) if(!aFile.isEmpty() || !aSub.isEmpty()) { - OUString sLinkFileName = OUStringLiteral1(sfx2::cTokenSeparator) - + OUStringLiteral1(sfx2::cTokenSeparator); + OUString sLinkFileName = OUStringChar(sfx2::cTokenSeparator) + + OUStringChar(sfx2::cTokenSeparator); sLinkFileName = comphelper::string::setToken(sLinkFileName, 0, sfx2::cTokenSeparator, aFile); if(SfxItemState::SET == diff --git a/sw/source/uibase/dochdl/gloshdl.cxx b/sw/source/uibase/dochdl/gloshdl.cxx index 766f00b631ce..12a95c773e86 100644 --- a/sw/source/uibase/dochdl/gloshdl.cxx +++ b/sw/source/uibase/dochdl/gloshdl.cxx @@ -104,7 +104,7 @@ void SwGlossaryHdl::SetCurGroup(const OUString &rGrp, bool bApi, bool bAlwaysCre OUString sGroup(rGrp); if (sGroup.indexOf(GLOS_DELIM)<0 && !FindGroupName(sGroup)) { - sGroup += OUStringLiteral1(GLOS_DELIM) + "0"; + sGroup += OUStringChar(GLOS_DELIM) + "0"; } if(pCurGrp) { @@ -196,7 +196,7 @@ void SwGlossaryHdl::RenameGroup(const OUString& rOld, OUString& rNew, const OUSt OUString sNewGroup(rNew); if (sNewGroup.indexOf(GLOS_DELIM)<0) { - sNewGroup += OUStringLiteral1(GLOS_DELIM) + "0"; + sNewGroup += OUStringChar(GLOS_DELIM) + "0"; } rStatGlossaries.RenameGroupDoc(sOldGroup, sNewGroup, rNewTitle); rNew = sNewGroup; diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx index fa1e8681fe10..2928945e9903 100644 --- a/sw/source/uibase/docvw/edtwin.cxx +++ b/sw/source/uibase/docvw/edtwin.cxx @@ -935,7 +935,7 @@ void SwEditWin::FlushInBuffer() if (xISC->checkInputSequence( aNewText, nTmpPos - 1, cChar, nCheckMode )) { // character can be inserted: - aNewText += OUStringLiteral1( cChar ); + aNewText += OUStringChar( cChar ); ++nTmpPos; } } diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index 4ca09ecab32a..a319308290af 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -205,7 +205,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt) if( !sText.isEmpty() ) { - OUStringBuffer sTmp(sText.replaceAll(OUStringLiteral1(0xad), "")); + OUStringBuffer sTmp(sText.replaceAll(OUStringChar(0xad), "")); for (sal_Int32 i = 0; i < sTmp.getLength(); ++i) { if (sTmp[i] < 0x20) diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx index bf65c6034008..eccca960fc43 100644 --- a/sw/source/uibase/fldui/fldmgr.cxx +++ b/sw/source/uibase/fldui/fldmgr.cxx @@ -1109,10 +1109,10 @@ bool SwFieldMgr::InsertField( //JP 28.08.95: DDE-Topics/-Items can have blanks in their names! // That's not yet considered here. sal_Int32 nIndex = 0; - OUString sCmd = rData.m_sPar2.replaceFirst(" ", OUStringLiteral1(sfx2::cTokenSeparator), &nIndex); + OUString sCmd = rData.m_sPar2.replaceFirst(" ", OUStringChar(sfx2::cTokenSeparator), &nIndex); if (nIndex>=0 && ++nIndex(nFormatId) ); @@ -1561,10 +1561,10 @@ void SwFieldMgr::UpdateCurField(sal_uInt32 nFormat, // DDE-Topics/-Items can have blanks in their names! // That's not yet considered here! sal_Int32 nIndex = 0; - sPar2 = sPar2.replaceFirst(" ", OUStringLiteral1(sfx2::cTokenSeparator), &nIndex ); + sPar2 = sPar2.replaceFirst(" ", OUStringChar(sfx2::cTokenSeparator), &nIndex ); if (nIndex>=0 && ++nIndex pBlock = GetGlosDoc( sNewGroup ); if(pBlock) { @@ -228,7 +228,7 @@ bool SwGlossaries::RenameGroupDoc( RemoveFileFromList( rOldGroup ); - rNewGroup = sNewFileName + OUStringLiteral1(GLOS_DELIM) + OUString::number(nNewPath); + rNewGroup = sNewFileName + OUStringChar(GLOS_DELIM) + OUString::number(nNewPath); if (m_GlosArr.empty()) { GetNameList(); @@ -252,7 +252,7 @@ bool SwGlossaries::DelGroupDoc(const OUString &rName) return false; const OUString sBaseName(rName.getToken(0, GLOS_DELIM)); const OUString sFileURL = lcl_FullPathName(m_PathArr[nPath], sBaseName); - const OUString aName = sBaseName + OUStringLiteral1(GLOS_DELIM) + OUString::number(nPath); + const OUString aName = sBaseName + OUStringChar(GLOS_DELIM) + OUString::number(nPath); // Even if the file doesn't exist it has to be deleted from // the list of text block regions // no && because of CFfront @@ -313,14 +313,14 @@ std::vector & SwGlossaries::GetNameList() for (const OUString& aTitle : aFiles) { const OUString sName( aTitle.copy( 0, aTitle.getLength() - sExt.getLength() ) - + OUStringLiteral1(GLOS_DELIM) + OUString::number( static_cast(i) )); + + OUStringChar(GLOS_DELIM) + OUString::number( static_cast(i) )); m_GlosArr.push_back(sName); } } if (m_GlosArr.empty()) { // the standard block is inside of the path's first part - m_GlosArr.emplace_back(SwGlossaries::GetDefName() + OUStringLiteral1(GLOS_DELIM) + "0" ); + m_GlosArr.emplace_back(SwGlossaries::GetDefName() + OUStringChar(GLOS_DELIM) + "0" ); } } return m_GlosArr; diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx index 91bffa18df6a..1c278137cb16 100644 --- a/sw/source/uibase/ribbar/inputwin.cxx +++ b/sw/source/uibase/ribbar/inputwin.cxx @@ -384,8 +384,8 @@ IMPL_LINK( SwInputWindow, SelTableCellsNotify, SwWrtShell&, rCaller, void ) aEdit->UpdateRange( sBoxNms, sTableNm ); - OUString sNew = OUStringLiteral1(CH_LRE) + aEdit->GetText() - + OUStringLiteral1(CH_PDF); + OUString sNew = OUStringChar(CH_LRE) + aEdit->GetText() + + OUStringChar(CH_PDF); if( sNew != sOldFormula ) { @@ -432,8 +432,8 @@ IMPL_LINK_NOARG(SwInputWindow, ModifyHdl, Edit&, void) { pWrtShell->StartAllAction(); DelBoxContent(); - OUString sNew = OUStringLiteral1(CH_LRE) + aEdit->GetText() - + OUStringLiteral1(CH_PDF); + OUString sNew = OUStringChar(CH_LRE) + aEdit->GetText() + + OUStringChar(CH_PDF); pWrtShell->SwEditShell::Insert2( sNew ); pWrtShell->EndAllAction(); sOldFormula = sNew; @@ -494,7 +494,7 @@ void InputEdit::UpdateRange(const OUString& rBoxes, const sal_uInt16 nLen = aActText.getLength(); if( !nLen ) { - OUString aStr = OUStringLiteral1(cOpen) + aBoxes + OUStringLiteral1(cClose); + OUString aStr = OUStringChar(cOpen) + aBoxes + OUStringChar(cClose); SetText(aStr); sal_Int32 nPos = aStr.indexOf( cClose ); OSL_ENSURE(nPos != -1, "delimiter not found"); @@ -543,7 +543,7 @@ void InputEdit::UpdateRange(const OUString& rBoxes, } else { - OUString aTmp = OUStringLiteral1(cOpen) + aBoxes + OUStringLiteral1(cClose); + OUString aTmp = OUStringChar(cOpen) + aBoxes + OUStringChar(cClose); nPos = static_cast(aSelection.Min()); aActText = aActText.replaceAt( nPos, 0, aTmp ); nPos = nPos + aTmp.getLength(); diff --git a/sw/source/uibase/shells/textfld.cxx b/sw/source/uibase/shells/textfld.cxx index 4b11b081882a..d5c4e6b73154 100644 --- a/sw/source/uibase/shells/textfld.cxx +++ b/sw/source/uibase/shells/textfld.cxx @@ -236,7 +236,7 @@ void SwTextShell::ExecField(SfxRequest &rReq) if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_FIELD_TYPE, false, &pItem )) nType = static_cast(static_cast(pItem)->GetValue()); - aPar1 += OUStringLiteral1(DB_DELIM); + aPar1 += OUStringChar(DB_DELIM); if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_1, false, &pItem )) { @@ -245,9 +245,9 @@ void SwTextShell::ExecField(SfxRequest &rReq) if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_3, false, &pItem )) nCommand = static_cast(pItem)->GetValue(); - aPar1 += OUStringLiteral1(DB_DELIM) + aPar1 += OUStringChar(DB_DELIM) + OUString::number(nCommand) - + OUStringLiteral1(DB_DELIM); + + OUStringChar(DB_DELIM); if( SfxItemState::SET == pArgs->GetItemState( FN_PARAM_2, false, &pItem )) { diff --git a/sw/source/uibase/shells/textsh2.cxx b/sw/source/uibase/shells/textsh2.cxx index 1f7b59fea20b..1dbcf1639fc2 100644 --- a/sw/source/uibase/shells/textsh2.cxx +++ b/sw/source/uibase/shells/textsh2.cxx @@ -186,10 +186,10 @@ void SwTextShell::ExecDB(SfxRequest const &rReq) OUString sColumnName; if(pColumnNameItem) static_cast(pColumnNameItem)->GetValue() >>= sColumnName; - OUString sDBName = sSourceArg + OUStringLiteral1(DB_DELIM) - + sCommandArg + OUStringLiteral1(DB_DELIM) + OUString sDBName = sSourceArg + OUStringChar(DB_DELIM) + + sCommandArg + OUStringChar(DB_DELIM) + OUString::number(nCommandTypeArg) - + OUStringLiteral1(DB_DELIM) + sColumnName; + + OUStringChar(DB_DELIM) + sColumnName; SwFieldMgr aFieldMgr(GetShellPtr()); SwInsertField_Data aData(SwFieldTypesEnum::Database, 0, sDBName, OUString(), 0); diff --git a/sw/source/uibase/sidebar/PageSizeControl.cxx b/sw/source/uibase/sidebar/PageSizeControl.cxx index 02dbfe007343..ae224e062925 100644 --- a/sw/source/uibase/sidebar/PageSizeControl.cxx +++ b/sw/source/uibase/sidebar/PageSizeControl.cxx @@ -114,7 +114,7 @@ PageSizeControl::PageSizeControl( sal_uInt16 nId, vcl::Window* pParent ) sal_Unicode c = aText[i]; if ( rtl::isAsciiAlpha(c) || (c == '\'') || (c == '\"') || (c == '%') ) { - aMetricStr = OUStringLiteral1(c) + aMetricStr; + aMetricStr = OUStringChar(c) + aMetricStr; } else { diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx index 6151fb1d785c..d226b52ae31d 100644 --- a/sw/source/uibase/uno/unoatxt.cxx +++ b/sw/source/uibase/uno/unoatxt.cxx @@ -174,7 +174,7 @@ uno::Reference< text::XAutoTextGroup > SwXAutoTextContainer::insertNewByName( OUString sGroup(aGroupName); if (sGroup.indexOf(GLOS_DELIM)<0) { - sGroup += OUStringLiteral1(GLOS_DELIM) + "0"; + sGroup += OUStringChar(GLOS_DELIM) + "0"; } pGlossaries->NewGroupDoc(sGroup, sGroup.getToken(0, GLOS_DELIM)); @@ -476,7 +476,7 @@ void SwXAutoTextGroup::setName(const OUString& rName) OUString sNewGroup(rName); if (sNewGroup.indexOf(GLOS_DELIM)<0) { - sNewGroup += OUStringLiteral1(GLOS_DELIM) + "0"; + sNewGroup += OUStringChar(GLOS_DELIM) + "0"; } //the name must be saved, the group may be invalidated while in RenameGroupDoc() diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index f1d2f22cde72..94452b24fdcf 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -1982,7 +1982,7 @@ bool SwContentTree::FillTransferData( TransferDataContainer& rTransfer, sUrl += "#" + sEntry; if(!rToken.isEmpty()) { - sUrl += OUStringLiteral1(cMarkSeparator) + rToken; + sUrl += OUStringChar(cMarkSeparator) + rToken; } } else diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 59fe11eb9145..2b056fca6ffe 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -1367,9 +1367,9 @@ IMPL_LINK( SwGlobalTree, DialogClosedHdl, sfx2::FileDialogHelper*, _pFileDlg, vo for (const std::unique_ptr& pMed : aMedList) { OUString sFileName = pMed->GetURLObject().GetMainURL( INetURLObject::DecodeMechanism::NONE ) - + OUStringLiteral1(sfx2::cTokenSeparator) + + OUStringChar(sfx2::cTokenSeparator) + pMed->GetFilter()->GetFilterName() - + OUStringLiteral1(sfx2::cTokenSeparator); + + OUStringChar(sfx2::cTokenSeparator); pFileNames[nPos++] = sFileName; } InsertRegion( m_pDocContent.get(), aFileNames ); diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx index eea76b98181a..9dd2a26a2a03 100644 --- a/sw/source/uibase/utlui/gloslst.cxx +++ b/sw/source/uibase/utlui/gloslst.cxx @@ -283,7 +283,7 @@ void SwGlossaryList::Update() OUString sName( aTitle.copy( 0, aTitle.getLength() - sExt.getLength() )); aFoundGroupNames.push_back(sName); - sName += OUStringLiteral1(GLOS_DELIM) + OUString::number( static_cast(nPath) ); + sName += OUStringChar(GLOS_DELIM) + OUString::number( static_cast(nPath) ); AutoTextGroup* pFound = FindGroup( sName ); if( !pFound ) { @@ -355,9 +355,9 @@ void SwGlossaryList::FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGlossaries) for(sal_uInt16 j = 0; j < pGroup->nCount; j++) { pGroup->sLongNames += pBlock->GetLongName(j) - + OUStringLiteral1(STRING_DELIM); + + OUStringChar(STRING_DELIM); pGroup->sShortNames += pBlock->GetShortName(j) - + OUStringLiteral1(STRING_DELIM); + + OUStringChar(STRING_DELIM); } } diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 36878840658e..d89174bbb979 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -1648,7 +1648,7 @@ void SwWrtShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar ) aTmpStr1 += GetSelText(); aTmpStr1 += SwResId(STR_END_QUOTE); OUString aTmpStr3 = SwResId(STR_START_QUOTE); - aTmpStr3 += OUStringLiteral1(cChar); + aTmpStr3 += OUStringChar(cChar); aTmpStr3 += SwResId(STR_END_QUOTE); aRewriter.AddRule( UndoArg1, aTmpStr1 ); aRewriter.AddRule( UndoArg2, SwResId(STR_YIELDS) ); diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index 034e987591de..82d7c27cb0c6 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -584,8 +584,8 @@ void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk, { SwSectionData aSection( FILE_LINK_SECTION, GetUniqueSectionName() ); OUString aLinkFile = rBkmk.GetURL().getToken(0, '#') - + OUStringLiteral1(sfx2::cTokenSeparator) - + OUStringLiteral1(sfx2::cTokenSeparator) + + OUStringChar(sfx2::cTokenSeparator) + + OUStringChar(sfx2::cTokenSeparator) + rBkmk.GetURL().getToken(1, '#'); aSection.SetLinkFileName( aLinkFile ); aSection.SetProtectFlag( true ); -- cgit