diff options
author | Noel Grandin <noel@peralex.com> | 2013-12-09 12:51:35 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-12-09 12:53:18 +0200 |
commit | c5b7a5fd191a8ec65a64980fe3197832dba1ffae (patch) | |
tree | a4da3b16cd52626274819345cfbac480b04eef52 /sc | |
parent | aefd8ff742f8952327f1bddc37e62317d69ffb7d (diff) |
fix equalsAscii conversion. Noticed in fdo#72391
In commit 363cc397172f2b0a94d9c4dc44fc8d95072795a3
"convert equalsAsciiL calls to startWith calls where possible"
I incorrectly converted equalsAsciiL calls to startsWith calls.
This commit fixes those places to use the == OUString operator.
Change-Id: If76993baf73e3d8fb3bbcf6e8314e59fdc1207b6
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/tool/formulaopt.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xml/XMLTrackedChangesContext.cxx | 2 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlcvali.cxx | 4 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlexprt.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 32 |
5 files changed, 18 insertions, 26 deletions
diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx index 181f9d696f93..ebeece1086f7 100644 --- a/sc/source/core/tool/formulaopt.cxx +++ b/sc/source/core/tool/formulaopt.cxx @@ -73,7 +73,7 @@ void ScFormulaOptions::GetDefaultFormulaSeparators( const Locale& rLocale = *ScGlobal::GetLocale(); const OUString& rLang = rLocale.Language; - if (rLang.startsWith("ru")) + if (rLang == "ru") // Don't do automatic guess for these languages, and fall back to // the old separator set. return; @@ -97,7 +97,7 @@ void ScFormulaOptions::GetDefaultFormulaSeparators( cListSep = ','; // Special case for de_CH locale. - if (rLocale.Language.startsWith("de") && rLocale.Country.startsWith("CH")) + if (rLocale.Language == "de" && rLocale.Country == "CH") cListSep = ';'; // by default, the parameter separator equals the locale-specific diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx index db4b1ee3292f..e2af13224428 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.startsWith("cut_offs")) + else if (IsXMLToken(rLocalName, XML_CUT_OFFS) || rLocalName == "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 fc127f883242..92a2f8ddb74a 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.startsWith( "MacroName" ) || - aValues[i].Name.startsWith( "Script" ) ) + if ( aValues[i].Name == "MacroName" || + aValues[i].Name == "Script" ) { aValues[i].Value >>= sErrorTitle; break; diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 8fbeb8ab22ff..eadcd3b97042 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -2149,7 +2149,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.startsWith("Default") || nValidationIndex != -1) + if( sStyleName != "Default" || nValidationIndex != -1 ) { pSharedData->SetLastColumn(nTable, pAddresses->EndColumn); pSharedData->SetLastRow(nTable, pAddresses->EndRow); diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index 08996c469175..d0e030ce5786 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -2761,36 +2761,28 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode ) if ( pAuto ) { OUString aReplace(pAuto->GetStartDoubleQuote()); - if (aReplace.isEmpty()) + if( aReplace.isEmpty() ) aReplace = ScGlobal::pLocaleData->getDoubleQuotationMarkStart(); - if (!aReplace.startsWith("\"")) - aString = aString.replaceAll( - aReplace, - OUString("\"")); + if( aReplace != "\"" ) + aString = aString.replaceAll( aReplace, "\"" ); aReplace = OUString(pAuto->GetEndDoubleQuote()); - if (aReplace.isEmpty()) + if( aReplace.isEmpty() ) aReplace = ScGlobal::pLocaleData->getDoubleQuotationMarkEnd(); - if (!aReplace.startsWith("\"")) - aString = aString.replaceAll( - aReplace, - OUString("\"")); + if( aReplace != "\"" ) + aString = aString.replaceAll( aReplace, "\"" ); aReplace = OUString(pAuto->GetStartSingleQuote()); - if (aReplace.isEmpty()) + if( aReplace.isEmpty() ) aReplace = ScGlobal::pLocaleData->getQuotationMarkStart(); - if (!aReplace.startsWith("'")) - aString = aString.replaceAll( - aReplace, - OUString("'")); + if( aReplace != "'" ) + aString = aString.replaceAll( aReplace, "'" ); aReplace = OUString(pAuto->GetEndSingleQuote()); - if (aReplace.isEmpty()) + if( aReplace.isEmpty() ) aReplace = ScGlobal::pLocaleData->getQuotationMarkEnd(); - if (!aReplace.startsWith("'")) - aString = aString.replaceAll( - aReplace, - OUString("'")); + if( aReplace != "'" ) + aString = aString.replaceAll( aReplace, "'"); } } |