can use direct operator[] variants

This commit is contained in:
Caolán McNamara
2012-02-10 11:08:51 +00:00
parent 9c19e79f19
commit 39bfd6c0bc

View File

@@ -349,7 +349,7 @@ void ScDocShell::AfterXMLLoading(sal_Bool bRet)
xub_StrLen nIndex = nNameLength - nLinkTabNameLength; xub_StrLen nIndex = nNameLength - nLinkTabNameLength;
INetURLObject aINetURLObject(aDocURLBuffer.makeStringAndClear()); INetURLObject aINetURLObject(aDocURLBuffer.makeStringAndClear());
if( String(aName).Equals(String(aLinkTabName), nIndex, nLinkTabNameLength) && if( String(aName).Equals(String(aLinkTabName), nIndex, nLinkTabNameLength) &&
(aName.getStr()[nIndex - 1] == '#') && // before the table name should be the # char (aName[nIndex - 1] == '#') && // before the table name should be the # char
!aINetURLObject.HasError()) // the docname should be a valid URL !aINetURLObject.HasError()) // the docname should be a valid URL
{ {
aName = ScGlobal::GetDocTabName( aDocument.GetLinkDoc( i ), aDocument.GetLinkTab( i ) ); aName = ScGlobal::GetDocTabName( aDocument.GetLinkDoc( i ), aDocument.GetLinkTab( i ) );
@@ -1947,9 +1947,9 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
rtl::OUString aUniString = aString;//remove that later rtl::OUString aUniString = aString;//remove that later
if (!bString && cStrDelim != 0 && !aUniString.isEmpty()) if (!bString && cStrDelim != 0 && !aUniString.isEmpty())
{ {
sal_Unicode c = aUniString.getStr()[0]; sal_Unicode c = aUniString[0];
bString = (c == cStrDelim || c == ' ' || bString = (c == cStrDelim || c == ' ' ||
aUniString.getStr()[aUniString.getLength()-1] == ' ' || aUniString[aUniString.getLength()-1] == ' ' ||
aUniString.indexOf(cStrDelim) >= 0); aUniString.indexOf(cStrDelim) >= 0);
if (!bString && cDelim != 0) if (!bString && cDelim != 0)
bString = (aUniString.indexOf(cDelim) >= 0); bString = (aUniString.indexOf(cDelim) >= 0);