diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-11 08:54:30 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-11 09:44:12 +0200 |
commit | 3428bd5fa3626844355f20997ba690fd04297982 (patch) | |
tree | 683256f95828e54edecdd87fbde0ce32a634a834 /dbaccess/source/ext | |
parent | 9c5c905680f7cb58eb3d0fbf25725a50c17896da (diff) |
clang-tidy modernize-use-emplace in d*
Change-Id: I79ac90faf24b4c741545e411dbaea7826c2df531
Reviewed-on: https://gerrit.libreoffice.org/42150
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess/source/ext')
3 files changed, 36 insertions, 36 deletions
diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx index 349c95d2b35d..ae45e55098b9 100644 --- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx @@ -93,7 +93,7 @@ namespace dbmm _out_rControllers.clear(); Reference< XEnumeration > xControllerEnum( _rxDocument->getControllers(), UNO_SET_THROW ); while ( xControllerEnum->hasMoreElements() ) - _out_rControllers.push_back( Reference< XController2 >( xControllerEnum->nextElement(), UNO_QUERY_THROW ) ); + _out_rControllers.emplace_back( xControllerEnum->nextElement(), UNO_QUERY_THROW ); } // MacroMigrationDialog_Data @@ -470,7 +470,7 @@ namespace dbmm throw CloseVetoException(); } - aViews.push_back( ViewDescriptor( xFrame, sViewName ) ); + aViews.emplace_back( xFrame, sViewName ); xFrame->setComponent( nullptr, nullptr ); xController->dispose(); } diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx index ebfe416d28e5..af555f5fe2a9 100644 --- a/dbaccess/source/ext/macromigration/migrationengine.cxx +++ b/dbaccess/source/ext/macromigration/migrationengine.cxx @@ -987,7 +987,7 @@ namespace dbmm OSL_ENSURE( xCommandProcessor.is(), "lcl_collectHierarchicalElementNames_throw: no container, and no command processor? What *is* it, then?!" ); if ( xCommandProcessor.is() ) { - _out_rDocs.push_back( SubDocument( xCommandProcessor, sElementName, _eType, ++_io_counter ) ); + _out_rDocs.emplace_back( xCommandProcessor, sElementName, _eType, ++_io_counter ); } } } diff --git a/dbaccess/source/ext/macromigration/migrationlog.cxx b/dbaccess/source/ext/macromigration/migrationlog.cxx index 1346999440fe..65bd539236b8 100644 --- a/dbaccess/source/ext/macromigration/migrationlog.cxx +++ b/dbaccess/source/ext/macromigration/migrationlog.cxx @@ -144,7 +144,7 @@ namespace dbmm "MigrationLog::movedLibrary: document is not known!" ); DocumentEntry& rDocEntry = m_pData->aDocumentLogs[ _nDocID ]; - rDocEntry.aMovedLibraries.push_back( LibraryEntry( _eScriptType, _rOriginalLibName, _rNewLibName ) ); + rDocEntry.aMovedLibraries.emplace_back( _eScriptType, _rOriginalLibName, _rNewLibName ); } void MigrationLog::finishedDocument( const DocumentID _nDocID ) @@ -191,17 +191,17 @@ namespace dbmm { case ERR_OPENING_SUB_DOCUMENT_FAILED: pAsciiErrorDescription = "opening '#doc#' failed"; - aParameterNames.push_back(OUString("#doc#")); + aParameterNames.emplace_back("#doc#"); break; case ERR_CLOSING_SUB_DOCUMENT_FAILED: pAsciiErrorDescription = "closing '#doc#' failed"; - aParameterNames.push_back(OUString("#doc#")); + aParameterNames.emplace_back("#doc#"); break; case ERR_STORAGE_COMMIT_FAILED: pAsciiErrorDescription = "committing the changes for document '#doc#' failed"; - aParameterNames.push_back(OUString("#doc#")); + aParameterNames.emplace_back("#doc#"); break; case ERR_STORING_DATABASEDOC_FAILED: @@ -214,52 +214,52 @@ namespace dbmm case ERR_UNEXPECTED_LIBSTORAGE_ELEMENT: pAsciiErrorDescription = "unexpected #lib# storage element in document '#doc#', named '#element#'"; - aParameterNames.push_back(OUString("#doc#")); - aParameterNames.push_back(OUString("#libstore#")); - aParameterNames.push_back(OUString("#element#")); + aParameterNames.emplace_back("#doc#"); + aParameterNames.emplace_back("#libstore#"); + aParameterNames.emplace_back("#element#"); break; case ERR_CREATING_DBDOC_SCRIPT_STORAGE_FAILED: pAsciiErrorDescription = "creating the database document's storage for #scripttype# scripts failed"; - aParameterNames.push_back(OUString("#scripttype#")); + aParameterNames.emplace_back("#scripttype#"); break; case ERR_COMMITTING_SCRIPT_STORAGES_FAILED: pAsciiErrorDescription = "saving the #scripttype# scripts for document '#doc#' failed"; - aParameterNames.push_back(OUString("#scripttype#")); - aParameterNames.push_back(OUString("#doc#")); + aParameterNames.emplace_back("#scripttype#"); + aParameterNames.emplace_back("#doc#"); break; case ERR_GENERAL_SCRIPT_MIGRATION_FAILURE: pAsciiErrorDescription = "general error while migrating #scripttype# scripts of document '#doc#'"; - aParameterNames.push_back(OUString("#scripttype#")); - aParameterNames.push_back(OUString("#doc#")); + aParameterNames.emplace_back("#scripttype#"); + aParameterNames.emplace_back("#doc#"); break; case ERR_GENERAL_MACRO_MIGRATION_FAILURE: pAsciiErrorDescription = "general error during macro migration of document '#doc#'"; - aParameterNames.push_back(OUString("#doc#")); + aParameterNames.emplace_back("#doc#"); break; case ERR_UNKNOWN_SCRIPT_TYPE: pAsciiErrorDescription = "unknown script type: #type#"; - aParameterNames.push_back(OUString("#type#")); + aParameterNames.emplace_back("#type#"); break; case ERR_UNKNOWN_SCRIPT_LANGUAGE: pAsciiErrorDescription = "unknown script language: #lang#"; - aParameterNames.push_back(OUString("#lang#")); + aParameterNames.emplace_back("#lang#"); break; case ERR_UNKNOWN_SCRIPT_NAME_FORMAT: pAsciiErrorDescription = "unknown script name format: #script#"; - aParameterNames.push_back(OUString("#script#")); + aParameterNames.emplace_back("#script#"); break; case ERR_SCRIPT_TRANSLATION_FAILURE: pAsciiErrorDescription = "analyzing/translating the script URL failed; script type: #type#; script: #code#"; - aParameterNames.push_back(OUString("#type#")); - aParameterNames.push_back(OUString("#code#")); + aParameterNames.emplace_back("#type#"); + aParameterNames.emplace_back("#code#"); break; case ERR_INVALID_SCRIPT_DESCRIPTOR_FORMAT: @@ -268,57 +268,57 @@ namespace dbmm case ERR_ADJUSTING_DOCUMENT_EVENTS_FAILED: pAsciiErrorDescription = "adjusting events for document '#doc#' failed"; - aParameterNames.push_back(OUString("#doc#")); + aParameterNames.emplace_back("#doc#"); break; case ERR_ADJUSTING_DIALOG_EVENTS_FAILED: pAsciiErrorDescription = "adjusting events for dialog #lib#.#dlg# in document '#doc#' failed"; - aParameterNames.push_back(OUString("#doc#")); - aParameterNames.push_back(OUString("#lib#")); - aParameterNames.push_back(OUString("#dlg#")); + aParameterNames.emplace_back("#doc#"); + aParameterNames.emplace_back("#lib#"); + aParameterNames.emplace_back("#dlg#"); break; case ERR_ADJUSTING_FORMCOMP_EVENTS_FAILED: pAsciiErrorDescription = "adjusting form component events for '#doc#' failed"; - aParameterNames.push_back(OUString("#doc#")); + aParameterNames.emplace_back("#doc#"); break; case ERR_BIND_SCRIPT_STORAGE_FAILED: pAsciiErrorDescription = "binding to the script storage failed for document '#doc#'"; - aParameterNames.push_back(OUString("#doc#")); + aParameterNames.emplace_back("#doc#"); break; case ERR_REMOVE_SCRIPTS_STORAGE_FAILED: pAsciiErrorDescription = "removing a scripts storage failed for document '#doc#'"; - aParameterNames.push_back(OUString("#doc#")); + aParameterNames.emplace_back("#doc#"); break; case ERR_DOCUMENT_BACKUP_FAILED: pAsciiErrorDescription = "backing up the document to #location# failed"; - aParameterNames.push_back(OUString("#location#")); + aParameterNames.emplace_back("#location#"); break; case ERR_UNKNOWN_SCRIPT_FOLDER: pAsciiErrorDescription = "unknown script folder '#name#' in document '#doc#'"; - aParameterNames.push_back(OUString("#doc#")); - aParameterNames.push_back(OUString("#name#")); + aParameterNames.emplace_back("#doc#"); + aParameterNames.emplace_back("#name#"); break; case ERR_EXAMINING_SCRIPTS_FOLDER_FAILED: pAsciiErrorDescription = "examining the 'Scripts' folder failed for document '#doc#'"; - aParameterNames.push_back(OUString("#doc#")); + aParameterNames.emplace_back("#doc#"); break; case ERR_PASSWORD_VERIFICATION_FAILED: pAsciiErrorDescription = "password verification failed for document '#doc#', #libtype# library '#name#'"; - aParameterNames.push_back(OUString("#doc#")); - aParameterNames.push_back(OUString("#libtype#")); - aParameterNames.push_back(OUString("#name#")); + aParameterNames.emplace_back("#doc#"); + aParameterNames.emplace_back("#libtype#"); + aParameterNames.emplace_back("#name#"); break; case ERR_NEW_STYLE_REPORT: pAsciiErrorDescription = "#doc# could not be processed, since you don't have the Oracle Report Builder (TM) extension installed."; - aParameterNames.push_back(OUString("#doc#")); + aParameterNames.emplace_back("#doc#"); break; // do *not* add a default case here: Without a default, some compilers will warn you when |