diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-01-28 12:38:01 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-01-28 17:32:18 +0100 |
commit | 943060836339f9640c612e9724f20e79db616e6e (patch) | |
tree | 3dc6e7748aef3ef0f2fca86979792162daa443fc /svl/source/numbers | |
parent | d249bd5a3dfe13052ce9aa91bad94ec7d60604d4 (diff) |
simplify code, use more subView()
Change-Id: I569c7f34acbdf8451cd5c9acf1abd334637072d1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110051
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svl/source/numbers')
-rw-r--r-- | svl/source/numbers/zformat.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 85a34f28e842..c452c25001fa 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -1733,7 +1733,7 @@ short SvNumberformat::ImpNextSymbol(OUStringBuffer& rString, 0 <= nNatNumNum && nNatNumNum <= 19 ) { sBuffSymbol.stripStart('['); - sBuffSymbol.append( std::u16string_view(aBufStr).substr(--nPos, aNatNum.getLength()+1) ); + sBuffSymbol.append( aBufStr.subView(--nPos, aNatNum.getLength()+1) ); nPos += aNatNum.getLength()+1; //! SymbolType is negative eSymbolType = static_cast<short>(BRACKET_SYMBOLTYPE_NATNUM0 - nNatNumNum); @@ -1743,7 +1743,7 @@ short SvNumberformat::ImpNextSymbol(OUStringBuffer& rString, 1 <= nDBNum && nDBNum <= 9 ) { sBuffSymbol.stripStart('['); - sBuffSymbol.append( std::u16string_view(aBufStr).substr(--nPos, aDBNum.getLength()+1) ); + sBuffSymbol.append( aBufStr.subView(--nPos, aDBNum.getLength()+1) ); nPos += aDBNum.getLength()+1; //! SymbolType is negative eSymbolType = sal::static_int_cast< short >( BRACKET_SYMBOLTYPE_DBNUM1 - (nDBNum - 1) ); @@ -1971,7 +1971,7 @@ OUString SvNumberformat::StripNewCurrencyDelimiters( const OUString& rStr ) } else { - aTmp.append(std::u16string_view(rStr).substr(nStartPos, nPos - nStartPos) ); + aTmp.append(rStr.subView(nStartPos, nPos - nStartPos) ); nStartPos = nPos + 2; sal_Int32 nDash; nEnd = nStartPos - 1; @@ -2004,13 +2004,13 @@ OUString SvNumberformat::StripNewCurrencyDelimiters( const OUString& rStr ) { nPos = nDash; } - aTmp.append(std::u16string_view(rStr).substr(nStartPos, nPos - nStartPos) ); + aTmp.append(rStr.subView(nStartPos, nPos - nStartPos) ); nStartPos = nClose + 1; } } if ( nLen > nStartPos ) { - aTmp.append(std::u16string_view(rStr).substr(nStartPos, nLen - nStartPos) ); + aTmp.append(rStr.subView(nStartPos, nLen - nStartPos) ); } return aTmp.makeStringAndClear(); } |