diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2022-10-11 10:23:28 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2022-10-11 12:46:01 +0200 |
commit | 3d236177be255b2027a997bfc12fe0833ca9a2f7 (patch) | |
tree | d67582e355bccb43cf133c1857f5dd6136be2f35 /l10ntools | |
parent | 6c65c62c26a8aa4d04466545f8f04ec86b797012 (diff) |
Deduplicate O(U)StringConcatenation
And use an overloaded helper function with a better (?) unified name
to show that the result is not an O(U)String.
Change-Id: I8956338b05d02bf46a6185828130ea8ef145d46b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141203
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'l10ntools')
-rw-r--r-- | l10ntools/source/po.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/l10ntools/source/po.cxx b/l10ntools/source/po.cxx index 62d09e1e7407..b053067ea163 100644 --- a/l10ntools/source/po.cxx +++ b/l10ntools/source/po.cxx @@ -223,7 +223,7 @@ void GenPoEntry::readFromFile(std::ifstream& rIFStream) { sReference = m_sReferences.front(); } - if (pLastMsg != &m_sMsgCtxt || sLine != OStringConcatenation("\"" + sReference + "\\n\"")) + if (pLastMsg != &m_sMsgCtxt || sLine != Concat2View("\"" + sReference + "\\n\"")) { *pLastMsg += lcl_GenNormString(sLine); } @@ -279,7 +279,7 @@ PoEntry::PoEntry( } m_pGenPo->setMsgCtxt(sMsgCtxt); m_pGenPo->setMsgId(rText); - m_pGenPo->setExtractCom(OStringConcatenation( + m_pGenPo->setExtractCom(Concat2View( ( !rHelpText.empty() ? OString::Concat(rHelpText) + "\n" : OString()) + genKeyId( m_pGenPo->getReference().front() + rGroupId + rLocalId + rResType + rText ) )); m_bIsInitialized = true; @@ -446,7 +446,7 @@ PoHeader::PoHeader( std::string_view rExtSrc, const OString& rPoHeaderMsgStr ) : m_pGenPo( new GenPoEntry() ) , m_bIsInitialized( false ) { - m_pGenPo->setExtractCom(OStringConcatenation(OString::Concat("extracted from ") + rExtSrc)); + m_pGenPo->setExtractCom(Concat2View(OString::Concat("extracted from ") + rExtSrc)); m_pGenPo->setMsgStr(rPoHeaderMsgStr); m_bIsInitialized = true; } @@ -455,7 +455,7 @@ PoHeader::PoHeader( std::string_view rExtSrc ) : m_pGenPo( new GenPoEntry() ) , m_bIsInitialized( false ) { - m_pGenPo->setExtractCom(OStringConcatenation(OString::Concat("extracted from ") + rExtSrc)); + m_pGenPo->setExtractCom(Concat2View(OString::Concat("extracted from ") + rExtSrc)); m_pGenPo->setMsgStr( "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: https://bugs.libreoffice.org/enter_bug.cgi?" |