summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2017-05-28 19:41:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-17 11:55:13 +0200
commit9881bea8d41997fb46579eb5f0314300159c96cc (patch)
treef52daa7055d2d28959e2d1ad576d963b7c0d3b2d
parentec4034c4a4f23574401ba2a74b635d9ed4befbc8 (diff)
remove unnecessary use of OUString::getStr
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4 Reviewed-on: https://gerrit.libreoffice.org/38114 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--basic/source/classes/sbunoobj.cxx10
-rw-r--r--basic/source/runtime/methods.cxx7
-rw-r--r--chart2/source/controller/dialogs/ObjectNameProvider.cxx6
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx5
-rw-r--r--comphelper/source/misc/docpasswordhelper.cxx5
-rw-r--r--comphelper/source/misc/string.cxx4
-rw-r--r--connectivity/source/commontools/FValue.cxx4
-rw-r--r--connectivity/source/drivers/dbase/DTable.cxx2
-rw-r--r--connectivity/source/drivers/odbc/OConnection.cxx4
-rw-r--r--connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx2
-rw-r--r--connectivity/source/drivers/odbc/OResultSet.cxx8
-rw-r--r--cppuhelper/source/factory.cxx3
-rw-r--r--dbaccess/source/ui/dlg/DbAdminImpl.cxx2
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx2
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx2
-rw-r--r--editeng/source/editeng/impedit2.cxx10
-rw-r--r--extensions/source/dbpilots/gridwizard.cxx2
-rw-r--r--extensions/source/propctrlr/eventhandler.cxx6
-rw-r--r--extensions/source/propctrlr/pcrcommon.cxx2
-rw-r--r--extensions/source/propctrlr/selectlabeldialog.cxx2
-rw-r--r--framework/source/recording/dispatchrecorder.cxx4
-rw-r--r--i18npool/source/breakiterator/gendict.cxx15
-rw-r--r--i18npool/source/indexentry/genindex_data.cxx5
-rw-r--r--i18npool/source/textconversion/genconv_dict.cxx20
-rw-r--r--include/comphelper/stl_types.hxx4
-rw-r--r--include/tools/inetmime.hxx2
-rw-r--r--jvmfwk/plugins/sunmajor/pluginlib/util.cxx2
-rw-r--r--jvmfwk/source/fwkutil.cxx4
-rw-r--r--linguistic/source/dlistimp.cxx2
-rw-r--r--pyuno/source/module/pyuno_module.cxx2
-rw-r--r--registry/source/keyimpl.cxx2
-rw-r--r--reportdesign/source/ui/dlg/AddField.cxx2
-rw-r--r--reportdesign/source/ui/dlg/Formula.cxx2
-rw-r--r--reportdesign/source/ui/inspection/DefaultInspection.cxx5
-rw-r--r--sal/osl/unx/file_path_helper.cxx4
-rw-r--r--sax/source/expatwrap/saxwriter.cxx24
-rw-r--r--sc/source/core/tool/compiler.cxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx7
-rw-r--r--scaddins/source/analysis/analysishelper.cxx5
-rw-r--r--sd/source/filter/eppt/epptso.cxx2
-rw-r--r--sfx2/source/dialog/basedlgs.cxx2
-rw-r--r--sfx2/source/dialog/filtergrouping.cxx5
-rw-r--r--sfx2/source/dialog/tabdlg.cxx2
-rw-r--r--shell/source/tools/lngconvex/lngconvex.cxx2
-rw-r--r--stoc/source/implementationregistration/implreg.cxx10
-rw-r--r--stoc/source/javavm/javavm.cxx2
-rw-r--r--svl/qa/unit/test_INetContentType.cxx6
-rw-r--r--svl/source/misc/inettype.cxx2
-rw-r--r--svtools/source/control/breadcrumb.cxx4
-rw-r--r--svtools/source/uno/wizard/unowizard.cxx2
-rw-r--r--svx/source/form/fmpage.cxx2
-rw-r--r--svx/source/form/fmshimp.cxx18
-rw-r--r--svx/source/form/fmsrcimp.cxx3
-rw-r--r--svx/source/form/navigatortree.cxx3
-rw-r--r--svx/source/form/tabwin.cxx2
-rw-r--r--svx/source/items/hlnkitem.cxx2
-rw-r--r--sw/source/core/access/accpara.cxx7
-rw-r--r--sw/source/core/crsr/crsrsh.cxx2
-rw-r--r--sw/source/core/edit/edlingu.cxx4
-rw-r--r--sw/source/core/txtnode/txtedt.cxx2
-rw-r--r--sw/source/core/unocore/unochart.cxx2
-rw-r--r--sw/source/uibase/uiview/viewling.cxx2
-rw-r--r--tools/qa/cppunit/test_inetmime.cxx12
-rw-r--r--tools/source/fsys/urlobj.cxx2
-rw-r--r--tools/source/inet/inetmime.cxx4
-rw-r--r--ucb/source/ucp/hierarchy/hierarchyuri.hxx3
-rw-r--r--ucb/source/ucp/package/pkguri.hxx3
-rw-r--r--unodevtools/source/skeletonmaker/cppcompskeleton.cxx2
-rw-r--r--unotools/source/misc/fontdefs.cxx2
-rw-r--r--unotools/source/ucbhelper/tempfile.cxx2
-rw-r--r--uui/source/passwordcontainer.cxx10
-rw-r--r--vcl/source/control/field2.cxx11
-rw-r--r--vcl/source/window/builder.cxx3
-rw-r--r--writerfilter/source/dmapper/ConversionHelper.cxx2
-rw-r--r--xmlhelp/source/cxxhelp/provider/databases.cxx7
-rw-r--r--xmlhelp/source/cxxhelp/provider/urlparameter.cxx8
-rw-r--r--xmlhelp/source/treeview/tvread.cxx8
-rw-r--r--xmloff/source/draw/xexptran.cxx6
-rw-r--r--xmloff/source/forms/propertyimport.cxx5
79 files changed, 162 insertions, 217 deletions
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index e90b52ea412c..1edf4bb1c527 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -1201,7 +1201,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property const * pUn
{
Reference< XInterface > xRef;
OUString aClassName = xIdlTargetClass->getName();
- Type aClassType( xIdlTargetClass->getTypeClass(), aClassName.getStr() );
+ Type aClassType( xIdlTargetClass->getTypeClass(), aClassName );
aRetVal.setValue( &xRef, aClassType );
}
else
@@ -1271,7 +1271,7 @@ Any sbxToUnoValue( const SbxValue* pVar, const Type& rType, Property const * pUn
if( xIdlClass.is() )
{
OUString aClassName = xIdlClass->getName();
- Type aType( xIdlClass->getTypeClass(), aClassName.getStr() );
+ Type aType( xIdlClass->getTypeClass(), aClassName );
aRetVal <<= aType;
}
}
@@ -1550,7 +1550,7 @@ OUString Impl_GetInterfaceInfo( const Reference< XInterface >& x, const Referenc
aRetStr.append( " " );
aRetStr.append( xClass->getName() );
OUString aClassName = xClass->getName();
- Type aClassType( xClass->getTypeClass(), aClassName.getStr() );
+ Type aClassType( xClass->getTypeClass(), aClassName );
// checking if the interface is really supported
if( !x->queryInterface( aClassType ).hasValue() )
@@ -3076,7 +3076,7 @@ void RTL_Impl_HasInterfaces( SbxArray& rPar )
}
// check if the interface will be supported
OUString aClassName = xClass->getName();
- Type aClassType( xClass->getTypeClass(), aClassName.getStr() );
+ Type aClassType( xClass->getTypeClass(), aClassName );
if( !(*x)->queryInterface( aClassType ).hasValue() )
{
return;
@@ -4053,7 +4053,7 @@ void SbRtl_CreateUnoListener(StarBASIC * pBasic, SbxArray & rPar, bool)
return;
OUString aClassName = xClass->getName();
- Type aClassType( xClass->getTypeClass(), aClassName.getStr() );
+ Type aClassType( xClass->getTypeClass(), aClassName );
aTmp = xLst->queryInterface( aClassType );
if( !aTmp.hasValue() )
return;
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 16e3d225be33..62bc21ba8246 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -3520,9 +3520,7 @@ void SbRtl_Shell(StarBASIC *, SbxArray & rPar, bool)
// #72471 work parameter(s) up
std::list<OUString>::const_iterator iter = aTokenList.begin();
- const OUString& rStr = *iter;
- OUString aOUStrProg( rStr.getStr(), rStr.getLength() );
- OUString aOUStrProgURL = getFullPath( aOUStrProg );
+ OUString aOUStrProgURL = getFullPath( *iter );
++iter;
@@ -3534,9 +3532,8 @@ void SbRtl_Shell(StarBASIC *, SbxArray & rPar, bool)
for(int iList = 0; iter != aTokenList.end(); ++iList, ++iter)
{
const OUString& rParamStr = (*iter);
- const OUString aTempStr( rParamStr.getStr(), rParamStr.getLength());
pParamList[iList] = nullptr;
- rtl_uString_assign(&(pParamList[iList]), aTempStr.pData);
+ rtl_uString_assign(&(pParamList[iList]), rParamStr.pData);
}
}
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index d61da98eab4b..89106b0a4795 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -567,8 +567,7 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe
OUString aXName ("x"), aYName ("f(x)");
const LocaleDataWrapper& rLocaleDataWrapper = Application::GetSettings().GetLocaleDataWrapper();
const OUString& aNumDecimalSep = rLocaleDataWrapper.getNumDecimalSep();
- assert(aNumDecimalSep.getLength() > 0);
- sal_Unicode cDecSeparator = aNumDecimalSep.getStr()[0];
+ sal_Unicode cDecSeparator = aNumDecimalSep[0];
uno::Reference< beans::XPropertySet > xProperties( xCurve, uno::UNO_QUERY );
if ( xProperties.is())
@@ -668,8 +667,7 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe
const LocaleDataWrapper& rLocaleDataWrapper = Application::GetSettings().GetLocaleDataWrapper();
const OUString& aNumDecimalSep = rLocaleDataWrapper.getNumDecimalSep();
- assert(aNumDecimalSep.getLength() > 0);
- sal_Unicode cDecSeparator = aNumDecimalSep.getStr()[0];
+ sal_Unicode cDecSeparator = aNumDecimalSep[0];
OUString aWildcard( "%AVERAGE_VALUE" );
sal_Int32 nIndex = aRet.indexOf( aWildcard );
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index ba3ac187a80c..822523d3266b 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -396,7 +396,7 @@ OUString VSeriesPlotter::getLabelTextForValue( VDataSeries const & rDataSeries
const LocaleDataWrapper& rLocaleDataWrapper = Application::GetSettings().GetLocaleDataWrapper();
const OUString& aNumDecimalSep = rLocaleDataWrapper.getNumDecimalSep();
assert(aNumDecimalSep.getLength() > 0);
- sal_Unicode cDecSeparator = aNumDecimalSep.getStr()[0];
+ sal_Unicode cDecSeparator = aNumDecimalSep[0];
aNumber = ::rtl::math::doubleToUString( fValue, rtl_math_StringFormat_G /*rtl_math_StringFormat*/
, 3/*DecPlaces*/ , cDecSeparator );
}
@@ -1286,8 +1286,7 @@ void VSeriesPlotter::createRegressionCurveEquationShapes(
{
const LocaleDataWrapper& rLocaleDataWrapper = Application::GetSettings().GetLocaleDataWrapper();
const OUString& aNumDecimalSep = rLocaleDataWrapper.getNumDecimalSep();
- assert(aNumDecimalSep.getLength() > 0);
- sal_Unicode aDecimalSep = aNumDecimalSep.getStr()[0];
+ sal_Unicode aDecimalSep = aNumDecimalSep[0];
aFormula.append( ::rtl::math::doubleToUString(
fR*fR, rtl_math_StringFormat_G, 4, aDecimalSep, true ));
}
diff --git a/comphelper/source/misc/docpasswordhelper.cxx b/comphelper/source/misc/docpasswordhelper.cxx
index 0ca3c01a55ab..ecf16fa2d3df 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -181,13 +181,12 @@ sal_uInt32 DocPasswordHelper::GetWordHashAsUINT32(
sal_uInt16 nHighResult = pInitialCode[nLen - 1];
sal_uInt16 nLowResult = 0;
- const sal_Unicode* pStr = aUString.getStr();
for ( sal_uInt32 nInd = 0; nInd < nLen; nInd++ )
{
// NO Encoding during conversion!
// The specification says that the low byte should be used in case it is not NULL
- char nHighChar = (char)( pStr[nInd] >> 8 );
- char nLowChar = (char)( pStr[nInd] & 0xFF );
+ char nHighChar = (char)( aUString[nInd] >> 8 );
+ char nLowChar = (char)( aUString[nInd] & 0xFF );
char nChar = nLowChar ? nLowChar : nHighChar;
for ( int nMatrixInd = 0; nMatrixInd < 7; ++nMatrixInd )
diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx
index 2728e0bca12b..be1f49b7236c 100644
--- a/comphelper/source/misc/string.cxx
+++ b/comphelper/source/misc/string.cxx
@@ -459,7 +459,6 @@ OUString removeAny(OUString const& rIn,
OUString setToken(const OUString& rIn, sal_Int32 nToken, sal_Unicode cTok,
const OUString& rNewToken)
{
- const sal_Unicode* pStr = rIn.getStr();
sal_Int32 nLen = rIn.getLength();
sal_Int32 nTok = 0;
sal_Int32 nFirstChar = 0;
@@ -469,7 +468,7 @@ OUString setToken(const OUString& rIn, sal_Int32 nToken, sal_Unicode cTok,
while ( i < nLen )
{
// Increase token count if match
- if (*pStr == cTok)
+ if (rIn[i] == cTok)
{
++nTok;
@@ -479,7 +478,6 @@ OUString setToken(const OUString& rIn, sal_Int32 nToken, sal_Unicode cTok,
break;
}
- ++pStr;
++i;
}
diff --git a/connectivity/source/commontools/FValue.cxx b/connectivity/source/commontools/FValue.cxx
index 55b639eab9d6..9bd18eef6df6 100644
--- a/connectivity/source/commontools/FValue.cxx
+++ b/connectivity/source/commontools/FValue.cxx
@@ -1867,8 +1867,8 @@ Sequence<sal_Int8> ORowSetValue::getSequence() const
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
{
- OUString sVal(m_aValue.m_pString);
- aSeq = Sequence<sal_Int8>(reinterpret_cast<const sal_Int8*>(sVal.getStr()),sizeof(sal_Unicode)*sVal.getLength());
+ aSeq = Sequence<sal_Int8>(reinterpret_cast<const sal_Int8*>(m_aValue.m_pString->buffer),
+ sizeof(sal_Unicode) * m_aValue.m_pString->length);
}
break;
case DataType::BINARY:
diff --git a/connectivity/source/drivers/dbase/DTable.cxx b/connectivity/source/drivers/dbase/DTable.cxx
index 297c2933f122..8f8f0f0543dc 100644
--- a/connectivity/source/drivers/dbase/DTable.cxx
+++ b/connectivity/source/drivers/dbase/DTable.cxx
@@ -1006,7 +1006,7 @@ bool ODbaseTable::CreateImpl()
if ( aIdent.lastIndexOf('/') != (aIdent.getLength()-1) )
aIdent += "/";
aIdent += m_Name;
- aName = aIdent.getStr();
+ aName = aIdent;
}
aURL.SetURL(aName);
diff --git a/connectivity/source/drivers/odbc/OConnection.cxx b/connectivity/source/drivers/odbc/OConnection.cxx
index eac88ca27899..711fc1b96a5b 100644
--- a/connectivity/source/drivers/odbc/OConnection.cxx
+++ b/connectivity/source/drivers/odbc/OConnection.cxx
@@ -297,7 +297,7 @@ OUString SAL_CALL OConnection::nativeSQL( const OUString& sql )
{
::osl::MutexGuard aGuard( m_aMutex );
- OString aSql(OUStringToOString(sql.getStr(),getTextEncoding()));
+ OString aSql(OUStringToOString(sql,getTextEncoding()));
char pOut[2048];
SQLINTEGER nOutLen;
OTools::ThrowException(this,N3SQLNativeSql(m_aConnectionHandle,reinterpret_cast<SDB_ODBC_CHAR *>(const_cast<char *>(aSql.getStr())),aSql.getLength(),reinterpret_cast<SDB_ODBC_CHAR*>(pOut),sizeof pOut - 1,&nOutLen),m_aConnectionHandle,SQL_HANDLE_DBC,*this);
@@ -391,7 +391,7 @@ void SAL_CALL OConnection::setCatalog( const OUString& catalog )
checkDisposed(OConnection_BASE::rBHelper.bDisposed);
- OString aCat(OUStringToOString(catalog.getStr(),getTextEncoding()));
+ OString aCat(OUStringToOString(catalog,getTextEncoding()));
OTools::ThrowException(this,
N3SQLSetConnectAttr(m_aConnectionHandle,SQL_ATTR_CURRENT_CATALOG,const_cast<char *>(aCat.getStr()),SQL_NTS),
m_aConnectionHandle,SQL_HANDLE_DBC,*this);
diff --git a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
index e52999a2a007..a5ee72690dde 100644
--- a/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
+++ b/connectivity/source/drivers/odbc/ODatabaseMetaDataResultSet.cxx
@@ -252,7 +252,7 @@ Sequence< sal_Int8 > SAL_CALL ODatabaseMetaDataResultSet::getBytes( sal_Int32 co
case DataType::VARCHAR:
case DataType::LONGVARCHAR:
{
- OUString aRet = OTools::getStringValue(m_pConnection.get(),m_aStatementHandle,columnIndex,SQL_C_BINARY,m_bWasNull,**this,m_nTextEncoding);
+ OUString const & aRet = OTools::getStringValue(m_pConnection.get(),m_aStatementHandle,columnIndex,SQL_C_BINARY,m_bWasNull,**this,m_nTextEncoding);
return Sequence<sal_Int8>(reinterpret_cast<const sal_Int8*>(aRet.getStr()),sizeof(sal_Unicode)*aRet.getLength());
}
}
diff --git a/connectivity/source/drivers/odbc/OResultSet.cxx b/connectivity/source/drivers/odbc/OResultSet.cxx
index dec1e86ef635..b9089952dd6a 100644
--- a/connectivity/source/drivers/odbc/OResultSet.cxx
+++ b/connectivity/source/drivers/odbc/OResultSet.cxx
@@ -481,8 +481,7 @@ Sequence< sal_Int8 > SAL_CALL OResultSet::getBytes( sal_Int32 columnIndex )
break;
default:
{
- OUString sRet;
- sRet = m_aRow[columnIndex].getString();
+ OUString const & sRet = m_aRow[columnIndex].getString();
nRet = Sequence<sal_Int8>(reinterpret_cast<const sal_Int8*>(sRet.getStr()),sizeof(sal_Unicode)*sRet.getLength());
}
}
@@ -501,7 +500,7 @@ Sequence< sal_Int8 > OResultSet::impl_getBytes( sal_Int32 columnIndex )
case SQL_CHAR:
case SQL_LONGVARCHAR:
{
- OUString aRet = OTools::getStringValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,nColumnType,m_bWasNull,**this,m_nTextEncoding);
+ OUString const & aRet = OTools::getStringValue(m_pStatement->getOwnConnection(),m_aStatementHandle,columnIndex,nColumnType,m_bWasNull,**this,m_nTextEncoding);
return Sequence<sal_Int8>(reinterpret_cast<const sal_Int8*>(aRet.getStr()),sizeof(sal_Unicode)*aRet.getLength());
}
default:
@@ -1787,8 +1786,7 @@ void OResultSet::fillNeededData(SQLRETURN _nRet)
break;
case SQL_WLONGVARCHAR:
{
- OUString sRet;
- sRet = m_aRow[nColumnIndex].getString();
+ OUString const & sRet = m_aRow[nColumnIndex].getString();
N3SQLPutData (m_aStatementHandle, static_cast<SQLPOINTER>(const_cast<sal_Unicode *>(sRet.getStr())), sizeof(sal_Unicode)*sRet.getLength());
break;
}
diff --git a/cppuhelper/source/factory.cxx b/cppuhelper/source/factory.cxx
index 649024f667d8..3b5dafe92cdd 100644
--- a/cppuhelper/source/factory.cxx
+++ b/cppuhelper/source/factory.cxx
@@ -700,9 +700,8 @@ Reference< XInterface > ORegistryFactoryHelper::createModuleFactory()
{
aActivatorUrl = xActivatorKey->getAsciiValue();
- OUString tmpActivator(aActivatorUrl.getStr());
sal_Int32 nIndex = 0;
- aActivatorName = tmpActivator.getToken(0, ':', nIndex );
+ aActivatorName = aActivatorUrl.getToken(0, ':', nIndex );
Reference<XRegistryKey > xLocationKey = xImplementationKey->openKey(
"/UNO/LOCATION" );
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index cfbf50eafebb..92d0a7d2ec8f 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -842,7 +842,7 @@ Any ODbDataSourceAdministrationHelper::implTranslateProperty(const SfxPoolItem*
if ( pStringItem )
{
- aValue <<= OUString( pStringItem->GetValue().getStr() );
+ aValue <<= pStringItem->GetValue();
}
else if ( pBoolItem )
{
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index 62e1992d2060..ec1fb3af12b7 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -165,7 +165,7 @@ namespace dbaui
if (xMeta.is())
qualifiedNameComponents(xMeta, pIncludeTable->getStr(), sCatalog, sSchema, sName,::dbtools::EComposeRule::InDataManipulation);
else
- sName = pIncludeTable->getStr();
+ sName = *pIncludeTable;
bool bAllTables = (1 == sName.getLength()) && ('%' == sName[0]);
bool bAllSchemas = (1 == sSchema.getLength()) && ('%' == sSchema[0]);
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index bedc5da073ce..073547645c08 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -2068,7 +2068,7 @@ namespace accessibility
if( nIndex <= aBoundary.endPos )
{
nextWord = aBoundary.endPos;
- if( sText.getStr()[nextWord] == u' ' ) nextWord++;
+ if( sText[nextWord] == u' ' ) nextWord++;
bWord = implGetWordBoundary( aBoundary, nextWord );
}
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 992913c03525..eaec3beb77bd 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -959,13 +959,11 @@ EditPaM ImpEditEngine::CursorVisualStartEnd( EditView const * pEditView, const E
{
OUString aLine = aPaM.GetNode()->GetString().copy(rLine.GetStart(), rLine.GetEnd() - rLine.GetStart());
- const sal_Unicode* pLineString = aLine.getStr();
-
UErrorCode nError = U_ZERO_ERROR;
UBiDi* pBidi = ubidi_openSized( aLine.getLength(), 0, &nError );
const UBiDiLevel nBidiLevel = IsRightToLeft( nPara ) ? 1 /*RTL*/ : 0 /*LTR*/;
- ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(pLineString), aLine.getLength(), nBidiLevel, nullptr, &nError );
+ ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aLine.getStr()), aLine.getLength(), nBidiLevel, nullptr, &nError );
sal_Int32 nVisPos = bStart ? 0 : aLine.getLength()-1;
const sal_Int32 nLogPos = ubidi_getLogicalIndex( pBidi, nVisPos, &nError );
@@ -1080,13 +1078,11 @@ EditPaM ImpEditEngine::CursorVisualLeftRight( EditView const * pEditView, const
OUString aLine = aPaM.GetNode()->GetString().copy(rLine.GetStart(), rLine.GetEnd() - rLine.GetStart());
const sal_Int32 nPosInLine = aPaM.GetIndex() - rLine.GetStart();
- const sal_Unicode* pLineString = aLine.getStr();
-
UErrorCode nError = U_ZERO_ERROR;
UBiDi* pBidi = ubidi_openSized( aLine.getLength(), 0, &nError );
const UBiDiLevel nBidiLevel = IsRightToLeft( nPara ) ? 1 /*RTL*/ : 0 /*LTR*/;
- ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(pLineString), aLine.getLength(), nBidiLevel, nullptr, &nError );
+ ubidi_setPara( pBidi, reinterpret_cast<const UChar *>(aLine.getStr()), aLine.getLength(), nBidiLevel, nullptr, &nError );
if ( !pEditView->IsInsertMode() )
{
@@ -1931,10 +1927,8 @@ void ImpEditEngine::InitWritingDirections( sal_Int32 nPara )
const UBiDiLevel nBidiLevel = IsRightToLeft( nPara ) ? 1 /*RTL*/ : 0 /*LTR*/;
if ( ( bCTL || ( nBidiLevel == 1 /*RTL*/ ) ) && pParaPortion->GetNode()->Len() )
{
-
OUString aText = pParaPortion->GetNode()->GetString();
-
// Bidi functions from icu 2.0
UErrorCode nError = U_ZERO_ERROR;
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx
index efb95571eed2..94880bd20a2f 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -214,7 +214,7 @@ namespace dbp
{
SAL_WARN( "extensions.dbpilots", "OGridWizard::implApplySettings: "
"unexpected exception while creating the grid column for field " <<
- pFormFieldName->getStr() << "!" );
+ *pFormFieldName );
}
}
}
diff --git a/extensions/source/propctrlr/eventhandler.cxx b/extensions/source/propctrlr/eventhandler.cxx
index fe01b84ba6aa..35fb2a3ae551 100644
--- a/extensions/source/propctrlr/eventhandler.cxx
+++ b/extensions/source/propctrlr/eventhandler.cxx
@@ -216,11 +216,7 @@ namespace pcr
OUString lcl_getEventPropertyName( const OUString& _rListenerClassName, const OUString& _rMethodName )
{
- OUStringBuffer aPropertyName;
- aPropertyName.append( _rListenerClassName );
- aPropertyName.append( ';' );
- aPropertyName.append( _rMethodName.getStr() );
- return aPropertyName.makeStringAndClear();
+ return _rListenerClassName + OUStringLiteral1(';') + _rMethodName;
}
ScriptEventDescriptor lcl_getAssignedScriptEvent( const EventDescription& _rEvent, const std::vector< ScriptEventDescriptor >& _rAllAssignedMacros )
diff --git a/extensions/source/propctrlr/pcrcommon.cxx b/extensions/source/propctrlr/pcrcommon.cxx
index 6dbfae996320..cc47c64515fa 100644
--- a/extensions/source/propctrlr/pcrcommon.cxx
+++ b/extensions/source/propctrlr/pcrcommon.cxx
@@ -53,7 +53,7 @@ namespace pcr
INetURLObject aHID( aTmp );
if ( aHID.GetProtocol() == INetProtocol::NotValid )
aBuffer.append( INET_HID_SCHEME );
- aBuffer.append( aTmp.getStr() );
+ aBuffer.append( aTmp );
return aBuffer.makeStringAndClear();
}
diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx b/extensions/source/propctrlr/selectlabeldialog.cxx
index f38ce6c48777..a2ef815cdfff 100644
--- a/extensions/source/propctrlr/selectlabeldialog.cxx
+++ b/extensions/source/propctrlr/selectlabeldialog.cxx
@@ -187,7 +187,7 @@ namespace pcr
if (!::comphelper::hasProperty(PROPERTY_NAME, xAsSet))
// we need at least a name for displaying ...
continue;
- sName = ::comphelper::getString(xAsSet->getPropertyValue(PROPERTY_NAME)).getStr();
+ sName = ::comphelper::getString(xAsSet->getPropertyValue(PROPERTY_NAME));
// we need to check if the control model supports the required service
Reference< XServiceInfo > xInfo(xAsSet, UNO_QUERY);
diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx
index 7cc4ef5a31a1..2446e02b8368 100644
--- a/framework/source/recording/dispatchrecorder.cxx
+++ b/framework/source/recording/dispatchrecorder.cxx
@@ -357,13 +357,13 @@ void SAL_CALL DispatchRecorder::implts_recordMacro( const OUString& aURL,
if(bAsComment)
aScriptBuffer.append(REM_AS_COMMENT);
aScriptBuffer.append("dispatcher.executeDispatch(document, \"");
- aScriptBuffer.append (aURL);
+ aScriptBuffer.append(aURL);
aScriptBuffer.append("\", \"\", 0, ");
if(nValidArgs<1)
aScriptBuffer.append("Array()");
else
{
- aScriptBuffer.append( sArrayName.getStr() );
+ aScriptBuffer.append( sArrayName );
aScriptBuffer.append("()");
}
aScriptBuffer.append(")\n\n");
diff --git a/i18npool/source/breakiterator/gendict.cxx b/i18npool/source/breakiterator/gendict.cxx
index 16950287d82b..dd3376835dd1 100644
--- a/i18npool/source/breakiterator/gendict.cxx
+++ b/i18npool/source/breakiterator/gendict.cxx
@@ -121,7 +121,6 @@ static inline void printDataArea(FILE *dictionary_fp, FILE *source_fp, vector<sa
// input file is in UTF-8 encoding
// don't convert last new line character to Ostr.
OUString Ostr(str, strlen(str) - 1, RTL_TEXTENCODING_UTF8);
- const sal_Unicode *u = Ostr.getStr();
const sal_Int32 len = Ostr.getLength();
@@ -130,24 +129,24 @@ static inline void printDataArea(FILE *dictionary_fp, FILE *source_fp, vector<sa
if (len == i)
continue; // skip one character word
- if (u[0] != current) {
- OSL_ENSURE( (u[0] > current), "Dictionary file should be sorted");
- current = u[0];
+ if (Ostr[0] != current) {
+ OSL_ENSURE( (Ostr[0] > current), "Dictionary file should be sorted");
+ current = Ostr[0];
charArray[current] = lenArray.size();
}
lenArray.push_back(lenArrayCurr);
- set_exists(u[0]);
+ set_exists(Ostr[0]);
// first character is stored in charArray, so start from second
for (i = 1; i < len; i++, lenArrayCurr++) {
- set_exists(u[i]);
+ set_exists(Ostr[i]);
#ifndef DICT_JA_ZH_IN_DATAFILE
- fprintf(source_fp, "0x%04x, ", u[i]);
+ fprintf(source_fp, "0x%04x, ", Ostr[i]);
if ((lenArrayCurr & 0x0f) == 0x0f)
fputs("\n\t", source_fp);
#else
- fwrite(&u[i], sizeof(u[i]), 1, source_fp);
+ fwrite(&Ostr[i], sizeof(Ostr[i]), 1, source_fp);
#endif
}
}
diff --git a/i18npool/source/indexentry/genindex_data.cxx b/i18npool/source/indexentry/genindex_data.cxx
index a185d753462c..d505dc9b661f 100644
--- a/i18npool/source/indexentry/genindex_data.cxx
+++ b/i18npool/source/indexentry/genindex_data.cxx
@@ -119,7 +119,6 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
fprintf(fp, "\n};\n\n");
sal_Int32 len=result.getLength();
- const sal_Unicode *ustr=result.getStr();
fprintf(fp, "\nstatic const sal_uInt16 idx2[] = {");
for (i = k = 0; i <= max_index; i++) {
if (index[i] != 0xFFFF) {
@@ -129,7 +128,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
fprintf(
fp, "0x%04lx, ",
sal::static_int_cast< unsigned long >(
- ad == -1 ? 0 : max == 2 ? ustr[ad] : ad));
+ ad == -1 ? 0 : max == 2 ? result[ad] : ad));
}
fprintf(fp, "\n\t");
}
@@ -142,7 +141,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
fprintf(fp, "\nstatic const sal_uInt16 idx3[] = {");
for (i = k = 0; i < len; i++) {
if (k++ % 16 == 0) fprintf(fp, "\n\t");
- fprintf(fp, "0x%04x, ", (sep.toChar() == ustr[i]) ? 0 : ustr[i]);
+ fprintf(fp, "0x%04x, ", (sep.toChar() == result[i]) ? 0 : result[i]);
}
fprintf(fp, "\n};\n\n");
}
diff --git a/i18npool/source/textconversion/genconv_dict.cxx b/i18npool/source/textconversion/genconv_dict.cxx
index e6903a11f643..13c234670af3 100644
--- a/i18npool/source/textconversion/genconv_dict.cxx
+++ b/i18npool/source/textconversion/genconv_dict.cxx
@@ -101,19 +101,18 @@ void make_hhc_char(FILE *sfp, FILE *cfp)
// input file is in UTF-8 encoding (Hangul:Hanja)
// don't convert last new line character to Ostr.
OUString Ostr(Cstr, strlen(Cstr) - 1, RTL_TEXTENCODING_UTF8);
- const sal_Unicode *Ustr = Ostr.getStr();
sal_Int32 len = Ostr.getLength();
- Hangul2HanjaData[count][0] = Ustr[0];
+ Hangul2HanjaData[count][0] = Ostr[0];
Hangul2HanjaData[count][1] = sal::static_int_cast<sal_uInt16>( address );
Hangul2HanjaData[count][2] = sal::static_int_cast<sal_uInt16>( len - 2 );
count++;
for (i = 2; i < len; i++) {
- Hanja2HangulData[Ustr[i]] = Ustr[0];
+ Hanja2HangulData[Ostr[i]] = Ostr[0];
if (address++ % 16 == 0)
fprintf(cfp, "\n\t");
- fprintf(cfp, "0x%04x, ", Ustr[i]);
+ fprintf(cfp, "0x%04x, ", Ostr[i]);
}
}
fprintf(cfp, "\n};\n");
@@ -189,17 +188,16 @@ void make_stc_char(FILE *sfp, FILE *cfp)
// input file is in UTF-8 encoding (SChinese:TChinese)
// don't convert last new line character to Ostr.
OUString Ostr(Cstr, strlen(Cstr) - 1, RTL_TEXTENCODING_UTF8);
- const sal_Unicode *Ustr = Ostr.getStr();
sal_Int32 len = Ostr.getLength();
- if (Ustr[1] == 'v')
- SChinese2VChineseData[Ustr[0]] = Ustr[2];
+ if (Ostr[1] == 'v')
+ SChinese2VChineseData[Ostr[0]] = Ostr[2];
else {
- SChinese2TChineseData[Ustr[0]] = Ustr[2];
- if (SChinese2VChineseData[Ustr[0]] == 0)
- SChinese2VChineseData[Ustr[0]] = Ustr[2];
+ SChinese2TChineseData[Ostr[0]] = Ostr[2];
+ if (SChinese2VChineseData[Ostr[0]] == 0)
+ SChinese2VChineseData[Ostr[0]] = Ostr[2];
}
for (i = 2; i < len; i++)
- TChinese2SChineseData[Ustr[i]] = Ustr[0];
+ TChinese2SChineseData[Ostr[i]] = Ostr[0];
}
fprintf(cfp, "\nstatic const sal_uInt16 STC_CharIndex_S2T[] = {");
diff --git a/include/comphelper/stl_types.hxx b/include/comphelper/stl_types.hxx
index 77714d13dc4f..011a4f9b7f0d 100644
--- a/include/comphelper/stl_types.hxx
+++ b/include/comphelper/stl_types.hxx
@@ -42,9 +42,9 @@ public:
bool operator() (const OUString& x, const OUString& y) const
{
if (m_bCaseSensitive)
- return rtl_ustr_compare(x.getStr(), y.getStr()) < 0;
+ return x.compareTo(y) < 0;
else
- return rtl_ustr_compareIgnoreAsciiCase(x.getStr(), y.getStr()) < 0;
+ return x.compareToIgnoreAsciiCase(y) < 0;
}
bool isCaseSensitive() const {return m_bCaseSensitive;}
diff --git a/include/tools/inetmime.hxx b/include/tools/inetmime.hxx
index cd66173a8d6c..37a0288cd1d2 100644
--- a/include/tools/inetmime.hxx
+++ b/include/tools/inetmime.hxx
@@ -181,7 +181,7 @@ public:
parameters will be modified.
*/
static sal_Unicode const * scanContentType(
- sal_Unicode const *pBegin, sal_Unicode const * pEnd,
+ OUString const & rStr,
OUString * pType = nullptr, OUString * pSubType = nullptr,
INetContentTypeParameterList * pParameters = nullptr);
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
index 146ee5d75a97..f01c38c45cf1 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/util.cxx
@@ -774,7 +774,7 @@ void addJREInfoFromBinPath(
else
{
// jre/bin/jre -> jre/bin
- OUString sMapPath(i->getStr(), index);
+ OUString sMapPath = i->copy(0, index);
index = sBinPath.lastIndexOf(sMapPath);
if (index != -1
&& (index + sMapPath.getLength() == sBinPath.getLength())
diff --git a/jvmfwk/source/fwkutil.cxx b/jvmfwk/source/fwkutil.cxx
index 159ac52019b1..6f964580308b 100644
--- a/jvmfwk/source/fwkutil.cxx
+++ b/jvmfwk/source/fwkutil.cxx
@@ -175,8 +175,8 @@ rtl::ByteSequence decodeBase16(const rtl::ByteSequence& data)
OUString getDirFromFile(const OUString& usFilePath)
{
- sal_Int32 index= usFilePath.lastIndexOf('/');
- return OUString(usFilePath.getStr(), index);
+ sal_Int32 index = usFilePath.lastIndexOf('/');
+ return usFilePath.copy(0, index);
}
OUString getLibraryLocation()
diff --git a/linguistic/source/dlistimp.cxx b/linguistic/source/dlistimp.cxx
index 7c39c8316813..1c4d71187fa1 100644
--- a/linguistic/source/dlistimp.cxx
+++ b/linguistic/source/dlistimp.cxx
@@ -321,7 +321,7 @@ void DicList::SearchForDictionaries(
size_t nCount = rDicList.size();
for(j = 0; j < nCount; j++)
{
- aTmp2 = rDicList[j]->getName().getStr();
+ aTmp2 = rDicList[j]->getName();
aTmp2 = ToLower( aTmp2, nSystemLanguage );
if(aTmp1 == aTmp2)
break;
diff --git a/pyuno/source/module/pyuno_module.cxx b/pyuno/source/module/pyuno_module.cxx
index 40ed69e0191b..ffc369387c56 100644
--- a/pyuno/source/module/pyuno_module.cxx
+++ b/pyuno/source/module/pyuno_module.cxx
@@ -212,7 +212,7 @@ OUString getLibDir()
if( Module::getUrlFromAddress(
reinterpret_cast< oslGenericFunction >(getLibDir), libDir ) )
{
- libDir = OUString( libDir.getStr(), libDir.lastIndexOf('/' ) );
+ libDir = libDir.copy( 0, libDir.lastIndexOf('/') );
OUString name ( "PYUNOLIBDIR" );
rtl_bootstrap_set( name.pData, libDir.pData );
}
diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx
index 1d687a61efd2..eb2172d1c512 100644
--- a/registry/source/keyimpl.cxx
+++ b/registry/source/keyimpl.cxx
@@ -1036,7 +1036,7 @@ OUString ORegKey::getFullPath(OUString const & path) const {
OUStringBuffer b(m_name);
if (!b.isEmpty() && b[b.getLength() - 1] == '/') {
if (path[0] == '/') {
- b.append(path.getStr() + 1, path.getLength() - 1);
+ b.append(path.copy(1));
} else {
b.append(path);
}
diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx
index 8d884a4b10ec..1b35b75d628c 100644
--- a/reportdesign/source/ui/dlg/AddField.cxx
+++ b/reportdesign/source/ui/dlg/AddField.cxx
@@ -357,7 +357,7 @@ void OAddFieldWindow::Update()
lcl_addToList( *m_pListBox, aParamNames );
// set title
- aTitle += " " + OUString( m_aCommandName.getStr() );
+ aTitle += " " + m_aCommandName;
SetText( aTitle );
if ( !m_aCommandName.isEmpty() )
{
diff --git a/reportdesign/source/ui/dlg/Formula.cxx b/reportdesign/source/ui/dlg/Formula.cxx
index aa82762f1956..5a5e15a1be82 100644
--- a/reportdesign/source/ui/dlg/Formula.cxx
+++ b/reportdesign/source/ui/dlg/Formula.cxx
@@ -218,7 +218,7 @@ void FormulaDialog::ToggleCollapsed( RefEdit* _pEdit, RefButton* _pButton)
SvtViewOptions aDlgOpt( EViewType::Window, HID_RPT_FIELD_SEL_WIN );
if ( aDlgOpt.Exists() )
{
- m_pAddField->SetWindowState(OUStringToOString(aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US));
+ m_pAddField->SetWindowState(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US));
}
diff --git a/reportdesign/source/ui/inspection/DefaultInspection.cxx b/reportdesign/source/ui/inspection/DefaultInspection.cxx
index 97f300808af0..caf8e0be27ad 100644
--- a/reportdesign/source/ui/inspection/DefaultInspection.cxx
+++ b/reportdesign/source/ui/inspection/DefaultInspection.cxx
@@ -33,12 +33,9 @@ namespace rptui
{
OUString HelpIdUrl::getHelpURL( const OString& sHelpId )
{
- OUStringBuffer aBuffer;
OUString aTmp( OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8) );
DBG_ASSERT( INetURLObject( aTmp ).GetProtocol() == INetProtocol::NotValid, "Wrong HelpId!" );
- aBuffer.append( INET_HID_SCHEME );
- aBuffer.append( aTmp.getStr() );
- return aBuffer.makeStringAndClear();
+ return INET_HID_SCHEME + aTmp;
}
using namespace com::sun::star::uno;
diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx
index 4d1ecc588ee6..d042e5349aef 100644
--- a/sal/osl/unx/file_path_helper.cxx
+++ b/sal/osl/unx/file_path_helper.cxx
@@ -114,11 +114,11 @@ void SAL_CALL osl_systemPathGetFileNameOrLastDirectoryPart(
rtl::OUString last_part;
- if (path.getLength() > 1 || (path.getLength() == 1 && *path.getStr() != FPH_CHAR_PATH_SEPARATOR))
+ if (path.getLength() > 1 || (path.getLength() == 1 && path[0] != FPH_CHAR_PATH_SEPARATOR))
{
sal_Int32 idx_ps = path.lastIndexOf(FPH_CHAR_PATH_SEPARATOR);
idx_ps++; // always right to increment by one even if idx_ps == -1!
- last_part = rtl::OUString(path.getStr() + idx_ps);
+ last_part = path.copy(idx_ps);
}
rtl_uString_assign(ppustrFileNameOrLastDirPart, last_part.pData);
}
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index 29ad4bf376c3..71d3fba62547 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -791,13 +791,15 @@ inline bool SaxWriterHelper::comment(const OUString& rComment)
return bRet;
}
-inline sal_Int32 calcXMLByteLength( const sal_Unicode *pStr, sal_Int32 nStrLen,
+inline sal_Int32 calcXMLByteLength( const OUString& rStr,
bool bDoNormalization,
bool bNormalizeWhitespace )
{
sal_Int32 nOutputLength = 0;
sal_uInt32 nSurrogate = 0;
+ const sal_Unicode *pStr = rStr.getStr();
+ sal_Int32 nStrLen = rStr.getLength();
for( sal_Int32 i = 0 ; i < nStrLen ; i++ )
{
sal_uInt16 c = pStr[i];
@@ -1075,21 +1077,20 @@ void SAXWriter::startElement(const OUString& aName, const Reference< XAttributeL
sal_Int32 nAttribCount = xAttribs.is() ? xAttribs->getLength() : 0;
nLength ++; // "<"
- nLength += calcXMLByteLength( aName.getStr() , aName.getLength(),
- false, false ); // the tag name
+ nLength += calcXMLByteLength( aName, false, false ); // the tag name
sal_Int16 n;
for( n = 0 ; n < static_cast<sal_Int16>(nAttribCount) ; n ++ ) {
nLength ++; // " "
OUString tmp = xAttribs->getNameByIndex( n );
- nLength += calcXMLByteLength( tmp.getStr() , tmp.getLength() , false, false );
+ nLength += calcXMLByteLength( tmp, false, false );
nLength += 2; // ="
tmp = xAttribs->getValueByIndex( n );
- nLength += calcXMLByteLength( tmp.getStr(), tmp.getLength(), true, true );
+ nLength += calcXMLByteLength( tmp, true, true );
nLength += 1; // "
}
@@ -1149,7 +1150,7 @@ void SAXWriter::endElement(const OUString& aName)
// only ascii chars allowed
sal_Int32 nLength(0);
if (m_bAllowLineBreak)
- nLength = 3 + calcXMLByteLength( aName.getStr(), aName.getLength(), false, false );
+ nLength = 3 + calcXMLByteLength( aName, false, false );
sal_Int32 nPrefix = getIndentPrefixLength( nLength );
if( nPrefix >= 0 )
@@ -1191,8 +1192,7 @@ void SAXWriter::characters(const OUString& aChars)
{
sal_Int32 nFirstLineBreakOccurrence = getFirstLineBreak( aChars );
- nLength = calcXMLByteLength( aChars.getStr(), aChars.getLength(),
- ! m_bIsCDATA , false );
+ nLength = calcXMLByteLength( aChars, ! m_bIsCDATA , false );
nIndentPrefix = getIndentPrefixLength(
nFirstLineBreakOccurrence >= 0 ? nFirstLineBreakOccurrence : nLength );
}
@@ -1240,11 +1240,11 @@ void SAXWriter::processingInstruction(const OUString& aTarget, const OUString& a
if (m_bAllowLineBreak)
{
nLength = 2; // "<?"
- nLength += calcXMLByteLength( aTarget.getStr(), aTarget.getLength(), false, false );
+ nLength += calcXMLByteLength( aTarget, false, false );
nLength += 1; // " "
- nLength += calcXMLByteLength( aData.getStr(), aData.getLength(), false, false );
+ nLength += calcXMLByteLength( aData, false, false );
nLength += 2; // "?>"
}
@@ -1314,7 +1314,7 @@ void SAXWriter::comment(const OUString& sComment)
if (m_bAllowLineBreak)
{
nLength = 4; // "<!--"
- nLength += calcXMLByteLength( sComment.getStr(), sComment.getLength(), false, false);
+ nLength += calcXMLByteLength( sComment, false, false);
nLength += 3;
}
@@ -1358,7 +1358,7 @@ void SAXWriter::unknown(const OUString& sString)
sal_Int32 nLength(0);
if (m_bAllowLineBreak)
- nLength = calcXMLByteLength( sString.getStr(), sString.getLength(), false, false );
+ nLength = calcXMLByteLength( sString, false, false );
sal_Int32 nPrefix = getIndentPrefixLength( nLength );
if( nPrefix >= 0 )
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index dcd9f1e58280..ee2bd8034a17 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -4043,7 +4043,7 @@ void ScCompiler::AutoCorrectParsedSymbol()
OUString aOld( aRef[j] );
OUString aStr2;
const sal_Unicode* p = aRef[j].getStr();
- while ( *p && CharClass::isAsciiNumeric( OUString(*p) ) )
+ while ( *p && rtl::isAsciiDigit( *p ) )
aStr2 += OUStringLiteral1(*p++);
aRef[j] = OUString( p );
aRef[j] += aStr2;
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index f6f7ab9a552c..8a97aa949afb 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -3111,12 +3111,7 @@ void flushParagraph(
{
const editeng::Section& rSec = *it;
- const sal_Unicode* pBeg = rParaText.getStr();
- std::advance(pBeg, rSec.mnStart);
- const sal_Unicode* pEnd = pBeg;
- std::advance(pEnd, rSec.mnEnd-rSec.mnStart);
-
- OUString aContent(pBeg, pEnd-pBeg);
+ OUString aContent(rParaText.copy(rSec.mnStart, rSec.mnEnd - rSec.mnStart));
std::vector<XMLPropertyState> aPropStates;
const SvxFieldData* pField = toXMLPropertyStates(aPropStates, rSec.maAttributes, xMapper, rAttrMap);
diff --git a/scaddins/source/analysis/analysishelper.cxx b/scaddins/source/analysis/analysishelper.cxx
index 1225f20027ee..d8836e82ae79 100644
--- a/scaddins/source/analysis/analysishelper.cxx
+++ b/scaddins/source/analysis/analysishelper.cxx
@@ -2137,10 +2137,7 @@ sal_Int16 ConvertData::GetMatchingLevel( const OUString& rRef ) const
sal_Int32 nLen = rRef.getLength();
sal_Int32 nIndex = rRef.lastIndexOf( '^' );
if( nIndex > 0 && nIndex == ( nLen - 2 ) )
- {
- const sal_Unicode* p = aStr.getStr();
- aStr = OUString( p, nLen - 2 ) + OUStringLiteral1( p[ nLen - 1 ] );
- }
+ aStr = aStr.copy( 0, nLen - 2 ) + OUStringLiteral1( aStr[ nLen - 1 ] );
if( aName == aStr )
return 0;
else
diff --git a/sd/source/filter/eppt/epptso.cxx b/sd/source/filter/eppt/epptso.cxx
index d05734aecdb4..f8f3ff582417 100644
--- a/sd/source/filter/eppt/epptso.cxx
+++ b/sd/source/filter/eppt/epptso.cxx
@@ -2030,7 +2030,7 @@ void PPTWriter::ImplWritePage( const PHLayout& rLayout, EscherSolverContainer& a
sal_uInt8* pTmp = pBuf;
for ( sal_Int32 i = 0; i < aControlName.getLength(); i++ )
{
- sal_Unicode nUnicode = *(aControlName.getStr() + i);
+ sal_Unicode nUnicode = aControlName[i];
*pTmp++ = (sal_uInt8)nUnicode;
*pTmp++ = (sal_uInt8)( nUnicode >> 8 );
}
diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx
index 30a14417d389..fceeab0d7e50 100644
--- a/sfx2/source/dialog/basedlgs.cxx
+++ b/sfx2/source/dialog/basedlgs.cxx
@@ -130,7 +130,7 @@ void SfxModalDialog::GetDialogData_Impl()
if ( aDlgOpt.Exists() )
{
// load settings
- SetWindowState( OUStringToOString( aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US ) );
+ SetWindowState( OUStringToOString( aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US ) );
Any aUserItem = aDlgOpt.GetUserItem( USERITEM_NAME );
OUString aTemp;
if ( aUserItem >>= aTemp )
diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index e26ace875906..b8762a49318f 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -415,14 +415,13 @@ namespace sfx2
sal_Int32 nExistentPos = _rToBeExtended.indexOf( _rWC );
if ( -1 < nExistentPos )
{ // found this wildcard (already part of _rToBeExtended)
- const sal_Unicode* pBuffer = _rToBeExtended.getStr();
if ( ( 0 == nExistentPos )
- || ( s_cWildcardSeparator == pBuffer[ nExistentPos - 1 ] )
+ || ( s_cWildcardSeparator == _rToBeExtended[ nExistentPos - 1 ] )
)
{ // the wildcard really starts at this position (it starts at pos 0 or the previous character is a separator
sal_Int32 nExistentWCEnd = nExistentPos + _rWC.getLength();
if ( ( _rToBeExtended.getLength() == nExistentWCEnd )
- || ( s_cWildcardSeparator == pBuffer[ nExistentWCEnd ] )
+ || ( s_cWildcardSeparator == _rToBeExtended[ nExistentWCEnd ] )
)
{ // it's really the complete wildcard we found
// (not something like _rWC being "*.t" and _rToBeExtended containing "*.txt")
diff --git a/sfx2/source/dialog/tabdlg.cxx b/sfx2/source/dialog/tabdlg.cxx
index 046f7baae4bc..35bd6256b999 100644
--- a/sfx2/source/dialog/tabdlg.cxx
+++ b/sfx2/source/dialog/tabdlg.cxx
@@ -545,7 +545,7 @@ void SfxTabDialog::Start_Impl()
SvtViewOptions aDlgOpt(EViewType::TabDialog, OStringToOUString(GetHelpId(),RTL_TEXTENCODING_UTF8));
if ( aDlgOpt.Exists() )
{
- SetWindowState(OUStringToOString(aDlgOpt.GetWindowState().getStr(), RTL_TEXTENCODING_ASCII_US));
+ SetWindowState(OUStringToOString(aDlgOpt.GetWindowState(), RTL_TEXTENCODING_ASCII_US));
// initial TabPage from Program/Help/config
nActPage = (sal_uInt16)aDlgOpt.GetPageID();
diff --git a/shell/source/tools/lngconvex/lngconvex.cxx b/shell/source/tools/lngconvex/lngconvex.cxx
index 61884e65a8a5..c4e24aa55ea1 100644
--- a/shell/source/tools/lngconvex/lngconvex.cxx
+++ b/shell/source/tools/lngconvex/lngconvex.cxx
@@ -363,7 +363,7 @@ void read_ulf_file(const std::string& FileName, Substitutor& Substitutor)
// end work-around for #i32420#
- Config config(tmpfile_url.getStr());
+ Config config(tmpfile_url);
size_t grpcnt = config.GetGroupCount();
for (size_t i = 0; i < grpcnt; i++)
add_group_entries(config, config.GetGroupName(sal::static_int_cast<sal_uInt16>(i)), Substitutor);
diff --git a/stoc/source/implementationregistration/implreg.cxx b/stoc/source/implementationregistration/implreg.cxx
index 4e0e7a5697dd..3a08defbb377 100644
--- a/stoc/source/implementationregistration/implreg.cxx
+++ b/stoc/source/implementationregistration/implreg.cxx
@@ -166,7 +166,7 @@ void deleteAllLinkReferences(const Reference < XSimpleRegistry >& xReg,
xReg->getRootKey()->deleteLink(aLinkName);
- sEnd = rtl_ustr_lastIndexOfChar( aLinkName.getStr(), '/' );
+ sEnd = aLinkName.lastIndexOf( '/' );
aLinkParent = aLinkName.copy(0, sEnd);
@@ -180,7 +180,7 @@ void deleteAllLinkReferences(const Reference < XSimpleRegistry >& xReg,
xReg->getRootKey()->deleteKey(aLinkParent);
- sEnd = rtl_ustr_lastIndexOfChar( aLinkName.getStr(), '/' );
+ sEnd = aLinkName.lastIndexOf( '/' );
aLinkParent = aLinkName.copy(0, sEnd);
} else
@@ -685,7 +685,7 @@ void deleteAllImplementations( const Reference < XSimpleRegistry >& xReg,
{
hasLocationUrl = true;
- OUString implName(xImplKey->getKeyName().getStr() + 1);
+ OUString implName(xImplKey->getKeyName().copy(1));
sal_Int32 firstDot = implName.indexOf('/');
if (firstDot >= 0)
@@ -1054,7 +1054,7 @@ void prepareRegistry(
Sequence< Reference < XRegistryKey > > serviceKeys = xKey->openKeys();
const Reference < XRegistryKey > * pServiceKeys = serviceKeys.getConstArray();
- OUString implName = OUString(xImplKey->getKeyName().getStr() + 1);
+ OUString implName = xImplKey->getKeyName().copy(1);
sal_Int32 firstDot = implName.indexOf('/');
if (firstDot >= 0)
@@ -1147,7 +1147,7 @@ void findImplementations( const Reference < XRegistryKey > & xSource,
{
isImplKey = true;
- OUString implName = OUString(xSource->getKeyName().getStr() + 1).replace('/', '.').getStr();
+ OUString implName = xSource->getKeyName().copy(1).replace('/', '.');
sal_Int32 firstDot = implName.indexOf('.');
if (firstDot >= 0)
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 4ae249b893c2..5f3c7142f77a 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -756,7 +756,7 @@ JavaVirtualMachine::getJavaVM(css::uno::Sequence< sal_Int8 > const & rProcessId)
//An unexpected error occurred
throw css::uno::RuntimeException(
"[JavaVirtualMachine]:An unexpected error occurred"
- " while searching for a Java!", nullptr);
+ " while searching for a Java, " + OUString::number(errFind), nullptr);
}
}
case JFW_E_INVALID_SETTINGS:
diff --git a/svl/qa/unit/test_INetContentType.cxx b/svl/qa/unit/test_INetContentType.cxx
index 0eea403275e5..8495d2d93273 100644
--- a/svl/qa/unit/test_INetContentType.cxx
+++ b/svl/qa/unit/test_INetContentType.cxx
@@ -41,7 +41,7 @@ void Test::testBad() {
OUString in("foo=bar");
CPPUNIT_ASSERT_EQUAL(
static_cast<sal_Unicode const *>(nullptr),
- INetMIME::scanContentType(in.getStr(), in.getStr() + in.getLength()));
+ INetMIME::scanContentType(in));
OUString t;
OUString s;
INetContentTypeParameterList ps;
@@ -55,7 +55,7 @@ void Test::testFull() {
OUString in("foo/bar;baz=boz");
CPPUNIT_ASSERT_EQUAL(
in.getStr() + in.getLength(),
- INetMIME::scanContentType(in.getStr(), in.getStr() + in.getLength()));
+ INetMIME::scanContentType(in));
OUString t;
OUString s;
INetContentTypeParameterList ps;
@@ -71,7 +71,7 @@ void Test::testFollow() {
OUString in("foo/bar;baz=boz;base64,");
CPPUNIT_ASSERT_EQUAL(
in.getStr() + std::strlen("foo/bar;baz=boz"),
- INetMIME::scanContentType(in.getStr(), in.getStr() + in.getLength()));
+ INetMIME::scanContentType(in));
OUString t;
OUString s;
INetContentTypeParameterList ps;
diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx
index 58532eb08a5c..a4cfc252589e 100644
--- a/svl/source/misc/inettype.cxx
+++ b/svl/source/misc/inettype.cxx
@@ -749,7 +749,7 @@ bool INetContentTypes::parse(
OUString t;
OUString s;
INetContentTypeParameterList p;
- if (INetMIME::scanContentType(b, e, &t, &s, pParameters == nullptr ? nullptr : &p) == e) {
+ if (INetMIME::scanContentType(rMediaType, &t, &s, pParameters == nullptr ? nullptr : &p) == e) {
rType = t;
rSubType = s;
if (pParameters != nullptr) {
diff --git a/svtools/source/control/breadcrumb.cxx b/svtools/source/control/breadcrumb.cxx
index fbfdae83315f..3bb9fa390263 100644
--- a/svtools/source/control/breadcrumb.cxx
+++ b/svtools/source/control/breadcrumb.cxx
@@ -141,7 +141,7 @@ void Breadcrumb::SetURL( const OUString& rURL )
appendField();
unsigned int nEnd = sPath.indexOf( '/', nPos + 1 );
- OUString sLabel = OUString( sPath.getStr() + nPos + 1, nEnd - nPos - 1 );
+ OUString sLabel = sPath.copy( nPos + 1, nEnd - nPos - 1 );
if( m_eMode == SvtBreadcrumbMode::ALL_VISITED )
{
@@ -150,7 +150,7 @@ void Breadcrumb::SetURL( const OUString& rURL )
}
m_aLinks[i]->SetText( sLabel );
- m_aLinks[i]->SetURL( sRootPath + OUString( sPath.getStr(), nEnd ) );
+ m_aLinks[i]->SetURL( sRootPath + sPath.copy( 0, nEnd ) );
m_aLinks[i]->Hide();
m_aLinks[i]->Enable();
diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx
index 605f1a17007f..447765bc0fdf 100644
--- a/svtools/source/uno/wizard/unowizard.cxx
+++ b/svtools/source/uno/wizard/unowizard.cxx
@@ -157,7 +157,7 @@ namespace {
INetURLObject aHID( aTmp );
if ( aHID.GetProtocol() == INetProtocol::NotValid )
aBuffer.append( INET_HID_SCHEME );
- aBuffer.append( aTmp.getStr() );
+ aBuffer.append( aTmp );
return aBuffer.makeStringAndClear();
}
diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx
index af29b8667527..1711206e1036 100644
--- a/svx/source/form/fmpage.cxx
+++ b/svx/source/form/fmpage.cxx
@@ -172,7 +172,7 @@ bool FmFormPage::RequestHelp( vcl::Window* pWindow, SdrView const * pView,
if (xSet.is())
{
if (::comphelper::hasProperty(FM_PROP_HELPTEXT, xSet))
- aHelpText = ::comphelper::getString(xSet->getPropertyValue(FM_PROP_HELPTEXT)).getStr();
+ aHelpText = ::comphelper::getString(xSet->getPropertyValue(FM_PROP_HELPTEXT));
if (aHelpText.isEmpty() && ::comphelper::hasProperty(FM_PROP_TARGET_URL, xSet))
{
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx
index be74781a1508..a9117cc06822 100644
--- a/svx/source/form/fmshimp.cxx
+++ b/svx/source/form/fmshimp.cxx
@@ -411,7 +411,7 @@ namespace
if (nTokens)
aListener = aListener.getToken(nTokens - 1, '.');
- if (aListener == pCurrent->ListenerType.getStr())
+ if (aListener == pCurrent->ListenerType)
// the current ScriptEventDescriptor doesn't match the current listeners class
continue;
@@ -1513,8 +1513,8 @@ void FmXFormShell::ExecuteSearch()
Reference< XTextComponent> xText(xActiveControl, UNO_QUERY);
if (xText.is())
{
- strActiveField = getLabelName(xProperties).getStr();
- strInitialText = xText->getText().getStr();
+ strActiveField = getLabelName(xProperties);
+ strInitialText = xText->getText();
}
}
}
@@ -1537,7 +1537,7 @@ void FmXFormShell::ExecuteSearch()
if(xColumns.is())
xColumns->getByIndex(nModelCol) >>= xCurrentCol;
if (xCurrentCol.is())
- strActiveField = ::comphelper::getString(xCurrentCol->getPropertyValue(FM_PROP_LABEL)).getStr();
+ strActiveField = ::comphelper::getString(xCurrentCol->getPropertyValue(FM_PROP_LABEL));
// the text fo the current column
Reference< XIndexAccess> xColControls(xGridPeer, UNO_QUERY);
@@ -1545,7 +1545,7 @@ void FmXFormShell::ExecuteSearch()
xColControls->getByIndex(nViewCol) >>= xCurControl;
OUString sInitialText;
if (IsSearchableControl(xCurControl, &sInitialText))
- strInitialText = sInitialText.getStr();
+ strInitialText = sInitialText;
}
}
}
@@ -2417,10 +2417,10 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext&, rfmscContextIn
// the cursor has a field matching the control source ?
if (xValidFormFields->hasByName(aName))
{
- strFieldList = strFieldList + OUString(aName.getStr()) + ";";
+ strFieldList = strFieldList + aName + ";";
sFieldDisplayNames = sFieldDisplayNames +
- OUString(::comphelper::getString(xCurrentColModel->getPropertyValue(FM_PROP_LABEL)).getStr()) +
+ ::comphelper::getString(xCurrentColModel->getPropertyValue(FM_PROP_LABEL)) +
";";
rfmscContextInfo.arrFields.push_back(xCurrentColumn);
@@ -2447,11 +2447,11 @@ IMPL_LINK(FmXFormShell, OnSearchContextRequest, FmSearchContext&, rfmscContextIn
if (IsSearchableControl(xControl))
{
// all tests passed -> take along in the list
- strFieldList = strFieldList + OUString(sControlSource.getStr()) + ";";
+ strFieldList = strFieldList + sControlSource + ";";
// the label which should appear for the control :
sFieldDisplayNames = sFieldDisplayNames +
- OUString(getLabelName(Reference< XPropertySet>(xControlModel, UNO_QUERY)).getStr()) +
+ getLabelName(Reference< XPropertySet>(xControlModel, UNO_QUERY)) +
";";
// mark the SdrObject (accelerates the treatment in OnFoundData)
diff --git a/svx/source/form/fmsrcimp.cxx b/svx/source/form/fmsrcimp.cxx
index 0db270f0660a..eb05a3676639 100644
--- a/svx/source/form/fmsrcimp.cxx
+++ b/svx/source/form/fmsrcimp.cxx
@@ -724,11 +724,10 @@ void FmSearchEngine::Init(const OUString& sVisibleFields)
OUString sCurrentField;
- OUString sVis(sVisibleFields.getStr());
sal_Int32 nIndex = 0;
do
{
- sCurrentField = sVis.getToken(0, ';' , nIndex);
+ sCurrentField = sVisibleFields.getToken(0, ';' , nIndex);
// search in the field collection
sal_Int32 nFoundIndex = -1;
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 8793ca58dde4..3a25f3d57f2a 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -1432,8 +1432,7 @@ namespace svxform
aNewName = aBaseName;
if( i>0 )
{
- aNewName += " ";
- aNewName += OUString::number(i).getStr();
+ aNewName += " " + OUString::number(i);
}
if( GetNavModel()->FindData(aNewName, pFormParentData,false) == nullptr )
diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx
index e983f2e5234f..26e6c0ce790c 100644
--- a/svx/source/form/tabwin.cxx
+++ b/svx/source/form/tabwin.cxx
@@ -358,7 +358,7 @@ void FmFieldWin::UpdateContent(const css::uno::Reference< css::form::XForm > & x
m_pChangeListener->addProperty(FM_PROP_COMMANDTYPE);
// set title
- aTitle = aTitle + " " + aPrefix + " " + OUString(m_aObjectName.getStr());
+ aTitle += " " + aPrefix + " " + m_aObjectName;
SetText( aTitle );
}
catch( const Exception& )
diff --git a/svx/source/items/hlnkitem.cxx b/svx/source/items/hlnkitem.cxx
index 18a33e734f0f..513a3b9673ac 100644
--- a/svx/source/items/hlnkitem.cxx
+++ b/svx/source/items/hlnkitem.cxx
@@ -165,7 +165,7 @@ bool SvxHyperlinkItem::PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId
case MID_HLINK_URL:
if(!(rVal >>= aStr))
return false;
- sURL = aStr.getStr();
+ sURL = aStr;
break;
case MID_HLINK_TARGET:
if(!(rVal >>= aStr))
diff --git a/sw/source/core/access/accpara.cxx b/sw/source/core/access/accpara.cxx
index 68f6b067be2a..d413cda631af 100644
--- a/sw/source/core/access/accpara.cxx
+++ b/sw/source/core/access/accpara.cxx
@@ -766,11 +766,8 @@ bool SwAccessibleParagraph::GetSentenceBoundary(
sal_Int32 nPos )
{
const sal_Unicode* pStr = rText.getStr();
- if (pStr)
- {
- while( nPos < rText.getLength() && pStr[nPos] == u' ' )
- nPos++;
- }
+ while( nPos < rText.getLength() && pStr[nPos] == u' ' )
+ nPos++;
GetPortionData().GetSentenceBoundary( rBound, nPos );
return true;
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 18abfe6ae3f4..3aa7991b4881 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -3488,7 +3488,7 @@ void SwCursorShell::GetSmartTagRect( const Point& rPt, SwRect& rSelectRect )
// modify the selection accordingly.
const sal_Unicode* pChar = aText.getStr();
sal_Int32 nLeft = 0;
- while (pChar && *pChar++ == CH_TXTATR_INWORD)
+ while (*pChar++ == CH_TXTATR_INWORD)
++nLeft;
pChar = aText.getLength() ? aText.getStr() + aText.getLength() - 1 : nullptr;
sal_Int32 nRight = 0;
diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx
index 94186299947a..d62d1cc118a3 100644
--- a/sw/source/core/edit/edlingu.cxx
+++ b/sw/source/core/edit/edlingu.cxx
@@ -897,7 +897,7 @@ uno::Reference< XSpellAlternatives >
// modify the selection accordingly.
const sal_Unicode* pChar = aText.getStr();
sal_Int32 nLeft = 0;
- while (pChar && *pChar++ == CH_TXTATR_INWORD)
+ while (*pChar++ == CH_TXTATR_INWORD)
++nLeft;
pChar = aText.getLength() ? aText.getStr() + aText.getLength() - 1 : nullptr;
sal_Int32 nRight = 0;
@@ -1022,7 +1022,7 @@ bool SwEditShell::GetGrammarCorrection(
// order to modify the selection accordingly.
const sal_Unicode* pChar = aText.getStr();
sal_Int32 nLeft = 0;
- while (pChar && *pChar++ == CH_TXTATR_INWORD)
+ while (*pChar++ == CH_TXTATR_INWORD)
++nLeft;
pChar = aText.getLength() ? aText.getStr() + aText.getLength() - 1 : nullptr;
sal_Int32 nRight = 0;
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 56b0c0c466cf..9c83bdfcb335 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1063,7 +1063,7 @@ bool SwTextNode::Spell(SwSpellArgs* pArgs)
// selection accordingly.
const sal_Unicode* pChar = rWord.getStr();
sal_Int32 nLeft = 0;
- while (pChar && *pChar++ == CH_TXTATR_INWORD)
+ while (*pChar++ == CH_TXTATR_INWORD)
++nLeft;
pChar = rWord.getLength() ? rWord.getStr() + rWord.getLength() - 1 : nullptr;
sal_Int32 nRight = 0;
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index c2c4086b27f6..25217f56e2fa 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -2066,7 +2066,7 @@ uno::Sequence< OUString > SAL_CALL SwChartDataSequence::generateLabel(
if (bUseCol)
{
aRplc = "%COLUMNLETTER";
- aNew = OUString(aCellName.getStr(), pBuf - aCellName.getStr());
+ aNew = aCellName.copy(0, pBuf - aCellName.getStr());
}
else
{
diff --git a/sw/source/uibase/uiview/viewling.cxx b/sw/source/uibase/uiview/viewling.cxx
index 187f81e33fde..7ac25e45d11d 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -516,7 +516,7 @@ void SwView::InsertThesaurusSynonym( const OUString &rSynonmText, const OUString
// the selection accordingly.
const sal_Unicode* pChar = rLookUpText.getStr();
sal_Int32 nLeft = 0;
- while (pChar && *pChar++ == CH_TXTATR_INWORD)
+ while (*pChar++ == CH_TXTATR_INWORD)
++nLeft;
pChar = rLookUpText.getLength() ? rLookUpText.getStr() + rLookUpText.getLength() - 1 : nullptr;
sal_Int32 nRight = 0;
diff --git a/tools/qa/cppunit/test_inetmime.cxx b/tools/qa/cppunit/test_inetmime.cxx
index 0bd1fd90c13d..c28fa6885f99 100644
--- a/tools/qa/cppunit/test_inetmime.cxx
+++ b/tools/qa/cppunit/test_inetmime.cxx
@@ -64,14 +64,14 @@ namespace
OUString input
= "TEST/subTST; parm1=Value1; Parm2=\"unpacked value; %20\"";
// Just scan input for valid string:
- auto end = INetMIME::scanContentType(input.getStr(), input.getStr()+input.getLength());
+ auto end = INetMIME::scanContentType(input);
CPPUNIT_ASSERT(end != nullptr);
CPPUNIT_ASSERT_EQUAL(OUString(), OUString(end));
// Scan input and parse type, subType and parameters:
OUString type;
OUString subType;
INetContentTypeParameterList parameters;
- end = INetMIME::scanContentType(input.getStr(), input.getStr() + input.getLength(),
+ end = INetMIME::scanContentType(input,
&type, &subType, &parameters);
CPPUNIT_ASSERT(end != nullptr);
CPPUNIT_ASSERT_EQUAL(OUString(), OUString(end));
@@ -104,14 +104,14 @@ namespace
"Parm1*1*=of%2010;\t"
"parm1*2*=%20%3d%200.5";
// Just scan input for valid string:
- auto end = INetMIME::scanContentType(input.getStr(), input.getStr()+input.getLength());
+ auto end = INetMIME::scanContentType(input);
CPPUNIT_ASSERT(end != nullptr);
CPPUNIT_ASSERT_EQUAL(OUString(), OUString(end));
// Scan input and parse type, subType and parameters:
OUString type;
OUString subType;
INetContentTypeParameterList parameters;
- end = INetMIME::scanContentType(input.getStr(), input.getStr() + input.getLength(),
+ end = INetMIME::scanContentType(input,
&type, &subType, &parameters);
CPPUNIT_ASSERT(end != nullptr);
CPPUNIT_ASSERT_EQUAL(OUString(), OUString(end));
@@ -134,11 +134,11 @@ namespace
"parm1*1*=2"; // this parameter is a duplicate,
// the scan should end before this parameter
// Just scan input for valid string:
- end = INetMIME::scanContentType(input.getStr(), input.getStr()+input.getLength());
+ end = INetMIME::scanContentType(input);
CPPUNIT_ASSERT(end != nullptr);
CPPUNIT_ASSERT_EQUAL(OUString(";parm1*1*=2"), OUString(end)); // the invalid end of input
// Scan input and parse type, subType and parameters:
- end = INetMIME::scanContentType(input.getStr(), input.getStr() + input.getLength(),
+ end = INetMIME::scanContentType(input,
&type, &subType, &parameters);
CPPUNIT_ASSERT(end != nullptr);
CPPUNIT_ASSERT_EQUAL(OUString(";parm1*1*=2"), OUString(end)); // the invalid end of input
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 544ec38cbf0b..eeadb7df38d2 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -597,7 +597,7 @@ std::unique_ptr<SvMemoryStream> INetURLObject::getData()
}
OUString sURLPath = GetURLPath( DecodeMechanism::WithCharset, RTL_TEXTENCODING_ISO_8859_1 );
- sal_Unicode const * pSkippedMediatype = INetMIME::scanContentType( sURLPath.getStr(), sURLPath.getStr() + sURLPath.getLength() );
+ sal_Unicode const * pSkippedMediatype = INetMIME::scanContentType( sURLPath );
sal_Int32 nCharactersSkipped = pSkippedMediatype == nullptr
? 0 : pSkippedMediatype-sURLPath.getStr();
if (sURLPath.match(",", nCharactersSkipped))
diff --git a/tools/source/inet/inetmime.cxx b/tools/source/inet/inetmime.cxx
index a398aa79e3ca..0be1ee62d8b2 100644
--- a/tools/source/inet/inetmime.cxx
+++ b/tools/source/inet/inetmime.cxx
@@ -1088,9 +1088,11 @@ bool INetMIME::scanUnsigned(const sal_Unicode *& rBegin,
// static
sal_Unicode const * INetMIME::scanContentType(
- sal_Unicode const * pBegin, sal_Unicode const * pEnd, OUString * pType,
+ OUString const & rStr, OUString * pType,
OUString * pSubType, INetContentTypeParameterList * pParameters)
{
+ sal_Unicode const * pBegin = rStr.getStr();
+ sal_Unicode const * pEnd = pBegin + rStr.getLength();
sal_Unicode const * p = skipLinearWhiteSpaceComment(pBegin, pEnd);
sal_Unicode const * pTypeBegin = p;
while (p != pEnd && isTokenChar(*p))
diff --git a/ucb/source/ucp/hierarchy/hierarchyuri.hxx b/ucb/source/ucp/hierarchy/hierarchyuri.hxx
index bc78214d0421..4e67db7751ed 100644
--- a/ucb/source/ucp/hierarchy/hierarchyuri.hxx
+++ b/ucb/source/ucp/hierarchy/hierarchyuri.hxx
@@ -66,8 +66,7 @@ public:
inline bool HierarchyUri::isRootFolder() const
{
init();
- return ( ( m_aPath.getLength() == 1 ) &&
- ( m_aPath.getStr()[ 0 ] == u'/' ) );
+ return m_aPath == "/";
}
}
diff --git a/ucb/source/ucp/package/pkguri.hxx b/ucb/source/ucp/package/pkguri.hxx
index 52e3e01fff41..90101fdb8f0a 100644
--- a/ucb/source/ucp/package/pkguri.hxx
+++ b/ucb/source/ucp/package/pkguri.hxx
@@ -81,8 +81,7 @@ public:
inline bool PackageUri::isRootFolder() const
{
init();
- return ( ( m_aPath.getLength() == 1 ) &&
- ( m_aPath.getStr()[ 0 ] == u'/' ) );
+ return m_aPath == "/";
}
}
diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
index 4b6aa7d57f51..8b63e8a2326a 100644
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
@@ -61,7 +61,7 @@ void generateIncludes(std::ostream & o,
while (iter != interfaces.end())
{
o << "#include \""
- << ((*iter).replace('.', '/').getStr())
+ << (*iter).replace('.', '/')
<< ".hpp\"\n";
++iter;
}
diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx
index d74b5f0e3090..8a625388d56e 100644
--- a/unotools/source/misc/fontdefs.cxx
+++ b/unotools/source/misc/fontdefs.cxx
@@ -479,7 +479,7 @@ OUString GetNextFontToken( const OUString& rTokenStr, sal_Int32& rIndex )
}
}
- return OUString( rTokenStr.getStr() + nTokenStart, nTokenLen );
+ return rTokenStr.copy( nTokenStart, nTokenLen );
}
static bool ImplIsFontToken( const OUString& rName, const OUString& rToken )
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index 0cc28876d78c..3b55739003c8 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -246,7 +246,7 @@ OUString lcl_createName(
sal_Int32 nOffset = rLeadingChars.lastIndexOf("/");
if (-1 != nOffset)
{
- OUString aDirName = aName + OUString( rLeadingChars.getStr(), nOffset );
+ OUString aDirName = aName + rLeadingChars.copy( 0, nOffset );
TempDirCreatedObserver observer;
FileBase::RC err = Directory::createPath( aDirName, &observer );
if ( err != FileBase::E_None && err != FileBase::E_EXIST )
diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx
index 1c46f3ef1a2d..98de69067261 100644
--- a/uui/source/passwordcontainer.cxx
+++ b/uui/source/passwordcontainer.cxx
@@ -78,24 +78,22 @@ bool fillContinuation(
{
if (xSupplyAuthentication->canSetUserName())
xSupplyAuthentication->
- setUserName(aRec.UserList[0].UserName.getStr());
+ setUserName(aRec.UserList[0].UserName);
if (xSupplyAuthentication->canSetPassword())
xSupplyAuthentication->
- setPassword(aRec.UserList[0].Passwords[0].getStr());
+ setPassword(aRec.UserList[0].Passwords[0]);
if (aRec.UserList[0].Passwords.getLength() > 1)
{
if (rRequest.HasRealm)
{
if (xSupplyAuthentication->canSetRealm())
xSupplyAuthentication->
- setRealm(aRec.UserList[0].Passwords[1].
- getStr());
+ setRealm(aRec.UserList[0].Passwords[1]);
}
else if (xSupplyAuthentication->canSetAccount())
xSupplyAuthentication->
- setAccount(aRec.UserList[0].Passwords[1].
- getStr());
+ setAccount(aRec.UserList[0].Passwords[1]);
}
if ( xSupplyAuthentication2.is() && bCanUseSystemCredentials )
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx
index ac2dbc913896..dfcf63126fe1 100644
--- a/vcl/source/control/field2.cxx
+++ b/vcl/source/control/field2.cxx
@@ -67,15 +67,8 @@ uno::Reference< i18n::XCharacterClassification > const & ImplGetCharClass()
static sal_Unicode* ImplAddString( sal_Unicode* pBuf, const OUString& rStr )
{
- if ( rStr.getLength() == 1 )
- *pBuf++ = rStr[0];
- else if ( rStr.isEmpty() )
- ;
- else
- {
- memcpy( pBuf, rStr.getStr(), rStr.getLength() * sizeof(sal_Unicode) );
- pBuf += rStr.getLength();
- }
+ memcpy( pBuf, rStr.getStr(), rStr.getLength() * sizeof(sal_Unicode) );
+ pBuf += rStr.getLength();
return pBuf;
}
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 14a4c3ce12b2..693e1771eaa2 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -175,8 +175,7 @@ VclBuilder::VclBuilder(vcl::Window *pParent, const OUString& sUIDir, const OUStr
{
const OUString &rTarget = aP->second;
vcl::Window *pTarget = get<vcl::Window>(rTarget.toUtf8());
- SAL_WARN_IF(!pTarget, "vcl", "missing member of a11y relation: "
- << rTarget.getStr());
+ SAL_WARN_IF(!pTarget, "vcl", "missing member of a11y relation: " << rTarget);
if (!pTarget)
continue;
const OString &rType = aP->first;
diff --git a/writerfilter/source/dmapper/ConversionHelper.cxx b/writerfilter/source/dmapper/ConversionHelper.cxx
index d262caf09062..6b33c6c56f91 100644
--- a/writerfilter/source/dmapper/ConversionHelper.cxx
+++ b/writerfilter/source/dmapper/ConversionHelper.cxx
@@ -277,7 +277,7 @@ void lcl_SwapQuotesInField(OUString &rFmt)
{
//Swap unescaped " and ' with ' and "
sal_Int32 nLen = rFmt.getLength();
- OUStringBuffer aBuffer( rFmt.getStr() );
+ OUStringBuffer aBuffer( rFmt );
const sal_Unicode* pFmt = rFmt.getStr();
for (sal_Int32 nI = 0; nI < nLen; ++nI)
{
diff --git a/xmlhelp/source/cxxhelp/provider/databases.cxx b/xmlhelp/source/cxxhelp/provider/databases.cxx
index 6cfa804e4f02..1c263ec7c306 100644
--- a/xmlhelp/source/cxxhelp/provider/databases.cxx
+++ b/xmlhelp/source/cxxhelp/provider/databases.cxx
@@ -607,7 +607,6 @@ KeywordInfo::KeywordElement::KeywordElement( Databases const *pDatabases,
void KeywordInfo::KeywordElement::init( Databases const *pDatabases,helpdatafileproxy::Hdf* pHdf,const OUString& ids )
{
- const sal_Unicode* idstr = ids.getStr();
std::vector< OUString > id,anchor;
int idx = -1,k;
while( ( idx = ids.indexOf( ';',k = ++idx ) ) != -1 )
@@ -616,12 +615,12 @@ void KeywordInfo::KeywordElement::init( Databases const *pDatabases,helpdatafile
if( h < idx )
{
// found an anchor
- id.push_back( OUString( &idstr[k],h-k ) );
- anchor.push_back( OUString( &idstr[h+1],idx-h-1 ) );
+ id.push_back( ids.copy( k, h-k ) );
+ anchor.push_back( ids.copy( h+1, idx-h-1 ) );
}
else
{
- id.push_back( OUString( &idstr[k],idx-k ) );
+ id.push_back( ids.copy( k, idx-k ) );
anchor.push_back( OUString() );
}
}
diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
index 6ccdf3964527..5666592dd9f9 100644
--- a/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
+++ b/xmlhelp/source/cxxhelp/provider/urlparameter.cxx
@@ -414,7 +414,7 @@ bool URLParameter::module()
{
sal_Int32 idx = 0,length = m_aExpr.getLength();
- while( idx < length && rtl::isAsciiAlphanumeric( (m_aExpr.getStr())[idx] ) )
+ while( idx < length && rtl::isAsciiAlphanumeric( m_aExpr[idx] ) )
++idx;
if( idx != 0 )
@@ -434,10 +434,10 @@ bool URLParameter::name( bool modulePresent )
sal_Int32 length = m_aExpr.getLength();
- if( length != 0 && (m_aExpr.getStr())[0] == '/' )
+ if( length != 0 && m_aExpr[0] == '/' )
{
sal_Int32 idx = 1;
- while( idx < length && (m_aExpr.getStr())[idx] != '?' )
+ while( idx < length && m_aExpr[idx] != '?' )
++idx;
if( idx != 1 && ! modulePresent )
@@ -459,7 +459,7 @@ bool URLParameter::query()
if( m_aExpr.isEmpty() )
return true;
- else if( (m_aExpr.getStr())[0] == '?' )
+ else if( m_aExpr[0] == '?' )
query_ = m_aExpr.copy( 1 ).trim();
else
return false;
diff --git a/xmlhelp/source/treeview/tvread.cxx b/xmlhelp/source/treeview/tvread.cxx
index 424ec3029ada..d3e885680c17 100644
--- a/xmlhelp/source/treeview/tvread.cxx
+++ b/xmlhelp/source/treeview/tvread.cxx
@@ -511,7 +511,7 @@ bool TVChildTarget::SearchAndInsert(TVDom* p, TVDom* tvDom)
Any SAL_CALL
TVChildTarget::getByName( const OUString& aName )
{
- OUString num( aName.getStr()+2,aName.getLength()-4 );
+ OUString num( aName.copy( 2, aName.getLength()-4 ) );
sal_Int32 idx = num.toInt32() - 1;
if( idx < 0 || Elements.size() <= sal_uInt32( idx ) )
throw NoSuchElementException();
@@ -533,7 +533,7 @@ TVChildTarget::getElementNames( )
sal_Bool SAL_CALL
TVChildTarget::hasByName( const OUString& aName )
{
- OUString num( aName.getStr()+2,aName.getLength()-4 );
+ OUString num( aName.copy( 2, aName.getLength()-4 ) );
sal_Int32 idx = num.toInt32() - 1;
if( idx < 0 || Elements.size() <= sal_uInt32( idx ) )
return false;
@@ -550,7 +550,7 @@ TVChildTarget::getByHierarchicalName( const OUString& aName )
if( ( idx = aName.indexOf( '/' ) ) != -1 )
{
- OUString num( aName.getStr()+2,idx-4 );
+ OUString num( aName.copy( 2, idx-4 ) );
sal_Int32 pref = num.toInt32() - 1;
if( pref < 0 || Elements.size() <= sal_uInt32( pref ) )
@@ -569,7 +569,7 @@ TVChildTarget::hasByHierarchicalName( const OUString& aName )
if( ( idx = aName.indexOf( '/' ) ) != -1 )
{
- OUString num( aName.getStr()+2,idx-4 );
+ OUString num( aName.copy( 2, idx-4 ) );
sal_Int32 pref = num.toInt32() - 1;
if( pref < 0 || Elements.size() <= sal_uInt32( pref ) )
return false;
diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx
index efbb82111ac8..1c2c9a7f5e27 100644
--- a/xmloff/source/draw/xexptran.cxx
+++ b/xmloff/source/draw/xexptran.cxx
@@ -350,7 +350,7 @@ void SdXMLImExTransform2D::SetString(const OUString& rNew, const SvXMLUnitConver
if(!msString.isEmpty())
{
- const OUString aStr(msString.getStr(), (sal_uInt16)msString.getLength());
+ const OUString aStr = msString;
const sal_Int32 nLen(aStr.getLength());
const OUString aString_rotate( "rotate" );
@@ -762,7 +762,7 @@ void SdXMLImExTransform3D::SetString(const OUString& rNew, const SvXMLUnitConver
if(!msString.isEmpty())
{
- const OUString aStr(msString.getStr(), (sal_uInt16)msString.getLength());
+ const OUString aStr = msString;
const sal_Int32 nLen(aStr.getLength());
const OUString aString_rotatex( "rotatex" );
@@ -1023,7 +1023,7 @@ SdXMLImExViewBox::SdXMLImExViewBox(const OUString& rNew, const SvXMLUnitConverte
{
if(!msString.isEmpty())
{
- const OUString aStr(msString.getStr(), (sal_uInt16)msString.getLength());
+ const OUString aStr = msString;
const sal_Int32 nLen(aStr.getLength());
sal_Int32 nPos(0);
diff --git a/xmloff/source/forms/propertyimport.cxx b/xmloff/source/forms/propertyimport.cxx
index 2c17d7129841..09d1ba7161be 100644
--- a/xmloff/source/forms/propertyimport.cxx
+++ b/xmloff/source/forms/propertyimport.cxx
@@ -535,9 +535,8 @@ SvXMLImportContext* OListPropertyContext::CreateChildContext( sal_uInt16 _nPrefi
}
else
{
- OSL_FAIL( OStringBuffer("OListPropertyContext::CreateChildContext: unknown child element (\"").
- append(OUStringToOString(_rLocalName.getStr(), RTL_TEXTENCODING_ASCII_US)).
- append("\")!").getStr() );
+ SAL_WARN( "xmloff", "OListPropertyContext::CreateChildContext: unknown child element (\""
+ << _rLocalName << "\")!" );
return new SvXMLImportContext( GetImport(), _nPrefix, _rLocalName );
}
}