diff options
author | Muhammet Kara <muhammet.kara@pardus.org.tr> | 2016-06-29 12:02:39 +0300 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-30 06:58:34 +0000 |
commit | 471ca6690262463c58225b5c8efb74e8fcf5e1ac (patch) | |
tree | faaec161cf5070fee53148d9b8a5aac09965cc48 /dbaccess | |
parent | ec6956491a0c6553a9fb91f64c6ceb7cd8e8aa52 (diff) |
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@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/ui/misc/DExport.cxx | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index 5739239a7045..5ea7f36d16fa 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 ( "); |