summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-11-18 10:10:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-11-24 09:45:04 +0100
commitbb06f51308428500c9c8d11ae05f0aa03ecc179c (patch)
treeb18620e8572ed6d4c43c8605660d59f5f7a7e531 /sw/source
parent42e8e16cf93dcf944e5c1106f76aaa32057c0397 (diff)
loplugin:stringviewparam extend to comparison operators
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/crsr/crstrvl.cxx2
-rw-r--r--sw/source/core/crsr/trvlreg.cxx4
-rw-r--r--sw/source/core/doc/doc.cxx4
-rw-r--r--sw/source/core/doc/docchart.cxx2
-rw-r--r--sw/source/core/doc/docfmt.cxx4
-rw-r--r--sw/source/core/doc/docglbl.cxx2
-rw-r--r--sw/source/core/doc/docnum.cxx2
-rw-r--r--sw/source/core/doc/tblafmt.cxx6
-rw-r--r--sw/source/core/docnode/ndtbl.cxx4
-rw-r--r--sw/source/core/edit/edfcol.cxx16
-rw-r--r--sw/source/core/edit/edfmt.cxx4
-rw-r--r--sw/source/core/edit/editsh.cxx6
-rw-r--r--sw/source/core/fields/authfld.cxx2
-rw-r--r--sw/source/core/fields/cellfml.cxx2
-rw-r--r--sw/source/core/layout/pagedesc.cxx2
-rw-r--r--sw/source/core/text/porlay.hxx2
-rw-r--r--sw/source/core/text/txtftn.cxx2
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx4
-rw-r--r--sw/source/core/unocore/unochart.cxx2
-rw-r--r--sw/source/core/unocore/unostyle.cxx6
-rw-r--r--sw/source/filter/basflt/iodetect.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par.hxx4
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx2
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx2
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.hxx2
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.cxx2
-rw-r--r--sw/source/ui/dbui/selectdbtabledialog.hxx2
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx2
-rw-r--r--sw/source/ui/envelp/label1.cxx2
-rw-r--r--sw/source/ui/fldui/changedb.cxx2
-rw-r--r--sw/source/ui/fldui/flddb.cxx4
-rw-r--r--sw/source/ui/index/swuiidxmrk.cxx2
-rw-r--r--sw/source/ui/misc/glossary.cxx6
-rw-r--r--sw/source/ui/misc/outline.cxx2
-rw-r--r--sw/source/ui/vba/vbadocument.cxx2
-rw-r--r--sw/source/ui/vba/vbadocument.hxx2
-rw-r--r--sw/source/uibase/app/docsh2.cxx4
-rw-r--r--sw/source/uibase/app/docstyle.cxx2
-rw-r--r--sw/source/uibase/dbui/dbtree.cxx6
-rw-r--r--sw/source/uibase/docvw/PostItMgr.cxx2
-rw-r--r--sw/source/uibase/fldui/fldmgr.cxx2
-rw-r--r--sw/source/uibase/inc/dbtree.hxx4
-rw-r--r--sw/source/uibase/inc/fldmgr.hxx2
-rw-r--r--sw/source/uibase/inc/gloslst.hxx4
-rw-r--r--sw/source/uibase/inc/glossary.hxx2
-rw-r--r--sw/source/uibase/inc/label.hxx2
-rw-r--r--sw/source/uibase/inc/langhelper.hxx4
-rw-r--r--sw/source/uibase/inc/outline.hxx2
-rw-r--r--sw/source/uibase/inc/regionsw.hxx2
-rw-r--r--sw/source/uibase/inc/wrtsh.hxx6
-rw-r--r--sw/source/uibase/shells/frmsh.cxx2
-rw-r--r--sw/source/uibase/shells/langhelper.cxx4
-rw-r--r--sw/source/uibase/sidebar/StylePresetsPanel.cxx8
-rw-r--r--sw/source/uibase/sidebar/ThemePanel.cxx6
-rw-r--r--sw/source/uibase/uiview/view2.cxx2
-rw-r--r--sw/source/uibase/utlui/content.cxx4
-rw-r--r--sw/source/uibase/utlui/gloslst.cxx4
-rw-r--r--sw/source/uibase/wrtsh/move.cxx2
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx8
61 files changed, 104 insertions, 104 deletions
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 7e27e1ee899a..a41f3ae86799 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -2011,7 +2011,7 @@ bool SwCursorShell::GotoINetAttr( const SwTextINetFormat& rAttr )
return bRet;
}
-const SwFormatINetFormat* SwCursorShell::FindINetAttr( const OUString& rName ) const
+const SwFormatINetFormat* SwCursorShell::FindINetAttr( std::u16string_view rName ) const
{
return mxDoc->FindINetAttr( rName );
}
diff --git a/sw/source/core/crsr/trvlreg.cxx b/sw/source/core/crsr/trvlreg.cxx
index 190edf13f0a8..07d9061672aa 100644
--- a/sw/source/core/crsr/trvlreg.cxx
+++ b/sw/source/core/crsr/trvlreg.cxx
@@ -242,7 +242,7 @@ bool SwCursorShell::MoveRegion( SwWhichRegion fnWhichRegion, SwMoveFnCollection
return bRet;
}
-bool SwCursor::GotoRegion( const OUString& rName )
+bool SwCursor::GotoRegion( std::u16string_view rName )
{
bool bRet = false;
const SwSectionFormats& rFormats = GetDoc().GetSections();
@@ -267,7 +267,7 @@ bool SwCursor::GotoRegion( const OUString& rName )
return bRet;
}
-bool SwCursorShell::GotoRegion( const OUString& rName )
+bool SwCursorShell::GotoRegion( std::u16string_view rName )
{
SwCallLink aLk( *this ); // watch Cursor-Moves;call Link if needed
bool bRet = !m_pTableCursor && m_pCurrentCursor->GotoRegion( rName );
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index c971d32f4ac9..9b3b3bb70991 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1043,7 +1043,7 @@ void SwDoc::CalculatePagePairsForProspectPrinting(
}
/// @return the reference in the doc for the name
-const SwFormatRefMark* SwDoc::GetRefMark( const OUString& rName ) const
+const SwFormatRefMark* SwDoc::GetRefMark( std::u16string_view rName ) const
{
for (const SfxPoolItem* pItem : GetAttrPool().GetItemSurrogates(RES_TXTATR_REFMARK))
{
@@ -1200,7 +1200,7 @@ void SwDoc::InvalidateAutoCompleteFlag()
aLayout->SetIdleFlags();
}
-const SwFormatINetFormat* SwDoc::FindINetAttr( const OUString& rName ) const
+const SwFormatINetFormat* SwDoc::FindINetAttr( std::u16string_view rName ) const
{
for (const SfxPoolItem* pItem : GetAttrPool().GetItemSurrogates(RES_TXTATR_INETFMT))
{
diff --git a/sw/source/core/doc/docchart.cxx b/sw/source/core/doc/docchart.cxx
index 0e2cef59555b..053fbad4f3ee 100644
--- a/sw/source/core/doc/docchart.cxx
+++ b/sw/source/core/doc/docchart.cxx
@@ -117,7 +117,7 @@ void SwDoc::UpdateCharts_( const SwTable& rTable, SwViewShell const & rVSh ) con
}
}
-void SwDoc::UpdateCharts( const OUString &rName ) const
+void SwDoc::UpdateCharts( std::u16string_view rName ) const
{
SwTable* pTmpTable = SwTable::FindTable( FindTableFormatByName( rName ) );
if( pTmpTable )
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index a27aad094ce2..281e9cb9de64 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -731,7 +731,7 @@ void SwDoc::DelTableFrameFormat( SwTableFormat *pFormat )
delete pFormat;
}
-SwFrameFormat* SwDoc::FindFrameFormatByName( const OUString& rName ) const
+SwFrameFormat* SwDoc::FindFrameFormatByName( std::u16string_view rName ) const
{
return static_cast<SwFrameFormat*>(FindFormatByName( static_cast<SwFormatsBase&>(*mpFrameFormatTable), rName ));
}
@@ -1608,7 +1608,7 @@ void SwDoc::ReplaceStyles( const SwDoc& rSource, bool bIncludePageStyles )
}
SwFormat* SwDoc::FindFormatByName( const SwFormatsBase& rFormatArr,
- const OUString& rName )
+ std::u16string_view rName )
{
SwFormat* pFnd = nullptr;
for( size_t n = 0; n < rFormatArr.GetFormatCount(); ++n )
diff --git a/sw/source/core/doc/docglbl.cxx b/sw/source/core/doc/docglbl.cxx
index b933843ff6b3..176a1a2a443c 100644
--- a/sw/source/core/doc/docglbl.cxx
+++ b/sw/source/core/doc/docglbl.cxx
@@ -207,7 +207,7 @@ bool SwDoc::SplitDoc( sal_uInt16 eDocType, const OUString& rPath, bool bOutline,
switch( eDocType )
{
case SPLITDOC_TO_HTML:
- pFilter = SwIoSystem::GetFilterOfFormat("HTML");
+ pFilter = SwIoSystem::GetFilterOfFormat(u"HTML");
break;
default:
diff --git a/sw/source/core/doc/docnum.cxx b/sw/source/core/doc/docnum.cxx
index d84574375112..29905b64a246 100644
--- a/sw/source/core/doc/docnum.cxx
+++ b/sw/source/core/doc/docnum.cxx
@@ -2402,7 +2402,7 @@ SwNumRule* SwDoc::GetNumRuleAtPos(SwPosition& rPos,
return pRet;
}
-sal_uInt16 SwDoc::FindNumRule( const OUString& rName ) const
+sal_uInt16 SwDoc::FindNumRule( std::u16string_view rName ) const
{
for( sal_uInt16 n = mpNumRuleTable->size(); n; )
if( (*mpNumRuleTable)[ --n ]->GetName() == rName )
diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx
index 2289b2290f3e..558c8d6f827d 100644
--- a/sw/source/core/doc/tblafmt.cxx
+++ b/sw/source/core/doc/tblafmt.cxx
@@ -992,7 +992,7 @@ std::unique_ptr<SwTableAutoFormat> SwTableAutoFormatTable::ReleaseAutoFormat(con
return pRet;
}
-SwTableAutoFormat* SwTableAutoFormatTable::FindAutoFormat(const OUString& rName) const
+SwTableAutoFormat* SwTableAutoFormatTable::FindAutoFormat(std::u16string_view rName) const
{
for (const auto &rFormat : m_pImpl->m_AutoFormats)
{
@@ -1218,7 +1218,7 @@ OUString SwCellStyleTable::GetBoxFormatName(const SwBoxAutoFormat& rBoxFormat) c
return OUString();
}
-SwBoxAutoFormat* SwCellStyleTable::GetBoxFormat(const OUString& sName) const
+SwBoxAutoFormat* SwCellStyleTable::GetBoxFormat(std::u16string_view sName) const
{
for (size_t i=0; i < m_aCellStyles.size(); ++i)
{
@@ -1229,7 +1229,7 @@ SwBoxAutoFormat* SwCellStyleTable::GetBoxFormat(const OUString& sName) const
return nullptr;
}
-void SwCellStyleTable::ChangeBoxFormatName(const OUString& sFromName, const OUString& sToName)
+void SwCellStyleTable::ChangeBoxFormatName(std::u16string_view sFromName, const OUString& sToName)
{
if (!GetBoxFormat(sToName))
{
diff --git a/sw/source/core/docnode/ndtbl.cxx b/sw/source/core/docnode/ndtbl.cxx
index acca43916522..5321d026b2ba 100644
--- a/sw/source/core/docnode/ndtbl.cxx
+++ b/sw/source/core/docnode/ndtbl.cxx
@@ -3944,7 +3944,7 @@ OUString SwDoc::GetUniqueTableName() const
return aName + OUString::number( ++nNum );
}
-SwTableFormat* SwDoc::FindTableFormatByName( const OUString& rName, bool bAll ) const
+SwTableFormat* SwDoc::FindTableFormatByName( std::u16string_view rName, bool bAll ) const
{
const SwFormat* pRet = nullptr;
if( bAll )
@@ -4441,7 +4441,7 @@ bool SwDoc::UnProtectTableCells( SwTable& rTable )
return bChgd;
}
-void SwDoc::UnProtectCells( const OUString& rName )
+void SwDoc::UnProtectCells( std::u16string_view rName )
{
SwTableFormat* pFormat = FindTableFormatByName( rName );
if( pFormat )
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index 49d7e26e9acc..f6b1291bee99 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -135,7 +135,7 @@ std::vector<OUString> lcl_getUsedPageStyles(SwViewShell const * pShell)
}
/// Search for a field named rFieldName of type rServiceName in xText and return it.
-uno::Reference<text::XTextField> lcl_findField(const uno::Reference<text::XText>& xText, const OUString& rServiceName, const OUString& rFieldName)
+uno::Reference<text::XTextField> lcl_findField(const uno::Reference<text::XText>& xText, const OUString& rServiceName, std::u16string_view rFieldName)
{
uno::Reference<text::XTextField> xField;
uno::Reference<container::XEnumerationAccess> xParagraphEnumerationAccess(xText, uno::UNO_QUERY);
@@ -172,7 +172,7 @@ uno::Reference<text::XTextField> lcl_findField(const uno::Reference<text::XText>
}
/// Search for a field named rFieldName of type rServiceName in xText and return true iff found.
-bool lcl_hasField(const uno::Reference<text::XText>& xText, const OUString& rServiceName, const OUString& rFieldName)
+bool lcl_hasField(const uno::Reference<text::XText>& xText, const OUString& rServiceName, std::u16string_view rFieldName)
{
return lcl_findField(xText, rServiceName, rFieldName).is();
}
@@ -314,7 +314,7 @@ bool lcl_IsParagraphSignatureField(const uno::Reference<frame::XModel>& xModel,
uno::Reference<text::XTextField> lcl_findFieldByRDF(const uno::Reference<frame::XModel>& xModel,
const uno::Reference<text::XTextContent>& xParagraph,
const OUString& sRDFName,
- const OUString& sRDFValue)
+ std::u16string_view sRDFValue)
{
uno::Reference<container::XEnumerationAccess> xTextPortionEnumerationAccess(xParagraph, uno::UNO_QUERY);
if (!xTextPortionEnumerationAccess.is())
@@ -339,7 +339,7 @@ uno::Reference<text::XTextField> lcl_findFieldByRDF(const uno::Reference<frame::
uno::Reference<text::XTextField> xField(xTextField, uno::UNO_QUERY);
const std::pair<OUString, OUString> pair = lcl_getRDF(xModel, xField, sRDFName);
- if (pair.first == sRDFName && (sRDFValue.isEmpty() || sRDFValue == pair.second))
+ if (pair.first == sRDFName && (sRDFValue.empty() || sRDFValue == pair.second))
return xField;
}
@@ -532,15 +532,15 @@ void lcl_RemoveParagraphMetadataField(const uno::Reference<css::text::XTextField
/// Note: must have associated RDF, since classifications are otherwise just metadata fields.
bool lcl_IsParagraphClassificationField(const uno::Reference<frame::XModel>& xModel,
const uno::Reference<css::text::XTextField>& xField,
- const OUString& sKey)
+ std::u16string_view sKey)
{
const std::pair<OUString, OUString> rdfPair = lcl_getRDF(xModel, xField, ParagraphClassificationNameRDFName);
- return rdfPair.first == ParagraphClassificationNameRDFName && (sKey.isEmpty() || rdfPair.second == sKey);
+ return rdfPair.first == ParagraphClassificationNameRDFName && (sKey.empty() || rdfPair.second == sKey);
}
uno::Reference<text::XTextField> lcl_FindParagraphClassificationField(const uno::Reference<frame::XModel>& xModel,
const uno::Reference<text::XTextContent>& xParagraph,
- const OUString& sKey = OUString())
+ std::u16string_view sKey = u"")
{
uno::Reference<text::XTextField> xTextField;
@@ -1113,7 +1113,7 @@ void SwEditShell::SetClassification(const OUString& rName, SfxClassificationPoli
if (bHeaderIsNeeded)
{
- if (!lcl_hasField(xHeaderText, DocInfoServiceName, SfxClassificationHelper::PROP_PREFIX_INTELLECTUALPROPERTY() + SfxClassificationHelper::PROP_DOCHEADER()))
+ if (!lcl_hasField(xHeaderText, DocInfoServiceName, OUString(SfxClassificationHelper::PROP_PREFIX_INTELLECTUALPROPERTY() + SfxClassificationHelper::PROP_DOCHEADER())))
{
// Append a field to the end of the header text.
uno::Reference<beans::XPropertySet> xField(xMultiServiceFactory->createInstance(DocInfoServiceName), uno::UNO_QUERY);
diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx
index ec03360cdc8f..8f450077cde3 100644
--- a/sw/source/core/edit/edfmt.cxx
+++ b/sw/source/core/edit/edfmt.cxx
@@ -146,12 +146,12 @@ const SwFlyFrameFormat* SwEditShell::FindFlyByName( const OUString& rName ) cons
return mxDoc->FindFlyByName(rName);
}
-SwCharFormat* SwEditShell::FindCharFormatByName( const OUString& rName ) const
+SwCharFormat* SwEditShell::FindCharFormatByName( std::u16string_view rName ) const
{
return mxDoc->FindCharFormatByName( rName );
}
-SwTextFormatColl* SwEditShell::FindTextFormatCollByName( const OUString& rName ) const
+SwTextFormatColl* SwEditShell::FindTextFormatCollByName( std::u16string_view rName ) const
{
return mxDoc->FindTextFormatCollByName( rName );
}
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index 85c065d60fed..2a665015cc50 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -369,7 +369,7 @@ svt::EmbeddedObjectRef& SwEditShell::GetOLEObject() const
return rOObj.GetObject();
}
-bool SwEditShell::HasOLEObj( const OUString &rName ) const
+bool SwEditShell::HasOLEObj( std::u16string_view rName ) const
{
SwStartNode *pStNd;
SwNodeIndex aIdx( *GetNodes().GetEndOfAutotext().StartOfSectionNode(), 1 );
@@ -394,7 +394,7 @@ void SwEditShell::SetChartName( const OUString &rName )
pONd->SetChartTableName( rName );
}
-void SwEditShell::UpdateCharts( const OUString &rName )
+void SwEditShell::UpdateCharts( std::u16string_view rName )
{
GetDoc()->UpdateCharts( rName );
}
@@ -438,7 +438,7 @@ const SwDocStat& SwEditShell::GetUpdatedDocStat()
}
/// get the reference of a given name in the Doc
-const SwFormatRefMark* SwEditShell::GetRefMark( const OUString& rName ) const
+const SwFormatRefMark* SwEditShell::GetRefMark( std::u16string_view rName ) const
{
return GetDoc()->GetRefMark( rName );
}
diff --git a/sw/source/core/fields/authfld.cxx b/sw/source/core/fields/authfld.cxx
index d922c1269584..d75b079cf639 100644
--- a/sw/source/core/fields/authfld.cxx
+++ b/sw/source/core/fields/authfld.cxx
@@ -133,7 +133,7 @@ void SwAuthorityFieldType::GetAllEntryIdentifiers(
}
SwAuthEntry* SwAuthorityFieldType::GetEntryByIdentifier(
- const OUString& rIdentifier)const
+ std::u16string_view rIdentifier)const
{
for (const auto &rpTemp : m_DataArr)
{
diff --git a/sw/source/core/fields/cellfml.cxx b/sw/source/core/fields/cellfml.cxx
index 752193225283..04321a37a4f8 100644
--- a/sw/source/core/fields/cellfml.cxx
+++ b/sw/source/core/fields/cellfml.cxx
@@ -737,7 +737,7 @@ OUString SwTableFormula::ScanString( FnScanFormula fnFormula, const SwTable& rTa
return aStr.makeStringAndClear();
}
-const SwTable* SwTableFormula::FindTable( SwDoc& rDoc, const OUString& rNm )
+const SwTable* SwTableFormula::FindTable( SwDoc& rDoc, std::u16string_view rNm )
{
const SwFrameFormats& rTableFormats = *rDoc.GetTableFrameFormats();
const SwTable* pTmpTable = nullptr, *pRet = nullptr;
diff --git a/sw/source/core/layout/pagedesc.cxx b/sw/source/core/layout/pagedesc.cxx
index fc8b7b08787e..0deff1919ce3 100644
--- a/sw/source/core/layout/pagedesc.cxx
+++ b/sw/source/core/layout/pagedesc.cxx
@@ -400,7 +400,7 @@ static const char* STR_POOLPAGE[] =
STR_POOLPAGE_LANDSCAPE
};
-SwPageDesc* SwPageDesc::GetByName(SwDoc& rDoc, const OUString& rName)
+SwPageDesc* SwPageDesc::GetByName(SwDoc& rDoc, std::u16string_view rName)
{
const size_t nDCount = rDoc.GetPageDescCnt();
diff --git a/sw/source/core/text/porlay.hxx b/sw/source/core/text/porlay.hxx
index 811f1b19331b..0cc2948231a5 100644
--- a/sw/source/core/text/porlay.hxx
+++ b/sw/source/core/text/porlay.hxx
@@ -293,7 +293,7 @@ public:
TextFrameIndex GetParLen() const;
// For Prepare()
- bool UpdateQuoVadis( const OUString &rQuo );
+ bool UpdateQuoVadis( std::u16string_view rQuo );
// Flags
void SetFly() { m_bFlys = true; }
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index ecab7583e3b0..19880e023d7f 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -1529,7 +1529,7 @@ void SwParaPortion::SetErgoSumNum( const OUString& rErgo )
/**
* Is called in SwTextFrame::Prepare()
*/
-bool SwParaPortion::UpdateQuoVadis( const OUString &rQuo )
+bool SwParaPortion::UpdateQuoVadis( std::u16string_view rQuo )
{
SwLineLayout *pLay = this;
while( pLay->GetNext() )
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index e4cd823d74e0..6b00cf30e9cd 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1756,9 +1756,9 @@ SwTextField* SwTextNode::GetFieldTextAttrAt(
return pTextField;
}
-static SwCharFormat* lcl_FindCharFormat( const SwCharFormats* pCharFormats, const OUString& rName )
+static SwCharFormat* lcl_FindCharFormat( const SwCharFormats* pCharFormats, std::u16string_view rName )
{
- if( !rName.isEmpty() )
+ if( !rName.empty() )
{
const size_t nArrLen = pCharFormats->size();
for( size_t i = 1; i < nArrLen; i++ )
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 8bc55cc0487e..8004c18ee579 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -318,7 +318,7 @@ static bool GetTableAndCellsFromRangeRep(
return bSuccess;
}
-static void GetTableByName( const SwDoc &rDoc, const OUString &rTableName,
+static void GetTableByName( const SwDoc &rDoc, std::u16string_view rTableName,
SwFrameFormat **ppTableFormat, SwTable **ppTable)
{
SwFrameFormat *pTableFormat = nullptr;
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 0049636a85d7..2f1d9d6f7e3d 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -208,7 +208,7 @@ namespace sw
SfxStyleSheetBasePool* m_pBasePool;
SwDocShell* m_pDocShell;
- SwXStyle* FindStyle(const OUString& rStyleName) const;
+ SwXStyle* FindStyle(std::u16string_view rStyleName) const;
sal_Int32 GetCountOrName(OUString* pString, sal_Int32 nIndex = SAL_MAX_INT32)
{ return m_rEntry.m_fGetCountOrName(*m_pDocShell->GetDoc(), pString, nIndex); };
static const StyleFamilyEntry& InitEntry(SfxStyleFamily eFamily)
@@ -1090,7 +1090,7 @@ uno::Any SAL_CALL XStyleFamily::getPropertyValue( const OUString& sPropertyName
}
-SwXStyle* XStyleFamily::FindStyle(const OUString& rStyleName) const
+SwXStyle* XStyleFamily::FindStyle(std::u16string_view rStyleName) const
{
const size_t nLCount = m_pBasePool->GetSizeOfVector();
for(size_t i = 0; i < nLCount; ++i)
@@ -4367,7 +4367,7 @@ SwTableAutoFormat* SwXTextTableStyle::GetTableFormat()
return m_pTableAutoFormat;
}
-SwTableAutoFormat* SwXTextTableStyle::GetTableAutoFormat(SwDocShell* pDocShell, const OUString& sName)
+SwTableAutoFormat* SwXTextTableStyle::GetTableAutoFormat(SwDocShell* pDocShell, std::u16string_view sName)
{
const size_t nStyles = pDocShell->GetDoc()->GetTableStyles().size();
for(size_t i=0; i < nStyles; ++i)
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 04466aa80648..960497b8d27f 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -66,7 +66,7 @@ OUString SwIoSystem::GetSubStorageName( const SfxFilter& rFltr )
return OUString();
}
-std::shared_ptr<const SfxFilter> SwIoSystem::GetFilterOfFormat(const OUString& rFormatNm,
+std::shared_ptr<const SfxFilter> SwIoSystem::GetFilterOfFormat(std::u16string_view rFormatNm,
const SfxFilterContainer* pCnt)
{
SfxFilterContainer aCntSw( sSWRITER );
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index ad61fc767b41..c15f17493fad 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2588,7 +2588,7 @@ const NameToId constNameToIdMapping[] =
{ OUString("styleSet"), FSNS( XML_w14, XML_styleSet ) },
};
-std::optional<sal_Int32> lclGetElementIdForName(const OUString& rName)
+std::optional<sal_Int32> lclGetElementIdForName(std::u16string_view rName)
{
for (auto const & i : constNameToIdMapping)
{
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index b98b8bda7f42..d7925942c954 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -4932,7 +4932,7 @@ void WW8Customizations::Import( SwDocShell* pShell )
}
}
-void SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom, const uno::Reference< container::XNameContainer >& xPrjNameCache )
+void SwWW8ImplReader::ReadGlobalTemplateSettings( std::u16string_view sCreatedFrom, const uno::Reference< container::XNameContainer >& xPrjNameCache )
{
if (utl::ConfigManager::IsFuzzing())
return;
@@ -4957,7 +4957,7 @@ void SwWW8ImplReader::ReadGlobalTemplateSettings( const OUString& sCreatedFrom,
aURL = rGlobalTemplate;
else
osl::FileBase::getFileURLFromSystemPath( rGlobalTemplate, aURL );
- if ( !aURL.endsWithIgnoreAsciiCase( ".dot" ) || ( !sCreatedFrom.isEmpty() && sCreatedFrom == aURL ) )
+ if ( !aURL.endsWithIgnoreAsciiCase( ".dot" ) || ( !sCreatedFrom.empty() && sCreatedFrom == aURL ) )
continue; // don't try and read the same document as ourselves
tools::SvRef<SotStorage> rRoot = new SotStorage( aURL, StreamMode::STD_READWRITE );
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 07beb3592bff..7629d2e5a63d 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -1695,7 +1695,7 @@ private:
// #i84783#
// determine object attribute "Layout in Table Cell"
bool IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTableCell ) const;
- void ReadGlobalTemplateSettings( const OUString& sCreatedFrom, const css::uno::Reference< css::container::XNameContainer >& xPrjNameMap );
+ void ReadGlobalTemplateSettings( std::u16string_view sCreatedFrom, const css::uno::Reference< css::container::XNameContainer >& xPrjNameMap );
SwWW8ImplReader(const SwWW8ImplReader &) = delete;
SwWW8ImplReader& operator=(const SwWW8ImplReader&) = delete;
public: // really private, but can only be done public
@@ -1896,7 +1896,7 @@ public: // really private, but can only be done public
void SetNCurrentColl( sal_uInt16 nColl ) { m_nCurrentColl = nColl; }
std::unique_ptr<SfxItemSet> SetCurrentItemSet(std::unique_ptr<SfxItemSet> pItemSet);
sal_uInt16 StyleUsingLFO( sal_uInt16 nLFOIndex ) const ;
- const SwFormat* GetStyleWithOrgWWName( OUString const & rName ) const ;
+ const SwFormat* GetStyleWithOrgWWName( std::u16string_view rName ) const ;
static bool GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc);
static void PicRead( SvStream *pDataStream, WW8_PIC *pPic, bool bVer67);
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index bf5a27528b6e..6bc5b6866f21 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -3566,7 +3566,7 @@ sal_uInt16 SwWW8ImplReader::StyleUsingLFO( sal_uInt16 nLFOIndex ) const
return nRes;
}
-const SwFormat* SwWW8ImplReader::GetStyleWithOrgWWName( OUString const & rName ) const
+const SwFormat* SwWW8ImplReader::GetStyleWithOrgWWName( std::u16string_view rName ) const
{
SwFormat* pRet = nullptr;
if( !m_vColl.empty() )
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 99ff2933ad97..91aa7e048637 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -374,7 +374,7 @@ XMLRedlineImportHelper::~XMLRedlineImportHelper()
}
void XMLRedlineImportHelper::Add(
- const OUString& rType,
+ std::u16string_view rType,
const OUString& rId,
const OUString& rAuthor,
const OUString& rComment,
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.hxx b/sw/source/filter/xml/XMLRedlineImportHelper.hxx
index 4a479a9cc38e..38eff4dc56e6 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.hxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.hxx
@@ -75,7 +75,7 @@ public:
// (The redline will be inserted into the document after both start
// and end cursor has been set.)
void Add(
- const OUString& rType, // redline type (insert, del,... )
+ std::u16string_view rType, // redline type (insert, del,... )
const OUString& rId, // use to identify this redline
const OUString& rAuthor, // name of the author
const OUString& rComment, // redline comment
diff --git a/sw/source/ui/dbui/selectdbtabledialog.cxx b/sw/source/ui/dbui/selectdbtabledialog.cxx
index 19db636a54bb..e49624e48273 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.cxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.cxx
@@ -132,7 +132,7 @@ OUString SwSelectDBTableDialog::GetSelectedTable(bool& bIsTable)
return OUString();
}
-void SwSelectDBTableDialog::SetSelectedTable(const OUString& rTable, bool bIsTable)
+void SwSelectDBTableDialog::SetSelectedTable(std::u16string_view rTable, bool bIsTable)
{
for (int i = 0, nCount = m_xTable->n_children(); i < nCount; ++i)
{
diff --git a/sw/source/ui/dbui/selectdbtabledialog.hxx b/sw/source/ui/dbui/selectdbtabledialog.hxx
index 852a7570d285..01c1edcc49fe 100644
--- a/sw/source/ui/dbui/selectdbtabledialog.hxx
+++ b/sw/source/ui/dbui/selectdbtabledialog.hxx
@@ -37,7 +37,7 @@ public:
virtual ~SwSelectDBTableDialog() override;
OUString GetSelectedTable(bool& bIsTable);
- void SetSelectedTable(const OUString& rTable, bool bIsTable);
+ void SetSelectedTable(std::u16string_view rTable, bool bIsTable);
};
#endif
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 843083c99eb4..14215accd178 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -535,7 +535,7 @@ SwEditRegionDlg::~SwEditRegionDlg( )
}
}
-void SwEditRegionDlg::SelectSection(const OUString& rSectionName)
+void SwEditRegionDlg::SelectSection(std::u16string_view rSectionName)
{
std::unique_ptr<weld::TreeIter> xIter(m_xTree->make_iterator());
if (!m_xTree->get_iter_first(*xIter))
diff --git a/sw/source/ui/envelp/label1.cxx b/sw/source/ui/envelp/label1.cxx
index 8aa1d8de9fc9..6dd5c5b1d4b7 100644
--- a/sw/source/ui/envelp/label1.cxx
+++ b/sw/source/ui/envelp/label1.cxx
@@ -184,7 +184,7 @@ void SwLabDlg::GetLabItem(SwLabItem &rItem)
}
}
-SwLabRec* SwLabDlg::GetRecord(const OUString &rRecName, bool bCont)
+SwLabRec* SwLabDlg::GetRecord(std::u16string_view rRecName, bool bCont)
{
SwLabRec* pRec = nullptr;
bool bFound = false;
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index e4e44316f9ab..6871bd4b6d26 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -80,7 +80,7 @@ void SwChangeDBDlg::FillDBPopup()
Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
Reference<XDatabaseContext> xDBContext = DatabaseContext::create(xContext);
const SwDBData& rDBData = pSh->GetDBData();
- m_xAvailDBTLB->Select(rDBData.sDataSource, rDBData.sCommand, OUString());
+ m_xAvailDBTLB->Select(rDBData.sDataSource, rDBData.sCommand, u"");
TreeSelect();
Sequence< OUString > aDBNames = xDBContext->getElementNames();
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index 99a7d5f05b3b..267d318d8559 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -138,7 +138,7 @@ void SwFieldDBPage::Reset(const SfxItemSet*)
if(pSh)
{
SwDBData aTmp(pSh->GetDBData());
- m_xDatabaseTLB->Select(aTmp.sDataSource, aTmp.sCommand, OUString());
+ m_xDatabaseTLB->Select(aTmp.sDataSource, aTmp.sCommand, u"");
}
}
}
@@ -506,7 +506,7 @@ void SwFieldDBPage::ActivateMailMergeAddress()
m_xTypeLB->select_id(OUString::number(static_cast<sal_uInt16>(SwFieldTypesEnum::Database)));
TypeListBoxHdl(*m_xTypeLB);
const SwDBData& rData = SW_MOD()->GetDBConfig()->GetAddressSource();
- m_xDatabaseTLB->Select(rData.sDataSource, rData.sCommand, OUString());
+ m_xDatabaseTLB->Select(rData.sDataSource, rData.sCommand, u"");
}
void SwFieldDBPage::SetWrtShell(SwWrtShell& rSh)
diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx
index 3ea8bb755bbc..cb3339e3c55f 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -1081,7 +1081,7 @@ const TextInfo aTextInfoArr[] =
{AUTH_FIELD_CUSTOM5, HID_AUTH_FIELD_CUSTOM5 }
};
-static OUString lcl_FindColumnEntry(const uno::Sequence<beans::PropertyValue>& rFields, const OUString& rColumnTitle)
+static OUString lcl_FindColumnEntry(const uno::Sequence<beans::PropertyValue>& rFields, std::u16string_view rColumnTitle)
{
for(const auto& rField : rFields)
{
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 21e131891386..7b173f63e449 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -339,8 +339,8 @@ void SwGlossaryDlg::EnableShortName(bool bOn)
}
// does the title exist in the selected group?
-std::unique_ptr<weld::TreeIter> SwGlossaryDlg::DoesBlockExist(const OUString& rBlock,
- const OUString& rShort)
+std::unique_ptr<weld::TreeIter> SwGlossaryDlg::DoesBlockExist(std::u16string_view rBlock,
+ std::u16string_view rShort)
{
// look for possible entry in TreeListBox
std::unique_ptr<weld::TreeIter> xEntry = m_xCategoryBox->make_iterator();
@@ -353,7 +353,7 @@ std::unique_ptr<weld::TreeIter> SwGlossaryDlg::DoesBlockExist(const OUString& rB
do
{
if (rBlock == m_xCategoryBox->get_text(*xEntry) &&
- (rShort.isEmpty() ||
+ (rShort.empty() ||
rShort == m_xCategoryBox->get_id(*xEntry))
)
{
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index bef52a28777c..bdaa59f9015f 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -291,7 +291,7 @@ IMPL_LINK(SwOutlineTabDialog, MenuSelectHdl, const OString&, rIdent, void)
pPage->Reset(GetOutputItemSet());
}
-sal_uInt16 SwOutlineTabDialog::GetLevel(const OUString &rFormatName) const
+sal_uInt16 SwOutlineTabDialog::GetLevel(std::u16string_view rFormatName) const
{
for(sal_uInt16 i = 0; i < MAXLEVEL; ++i)
{
diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx
index c7cfe8446cb0..4e305cc100e5 100644
--- a/sw/source/ui/vba/vbadocument.cxx
+++ b/sw/source/ui/vba/vbadocument.cxx
@@ -542,7 +542,7 @@ SwVbaDocument::SavePreviewPngAs( const uno::Any& FileName )
}
uno::Any
-SwVbaDocument::getControlShape( const OUString& sName )
+SwVbaDocument::getControlShape( std::u16string_view sName )
{
uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier( mxTextDocument, uno::UNO_QUERY_THROW );
uno::Reference< container::XIndexAccess > xIndexAccess( xDrawPageSupplier->getDrawPage(), uno::UNO_QUERY_THROW );
diff --git a/sw/source/ui/vba/vbadocument.hxx b/sw/source/ui/vba/vbadocument.hxx
index a5e4dabf8452..0d213690a982 100644
--- a/sw/source/ui/vba/vbadocument.hxx
+++ b/sw/source/ui/vba/vbadocument.hxx
@@ -38,7 +38,7 @@ private:
std::vector<css::uno::Reference< ooo::vba::XSink >> mvSinks;
void Initialize();
- css::uno::Any getControlShape( const OUString& sName );
+ css::uno::Any getControlShape( std::u16string_view sName );
css::uno::Reference< css::container::XNameAccess > getFormControls() const;
public:
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index a2342c9f3d0e..bb135b823c92 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -648,7 +648,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
// 3 - file saved in non-HTML -> QueryBox to save as HTML
std::shared_ptr<const SfxFilter> pHtmlFlt =
SwIoSystem::GetFilterOfFormat(
- "HTML",
+ u"HTML",
SwWebDocShell::Factory().GetFilterContainer() );
bool bLocalHasName = HasName();
if(bLocalHasName)
@@ -976,7 +976,7 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
// for HTML there is only one filter!!
pFlt = SwIoSystem::GetFilterOfFormat(
- "HTML",
+ u"HTML",
SwWebDocShell::Factory().GetFilterContainer() );
pStrId = STR_LOAD_HTML_DOC;
}
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index a15f9000883b..c720c3775c8c 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -330,7 +330,7 @@ static SwTableAutoFormat* lcl_FindTableStyle(SwDoc& rDoc, const OUString& rName,
return pFormat;
}
-static const SwBoxAutoFormat* lcl_FindCellStyle(SwDoc& rDoc, const OUString& rName, SwDocStyleSheet *pStyle)
+static const SwBoxAutoFormat* lcl_FindCellStyle(SwDoc& rDoc, std::u16string_view rName, SwDocStyleSheet *pStyle)
{
const SwBoxAutoFormat* pFormat = rDoc.GetCellStyles().GetBoxFormat(rName);
diff --git a/sw/source/uibase/dbui/dbtree.cxx b/sw/source/uibase/dbui/dbtree.cxx
index 4dee21a4ed0c..e47c7dc92c9c 100644
--- a/sw/source/uibase/dbui/dbtree.cxx
+++ b/sw/source/uibase/dbui/dbtree.cxx
@@ -164,7 +164,7 @@ void SwDBTreeList::InitTreeList()
m_xTreeView->set_image(*m_xScratchIter, aImg);
}
}
- Select(OUString(), OUString(), OUString());
+ Select(u"", u"", u"");
bInitialized = true;
}
@@ -320,7 +320,7 @@ OUString SwDBTreeList::GetDBName(OUString& rTableName, OUString& rColumnName, sa
}
// Format: database.table
-void SwDBTreeList::Select(const OUString& rDBName, const OUString& rTableName, const OUString& rColumnName)
+void SwDBTreeList::Select(std::u16string_view rDBName, std::u16string_view rTableName, std::u16string_view rColumnName)
{
std::unique_ptr<weld::TreeIter> xParent(m_xTreeView->make_iterator());
if (!m_xTreeView->get_iter_first(*xParent))
@@ -345,7 +345,7 @@ void SwDBTreeList::Select(const OUString& rDBName, const OUString& rTableName, c
m_xTreeView->copy_iterator(*xChild, *xParent);
bool bNoChild = false;
- if (bShowColumns && !rColumnName.isEmpty())
+ if (bShowColumns && !rColumnName.empty())
{
if (!m_xTreeView->iter_has_child(*xParent))
{
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index d5153892a0dc..84144c447bbb 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -1726,7 +1726,7 @@ void SwPostItMgr::FormatAll(const SfxItemSet &rNewAttr)
LayoutPostIts();
}
-void SwPostItMgr::Hide( const OUString& rAuthor )
+void SwPostItMgr::Hide( std::u16string_view rAuthor )
{
for (auto const& postItField : mvPostItFields)
{
diff --git a/sw/source/uibase/fldui/fldmgr.cxx b/sw/source/uibase/fldui/fldmgr.cxx
index 42ac135fedcd..dcf02a29de31 100644
--- a/sw/source/uibase/fldui/fldmgr.cxx
+++ b/sw/source/uibase/fldui/fldmgr.cxx
@@ -373,7 +373,7 @@ SwFieldMgr::~SwFieldMgr()
}
// organise RefMark by names
-bool SwFieldMgr::CanInsertRefMark( const OUString& rStr )
+bool SwFieldMgr::CanInsertRefMark( std::u16string_view rStr )
{
bool bRet = false;
SwWrtShell *pSh = m_pWrtShell ? m_pWrtShell : lcl_GetShell();
diff --git a/sw/source/uibase/inc/dbtree.hxx b/sw/source/uibase/inc/dbtree.hxx
index 863ac1a40083..651654bb9843 100644
--- a/sw/source/uibase/inc/dbtree.hxx
+++ b/sw/source/uibase/inc/dbtree.hxx
@@ -45,8 +45,8 @@ public:
OUString GetDBName(OUString& rTableName, OUString& rColumnName, sal_Bool* pbIsTable = nullptr);
- void Select( const OUString& rDBName, const OUString& rTableName,
- const OUString& rColumnName );
+ void Select( std::u16string_view rDBName, std::u16string_view rTableName,
+ std::u16string_view rColumnName );
void ShowColumns(bool bShowCol);
diff --git a/sw/source/uibase/inc/fldmgr.hxx b/sw/source/uibase/inc/fldmgr.hxx
index 9a701e2a4280..ebc5c4966c09 100644
--- a/sw/source/uibase/inc/fldmgr.hxx
+++ b/sw/source/uibase/inc/fldmgr.hxx
@@ -154,7 +154,7 @@ public:
bool bIsTable, const OUString& rFieldName);
// organise RefMark with names
- bool CanInsertRefMark( const OUString& rStr );
+ bool CanInsertRefMark( std::u16string_view rStr );
// access to field types via ResId
size_t GetFieldTypeCount() const;
diff --git a/sw/source/uibase/inc/gloslst.hxx b/sw/source/uibase/inc/gloslst.hxx
index 3da5d88617a5..11192ecd6234 100644
--- a/sw/source/uibase/inc/gloslst.hxx
+++ b/sw/source/uibase/inc/gloslst.hxx
@@ -50,7 +50,7 @@ class SwGlossaryList : public AutoTimer
OUString sPath;
bool bFilled;
- AutoTextGroup* FindGroup(const OUString& rGroupName);
+ AutoTextGroup* FindGroup(std::u16string_view rGroupName);
static void FillGroup(AutoTextGroup* pGroup, SwGlossaries* pGloss);
public:
@@ -59,7 +59,7 @@ public:
void HasLongName(const std::vector<OUString>& rBeginCandidates,
std::vector<std::pair<OUString, sal_uInt16>>& rLongNames);
- bool GetShortName(const OUString& rLongName,
+ bool GetShortName(std::u16string_view rLongName,
OUString& rShortName, OUString& rGroupName );
size_t GetGroupCount();
diff --git a/sw/source/uibase/inc/glossary.hxx b/sw/source/uibase/inc/glossary.hxx
index 7f0dab68901f..4ac5b6c8e4ec 100644
--- a/sw/source/uibase/inc/glossary.hxx
+++ b/sw/source/uibase/inc/glossary.hxx
@@ -95,7 +95,7 @@ class SwGlossaryDlg : public SfxDialogController
void Apply();
void Init();
- std::unique_ptr<weld::TreeIter> DoesBlockExist(const OUString& sBlock, const OUString& rShort);
+ std::unique_ptr<weld::TreeIter> DoesBlockExist(std::u16string_view sBlock, std::u16string_view rShort);
void ShowAutoText(const OUString& rGroup, const OUString& rShortName);
void ResumeShowAutoText();
diff --git a/sw/source/uibase/inc/label.hxx b/sw/source/uibase/inc/label.hxx
index 86d08a2573a1..a7a1c66412c6 100644
--- a/sw/source/uibase/inc/label.hxx
+++ b/sw/source/uibase/inc/label.hxx
@@ -51,7 +51,7 @@ public:
SwDBManager* pDBManager, bool bLabel);
virtual ~SwLabDlg() override;
- SwLabRec* GetRecord(const OUString &rRecName, bool bCont);
+ SwLabRec* GetRecord(std::u16string_view rRecName, bool bCont);
void GetLabItem(SwLabItem &rItem);
SwLabRecs &Recs() { return *m_pRecs; }
diff --git a/sw/source/uibase/inc/langhelper.hxx b/sw/source/uibase/inc/langhelper.hxx
index 8c93d29d3c36..8efc5931e574 100644
--- a/sw/source/uibase/inc/langhelper.hxx
+++ b/sw/source/uibase/inc/langhelper.hxx
@@ -38,8 +38,8 @@ namespace SwLangHelper
extern void GetLanguageStatus( OutlinerView* pOLV, SfxItemSet& rSet );
extern bool SetLanguageStatus( OutlinerView* pOLV, SfxRequest &rReq, SwView const &rView, SwWrtShell &rSh );
- extern void SetLanguage( SwWrtShell &rWrtSh, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet );
- extern void SetLanguage( SwWrtShell &rWrtSh, OutlinerView const * pOLV, const ESelection& rSelection, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet );
+ extern void SetLanguage( SwWrtShell &rWrtSh, std::u16string_view rLangText, bool bIsForSelection, SfxItemSet &rCoreSet );
+ extern void SetLanguage( SwWrtShell &rWrtSh, OutlinerView const * pOLV, const ESelection& rSelection, std::u16string_view rLangText, bool bIsForSelection, SfxItemSet &rCoreSet );
extern void SetLanguage_None( SwWrtShell &rWrtSh, bool bIsForSelection, SfxItemSet &rCoreSet );
extern void SetLanguage_None( SwWrtShell &rWrtSh, OutlinerView const * pOLV, const ESelection& rSelection, bool bIsForSelection, SfxItemSet &rCoreSet );
extern void ResetLanguages( SwWrtShell &rWrtSh, OutlinerView const * pOLV = nullptr );
diff --git a/sw/source/uibase/inc/outline.hxx b/sw/source/uibase/inc/outline.hxx
index f9c3c1f15dde..f7702359c3ee 100644
--- a/sw/source/uibase/inc/outline.hxx
+++ b/sw/source/uibase/inc/outline.hxx
@@ -56,7 +56,7 @@ public:
virtual ~SwOutlineTabDialog() override;
SwNumRule* GetNumRule() { return xNumRule.get(); }
- sal_uInt16 GetLevel(const OUString &rFormatName) const;
+ sal_uInt16 GetLevel(std::u16string_view rFormatName) const;
OUString* GetCollNames() {return aCollNames;}
static sal_uInt16 GetActNumLevel() {return nNumLevel;}
diff --git a/sw/source/uibase/inc/regionsw.hxx b/sw/source/uibase/inc/regionsw.hxx
index adb2681efef2..a16fc1b93f5e 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -110,7 +110,7 @@ public:
SwEditRegionDlg(weld::Window* pParent, SwWrtShell& rWrtSh);
virtual ~SwEditRegionDlg() override;
- void SelectSection(const OUString& rSectionName);
+ void SelectSection(std::u16string_view rSectionName);
};
diff --git a/sw/source/uibase/inc/wrtsh.hxx b/sw/source/uibase/inc/wrtsh.hxx
index a8cc9a49d6cb..4499c0c15763 100644
--- a/sw/source/uibase/inc/wrtsh.hxx
+++ b/sw/source/uibase/inc/wrtsh.hxx
@@ -358,7 +358,7 @@ typedef bool (SwWrtShell::*FNSimpleMove)();
GetStyle eCreate = GETSTYLE_NOCREATE);
SwCharFormat* GetCharStyle(const OUString &rFormatName,
GetStyle eCreate = GETSTYLE_NOCREATE);
- SwFrameFormat* GetTableStyle(const OUString &rFormatName);
+ SwFrameFormat* GetTableStyle(std::u16string_view rFormatName);
void SetPageStyle(const OUString &rCollName);
@@ -475,7 +475,7 @@ typedef bool (SwWrtShell::*FNSimpleMove)();
bool GotoINetAttr( const SwTextINetFormat& rAttr );
void GotoOutline( SwOutlineNodes::size_type nIdx );
bool GotoOutline( const OUString& rName );
- bool GotoRegion( const OUString& rName );
+ bool GotoRegion( std::u16string_view rName );
bool GotoRefMark( const OUString& rRefMark, sal_uInt16 nSubType = 0,
sal_uInt16 nSeqNo = 0 );
bool GotoNextTOXBase( const OUString* pName = nullptr);
@@ -483,7 +483,7 @@ typedef bool (SwWrtShell::*FNSimpleMove)();
void GotoFormatField( const SwFormatField& rField );
const SwRangeRedline* GotoRedline( SwRedlineTable::size_type nArrPos, bool bSelect);
- void ChangeHeaderOrFooter(const OUString& rStyleName, bool bHeader, bool bOn, bool bShowWarning);
+ void ChangeHeaderOrFooter(std::u16string_view rStyleName, bool bHeader, bool bOn, bool bShowWarning);
virtual void SetShowHeaderFooterSeparator( FrameControlType eControl, bool bShow ) override;
/// Inserts a new annotation/comment at the current cursor position / selection.
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index c203ace11024..e6a758b37e5c 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -80,7 +80,7 @@ using namespace ::com::sun::star::uno;
// Prototypes
static void lcl_FrameGetMaxLineWidth(const SvxBorderLine* pBorderLine, SvxBorderLine& rBorderLine);
-static const SwFrameFormat* lcl_GetFrameFormatByName(SwWrtShell const & rSh, const OUString& rName)
+static const SwFrameFormat* lcl_GetFrameFormatByName(SwWrtShell const & rSh, std::u16string_view rName)
{
const size_t nCount = rSh.GetFlyCount(FLYCNTTYPE_FRM);
for( size_t i = 0; i < nCount; ++i )
diff --git a/sw/source/uibase/shells/langhelper.cxx b/sw/source/uibase/shells/langhelper.cxx
index 53e039f057e1..1be26660c34c 100644
--- a/sw/source/uibase/shells/langhelper.cxx
+++ b/sw/source/uibase/shells/langhelper.cxx
@@ -217,12 +217,12 @@ namespace SwLangHelper
return bRestoreSelection;
}
- void SetLanguage( SwWrtShell &rWrtSh, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet )
+ void SetLanguage( SwWrtShell &rWrtSh, std::u16string_view rLangText, bool bIsForSelection, SfxItemSet &rCoreSet )
{
SetLanguage( rWrtSh, nullptr , ESelection(), rLangText, bIsForSelection, rCoreSet );
}
- void SetLanguage( SwWrtShell &rWrtSh, OutlinerView const * pOLV, const ESelection& rSelection, const OUString &rLangText, bool bIsForSelection, SfxItemSet &rCoreSet )
+ void SetLanguage( SwWrtShell &rWrtSh, OutlinerView const * pOLV, const ESelection& rSelection, std::u16string_view rLangText, bool bIsForSelection, SfxItemSet &rCoreSet )
{
const LanguageType nLang = SvtLanguageTable::GetLanguageType( rLangText );
if (nLang == LANGUAGE_DONTKNOW)
diff --git a/sw/source/uibase/sidebar/StylePresetsPanel.cxx b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
index f24bf135c706..ecb2e61bd3f6 100644
--- a/sw/source/uibase/sidebar/StylePresetsPanel.cxx
+++ b/sw/source/uibase/sidebar/StylePresetsPanel.cxx
@@ -33,7 +33,7 @@ namespace sw::sidebar {
namespace {
void renderPreview(sfx2::StyleManager* pStyleManager, OutputDevice& aOutputDevice,
- OUString const & sName, sal_Int32 nHeight, tools::Rectangle const & aRect)
+ std::u16string_view sName, sal_Int32 nHeight, tools::Rectangle const & aRect)
{
SfxStyleSheetBase* pStyleSheet = pStyleManager->Search(sName, SfxStyleFamily::Para);
@@ -98,18 +98,18 @@ BitmapEx GenerateStylePreview(SfxObjectShell& rSource, OUString const & aName)
{
tools::Rectangle aRenderRect(Point(nMargin, y), aSize);
- renderPreview(pStyleManager, *pVirtualDev, "Title", nTitleHeight, aRenderRect);
+ renderPreview(pStyleManager, *pVirtualDev, u"Title", nTitleHeight, aRenderRect);
y += nTitleHeight;
}
{
tools::Rectangle aRenderRect(Point(nMargin, y), aSize);
- renderPreview(pStyleManager, *pVirtualDev, "Heading 1", nHeadingHeight, aRenderRect);
+ renderPreview(pStyleManager, *pVirtualDev, u"Heading 1", nHeadingHeight, aRenderRect);
y += nHeadingHeight;
}
{
tools::Rectangle aRenderRect(Point(nMargin, y), aSize);
- renderPreview(pStyleManager, *pVirtualDev, "Text Body", nTextBodyHeight, aRenderRect);
+ renderPreview(pStyleManager, *pVirtualDev, u"Text Body", nTextBodyHeight, aRenderRect);
}
return pVirtualDev->GetBitmapEx(Point(), aSize);
diff --git a/sw/source/uibase/sidebar/ThemePanel.cxx b/sw/source/uibase/sidebar/ThemePanel.cxx
index f4c4951f6546..2ba276cf212e 100644
--- a/sw/source/uibase/sidebar/ThemePanel.cxx
+++ b/sw/source/uibase/sidebar/ThemePanel.cxx
@@ -104,7 +104,7 @@ public:
maStyles.push_back(aRedefinition);
}
- StyleRedefinition* get(const OUString& aString)
+ StyleRedefinition* get(std::u16string_view aString)
{
for (StyleRedefinition & rStyle : maStyles)
{
@@ -315,7 +315,7 @@ std::vector<FontSet> initFontSets()
return aFontSets;
}
-FontSet getFontSet(const OUString& rFontVariant, std::vector<FontSet>& aFontSets)
+FontSet getFontSet(std::u16string_view rFontVariant, std::vector<FontSet>& aFontSets)
{
for (const FontSet & rFontSet : aFontSets)
{
@@ -325,7 +325,7 @@ FontSet getFontSet(const OUString& rFontVariant, std::vector<FontSet>& aFontSets
return aFontSets[0];
}
-void applyTheme(SfxStyleSheetBasePool* pPool, const OUString& sFontSetName, const OUString& sColorSetName,
+void applyTheme(SfxStyleSheetBasePool* pPool, std::u16string_view sFontSetName, std::u16string_view sColorSetName,
StyleSet& rStyleSet, svx::ColorSets& rColorSets)
{
SwDocStyleSheet* pStyle;
diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx
index 4b83a3d00e95..bf6804075822 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1178,7 +1178,7 @@ void SwView::Execute(SfxRequest &rReq)
GetViewFrame()->ShowChildWindow(SID_SIDEBAR);
::sfx2::sidebar::Sidebar::ShowPanel(
- "GalleryPanel",
+ u"GalleryPanel",
GetViewFrame()->GetFrame().GetFrameInterface());
break;
case SID_AVMEDIA_PLAYER :
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 2ac47cd7efb7..dfaa0b123096 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -3092,9 +3092,9 @@ void SwContentTree::HideTree()
}
static void lcl_SelectByContentTypeAndName(SwContentTree* pThis, weld::TreeView& rContentTree,
- const OUString& rContentTypeName, const OUString& rName)
+ std::u16string_view rContentTypeName, std::u16string_view rName)
{
- if (!rName.isEmpty())
+ if (!rName.empty())
{
// find content type entry
std::unique_ptr<weld::TreeIter> xIter(rContentTree.make_iterator());
diff --git a/sw/source/uibase/utlui/gloslst.cxx b/sw/source/uibase/utlui/gloslst.cxx
index b58335850ad9..8d2dcc2af2d3 100644
--- a/sw/source/uibase/utlui/gloslst.cxx
+++ b/sw/source/uibase/utlui/gloslst.cxx
@@ -100,7 +100,7 @@ SwGlossaryList::~SwGlossaryList()
// will be filled. Otherwise also rGroupName will be set and
// on demand asked for the right group.
-bool SwGlossaryList::GetShortName(const OUString& rLongName,
+bool SwGlossaryList::GetShortName(std::u16string_view rLongName,
OUString& rShortName, OUString& rGroupName )
{
if(!bFilled)
@@ -336,7 +336,7 @@ void SwGlossaryList::Invoke()
Update();
}
-AutoTextGroup* SwGlossaryList::FindGroup(const OUString& rGroupName)
+AutoTextGroup* SwGlossaryList::FindGroup(std::u16string_view rGroupName)
{
for(const auto & pRet : aGroupArr)
{
diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx
index 491a2fcbdb2a..bd076831167d 100644
--- a/sw/source/uibase/wrtsh/move.cxx
+++ b/sw/source/uibase/wrtsh/move.cxx
@@ -624,7 +624,7 @@ bool SwWrtShell::GotoOutline( const OUString& rName )
return bRet;
}
-bool SwWrtShell::GotoRegion( const OUString& rName )
+bool SwWrtShell::GotoRegion( std::u16string_view rName )
{
SwPosition aPos = *GetCursor()->GetPoint();
bool bRet = SwCursorShell::GotoRegion (rName);
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 8251a9978142..3fb11b740ca4 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -1526,7 +1526,7 @@ SwCharFormat *SwWrtShell::GetCharStyle(const OUString &rFormatName, GetStyle eCr
// frame format with this name exists or
// this is a default format or the format is automatic.
-SwFrameFormat *SwWrtShell::GetTableStyle(const OUString &rFormatName)
+SwFrameFormat *SwWrtShell::GetTableStyle(std::u16string_view rFormatName)
{
for( size_t i = GetTableFrameFormatCount(); i; )
{
@@ -1804,7 +1804,7 @@ void SwWrtShell::SetReadonlyOption(bool bSet)
// given all styles are changed
void SwWrtShell::ChangeHeaderOrFooter(
- const OUString& rStyleName, bool bHeader, bool bOn, bool bShowWarning)
+ std::u16string_view rStyleName, bool bHeader, bool bOn, bool bShowWarning)
{
SdrView *const pSdrView = GetDrawView();
if (pSdrView && pSdrView->IsTextEdit())
@@ -1821,7 +1821,7 @@ void SwWrtShell::ChangeHeaderOrFooter(
{
SwPageDesc aDesc( GetPageDesc( nFrom ));
OUString sTmp(aDesc.GetName());
- if( rStyleName.isEmpty() || rStyleName == sTmp )
+ if( rStyleName.empty() || rStyleName == sTmp )
{
bool bChgd = false;
@@ -1872,7 +1872,7 @@ void SwWrtShell::ChangeHeaderOrFooter(
if ( !IsHeaderFooterEdit() )
ToggleHeaderFooterEdit();
bCursorSet = SetCursorInHdFt(
- rStyleName.isEmpty() ? SIZE_MAX : nFrom,
+ rStyleName.empty() ? SIZE_MAX : nFrom,
bHeader );
}
}