diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-22 14:08:27 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-11-23 14:00:08 +0100 |
commit | ec1c4c49301758c54394f9943252e192ad54638b (patch) | |
tree | b53af3cb9154a388495b1af35c3f8ff41d6ebe1f /vcl/unx | |
parent | db0f2c29bf3a6ad5a08f8524ea0e65aa90792bb2 (diff) |
O[U]String::replaceAt overloads that take string_view
which results in lots of nice string_view improvements picked up by the
plugins
Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 6 | ||||
-rw-r--r-- | vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index 8ea34f144054..f9309413825e 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -1320,7 +1320,7 @@ void PPDParser::parseOrderDependency(const OString& rLine) OUString aKey(OStringToOUString(GetCommandLineToken(2, aLine), RTL_TEXTENCODING_MS_1252)); if( aKey[ 0 ] != '*' ) return; // invalid order dependency - aKey = aKey.replaceAt( 0, 1, "" ); + aKey = aKey.replaceAt( 0, 1, u"" ); PPDKey* pKey; PPDParser::hash_type::const_iterator keyit = m_aKeys.find( aKey ); @@ -1354,7 +1354,7 @@ void PPDParser::parseConstraint( const OString& rLine ) OUString aLine(OStringToOUString(rLine, RTL_TEXTENCODING_MS_1252)); sal_Int32 nIdx = rLine.indexOf(':'); if (nIdx != -1) - aLine = aLine.replaceAt(0, nIdx + 1, ""); + aLine = aLine.replaceAt(0, nIdx + 1, u""); PPDConstraint aConstraint; int nTokens = GetCommandLineTokenCount( aLine ); for( int i = 0; i < nTokens; i++ ) @@ -1362,7 +1362,7 @@ void PPDParser::parseConstraint( const OString& rLine ) OUString aToken = GetCommandLineToken( i, aLine ); if( !aToken.isEmpty() && aToken[ 0 ] == '*' ) { - aToken = aToken.replaceAt( 0, 1, "" ); + aToken = aToken.replaceAt( 0, 1, u"" ); if( aConstraint.m_pKey1 ) aConstraint.m_pKey2 = getKey( aToken ); else diff --git a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx index 8c0e638d024b..3c52b7ca3981 100644 --- a/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx @@ -439,11 +439,11 @@ shrinkFilterName( const OUString &rFilterName, bool bAllowNoStar = false ) if( nBracketEnd <= 0 ) continue; if( isFilterString( rFilterName.copy( i + 1, nBracketLen - 1 ), "*." ) ) - aRealName = aRealName.replaceAt( i, nBracketLen + 1, OUString() ); + aRealName = aRealName.replaceAt( i, nBracketLen + 1, u"" ); else if (bAllowNoStar) { if( isFilterString( rFilterName.copy( i + 1, nBracketLen - 1 ), ".") ) - aRealName = aRealName.replaceAt( i, nBracketLen + 1, OUString() ); + aRealName = aRealName.replaceAt( i, nBracketLen + 1, u"" ); } } } |