summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-19 12:47:37 +0200
committerNoel Grandin <noel@peralex.com>2013-11-19 12:49:29 +0200
commit363cc397172f2b0a94d9c4dc44fc8d95072795a3 (patch)
tree16a23a796e2db536d7af3f0144bce8fd01570e26 /sc/source/filter
parent02a2203580226766c4b3b8778430774ff76f90e9 (diff)
convert equalsAsciiL calls to startWith calls where possible
Simplify code like: aStr.equalsAsciiL( "%", 1 ) to aStr.startsWith( "%" ) Change-Id: Iee0e4e60b0ae6d567fa8f72db5d616fffbec3c00
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/xml/XMLTrackedChangesContext.cxx2
-rw-r--r--sc/source/filter/xml/xmlcvali.cxx4
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx2
3 files changed, 4 insertions, 4 deletions
diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
index fd189ffd46bd..db4b1ee3292f 100644
--- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx
+++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx
@@ -1816,7 +1816,7 @@ SvXMLImportContext *ScXMLDeletionContext::CreateChildContext( sal_uInt16 nPrefix
pContext = new ScXMLDependingsContext(GetScImport(), nPrefix, rLocalName, xAttrList, pChangeTrackingImportHelper);
else if (IsXMLToken(rLocalName, XML_DELETIONS))
pContext = new ScXMLDeletionsContext(GetScImport(), nPrefix, rLocalName, xAttrList, pChangeTrackingImportHelper);
- else if (IsXMLToken(rLocalName, XML_CUT_OFFS) || rLocalName.equalsAsciiL("cut_offs", 8))
+ else if (IsXMLToken(rLocalName, XML_CUT_OFFS) || rLocalName.startsWith("cut_offs"))
pContext = new ScXMLCutOffsContext(GetScImport(), nPrefix, rLocalName, xAttrList, pChangeTrackingImportHelper);
else
{
diff --git a/sc/source/filter/xml/xmlcvali.cxx b/sc/source/filter/xml/xmlcvali.cxx
index bc55a0b508a0..fc127f883242 100644
--- a/sc/source/filter/xml/xmlcvali.cxx
+++ b/sc/source/filter/xml/xmlcvali.cxx
@@ -427,8 +427,8 @@ void ScXMLContentValidationContext::EndElement()
for( sal_Int32 i = 0; i < nLength; i++ )
{
// #i47525# must allow "MacroName" or "Script"
- if ( aValues[i].Name.equalsAsciiL( "MacroName", sizeof("MacroName")-1 ) ||
- aValues[i].Name.equalsAsciiL( "Script", sizeof("Script")-1 ) )
+ if ( aValues[i].Name.startsWith( "MacroName" ) ||
+ aValues[i].Name.startsWith( "Script" ) )
{
aValues[i].Value >>= sErrorTitle;
break;
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index aa134fda54e0..5ed08dfa70f6 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -2148,7 +2148,7 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x
if (bGetMerge)
bGetMerge = GetMerged(pAddresses, xTable);
pCellStyles->AddRangeStyleName(*pAddresses, nIndex, false, nValidationIndex, nNumberFormat);
- if (!sStyleName.equalsAsciiL("Default", 7) || nValidationIndex != -1)
+ if (!sStyleName.startsWith("Default") || nValidationIndex != -1)
{
pSharedData->SetLastColumn(nTable, pAddresses->EndColumn);
pSharedData->SetLastRow(nTable, pAddresses->EndRow);