diff options
author | Takeshi Abe <tabe@fixedpoint.jp> | 2012-02-10 01:58:15 +0900 |
---|---|---|
committer | Takeshi Abe <tabe@fixedpoint.jp> | 2012-02-10 01:59:26 +0900 |
commit | e7e0455b0285f60ba999a0a6a831f3be271f5a37 (patch) | |
tree | 612248965d3b28720ae47d93c2ddf2dcd017e30e /sc/source | |
parent | ef09cbf45347f5f1ea34f35acedeea5aa3a7f6f6 (diff) |
Prefer equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("...")) to equalsAscii("...")
Diffstat (limited to 'sc/source')
-rw-r--r-- | sc/source/core/tool/interpr1.cxx | 20 | ||||
-rw-r--r-- | sc/source/filter/excel/xehelper.cxx | 6 | ||||
-rw-r--r-- | sc/source/filter/excel/xiescher.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/app/inputhdl.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/viewfun5.cxx | 2 |
6 files changed, 17 insertions, 17 deletions
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx index ac4886cb6e3e..e1eb8bddff0e 100644 --- a/sc/source/core/tool/interpr1.cxx +++ b/sc/source/core/tool/interpr1.cxx @@ -2330,11 +2330,11 @@ void ScInterpreter::ScCellExternal() ScCellKeywordTranslator::transKeyword(aInfoType, ScGlobal::GetLocale(), ocCell); ScExternalRefManager* pRefMgr = pDok->GetExternalRefManager(); - if (aInfoType.equalsAscii("COL")) + if (aInfoType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("COL"))) PushInt(nCol + 1); - else if (aInfoType.equalsAscii("ROW")) + else if (aInfoType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ROW"))) PushInt(nRow + 1); - else if (aInfoType.equalsAscii("SHEET")) + else if (aInfoType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("SHEET"))) { // For SHEET, No idea what number we should set, but let's always set // 1 if the external sheet exists, no matter what sheet. Excel does @@ -2344,7 +2344,7 @@ void ScInterpreter::ScCellExternal() else SetError(errNoName); } - else if (aInfoType.equalsAscii("ADDRESS")) + else if (aInfoType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ADDRESS"))) { // ODF 1.2 says we need to always display address using the ODF A1 grammar. ScTokenArray aArray; @@ -2355,7 +2355,7 @@ void ScInterpreter::ScCellExternal() aComp.CreateStringFromTokenArray(aStr); PushString(aStr); } - else if (aInfoType.equalsAscii("FILENAME")) + else if (aInfoType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FILENAME"))) { // 'file URI'#$SheetName @@ -2374,7 +2374,7 @@ void ScInterpreter::ScCellExternal() aBuf.append(aTabName); PushString(aBuf.makeStringAndClear()); } - else if (aInfoType.equalsAscii("CONTENTS")) + else if (aInfoType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CONTENTS"))) { switch (pToken->GetType()) { @@ -2391,7 +2391,7 @@ void ScInterpreter::ScCellExternal() PushString(ScGlobal::GetEmptyString()); } } - else if (aInfoType.equalsAscii("TYPE")) + else if (aInfoType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("TYPE"))) { sal_Unicode c = 'v'; switch (pToken->GetType()) @@ -2407,14 +2407,14 @@ void ScInterpreter::ScCellExternal() } PushString(rtl::OUString(c)); } - else if (aInfoType.equalsAscii("FORMAT")) + else if (aInfoType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("FORMAT"))) { String aFmtStr; sal_uLong nFmt = aFmt.mbIsSet ? aFmt.mnIndex : 0; getFormatString(pFormatter, nFmt, aFmtStr); PushString(aFmtStr); } - else if (aInfoType.equalsAscii("COLOR")) + else if (aInfoType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("COLOR"))) { // 1 = negative values are colored, otherwise 0 int nVal = 0; @@ -2425,7 +2425,7 @@ void ScInterpreter::ScCellExternal() } PushInt(nVal); } - else if(aInfoType.equalsAscii("PARENTHESES")) + else if(aInfoType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("PARENTHESES"))) { // 1 = format string contains a '(' character, otherwise 0 int nVal = 0; diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index c9146b7550dd..3e805feb4919 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -912,13 +912,13 @@ rtl::OUString lclEncodeDosUrl( rtl::OUString aOldUrl = rUrl; aBuf.append(EXC_URLSTART_ENCODED); - if (aOldUrl.getLength() > 2 && aOldUrl.copy(0,2).equalsAscii("\\\\")) + if (aOldUrl.getLength() > 2 && aOldUrl.copy(0,2).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("\\\\"))) { // UNC aBuf.append(EXC_URL_DOSDRIVE).append(sal_Unicode('@')); aOldUrl = aOldUrl.copy(2); } - else if (aOldUrl.getLength() > 2 && aOldUrl.copy(1,2).equalsAscii(":\\")) + else if (aOldUrl.getLength() > 2 && aOldUrl.copy(1,2).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(":\\"))) { // drive letter sal_Unicode cThisDrive = rBase.isEmpty() ? ' ' : rBase.getStr()[0]; @@ -935,7 +935,7 @@ rtl::OUString lclEncodeDosUrl( sal_Int32 nPos = -1; while((nPos = aOldUrl.indexOf('\\')) != -1) { - if (aOldUrl.copy(0,2).equalsAscii("..")) + if (aOldUrl.copy(0,2).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(".."))) // parent dir (NOTE: the MS-XLS spec doesn't mention this, and // Excel seems confused by this token). aBuf.append(EXC_URL_PARENTDIR); diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index d953fc1bcbba..ee1a37eef178 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -2833,7 +2833,7 @@ void XclImpPictureObj::DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal if( (rStrm.GetNextRecId() == EXC_ID3_IMGDATA) && rStrm.StartNextRecord() ) { // page background is stored as hidden picture with name "__BkgndObj" - if (IsHidden() && (GetObjName().equalsAscii("__BkgndObj"))) + if (IsHidden() && (GetObjName().equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("__BkgndObj")))) GetPageSettings().ReadImgData( rStrm ); else maGraphic = XclImpDrawing::ReadImgData( GetRoot(), rStrm ); diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx index fa102dd7d00c..5169b0144f14 100644 --- a/sc/source/ui/app/inputhdl.cxx +++ b/sc/source/ui/app/inputhdl.cxx @@ -1405,7 +1405,7 @@ void ScInputHandler::PasteManualTip() // (wenn wir mal Matrix-Konstanten haben, kann das geaendert werden) sal_Int32 nTipLen = aManualTip.getLength(); - if ( nTipLen && ( nTipLen < 3 || !aManualTip.copy( nTipLen-3 ).equalsAscii("...") ) ) + if ( nTipLen && ( nTipLen < 3 || !aManualTip.copy( nTipLen-3 ).equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("...")) ) ) { DataChanging(); // kann nicht neu sein diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 4c852db3d0ad..1fbc0678533d 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -1291,7 +1291,7 @@ void ScGridWindow::LaunchDataSelectMenu( SCCOL nCol, SCROW nRow, bool bDataSelec nSelPos = pFilterBox->GetEntryPos(rQueryStr); } } - else if (rEntry.eOp == SC_TOPVAL && rQueryStr.equalsAscii("10")) + else if (rEntry.eOp == SC_TOPVAL && rQueryStr.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("10"))) nSelPos = SC_AUTOFILTER_TOP10; else nSelPos = SC_AUTOFILTER_CUSTOM; diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx index 08dc06228a2e..fa305a570ab7 100644 --- a/sc/source/ui/view/viewfun5.cxx +++ b/sc/source/ui/view/viewfun5.cxx @@ -698,7 +698,7 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r if (aStrs.size() > 3) pExtra = &aStrs[3]; - if (pExtra && pExtra->equalsAscii("calc:extref")) + if (pExtra && pExtra->equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("calc:extref"))) { // Paste this as an external reference. Note that paste link always // uses Calc A1 syntax even when another formula syntax is specified |