summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-03-25 09:53:33 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2021-03-25 10:06:26 +0100
commita0656ec6fc2b41e65f1b40dbd64f546175e2762f (patch)
treec0d3443a27d9dc10266760110e96b50cce46ef02 /sw/source
parente9c6fd6b4d09ee59b6a86942cbf001f2ba9782e6 (diff)
const OUString -> const OUStringLiteral
Mostly automated rewrite Change-Id: Ie020a083f898bc126b8fb039d4ecb2e687172da1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112965 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/doc/DocumentContentOperationsManager.cxx2
-rw-r--r--sw/source/core/doc/docfld.cxx4
-rw-r--r--sw/source/core/doc/doclay.cxx2
-rw-r--r--sw/source/core/edit/edfcol.cxx2
-rw-r--r--sw/source/core/unocore/unodraw.cxx8
-rw-r--r--sw/source/core/view/printdata.cxx4
-rw-r--r--sw/source/filter/html/swhtml.cxx4
-rw-r--r--sw/source/filter/html/wrthtml.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx2
-rw-r--r--sw/source/filter/ww8/ww8toolbar.cxx2
-rw-r--r--sw/source/filter/xml/swxml.cxx12
-rw-r--r--sw/source/filter/xml/xmlexp.cxx4
-rw-r--r--sw/source/filter/xml/xmlimp.cxx10
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx2
-rw-r--r--sw/source/ui/misc/glosbib.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx2
-rw-r--r--sw/source/ui/vba/vbaparagraphformat.cxx2
-rw-r--r--sw/source/uibase/app/docstyle.cxx2
-rw-r--r--sw/source/uibase/shells/langhelper.cxx6
-rw-r--r--sw/source/uibase/shells/textsh1.cxx14
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx2
21 files changed, 45 insertions, 45 deletions
diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index e66ed8e4a673..88fd7872a41b 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -1100,7 +1100,7 @@ namespace
if( bRegExpRplc )
{
sal_Int32 nPos = 0;
- const OUString sPara("\\n");
+ static const OUStringLiteral sPara(u"\\n");
for (;;)
{
nPos = rStr.indexOf( sPara, nPos );
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 3fb49544a76e..9df71b52e704 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -862,8 +862,8 @@ void SwDocUpdateField::MakeFieldList_( SwDoc& rDoc, int eGetMode )
}
}
- const OUString sTrue("TRUE");
- const OUString sFalse("FALSE");
+ static const OUStringLiteral sTrue(u"TRUE");
+ static const OUStringLiteral sFalse(u"FALSE");
#if HAVE_FEATURE_DBCONNECTIVITY
bool bIsDBManager = nullptr != rDoc.GetDBManager();
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index c034a2b477a3..72f8b6883073 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -123,7 +123,7 @@ SdrObject* SwDoc::CloneSdrObj( const SdrObject& rObj, bool bMoveWithinDoc,
uno::Reference< awt::XControlModel > xModel = static_cast<SdrUnoObj*>(pObj)->GetUnoControlModel();
uno::Any aVal;
uno::Reference< beans::XPropertySet > xSet(xModel, uno::UNO_QUERY);
- const OUString sName("Name");
+ static const OUStringLiteral sName(u"Name");
if( xSet.is() )
aVal = xSet->getPropertyValue( sName );
if( bInsInPage )
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index bcff20b8b243..03d5b1ccebd4 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -1312,7 +1312,7 @@ static std::vector<svx::ClassificationResult> lcl_CollectParagraphClassification
uno::Reference<text::XTextRange> xTextRange(xField, uno::UNO_QUERY);
const OUString aName = rdfNamePair.first;
const OUString aValue = rdfNamePair.second;
- const OUString sBlank("");
+ static const OUStringLiteral sBlank(u"");
if (aKeyCreator.isMarkingTextKey(aName))
{
aResult.push_back({ svx::ClassificationType::TEXT, aValue, sBlank, sBlank });
diff --git a/sw/source/core/unocore/unodraw.cxx b/sw/source/core/unocore/unodraw.cxx
index cf1059dd9fbc..581b76455d1d 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -2540,7 +2540,7 @@ void SwXShape::AdjustPositionProperties( const awt::Point& rPosition )
if ( eTextAnchorType != text::TextContentAnchorType_AS_CHARACTER )
{
// determine current x-position
- const OUString aHoriPosPropStr("HoriOrientPosition");
+ static const OUStringLiteral aHoriPosPropStr(u"HoriOrientPosition");
uno::Any aHoriPos( getPropertyValue( aHoriPosPropStr ) );
sal_Int32 dCurrX = 0;
aHoriPos >>= dCurrX;
@@ -2549,7 +2549,7 @@ void SwXShape::AdjustPositionProperties( const awt::Point& rPosition )
{
// adjust x-position orientation to text::HoriOrientation::NONE, if needed
// Note: has to be done before setting x-position attribute
- const OUString aHoriOrientPropStr("HoriOrient");
+ static const OUStringLiteral aHoriOrientPropStr(u"HoriOrient");
uno::Any aHoriOrient( getPropertyValue( aHoriOrientPropStr ) );
sal_Int16 eHoriOrient;
if (aHoriOrient >>= eHoriOrient) // may be void
@@ -2570,7 +2570,7 @@ void SwXShape::AdjustPositionProperties( const awt::Point& rPosition )
// handle y-position
{
// determine current y-position
- const OUString aVertPosPropStr("VertOrientPosition");
+ static const OUStringLiteral aVertPosPropStr(u"VertOrientPosition");
uno::Any aVertPos( getPropertyValue( aVertPosPropStr ) );
sal_Int32 dCurrY = 0;
aVertPos >>= dCurrY;
@@ -2579,7 +2579,7 @@ void SwXShape::AdjustPositionProperties( const awt::Point& rPosition )
{
// adjust y-position orientation to text::VertOrientation::NONE, if needed
// Note: has to be done before setting y-position attribute
- const OUString aVertOrientPropStr("VertOrient");
+ static const OUStringLiteral aVertOrientPropStr(u"VertOrient");
uno::Any aVertOrient( getPropertyValue( aVertOrientPropStr ) );
sal_Int16 eVertOrient;
if (aVertOrient >>= eVertOrient) // may be void
diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx
index 03526c134e56..ad101ee6abf2 100644
--- a/sw/source/core/view/printdata.cxx
+++ b/sw/source/core/view/printdata.cxx
@@ -272,7 +272,7 @@ SwPrintUIOptions::SwPrintUIOptions(
aPrintRangeOpt );
// create a choice for the content to create
- const OUString aPrintRangeName( "PrintContent" );
+ static const OUStringLiteral aPrintRangeName( u"PrintContent" );
uno::Sequence< OUString > aChoices( 3 );
uno::Sequence< sal_Bool > aChoicesDisabled( 3 );
uno::Sequence< OUString > aHelpIds( 3 );
@@ -341,7 +341,7 @@ SwPrintUIOptions::SwPrintUIOptions(
// create a bool option for brochure
bDefaultVal = rDefaultPrintData.IsPrintProspect();
- const OUString aBrochurePropertyName( "PrintProspect" );
+ static const OUStringLiteral aBrochurePropertyName( u"PrintProspect" );
m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("brochure", SwResId( STR_PRINTOPTUI_BROCHURE),
".HelpID:vcl:PrintDialog:PrintProspect:CheckBox",
aBrochurePropertyName,
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 231ad8443fce..466e0d6e8c71 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -169,7 +169,7 @@ OUString HTMLReader::GetTemplateName(SwDoc& rDoc) const
// HTML import into Writer, avoid loading the Writer/Web template.
return OUString();
- const OUString sTemplateWithoutExt("internal/html");
+ static const OUStringLiteral sTemplateWithoutExt(u"internal/html");
SvtPathOptions aPathOpt;
// first search for OpenDocument Writer/Web template
@@ -5590,7 +5590,7 @@ void HTMLReader::SetupFilterOptions()
return;
OUString aFilterOptions = pItem->GetValue();
- const OUString aXhtmlNsKey("xhtmlns=");
+ static const OUStringLiteral aXhtmlNsKey(u"xhtmlns=");
if (aFilterOptions.startsWith(aXhtmlNsKey))
{
OUString aNamespace = aFilterOptions.copy(aXhtmlNsKey.getLength());
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 741448d96f7f..1094f3ac36c9 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -220,7 +220,7 @@ void SwHTMLWriter::SetupFilterOptions(const OUString& rFilterOptions)
}
const uno::Sequence<OUString> aOptionSeq = comphelper::string::convertCommaSeparated(rFilterOptions);
- const OUString aXhtmlNsKey("xhtmlns=");
+ static const OUStringLiteral aXhtmlNsKey(u"xhtmlns=");
for (const auto& rOption : aOptionSeq)
{
if (rOption == "XHTML")
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index 88b952099e6a..4db9924e2b40 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -2200,7 +2200,7 @@ eF_ResT SwWW8ImplReader::Read_F_PgRef( WW8FieldDesc*, OUString& rStr )
}
OUString sURL = "#" + sBookmarkName;
SwFormatINetFormat aURL( sURL, "" );
- const OUString sLinkStyle("Index Link");
+ static const OUStringLiteral sLinkStyle(u"Index Link");
const sal_uInt16 nPoolId =
SwStyleNameMapper::GetPoolIdFromUIName( sLinkStyle, SwGetPoolIdFromName::ChrFmt );
aURL.SetVisitedFormatAndId( sLinkStyle, nPoolId);
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
index fea93ae66850..95970314240d 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -263,7 +263,7 @@ bool Customization::ImportMenu( SwCTBWrapper& rWrapper, CustomToolBarImportHelpe
if ( pCust )
{
// currently only support built-in menu
- const OUString sMenuBar( "private:resource/menubar/menubar" );
+ static const OUStringLiteral sMenuBar( u"private:resource/menubar/menubar" );
// Get menu name
SwTBC* pTBC = pWrapper->GetTBCAtOffset( rTBDelta.TBCStreamOffset() );
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 7893321829c6..4d965aca3bf3 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -606,7 +606,7 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con
if( xParentSet.is() )
{
uno::Reference< beans::XPropertySetInfo > xPropSetInfo( xParentSet->getPropertySetInfo() );
- const OUString sPropName("BuildId" );
+ static const OUStringLiteral sPropName(u"BuildId" );
if( xPropSetInfo.is() && xPropSetInfo->hasPropertyByName(sPropName) )
{
xInfoSet->setPropertyValue( sPropName, xParentSet->getPropertyValue(sPropName) );
@@ -744,9 +744,9 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con
ErrCode nRet = ERRCODE_NONE;
// save redline mode into import info property set
- const OUString sShowChanges("ShowChanges");
- const OUString sRecordChanges("RecordChanges");
- const OUString sRedlineProtectionKey("RedlineProtectionKey");
+ static const OUStringLiteral sShowChanges(u"ShowChanges");
+ static const OUStringLiteral sRecordChanges(u"RecordChanges");
+ static const OUStringLiteral sRedlineProtectionKey(u"RedlineProtectionKey");
xInfoSet->setPropertyValue( sShowChanges,
makeAny(IDocumentRedlineAccess::IsShowChanges(rDoc.getIDocumentRedlineAccess().GetRedlineFlags())) );
xInfoSet->setPropertyValue( sRecordChanges,
@@ -947,7 +947,7 @@ ErrCode XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, con
if( xModelSet.is() )
{
uno::Reference< beans::XPropertySetInfo > xModelSetInfo( xModelSet->getPropertySetInfo() );
- const OUString sName("BuildId" );
+ static const OUStringLiteral sName(u"BuildId" );
if( xModelSetInfo.is() && xModelSetInfo->hasPropertyByName(sName) )
{
xModelSet->setPropertyValue( sName, xInfoSet->getPropertyValue(sName) );
@@ -980,7 +980,7 @@ size_t XMLReader::GetSectionList( SfxMedium& rMedium,
try
{
xml::sax::InputSource aParserInput;
- const OUString sDocName( "content.xml" );
+ static const OUStringLiteral sDocName( u"content.xml" );
aParserInput.sSystemId = sDocName;
uno::Reference < io::XStream > xStm = xStg2->openStreamElement( sDocName, embed::ElementModes::READ );
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index d8e4ba10df5a..d1751940dfb4 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -104,7 +104,7 @@ ErrCode SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
Reference<XPropertySet> rInfoSet = getExportInfo();
if( rInfoSet.is() )
{
- const OUString sAutoTextMode("AutoTextMode");
+ static const OUStringLiteral sAutoTextMode(u"AutoTextMode");
if( rInfoSet->getPropertySetInfo()->hasPropertyByName(
sAutoTextMode ) )
{
@@ -370,7 +370,7 @@ void SwXMLExport::GetViewSettings(Sequence<PropertyValue>& aProps)
Reference<XPropertySet> xInfoSet( getExportInfo() );
if ( xInfoSet.is() )
{
- const OUString sShowChanges( "ShowChanges" );
+ static const OUStringLiteral sShowChanges( u"ShowChanges" );
if( xInfoSet->getPropertySetInfo()->hasPropertyByName( sShowChanges ) )
{
bShowRedlineChanges = *o3tl::doAccess<bool>(xInfoSet->
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 226b08f22384..526402d0aa63 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -433,7 +433,7 @@ void SwXMLImport::startDocument()
}
bool bOverwrite = false;
- const OUString sStyleInsertModeOverwrite("StyleInsertModeOverwrite");
+ static const OUStringLiteral sStyleInsertModeOverwrite(u"StyleInsertModeOverwrite");
if( xPropertySetInfo->hasPropertyByName(sStyleInsertModeOverwrite) )
{
aAny = xImportInfo->getPropertyValue(sStyleInsertModeOverwrite);
@@ -449,7 +449,7 @@ void SwXMLImport::startDocument()
}
// text insert mode?
- const OUString sTextInsertModeRange("TextInsertModeRange");
+ static const OUStringLiteral sTextInsertModeRange(u"TextInsertModeRange");
if( xPropertySetInfo->hasPropertyByName(sTextInsertModeRange) )
{
aAny = xImportInfo->getPropertyValue(sTextInsertModeRange);
@@ -459,7 +459,7 @@ void SwXMLImport::startDocument()
}
// auto text mode
- const OUString sAutoTextMode("AutoTextMode");
+ static const OUStringLiteral sAutoTextMode(u"AutoTextMode");
if( xPropertySetInfo->hasPropertyByName(sAutoTextMode) )
{
aAny = xImportInfo->getPropertyValue(sAutoTextMode);
@@ -471,7 +471,7 @@ void SwXMLImport::startDocument()
}
// organizer mode
- const OUString sOrganizerMode("OrganizerMode");
+ static const OUStringLiteral sOrganizerMode(u"OrganizerMode");
if( xPropertySetInfo->hasPropertyByName(sOrganizerMode) )
{
aAny = xImportInfo->getPropertyValue(sOrganizerMode);
@@ -483,7 +483,7 @@ void SwXMLImport::startDocument()
}
// default document properties
- const OUString sDefSettings("DefaultDocumentSettings");
+ static const OUStringLiteral sDefSettings(u"DefaultDocumentSettings");
if (xPropertySetInfo->hasPropertyByName(sDefSettings))
{
aAny = xImportInfo->getPropertyValue(sDefSettings);
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 972f7d04a6cc..19c570514a25 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -315,7 +315,7 @@ SwMailMergeDlg::SwMailMergeDlg(weld::Window* pParent, SwWrtShell& rShell,
+ OUString::number(static_cast<sal_Int32>(SfxFilterFlags::NOTINFILEDLG))
+ ":default_first");
uno::Reference< container::XEnumeration > xList = xQuery->createSubSetEnumerationByQuery(sCommand);
- const OUString sName("Name");
+ static const OUStringLiteral sName(u"Name");
sal_Int32 nODT = -1;
while(xList->hasMoreElements()) {
comphelper::SequenceAsHashMap aFilter(xList->nextElement());
diff --git a/sw/source/ui/misc/glosbib.cxx b/sw/source/ui/misc/glosbib.cxx
index f84bdf6f3954..c32605370b06 100644
--- a/sw/source/ui/misc/glosbib.cxx
+++ b/sw/source/ui/misc/glosbib.cxx
@@ -91,7 +91,7 @@ SwGlossaryGroupDlg::SwGlossaryGroupDlg(weld::Window * pParent,
const size_t nCount = pHdl->GetGroupCnt();
/* tdf#111870 "My AutoText" comes from mytexts.bau but should be translated
here as well, see also SwGlossaryDlg::Init */
- const OUString sMyAutoTextEnglish("My AutoText");
+ static const OUStringLiteral sMyAutoTextEnglish(u"My AutoText");
for( size_t i = 0; i < nCount; ++i)
{
OUString sTitle;
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 7b173f63e449..04ceb412bb78 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -697,7 +697,7 @@ void SwGlossaryDlg::Init()
const OUString sSelStr(::GetCurrGlosGroup().getToken(0, GLOS_DELIM));
const sal_Int32 nSelPath = ::GetCurrGlosGroup().getToken(1, GLOS_DELIM).toInt32();
// #i66304# - "My AutoText" comes from mytexts.bau, but should be translated
- const OUString sMyAutoTextEnglish("My AutoText");
+ static const OUStringLiteral sMyAutoTextEnglish(u"My AutoText");
const OUString sMyAutoTextTranslated(SwResId(STR_MY_AUTOTEXT));
for(size_t nId = 0; nId < nCnt; ++nId )
{
diff --git a/sw/source/ui/vba/vbaparagraphformat.cxx b/sw/source/ui/vba/vbaparagraphformat.cxx
index 74742af3867e..683a3a5befcc 100644
--- a/sw/source/ui/vba/vbaparagraphformat.cxx
+++ b/sw/source/ui/vba/vbaparagraphformat.cxx
@@ -182,7 +182,7 @@ sal_Int32 SAL_CALL SwVbaParagraphFormat::getOutlineLevel()
{
sal_Int32 nLevel = word::WdOutlineLevel::wdOutlineLevelBodyText;
OUString aHeading;
- const OUString HEADING = "Heading";
+ static const OUStringLiteral HEADING = u"Heading";
mxParaProps->getPropertyValue("ParaStyleName") >>= aHeading;
if( aHeading.startsWith( HEADING ) )
{
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index e173eddfbc3d..87824949ffdf 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -824,7 +824,7 @@ OUString SwDocStyleSheet::GetDescription(MapUnit eUnit)
{
IntlWrapper aIntlWrapper(SvtSysLocale().GetUILanguageTag());
- const OUString sPlus(" + ");
+ static const OUStringLiteral sPlus(u" + ");
if ( SfxStyleFamily::Page == nFamily )
{
if( !pSet )
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index b5ceb23e5ddb..c5db2c5cceb1 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -121,9 +121,9 @@ namespace SwLangHelper
// setting the new language...
if (!aNewLangText.isEmpty())
{
- const OUString aSelectionLangPrefix("Current_");
- const OUString aParagraphLangPrefix("Paragraph_");
- const OUString aDocumentLangPrefix("Default_");
+ static const OUStringLiteral aSelectionLangPrefix(u"Current_");
+ static const OUStringLiteral aParagraphLangPrefix(u"Paragraph_");
+ static const OUStringLiteral aDocumentLangPrefix(u"Default_");
sal_Int32 nPos = 0;
bool bForSelection = true;
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 1b2cd56fb2f0..93a9bc35b522 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -438,9 +438,9 @@ void SwTextShell::Execute(SfxRequest &rReq)
// setting the new language...
if (!aNewLangText.isEmpty())
{
- const OUString aSelectionLangPrefix("Current_");
- const OUString aParagraphLangPrefix("Paragraph_");
- const OUString aDocumentLangPrefix("Default_");
+ static const OUStringLiteral aSelectionLangPrefix(u"Current_");
+ static const OUStringLiteral aParagraphLangPrefix(u"Paragraph_");
+ static const OUStringLiteral aDocumentLangPrefix(u"Default_");
SfxItemSet aCoreSet( GetPool(),
svl::Items<RES_CHRATR_LANGUAGE, RES_CHRATR_LANGUAGE,
@@ -1518,8 +1518,8 @@ void SwTextShell::Execute(SfxRequest &rReq)
if (pItem2)
sApplyText = pItem2->GetValue();
- const OUString sSpellingRule("Spelling_");
- const OUString sGrammarRule("Grammar_");
+ static const OUStringLiteral sSpellingRule(u"Spelling_");
+ static const OUStringLiteral sGrammarRule(u"Grammar_");
bool bGrammar = false;
sal_Int32 nPos = 0;
@@ -1860,8 +1860,8 @@ void SwTextShell::GetState( SfxItemSet &rSet )
OUString aStyleName;
std::vector<OUString> aList;
- const OUString sPhysical("IsPhysical");
- const OUString sDisplay("DisplayName");
+ static const OUStringLiteral sPhysical(u"IsPhysical");
+ static const OUStringLiteral sDisplay(u"DisplayName");
const OUString sHeaderOn(nWhich == FN_INSERT_PAGEHEADER ? OUString("HeaderIsOn") : OUString("FooterIsOn"));
uno::Reference< XStyleFamiliesSupplier > xSupplier(GetView().GetDocShell()->GetBaseModel(), uno::UNO_QUERY);
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index 65a4aabf5bf9..cb4df33075c6 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -716,7 +716,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
aURLObj.SetSmartURL( aCurOutputURL );
OUString aPath = aURLObj.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
- const OUString aDelim( "/" );
+ static const OUStringLiteral aDelim( u"/" );
if (!aPath.isEmpty() && !aPath.endsWith(aDelim))
aPath += aDelim;
if (bCurFileNameFromColumn)