summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-29 12:20:23 +0100
committerStephan Bergmann <sbergman@redhat.com>2021-01-04 15:29:54 +0100
commitc34e8bd71384326184baac7dea31f7ddf9bae6bc (patch)
tree0914b24023030781b3a74a768be9df4d2873b4b9 /sc
parenta1cdde17aa27902ee162d5b40860f05c592c4de8 (diff)
loplugin:stringviewparam: operator +=
Change-Id: I30ce1b5bd8fb168da7067c1967c5af2569df2653 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108512 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/table4.cxx4
-rw-r--r--sc/source/filter/excel/xepivot.cxx3
-rw-r--r--sc/source/filter/html/htmlexp.cxx8
-rw-r--r--sc/source/filter/inc/pagesettings.hxx5
-rw-r--r--sc/source/filter/oox/pagesettings.cxx2
5 files changed, 16 insertions, 6 deletions
diff --git a/sc/source/core/data/table4.cxx b/sc/source/core/data/table4.cxx
index d878070f64ea..4db88f60bb7c 100644
--- a/sc/source/core/data/table4.cxx
+++ b/sc/source/core/data/table4.cxx
@@ -49,6 +49,7 @@
#include <math.h>
#include <memory>
#include <list>
+#include <string_view>
#define D_MAX_LONG_ double(0x7fffffff)
@@ -133,7 +134,8 @@ OUString lcl_ValueString( sal_Int32 nValue, sal_uInt16 nMinDigits )
}
void setSuffixCell(
- ScColumn& rColumn, SCROW nRow, sal_Int32 nValue, sal_uInt16 nDigits, const OUString& rSuffix,
+ ScColumn& rColumn, SCROW nRow, sal_Int32 nValue, sal_uInt16 nDigits,
+ std::u16string_view rSuffix,
CellType eCellType, bool bIsOrdinalSuffix )
{
ScDocument& rDoc = rColumn.GetDoc();
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 7f8ace82683f..8156b4579499 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -29,6 +29,7 @@
#include <algorithm>
#include <math.h>
+#include <string_view>
#include <osl/diagnose.h>
#include <sot/storage.hxx>
@@ -865,7 +866,7 @@ void XclExpPivotCache::WriteSxindexlistList( XclExpStream& rStrm ) const
namespace {
/** Returns a display string for a data field containing the field name and aggregation function. */
-OUString lclGetDataFieldCaption( const OUString& rFieldName, ScGeneralFunction eFunc )
+OUString lclGetDataFieldCaption( std::u16string_view rFieldName, ScGeneralFunction eFunc )
{
OUString aCaption;
diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx
index 684a6727839a..f7e04a15c3c8 100644
--- a/sc/source/filter/html/htmlexp.cxx
+++ b/sc/source/filter/html/htmlexp.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <string_view>
+
#include <scitems.hxx>
#include <editeng/eeitem.hxx>
@@ -148,7 +152,7 @@ static OString lcl_getColGroupString(sal_Int32 nSpan, sal_Int32 nWidth)
return aByteStr.makeStringAndClear();
}
-static void lcl_AddStamp( OUString& rStr, const OUString& rName,
+static void lcl_AddStamp( OUString& rStr, std::u16string_view rName,
const css::util::DateTime& rDateTime,
const LocaleDataWrapper& rLoc )
{
@@ -161,7 +165,7 @@ static void lcl_AddStamp( OUString& rStr, const OUString& rName,
OUString aStrTime = rLoc.getTime( aDateTime );
rStr += GLOBSTR( STR_BY ) + " ";
- if (!rName.isEmpty())
+ if (!rName.empty())
rStr += rName;
else
rStr += "???";
diff --git a/sc/source/filter/inc/pagesettings.hxx b/sc/source/filter/inc/pagesettings.hxx
index 13e7eba7f779..ff0e0a035ace 100644
--- a/sc/source/filter/inc/pagesettings.hxx
+++ b/sc/source/filter/inc/pagesettings.hxx
@@ -21,6 +21,8 @@
#define INCLUDED_SC_SOURCE_FILTER_INC_PAGESETTINGS_HXX
#include <memory>
+#include <string_view>
+
#include "worksheethelper.hxx"
namespace oox { class AttributeList; }
@@ -96,7 +98,8 @@ public:
/** Imports header and footer settings from a headerFooter element. */
void importHeaderFooter( const AttributeList& rAttribs );
/** Imports header/footer characters from a headerFooter element. */
- void importHeaderFooterCharacters( const OUString& rChars, sal_Int32 nElement );
+ void importHeaderFooterCharacters(
+ std::u16string_view rChars, sal_Int32 nElement );
/** Imports the picture element. */
void importPicture( const ::oox::core::Relations& rRelations, const AttributeList& rAttribs );
diff --git a/sc/source/filter/oox/pagesettings.cxx b/sc/source/filter/oox/pagesettings.cxx
index b19caea83634..d6fd828c79dd 100644
--- a/sc/source/filter/oox/pagesettings.cxx
+++ b/sc/source/filter/oox/pagesettings.cxx
@@ -212,7 +212,7 @@ void PageSettings::importHeaderFooter( const AttributeList& rAttribs )
maModel.mbUseFirstHF = rAttribs.getBool( XML_differentFirst, false );
}
-void PageSettings::importHeaderFooterCharacters( const OUString& rChars, sal_Int32 nElement )
+void PageSettings::importHeaderFooterCharacters( std::u16string_view rChars, sal_Int32 nElement )
{
switch( nElement )
{