From f13c6ad5f020a196a0e3aa6f28bda3dc185d465b Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 14 Oct 2019 14:27:57 +0200 Subject: new loplugin:bufferadd look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sw/source/filter/ww8/docxexport.cxx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'sw/source/filter/ww8/docxexport.cxx') diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx index 6651124711dc..1ff5f4bb25e6 100644 --- a/sw/source/filter/ww8/docxexport.cxx +++ b/sw/source/filter/ww8/docxexport.cxx @@ -992,13 +992,12 @@ void DocxExport::WriteSettings() SwDBData aData = m_pDoc->GetDBData(); if ( !aData.sDataSource.isEmpty() && aData.nCommandType == css::sdb::CommandType::TABLE && !aData.sCommand.isEmpty() ) { - OUStringBuffer aDataSource; - aDataSource.append("SELECT * FROM "); - aDataSource.append(aData.sDataSource); // current database - aDataSource.append(".dbo."); // default database owner - aDataSource.append(aData.sCommand); // sheet name - aDataSource.append("$"); // sheet identifier - const OUString sDataSource = aDataSource.makeStringAndClear(); + OUString sDataSource = + "SELECT * FROM " + + aData.sDataSource + // current database + ".dbo." + // default database owner + aData.sCommand + // sheet name + "$"; // sheet identifier pFS->startElementNS( XML_w, XML_mailMerge ); pFS->singleElementNS(XML_w, XML_mainDocumentType, FSNS( XML_w, XML_val ), "formLetters" ); -- cgit