diff options
46 files changed, 163 insertions, 171 deletions
diff --git a/dbaccess/source/core/api/FilteredContainer.cxx b/dbaccess/source/core/api/FilteredContainer.cxx index 49a36fdf12e3..6f9b1548026a 100644 --- a/dbaccess/source/core/api/FilteredContainer.cxx +++ b/dbaccess/source/core/api/FilteredContainer.cxx @@ -57,7 +57,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::vector< { if (pTableFilters->indexOf('%') != -1) { - _rOut.push_back(WildCard(pTableFilters->replace('%', '*'))); + _rOut.emplace_back(pTableFilters->replace('%', '*')); } else { @@ -276,7 +276,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::vector< const OUString* name = aNames.getConstArray(); const OUString* nameEnd = name + aNames.getLength(); for ( ; name != nameEnd; ++name ) - aUnfilteredTables.push_back( TableInfo( *name ) ); + aUnfilteredTables.emplace_back( *name ); reFill( lcl_filter( aUnfilteredTables, _rTableFilter, _rTableTypeFilter, m_xMetaData, m_xMasterContainer ) ); @@ -357,7 +357,7 @@ sal_Int32 createWildCardVector(Sequence< OUString >& _rTableFilter, std::vector< sName = xCurrentRow->getString(3); sType = xCurrentRow->getString(4); - aUnfilteredTables.push_back( TableInfo( sCatalog, sSchema, sName, sType ) ); + aUnfilteredTables.emplace_back( sCatalog, sSchema, sName, sType ); } reFill( lcl_filter( aUnfilteredTables, diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx index 78eebe9c53cd..03aa81dab5f3 100644 --- a/dbaccess/source/core/api/RowSet.cxx +++ b/dbaccess/source/core/api/RowSet.cxx @@ -1892,7 +1892,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi return this->getInsertValue(column); }); aColumnMap.insert(std::make_pair(sName,0)); - aColumns->get().push_back(pColumn); + aColumns->get().emplace_back(pColumn); pColumn->setName(sName); aNames.push_back(sName); m_aDataColumns.push_back(pColumn); @@ -1995,7 +1995,7 @@ void ORowSet::execute_NoApprove_NoNewConn(ResettableMutexGuard& _rClearForNotifi [this] (sal_Int32 const column) -> ORowSetValue const& { return this->getInsertValue(column); }); - aColumns->get().push_back(pColumn); + aColumns->get().emplace_back(pColumn); pColumn->setFastPropertyValue_NoBroadcast(PROPERTY_ID_ISREADONLY,makeAny(rKeyColumns.find(i) != rKeyColumns.end())); @@ -2096,7 +2096,7 @@ Reference< XResultSet > SAL_CALL ORowSet::createResultSet( ) { ORowSetClone* pClone = new ORowSetClone( m_aContext, *this, m_pMutex ); Reference< XResultSet > xRet(pClone); - m_aClones.push_back(WeakReferenceHelper(xRet)); + m_aClones.emplace_back(xRet); return xRet; } return Reference< XResultSet >(); @@ -2826,7 +2826,7 @@ ORowSetClone::ORowSetClone( const Reference<XComponentContext>& _rContext, ORowS [this] (sal_Int32 const column) -> ORowSetValue const& { return this->getValue(column); }); - aColumns->get().push_back(pColumn); + aColumns->get().emplace_back(pColumn); pColumn->setName(*pIter); aNames.push_back(*pIter); m_aDataColumns.push_back(pColumn); diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx index 8767e47b7e65..f51b8f2b0177 100644 --- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx +++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx @@ -886,8 +886,7 @@ Reference< XNameAccess > SAL_CALL OSingleSelectQueryComposer::getColumns( ) if ( i > static_cast< sal_Int32>( aSelectColumns->get().size() ) ) { - aSelectColumns->get().push_back( - ::connectivity::parse::OParseColumn::createColumnForResultSet( xResultSetMeta, m_xMetaData, i ,aColumnNames) + aSelectColumns->get().emplace_back(::connectivity::parse::OParseColumn::createColumnForResultSet( xResultSetMeta, m_xMetaData, i ,aColumnNames) ); OSL_ENSURE( aSelectColumns->get().size() == (size_t)i, "OSingleSelectQueryComposer::getColumns: inconsistency!" ); } @@ -984,7 +983,7 @@ bool OSingleSelectQueryComposer::setORCriteria(OSQLParseNode const * pCondition, bResult = setORCriteria(pCondition->getChild(i), _rIterator, rFilters, xFormatter); else { - rFilters.push_back( std::vector < PropertyValue >()); + rFilters.emplace_back(); bResult = setANDCriteria(pCondition->getChild(i), _rIterator, rFilters[rFilters.size() - 1], xFormatter); } } @@ -992,7 +991,7 @@ bool OSingleSelectQueryComposer::setORCriteria(OSQLParseNode const * pCondition, } else { - rFilters.push_back(std::vector < PropertyValue >()); + rFilters.emplace_back(); return setANDCriteria(pCondition, _rIterator, rFilters[rFilters.size() - 1], xFormatter); } } diff --git a/dbaccess/source/core/api/StaticSet.cxx b/dbaccess/source/core/api/StaticSet.cxx index e9d3af392ae8..00fcc6563ed3 100644 --- a/dbaccess/source/core/api/StaticSet.cxx +++ b/dbaccess/source/core/api/StaticSet.cxx @@ -279,7 +279,7 @@ void OStaticSet::reset(const Reference< XResultSet> &_xDriverSet) } m_aSetIter = m_aSet.end(); m_bEnd = false; - m_aSet.push_back(nullptr); // this is the beforefirst record + m_aSet.emplace_back(nullptr); // this is the beforefirst record } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx index f5e74a4c1b7f..95ca9106abac 100644 --- a/dbaccess/source/core/dataaccess/connection.cxx +++ b/dbaccess/source/core/dataaccess/connection.cxx @@ -125,7 +125,7 @@ Reference< XStatement > OConnection::createStatement() if ( xMasterStatement.is() ) { xStatement = new OStatement(this, xMasterStatement); - m_aStatements.push_back(WeakReferenceHelper(xStatement)); + m_aStatements.emplace_back(xStatement); } return xStatement; } @@ -141,7 +141,7 @@ Reference< XPreparedStatement > OConnection::prepareStatement(const OUString& s if ( xMasterStatement.is() ) { xStatement = new OPreparedStatement(this, xMasterStatement); - m_aStatements.push_back(WeakReferenceHelper(xStatement)); + m_aStatements.emplace_back(xStatement); } return xStatement; } @@ -156,7 +156,7 @@ Reference< XPreparedStatement > OConnection::prepareCall(const OUString& sql) if ( xMasterStatement.is() ) { xStatement = new OCallableStatement(this, xMasterStatement); - m_aStatements.push_back(WeakReferenceHelper(xStatement)); + m_aStatements.emplace_back(xStatement); } return xStatement; } @@ -516,7 +516,7 @@ Reference< XSQLQueryComposer > OConnection::createQueryComposer() // Reference< XNumberFormatsSupplier > xSupplier = pParent->getNumberFormatsSupplier(); Reference< XSQLQueryComposer > xComposer( new OQueryComposer( this ) ); - m_aComposers.push_back(WeakReferenceHelper(xComposer)); + m_aComposers.emplace_back(xComposer); return xComposer; } @@ -634,7 +634,7 @@ Reference< XInterface > SAL_CALL OConnection::createInstance( const OUString& _s if ( SERVICE_NAME_SINGLESELECTQUERYCOMPOSER == _sServiceSpecifier || _sServiceSpecifier == "com.sun.star.sdb.SingleSelectQueryAnalyzer" ) { xRet = new OSingleSelectQueryComposer( getTables(),this, m_aContext ); - m_aComposers.push_back(WeakReferenceHelper(xRet)); + m_aComposers.emplace_back(xRet); } else { diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index 0fb4ff6ce000..c8ecdb5daf4c 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -1146,7 +1146,7 @@ Reference< XConnection > ODatabaseSource::getConnection(const OUString& user, co Reference< XComponent> xComp(xConn,UNO_QUERY); if ( xComp.is() ) xComp->addEventListener( static_cast< XContainerListener* >( this ) ); - m_pImpl->m_aConnections.push_back(css::uno::WeakReference< css::sdbc::XConnection >(xConn)); + m_pImpl->m_aConnections.emplace_back(xConn); } return xConn; diff --git a/dbaccess/source/core/misc/DatabaseDataProvider.cxx b/dbaccess/source/core/misc/DatabaseDataProvider.cxx index 780db27d2a96..2f06de097706 100644 --- a/dbaccess/source/core/misc/DatabaseDataProvider.cxx +++ b/dbaccess/source/core/misc/DatabaseDataProvider.cxx @@ -702,12 +702,12 @@ void DatabaseDataProvider::impl_fillInternalDataProvider_throw(bool _bHasCategor if ( _bHasCategories && aColumns.empty() ) { if ( aRowSetColumnNames.getLength() ) - aColumns.push_back( ColumnDescription( aRowSetColumnNames[0] ) ); + aColumns.emplace_back( aRowSetColumnNames[0] ); else - aColumns.push_back( ColumnDescription( sColumnName ) ); + aColumns.emplace_back( sColumnName ); bFirstColumnIsCategory = true; } - aColumns.push_back( ColumnDescription( sColumnName ) ); + aColumns.emplace_back( sColumnName ); } } if ( aColumns.empty() ) 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 diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx index 7090008dda71..ddc71f1eea60 100644 --- a/dbaccess/source/filter/xml/xmlExport.cxx +++ b/dbaccess/source/filter/xml/xmlExport.cxx @@ -458,8 +458,8 @@ void ODBExport::exportDataSource() { if ( !aDriverSupportedProperties.has(pProperties->Name) || aDriverSupportedProperties.get(pProperties->Name) != aValue ) { - m_aDataSourceSettings.push_back( TypedPropertyValue( - pProperties->Name, pProperties->Type, aValue ) ); + m_aDataSourceSettings.emplace_back( + pProperties->Name, pProperties->Type, aValue ); } continue; } diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx b/dbaccess/source/ui/app/AppControllerGen.cxx index fc733502ba33..07ef9d90f928 100644 --- a/dbaccess/source/ui/app/AppControllerGen.cxx +++ b/dbaccess/source/ui/app/AppControllerGen.cxx @@ -696,7 +696,7 @@ void OApplicationController::doAction(sal_uInt16 _nId, const ElementOpenMode _eO else { Reference< XModel > xModel( openElementWithArguments( *aIter, eType, eOpenMode, _nId,aArguments ), UNO_QUERY ); - aComponents.push_back( std::pair< OUString, Reference< XModel > >( *aIter, xModel ) ); + aComponents.emplace_back( *aIter, xModel ); } } diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index eac3e20a74ad..0adba4a0d054 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -669,28 +669,28 @@ void OApplicationDetailView::impl_fillTaskPaneData( ElementType _eType, TaskPane switch ( _eType ) { case E_TABLE: - rList.push_back( TaskEntry( ".uno:DBNewTable", RID_STR_TABLES_HELP_TEXT_DESIGN, RID_STR_NEW_TABLE ) ); - rList.push_back( TaskEntry( ".uno:DBNewTableAutoPilot", RID_STR_TABLES_HELP_TEXT_WIZARD, RID_STR_NEW_TABLE_AUTO ) ); - rList.push_back( TaskEntry( ".uno:DBNewView", RID_STR_VIEWS_HELP_TEXT_DESIGN, RID_STR_NEW_VIEW, true ) ); + rList.emplace_back( ".uno:DBNewTable", RID_STR_TABLES_HELP_TEXT_DESIGN, RID_STR_NEW_TABLE ); + rList.emplace_back( ".uno:DBNewTableAutoPilot", RID_STR_TABLES_HELP_TEXT_WIZARD, RID_STR_NEW_TABLE_AUTO ); + rList.emplace_back( ".uno:DBNewView", RID_STR_VIEWS_HELP_TEXT_DESIGN, RID_STR_NEW_VIEW, true ); _rData.pTitleId = RID_STR_TABLES_CONTAINER; break; case E_FORM: - rList.push_back( TaskEntry( ".uno:DBNewForm", RID_STR_FORMS_HELP_TEXT, RID_STR_NEW_FORM ) ); - rList.push_back( TaskEntry( ".uno:DBNewFormAutoPilot", RID_STR_FORMS_HELP_TEXT_WIZARD, RID_STR_NEW_FORM_AUTO ) ); + rList.emplace_back( ".uno:DBNewForm", RID_STR_FORMS_HELP_TEXT, RID_STR_NEW_FORM ); + rList.emplace_back( ".uno:DBNewFormAutoPilot", RID_STR_FORMS_HELP_TEXT_WIZARD, RID_STR_NEW_FORM_AUTO ); _rData.pTitleId = RID_STR_FORMS_CONTAINER; break; case E_REPORT: - rList.push_back( TaskEntry( ".uno:DBNewReport", RID_STR_REPORT_HELP_TEXT, RID_STR_NEW_REPORT, true ) ); - rList.push_back( TaskEntry( ".uno:DBNewReportAutoPilot", RID_STR_REPORTS_HELP_TEXT_WIZARD, RID_STR_NEW_REPORT_AUTO ) ); + rList.emplace_back( ".uno:DBNewReport", RID_STR_REPORT_HELP_TEXT, RID_STR_NEW_REPORT, true ); + rList.emplace_back( ".uno:DBNewReportAutoPilot", RID_STR_REPORTS_HELP_TEXT_WIZARD, RID_STR_NEW_REPORT_AUTO ); _rData.pTitleId = RID_STR_REPORTS_CONTAINER; break; case E_QUERY: - rList.push_back( TaskEntry( ".uno:DBNewQuery", RID_STR_QUERIES_HELP_TEXT, RID_STR_NEW_QUERY ) ); - rList.push_back( TaskEntry( ".uno:DBNewQueryAutoPilot", RID_STR_QUERIES_HELP_TEXT_WIZARD, RID_STR_NEW_QUERY_AUTO ) ); - rList.push_back( TaskEntry( ".uno:DBNewQuerySql", RID_STR_QUERIES_HELP_TEXT_SQL, RID_STR_NEW_QUERY_SQL ) ); + rList.emplace_back( ".uno:DBNewQuery", RID_STR_QUERIES_HELP_TEXT, RID_STR_NEW_QUERY ); + rList.emplace_back( ".uno:DBNewQueryAutoPilot", RID_STR_QUERIES_HELP_TEXT_WIZARD, RID_STR_NEW_QUERY_AUTO ); + rList.emplace_back( ".uno:DBNewQuerySql", RID_STR_QUERIES_HELP_TEXT_SQL, RID_STR_NEW_QUERY_SQL ); _rData.pTitleId = RID_STR_QUERIES_CONTAINER; break; diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index 4cc6913b0866..7a88101dc993 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1831,7 +1831,7 @@ void SbaXDataBrowserController::ExecuteSearch() if ( pFact ) { std::vector< OUString > aContextNames; - aContextNames.push_back( OUString("Standard") ); + aContextNames.emplace_back("Standard" ); pDialog = pFact->CreateFmSearchDialog(getBrowserView(), sInitialText, aContextNames, 0, LINK(this, SbaXDataBrowserController, OnSearchContextRequest)); } OSL_ENSURE( pDialog, "SbaXDataBrowserController::ExecuteSearch: could not get the search dialog!" ); diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx index e7fed3d2f993..70d99d28a3da 100644 --- a/dbaccess/source/ui/browser/genericcontroller.cxx +++ b/dbaccess/source/ui/browser/genericcontroller.cxx @@ -421,7 +421,7 @@ namespace if ( _rFeatureState.aValue.hasValue() ) _out_rStates.push_back( _rFeatureState.aValue ); if ( _out_rStates.empty() ) - _out_rStates.push_back( Any() ); + _out_rStates.emplace_back( ); } } diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index c2078eb2bd54..020a71ecb8de 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -690,15 +690,15 @@ bool SbaTableQueryBrowser::InitializeGridModel(const Reference< css::form::XForm case DataType::BOOLEAN: { aCurrentModelType = "CheckBox"; - aInitialValues.push_back( NamedValue( "VisualEffect", makeAny( VisualEffect::FLAT ) ) ); + aInitialValues.emplace_back( "VisualEffect", makeAny( VisualEffect::FLAT ) ); sDefaultProperty = PROPERTY_DEFAULTSTATE; sal_Int32 nNullable = ColumnValue::NULLABLE_UNKNOWN; OSL_VERIFY( xColumn->getPropertyValue( PROPERTY_ISNULLABLE ) >>= nNullable ); - aInitialValues.push_back( NamedValue( + aInitialValues.emplace_back( "TriState", makeAny( ColumnValue::NO_NULLS != nNullable ) - ) ); + ); if ( ColumnValue::NO_NULLS == nNullable ) aDefault <<= (sal_Int16)TRISTATE_FALSE; } @@ -706,7 +706,7 @@ bool SbaTableQueryBrowser::InitializeGridModel(const Reference< css::form::XForm case DataType::LONGVARCHAR: case DataType::CLOB: - aInitialValues.push_back( NamedValue( "MultiLine", makeAny( true ) ) ); + aInitialValues.emplace_back( "MultiLine", makeAny( true ) ); SAL_FALLTHROUGH; case DataType::BINARY: case DataType::VARBINARY: @@ -724,19 +724,19 @@ bool SbaTableQueryBrowser::InitializeGridModel(const Reference< css::form::XForm sDefaultProperty = PROPERTY_EFFECTIVEDEFAULT; if ( xSupplier.is() ) - aInitialValues.push_back( NamedValue( "FormatsSupplier", makeAny( xSupplier ) ) ); - aInitialValues.push_back( NamedValue( "TreatAsNumber", makeAny( bFormattedIsNumeric ) ) ); - aCopyProperties.push_back( PROPERTY_FORMATKEY ); + aInitialValues.emplace_back( "FormatsSupplier", makeAny( xSupplier ) ); + aInitialValues.emplace_back( "TreatAsNumber", makeAny( bFormattedIsNumeric ) ); + aCopyProperties.emplace_back(PROPERTY_FORMATKEY ); break; } - aInitialValues.push_back( NamedValue( PROPERTY_CONTROLSOURCE, makeAny( *pIter ) ) ); + aInitialValues.emplace_back( PROPERTY_CONTROLSOURCE, makeAny( *pIter ) ); OUString sLabel; xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel; if ( !sLabel.isEmpty() ) - aInitialValues.push_back( NamedValue( PROPERTY_LABEL, makeAny( sLabel ) ) ); + aInitialValues.emplace_back( PROPERTY_LABEL, makeAny( sLabel ) ); else - aInitialValues.push_back( NamedValue( PROPERTY_LABEL, makeAny( *pIter ) ) ); + aInitialValues.emplace_back( PROPERTY_LABEL, makeAny( *pIter ) ); Reference< XPropertySet > xGridCol( xColFactory->createColumn( aCurrentModelType ), UNO_SET_THROW ); Reference< XPropertySetInfo > xGridColPSI( xGridCol->getPropertySetInfo(), UNO_SET_THROW ); @@ -756,11 +756,11 @@ bool SbaTableQueryBrowser::InitializeGridModel(const Reference< css::form::XForm } if ( aDefault.hasValue() ) - aInitialValues.push_back( NamedValue( sDefaultProperty, aDefault ) ); + aInitialValues.emplace_back( sDefaultProperty, aDefault ); // transfer properties from the definition to the UNO-model : - aCopyProperties.push_back( PROPERTY_HIDDEN ); - aCopyProperties.push_back( PROPERTY_WIDTH ); + aCopyProperties.emplace_back(PROPERTY_HIDDEN ); + aCopyProperties.emplace_back(PROPERTY_WIDTH ); // help text to display for the column Any aDescription; @@ -772,18 +772,18 @@ bool SbaTableQueryBrowser::InitializeGridModel(const Reference< css::form::XForm xColumn->getPropertyValue( PROPERTY_DESCRIPTION ) >>= sTemp; aDescription <<= sTemp; - aInitialValues.push_back( NamedValue( PROPERTY_HELPTEXT, aDescription ) ); + aInitialValues.emplace_back( PROPERTY_HELPTEXT, aDescription ); // ... horizontal justify Any aAlign; aAlign <<= sal_Int16( 0 ); Any aColAlign( xColumn->getPropertyValue( PROPERTY_ALIGN ) ); if ( aColAlign.hasValue() ) aAlign <<= sal_Int16( ::comphelper::getINT32( aColAlign ) ); - aInitialValues.push_back( NamedValue( PROPERTY_ALIGN, aAlign ) ); + aInitialValues.emplace_back( PROPERTY_ALIGN, aAlign ); // don't allow the mouse to scroll in the cells if ( xGridColPSI->hasPropertyByName( PROPERTY_MOUSE_WHEEL_BEHAVIOR ) ) - aInitialValues.push_back( NamedValue( PROPERTY_MOUSE_WHEEL_BEHAVIOR, makeAny( MouseWheelBehavior::SCROLL_DISABLED ) ) ); + aInitialValues.emplace_back( PROPERTY_MOUSE_WHEEL_BEHAVIOR, makeAny( MouseWheelBehavior::SCROLL_DISABLED ) ); // now set all those values for ( std::vector< NamedValue >::const_iterator property = aInitialValues.begin(); diff --git a/dbaccess/source/ui/control/RelationControl.cxx b/dbaccess/source/ui/control/RelationControl.cxx index 7f8abfb129f8..6214f73aaf43 100644 --- a/dbaccess/source/ui/control/RelationControl.cxx +++ b/dbaccess/source/ui/control/RelationControl.cxx @@ -232,7 +232,7 @@ namespace dbaui rLines.push_back(new OConnectionLineData()); nRow = rLines.size() - 1; // add new past-rLines row - m_ops.push_back(make_pair(INSERT, make_pair(nRow+1, nRow+2))); + m_ops.emplace_back(INSERT, make_pair(nRow+1, nRow+2)); } OConnectionLineDataRef pConnLineData = rLines[nRow]; @@ -255,8 +255,8 @@ namespace dbaui OConnectionLineDataVec::size_type line = m_pConnData->normalizeLines(); const OConnectionLineDataVec::size_type newSize = m_pConnData->GetConnLineDataList().size(); assert(newSize <= oldSize); - m_ops.push_back(make_pair(MODIFY, make_pair(line, newSize))); - m_ops.push_back(make_pair(DELETE, make_pair(newSize, oldSize))); + m_ops.emplace_back(MODIFY, make_pair(line, newSize)); + m_ops.emplace_back(DELETE, make_pair(newSize, oldSize)); return true; } diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 92d0a7d2ec8f..518c24af3e05 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -220,9 +220,8 @@ bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyVal // user: DSID_USER -> "user" const SfxStringItem* pUser = m_pItemSetHelper->getOutputSet()->GetItem<SfxStringItem>(DSID_USER); if (pUser && pUser->GetValue().getLength()) - aReturn.push_back( - PropertyValue( "user", 0, - makeAny(pUser->GetValue()), PropertyState_DIRECT_VALUE)); + aReturn.emplace_back( "user", 0, + makeAny(pUser->GetValue()), PropertyState_DIRECT_VALUE); // check if the connection type requires a password if (hasAuthentication(*m_pItemSetHelper->getOutputSet())) @@ -306,9 +305,8 @@ bool ODbDataSourceAdministrationHelper::getCurrentSettings(Sequence< PropertyVal } if (!sPassword.isEmpty()) - aReturn.push_back( - PropertyValue( "password", 0, - makeAny(sPassword), PropertyState_DIRECT_VALUE)); + aReturn.emplace_back( "password", 0, + makeAny(sPassword), PropertyState_DIRECT_VALUE); } if ( !aReturn.empty() ) diff --git a/dbaccess/source/ui/dlg/dbfindex.cxx b/dbaccess/source/ui/dlg/dbfindex.cxx index 7e909b93176e..4c05e8664599 100644 --- a/dbaccess/source/ui/dlg/dbfindex.cxx +++ b/dbaccess/source/ui/dlg/dbfindex.cxx @@ -312,11 +312,11 @@ void ODbaseIndexDialog::Init() OUString aExt = aURL.getExtension(); if (aExt == aIndexExt) { - m_aFreeIndexList.push_back( OTableIndex(aURL.getName()) ); + m_aFreeIndexList.emplace_back(aURL.getName() ); } else if (aExt == aTableExt) { - m_aTableInfoList.push_back( OTableInfo(aURL.getName()) ); + m_aTableInfoList.emplace_back(aURL.getName() ); OTableInfo& rTabInfo = m_aTableInfoList.back(); // open the INF file @@ -341,7 +341,7 @@ void ODbaseIndexDialog::Init() if (aNDX == "NDX") { aEntry = OStringToOUString(aInfFile.ReadKey(aKeyName), osl_getThreadTextEncoding()); - rTabInfo.aIndexList.push_back( OTableIndex( aEntry ) ); + rTabInfo.aIndexList.emplace_back( aEntry ); // and remove it from the free index list aUsedIndexes.push_back(aEntry); diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 3cdadd9c3e78..d462f16d81b1 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -128,7 +128,7 @@ namespace dbaui if ( m_pDatasourceType->GetEntryPos( sDisplayName ) == LISTBOX_ENTRY_NOTFOUND && approveDatasourceType( sURLPrefix, sDisplayName ) ) { - aDisplayedTypes.push_back( DisplayedTypes::value_type( sURLPrefix, sDisplayName ) ); + aDisplayedTypes.emplace_back( sURLPrefix, sDisplayName ); } } } @@ -167,7 +167,7 @@ namespace dbaui if ( m_pEmbeddedDBType->GetEntryPos( sDisplayName ) == LISTBOX_ENTRY_NOTFOUND && dbaccess::ODsnTypeCollection::isEmbeddedDatabase( sURLPrefix ) ) { - aDisplayedTypes.push_back( DisplayedTypes::value_type( sURLPrefix, sDisplayName ) ); + aDisplayedTypes.emplace_back( sURLPrefix, sDisplayName ); } } } diff --git a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx index 6eafc8a30366..7545c7e62392 100644 --- a/dbaccess/source/ui/dlg/indexfieldscontrol.cxx +++ b/dbaccess/source/ui/dlg/indexfieldscontrol.cxx @@ -393,7 +393,7 @@ namespace dbaui if (!sSelectedEntry.isEmpty() && (nCurrentRow == rowCount - 1) /*&& (!m_nMaxColumnsInIndex || rowCount < m_nMaxColumnsInIndex )*/ ) { // in the last row, an non-empty string has been selected // -> insert a new row - m_aFields.push_back(OIndexField()); + m_aFields.emplace_back(); RowInserted(GetRowCount()); Invalidate(GetRowRectPixel(nCurrentRow)); } diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index 57b8fcb63305..0570a5cd1ff3 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -667,7 +667,7 @@ void ODatabaseExport::CreateDefaultColumn(const OUString& _rColumnName) m_aDestColumns.erase(aFind); } - m_vDestVector.push_back(m_aDestColumns.emplace(aAlias,pField).first); + m_vDestVector.emplace_back(m_aDestColumns.emplace(aAlias,pField).first); } bool ODatabaseExport::createRowSet() diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index 5ca003866e32..e5e18edbe541 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -616,7 +616,7 @@ OCopyTableWizard::OCopyTableWizard( vcl::Window* pParent, const OUString& _rDefa ODatabaseExport::TColumnVector::const_iterator aEnd = _rSourceColVec.end(); for (; aIter != aEnd ; ++aIter) { - m_vSourceVec.push_back(m_vSourceColumns.find((*aIter)->first)); + m_vSourceVec.emplace_back(m_vSourceColumns.find((*aIter)->first)); } ::dbaui::fillTypeInfo( _xConnection, m_sTypeNames, m_aTypeInfo, m_aTypeInfoIndex ); @@ -781,7 +781,7 @@ bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos) m_bAddPKFirstTime = false; insertColumn(0,pField); } - m_vColumnPos.push_back(ODatabaseExport::TPositions::value_type(1,1)); + m_vColumnPos.emplace_back(1,1); m_vColumnTypes.push_back(pTypeInfo->nType); } } @@ -798,12 +798,12 @@ bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos) { ODatabaseExport::TColumnVector::const_iterator aFind = std::find(m_aDestVec.begin(),m_aDestVec.end(),aDestIter); sal_Int32 nPos = (aFind - m_aDestVec.begin())+1; - m_vColumnPos.push_back(ODatabaseExport::TPositions::value_type(nPos,nPos)); + m_vColumnPos.emplace_back(nPos,nPos); m_vColumnTypes.push_back((*aFind)->second->GetType()); } else { - m_vColumnPos.push_back( ODatabaseExport::TPositions::value_type( COLUMN_POSITION_NOT_FOUND, COLUMN_POSITION_NOT_FOUND ) ); + m_vColumnPos.emplace_back( COLUMN_POSITION_NOT_FOUND, COLUMN_POSITION_NOT_FOUND ); m_vColumnTypes.push_back(0); } } @@ -827,7 +827,7 @@ bool OCopyTableWizard::CheckColumns(sal_Int32& _rnBreakPos) // now create a column insertColumn(m_vDestColumns.size(),pField); - m_vColumnPos.push_back(ODatabaseExport::TPositions::value_type(m_vDestColumns.size(),m_vDestColumns.size())); + m_vColumnPos.emplace_back(m_vDestColumns.size(),m_vDestColumns.size()); m_vColumnTypes.push_back((*aSrcIter)->second->GetType()); } } @@ -1065,7 +1065,7 @@ void OCopyTableWizard::loadData( const ICopyTableSourceObject& _rSourceObject, pTypeInfo = m_pTypeInfo; pActFieldDescr->FillFromTypeInfo(pTypeInfo,true,false); - _rColVector.push_back(_rColumns.emplace(pActFieldDescr->GetName(),pActFieldDescr).first); + _rColVector.emplace_back(_rColumns.emplace(pActFieldDescr->GetName(),pActFieldDescr).first); } // determine which columns belong to the primary key diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 9061365658c5..14d89cd448d5 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -1563,7 +1563,7 @@ void OJoinTableView::addConnection(OTableConnection* _pConnection,bool _bAddData #endif m_pView->getController().getTableConnectionData().push_back(_pConnection->GetData()); } - m_vTableConnection.push_back(_pConnection); + m_vTableConnection.emplace_back(_pConnection); _pConnection->RecalcLines(); _pConnection->InvalidateConnection(); diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx index 3a56c45f912a..1ab8782d4034 100644 --- a/dbaccess/source/ui/querydesign/querycontroller.cxx +++ b/dbaccess/source/ui/querydesign/querycontroller.cxx @@ -1581,13 +1581,13 @@ static std::vector< CommentStrip > getComment( const OUString& rQuery ) { bComment2 = false; aBuf.append( &pCopy[++i], 1); - aRet.push_back( CommentStrip( aBuf.makeStringAndClear(), false)); + aRet.emplace_back( aBuf.makeStringAndClear(), false); } } else { // comment can't close anymore, actually an error, but.. - aRet.push_back( CommentStrip( aBuf.makeStringAndClear(), false)); + aRet.emplace_back( aBuf.makeStringAndClear(), false); } continue; } @@ -1597,7 +1597,7 @@ static std::vector< CommentStrip > getComment( const OUString& rQuery ) { if (i == nQueryLen-1 && pCopy[i] != '\n') aBuf.append( &pCopy[i], 1); - aRet.push_back( CommentStrip( aBuf.makeStringAndClear(), true)); + aRet.emplace_back( aBuf.makeStringAndClear(), true); bComment = false; } else if (!aRet.empty()) diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx b/desktop/qa/desktop_lib/test_desktop_lib.cxx index a269f9c639e4..237ec9fbf103 100644 --- a/desktop/qa/desktop_lib/test_desktop_lib.cxx +++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx @@ -244,7 +244,7 @@ void DesktopLOKTest::callbackImpl(int nType, const char* pPayload) boost::property_tree::read_json(aStream, aTree); for (boost::property_tree::ptree::value_type& rValue : aTree.get_child("searchResultSelection")) { - m_aSearchResultSelection.push_back(rValue.second.get<std::string>("rectangles").c_str()); + m_aSearchResultSelection.emplace_back(rValue.second.get<std::string>("rectangles").c_str()); m_aSearchResultPart.push_back(std::atoi(rValue.second.get<std::string>("part").c_str())); } } diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx index c33dcaf61c8d..6cd75c0d5f4d 100644 --- a/desktop/source/app/dispatchwatcher.cxx +++ b/desktop/source/app/dispatchwatcher.cxx @@ -435,7 +435,7 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest // Use local vector to store dispatcher because we have to fill our request container before // we can dispatch. Otherwise it would be possible that statusChanged is called before we dispatched all requests!! - aDispatches.push_back( DispatchHolder( aURL, xDispatcher )); + aDispatches.emplace_back( aURL, xDispatcher ); } } else if ( aName.startsWith( "service:" ) ) diff --git a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx index 49f27bb49669..033fbf48bb77 100644 --- a/desktop/source/deployment/gui/dp_gui_extlistbox.cxx +++ b/desktop/source/deployment/gui/dp_gui_extlistbox.cxx @@ -908,7 +908,7 @@ void ExtensionBox_Impl::addEventListenerOnce( FindWeakRef(extension)) ) { extension->addEventListener( m_xRemoveListener.get() ); - m_vListenerAdded.push_back(extension); + m_vListenerAdded.emplace_back(extension); } } diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx index c433384da5e5..c1612139a828 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx @@ -389,7 +389,7 @@ void UpdateInstallDialog::Thread::downloadExtensions() } catch ( cssu::Exception & e ) { - vecExceptions.push_back( std::make_pair(seqDownloadURLs[j], e)); + vecExceptions.emplace_back(seqDownloadURLs[j], e); //There can be several different errors, for example, the URL is wrong, webserver cannot be reached, //name cannot be resolved. The UCB helper API does not specify different special exceptions for these //cases. Therefore ignore and continue. diff --git a/desktop/source/deployment/manager/dp_activepackages.cxx b/desktop/source/deployment/manager/dp_activepackages.cxx index 879400546460..e31f4650ed24 100644 --- a/desktop/source/deployment/manager/dp_activepackages.cxx +++ b/desktop/source/deployment/manager/dp_activepackages.cxx @@ -170,19 +170,17 @@ ActivePackages::Entries ActivePackages::getEntries() const { i != m.end(); ++i) { if (!i->first.isEmpty() && i->first[0] == separator) { - es.push_back( - std::make_pair( + es.emplace_back( OUString( i->first.getStr() + 1, i->first.getLength() - 1, RTL_TEXTENCODING_UTF8), - decodeNewData(i->second))); + decodeNewData(i->second)); } else { OUString fn( OStringToOUString(i->first, RTL_TEXTENCODING_UTF8)); - es.push_back( - std::make_pair( + es.emplace_back( ::dp_misc::generateLegacyIdentifier(fn), - decodeOldData(fn, i->second))); + decodeOldData(fn, i->second)); } } #else diff --git a/desktop/source/deployment/manager/dp_extensionmanager.cxx b/desktop/source/deployment/manager/dp_extensionmanager.cxx index 73117ac8ed82..31acc903fa85 100644 --- a/desktop/source/deployment/manager/dp_extensionmanager.cxx +++ b/desktop/source/deployment/manager/dp_extensionmanager.cxx @@ -169,9 +169,9 @@ ExtensionManager::ExtensionManager( Reference< uno::XComponentContext > const& x m_xPackageManagerFactory = css::deployment::thePackageManagerFactory::get(m_xContext); OSL_ASSERT(m_xPackageManagerFactory.is()); - m_repositoryNames.push_back("user"); - m_repositoryNames.push_back("shared"); - m_repositoryNames.push_back("bundled"); + m_repositoryNames.emplace_back("user"); + m_repositoryNames.emplace_back("shared"); + m_repositoryNames.emplace_back("bundled"); } ExtensionManager::~ExtensionManager() diff --git a/desktop/source/deployment/misc/dp_ucb.cxx b/desktop/source/deployment/misc/dp_ucb.cxx index d74bfc5e3f3d..c962c228f756 100644 --- a/desktop/source/deployment/misc/dp_ucb.cxx +++ b/desktop/source/deployment/misc/dp_ucb.cxx @@ -290,7 +290,7 @@ bool readProperties( std::list< std::pair< OUString, OUString> > & out_result, { OUString name = aLine.copy(0, posEqual); OUString value = aLine.copy(posEqual + 1); - out_result.push_back(std::make_pair(name, value)); + out_result.emplace_back(name, value); } if (bEOF) diff --git a/desktop/source/deployment/misc/dp_update.cxx b/desktop/source/deployment/misc/dp_update.cxx index 9bde54bcad39..b4c385c61cea 100644 --- a/desktop/source/deployment/misc/dp_update.cxx +++ b/desktop/source/deployment/misc/dp_update.cxx @@ -101,7 +101,7 @@ void getOwnUpdateInfos( Sequence<Reference< xml::dom::XElement > > infos(getUpdateInformation(updateInformation, urls, id, anyError)); if (anyError.hasValue()) - out_errors.push_back(std::make_pair(i->second.extension, anyError)); + out_errors.emplace_back(i->second.extension, anyError); for (sal_Int32 j = 0; j < infos.getLength(); ++j) { @@ -146,7 +146,7 @@ void getDefaultUpdateInfos( updateInformation, Sequence< OUString >(&sDefaultURL, 1), OUString(), anyError)); if (anyError.hasValue()) - out_errors.push_back(std::make_pair(Reference<deployment::XPackage>(), anyError)); + out_errors.emplace_back(Reference<deployment::XPackage>(), anyError); for (sal_Int32 i = 0; i < infos.getLength(); ++i) { Reference< xml::dom::XNode > node(infos[i], UNO_QUERY_THROW); diff --git a/desktop/source/deployment/registry/component/dp_component.cxx b/desktop/source/deployment/registry/component/dp_component.cxx index 847fbf30fba9..4c5805b4b54a 100644 --- a/desktop/source/deployment/registry/component/dp_component.cxx +++ b/desktop/source/deployment/registry/component/dp_component.cxx @@ -1136,9 +1136,8 @@ void extractComponentData( css::uno::Reference< css::registry::XRegistryKey > > singletonKeys(singletons->openKeys()); for (sal_Int32 j = 0; j < singletonKeys.getLength(); ++j) { - data->singletons.push_back( - std::pair< OUString, OUString >( - singletonKeys[j]->getKeyName().copy(prefix2), name)); + data->singletons.emplace_back( + singletonKeys[j]->getKeyName().copy(prefix2), name); } } if (factories != nullptr) { diff --git a/desktop/source/deployment/registry/dp_backenddb.cxx b/desktop/source/deployment/registry/dp_backenddb.cxx index f44b1d7ac2f1..58f6e1137db5 100644 --- a/desktop/source/deployment/registry/dp_backenddb.cxx +++ b/desktop/source/deployment/registry/dp_backenddb.cxx @@ -368,8 +368,8 @@ BackendDb::readVectorOfPair( xpathApi->selectSingleNode(aPair, sExprSecond); OSL_ASSERT(first.is() && second.is()); - retVector.push_back(std::make_pair( - first->getNodeValue(), second->getNodeValue())); + retVector.emplace_back( + first->getNodeValue(), second->getNodeValue()); } return retVector; } diff --git a/desktop/source/deployment/registry/package/dp_package.cxx b/desktop/source/deployment/registry/package/dp_package.cxx index e5c061d021f9..d3d29d904dfc 100644 --- a/desktop/source/deployment/registry/package/dp_package.cxx +++ b/desktop/source/deployment/registry/package/dp_package.cxx @@ -861,9 +861,8 @@ void BackendImpl::PackageImpl::processPackage_( ::cppu::throwException(exc); } } - data.items.push_back( - std::make_pair(xPackage->getURL(), - xPackage->getPackageType()->getMediaType())); + data.items.emplace_back(xPackage->getURL(), + xPackage->getPackageType()->getMediaType()); } getMyBackend()->addDataToDb(getURL(), data); } diff --git a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx index 6110013366e3..00af2589627d 100644 --- a/drawinglayer/source/primitive2d/animatedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/animatedprimitive2d.cxx @@ -137,7 +137,7 @@ namespace drawinglayer for(sal_uInt32 a(0); a < nCount; a++) { - maMatrixStack.push_back(basegfx::tools::B2DHomMatrixBufferedDecompose(rmMatrixStack[a])); + maMatrixStack.emplace_back(rmMatrixStack[a]); } } diff --git a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx index e9f67216869c..60fc556a4f52 100644 --- a/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/svggradientprimitive2d.cxx @@ -695,11 +695,10 @@ namespace drawinglayer { const SvgGradientEntry& rCandidate = getGradientEntries()[nCount - 1 - a]; - maMirroredGradientEntries.push_back( - SvgGradientEntry( + maMirroredGradientEntries.emplace_back( 1.0 - rCandidate.getOffset(), rCandidate.getColor(), - rCandidate.getOpacity())); + rCandidate.getOpacity()); } } } diff --git a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx index b546d8b0c544..9b6d650e0303 100644 --- a/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrcubeprimitive3d.cxx @@ -130,7 +130,7 @@ namespace drawinglayer for(sal_uInt32 a(0); a < aFill.count(); a++) { - a3DPolyPolygonVector.push_back(basegfx::B3DPolyPolygon(aFill.getB3DPolygon(a))); + a3DPolyPolygonVector.emplace_back(aFill.getB3DPolygon(a)); } if(!getSdrLFSAttribute().getFill().isDefault()) diff --git a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx index e8d75ee49879..880519b3afa2 100644 --- a/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx +++ b/drawinglayer/source/primitive3d/sdrextrudelathetools3d.cxx @@ -364,7 +364,7 @@ namespace drawinglayer if(basegfx::fTools::equalZero(fRotation) || 0 == nSteps) { // no rotation or no steps, just one plane - rSliceVector.push_back(Slice3D(rSource, basegfx::B3DHomMatrix())); + rSliceVector.emplace_back(rSource, basegfx::B3DHomMatrix()); } else { @@ -406,7 +406,7 @@ namespace drawinglayer impGetOuterPolyPolygon(aFront, aOuterFront, fOffsetLen, bCharacterMode); basegfx::B3DHomMatrix aTransform; aTransform.translate(0.0, 0.0, fOffsetLen); - rSliceVector.push_back(Slice3D(aOuterFront, aTransform, SLICETYPE3D_FRONTCAP)); + rSliceVector.emplace_back(aOuterFront, aTransform, SLICETYPE3D_FRONTCAP); } if(bCloseBack) @@ -421,7 +421,7 @@ namespace drawinglayer // add start polygon (a = 0) if(!bClosedRotation) { - rSliceVector.push_back(Slice3D(aFront, basegfx::B3DHomMatrix())); + rSliceVector.emplace_back(aFront, basegfx::B3DHomMatrix()); } // create segments (a + 1 .. nSteps) @@ -433,12 +433,12 @@ namespace drawinglayer basegfx::B2DPolyPolygon aNewPoly(bBackScale ? basegfx::tools::interpolate(aFront, aBack, fStep) : aFront); basegfx::B3DHomMatrix aNewMat; aNewMat.rotate(0.0, fRotation * fStep, 0.0); - rSliceVector.push_back(Slice3D(aNewPoly, aNewMat)); + rSliceVector.emplace_back(aNewPoly, aNewMat); } if(bCloseBack) { - rSliceVector.push_back(Slice3D(aOuterBack, aTransformBack, SLICETYPE3D_BACKCAP)); + rSliceVector.emplace_back(aOuterBack, aTransformBack, SLICETYPE3D_BACKCAP); } } } @@ -456,7 +456,7 @@ namespace drawinglayer if(basegfx::fTools::equalZero(fDepth)) { // no depth, just one plane - rSliceVector.push_back(Slice3D(rSource, basegfx::B3DHomMatrix())); + rSliceVector.emplace_back(rSource, basegfx::B3DHomMatrix()); } else { @@ -488,7 +488,7 @@ namespace drawinglayer impGetOuterPolyPolygon(aFront, aOuterFront, fOffset, bCharacterMode); basegfx::B3DHomMatrix aTransformFront; aTransformFront.translate(0.0, 0.0, fDepth); - rSliceVector.push_back(Slice3D(aOuterFront, aTransformFront, SLICETYPE3D_FRONTCAP)); + rSliceVector.emplace_back(aOuterFront, aTransformFront, SLICETYPE3D_FRONTCAP); } if(bCloseBack) @@ -503,15 +503,15 @@ namespace drawinglayer basegfx::B3DHomMatrix aTransformA, aTransformB; aTransformA.translate(0.0, 0.0, fZFront); - rSliceVector.push_back(Slice3D(aFront, aTransformA)); + rSliceVector.emplace_back(aFront, aTransformA); aTransformB.translate(0.0, 0.0, fZBack); - rSliceVector.push_back(Slice3D(aBack, aTransformB)); + rSliceVector.emplace_back(aBack, aTransformB); } if(bCloseBack) { - rSliceVector.push_back(Slice3D(aOuterBack, basegfx::B3DHomMatrix(), SLICETYPE3D_BACKCAP)); + rSliceVector.emplace_back(aOuterBack, basegfx::B3DHomMatrix(), SLICETYPE3D_BACKCAP); } } } @@ -891,7 +891,7 @@ namespace drawinglayer for(a = 0; a < aEdgeRounding.count(); a++) { - rFill.push_back(basegfx::B3DPolyPolygon(aEdgeRounding.getB3DPolygon(a))); + rFill.emplace_back(aEdgeRounding.getB3DPolygon(a)); } } } diff --git a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx index ee3b419ef146..e09476df2c19 100644 --- a/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx +++ b/drawinglayer/source/primitive3d/sdrsphereprimitive3d.cxx @@ -119,7 +119,7 @@ namespace drawinglayer for(sal_uInt32 a(0); a < aFill.count(); a++) { - a3DPolyPolygonVector.push_back(basegfx::B3DPolyPolygon(aFill.getB3DPolygon(a))); + a3DPolyPolygonVector.emplace_back(aFill.getB3DPolygon(a)); } if(!getSdrLFSAttribute().getFill().isDefault()) diff --git a/drawinglayer/source/processor2d/contourextractor2d.cxx b/drawinglayer/source/processor2d/contourextractor2d.cxx index 6162994316dd..5015544f4c18 100644 --- a/drawinglayer/source/processor2d/contourextractor2d.cxx +++ b/drawinglayer/source/processor2d/contourextractor2d.cxx @@ -70,7 +70,7 @@ namespace drawinglayer basegfx::tools::openWithGeometryChange(aLocalPolygon); } - maExtractedContour.push_back(basegfx::B2DPolyPolygon(aLocalPolygon)); + maExtractedContour.emplace_back(aLocalPolygon); } break; } @@ -90,7 +90,7 @@ namespace drawinglayer basegfx::B2DHomMatrix aLocalTransform(getViewInformation2D().getObjectTransformation() * rBitmapCandidate.getTransform()); basegfx::B2DPolygon aPolygon(basegfx::tools::createUnitPolygon()); aPolygon.transform(aLocalTransform); - maExtractedContour.push_back(basegfx::B2DPolyPolygon(aPolygon)); + maExtractedContour.emplace_back(aPolygon); break; } case PRIMITIVE2D_ID_METAFILEPRIMITIVE2D : @@ -100,7 +100,7 @@ namespace drawinglayer basegfx::B2DHomMatrix aLocalTransform(getViewInformation2D().getObjectTransformation() * rMetaCandidate.getTransform()); basegfx::B2DPolygon aPolygon(basegfx::tools::createUnitPolygon()); aPolygon.transform(aLocalTransform); - maExtractedContour.push_back(basegfx::B2DPolyPolygon(aPolygon)); + maExtractedContour.emplace_back(aPolygon); break; } case PRIMITIVE2D_ID_TRANSPARENCEPRIMITIVE2D : @@ -177,7 +177,7 @@ namespace drawinglayer // primitives who's BoundRect will be added in world coordinates basegfx::B2DRange aRange(rCandidate.getB2DRange(getViewInformation2D())); aRange.transform(getViewInformation2D().getObjectTransformation()); - maExtractedContour.push_back(basegfx::B2DPolyPolygon(basegfx::tools::createPolygonFromRect(aRange))); + maExtractedContour.emplace_back(basegfx::tools::createPolygonFromRect(aRange)); break; } default : diff --git a/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx b/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx index de194d520710..ca4169a664d4 100644 --- a/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx +++ b/drawinglayer/source/processor2d/textaspolygonextractor2d.cxx @@ -104,7 +104,7 @@ namespace drawinglayer const basegfx::BColor aColor(maBColorModifierStack.getModifiedColor(rPoPoCoCandidate.getBColor())); // add to result vector - maTarget.push_back(TextAsPolygonDataNode(aPolyPolygon, aColor, true)); + maTarget.emplace_back(aPolyPolygon, aColor, true); } } @@ -126,7 +126,7 @@ namespace drawinglayer const basegfx::BColor aColor(maBColorModifierStack.getModifiedColor(rPoHaCandidate.getBColor())); // add to result vector - maTarget.push_back(TextAsPolygonDataNode(basegfx::B2DPolyPolygon(aPolygon), aColor, false)); + maTarget.emplace_back(basegfx::B2DPolyPolygon(aPolygon), aColor, false); } } @@ -148,7 +148,7 @@ namespace drawinglayer const basegfx::BColor aColor(maBColorModifierStack.getModifiedColor(rPoPoHaCandidate.getBColor())); // add to result vector - maTarget.push_back(TextAsPolygonDataNode(aPolyPolygon, aColor, false)); + maTarget.emplace_back(aPolyPolygon, aColor, false); } } diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx index 125b154f90b0..127d88571d7e 100644 --- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx +++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx @@ -213,7 +213,7 @@ namespace OSL_ENSURE(aUsedFound != maUsedBuffers.end(), "OOps, non-registered buffer freed (!)"); maUsedBuffers.erase(aUsedFound); - maFreeBuffers.push_back(&rDevice); + maFreeBuffers.emplace_back(&rDevice); SAL_WARN_IF(maFreeBuffers.size() > 1000, "drawinglayer", "excessive cached buffers, " << maFreeBuffers.size() << " entries!"); Start(); diff --git a/drawinglayer/source/tools/emfphelperdata.cxx b/drawinglayer/source/tools/emfphelperdata.cxx index 3aaf19b60c30..fef6ca8a1b3c 100644 --- a/drawinglayer/source/tools/emfphelperdata.cxx +++ b/drawinglayer/source/tools/emfphelperdata.cxx @@ -550,7 +550,7 @@ namespace emfplushelper aColor.setGreen( aStartColor.getGreen() * (1. - brush->blendFactors[i]) + aEndColor.getGreen() * brush->blendFactors[i] ); aColor.setBlue ( aStartColor.getBlue() * (1. - brush->blendFactors[i]) + aEndColor.getBlue() * brush->blendFactors[i] ); aColor.setRed ( aStartColor.getRed() * (1. - brush->blendFactors[i]) + aEndColor.getRed() * brush->blendFactors[i] ); - aVector.push_back( drawinglayer::primitive2d::SvgGradientEntry(aBlendPoint, aColor, 1.) ); + aVector.emplace_back(aBlendPoint, aColor, 1. ); } } else if (brush->colorblendPositions) @@ -572,20 +572,20 @@ namespace emfplushelper aBlendPoint = 2. * ( 1. - brush->colorblendPositions [i] ); } aColor = brush->colorblendColors[i].getBColor(); - aVector.push_back( drawinglayer::primitive2d::SvgGradientEntry(aBlendPoint, aColor, 1.) ); + aVector.emplace_back(aBlendPoint, aColor, 1. ); } } else // ok, no extra points: just start and end { if (brush->type == BrushTypeLinearGradient) { - aVector.push_back( drawinglayer::primitive2d::SvgGradientEntry(0.0, aStartColor, 1.) ); - aVector.push_back( drawinglayer::primitive2d::SvgGradientEntry(1.0, aEndColor, 1.) ); + aVector.emplace_back(0.0, aStartColor, 1. ); + aVector.emplace_back(1.0, aEndColor, 1. ); } else // again, here reverse { - aVector.push_back( drawinglayer::primitive2d::SvgGradientEntry(0.0, aEndColor, 1.) ); - aVector.push_back( drawinglayer::primitive2d::SvgGradientEntry(1.0, aStartColor, 1.) ); + aVector.emplace_back(0.0, aEndColor, 1. ); + aVector.emplace_back(1.0, aStartColor, 1. ); } } diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx index 0bc3a518c838..39b39071b287 100644 --- a/drawinglayer/source/tools/wmfemfhelper.cxx +++ b/drawinglayer/source/tools/wmfemfhelper.cxx @@ -1520,7 +1520,7 @@ namespace wmfemfhelper } const Point& rPoint = pA->GetPoint(); - aPositions.push_back(basegfx::B2DPoint(rPoint.X(), rPoint.Y())); + aPositions.emplace_back(rPoint.X(), rPoint.Y()); nAction++; if(nAction < nCount) pAction = rMetaFile.GetAction(nAction); } @@ -1544,7 +1544,7 @@ namespace wmfemfhelper { const MetaPointAction* pA = static_cast<const MetaPointAction*>(pAction); const Point& rPoint = pA->GetPoint(); - aPositions.push_back(basegfx::B2DPoint(rPoint.X(), rPoint.Y())); + aPositions.emplace_back(rPoint.X(), rPoint.Y()); nAction++; if(nAction < nCount) pAction = rMetaFile.GetAction(nAction); } |