summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/compiler.hxx2
-rw-r--r--sc/source/core/tool/addincol.cxx5
-rw-r--r--sc/source/core/tool/compiler.cxx5
-rw-r--r--sc/source/filter/excel/xechart.cxx2
-rw-r--r--sc/source/filter/excel/xlchart.cxx5
-rw-r--r--sc/source/filter/inc/xechart.hxx2
-rw-r--r--sc/source/filter/inc/xlchart.hxx2
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx5
8 files changed, 16 insertions, 12 deletions
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index 5f3b6354c967..0cd48fccc92e 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -349,7 +349,7 @@ private:
bool ParseValue( const OUString& );
bool ParseOpCode( const OUString&, bool bInArray );
- bool ParseOpCode2( const OUString& );
+ bool ParseOpCode2( std::u16string_view );
bool ParseString();
bool ParseReference( const OUString& rSymbol, const OUString* pErrRef = nullptr );
bool ParseSingleReference( const OUString& rSymbol, const OUString* pErrRef = nullptr );
diff --git a/sc/source/core/tool/addincol.cxx b/sc/source/core/tool/addincol.cxx
index 126a0f915c7a..26b7baa9ed7f 100644
--- a/sc/source/core/tool/addincol.cxx
+++ b/sc/source/core/tool/addincol.cxx
@@ -24,6 +24,7 @@
#include <sfx2/objsh.hxx>
#include <unotools/charclass.hxx>
#include <sal/log.hxx>
+#include <o3tl/string_view.hxx>
#include <osl/diagnose.h>
#include <com/sun/star/container/XContentEnumerationAccess.hpp>
@@ -294,7 +295,7 @@ void ScUnoAddInCollection::Initialize()
bInitialized = true; // with or without functions
}
-static sal_uInt16 lcl_GetCategory( const OUString& rName )
+static sal_uInt16 lcl_GetCategory( std::u16string_view rName )
{
static const char* aFuncNames[SC_FUNCGROUP_COUNT] =
{
@@ -313,7 +314,7 @@ static sal_uInt16 lcl_GetCategory( const OUString& rName )
"Add-In" // ID_FUNCTION_GRP_ADDINS
};
for (sal_uInt16 i=0; i<SC_FUNCGROUP_COUNT; i++)
- if ( rName.equalsAscii( aFuncNames[i] ) )
+ if ( o3tl::equalsAscii( rName, aFuncNames[i] ) )
return i+1; // IDs start at 1
return ID_FUNCTION_GRP_ADDINS; // if not found, use Add-In group
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 151ccefd6134..cd050ef794a4 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -32,6 +32,7 @@
#include <svl/sharedstringpool.hxx>
#include <sal/log.hxx>
#include <o3tl/safeint.hxx>
+#include <o3tl/string_view.hxx>
#include <osl/diagnose.h>
#include <rtl/character.hxx>
#include <unotools/charclass.hxx>
@@ -3061,13 +3062,13 @@ bool ScCompiler::ParseOpCode( const OUString& rName, bool bInArray )
return bFound;
}
-bool ScCompiler::ParseOpCode2( const OUString& rName )
+bool ScCompiler::ParseOpCode2( std::u16string_view rName )
{
bool bFound = false;
sal_uInt16 i;
for( i = ocInternalBegin; i <= ocInternalEnd && !bFound; i++ )
- bFound = rName.equalsAscii( pInternal[ i-ocInternalBegin ] );
+ bFound = o3tl::equalsAscii( rName, pInternal[ i-ocInternalBegin ] );
if (bFound)
{
diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx
index f42a1448e54e..64525457f894 100644
--- a/sc/source/filter/excel/xechart.cxx
+++ b/sc/source/filter/excel/xechart.cxx
@@ -315,7 +315,7 @@ const XclChTypeInfo& XclExpChRoot::GetChartTypeInfo( XclChTypeId eType ) const
return mxChData->mxTypeInfoProv->GetTypeInfo( eType );
}
-const XclChTypeInfo& XclExpChRoot::GetChartTypeInfo( const OUString& rServiceName ) const
+const XclChTypeInfo& XclExpChRoot::GetChartTypeInfo( std::u16string_view rServiceName ) const
{
return mxChData->mxTypeInfoProv->GetTypeInfoFromService( rServiceName );
}
diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx
index 3a178c10dc06..d446f77d2353 100644
--- a/sc/source/filter/excel/xlchart.cxx
+++ b/sc/source/filter/excel/xlchart.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/chart2/XChartDocument.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <o3tl/string_view.hxx>
#include <sal/macros.h>
#include <sal/mathconf.h>
#include <svl/itemset.hxx>
@@ -528,10 +529,10 @@ const XclChTypeInfo& XclChTypeInfoProvider::GetTypeInfoFromRecId( sal_uInt16 nRe
return GetTypeInfo( EXC_CHTYPEID_UNKNOWN );
}
-const XclChTypeInfo& XclChTypeInfoProvider::GetTypeInfoFromService( const OUString& rServiceName ) const
+const XclChTypeInfo& XclChTypeInfoProvider::GetTypeInfoFromService( std::u16string_view rServiceName ) const
{
for(auto const &rIt : spTypeInfos)
- if( rServiceName.equalsAscii( rIt.mpcServiceName ) )
+ if( o3tl::equalsAscii( rServiceName, rIt.mpcServiceName ) )
return rIt;
OSL_FAIL( "XclChTypeInfoProvider::GetTypeInfoFromService - unknown service name" );
return GetTypeInfo( EXC_CHTYPEID_UNKNOWN );
diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx
index d291266a06b1..ff7dcc90920f 100644
--- a/sc/source/filter/inc/xechart.hxx
+++ b/sc/source/filter/inc/xechart.hxx
@@ -97,7 +97,7 @@ public:
/** Returns chart type info for a unique chart type identifier. */
const XclChTypeInfo& GetChartTypeInfo( XclChTypeId eType ) const;
/** Returns the first fitting chart type info for the passed service name. */
- const XclChTypeInfo& GetChartTypeInfo( const OUString& rServiceName ) const;
+ const XclChTypeInfo& GetChartTypeInfo( std::u16string_view rServiceName ) const;
/** Returns an info struct about auto formatting for the passed object type. */
const XclChFormatInfo& GetFormatInfo( XclChObjectType eObjType ) const;
diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx
index 15859aac7814..8b015e012949 100644
--- a/sc/source/filter/inc/xlchart.hxx
+++ b/sc/source/filter/inc/xlchart.hxx
@@ -1253,7 +1253,7 @@ public:
/** Returns the first fitting chart type info for an Excel chart type record identifier. */
const XclChTypeInfo& GetTypeInfoFromRecId( sal_uInt16 nRecId ) const;
/** Returns the first fitting chart type info for the passed service name. */
- const XclChTypeInfo& GetTypeInfoFromService( const OUString& rServiceName ) const;
+ const XclChTypeInfo& GetTypeInfoFromService( std::u16string_view rServiceName ) const;
private:
typedef ::std::map< XclChTypeId, const XclChTypeInfo* > XclChTypeInfoMap;
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index d67ee8e36f57..77175fa64c64 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -17,6 +17,7 @@
#include <document.hxx>
+#include <o3tl/string_view.hxx>
#include <svl/style.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/frame.hxx>
@@ -605,11 +606,11 @@ const struct
{ COLORSCALE_FORMULA, "formula" },
};
-ScColorScaleEntryType getTypeForId(const OUString& sId)
+ScColorScaleEntryType getTypeForId(std::u16string_view sId)
{
for (auto& r : TypeIdMap)
{
- if (sId.equalsAscii(r.sId))
+ if (o3tl::equalsAscii(sId, r.sId))
return r.eType;
}
assert(false); // The id is not in TypeIdMap - something not in sync?