diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-29 12:24:31 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-04-29 18:25:31 +0200 |
commit | 04aafba860f613c20e7078d038cc83eb02de0b54 (patch) | |
tree | 8153152b87089419bde17313d9ac7b9de6fcce32 /reportdesign | |
parent | 76c793d2acf66f46e9edcda43d2f4327e8374841 (diff) |
loplugin:stringadd simplify some *StringBuffer operations
pulled from a larger patch which I created with a more permissive
variant of this plugin
Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/core/api/ReportEngineJFree.cxx | 8 | ||||
-rw-r--r-- | reportdesign/source/core/misc/reportformula.cxx | 5 |
2 files changed, 5 insertions, 8 deletions
diff --git a/reportdesign/source/core/api/ReportEngineJFree.cxx b/reportdesign/source/core/api/ReportEngineJFree.cxx index 13e5dacb3c70..25016a25ef0f 100644 --- a/reportdesign/source/core/api/ReportEngineJFree.cxx +++ b/reportdesign/source/core/api/ReportEngineJFree.cxx @@ -192,11 +192,11 @@ OUString OReportEngineJFree::getNewOutputName() // some meta data SvtUserOptions aUserOpts; - OUStringBuffer sAuthor(aUserOpts.GetFirstName()); - sAuthor.append(" "); - sAuthor.append(aUserOpts.GetLastName()); + OUString sAuthor = aUserOpts.GetFirstName() + + " " + + aUserOpts.GetLastName(); aConvertedProperties[nPos].Name = "Author"; - aConvertedProperties[nPos++].Value <<= sAuthor.makeStringAndClear(); + aConvertedProperties[nPos++].Value <<= sAuthor; aConvertedProperties[nPos].Name = "Title"; aConvertedProperties[nPos++].Value <<= m_xReport->getCaption(); diff --git a/reportdesign/source/core/misc/reportformula.cxx b/reportdesign/source/core/misc/reportformula.cxx index ea70758ba6f3..cd6ae4df5db2 100644 --- a/reportdesign/source/core/misc/reportformula.cxx +++ b/reportdesign/source/core/misc/reportformula.cxx @@ -114,10 +114,7 @@ namespace rptui OUString ReportFormula::getEqualUndecoratedContent() const { - OUStringBuffer aBuffer; - aBuffer.append( "=" ); - aBuffer.append( getUndecoratedContent() ); - return aBuffer.makeStringAndClear(); + return "=" + getUndecoratedContent(); } |