[Libreoffice-commits] core.git: basctl/source codemaker/source comphelper/source connectivity/source cppuhelper/source cui/source dbaccess/source editeng/source extensions/source filter/source forms/source framework/source i18npool/qa i18npool/source idlc/source include/rtl linguistic/source package/source reportdesign/source sal/osl scripting/source sc/source sdext/source sd/source sfx2/source svl/source svtools/source svx/source sw/source toolkit/source tools/source ucb/source unotest/source uui/source vcl/generic vcl/source vcl/unx writerfilter/source xmloff/source
Noel Grandin
noel at peralex.com
Mon Nov 4 07:07:13 CET 2013
basctl/source/basicide/bastypes.cxx | 4 +-
basctl/source/basicide/localizationmgr.cxx | 4 +-
codemaker/source/codemaker/global.cxx | 8 ++--
comphelper/source/misc/accessibletexthelper.cxx | 2 -
comphelper/source/misc/docpasswordhelper.cxx | 2 -
comphelper/source/misc/storagehelper.cxx | 2 -
comphelper/source/officeinstdir/officeinstallationdirectories.cxx | 4 --
connectivity/source/commontools/predicateinput.cxx | 10 ++---
connectivity/source/drivers/file/FDatabaseMetaData.cxx | 2 -
connectivity/source/drivers/file/FStringFunctions.cxx | 2 -
connectivity/source/drivers/postgresql/pq_databasemetadata.cxx | 2 -
connectivity/source/drivers/postgresql/pq_tools.cxx | 2 -
cppuhelper/source/unourl.cxx | 4 +-
cui/source/dialogs/thesdlg.cxx | 3 -
cui/source/tabpages/numpages.cxx | 6 +--
dbaccess/source/core/recovery/dbdocrecovery.cxx | 6 +--
dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx | 2 -
editeng/source/editeng/textconv.cxx | 2 -
extensions/source/plugin/base/nfuncs.cxx | 4 +-
extensions/source/propctrlr/standardcontrol.cxx | 2 -
filter/source/msfilter/rtfutil.cxx | 2 -
filter/source/placeware/tempfile.cxx | 2 -
forms/source/component/clickableimage.cxx | 2 -
framework/source/xml/imagesdocumenthandler.cxx | 11 ++---
i18npool/qa/cppunit/test_breakiterator.cxx | 4 +-
i18npool/source/characterclassification/cclass_unicode_parser.cxx | 4 +-
i18npool/source/localedata/LocaleNode.cxx | 6 +--
idlc/source/idlcmain.cxx | 4 +-
include/rtl/ustrbuf.hxx | 15 +++++++
linguistic/source/hhconvdic.cxx | 2 -
linguistic/source/misc.cxx | 8 ++--
package/source/manifest/ManifestImport.cxx | 2 -
reportdesign/source/core/misc/conditionalexpression.cxx | 2 -
reportdesign/source/core/sdr/formatnormalizer.cxx | 2 -
sal/osl/unx/uunxapi.cxx | 12 +++---
sc/source/core/data/column3.cxx | 4 +-
sc/source/core/tool/chgtrack.cxx | 2 -
sc/source/core/tool/formulaopt.cxx | 4 +-
sc/source/filter/excel/xehelper.cxx | 4 +-
sc/source/filter/excel/xeroot.cxx | 2 -
sc/source/filter/excel/xistream.cxx | 2 -
sc/source/filter/excel/xltools.cxx | 2 -
sc/source/ui/app/inputhdl.cxx | 14 +++----
sc/source/ui/optdlg/tpformula.cxx | 2 -
sc/source/ui/view/output2.cxx | 2 -
scripting/source/stringresource/stringresource.cxx | 6 +--
sd/source/filter/eppt/pptexanimations.cxx | 2 -
sd/source/filter/ppt/pptinanimations.cxx | 2 -
sd/source/ui/unoidl/unosrch.cxx | 4 +-
sdext/source/pdfimport/pdfparse/pdfentries.cxx | 6 +--
sdext/source/presenter/PresenterTextView.cxx | 2 -
sfx2/source/view/viewfrm.cxx | 2 -
svl/source/passwordcontainer/passwordcontainer.cxx | 2 -
svtools/source/svrtf/rtfout.cxx | 2 -
svx/source/dialog/svxbmpnumvalueset.cxx | 8 +---
svx/source/fmcomp/dbaexchange.cxx | 2 -
svx/source/sidebar/nbdtmg.cxx | 18 ++++-----
sw/source/core/access/accpara.cxx | 2 -
sw/source/core/access/accportions.cxx | 2 -
sw/source/core/unocore/unoobj.cxx | 20 +++++-----
sw/source/ui/lingu/hhcwrp.cxx | 2 -
toolkit/source/helper/formpdfexport.cxx | 2 -
tools/source/fsys/urlobj.cxx | 7 +--
ucb/source/core/ucb.cxx | 2 -
ucb/source/core/ucbstore.cxx | 2 -
ucb/source/ucp/ext/ucpext_content.cxx | 6 +--
ucb/source/ucp/ext/ucpext_datasupplier.cxx | 4 +-
ucb/source/ucp/file/shell.cxx | 6 +--
ucb/source/ucp/hierarchy/hierarchydata.cxx | 2 -
ucb/source/ucp/hierarchy/hierarchyuri.cxx | 6 +--
ucb/source/ucp/package/pkguri.cxx | 12 ++----
ucb/source/ucp/tdoc/tdoc_content.cxx | 4 +-
ucb/source/ucp/tdoc/tdoc_storage.cxx | 2 -
ucb/source/ucp/tdoc/tdoc_uri.cxx | 6 +--
ucb/source/ucp/webdav-neon/ContentProperties.cxx | 3 -
ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx | 7 +--
ucb/source/ucp/webdav-neon/webdavprovider.cxx | 4 --
ucb/source/ucp/webdav/ContentProperties.cxx | 3 -
ucb/source/ucp/webdav/webdavdatasupplier.cxx | 7 +--
ucb/source/ucp/webdav/webdavprovider.cxx | 4 --
unotest/source/cpp/filters-test.cxx | 2 -
uui/source/iahndl.cxx | 5 +-
vcl/generic/fontmanager/fontmanager.cxx | 3 -
vcl/source/gdi/pdfwriter_impl2.cxx | 2 -
vcl/unx/generic/printer/ppdparser.cxx | 2 -
writerfilter/source/dmapper/DomainMapper_Impl.cxx | 6 +--
writerfilter/source/dmapper/NumberingManager.cxx | 2 -
writerfilter/source/rtftok/rtfdocumentimpl.cxx | 2 -
xmloff/source/core/xmlexp.cxx | 2 -
xmloff/source/forms/elementimport.cxx | 6 +--
xmloff/source/text/txtfldi.cxx | 2 -
xmloff/source/xforms/XFormsBindContext.cxx | 2 -
92 files changed, 188 insertions(+), 208 deletions(-)
New commits:
commit 0e6a2601b39cbadaff7f7506ba9e804f108060db
Author: Noel Grandin <noel at peralex.com>
Date: Wed Oct 23 13:29:32 2013 +0200
Convert code that calls OUString::getStr()[] to use the [] operator
This also means that this code now gets bounds checked in debug builds.
Change-Id: Id777f85eaee6a737bbcb84625e6e110abe0e0f27
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 4339166..98a9f62 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -684,8 +684,8 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, bool bEra
{
sal_Int32 n = nStartPos;
sal_Int32 nLen = rStr.getLength();
- while ( ( n < nLen ) && ( rStr.getStr()[ n ] == LINE_SEP ||
- rStr.getStr()[ n ] == LINE_SEP_CR ) )
+ while ( ( n < nLen ) && ( rStr[ n ] == LINE_SEP ||
+ rStr[ n ] == LINE_SEP_CR ) )
{
n++;
}
diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx
index dfbbfaa..2812387 100644
--- a/basctl/source/basicide/localizationmgr.cxx
+++ b/basctl/source/basicide/localizationmgr.cxx
@@ -235,7 +235,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
// Replace string by id, add id+string to StringResource
if( eMode == SET_IDS )
{
- bool bEscAlreadyExisting = (!aPropStr.isEmpty() && aPropStr.getStr()[0] == '&' );
+ bool bEscAlreadyExisting = aPropStr.startsWith("&");
if( bEscAlreadyExisting )
continue;
@@ -425,7 +425,7 @@ sal_Int32 LocalizationMgr::implHandleControlResourceProperties
for ( i = 0; i < nPropStringCount; ++i )
{
OUString aPropStr = pPropStrings[i];
- bool bEscAlreadyExisting = (!aPropStr.isEmpty() && aPropStr.getStr()[0] == '&' );
+ bool bEscAlreadyExisting = aPropStr.startsWith("&");
if( bEscAlreadyExisting )
{
pIdStrings[i] = aPropStr;
diff --git a/codemaker/source/codemaker/global.cxx b/codemaker/source/codemaker/global.cxx
index bfe77c4..d6c5a0f 100644
--- a/codemaker/source/codemaker/global.cxx
+++ b/codemaker/source/codemaker/global.cxx
@@ -87,10 +87,10 @@ OString createFileNameFromType( const OString& destination,
length += prefix.getLength() + type.getLength() + postfix.getLength();
sal_Bool withSeparator = sal_False;
- if (destination.getStr()[destination.getLength()] != '\\' &&
- destination.getStr()[destination.getLength()] != '/' &&
- type.getStr()[0] != '\\' &&
- type.getStr()[0] != '/')
+ if (destination[destination.getLength()] != '\\' &&
+ destination[destination.getLength()] != '/' &&
+ type[0] != '\\' &&
+ type[0] != '/')
{
length++;
withSeparator = sal_True;
diff --git a/comphelper/source/misc/accessibletexthelper.cxx b/comphelper/source/misc/accessibletexthelper.cxx
index a724fdf..224a81a 100644
--- a/comphelper/source/misc/accessibletexthelper.cxx
+++ b/comphelper/source/misc/accessibletexthelper.cxx
@@ -241,7 +241,7 @@ namespace comphelper
if ( !implIsValidIndex( nIndex, sText.getLength() ) )
throw IndexOutOfBoundsException();
- return sText.getStr()[nIndex];
+ return sText[nIndex];
}
// -----------------------------------------------------------------------------
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx
index 1cf9775..6f177e6 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -222,7 +222,7 @@ sal_uInt16 DocPasswordHelper::GetXLHashAsUINT16(
for ( sal_Int32 nInd = aString.getLength() - 1; nInd >= 0; nInd-- )
{
nResult = ( ( nResult >> 14 ) & 0x01 ) | ( ( nResult << 1 ) & 0x7FFF );
- nResult ^= aString.getStr()[nInd];
+ nResult ^= aString[nInd];
}
nResult = ( ( nResult >> 14 ) & 0x01 ) | ( ( nResult << 1 ) & 0x7FFF );
diff --git a/comphelper/source/misc/storagehelper.cxx b/comphelper/source/misc/storagehelper.cxx
index 1b37148..a4f36e8 100644
--- a/comphelper/source/misc/storagehelper.cxx
+++ b/comphelper/source/misc/storagehelper.cxx
@@ -490,7 +490,7 @@ sal_Bool OStorageHelper::PathHasSegment( const OUString& aPath, const OUString&
if ( !bResult && !aPath.compareTo( aSegment, nSegLen ) )
{
- if ( nPathLen == nSegLen || aPath.getStr()[nSegLen] == (sal_Unicode)'/' )
+ if ( nPathLen == nSegLen || aPath[nSegLen] == '/' )
bResult = sal_True;
}
diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
index e5962c7..d486769 100644
--- a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
+++ b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
@@ -67,9 +67,7 @@ static bool makeCanonicalFileURL( OUString & rURL )
if ( !aNormalizedURL.isEmpty() )
{
- if ( aNormalizedURL
- .getStr()[ aNormalizedURL.getLength() - 1 ]
- != sal_Unicode( '/' ) )
+ if ( !aNormalizedURL.endsWith("/") )
rURL = aNormalizedURL;
else
rURL = aNormalizedURL
diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx
index 82d1702..f27bc14 100644
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@ -67,7 +67,7 @@ namespace dbtools
sal_Unicode nReturn( _nFallback );
if ( !_rSeparator.isEmpty() )
- nReturn = static_cast< sal_Char >( _rSeparator.getStr()[0] );
+ nReturn = static_cast< sal_Char >( _rSeparator[0] );
return nReturn;
}
@@ -150,8 +150,8 @@ namespace dbtools
{ // yes -> force a quoted text and try again
OUString sQuoted( _rStatement );
if ( !sQuoted.isEmpty()
- && ( (sQuoted.getStr()[0] != '\'')
- || (sQuoted.getStr()[ sQuoted.getLength() - 1 ] != '\'' )
+ && ( !sQuoted.startsWith("'")
+ || !sQuoted.endsWith("'")
)
)
{
@@ -296,9 +296,7 @@ namespace dbtools
// '-characters to the text. If we would give this to predicateTree this would add
// two additional '-characters which we don't want. So check the field format.
// FS - 06.01.00 - 71532
- sal_Bool bValidQuotedText = ( sValue.getLength() >= 2 )
- && ( sValue.getStr()[0] == '\'' )
- && ( sValue.getStr()[ sValue.getLength() - 1 ] == '\'' );
+ sal_Bool bValidQuotedText = sValue.startsWith("'") && sValue.endsWith("'");
// again : as normalizePredicateString always did a conversion on the value text,
// bValidQuotedText == sal_True implies that we have a text field, as no other field
// values will be formatted with the quote characters
diff --git a/connectivity/source/drivers/file/FDatabaseMetaData.cxx b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
index 3e26231..a70e588 100644
--- a/connectivity/source/drivers/file/FDatabaseMetaData.cxx
+++ b/connectivity/source/drivers/file/FDatabaseMetaData.cxx
@@ -290,7 +290,7 @@ Reference< XResultSet > SAL_CALL ODatabaseMetaData::getTables(
{
if (aURL.getExtension().isEmpty())
{
- sal_Unicode nChar = aURL.getBase().getStr()[0];
+ sal_Unicode nChar = aURL.getBase()[0];
if(match(tableNamePattern,aURL.getBase(),'\0') && ( !bCheckEnabled || ( bCheckEnabled && ((nChar < '0' || nChar > '9')))) )
{
aRow.push_back(new ORowSetValueDecorator(OUString(aURL.getBase())));
diff --git a/connectivity/source/drivers/file/FStringFunctions.cxx b/connectivity/source/drivers/file/FStringFunctions.cxx
index acac9ac..a5cf7ce 100644
--- a/connectivity/source/drivers/file/FStringFunctions.cxx
+++ b/connectivity/source/drivers/file/FStringFunctions.cxx
@@ -160,7 +160,7 @@ ORowSetValue OOp_RTrim::operate(const ORowSetValue& lhs) const
OUString sRet = lhs;
OUString sNew = sRet.trim();
- return sRet.copy(0,sRet.lastIndexOf(sNew.getStr()[sNew.getLength()-1])+1);
+ return sRet.copy(0,sRet.lastIndexOf(sNew[sNew.getLength()-1])+1);
}
//------------------------------------------------------------------
ORowSetValue OOp_Space::operate(const ORowSetValue& lhs) const
diff --git a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
index d4c9ea1..295784f 100644
--- a/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
+++ b/connectivity/source/drivers/postgresql/pq_databasemetadata.cxx
@@ -1807,7 +1807,7 @@ static void columnMetaData2DatabaseTypeDescription(
i++;
int start = i;
while( array[i] && array[i] != '}' && array[i] != ',' ) i++;
- row[3] <<= OUString( &array.getStr()[start], i - start );
+ row[3] <<= array.copy(start, i - start );
vec.push_back( row );
}
}
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index 79f383c..ed7e514 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -363,7 +363,7 @@ OUString extractTableFromInsert( const OUString & sql )
}
}
}
- ret = OUString( &sql.getStr()[start], i - start ).trim();
+ ret = sql.copy(start, i - start ).trim();
// printf( "pq_statement: parsed table name %s from insert\n" ,
// OUStringToOString( ret, RTL_TEXTENCODING_ASCII_US).getStr() );
}
diff --git a/cppuhelper/source/unourl.cxx b/cppuhelper/source/unourl.cxx
index c5981f9..a9aa133 100644
--- a/cppuhelper/source/unourl.cxx
+++ b/cppuhelper/source/unourl.cxx
@@ -72,7 +72,7 @@ inline UnoUrlDescriptor::Impl::Impl(rtl::OUString const & rDescriptor)
for (sal_Int32 i = 0;; ++i)
{
bool bEnd = i == rDescriptor.getLength();
- sal_Unicode c = bEnd ? 0 : rDescriptor.getStr()[i];
+ sal_Unicode c = bEnd ? 0 : rDescriptor[i];
switch (eState)
{
case STATE_NAME0:
@@ -236,7 +236,7 @@ inline UnoUrl::Impl * UnoUrl::Impl::create(rtl::OUString const & rUrl)
rtl::OUString("UNO URL contains empty ObjectName"));
for (j = i; j < rUrl.getLength(); ++j)
{
- sal_Unicode c = rUrl.getStr()[j];
+ sal_Unicode c = rUrl[j];
if (!isAlphanum(c) && c != 0x21 && c != 0x24 // '!', '$'
&& c != 0x26 && c != 0x27 && c != 0x28 // '&', ''', '('
&& c != 0x28 && c != 0x2A && c != 0x2B // ')', '*', '+'
diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx
index 6157c74..6ae616a 100644
--- a/cui/source/dialogs/thesdlg.cxx
+++ b/cui/source/dialogs/thesdlg.cxx
@@ -271,8 +271,7 @@ uno::Sequence< uno::Reference< linguistic2::XMeaning > > SvxThesaurusDialog::que
xThesaurus->queryMeanings( rTerm, rLocale, rProperties ) );
// text with '.' at the end?
- if ( 0 == aMeanings.getLength() && !rTerm.isEmpty() &&
- rTerm.getStr()[ rTerm.getLength() - 1 ] == '.')
+ if ( 0 == aMeanings.getLength() && rTerm.endsWith(".") )
{
// try again without trailing '.' chars. It may be a word at the
// end of a sentence and not an abbreviation...
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 6b21a99..d646da2 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -320,8 +320,8 @@ IMPL_LINK_NOARG(SvxSingleNumPickTabPage, NumSelectHdl_Impl)
return 0;
SvxNumSettings_Impl* _pSet = &aNumSettingsArr[nIdx];
sal_Int16 eNewType = _pSet->nNumberType;
- const sal_Unicode cLocalPrefix = !_pSet->sPrefix.isEmpty() ? _pSet->sPrefix.getStr()[0] : 0;
- const sal_Unicode cLocalSuffix = !_pSet->sSuffix.isEmpty() ? _pSet->sSuffix.getStr()[0] : 0;
+ const sal_Unicode cLocalPrefix = !_pSet->sPrefix.isEmpty() ? _pSet->sPrefix[0] : 0;
+ const sal_Unicode cLocalSuffix = !_pSet->sSuffix.isEmpty() ? _pSet->sSuffix[0] : 0;
sal_uInt16 nMask = 1;
for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++)
@@ -730,7 +730,7 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl)
aFmt.SetBulletFont( &rActBulletFont );
aFmt.SetBulletChar( !pLevelSettings->sBulletChar.isEmpty()
- ? pLevelSettings->sBulletChar.getStr()[0]
+ ? pLevelSettings->sBulletChar[0]
: 0 );
aFmt.SetCharFmtName( sBulletCharFmtName );
// #62069# // #92724#
diff --git a/dbaccess/source/core/recovery/dbdocrecovery.cxx b/dbaccess/source/core/recovery/dbdocrecovery.cxx
index 312a686..f3de5eb 100644
--- a/dbaccess/source/core/recovery/dbdocrecovery.cxx
+++ b/dbaccess/source/core/recovery/dbdocrecovery.cxx
@@ -102,7 +102,7 @@ namespace dbaccess
return false;
}
o_rCompDesc.sName = i_rIniLine.copy( nEqualSignPos + 1, nCommaPos - nEqualSignPos - 1 );
- o_rCompDesc.bForEditing = ( i_rIniLine.getStr()[ nCommaPos + 1 ] == '1' );
+ o_rCompDesc.bForEditing = ( i_rIniLine[ nCommaPos + 1 ] == '1' );
return true;
}
@@ -152,7 +152,7 @@ namespace dbaccess
static bool lcl_isSectionStart( const OUString& i_rIniLine, OUString& o_rSectionName )
{
const sal_Int32 nLen = i_rIniLine.getLength();
- if ( ( nLen > 0 ) && ( i_rIniLine.getStr()[0] == '[' ) && ( i_rIniLine.getStr()[ nLen - 1 ] == ']' ) )
+ if ( i_rIniLine.startsWith("[") && i_rIniLine.endsWith("]") )
{
o_rSectionName = i_rIniLine.copy( 1, nLen -2 );
return true;
@@ -163,7 +163,7 @@ namespace dbaccess
static void lcl_stripTrailingLineFeed( OUString& io_rLine )
{
const sal_Int32 nLen = io_rLine.getLength();
- if ( ( nLen > 0 ) && ( io_rLine.getStr()[ nLen - 1 ] == '\n' ) )
+ if ( io_rLine.endsWith("\n") )
io_rLine = io_rLine.copy( 0, nLen - 1 );
}
diff --git a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
index 24f5795..126dbe8 100644
--- a/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
+++ b/dbaccess/source/filter/xml/xmlFileBasedDatabase.cxx
@@ -73,7 +73,7 @@ OXMLFileBasedDatabase::OXMLFileBasedDatabase( ODBFilter& rImport,
if ( sValue == sFileName )
{
const sal_Int32 nFileNameLength = sFileName.getLength();
- if ( ( nFileNameLength > 0 ) && ( sFileName.getStr()[ nFileNameLength - 1 ] == '/' ) )
+ if ( sFileName.endsWith("/") )
sFileName = sFileName.copy( 0, nFileNameLength - 1 );
sLocation = ::svt::OFileNotation( rImport.GetAbsoluteReference( sFileName ) ).get( ::svt::OFileNotation::N_SYSTEM );
diff --git a/editeng/source/editeng/textconv.cxx b/editeng/source/editeng/textconv.cxx
index 00ba1e6..1fb5848 100644
--- a/editeng/source/editeng/textconv.cxx
+++ b/editeng/source/editeng/textconv.cxx
@@ -483,7 +483,7 @@ void TextConvWrapper::ChangeText( const OUString &rNewText,
nIndex = static_cast< xub_StrLen >( rOrigText.getLength() );
}
- if (rOrigText.getStr()[nIndex] == rNewText[nPos] ||
+ if (rOrigText[nIndex] == rNewText[nPos] ||
nPos == nConvTextLen /* end of string also terminates non-matching char sequence */)
{
// substring that needs to be replaced found?
diff --git a/extensions/source/plugin/base/nfuncs.cxx b/extensions/source/plugin/base/nfuncs.cxx
index f827026..d56e02a 100644
--- a/extensions/source/plugin/base/nfuncs.cxx
+++ b/extensions/source/plugin/base/nfuncs.cxx
@@ -146,13 +146,13 @@ static OString normalizeURL( XPlugin_Impl* plugin, const OString& url )
int nPos;
if( ( nPos = aLoadURL.indexOf( "://" ) ) != -1 )
{
- if( !url.isEmpty() && (url.getStr()[ 0 ] == '/' || url.indexOf( '/' ) != -1) )
+ if( url.indexOf( '/' ) != -1 )
{
// this means same server but new path
nPos = aLoadURL.indexOf( '/', nPos+3 );
if( nPos != -1 )
- aLoadURL = aLoadURL.copy( 0, url.getStr()[0] == '/' ? nPos : nPos+1 );
+ aLoadURL = aLoadURL.copy( 0, url.startsWith("/") ? nPos : nPos+1 );
}
else
{
diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx
index 61c2c0e..395b564 100644
--- a/extensions/source/propctrlr/standardcontrol.cxx
+++ b/extensions/source/propctrlr/standardcontrol.cxx
@@ -204,7 +204,7 @@ namespace pcr
if ( m_bIsPassword )
{
if ( !sText.isEmpty() )
- aPropValue <<= (sal_Int16)sText.getStr()[0];
+ aPropValue <<= (sal_Int16)sText[0];
}
else
aPropValue <<= sText;
diff --git a/filter/source/msfilter/rtfutil.cxx b/filter/source/msfilter/rtfutil.cxx
index 4c21c3a..5471456 100644
--- a/filter/source/msfilter/rtfutil.cxx
+++ b/filter/source/msfilter/rtfutil.cxx
@@ -97,7 +97,7 @@ OString OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEnc, bool* pS
for (sal_Int32 nI = 0; nI < nLen; ++nI)
{
aBuf.append("\\'");
- aBuf.append(OutHex(sConverted.getStr()[nI], 2));
+ aBuf.append(OutHex(sConverted[nI], 2));
}
}
}
diff --git a/filter/source/placeware/tempfile.cxx b/filter/source/placeware/tempfile.cxx
index faa8b56..1a40047 100644
--- a/filter/source/placeware/tempfile.cxx
+++ b/filter/source/placeware/tempfile.cxx
@@ -141,7 +141,7 @@ OUString PlaceWareTempFile::createTempFileURL()
{
u %= (nRadix*nRadix*nRadix);
OUString aTmp( aTempDirURL );
- if( aTmp.getStr()[ aTmp.getLength() - 1 ] != sal_Unicode( '/' ) )
+ if( !aTmp.endsWith("/") )
aTmp += "/";
aTmp += OUString::number( (unsigned) u, nRadix );
aTmp += ".tmp";
diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx
index df1dd01..63bf2d7 100644
--- a/forms/source/component/clickableimage.cxx
+++ b/forms/source/component/clickableimage.cxx
@@ -271,7 +271,7 @@ namespace frm
aURL.Complete =
getString(xSet->getPropertyValue(PROPERTY_TARGET_URL));
- if (!aURL.Complete.isEmpty() && (LOCAL_URL_PREFIX == aURL.Complete.getStr()[0]))
+ if (!aURL.Complete.isEmpty() && (LOCAL_URL_PREFIX == aURL.Complete[0]))
{ // the URL contains a local URL only. Since the URLTransformer does not handle this case correctly
// (it can't: it does not know the document URL), we have to take care for this ourself.
// The real solution would be to not allow such relative URLs (there is a rule that at runtime, all
diff --git a/framework/source/xml/imagesdocumenthandler.cxx b/framework/source/xml/imagesdocumenthandler.cxx
index 2280126..ec14d8f 100644
--- a/framework/source/xml/imagesdocumenthandler.cxx
+++ b/framework/source/xml/imagesdocumenthandler.cxx
@@ -227,15 +227,12 @@ throw( SAXException, RuntimeException )
{
OUString aColor = xAttribs->getValueByIndex( n );
- if ( !aColor.isEmpty() )
+ if ( aColor.startsWith("#") )
{
- if ( aColor.getStr()[0] == '#' )
- {
- // the color value is given as #rrggbb and used the hexadecimal system!!
- sal_uInt32 nColor = aColor.copy( 1 ).toUInt32( 16 );
+ // the color value is given as #rrggbb and used the hexadecimal system!!
+ sal_uInt32 nColor = aColor.copy( 1 ).toUInt32( 16 );
- m_pImages->aMaskColor = Color( COLORDATA_RGB( nColor ) );
- }
+ m_pImages->aMaskColor = Color( COLORDATA_RGB( nColor ) );
}
}
break;
diff --git a/i18npool/qa/cppunit/test_breakiterator.cxx b/i18npool/qa/cppunit/test_breakiterator.cxx
index 6e8b288..59b6d4c 100644
--- a/i18npool/qa/cppunit/test_breakiterator.cxx
+++ b/i18npool/qa/cppunit/test_breakiterator.cxx
@@ -739,7 +739,7 @@ void TestBreakIterator::testWeak()
sal_Int16 nScript = m_xBreak->getScriptType(aWeaks, i);
OStringBuffer aMsg;
aMsg.append(RTL_CONSTASCII_STRINGPARAM("Char 0x"));
- aMsg.append(static_cast<sal_Int32>(aWeaks.getStr()[i]), 16);
+ aMsg.append(static_cast<sal_Int32>(aWeaks[i]), 16);
aMsg.append(RTL_CONSTASCII_STRINGPARAM(" should have been weak"));
CPPUNIT_ASSERT_MESSAGE(aMsg.getStr(),
nScript == i18n::ScriptType::WEAK);
@@ -778,7 +778,7 @@ void TestBreakIterator::testAsian()
sal_Int16 nScript = m_xBreak->getScriptType(aAsians, i);
OStringBuffer aMsg;
aMsg.append(RTL_CONSTASCII_STRINGPARAM("Char 0x"));
- aMsg.append(static_cast<sal_Int32>(aAsians.getStr()[i]), 16);
+ aMsg.append(static_cast<sal_Int32>(aAsians[i]), 16);
aMsg.append(RTL_CONSTASCII_STRINGPARAM(" should have been asian"));
CPPUNIT_ASSERT_MESSAGE(aMsg.getStr(),
nScript == i18n::ScriptType::ASIAN);
diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
index adf9737..2c372eb 100644
--- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx
+++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
@@ -458,8 +458,8 @@ void cclass_Unicode::initParserTable( const Locale& rLocale, sal_Int32 startChar
mxLocaleData->getLocaleItem( aParserLocale );
//!TODO: theoretically separators may be a string, adjustment would have to be
//! done here and in parsing and in ::rtl::math::stringToDouble()
- cGroupSep = aItem.thousandSeparator.getStr()[0];
- cDecimalSep = aItem.decimalSeparator.getStr()[0];
+ cGroupSep = aItem.thousandSeparator[0];
+ cDecimalSep = aItem.decimalSeparator[0];
}
if ( cGroupSep < nDefCnt )
diff --git a/i18npool/source/localedata/LocaleNode.cxx b/i18npool/source/localedata/LocaleNode.cxx
index 2b1fed6..4669677 100644
--- a/i18npool/source/localedata/LocaleNode.cxx
+++ b/i18npool/source/localedata/LocaleNode.cxx
@@ -419,14 +419,14 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const
sepNode = findNode("LongDateDayOfWeekSeparator");
aLDS = sepNode->getValue();
of.writeParameter("LongDateDayOfWeekSeparator", aLDS);
- if (aLDS.getLength() == 1 && aLDS.getStr()[0] == ',')
+ if (aLDS == ",")
fprintf( stderr, "Warning: %s\n",
"LongDateDayOfWeekSeparator is only a comma not followed by a space. Usually this is not the case and may lead to concatenated display names like \"Wednesday,May 9, 2007\".");
sepNode = findNode("LongDateDaySeparator");
aLDS = sepNode->getValue();
of.writeParameter("LongDateDaySeparator", aLDS);
- if (aLDS.getLength() == 1 && (aLDS.getStr()[0] == ',' || aLDS.getStr()[0] == '.'))
+ if (aLDS == "," || aLDS == ".")
fprintf( stderr, "Warning: %s\n",
"LongDateDaySeparator is only a comma or dot not followed by a space. Usually this is not the case and may lead to concatenated display names like \"Wednesday, May 9,2007\".");
@@ -459,7 +459,7 @@ void LCCTYPENode::generateCode (const OFileWriter &of) const
if (aListSep == aThoSep)
fprintf( stderr, "Warning: %s\n",
"ListSeparator equals ThousandSeparator.");
- if (aListSep.getLength() != 1 || aListSep.getStr()[0] != ';')
+ if (aListSep.getLength() != 1 || aListSep[0] != ';')
{
incError( "ListSeparator not ';' semicolon. Strongly recommended. Currently required.");
++nSavErr; // format codes not affected
diff --git a/idlc/source/idlcmain.cxx b/idlc/source/idlcmain.cxx
index 1bff708..89b770b 100644
--- a/idlc/source/idlcmain.cxx
+++ b/idlc/source/idlcmain.cxx
@@ -126,8 +126,8 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
OString depFileUrl;
if (options.isValid("-M")) {
depFileUrl = convertToFileUrl(options.getOption("-M"));
- if ('/' != depFileUrl.getStr()[depFileUrl.getLength()-1]) {
- depFileUrl += OString('/');
+ if (!depFileUrl.endsWith("/")) {
+ depFileUrl += "/";
}
depFileUrl += strippedFileName.replaceAt(
strippedFileName.getLength() -3 , 3, "d");
diff --git a/include/rtl/ustrbuf.hxx b/include/rtl/ustrbuf.hxx
index f7d640c..baf6daf 100644
--- a/include/rtl/ustrbuf.hxx
+++ b/include/rtl/ustrbuf.hxx
@@ -384,6 +384,21 @@ public:
}
/**
+ Access to individual characters.
+
+ @param index must be non-negative and less than length.
+
+ @return a reference to the character at the given index.
+
+ @since LibreOffice 4.2
+ */
+ const sal_Unicode & operator [](sal_Int32 index) const
+ {
+ assert(index >= 0 && index < pData->length);
+ return pData->buffer[index];
+ }
+
+ /**
Return a OUString instance reflecting the current content
of this OUStringBuffer.
*/
diff --git a/linguistic/source/hhconvdic.cxx b/linguistic/source/hhconvdic.cxx
index 7616f64..c26353f 100644
--- a/linguistic/source/hhconvdic.cxx
+++ b/linguistic/source/hhconvdic.cxx
@@ -76,7 +76,7 @@ sal_Bool TextIsAllScriptType( const OUString &rTxt, sal_Int16 nScriptType )
sal_Bool bIsAll = sal_True;
for (sal_Int32 i = 0; i < rTxt.getLength() && bIsAll; ++i)
{
- if (checkScriptType( rTxt.getStr()[i]) != nScriptType)
+ if (checkScriptType( rTxt[i]) != nScriptType)
bIsAll = sal_False;
}
return bIsAll;
diff --git a/linguistic/source/misc.cxx b/linguistic/source/misc.cxx
index 1a7f617..d979d53 100644
--- a/linguistic/source/misc.cxx
+++ b/linguistic/source/misc.cxx
@@ -178,8 +178,8 @@ sal_Int32 LevDistance( const OUString &rTxt1, const OUString &rTxt2 )
{
for (k = 1; k <= nLen2; ++k)
{
- sal_Unicode c1i = rTxt1.getStr()[i - 1];
- sal_Unicode c2k = rTxt2.getStr()[k - 1];
+ sal_Unicode c1i = rTxt1[i - 1];
+ sal_Unicode c2k = rTxt2[k - 1];
sal_Int32 nCost = c1i == c2k ? 0 : 1;
sal_Int32 nNew = Minimum( aData.Value(i-1, k ) + 1,
aData.Value(i , k-1) + 1,
@@ -188,9 +188,9 @@ sal_Int32 LevDistance( const OUString &rTxt1, const OUString &rTxt2 )
if (2 < i && 2 < k)
{
int nT = aData.Value(i-2, k-2) + 1;
- if (rTxt1.getStr()[i - 2] != c1i)
+ if (rTxt1[i - 2] != c1i)
++nT;
- if (rTxt2.getStr()[k - 2] != c2k)
+ if (rTxt2[k - 2] != c2k)
++nT;
if (nT < nNew)
nNew = nT;
diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx
index d14fdc6..00829a5 100644
--- a/package/source/manifest/ManifestImport.cxx
+++ b/package/source/manifest/ManifestImport.cxx
@@ -396,7 +396,7 @@ OUString ManifestImport::PushNameAndNamespaces( const OUString& aName, const uno
OUString aAttrValue = xAttribs->getValueByIndex( nInd );
if ( aAttrName.getLength() >= 5
&& aAttrName.startsWith("xmlns")
- && ( aAttrName.getLength() == 5 || aAttrName.getStr()[5] == ( sal_Unicode )':' ) )
+ && ( aAttrName.getLength() == 5 || aAttrName[5] == ':' ) )
{
// this is a namespace declaration
OUString aNsName( ( aAttrName.getLength() == 5 ) ? OUString() : aAttrName.copy( 6 ) );
diff --git a/reportdesign/source/core/misc/conditionalexpression.cxx b/reportdesign/source/core/misc/conditionalexpression.cxx
index 2a278a9..08c1fcf 100644
--- a/reportdesign/source/core/misc/conditionalexpression.cxx
+++ b/reportdesign/source/core/misc/conditionalexpression.cxx
@@ -39,7 +39,7 @@ namespace rptui
while ( nPatternIndex > -1 )
{
const OUString* pReplace = NULL;
- switch ( sExpression.getStr()[ nPatternIndex + 1 ] )
+ switch ( sExpression[ nPatternIndex + 1 ] )
{
case '$': pReplace = &_rFieldDataSource; break;
case '1': pReplace = &_rLHS; break;
diff --git a/reportdesign/source/core/sdr/formatnormalizer.cxx b/reportdesign/source/core/sdr/formatnormalizer.cxx
index 97168a5..0532817 100644
--- a/reportdesign/source/core/sdr/formatnormalizer.cxx
+++ b/reportdesign/source/core/sdr/formatnormalizer.cxx
@@ -227,7 +227,7 @@ namespace rptui
// not bound to a table field
// TODO: we might also do this kind of thing for functions and expressions ...
return;
- if ( sDataField.getStr()[ sDataField.getLength() - 1 ] != ']' )
+ if ( !sDataField.endsWith("]") )
{
// last character is not the closing brace
OSL_FAIL( "FormatNormalizer::impl_adjustFormatToDataFieldType_nothrow: suspicious data field value!" );
diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx
index d411645..a9f3c5f 100644
--- a/sal/osl/unx/uunxapi.cxx
+++ b/sal/osl/unx/uunxapi.cxx
@@ -128,9 +128,9 @@ int access_u(const rtl_uString* pustrPath, int mode)
{
rtl::OString fn = OUStringToOString(pustrPath);
#ifdef ANDROID
- if (strncmp(fn.getStr(), "/assets", sizeof("/assets")-1) == 0 &&
- (fn.getStr()[sizeof("/assets")-1] == '\0' ||
- fn.getStr()[sizeof("/assets")-1] == '/'))
+ if (fn.startsWith("/assets") &&
+ (fn[sizeof("/assets")-1] == '\0' ||
+ fn[sizeof("/assets")-1] == '/'))
{
struct stat stat;
if (lo_apk_lstat(fn.getStr(), &stat) == -1)
@@ -161,9 +161,9 @@ sal_Bool realpath_u(const rtl_uString* pustrFileName, rtl_uString** ppustrResolv
{
rtl::OString fn = OUStringToOString(pustrFileName);
#ifdef ANDROID
- if (strncmp(fn.getStr(), "/assets", sizeof("/assets")-1) == 0 &&
- (fn.getStr()[sizeof("/assets")-1] == '\0' ||
- fn.getStr()[sizeof("/assets")-1] == '/'))
+ if (fn.startsWith("/assets") &&
+ (fn[sizeof("/assets")-1] == '\0' ||
+ fn[sizeof("/assets")-1] == '/'))
{
if (access_u(pustrFileName, F_OK) == -1)
return sal_False;
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index 685a8df..991039c 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -1596,8 +1596,8 @@ bool ScColumn::ParseString(
if (rDecSep.getLength() != 1 || rGroupSep.getLength() != 1)
break;
- sal_Unicode dsep = rDecSep.getStr()[0];
- sal_Unicode gsep = rGroupSep.getStr()[0];
+ sal_Unicode dsep = rDecSep[0];
+ sal_Unicode gsep = rGroupSep[0];
if (!ScStringUtil::parseSimpleNumber(rString, dsep, gsep, nVal))
break;
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index fa0e0aa..b5a2e3c 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -1421,7 +1421,7 @@ void ScChangeActionContent::SetValueString(
OUString& rValue, ScCellValue& rCell, const OUString& rStr, ScDocument* pDoc )
{
rCell.clear();
- if ( rStr.getLength() > 1 && rStr.getStr()[0] == '=' )
+ if ( rStr.getLength() > 1 && rStr[0] == '=' )
{
rValue = EMPTY_OUSTRING;
rCell.meType = CELLTYPE_FORMULA;
diff --git a/sc/source/core/tool/formulaopt.cxx b/sc/source/core/tool/formulaopt.cxx
index 5580c23..16ad17f 100644
--- a/sc/source/core/tool/formulaopt.cxx
+++ b/sc/source/core/tool/formulaopt.cxx
@@ -86,8 +86,8 @@ void ScFormulaOptions::GetDefaultFormulaSeparators(
// Something is wrong. Stick with the default separators.
return;
- sal_Unicode cDecSep = rDecSep.getStr()[0];
- sal_Unicode cListSep = rListSep.getStr()[0];
+ sal_Unicode cDecSep = rDecSep[0];
+ sal_Unicode cListSep = rListSep[0];
// Excel by default uses system's list separator as the parameter
// separator, which in English locales is a comma. However, OOo's list
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index b537009..fd2fad9 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -904,8 +904,8 @@ OUString lclEncodeDosUrl(
else if ( aOldUrl.getLength() > 2 && aOldUrl.copy(1,2) == ":\\" )
{
// drive letter
- sal_Unicode cThisDrive = rBase.isEmpty() ? ' ' : rBase.getStr()[0];
- sal_Unicode cDrive = aOldUrl.getStr()[0];
+ sal_Unicode cThisDrive = rBase.isEmpty() ? ' ' : rBase[0];
+ sal_Unicode cDrive = aOldUrl[0];
if (cThisDrive == cDrive)
// This document and the referenced document are under the same drive.
aBuf.append(EXC_URL_DRIVEROOT);
diff --git a/sc/source/filter/excel/xeroot.cxx b/sc/source/filter/excel/xeroot.cxx
index 9042cba..be02afc 100644
--- a/sc/source/filter/excel/xeroot.cxx
+++ b/sc/source/filter/excel/xeroot.cxx
@@ -321,7 +321,7 @@ uno::Sequence< beans::NamedValue > XclExpRoot::GenerateEncryptionData( const OUS
sal_uInt16 pnPasswd[16];
memset( pnPasswd, 0, sizeof( pnPasswd ) );
for (xub_StrLen nChar = 0; nChar < aPass.getLength(); ++nChar )
- pnPasswd[nChar] = aPass.getStr()[nChar];
+ pnPasswd[nChar] = aPass[nChar];
::msfilter::MSCodec_Std97 aCodec;
aCodec.InitKey( pnPasswd, pnDocId );
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index d4cb870..5dd944e 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -150,7 +150,7 @@ uno::Sequence< beans::NamedValue > XclImpBiff5Decrypter::OnVerifyPassword( const
::std::vector< sal_uInt16 > aPassVect( 16 );
::std::vector< sal_uInt16 >::iterator aIt = aPassVect.begin();
for( sal_Int32 nInd = 0; nInd < nLen; ++nInd, ++aIt )
- *aIt = static_cast< sal_uInt16 >( rPassword.getStr()[nInd] );
+ *aIt = static_cast< sal_uInt16 >( rPassword[nInd] );
uno::Sequence< sal_Int8 > aDocId = ::comphelper::DocPasswordHelper::GenerateRandomByteSequence( 16 );
OSL_ENSURE( aDocId.getLength() == 16, "Unexpected length of the senquence!" );
diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx
index 51b4278..e0713e4 100644
--- a/sc/source/filter/excel/xltools.cxx
+++ b/sc/source/filter/excel/xltools.cxx
@@ -513,7 +513,7 @@ sal_Unicode XclTools::GetBuiltInDefNameIndex( const OUString& rDefName )
{
// name can be followed by underline or space character
xub_StrLen nNextCharPos = nPrefixLen + nBuiltInLen;
- sal_Unicode cNextChar = (rDefName.getLength() > nNextCharPos) ? rDefName.getStr()[nNextCharPos] : '\0';
+ sal_Unicode cNextChar = (rDefName.getLength() > nNextCharPos) ? rDefName[nNextCharPos] : '\0';
if( (cNextChar == '\0') || (cNextChar == ' ') || (cNextChar == '_') )
return cBuiltIn;
}
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index eaa05a1..7aef609 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -876,7 +876,7 @@ void ScInputHandler::ShowTipCursor()
{
for (sal_Int32 i = 0; i < aNew.getLength(); ++i)
{
- sal_Unicode cNext = aNew.getStr()[i];
+ sal_Unicode cNext = aNew[i];
if( cNext == '(' )
{
nStartPosition = i+1;
@@ -888,7 +888,7 @@ void ScInputHandler::ShowTipCursor()
sal_uInt16 nCount = 0;
for (sal_Int32 i = 0; i < aNew.getLength(); ++i)
{
- sal_Unicode cNext = aNew.getStr()[i];
+ sal_Unicode cNext = aNew[i];
if( cNext == '(' )
{
nStartPosition = i+1;
@@ -910,7 +910,7 @@ void ScInputHandler::ShowTipCursor()
sal_uInt16 nCount = 0;
for (sal_Int32 i = 0; i < aNew.getLength(); ++i)
{
- sal_Unicode cNext = aNew.getStr()[i];
+ sal_Unicode cNext = aNew[i];
if( cNext == '(' )
{
nStartPosition = i+1;
@@ -1128,7 +1128,7 @@ void ScInputHandler::UseFormulaData()
{
for (sal_Int32 i = 0; i < aNew.getLength(); ++i)
{
- sal_Unicode cNext = aNew.getStr()[i];
+ sal_Unicode cNext = aNew[i];
if( cNext == '(' )
{
nStartPosition = i+1;
@@ -1140,7 +1140,7 @@ void ScInputHandler::UseFormulaData()
sal_uInt16 nCount = 0;
for (sal_Int32 i = 0; i < aNew.getLength(); ++i)
{
- sal_Unicode cNext = aNew.getStr()[i];
+ sal_Unicode cNext = aNew[i];
if( cNext == '(' )
{
nStartPosition = i+1;
@@ -1162,7 +1162,7 @@ void ScInputHandler::UseFormulaData()
sal_uInt16 nCount = 0;
for (sal_Int32 i = 0; i < aNew.getLength(); ++i)
{
- sal_Unicode cNext = aNew.getStr()[i];
+ sal_Unicode cNext = aNew[i];
if( cNext == '(' )
{
nStartPosition = i+1;
@@ -2746,7 +2746,7 @@ void ScInputHandler::EnterHandler( sal_uInt8 nBlockMode )
{
// keine typographische Anfuehrungszeichen in Formeln
- if (aString.getStr()[0] == '=')
+ if (aString[0] == '=')
{
SvxAutoCorrect* pAuto = SvxAutoCorrCfg::Get().GetAutoCorrect();
if ( pAuto )
diff --git a/sc/source/ui/optdlg/tpformula.cxx b/sc/source/ui/optdlg/tpformula.cxx
index 8e9961c..084060b 100644
--- a/sc/source/ui/optdlg/tpformula.cxx
+++ b/sc/source/ui/optdlg/tpformula.cxx
@@ -143,7 +143,7 @@ bool ScTpFormulaOptions::IsValidSeparator(const OUString& rSep) const
if (rSep.compareToAscii("A") >= 0 && rSep.compareToAscii("Z") <= 0)
return false;
- sal_Unicode c = rSep.getStr()[0];
+ sal_Unicode c = rSep[0];
switch (c)
{
case '+':
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index cf0a829..d133305 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -626,7 +626,7 @@ void ScDrawStringsVars::SetTextToWidthOrHash( ScRefCellValue& rCell, long nWidth
}
sal_uInt8 nSignCount = 0, nDecimalCount = 0, nExpCount = 0;
sal_Int32 nLen = aString.getLength();
- sal_Unicode cDecSep = ScGlobal::GetpLocaleData()->getLocaleItem().decimalSeparator.getStr()[0];
+ sal_Unicode cDecSep = ScGlobal::GetpLocaleData()->getLocaleItem().decimalSeparator[0];
for (xub_StrLen i = 0; i < nLen; ++i)
{
sal_Unicode c = aString[i];
diff --git a/scripting/source/stringresource/stringresource.cxx b/scripting/source/stringresource/stringresource.cxx
index cc0c611..69c5df0 100644
--- a/scripting/source/stringresource/stringresource.cxx
+++ b/scripting/source/stringresource/stringresource.cxx
@@ -1672,7 +1672,7 @@ bool checkNamingSceme( const OUString& aName, const OUString& aNameBase,
// Name has to start with NameBase followed
// by a '_' and at least one more character
if( aName.startsWith( aNameBase ) && nNameBaseLen < nNameLen-1 &&
- aName.getStr()[nNameBaseLen] == '_' )
+ aName[nNameBaseLen] == '_' )
{
bSuccess = true;
@@ -2671,8 +2671,8 @@ void StringResourceWithLocationImpl::initialize( const Sequence< Any >& aArgumen
}
else
{
- if( m_aLocation.getStr()[nLen - 1] != '/' )
- m_aLocation += OUString("/");
+ if( m_aLocation[nLen - 1] != '/' )
+ m_aLocation += "/";
}
if( !bOk )
diff --git a/sd/source/filter/eppt/pptexanimations.cxx b/sd/source/filter/eppt/pptexanimations.cxx
index 951b2cf..355877c 100644
--- a/sd/source/filter/eppt/pptexanimations.cxx
+++ b/sd/source/filter/eppt/pptexanimations.cxx
@@ -128,7 +128,7 @@ void ImplTranslateAttribute( OUString& rString, const TranslateMode eTranslateMo
while( (nIndex = rString.indexOf( aSearch, nIndex )) != -1 )
{
sal_Int32 nLength = aSearch.getLength();
- if( nIndex && (rString.getStr()[nIndex-1] == '#' ) )
+ if( nIndex && ( rString[nIndex-1] == '#' ) )
{
nIndex--;
nLength++;
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 8dfd43a..03e8110 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -139,7 +139,7 @@ static bool convertMeasure( OUString& rString )
while( (nIndex = rString.indexOf( aSearch, nIndex )) != -1 )
{
sal_Int32 nLength = aSearch.getLength();
- if( nIndex && (rString.getStr()[nIndex-1] == '#' ) )
+ if( nIndex && (rString[nIndex-1] == '#' ) )
{
nIndex--;
nLength++;
diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx
index 17c7439..50198a3 100644
--- a/sd/source/ui/unoidl/unosrch.cxx
+++ b/sd/source/ui/unoidl/unosrch.cxx
@@ -646,8 +646,8 @@ sal_Bool SdUnoSearchReplaceShape::Search( const OUString& rText, sal_Int32& nSta
if(pDescr->IsWords())
{
- if( (nStartPos > 0 && aText.getStr()[nStartPos-1] > ' ') ||
- (nEndPos < aText.getLength() && aText.getStr()[nEndPos] > ' ') )
+ if( (nStartPos > 0 && aText[nStartPos-1] > ' ') ||
+ (nEndPos < aText.getLength() && aText[nEndPos] > ' ') )
{
nStartPos++;
return Search( aText, nStartPos, nEndPos, pDescr );
diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
index 66804ff..c1343d9 100644
--- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
@@ -1311,7 +1311,7 @@ PDFFileImplData* PDFFile::impl_getData() const
#if OSL_DEBUG_LEVEL > 1
OUString aTmp;
for( int i = 0; i < m_pData->m_aDocID.getLength(); i++ )
- aTmp += OUString::number((unsigned int)sal_uInt8(m_pData->m_aDocID.getStr()[i]), 16);
+ aTmp += OUString::number((unsigned int)sal_uInt8(m_pData->m_aDocID[i]), 16);
SAL_INFO("sdext.pdfimport.pdfparse", "DocId is <" << OUStringToOString(aTmp, RTL_TEXTENCODING_UTF8).getStr() << ">");
#endif
}
@@ -1375,7 +1375,7 @@ PDFFileImplData* PDFFile::impl_getData() const
{
OUString aTmp;
for( int i = 0; i < aEnt.getLength(); i++ )
- aTmp += " " + OUString::number((unsigned int)sal_uInt8(aEnt.getStr()[i]), 16);
+ aTmp += " " + OUString::number((unsigned int)sal_uInt8(aEnt[i]), 16);
SAL_WARN("sdext.pdfimport.pdfparse",
"O entry has length " << (int)aEnt.getLength() << ", should be 32 <" << OUStringToOString(aTmp, RTL_TEXTENCODING_UTF8).getStr() << ">" );
}
@@ -1395,7 +1395,7 @@ PDFFileImplData* PDFFile::impl_getData() const
{
OUString aTmp;
for( int i = 0; i < aEnt.getLength(); i++ )
- aTmp += " " + OUString::number((unsigned int)sal_uInt8(aEnt.getStr()[i]), 16);
+ aTmp += " " + OUString::number((unsigned int)sal_uInt8(aEnt[i]), 16);
SAL_WARN("sdext.pdfimport.pdfparse",
"U entry has length " << (int)aEnt.getLength() << ", should be 32 <" << OUStringToOString(aTmp, RTL_TEXTENCODING_UTF8).getStr() << ">" );
}
diff --git a/sdext/source/presenter/PresenterTextView.cxx b/sdext/source/presenter/PresenterTextView.cxx
index 4463ea2..8073190 100644
--- a/sdext/source/presenter/PresenterTextView.cxx
+++ b/sdext/source/presenter/PresenterTextView.cxx
@@ -788,7 +788,7 @@ sal_Unicode PresenterTextParagraph::GetCharacter (
}
else
{
- return msParagraphText.getStr()[nGlobalCharacterIndex - mnCharacterOffset];
+ return msParagraphText[nGlobalCharacterIndex - mnCharacterOffset];
}
}
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 8fa2e23..6d7b016 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -2564,7 +2564,7 @@ void CutLines( OUString& rStr, sal_Int32 nStartLine, sal_Int32 nLines, sal_Bool
{
sal_Int32 n = nStartPos;
sal_Int32 nLen = rStr.getLength();
- while ( ( n < nLen ) && ( rStr.getStr()[ n ] == LINE_SEP ) )
+ while ( ( n < nLen ) && ( rStr[ n ] == LINE_SEP ) )
n++;
if ( n > nStartPos )
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index ad99f8b..d167021 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -169,7 +169,7 @@ static ::rtl::ByteSequence getBufFromAsciiLine( OUString line )
for( int ind = 0; ind < tmpLine.getLength()/2; ind++ )
{
- aResult[ind] = ( (sal_uInt8)( tmpLine.getStr()[ind*2] - 'a' ) << 4 ) | (sal_uInt8)( tmpLine.getStr()[ind*2+1] - 'a' );
+ aResult[ind] = ( (sal_uInt8)( tmpLine[ind*2] - 'a' ) << 4 ) | (sal_uInt8)( tmpLine[ind*2+1] - 'a' );
}
return aResult;
diff --git a/svtools/source/svrtf/rtfout.cxx b/svtools/source/svrtf/rtfout.cxx
index 703a24c..5727a4b 100644
--- a/svtools/source/svrtf/rtfout.cxx
+++ b/svtools/source/svrtf/rtfout.cxx
@@ -133,7 +133,7 @@ SvStream& RTFOutFuncs::Out_Char(SvStream& rStream, sal_Unicode c,
for (sal_Int32 nI = 0; nI < nLen; ++nI)
{
rStream << "\\'";
- Out_Hex(rStream, sConverted.getStr()[nI], 2);
+ Out_Hex(rStream, sConverted[nI], 2);
}
}
break;
diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx
index b620965..31e83a0 100644
--- a/svx/source/dialog/svxbmpnumvalueset.cxx
+++ b/svx/source/dialog/svxbmpnumvalueset.cxx
@@ -316,8 +316,7 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
aLeft.Y() -= (pDev->GetTextHeight()/2);
if(!sPrefixes[i].isEmpty() &&
- sPrefixes[i] != " " &&
- sPrefixes[i].getStr()[0] != 0)
+ sPrefixes[i] != " ")
{
pVDev->SetFont(aFont);
pVDev->DrawText(aLeft, sPrefixes[i]);
@@ -349,9 +348,8 @@ void SvxNumValueSet::UserDraw( const UserDrawEvent& rUDEvt )
aLeft,
aRuleFont,
aFont);
- if(!sSuffixes[i].isEmpty()&&
- !sSuffixes[i].equalsAsciiL(" ", 1) &&
- sSuffixes[i].getStr()[0] != 0)
+ if(!sSuffixes[i].isEmpty() &&
+ !sSuffixes[i].startsWith(" "))
{
pVDev->SetFont(aFont);
pVDev->DrawText(aLeft, sSuffixes[i]);
diff --git a/svx/source/fmcomp/dbaexchange.cxx b/svx/source/fmcomp/dbaexchange.cxx
index dc9454a..e5a974d 100644
--- a/svx/source/fmcomp/dbaexchange.cxx
+++ b/svx/source/fmcomp/dbaexchange.cxx
@@ -467,7 +467,7 @@ namespace svx
sal_Int32 nDescriptorLen = m_sCompatibleObjectDescription.getLength();
if (nDescriptorLen)
{
- if (m_sCompatibleObjectDescription.getStr()[nDescriptorLen] == 11)
+ if (m_sCompatibleObjectDescription[nDescriptorLen] == 11)
m_sCompatibleObjectDescription = m_sCompatibleObjectDescription.copy(0, nDescriptorLen - 1);
if (nDescriptorLen)
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx
index 3349c8e..77ee1f5 100644
--- a/svx/source/sidebar/nbdtmg.cxx
+++ b/svx/source/sidebar/nbdtmg.cxx
@@ -127,8 +127,8 @@ NumSettings_ImplPtr lcl_CreateNumberingSettingsPtr(const Sequence<PropertyValue>
else if(pValues[j].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(sBulletFontName)))
pValues[j].Value >>= pNew->sBulletFont;
}
- const sal_Unicode cLocalPrefix = pNew->sPrefix.getLength() ? pNew->sPrefix.getStr()[0] : 0;
- const sal_Unicode cLocalSuffix = pNew->sSuffix.getLength() ? pNew->sSuffix.getStr()[0] : 0;
+ const sal_Unicode cLocalPrefix = pNew->sPrefix.getLength() ? pNew->sPrefix[0] : 0;
+ const sal_Unicode cLocalSuffix = pNew->sSuffix.getLength() ? pNew->sSuffix[0] : 0;
OUString aEmptyStr;
if( cLocalPrefix == ' ') pNew->sPrefix=aEmptyStr;
if( cLocalSuffix == ' ') pNew->sSuffix=aEmptyStr;
@@ -1407,8 +1407,8 @@ sal_uInt16 NumberingTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 m
return (sal_uInt16)0xFFFF;
SvxNumberFormat aFmt(aNum.GetLevel(nActLv));
- //sal_Unicode cPrefix = rtl::OUString(aFmt.GetPrefix()).getStr()[0];
- //sal_Unicode cSuffix = rtl::OUString(aFmt.GetSuffix()).getStr()[0];
+ //sal_Unicode cPrefix = rtl::OUString(aFmt.GetPrefix())[0];
+ //sal_Unicode cSuffix = rtl::OUString(aFmt.GetSuffix())[0];
OUString sPreFix = aFmt.GetPrefix();
OUString sLclSuffix = aFmt.GetSuffix();
sal_Int16 eNumType = aFmt.GetNumberingType();
@@ -1446,8 +1446,8 @@ sal_Bool NumberingTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sa
return sal_False;
SvxNumberFormat aFmt(aNum.GetLevel(nActLv));
- //sal_Unicode cPrefix = rtl::OUString(aFmt.GetPrefix()).getStr()[0];
- //sal_Unicode cSuffix = rtl::OUString(aFmt.GetSuffix()).getStr()[0];
+ //sal_Unicode cPrefix = rtl::OUString(aFmt.GetPrefix())[0];
+ //sal_Unicode cSuffix = rtl::OUString(aFmt.GetSuffix())[0];
sal_Int16 eNumType = aFmt.GetNumberingType();
sal_uInt16 nCount = pNumberSettingsArr->size();
@@ -1641,7 +1641,7 @@ sal_uInt16 OutlineTypeMgr::GetNBOIndexForNumRule(SvxNumRule& aNum,sal_uInt16 /*m
{
sal_Unicode cChar = aFmt.GetBulletChar();
//const Font* pFont = aFmt.GetBulletFont();
- sal_Unicode ccChar = _pSet->sBulletChar.getStr()[0];
+ sal_Unicode ccChar = _pSet->sBulletChar[0];
// rtl::OUString sFont = _pSet->sBulletFont;
if ( !((cChar == ccChar) && //pFont && sFont.compareTo(pFont->GetName()) &&
_pSet->eLabelFollowedBy == aFmt.GetLabelFollowedBy() &&
@@ -1710,8 +1710,8 @@ sal_Bool OutlineTypeMgr::RelplaceNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_
for (sal_uInt16 iLevel=0;iLevel < nCount;iLevel++)
{
SvxNumberFormat aFmt(aNum.GetLevel(iLevel));
- //sal_Unicode cPrefix = rtl::OUString(aFmt.GetPrefix()).getStr()[0];
- //sal_Unicode cSuffix = rtl::OUString(aFmt.GetSuffix()).getStr()[0];
+ //sal_Unicode cPrefix = rtl::OUString(aFmt.GetPrefix())[0];
+ //sal_Unicode cSuffix = rtl::OUString(aFmt.GetSuffix())[0];
sal_Int16 eNumType = aFmt.GetNumberingType();
NumSettings_ImplPtr _pSet = (*pItemArr->pNumSettingsArr)[iLevel].get();
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 6070f30..33e782b 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -1140,7 +1140,7 @@ sal_Unicode SwAccessibleParagraph::getCharacter( sal_Int32 nIndex )
// return character (if valid)
if( IsValidChar(nIndex, sText.getLength() ) )
{
- return sText.getStr()[nIndex];
+ return sText[nIndex];
}
else
throw lang::IndexOutOfBoundsException();
diff --git a/sw/source/core/access/accportions.cxx b/sw/source/core/access/accportions.cxx
index d6fc8e4..4bedfca 100644
--- a/sw/source/core/access/accportions.cxx
+++ b/sw/source/core/access/accportions.cxx
@@ -584,7 +584,7 @@ sal_uInt16 SwAccessiblePortionData::FillSpecialPos(
// if we have anything except plain text, compute nExtend + nRefPos
if( (nModelEndPos - nModelPos == 1) &&
- (pTxtNode->GetTxt()[nModelPos] != sAccessibleString.getStr()[nPos]))
+ (pTxtNode->GetTxt()[nModelPos] != sAccessibleString[nPos]))
{
// case 1: a one-character, non-text portion
// reference position is the first accessibilty for our
diff --git a/sw/source/core/unocore/unoobj.cxx b/sw/source/core/unocore/unoobj.cxx
index 7644261..0b07b54 100644
--- a/sw/source/core/unocore/unoobj.cxx
+++ b/sw/source/core/unocore/unoobj.cxx
@@ -2795,12 +2795,12 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
bRet = sal_False;
}
}
- else if (rPropName.matchAsciiL("CollatorAlgorithm", 17) &&
+ else if (rPropName.startsWith("CollatorAlgorithm") &&
rPropName.getLength() == 18 &&
- (rPropName.getStr()[17] >= '0' && rPropName.getStr()[17] <= '9'))
+ (rPropName[17] >= '0' && rPropName[17] <= '9'))
{
bOldSortdescriptor = sal_True;
- sal_uInt16 nIndex = rPropName.getStr()[17];
+ sal_uInt16 nIndex = rPropName[17];
nIndex -= '0';
OUString aTxt;
if ((aValue >>= aTxt) && nIndex < 3)
@@ -2812,12 +2812,12 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
bRet = sal_False;
}
}
- else if (rPropName.matchAsciiL("SortRowOrColumnNo", 17) &&
+ else if (rPropName.startsWith("SortRowOrColumnNo") &&
rPropName.getLength() == 18 &&
- (rPropName.getStr()[17] >= '0' && rPropName.getStr()[17] <= '9'))
+ (rPropName[17] >= '0' && rPropName[17] <= '9'))
{
bOldSortdescriptor = sal_True;
- sal_uInt16 nIndex = rPropName.getStr()[17];
+ sal_uInt16 nIndex = rPropName[17];
nIndex -= '0';
sal_Int16 nCol = -1;
if (aValue.getValueType() == ::getCppuType((const sal_Int16*)0)
@@ -2836,10 +2836,10 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
}
else if (rPropName.startsWith("IsSortNumeric") &&
rPropName.getLength() == 14 &&
- (rPropName.getStr()[13] >= '0' && rPropName.getStr()[13] <= '9'))
+ (rPropName[13] >= '0' && rPropName[13] <= '9'))
{
bOldSortdescriptor = sal_True;
- sal_uInt16 nIndex = rPropName.getStr()[13];
+ sal_uInt16 nIndex = rPropName[13];
nIndex = nIndex - '0';
if (aValue.getValueType() == ::getBooleanCppuType() && nIndex < 3)
{
@@ -2853,10 +2853,10 @@ sal_Bool SwUnoCursorHelper::ConvertSortProperties(
}
else if (rPropName.startsWith("IsSortAscending") &&
rPropName.getLength() == 16 &&
- (rPropName.getStr()[15] >= '0' && rPropName.getStr()[15] <= '9'))
+ (rPropName[15] >= '0' && rPropName[15] <= '9'))
{
bOldSortdescriptor = sal_True;
- sal_uInt16 nIndex = rPropName.getStr()[15];
+ sal_uInt16 nIndex = rPropName[15];
nIndex -= '0';
if (aValue.getValueType() == ::getBooleanCppuType() && nIndex < 3)
{
diff --git a/sw/source/ui/lingu/hhcwrp.cxx b/sw/source/ui/lingu/hhcwrp.cxx
index 4f5de52..042f3b3 100644
--- a/sw/source/ui/lingu/hhcwrp.cxx
+++ b/sw/source/ui/lingu/hhcwrp.cxx
@@ -272,7 +272,7 @@ void SwHHCWrapper::ChangeText( const OUString &rNewText,
nIndex = static_cast< xub_StrLen >( rOrigText.getLength() );
}
- if (rOrigText.getStr()[nIndex] == rNewText[nPos] ||
+ if (rOrigText[nIndex] == rNewText[nPos] ||
nPos == nConvTextLen /* end of string also terminates non-matching char sequence */)
{
// substring that needs to be replaced found?
diff --git a/toolkit/source/helper/formpdfexport.cxx b/toolkit/source/helper/formpdfexport.cxx
index 516fbb7..2ad6900 100644
--- a/toolkit/source/helper/formpdfexport.cxx
+++ b/toolkit/source/helper/formpdfexport.cxx
@@ -484,7 +484,7 @@ namespace toolkitform
{
OUString sURL;
OSL_VERIFY( xModelProps->getPropertyValue( FM_PROP_TARGET_URL ) >>= sURL );
- const bool bDocumentLocalTarget = !sURL.isEmpty() && ( sURL.getStr()[0] == '#' );
+ const bool bDocumentLocalTarget = sURL.startsWith("#");
if ( bDocumentLocalTarget )
{
// Register the destination for for future handling ...
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index c1bb3cc..5617366 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -2248,8 +2248,7 @@ sal_Int32 INetURLObject::getAuthorityBegin() const
else
nBegin = m_aPath.getBegin();
nBegin -= RTL_CONSTASCII_LENGTH("//");
- DBG_ASSERT(m_aAbsURIRef.getStr()[nBegin] == '/'
- && m_aAbsURIRef.getStr()[nBegin + 1] == '/',
+ DBG_ASSERT(m_aAbsURIRef[nBegin] == '/' && m_aAbsURIRef[nBegin + 1] == '/',
"INetURLObject::getAuthority(): Bad authority");
return nBegin;
}
@@ -3943,7 +3942,7 @@ bool INetURLObject::operator ==(INetURLObject const & rObject) const
switch (nLength - aPath2.getLength())
{
case -1:
- if (aPath2.getStr()[nLength] != '/')
+ if (aPath2[nLength] != '/')
return false;
break;
@@ -3951,7 +3950,7 @@ bool INetURLObject::operator ==(INetURLObject const & rObject) const
break;
case 1:
- if (aPath1.getStr()[--nLength] != '/')
+ if (aPath1[--nLength] != '/')
return false;
break;
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index 45cdb42..3d0e7d7 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -138,7 +138,7 @@ void makeAndAppendXMLName(
sal_Int32 nCount = rIn.getLength();
for ( sal_Int32 n = 0; n < nCount; ++n )
{
- const sal_Unicode c = rIn.getStr()[ n ];
+ const sal_Unicode c = rIn[ n ];
switch ( c )
{
case '&':
diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index ee7030c..73b2835 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -58,7 +58,7 @@ OUString makeHierarchalNameSegment( const OUString & rIn )
sal_Int32 nCount = rIn.getLength();
for ( sal_Int32 n = 0; n < nCount; ++n )
{
- const sal_Unicode c = rIn.getStr()[ n ];
+ const sal_Unicode c = rIn[ n ];
switch ( c )
{
case '&':
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index 4ce4bf6..37cbddf 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -106,8 +106,8 @@ namespace ucb { namespace ucp { namespace ext
ENSURE_OR_RETURN( !i_rBaseURL.isEmpty(), "illegal base URL", i_rRelativeURL );
OUStringBuffer aComposer( i_rBaseURL );
- if ( i_rBaseURL.getStr()[ i_rBaseURL.getLength() - 1 ] != '/' )
- aComposer.append( sal_Unicode( '/' ) );
+ if ( !i_rBaseURL.endsWith("/") )
+ aComposer.append( '/' );
aComposer.append( i_rRelativeURL );
return aComposer.makeStringAndClear();
}
@@ -368,7 +368,7 @@ namespace ucb { namespace ucp { namespace ext
break;
}
- if ( sRelativeURL.getStr()[ sRelativeURL.getLength() - 1 ] == '/' )
+ if ( sRelativeURL.endsWith("/") )
sRelativeURL = sRelativeURL.copy( 0, sRelativeURL.getLength() - 1 );
// remove the last segment
diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
index 20a73c8..57704ff 100644
--- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx
+++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
@@ -113,8 +113,8 @@ namespace ucb { namespace ucp { namespace ext
ENSURE_OR_RETURN( !i_rBaseURL.isEmpty(), "illegal base URL", i_rRelativeURL );
OUStringBuffer aComposer( i_rBaseURL );
- if ( i_rBaseURL.getStr()[ i_rBaseURL.getLength() - 1 ] != '/' )
- aComposer.append( sal_Unicode( '/' ) );
+ if ( !i_rBaseURL.endsWith("/") )
+ aComposer.append( '/' );
aComposer.append( i_rRelativeURL );
return aComposer.makeStringAndClear();
}
diff --git a/ucb/source/ucp/file/shell.cxx b/ucb/source/ucp/file/shell.cxx
index a9cd7e4..538e013 100644
--- a/ucb/source/ucp/file/shell.cxx
+++ b/ucb/source/ucp/file/shell.cxx
@@ -1967,9 +1967,9 @@ sal_Bool SAL_CALL shell::getUnqFromUrl( const OUString& Url,OUString& Unq )
Unq = Url;
sal_Int32 l = Unq.getLength()-1;
- if( ! err && Unq.getStr()[ l ] == '/' &&
- Unq.indexOf( '/', RTL_CONSTASCII_LENGTH("//") ) < l )
- Unq = Unq.copy(0, Unq.getLength() - 1);
+ if( ! err && Unq.endsWith("/") &&
+ Unq.indexOf( '/', RTL_CONSTASCII_LENGTH("//") ) != -1 )
+ Unq = Unq.copy(0, l);
return err;
}
diff --git a/ucb/source/ucp/hierarchy/hierarchydata.cxx b/ucb/source/ucp/hierarchy/hierarchydata.cxx
index 05eb221..25cfffe 100644
--- a/ucb/source/ucp/hierarchy/hierarchydata.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchydata.cxx
@@ -63,7 +63,7 @@ void makeXMLName( const OUString & rIn, OUStringBuffer & rBuffer )
sal_Int32 nCount = rIn.getLength();
for ( sal_Int32 n = 0; n < nCount; ++n )
{
- const sal_Unicode c = rIn.getStr()[ n ];
+ const sal_Unicode c = rIn[ n ];
switch ( c )
{
case '&':
diff --git a/ucb/source/ucp/hierarchy/hierarchyuri.cxx b/ucb/source/ucp/hierarchy/hierarchyuri.cxx
index 23e5d0d..fdbf1a7 100644
--- a/ucb/source/ucp/hierarchy/hierarchyuri.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchyuri.cxx
@@ -82,8 +82,7 @@ void HierarchyUri::init() const
}
else if ( ( m_aUri.getLength() == HIERARCHY_URL_SCHEME_LENGTH + 2 )
&&
- ( m_aUri.getStr()[ HIERARCHY_URL_SCHEME_LENGTH + 1 ]
- == sal_Unicode( '/' ) ) )
+ ( m_aUri[ HIERARCHY_URL_SCHEME_LENGTH + 1 ] == '/' ) )
{
// root folder URI without service specifier.
m_aUri += OUString( "/" DEFAULT_DATA_SOURCE_SERVICE "/" );
@@ -93,8 +92,7 @@ void HierarchyUri::init() const
}
else if ( ( m_aUri.getLength() > HIERARCHY_URL_SCHEME_LENGTH + 2 )
&&
- ( m_aUri.getStr()[ HIERARCHY_URL_SCHEME_LENGTH + 2 ]
- != sal_Unicode( '/' ) ) )
+ ( m_aUri[ HIERARCHY_URL_SCHEME_LENGTH + 2 ] != '/' ) )
{
// other (no root folder) URI without service specifier.
m_aUri = m_aUri.replaceAt(
diff --git a/ucb/source/ucp/package/pkguri.cxx b/ucb/source/ucp/package/pkguri.cxx
index 29e9cd6..6230068 100644
--- a/ucb/source/ucp/package/pkguri.cxx
+++ b/ucb/source/ucp/package/pkguri.cxx
@@ -81,14 +81,11 @@ void PackageUri::init() const
}
// Scheme must be followed by '://'
- if ( ( m_aUri.getStr()[ PACKAGE_URL_SCHEME_LENGTH ]
- != sal_Unicode( ':' ) )
+ if ( ( m_aUri[ PACKAGE_URL_SCHEME_LENGTH ] != ':' )
||
- ( m_aUri.getStr()[ PACKAGE_URL_SCHEME_LENGTH + 1 ]
- != sal_Unicode( '/' ) )
+ ( m_aUri[ PACKAGE_URL_SCHEME_LENGTH + 1 ] != '/' )
||
- ( m_aUri.getStr()[ PACKAGE_URL_SCHEME_LENGTH + 2 ]
- != sal_Unicode( '/' ) ) )
+ ( m_aUri[ PACKAGE_URL_SCHEME_LENGTH + 2 ] != '/' ) )
{
// error, but remember that we did a init().
m_aPath = OUString( "/" );
@@ -135,8 +132,7 @@ void PackageUri::init() const
}
else if ( nEnd == ( aPureUri.getLength() - 1 ) )
{
- if ( aPureUri.getStr()[ aPureUri.getLength() - 2 ]
- == sal_Unicode( '/' ) )
+ if ( aPureUri[ aPureUri.getLength() - 2 ] == '/' )
{
// Only <scheme>://// or <scheme>://<something>//
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index a445ccd..9f7c6e2 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -1835,9 +1835,9 @@ Content::queryChildContent( const OUString & rRelativeChildUri )
const OUString aMyId = getIdentifier()->getContentIdentifier();
OUStringBuffer aBuf( aMyId );
- if ( aMyId.getStr()[ aMyId.getLength() - 1 ] != sal_Unicode( '/' ) )
+ if ( !aMyId.endsWith("/") )
aBuf.appendAscii( "/" );
- if ( rRelativeChildUri.getStr()[ 0 ] != sal_Unicode( '/' ) )
+ if ( !rRelativeChildUri.startsWith("/") )
aBuf.append( rRelativeChildUri );
else
aBuf.append( rRelativeChildUri.copy( 1 ) );
diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx
index 7f25037..916ccf8 100644
--- a/ucb/source/ucp/tdoc/tdoc_storage.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx
@@ -114,7 +114,7 @@ StorageElementFactory::createStorage( const OUString & rUri,
}
OUString aUriKey
- ( ( rUri.getStr()[ rUri.getLength() - 1 ] == sal_Unicode( '/' ) )
+ ( rUri.endsWith("/")
? rUri.copy( 0, rUri.getLength() - 1 )
: rUri );
diff --git a/ucb/source/ucp/tdoc/tdoc_uri.cxx b/ucb/source/ucp/tdoc/tdoc_uri.cxx
index 037d4d9..24110bf 100644
--- a/ucb/source/ucp/tdoc/tdoc_uri.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_uri.cxx
@@ -65,15 +65,13 @@ void Uri::init() const
// Remember normalized scheme string.
m_aUri = m_aUri.replaceAt( 0, aScheme.getLength(), aScheme );
- if ( m_aUri.getStr()[ TDOC_URL_SCHEME_LENGTH ]
- != sal_Unicode( ':' ) )
+ if ( m_aUri[ TDOC_URL_SCHEME_LENGTH ] != ':' )
{
// Invaild (no ':' after <scheme>).
return;
}
- if ( m_aUri.getStr()[ TDOC_URL_SCHEME_LENGTH + 1 ]
- != sal_Unicode( '/' ) )
+ if ( m_aUri[ TDOC_URL_SCHEME_LENGTH + 1 ] != '/' )
{
// Invaild (no '/' after <scheme>:).
return;
diff --git a/ucb/source/ucp/webdav-neon/ContentProperties.cxx b/ucb/source/ucp/webdav-neon/ContentProperties.cxx
index 1439e0c..b19cd24 100644
--- a/ucb/source/ucp/webdav-neon/ContentProperties.cxx
+++ b/ucb/source/ucp/webdav-neon/ContentProperties.cxx
@@ -128,8 +128,7 @@ ContentProperties::ContentProperties( const DAVResource& rResource )
++it;
}
- if ( rResource.uri.getStr()[ rResource.uri.getLength() - 1 ]
- == sal_Unicode( '/' ) )
+ if ( rResource.uri.endsWith("/") )
m_bTrailingSlash = sal_True;
}
diff --git a/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx b/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx
index e84faf90..64da409 100644
--- a/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx
@@ -392,8 +392,7 @@ sal_Bool DataSupplier::getData()
m_pImpl->m_xContent->getResourceAccess().getURL() );
OUString aPath = aURI.GetPath();
- if ( aPath.getStr()[ aPath.getLength() - 1 ]
- == sal_Unicode( '/' ) )
+ if ( aPath.endsWith("/") )
aPath = aPath.copy( 0, aPath.getLength() - 1 );
aPath = NeonUri::unescape( aPath );
@@ -411,9 +410,7 @@ sal_Bool DataSupplier::getData()
{
NeonUri aCurrURI( rRes.uri );
OUString aCurrPath = aCurrURI.GetPath();
- if ( aCurrPath.getStr()[
- aCurrPath.getLength() - 1 ]
- == sal_Unicode( '/' ) )
+ if ( aCurrPath.endsWith("/") )
aCurrPath
= aCurrPath.copy(
0,
diff --git a/ucb/source/ucp/webdav-neon/webdavprovider.cxx b/ucb/source/ucp/webdav-neon/webdavprovider.cxx
index 389b0c5..616d1bd 100644
--- a/ucb/source/ucp/webdav-neon/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavprovider.cxx
@@ -134,9 +134,7 @@ ContentProvider::queryContent(
if ( aURL.getLength() < ( aScheme.getLength() + 3 ) )
throw ucb::IllegalIdentifierException();
- if ( ( aURL.getStr()[ aScheme.getLength() ] != sal_Unicode( ':' ) ) ||
- ( aURL.getStr()[ aScheme.getLength() + 1 ] != sal_Unicode( '/' ) ) ||
- ( aURL.getStr()[ aScheme.getLength() + 2 ] != sal_Unicode( '/' ) ) )
+ if ( aURL.copy( aScheme.getLength(), 3 ) != "://" )
throw ucb::IllegalIdentifierException();
uno::Reference< ucb::XContentIdentifier > xCanonicId;
diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx
index a1e7828..e8416a2 100644
--- a/ucb/source/ucp/webdav/ContentProperties.cxx
+++ b/ucb/source/ucp/webdav/ContentProperties.cxx
@@ -112,8 +112,7 @@ ContentProperties::ContentProperties( const DAVResource& rResource )
++it;
}
- if ( rResource.uri.getStr()[ rResource.uri.getLength() - 1 ]
- == sal_Unicode( '/' ) )
+ if ( rResource.uri.endsWith("/") )
m_bTrailingSlash = sal_True;
}
diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.cxx b/ucb/source/ucp/webdav/webdavdatasupplier.cxx
index a50bb7e..6834734 100644
--- a/ucb/source/ucp/webdav/webdavdatasupplier.cxx
+++ b/ucb/source/ucp/webdav/webdavdatasupplier.cxx
@@ -391,8 +391,7 @@ sal_Bool DataSupplier::getData()
m_pImpl->m_xContent->getResourceAccess().getURL() );
OUString aPath = aURI.GetPath();
- if ( aPath.getStr()[ aPath.getLength() - 1 ]
- == sal_Unicode( '/' ) )
+ if ( aPath.endsWith("/") )
aPath = aPath.copy( 0, aPath.getLength() - 1 );
aPath = SerfUri::unescape( aPath );
@@ -410,9 +409,7 @@ sal_Bool DataSupplier::getData()
{
SerfUri aCurrURI( rRes.uri );
OUString aCurrPath = aCurrURI.GetPath();
- if ( aCurrPath.getStr()[
- aCurrPath.getLength() - 1 ]
- == sal_Unicode( '/' ) )
+ if ( aCurrPath.endsWith("/") )
aCurrPath
= aCurrPath.copy(
0,
diff --git a/ucb/source/ucp/webdav/webdavprovider.cxx b/ucb/source/ucp/webdav/webdavprovider.cxx
index b782b04..cb2dc41 100644
--- a/ucb/source/ucp/webdav/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav/webdavprovider.cxx
@@ -197,9 +197,7 @@ ContentProvider::queryContent(
if ( aURL.getLength() < ( aScheme.getLength() + 3 ) )
throw ucb::IllegalIdentifierException();
- if ( ( aURL.getStr()[ aScheme.getLength() ] != sal_Unicode( ':' ) ) ||
- ( aURL.getStr()[ aScheme.getLength() + 1 ] != sal_Unicode( '/' ) ) ||
- ( aURL.getStr()[ aScheme.getLength() + 2 ] != sal_Unicode( '/' ) ) )
+ if ( aURL.copy( aScheme.getLength(), 3 ) != "://" )
throw ucb::IllegalIdentifierException();
uno::Reference< ucb::XContentIdentifier > xCanonicId;
diff --git a/unotest/source/cpp/filters-test.cxx b/unotest/source/cpp/filters-test.cxx
index a14fa67..9d38a09 100644
--- a/unotest/source/cpp/filters-test.cxx
+++ b/unotest/source/cpp/filters-test.cxx
@@ -79,7 +79,7 @@ void FiltersTest::recursiveScan(filterStatus nExpected,
if ((nLastSlash != -1) && (nLastSlash+1 < sURL.getLength()))
{
//ignore .files
- if (sURL.getStr()[nLastSlash+1] == '.')
+ if (sURL[nLastSlash+1] == '.')
continue;
if (
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 6b16f8a..74568bc 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -266,10 +266,9 @@ UUIInteractionHelper::replaceMessageWithArguments(
if (i == -1)
break;
if (aMessage.getLength() - i >= RTL_CONSTASCII_LENGTH("$(ARGx)")
- && aMessage.getStr()[i + RTL_CONSTASCII_LENGTH("$(ARGx")] == ')')
+ && aMessage[i + RTL_CONSTASCII_LENGTH("$(ARGx")] == ')')
{
- sal_Unicode c
- = aMessage.getStr()[i + RTL_CONSTASCII_LENGTH("$(ARG")];
+ sal_Unicode c = aMessage[i + RTL_CONSTASCII_LENGTH("$(ARG")];
if (c >= '1' && c <= '2')
{
std::vector< OUString >::size_type nIndex
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index 636528a..9458997 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -451,8 +451,7 @@ bool PrintFontManager::PrintFont::readAfmMetrics( MultiAtomProvider* pProvider,
{
int nLen = aFamily.getLength();
if( nLen > 2 &&
- aFamily.getStr()[ nLen-2 ] == 'G' &&
- aFamily.getStr()[ nLen-1 ] == 'B' &&
+ aFamily.endsWith("GB") &&
pInfo->numOfChars > 255 )
{
m_aEncoding = RTL_TEXTENCODING_GBK;
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 97d92ba..7089abc 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -1303,7 +1303,7 @@ void PDFWriterImpl::padPassword( const OUString& i_rPassword, sal_uInt8* o_pPadd
sal_Int32 nCurrentChar;
for( nCurrentChar = 0; nCurrentChar < nToCopy; nCurrentChar++ )
- o_pPaddedPW[nCurrentChar] = (sal_uInt8)( aString.getStr()[nCurrentChar] );
+ o_pPaddedPW[nCurrentChar] = (sal_uInt8)( aString[nCurrentChar] );
//pad it with standard byte string
sal_Int32 i,y;
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 2d1636b..0ec2055 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -141,7 +141,7 @@ namespace psp
OString aStr( pEnvLocale );
sal_Int32 nLen = aStr.getLength();
aLoc.Language = OStringToOUString( aStr.copy( 0, nLen > 2 ? 2 : nLen ), RTL_TEXTENCODING_MS_1252 );
- if( nLen >=5 && aStr.getStr()[2] == '_' )
+ if( nLen >=5 && aStr[2] == '_' )
aLoc.Country = OStringToOUString( aStr.copy( 3, 2 ), RTL_TEXTENCODING_MS_1252 );
else
aLoc.Country = OUString();
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 289b83c..e2f6d7e 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2019,8 +2019,8 @@ OUString lcl_ExctractAskVariableAndHint( const OUString& rCommand, OUString& rHi
// the text after the variable and before a '\' is the hint
// if no hint is set the variable is used as hint
// the quotes of the hint have to be removed
- sal_Int32 nIndex = rCommand.indexOf( ' ', 2);//find last space after 'ASK'
- while(rCommand.getStr()[nIndex] == ' ')
+ sal_Int32 nIndex = rCommand.indexOf( ' ', 2); //find last space after 'ASK'
+ while(rCommand[nIndex] == ' ')
++nIndex;
OUString sShortCommand( rCommand.copy( nIndex ) ); //cut off the " ASK "
@@ -2212,7 +2212,7 @@ void FieldContext::AppendCommand(const OUString& rPart)
if (sToken.isEmpty())
continue;
- if (sToken.getStr()[0] == '"')
+ if (sToken[0] == '"')
{
bInStringNext = true;
sToken = sToken.copy(1);
diff --git a/writerfilter/source/dmapper/NumberingManager.cxx b/writerfilter/source/dmapper/NumberingManager.cxx
index 917abb2..7a1787c 100644
--- a/writerfilter/source/dmapper/NumberingManager.cxx
+++ b/writerfilter/source/dmapper/NumberingManager.cxx
@@ -185,7 +185,7 @@ sal_Int16 ListLevel::GetParentNumbering( OUString sText, sal_Int16 nLevel,
{
if( sLevelText.getLength() > 1 )
{
- sal_Unicode cLevel = sLevelText.getStr()[1];
+ sal_Unicode cLevel = sLevelText[1];
if( cLevel >= '1' && cLevel <= '9' )
{
if( cLevel - '1' < nMinLevel )
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 2e288d1..c0f14e4 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -1005,7 +1005,7 @@ void RTFDocumentImpl::text(OUString& rString)
if (rString.getLength() == 1 && m_aStates.top().nDestinationState != DESTINATION_DOCCOMM)
{
// No cheating! Tokenizer ignores bare \r and \n, their hex \'0d / \'0a form doesn't count, either.
- sal_Unicode ch = rString.getStr()[0];
+ sal_Unicode ch = rString[0];
if (ch == 0x0d || ch == 0x0a)
return;
}
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 43c3d4d..5d4fc0d 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -2211,7 +2211,7 @@ OUString SvXMLExport::GetRelativeReference(const OUString& rValue)
// #i65474# handling of fragment URLs ("#....") is undefined
// they are stored 'as is'
uno::Reference< uri::XUriReference > xUriRef;
- if(!sValue.isEmpty() && sValue.getStr()[0] != '#')
+ if(!sValue.isEmpty() && sValue[0] != '#')
{
try
{
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 4aa64f3..834da3d 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -1225,7 +1225,7 @@ namespace xmloff
OSL_ENSURE(_rValue.getLength() == 1, "OPasswordImport::handleAttribute: invalid echo char attribute!");
// we ourself should not have written values other than of length 1
if (_rValue.getLength() >= 1)
- aEchoChar.Value <<= (sal_Int16)_rValue.getStr()[0];
+ aEchoChar.Value <<= (sal_Int16)_rValue[0];
else
aEchoChar.Value <<= (sal_Int16)0;
implPushBackPropertyValue(aEchoChar);
@@ -2015,9 +2015,7 @@ namespace xmloff
nElementLength = sElement.getLength();
// when writing the sequence, we quoted the single elements with " characters
- OSL_ENSURE( (nElementLength >= 2)
- && (sElement.getStr()[0] == '"')
- && (sElement.getStr()[nElementLength - 1] == '"'),
+ OSL_ENSURE( sElement.startsWith("\"") && sElement.endsWith("\""),
"OFormImport::implTranslateStringListProperty: invalid quoted element name.");
sElement = sElement.copy(1, nElementLength - 2);
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index 74bcc18..bcfc3db 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -3826,7 +3826,7 @@ void XMLAnnotationImportContext::PrepareField(
if ( sBuffer.getLength() )
{
// delete last paragraph mark (if necessary)
- if (sal_Char(0x0a) == sBuffer.getStr()[sBuffer.getLength()-1])
+ if (sal_Char(0x0a) == sBuffer[sBuffer.getLength()-1])
sBuffer = sBuffer.copy(0, sBuffer.getLength()-1);
xPropertySet->setPropertyValue(sPropertyContent, makeAny(sBuffer));
}
diff --git a/xmloff/source/xforms/XFormsBindContext.cxx b/xmloff/source/xforms/XFormsBindContext.cxx
index 1236cad..2a9f021 100644
--- a/xmloff/source/xforms/XFormsBindContext.cxx
+++ b/xmloff/source/xforms/XFormsBindContext.cxx
@@ -162,7 +162,7 @@ static void lcl_fillNamespaceContainer(
// as a hack, we will ignore our own 'default' namespaces
DBG_ASSERT( !sPrefix.isEmpty(), "no prefix?" );
- if( sPrefix.getStr()[0] != sal_Unicode( '_' ) &&
+ if( !sPrefix.startsWith("_") &&
nKeyIter >= XML_OLD_NAMESPACE_META_IDX )
{
// insert prefix (use replace if already known)
More information about the Libreoffice-commits
mailing list