diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-01-28 11:01:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-01-28 11:11:28 +0100 |
commit | 1da69081732c8a429840edaaf10cfb789ea68df8 (patch) | |
tree | f343c9559e9dfb0263f7e33fe4306f81ec60e3fa /l10ntools/source | |
parent | b3737c638671ab39c5e6aaeaf5426d102392cc0a (diff) |
add string_view variants of methods to O[U]StringBuffer
and update the stringview loplugin to detect cases where we can
use these new methods.
Change-Id: I998efe02e35c8efcb3abfb4d7186165bbe6dfb2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110046
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'l10ntools/source')
-rw-r--r-- | l10ntools/source/helper.cxx | 2 | ||||
-rw-r--r-- | l10ntools/source/localize.cxx | 4 | ||||
-rw-r--r-- | l10ntools/source/po.cxx | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/l10ntools/source/helper.cxx b/l10ntools/source/helper.cxx index 80b079e27151..2dce070b90fc 100644 --- a/l10ntools/source/helper.cxx +++ b/l10ntools/source/helper.cxx @@ -25,7 +25,7 @@ OString escapeAll( sal_Int32 nUnEscapedOne = rUnEscaped.indexOf(rText[nIndex]); if( nUnEscapedOne != -1 ) { - sReturn.append(rEscaped.copy(nUnEscapedOne*2,2)); + sReturn.append(rEscaped.subView(nUnEscapedOne*2,2)); } else sReturn.append(rText[nIndex]); diff --git a/l10ntools/source/localize.cxx b/l10ntools/source/localize.cxx index 3cb8c8df2657..3401a7429658 100644 --- a/l10ntools/source/localize.cxx +++ b/l10ntools/source/localize.cxx @@ -93,14 +93,14 @@ void handleCommand( { auto const env = getenv("SRC_ROOT"); assert(env != nullptr); - buf.append(OString(env)); + buf.append(env); buf.append("/solenv/bin/"); } else { auto const env = getenv("WORKDIR_FOR_BUILD"); assert(env != nullptr); - buf.append(OString(env)); + buf.append(env); buf.append("/LinkTarget/Executable/"); } buf.append(rExecutable.data()); diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx index 7b8a1cacb3c1..8d47a7d39410 100644 --- a/l10ntools/source/po.cxx +++ b/l10ntools/source/po.cxx @@ -116,7 +116,7 @@ namespace } GenPoEntry::GenPoEntry() - : m_sExtractCom( OString() ) + : m_sExtractCom() , m_sReferences( std::vector<OString>() ) , m_sMsgCtxt( OString() ) , m_sMsgId( OString() ) @@ -181,7 +181,7 @@ void GenPoEntry::readFromFile(std::ifstream& rIFStream) { m_sExtractCom.append("\n"); } - m_sExtractCom.append(sLine.copy(3)); + m_sExtractCom.append(sLine.subView(3)); } else if (sLine.startsWith("#: ")) { |