summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-28 17:56:40 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-29 16:42:33 +0100
commit042033f1e6da22616cb76c8d950c20c9efecbad5 (patch)
tree26b3f1f42d067506f44550b410f3fb9640616a5b /sw/source
parentccfd8e9d09f9ac0a0ea92d0f378391006faaf934 (diff)
loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/bastyp/SwSmartTagMgr.cxx2
-rw-r--r--sw/source/core/crsr/annotationmark.cxx2
-rw-r--r--sw/source/core/crsr/bookmrk.cxx10
-rw-r--r--sw/source/core/crsr/crossrefbookmark.cxx4
-rw-r--r--sw/source/core/doc/docnew.cxx3
-rw-r--r--sw/source/core/edit/edfcol.cxx2
-rw-r--r--sw/source/core/graphic/ndgrf.cxx6
-rw-r--r--sw/source/core/inc/bookmrk.hxx4
-rw-r--r--sw/source/core/inc/crossrefbookmark.hxx6
-rw-r--r--sw/source/core/text/porfld.cxx2
-rw-r--r--sw/source/core/text/porfld.hxx6
-rw-r--r--sw/source/core/text/porhyph.hxx10
-rw-r--r--sw/source/core/text/txthyph.cxx2
-rw-r--r--sw/source/core/undo/unbkmk.cxx6
-rw-r--r--sw/source/core/unocore/unochart.cxx17
-rw-r--r--sw/source/core/unocore/unoobj.cxx15
-rw-r--r--sw/source/filter/html/htmlcss1.cxx6
-rw-r--r--sw/source/filter/html/htmlform.cxx6
-rw-r--r--sw/source/filter/html/swcss1.hxx6
-rw-r--r--sw/source/filter/html/wrthtml.cxx4
-rw-r--r--sw/source/filter/html/wrthtml.hxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx4
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx4
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx4
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx6
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx4
-rw-r--r--sw/source/filter/ww8/ww8par.cxx2
-rw-r--r--sw/source/filter/ww8/ww8par.hxx2
-rw-r--r--sw/source/filter/xml/xmlexp.hxx4
-rw-r--r--sw/source/filter/xml/xmltble.cxx27
-rw-r--r--sw/source/ui/dbui/dbinsdlg.cxx42
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx15
-rw-r--r--sw/source/ui/dochdl/selglos.cxx2
-rw-r--r--sw/source/uibase/app/docsh.cxx2
-rw-r--r--sw/source/uibase/app/docstyle.cxx6
-rw-r--r--sw/source/uibase/inc/inputwin.hxx6
-rw-r--r--sw/source/uibase/inc/selglos.hxx10
-rw-r--r--sw/source/uibase/misc/glosdoc.cxx5
-rw-r--r--sw/source/uibase/ribbar/inputwin.cxx4
39 files changed, 161 insertions, 109 deletions
diff --git a/sw/source/core/bastyp/SwSmartTagMgr.cxx b/sw/source/core/bastyp/SwSmartTagMgr.cxx
index e99c11a02f93..cbe194fc005c 100644
--- a/sw/source/core/bastyp/SwSmartTagMgr.cxx
+++ b/sw/source/core/bastyp/SwSmartTagMgr.cxx
@@ -33,7 +33,7 @@ SwSmartTagMgr& SwSmartTagMgr::Get()
if (!spTheSwSmartTagMgr)
{
spTheSwSmartTagMgr = new SwSmartTagMgr(SwDocShell::Factory().GetModuleName());
- spTheSwSmartTagMgr->Init("Writer");
+ spTheSwSmartTagMgr->Init(u"Writer");
}
return *spTheSwSmartTagMgr;
}
diff --git a/sw/source/core/crsr/annotationmark.cxx b/sw/source/core/crsr/annotationmark.cxx
index 62895ab852c9..ce7c03675e14 100644
--- a/sw/source/core/crsr/annotationmark.cxx
+++ b/sw/source/core/crsr/annotationmark.cxx
@@ -40,7 +40,7 @@ namespace sw::mark
{
if ( rName.getLength() == 0 )
{
- SetName( MarkBase::GenerateNewName("__Annotation__") );
+ SetName( MarkBase::GenerateNewName(u"__Annotation__") );
}
}
diff --git a/sw/source/core/crsr/bookmrk.cxx b/sw/source/core/crsr/bookmrk.cxx
index 9df25b47bcfd..18cdae33edfd 100644
--- a/sw/source/core/crsr/bookmrk.cxx
+++ b/sw/source/core/crsr/bookmrk.cxx
@@ -314,7 +314,7 @@ namespace sw::mark
MarkBase::~MarkBase()
{ }
- OUString MarkBase::GenerateNewName(const OUString& rPrefix)
+ OUString MarkBase::GenerateNewName(std::u16string_view rPrefix)
{
static bool bHack = (getenv("LIBO_ONEWAY_STABLE_ODF_EXPORT") != nullptr);
@@ -354,15 +354,15 @@ namespace sw::mark
}
NavigatorReminder::NavigatorReminder(const SwPaM& rPaM)
- : MarkBase(rPaM, MarkBase::GenerateNewName("__NavigatorReminder__"))
+ : MarkBase(rPaM, MarkBase::GenerateNewName(u"__NavigatorReminder__"))
{ }
UnoMark::UnoMark(const SwPaM& aPaM)
- : MarkBase(aPaM, MarkBase::GenerateNewName("__UnoMark__"))
+ : MarkBase(aPaM, MarkBase::GenerateNewName(u"__UnoMark__"))
{ }
DdeBookmark::DdeBookmark(const SwPaM& aPaM)
- : MarkBase(aPaM, MarkBase::GenerateNewName("__DdeLink__"))
+ : MarkBase(aPaM, MarkBase::GenerateNewName(u"__DdeLink__"))
{ }
void DdeBookmark::SetRefObject(SwServerObject* pObj)
@@ -485,7 +485,7 @@ namespace sw::mark
}
Fieldmark::Fieldmark(const SwPaM& rPaM)
- : MarkBase(rPaM, MarkBase::GenerateNewName("__Fieldmark__"))
+ : MarkBase(rPaM, MarkBase::GenerateNewName(u"__Fieldmark__"))
{
if(!IsExpanded())
SetOtherMarkPos(GetMarkPos());
diff --git a/sw/source/core/crsr/crossrefbookmark.cxx b/sw/source/core/crsr/crossrefbookmark.cxx
index a2f046f2fa84..5090f2024d0a 100644
--- a/sw/source/core/crsr/crossrefbookmark.cxx
+++ b/sw/source/core/crsr/crossrefbookmark.cxx
@@ -35,7 +35,7 @@ namespace sw::mark
CrossRefBookmark::CrossRefBookmark(const SwPaM& rPaM,
const vcl::KeyCode& rCode,
const OUString& rName,
- const OUString& rPrefix)
+ std::u16string_view rPrefix)
: Bookmark(
// ensure that m_pPos2 is null by only passing start to super
SwPaM(*rPaM.Start()), rCode, rName)
@@ -70,7 +70,7 @@ namespace sw::mark
CrossRefHeadingBookmark::CrossRefHeadingBookmark(const SwPaM& rPaM,
const vcl::KeyCode& rCode,
const OUString& rName)
- : CrossRefBookmark(rPaM, rCode, rName, IDocumentMarkAccess::GetCrossRefHeadingBookmarkNamePrefix()+"_Toc")
+ : CrossRefBookmark(rPaM, rCode, rName, OUString(IDocumentMarkAccess::GetCrossRefHeadingBookmarkNamePrefix()+"_Toc"))
{ }
bool CrossRefHeadingBookmark::IsLegalName(const OUString& rName)
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index 757e95334011..575980cac40c 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
#include <mutex>
+#include <string_view>
#include <config_features.h>
@@ -932,7 +933,7 @@ SfxObjectShell* SwDoc::CreateCopy( bool bCallInitNew, bool bEmpty ) const
}
// save bulk letters as single documents
-static OUString lcl_FindUniqueName(SwWrtShell* pTargetShell, const OUString& rStartingPageDesc, sal_uLong nDocNo )
+static OUString lcl_FindUniqueName(SwWrtShell* pTargetShell, std::u16string_view rStartingPageDesc, sal_uLong nDocNo )
{
do
{
diff --git a/sw/source/core/edit/edfcol.cxx b/sw/source/core/edit/edfcol.cxx
index f6b1291bee99..de9f04bc59b4 100644
--- a/sw/source/core/edit/edfcol.cxx
+++ b/sw/source/core/edit/edfcol.cxx
@@ -357,7 +357,7 @@ struct SignatureDescr
SignatureDescr lcl_getSignatureDescr(const uno::Reference<frame::XModel>& xModel,
const uno::Reference<css::text::XTextContent>& xParagraph,
- const OUString& sFieldId)
+ std::u16string_view sFieldId)
{
SignatureDescr aDescr;
diff --git a/sw/source/core/graphic/ndgrf.cxx b/sw/source/core/graphic/ndgrf.cxx
index 017a226c82a8..b7ab6e94e44a 100644
--- a/sw/source/core/graphic/ndgrf.cxx
+++ b/sw/source/core/graphic/ndgrf.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <hintids.hxx>
#include <tools/helpers.hxx>
#include <tools/urlobj.hxx>
@@ -168,7 +172,7 @@ bool SwGrfNode::ReRead(
nNewType = sfx2::SvBaseLinkObjectType::ClientDde;
else
{
- sfx2::MakeLnkName( sCmd, nullptr, sURLLink, OUString(), &rFltName );
+ sfx2::MakeLnkName( sCmd, nullptr, sURLLink, std::u16string_view(), &rFltName );
nNewType = sfx2::SvBaseLinkObjectType::ClientGraphic;
}
diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx
index a73cc31c9874..63e05befe41b 100644
--- a/sw/source/core/inc/bookmrk.hxx
+++ b/sw/source/core/inc/bookmrk.hxx
@@ -24,6 +24,8 @@
#include <sfx2/Metadatable.hxx>
#include <vcl/keycod.hxx>
#include <memory>
+#include <string_view>
+
#include <rtl/ustring.hxx>
#include <osl/diagnose.h>
#include <tools/ref.hxx>
@@ -111,7 +113,7 @@ namespace sw::mark {
std::unique_ptr<SwPosition> m_pPos1;
std::unique_ptr<SwPosition> m_pPos2;
OUString m_aName;
- static OUString GenerateNewName(const OUString& rPrefix);
+ static OUString GenerateNewName(std::u16string_view rPrefix);
css::uno::WeakReference< css::text::XTextContent> m_wXBookmark;
};
diff --git a/sw/source/core/inc/crossrefbookmark.hxx b/sw/source/core/inc/crossrefbookmark.hxx
index e3976329ed4c..fa364a9b8742 100644
--- a/sw/source/core/inc/crossrefbookmark.hxx
+++ b/sw/source/core/inc/crossrefbookmark.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_SW_SOURCE_CORE_INC_CROSSREFBOOKMARK_HXX
#define INCLUDED_SW_SOURCE_CORE_INC_CROSSREFBOOKMARK_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include "bookmrk.hxx"
#include <rtl/ustring.hxx>
#include <vcl/keycod.hxx>
@@ -32,7 +36,7 @@ namespace sw::mark {
CrossRefBookmark(const SwPaM& rPaM,
const vcl::KeyCode& rCode,
const OUString& rName,
- const OUString& rPrefix);
+ std::u16string_view rPrefix);
// getters
virtual SwPosition& GetOtherMarkPos() const override;
diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index 963ab8e3910f..8688490ffe38 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -738,7 +738,7 @@ void SwNumberPortion::Paint( const SwTextPaintInfo &rInf ) const
}
SwBulletPortion::SwBulletPortion( const sal_UCS4 cBullet,
- const OUString& rBulletFollowedBy,
+ std::u16string_view rBulletFollowedBy,
std::unique_ptr<SwFont> pFont,
const bool bLft,
const bool bCntr,
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index c7382d601d14..d9e18f1d772a 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -19,6 +19,10 @@
#pragma once
+#include <sal/config.h>
+
+#include <string_view>
+
#include <swtypes.hxx>
#include <swfont.hxx>
#include "porexp.hxx"
@@ -148,7 +152,7 @@ class SwBulletPortion : public SwNumberPortion
{
public:
SwBulletPortion( const sal_UCS4 cCh,
- const OUString& rBulletFollowedBy,
+ std::u16string_view rBulletFollowedBy,
std::unique_ptr<SwFont> pFnt,
const bool bLeft,
const bool bCenter,
diff --git a/sw/source/core/text/porhyph.hxx b/sw/source/core/text/porhyph.hxx
index 57f685abe2dc..4227336918d3 100644
--- a/sw/source/core/text/porhyph.hxx
+++ b/sw/source/core/text/porhyph.hxx
@@ -19,6 +19,10 @@
#ifndef INCLUDED_SW_SOURCE_CORE_TEXT_PORHYPH_HXX
#define INCLUDED_SW_SOURCE_CORE_TEXT_PORHYPH_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include "porexp.hxx"
class SwHyphPortion : public SwExpandPortion
@@ -39,8 +43,8 @@ class SwHyphStrPortion : public SwHyphPortion
{
OUString aExpand;
public:
- explicit SwHyphStrPortion(const OUString &rStr)
- : aExpand(rStr + "-")
+ explicit SwHyphStrPortion(std::u16string_view rStr)
+ : aExpand(OUString::Concat(rStr) + "-")
{
SetWhichPor( PortionType::HyphenStr );
}
@@ -75,7 +79,7 @@ public:
class SwSoftHyphStrPortion : public SwHyphStrPortion
{
public:
- explicit SwSoftHyphStrPortion( const OUString &rStr );
+ explicit SwSoftHyphStrPortion( std::u16string_view rStr );
virtual void Paint( const SwTextPaintInfo &rInf ) const override;
};
diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx
index d0b411fa2a14..b88d34df4610 100644
--- a/sw/source/core/text/txthyph.cxx
+++ b/sw/source/core/text/txthyph.cxx
@@ -562,7 +562,7 @@ void SwSoftHyphStrPortion::Paint( const SwTextPaintInfo &rInf ) const
SwHyphStrPortion::Paint( rInf );
}
-SwSoftHyphStrPortion::SwSoftHyphStrPortion( const OUString &rStr )
+SwSoftHyphStrPortion::SwSoftHyphStrPortion( std::u16string_view rStr )
: SwHyphStrPortion( rStr )
{
SetLen(TextFrameIndex(1));
diff --git a/sw/source/core/undo/unbkmk.cxx b/sw/source/core/undo/unbkmk.cxx
index 5372899623f3..932ad9522ce4 100644
--- a/sw/source/core/undo/unbkmk.cxx
+++ b/sw/source/core/undo/unbkmk.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <UndoBookmark.hxx>
#include <strings.hrc>
@@ -111,7 +115,7 @@ SwUndoRenameBookmark::~SwUndoRenameBookmark()
{
}
-static OUString lcl_QuoteName(const OUString& rName)
+static OUString lcl_QuoteName(std::u16string_view rName)
{
static const OUString sStart = SwResId(STR_START_QUOTE);
static const OUString sEnd = SwResId(STR_END_QUOTE);
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 8004c18ee579..927235b7e239 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -18,6 +18,7 @@
*/
#include <algorithm>
+#include <string_view>
#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <com/sun/star/chart2/data/LabelOrigin.hpp>
@@ -249,21 +250,21 @@ static OUString GetCellRangeName( SwFrameFormat &rTableFormat, SwUnoCursor &rTab
return aRes;
}
-static OUString GetRangeRepFromTableAndCells( const OUString &rTableName,
- const OUString &rStartCell, const OUString &rEndCell,
+static OUString GetRangeRepFromTableAndCells( std::u16string_view rTableName,
+ std::u16string_view rStartCell, std::u16string_view rEndCell,
bool bForceEndCellName )
{
- OSL_ENSURE( !rTableName.isEmpty(), "table name missing" );
- OSL_ENSURE( !rStartCell.isEmpty(), "cell name missing" );
- OUString aRes = rTableName + "." + rStartCell;
+ OSL_ENSURE( !rTableName.empty(), "table name missing" );
+ OSL_ENSURE( !rStartCell.empty(), "cell name missing" );
+ OUString aRes = OUString::Concat(rTableName) + "." + rStartCell;
- if (!rEndCell.isEmpty())
+ if (!rEndCell.empty())
{
- aRes += ":" + rEndCell;
+ aRes += OUString::Concat(":") + rEndCell;
}
else if (bForceEndCellName)
{
- aRes += ":" + rStartCell;
+ aRes += OUString::Concat(":") + rStartCell;
}
return aRes;
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index b8f64541ab58..bf0f89ac0bbe 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -1723,7 +1723,7 @@ SwXTextCursor::setString(const OUString& aString)
uno::Any SwUnoCursorHelper::GetPropertyValue(
SwPaM& rPaM, const SfxItemPropertySet& rPropSet,
- const OUString& rPropertyName)
+ std::u16string_view rPropertyName)
{
uno::Any aAny;
SfxItemPropertySimpleEntry const*const pEntry =
@@ -1732,7 +1732,7 @@ uno::Any SwUnoCursorHelper::GetPropertyValue(
if (!pEntry)
{
throw beans::UnknownPropertyException(
- "Unknown property: " + rPropertyName,
+ OUString::Concat("Unknown property: ") + rPropertyName,
static_cast<cppu::OWeakObject *>(nullptr));
}
@@ -2004,7 +2004,7 @@ lcl_SelectParaAndReset( SwPaM &rPaM, SwDoc & rDoc,
void SwUnoCursorHelper::SetPropertyToDefault(
SwPaM& rPaM, const SfxItemPropertySet& rPropSet,
- const OUString& rPropertyName)
+ std::u16string_view rPropertyName)
{
SwDoc& rDoc = rPaM.GetDoc();
SfxItemPropertySimpleEntry const*const pEntry =
@@ -2012,14 +2012,14 @@ void SwUnoCursorHelper::SetPropertyToDefault(
if (!pEntry)
{
throw beans::UnknownPropertyException(
- "Unknown property: " + rPropertyName,
+ OUString::Concat("Unknown property: ") + rPropertyName,
static_cast<cppu::OWeakObject *>(nullptr));
}
if (pEntry->nFlags & beans::PropertyAttribute::READONLY)
{
throw uno::RuntimeException(
- "setPropertyToDefault: property is read-only: "
+ OUString::Concat("setPropertyToDefault: property is read-only: ")
+ rPropertyName, nullptr);
}
@@ -2043,14 +2043,15 @@ void SwUnoCursorHelper::SetPropertyToDefault(
uno::Any SwUnoCursorHelper::GetPropertyDefault(
SwPaM const & rPaM, const SfxItemPropertySet& rPropSet,
- const OUString& rPropertyName)
+ std::u16string_view rPropertyName)
{
SfxItemPropertySimpleEntry const*const pEntry =
rPropSet.getPropertyMap().getByName(rPropertyName);
if (!pEntry)
{
throw beans::UnknownPropertyException(
- "Unknown property: " + rPropertyName, static_cast<cppu::OWeakObject *>(nullptr));
+ OUString::Concat("Unknown property: ") + rPropertyName,
+ static_cast<cppu::OWeakObject *>(nullptr));
}
uno::Any aRet;
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index c404d77d58b1..2560ef45bb8d 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -1454,11 +1454,11 @@ bool SwCSS1Parser::MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
SVX_CSS1_LTYPE_PERCENTAGE == rPropInfo.m_eWidthType );
}
-void SwCSS1Parser::AddClassName( OUString& rFormatName, const OUString& rClass )
+void SwCSS1Parser::AddClassName( OUString& rFormatName, std::u16string_view rClass )
{
- OSL_ENSURE( !rClass.isEmpty(), "Style class without length?" );
+ OSL_ENSURE( !rClass.empty(), "Style class without length?" );
- rFormatName += "." + rClass;
+ rFormatName += OUString::Concat(".") + rClass;
}
void SwCSS1Parser::FillDropCap( SwFormatDrop& rDrop,
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index 18c5def4ccf6..bb51694df012 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <hintids.hxx>
#include <comphelper/documentinfo.hxx>
#include <comphelper/string.hxx>
@@ -818,7 +822,7 @@ static bool lcl_html_setEvents(
return true;
}
-static void lcl_html_getEvents( const OUString& rOption, const OUString& rValue,
+static void lcl_html_getEvents( const OUString& rOption, std::u16string_view rValue,
std::vector<OUString>& rUnoMacroTable,
std::vector<OUString>& rUnoMacroParamTable )
{
diff --git a/sw/source/filter/html/swcss1.hxx b/sw/source/filter/html/swcss1.hxx
index b9f127c1ec04..9d930f6bfcd7 100644
--- a/sw/source/filter/html/swcss1.hxx
+++ b/sw/source/filter/html/swcss1.hxx
@@ -20,6 +20,10 @@
#ifndef INCLUDED_SW_SOURCE_FILTER_HTML_SWCSS1_HXX
#define INCLUDED_SW_SOURCE_FILTER_HTML_SWCSS1_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <svtools/htmltokn.h>
#include <tools/solar.h>
@@ -128,7 +132,7 @@ public:
bool SetFormatBreak( SfxItemSet& rItemSet,
const SvxCSS1PropertyInfo& rPropInfo );
- static void AddClassName( OUString& rFormatName, const OUString& rClass );
+ static void AddClassName( OUString& rFormatName, std::u16string_view rClass );
static bool MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
bool bAutoWidth=false );
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index 7d95066ef5b4..741448d96f7f 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -1219,10 +1219,10 @@ void SwHTMLWriter::OutPointFieldmarks( const SwPosition& rPos )
// TODO : Handle other single-point fieldmark types here (if any).
}
-void SwHTMLWriter::OutImplicitMark( const OUString& rMark,
+void SwHTMLWriter::OutImplicitMark( std::u16string_view rMark,
const char *pMarkType )
{
- if( !rMark.isEmpty() && !m_aImplicitMarks.empty() )
+ if( !rMark.empty() && !m_aImplicitMarks.empty() )
{
OUString sMark(rMark + OUStringChar(cMarkSeparator) + OUString::createFromAscii(pMarkType));
if( 0 != m_aImplicitMarks.erase( sMark ) )
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 26312473f7be..cef3eb788167 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -419,7 +419,7 @@ public:
void OutAnchor( const OUString& rName );
void OutBookmarks();
void OutPointFieldmarks( const SwPosition& rPos );
- void OutImplicitMark( const OUString& rMark, const char *pMarkType );
+ void OutImplicitMark( std::u16string_view rMark, const char *pMarkType );
OUString convertHyperlinkHRefValue(const OUString& rURL);
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 6f76dcbaebaa..1134900df65e 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7010,7 +7010,7 @@ void DocxAttributeOutput::FontPitchType( FontPitch ePitch ) const
m_pSerializer->singleElementNS(XML_w, XML_pitch, FSNS(XML_w, XML_val), pPitch);
}
-void DocxAttributeOutput::EmbedFont( const OUString& name, FontFamily family, FontPitch pitch )
+void DocxAttributeOutput::EmbedFont( std::u16string_view name, FontFamily family, FontPitch pitch )
{
if( !m_rExport.m_rDoc.getIDocumentSettingAccess().get( DocumentSettingId::EMBED_FONTS ))
return; // no font embedding with this document
@@ -7025,7 +7025,7 @@ static char toHexChar( int value )
return value >= 10 ? value + 'A' - 10 : value + '0';
}
-void DocxAttributeOutput::EmbedFontStyle( const OUString& name, int tag, FontFamily family, FontItalic italic,
+void DocxAttributeOutput::EmbedFontStyle( std::u16string_view name, int tag, FontFamily family, FontItalic italic,
FontWeight weight, FontPitch pitch )
{
// Embed font if at least viewing is allowed (in which case the opening app must check
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index ed9fe43c5dbf..20781b13ceb3 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -325,7 +325,7 @@ public:
void FontPitchType( FontPitch ePitch ) const;
/// Write out the font into the document, if it's an embedded font.
- void EmbedFont( const OUString& name, FontFamily family, FontPitch pitch );
+ void EmbedFont( std::u16string_view name, FontFamily family, FontPitch pitch );
/// Definition of a numbering instance.
virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule ) override;
@@ -435,7 +435,7 @@ private:
void WriteFFData( const FieldInfos& rInfos );
void WritePendingPlaceholder();
- void EmbedFontStyle( const OUString& name, int tag, FontFamily family, FontItalic italic, FontWeight weight,
+ void EmbedFontStyle( std::u16string_view name, int tag, FontFamily family, FontItalic italic, FontWeight weight,
FontPitch pitch );
/**
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index ebff8c9db442..fdee9d097f31 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -1062,8 +1062,8 @@ public:
virtual void OutputField( const SwField* pField, ww::eField eFieldType,
const OUString& rFieldCmd, FieldFlags nMode = FieldFlags::All ) override;
- void StartCommentOutput( const OUString& rName );
- void EndCommentOutput( const OUString& rName );
+ void StartCommentOutput( std::u16string_view rName );
+ void EndCommentOutput( std::u16string_view rName );
void OutGrf(const ww8::Frame &rFrame);
bool TestOleNeedsGraphic(const SwAttrSet& rSet, tools::SvRef<SotStorage> const& xOleStg,
const tools::SvRef<SotStorage>& xObjStg, OUString const& rStorageName,
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index 1cd22f2ee910..e05882cd09ad 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -1893,15 +1893,15 @@ void WW8Export::OutputField( const SwField* pField, ww::eField eFieldType,
InsertSpecialChar( *this, 0x15, nullptr, bIncludeEmptyPicLocation );
}
-void WW8Export::StartCommentOutput(const OUString& rName)
+void WW8Export::StartCommentOutput(std::u16string_view rName)
{
const OUString sStr{ FieldString(ww::eQUOTE) + "[" + rName + "] " };
OutputField(nullptr, ww::eQUOTE, sStr, FieldFlags::Start | FieldFlags::CmdStart);
}
-void WW8Export::EndCommentOutput(const OUString& rName)
+void WW8Export::EndCommentOutput(std::u16string_view rName)
{
- const OUString sStr{ " [" + rName + "] " };
+ const OUString sStr{ OUString::Concat(" [") + rName + "] " };
OutputField(nullptr, ww::eQUOTE, sStr, FieldFlags::CmdEnd | FieldFlags::End |
FieldFlags::Close);
}
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index c141c857f37c..d76614290239 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -159,9 +159,9 @@ static Color WW8TransCol(SVBT32 nWC)
return Color(nWC[0], nWC[1], nWC[2]);
}
-void wwFrameNamer::SetUniqueGraphName(SwFrameFormat *pFrameFormat, const OUString &rFixed)
+void wwFrameNamer::SetUniqueGraphName(SwFrameFormat *pFrameFormat, std::u16string_view rFixed)
{
- if (mbIsDisabled || rFixed.isEmpty())
+ if (mbIsDisabled || rFixed.empty())
return;
pFrameFormat->SetName(msSeed+OUString::number(++mnImportedGraphicsCount) + ": " + rFixed);
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index b3d4fba36294..c8e52560564c 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -382,7 +382,7 @@ bool BasicProjImportHelper::import( const uno::Reference< io::XInputStream >& rx
oox::StorageRef vbaStg = root.openSubStorage( "Macros" , false );
if ( vbaStg )
{
- oox::ole::VbaProject aVbaPrj( mxCtx, mrDocShell.GetModel(), "Writer" );
+ oox::ole::VbaProject aVbaPrj( mxCtx, mrDocShell.GetModel(), u"Writer" );
bRet = aVbaPrj.importVbaProject( *vbaStg );
}
}
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 7629d2e5a63d..57b53e05589c 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -942,7 +942,7 @@ private:
wwFrameNamer& operator=(wwFrameNamer const&) = delete;
public:
- void SetUniqueGraphName(SwFrameFormat *pFrameFormat, const OUString &rFixedPart);
+ void SetUniqueGraphName(SwFrameFormat *pFrameFormat, std::u16string_view rFixedPart);
wwFrameNamer(bool bIsDisabled, const OUString &rSeed)
: msSeed(rSeed), mnImportedGraphicsCount(0), mbIsDisabled(bIsDisabled)
{
diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx
index 22e6a42368a7..42c5034c3f1c 100644
--- a/sw/source/filter/xml/xmlexp.hxx
+++ b/sw/source/filter/xml/xmlexp.hxx
@@ -23,6 +23,8 @@
#include <xmloff/xmlexp.hxx>
#include "xmlitmap.hxx"
#include <xmloff/xmltoken.hxx>
+
+#include <string_view>
#include <vector>
class SwDoc;
@@ -66,7 +68,7 @@ class SwXMLExport : public SvXMLExport
void ExportTableLinesAutoStyles( const SwTableLines& rLines,
sal_uInt32 nAbsWidth,
sal_uInt32 nBaseWidth,
- const OUString& rNamePrefix,
+ std::u16string_view rNamePrefix,
SwXMLTableColumnsSortByWidth_Impl& rExpCols,
SwXMLTableFrameFormatsSort_Impl& rExpRows,
SwXMLTableFrameFormatsSort_Impl& rExpCells,
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 605845088fa1..a681fc4cf38d 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <com/sun/star/text/XTextTable.hpp>
#include <com/sun/star/text/XTextSection.hpp>
@@ -181,13 +185,13 @@ class SwXMLTableFrameFormatsSort_Impl
private:
SwXMLFrameFormats_Impl aFormatList;
public:
- bool AddRow( SwFrameFormat& rFrameFormat, const OUString& rNamePrefix, sal_uInt32 nLine );
- bool AddCell( SwFrameFormat& rFrameFormat, const OUString& rNamePrefix,
+ bool AddRow( SwFrameFormat& rFrameFormat, std::u16string_view rNamePrefix, sal_uInt32 nLine );
+ bool AddCell( SwFrameFormat& rFrameFormat, std::u16string_view rNamePrefix,
sal_uInt32 nCol, sal_uInt32 nRow, bool bTop );
};
bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat,
- const OUString& rNamePrefix,
+ std::u16string_view rNamePrefix,
sal_uInt32 nLine )
{
const SwFormatFrameSize *pFrameSize = nullptr;
@@ -280,7 +284,7 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat,
if( bInsert )
{
- rFrameFormat.SetName( rNamePrefix + "." + OUString::number(nLine+1) );
+ rFrameFormat.SetName( OUString::Concat(rNamePrefix) + "." + OUString::number(nLine+1) );
if ( i != aFormatList.end() ) ++i;
aFormatList.insert( i, &rFrameFormat );
}
@@ -288,22 +292,22 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat,
return bInsert;
}
-static OUString lcl_xmltble_appendBoxPrefix(const OUString& rNamePrefix,
+static OUString lcl_xmltble_appendBoxPrefix(std::u16string_view rNamePrefix,
sal_uInt32 nCol, sal_uInt32 nRow, bool bTop )
{
if( bTop )
{
OUString sTmp;
sw_GetTableBoxColStr( static_cast<sal_uInt16>(nCol), sTmp );
- return rNamePrefix + "." + sTmp + OUString::number(nRow + 1);
+ return OUString::Concat(rNamePrefix) + "." + sTmp + OUString::number(nRow + 1);
}
- return rNamePrefix
+ return OUString::Concat(rNamePrefix)
+ "." + OUString::number(nCol + 1)
+ "." + OUString::number(nRow + 1);
}
bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat,
- const OUString& rNamePrefix,
+ std::u16string_view rNamePrefix,
sal_uInt32 nCol, sal_uInt32 nRow, bool bTop )
{
const SwFormatVertOrient *pVertOrient = nullptr;
@@ -557,7 +561,7 @@ void SwXMLExport::ExportTableColumnStyle( const SwXMLTableColumn_Impl& rCol )
void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
sal_uInt32 nAbsWidth, sal_uInt32 nBaseWidth,
- const OUString& rNamePrefix,
+ std::u16string_view rNamePrefix,
SwXMLTableColumnsSortByWidth_Impl& rExpCols,
SwXMLTableFrameFormatsSort_Impl& rExpRows,
SwXMLTableFrameFormatsSort_Impl& rExpCells,
@@ -620,11 +624,12 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
{
OUString sTmp;
sw_GetTableBoxColStr( nColumn, sTmp );
- pColumn->SetStyleName( rNamePrefix + "." + sTmp );
+ pColumn->SetStyleName( OUString::Concat(rNamePrefix) + "." + sTmp );
}
else
{
- pColumn->SetStyleName( rNamePrefix + "." + OUString::number(nColumn + 1U) );
+ pColumn->SetStyleName(
+ OUString::Concat(rNamePrefix) + "." + OUString::number(nColumn + 1U) );
}
ExportTableColumnStyle( *pColumn );
rExpCols.insert( pColumn );
diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx
index d0a42a4bfbb3..15a77cdabb82 100644
--- a/sw/source/ui/dbui/dbinsdlg.cxx
+++ b/sw/source/ui/dbui/dbinsdlg.cxx
@@ -76,6 +76,8 @@
#include <o3tl/any.hxx>
#include <memory>
+#include <string_view>
+
#include <swuiexp.hxx>
using namespace ::dbtools;
@@ -1420,34 +1422,34 @@ void SwInsertDBColAutoPilot::SetTabSet()
rSh.MoveTable( GotoCurrTable, fnTableStart );
}
-static Sequence<OUString> lcl_createSourceNames(const OUString& rNodeName)
+static Sequence<OUString> lcl_createSourceNames(std::u16string_view rNodeName)
{
Sequence<OUString> aSourceNames(11);
OUString* pNames = aSourceNames.getArray();
- pNames[0] = rNodeName + "/DataSource";
- pNames[1] = rNodeName + "/Command";
- pNames[2] = rNodeName + "/CommandType";
- pNames[3] = rNodeName + "/ColumnsToText";
- pNames[4] = rNodeName + "/ColumnsToTable";
- pNames[5] = rNodeName + "/ParaStyle";
- pNames[6] = rNodeName + "/TableAutoFormat";
- pNames[7] = rNodeName + "/IsTable";
- pNames[8] = rNodeName + "/IsField";
- pNames[9] = rNodeName + "/IsHeadlineOn";
- pNames[10] = rNodeName + "/IsEmptyHeadline";
+ pNames[0] = OUString::Concat(rNodeName) + "/DataSource";
+ pNames[1] = OUString::Concat(rNodeName) + "/Command";
+ pNames[2] = OUString::Concat(rNodeName) + "/CommandType";
+ pNames[3] = OUString::Concat(rNodeName) + "/ColumnsToText";
+ pNames[4] = OUString::Concat(rNodeName) + "/ColumnsToTable";
+ pNames[5] = OUString::Concat(rNodeName) + "/ParaStyle";
+ pNames[6] = OUString::Concat(rNodeName) + "/TableAutoFormat";
+ pNames[7] = OUString::Concat(rNodeName) + "/IsTable";
+ pNames[8] = OUString::Concat(rNodeName) + "/IsField";
+ pNames[9] = OUString::Concat(rNodeName) + "/IsHeadlineOn";
+ pNames[10] = OUString::Concat(rNodeName) + "/IsEmptyHeadline";
return aSourceNames;
}
-static Sequence<OUString> lcl_CreateSubNames(const OUString& rSubNodeName)
+static Sequence<OUString> lcl_CreateSubNames(std::u16string_view rSubNodeName)
{
Sequence<OUString> aSubSourceNames(6);
OUString* pNames = aSubSourceNames.getArray();
- pNames[0] = rSubNodeName + "/ColumnName";
- pNames[1] = rSubNodeName + "/ColumnIndex";
- pNames[2] = rSubNodeName + "/IsNumberFormat";
- pNames[3] = rSubNodeName + "/IsNumberFormatFromDataBase";
- pNames[4] = rSubNodeName + "/NumberFormat";
- pNames[5] = rSubNodeName + "/NumberFormatLocale";
+ pNames[0] = OUString::Concat(rSubNodeName) + "/ColumnName";
+ pNames[1] = OUString::Concat(rSubNodeName) + "/ColumnIndex";
+ pNames[2] = OUString::Concat(rSubNodeName) + "/IsNumberFormat";
+ pNames[3] = OUString::Concat(rSubNodeName) + "/IsNumberFormatFromDataBase";
+ pNames[4] = OUString::Concat(rSubNodeName) + "/NumberFormat";
+ pNames[5] = OUString::Concat(rSubNodeName) + "/NumberFormatLocale";
return aSubSourceNames;
}
@@ -1614,7 +1616,7 @@ void SwInsertDBColAutoPilot::Load()
for(const OUString& rSubName : aSubNames)
{
Sequence <OUString> aSubNodeNames =
- lcl_CreateSubNames(sSubNodeName + rSubName);
+ lcl_CreateSubNames(OUString(sSubNodeName + rSubName));
Sequence< Any> aSubProps = GetProperties(aSubNodeNames);
const Any* pSubProps = aSubProps.getConstArray();
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 14215accd178..357be32aa182 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -58,6 +58,7 @@
#include <svx/dialogs.hrc>
#include <svx/flagsdef.hxx>
#include <memory>
+#include <string_view>
using namespace ::com::sun::star;
@@ -171,8 +172,8 @@ public:
OUString GetFile() const;
OUString GetSubRegion() const;
void SetFile(OUString const& rFile);
- void SetFilter(OUString const& rFilter);
- void SetSubRegion(OUString const& rSubRegion);
+ void SetFilter(std::u16string_view rFilter);
+ void SetSubRegion(std::u16string_view rSubRegion);
bool IsContent() const { return m_bContent; }
void SetContent(bool const bValue) { m_bContent = bValue; }
@@ -235,7 +236,7 @@ void SectRepr::SetFile( const OUString& rFile )
}
}
-void SectRepr::SetFilter( const OUString& rFilter )
+void SectRepr::SetFilter( std::u16string_view rFilter )
{
OUString sNewFile;
const OUString sOldFileName( m_SectionData.GetLinkFileName() );
@@ -257,7 +258,7 @@ void SectRepr::SetFilter( const OUString& rFilter )
}
}
-void SectRepr::SetSubRegion(const OUString& rSubRegion)
+void SectRepr::SetSubRegion(std::u16string_view rSubRegion)
{
OUString sNewFile;
sal_Int32 n(0);
@@ -265,13 +266,13 @@ void SectRepr::SetSubRegion(const OUString& rSubRegion)
const OUString sOldFileName( sLinkFileName.getToken( 0, sfx2::cTokenSeparator, n ) );
const OUString sFilter( sLinkFileName.getToken( 0, sfx2::cTokenSeparator, n ) );
- if( !rSubRegion.isEmpty() || !sOldFileName.isEmpty() )
+ if( !rSubRegion.empty() || !sOldFileName.isEmpty() )
sNewFile = sOldFileName + OUStringChar(sfx2::cTokenSeparator) +
sFilter + OUStringChar(sfx2::cTokenSeparator) + rSubRegion;
m_SectionData.SetLinkFileName( sNewFile );
- if( !rSubRegion.isEmpty() || !sOldFileName.isEmpty() )
+ if( !rSubRegion.empty() || !sOldFileName.isEmpty() )
{
m_SectionData.SetType( SectionType::FileLink );
}
@@ -942,7 +943,7 @@ IMPL_LINK(SwEditRegionDlg, UseFileHdl, weld::ToggleButton&, rButton, void)
else
{
pSectRepr->SetFile(OUString());
- pSectRepr->SetSubRegion(OUString());
+ pSectRepr->SetSubRegion(std::u16string_view());
pSectRepr->GetSectionData().SetLinkFilePassword(OUString());
}
return false;
diff --git a/sw/source/ui/dochdl/selglos.cxx b/sw/source/ui/dochdl/selglos.cxx
index 46acd407f057..1d2b93f239a6 100644
--- a/sw/source/ui/dochdl/selglos.cxx
+++ b/sw/source/ui/dochdl/selglos.cxx
@@ -19,7 +19,7 @@
#include <selglos.hxx>
-SwSelGlossaryDlg::SwSelGlossaryDlg(weld::Window * pParent, const OUString &rShortName)
+SwSelGlossaryDlg::SwSelGlossaryDlg(weld::Window * pParent, std::u16string_view rShortName)
: GenericDialogController(pParent, "modules/swriter/ui/insertautotextdialog.ui", "InsertAutoTextDialog")
, m_xFrame(m_xBuilder->weld_frame("frame"))
, m_xGlosBox(m_xBuilder->weld_tree_view("treeview"))
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 7a9620b876cf..16b3a66d8460 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1108,7 +1108,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
{
SfxViewShell* pViewShell = GetView()? GetView(): SfxViewShell::Current();
bool bVisible = sfx2::SfxNotebookBar::StateMethod(pViewShell->GetViewFrame()->GetBindings(),
- "modules/swriter/ui/");
+ u"modules/swriter/ui/");
rSet.Put( SfxBoolItem( SID_NOTEBOOKBAR, bVisible ) );
}
break;
diff --git a/sw/source/uibase/app/docstyle.cxx b/sw/source/uibase/app/docstyle.cxx
index c720c3775c8c..d824ac393cbd 100644
--- a/sw/source/uibase/app/docstyle.cxx
+++ b/sw/source/uibase/app/docstyle.cxx
@@ -368,7 +368,7 @@ static const SwBoxAutoFormat* lcl_FindCellStyle(SwDoc& rDoc, std::u16string_view
}
sal_uInt32 SwStyleSheetIterator::SwPoolFormatList::FindName(SfxStyleFamily eFam,
- const OUString &rName)
+ std::u16string_view rName)
{
if(!maImpl.empty())
{
@@ -423,7 +423,7 @@ void SwStyleSheetIterator::SwPoolFormatList::rehash()
}
void SwStyleSheetIterator::SwPoolFormatList::RemoveName(SfxStyleFamily eFam,
- const OUString &rName)
+ std::u16string_view rName)
{
sal_uInt32 nTmpPos = FindName( eFam, rName );
if( nTmpPos < maImpl.size() )
@@ -435,7 +435,7 @@ void SwStyleSheetIterator::SwPoolFormatList::RemoveName(SfxStyleFamily eFam,
}
// Add Strings to the list of templates
-void SwStyleSheetIterator::SwPoolFormatList::Append( char cChar, const OUString& rStr )
+void SwStyleSheetIterator::SwPoolFormatList::Append( char cChar, std::u16string_view rStr )
{
const OUString aStr = OUStringChar(cChar) + rStr;
diff --git a/sw/source/uibase/inc/inputwin.hxx b/sw/source/uibase/inc/inputwin.hxx
index ab18e2118cc3..5536f9634c6d 100644
--- a/sw/source/uibase/inc/inputwin.hxx
+++ b/sw/source/uibase/inc/inputwin.hxx
@@ -19,6 +19,10 @@
#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_INPUTWIN_HXX
#define INCLUDED_SW_SOURCE_UIBASE_INC_INPUTWIN_HXX
+#include <sal/config.h>
+
+#include <string_view>
+
#include <vcl/InterimItemWindow.hxx>
#include <vcl/menu.hxx>
#include <vcl/toolbox.hxx>
@@ -49,7 +53,7 @@ public:
SetSizePixel(m_xWidget->get_preferred_size());
}
- void UpdateRange(const OUString& rSel, const OUString& rTableName);
+ void UpdateRange(std::u16string_view rSel, const OUString& rTableName);
virtual void dispose() override
{
diff --git a/sw/source/uibase/inc/selglos.hxx b/sw/source/uibase/inc/selglos.hxx
index 0109051a5f68..fd5de379631a 100644
--- a/sw/source/uibase/inc/selglos.hxx
+++ b/sw/source/uibase/inc/selglos.hxx
@@ -19,6 +19,10 @@
#pragma once
+#include <sal/config.h>
+
+#include <string_view>
+
#include <vcl/weld.hxx>
class SwSelGlossaryDlg final : public weld::GenericDialogController
@@ -28,12 +32,12 @@ class SwSelGlossaryDlg final : public weld::GenericDialogController
DECL_LINK(DoubleClickHdl, weld::TreeView&, bool);
public:
- SwSelGlossaryDlg(weld::Window * pParent, const OUString &rShortName);
+ SwSelGlossaryDlg(weld::Window * pParent, std::u16string_view rShortName);
virtual ~SwSelGlossaryDlg() override;
- void InsertGlos(const OUString &rRegion, const OUString &rGlosName)
+ void InsertGlos(std::u16string_view rRegion, std::u16string_view rGlosName)
{
- const OUString aTmp = rRegion + ":" + rGlosName;
+ const OUString aTmp = OUString::Concat(rRegion) + ":" + rGlosName;
m_xGlosBox->append_text(aTmp);
}
sal_Int32 GetSelectedIdx() const
diff --git a/sw/source/uibase/misc/glosdoc.cxx b/sw/source/uibase/misc/glosdoc.cxx
index f4e58d08ffcd..181f8c7247e1 100644
--- a/sw/source/uibase/misc/glosdoc.cxx
+++ b/sw/source/uibase/misc/glosdoc.cxx
@@ -18,6 +18,7 @@
*/
#include <algorithm>
+#include <string_view>
#include <com/sun/star/container/XNamed.hpp>
#include <comphelper/servicehelper.hxx>
@@ -47,9 +48,9 @@ using namespace ::com::sun::star::uno;
namespace
{
-OUString lcl_FullPathName(const OUString& sPath, const OUString& sName)
+OUString lcl_FullPathName(std::u16string_view sPath, std::u16string_view sName)
{
- return sPath + "/" + sName + SwGlossaries::GetExtension();
+ return OUString::Concat(sPath) + "/" + sName + SwGlossaries::GetExtension();
}
OUString lcl_CheckFileName( const OUString& rNewFilePath,
diff --git a/sw/source/uibase/ribbar/inputwin.cxx b/sw/source/uibase/ribbar/inputwin.cxx
index c5dfa9dc1366..fb1b082d6747 100644
--- a/sw/source/uibase/ribbar/inputwin.cxx
+++ b/sw/source/uibase/ribbar/inputwin.cxx
@@ -501,10 +501,10 @@ IMPL_LINK_NOARG(InputEdit, ActivateHdl, weld::Entry&, bool)
return true;
}
-void InputEdit::UpdateRange(const OUString& rBoxes,
+void InputEdit::UpdateRange(std::u16string_view rBoxes,
const OUString& rName )
{
- if( rBoxes.isEmpty() )
+ if( rBoxes.empty() )
{
GrabFocus();
return;