diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-30 10:42:07 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-30 13:36:59 +0000 |
commit | a5084d15e1b72e303e1628fbff84432036b014a9 (patch) | |
tree | 00320f981c20f361b304b4fa2153fdde71e024a2 /vcl/unx/generic/printer/ppdparser.cxx | |
parent | 6ffdcbdd29f014fcce290dfdb969fb6ff66a95ed (diff) |
loplugin:stringadd in vcl
when applying my upcoming patch to also consider O[U]StringBuffer
Change-Id: I44ce7183e4b292269fac1e3d2217286bf5abe823
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149752
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/unx/generic/printer/ppdparser.cxx')
-rw-r--r-- | vcl/unx/generic/printer/ppdparser.cxx | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx index 42a2a2a50cd8..6563b55b56e0 100644 --- a/vcl/unx/generic/printer/ppdparser.cxx +++ b/vcl/unx/generic/printer/ppdparser.cxx @@ -178,13 +178,11 @@ namespace psp aKey.append( i_rKey ); if( !i_rOption.empty() || !i_rValue.empty() ) { - aKey.append( ':' ); - aKey.append( i_rOption ); + aKey.append( OUString::Concat(":") + i_rOption ); } if( !i_rValue.empty() ) { - aKey.append( ':' ); - aKey.append( i_rValue ); + aKey.append( OUString::Concat(":") + i_rValue ); } if( !aKey.isEmpty() && !i_rTranslation.isEmpty() ) { @@ -209,8 +207,7 @@ namespace psp aKey.append( i_rKey ); if( !i_rOption.empty() ) { - aKey.append( ':' ); - aKey.append( i_rOption ); + aKey.append( OUString::Concat(":") + i_rOption ); } if( !aKey.isEmpty() ) { @@ -637,9 +634,9 @@ PPDParser::PPDParser(OUString aFile, const std::vector<PPDKey*>& keys) OUString::number(PWG_TO_POINTS(pPWGMedia -> length)); if ( pImageableAreaValue ) pImageableAreaValue->m_aValue = aBuf.makeStringAndClear(); - aBuf.append( PWG_TO_POINTS(pPWGMedia -> width) ); - aBuf.append( " " ); - aBuf.append( PWG_TO_POINTS(pPWGMedia -> length) ); + aBuf.append( OUString::number(PWG_TO_POINTS(pPWGMedia -> width)) + + " " + + OUString::number(PWG_TO_POINTS(pPWGMedia -> length) )); if ( pPaperDimensionValue ) pPaperDimensionValue->m_aValue = aBuf.makeStringAndClear(); if (aValueName.equals(pKey -> getDefaultValue() -> m_aOption)) { @@ -1113,8 +1110,7 @@ void PPDParser::parse( ::std::vector< OString >& rLines ) while (line != rLines.end() && oddDoubleQuoteCount(aBuffer)) { // copy the newlines also - aBuffer.append('\n'); - aBuffer.append(*line); + aBuffer.append("\n" + *line); ++line; } aLine = aBuffer.makeStringAndClear(); |