[Libreoffice-commits] core.git: dbaccess/source
Muhammet Kara
muhammet.kara at pardus.org.tr
Thu Jun 30 06:59:07 UTC 2016
dbaccess/source/ui/misc/DExport.cxx | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
New commits:
commit 471ca6690262463c58225b5c8efb74e8fcf5e1ac
Author: Muhammet Kara <muhammet.kara at pardus.org.tr>
Date: Wed Jun 29 12:02:39 2016 +0300
Improve readability of OUString concatanation in ODatabaseExport
It is more readable and more efficient as a bonus.
See: https://goo.gl/jsVAwy:
Change-Id: I3cf18cfb6879ea1598ad98a0bccd3ec91c88c875
Reviewed-on: https://gerrit.libreoffice.org/26760
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index 5739239..5ea7f36 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -641,13 +641,13 @@ void ODatabaseExport::CreateDefaultColumn(const OUString& _rColumnName)
sal_Int32 nCount = 2;
while(m_aDestColumns.find(sName) != m_aDestColumns.end())
{
- sName = aAlias;
- sName += OUString::number(++nPos);
+ sName = aAlias
+ + OUString::number(++nPos);
if(nMaxNameLen && sName.getLength() > nMaxNameLen)
{
aAlias = aAlias.copy(0,::std::min<sal_Int32>( nMaxNameLen-nCount, aAlias.getLength() ));
- sName = aAlias;
- sName += OUString::number(nPos);
+ sName = aAlias
+ + OUString::number(nPos);
++nCount;
}
}
@@ -749,9 +749,9 @@ void ODatabaseExport::showErrorDialog(const css::sdbc::SQLException& e)
{
if(!m_bDontAskAgain)
{
- OUString aMsg(e.Message);
- aMsg += "\n";
- aMsg += ModuleRes( STR_QRY_CONTINUE );
+ OUString aMsg = e.Message
+ + "\n"
+ + OUString(ModuleRes( STR_QRY_CONTINUE ));
ScopedVclPtrInstance< OSQLWarningBox > aBox( nullptr, aMsg, WB_YES_NO | WB_DEF_NO );
if (aBox->Execute() == RET_YES)
@@ -807,11 +807,12 @@ Reference< XPreparedStatement > ODatabaseExport::createPreparedStatment( const R
,const Reference<XPropertySet>& _xDestTable
,const TPositions& _rvColumns)
{
- OUString aSql("INSERT INTO ");
OUString sComposedTableName = ::dbtools::composeTableName( _xMetaData, _xDestTable, ::dbtools::EComposeRule::InDataManipulation, false, false, true );
- aSql += sComposedTableName;
- aSql += " ( ";
+ OUString aSql = "INSERT INTO "
+ + sComposedTableName
+ + " ( ";
+
// set values and column names
OUString aValues(" VALUES ( ");
More information about the Libreoffice-commits
mailing list