summaryrefslogtreecommitdiff
path: root/extensions/source
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2023-12-22 16:31:04 +0100
committerJulien Nabet <serval2412@yahoo.fr>2023-12-22 18:12:05 +0100
commitcde3d1f70f8b795ded329a05fa081f44edb11853 (patch)
tree4b850984dd861ceaa59ebd0ea33033b012477870 /extensions/source
parent17f1d2fe890159cfa881be2d16239e078e0a5c89 (diff)
Use emplace_back instead of push_back (extensions)
Change-Id: I6cdb020f19797821c6a70bf01013f6a7718bdcac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161189 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'extensions/source')
-rw-r--r--extensions/source/abpilot/typeselectionpage.cxx14
-rw-r--r--extensions/source/dbpilots/gridwizard.cxx16
-rw-r--r--extensions/source/update/check/updatecheckconfig.cxx4
-rw-r--r--extensions/source/update/check/updateprotocol.cxx2
4 files changed, 18 insertions, 18 deletions
diff --git a/extensions/source/abpilot/typeselectionpage.cxx b/extensions/source/abpilot/typeselectionpage.cxx
index 79cfd5d6b035..8db9f5a2ae43 100644
--- a/extensions/source/abpilot/typeselectionpage.cxx
+++ b/extensions/source/abpilot/typeselectionpage.cxx
@@ -107,13 +107,13 @@ namespace abp
#endif
// Items are displayed in list order
- m_aAllTypes.push_back( ButtonItem( m_xEvolution.get(), AST_EVOLUTION, bHaveEvolution ) );
- m_aAllTypes.push_back( ButtonItem( m_xEvolutionGroupwise.get(), AST_EVOLUTION_GROUPWISE, bHaveEvolution ) );
- m_aAllTypes.push_back( ButtonItem( m_xEvolutionLdap.get(), AST_EVOLUTION_LDAP, bHaveEvolution ) );
- m_aAllTypes.push_back( ButtonItem( m_xThunderbird.get(), AST_THUNDERBIRD, true ) );
- m_aAllTypes.push_back( ButtonItem( m_xKab.get(), AST_KAB, bHaveKab ) );
- m_aAllTypes.push_back( ButtonItem( m_xMacab.get(), AST_MACAB, bHaveMacab ) );
- m_aAllTypes.push_back( ButtonItem( m_xOther.get(), AST_OTHER, true ) );
+ m_aAllTypes.emplace_back(m_xEvolution.get(), AST_EVOLUTION, bHaveEvolution);
+ m_aAllTypes.emplace_back(m_xEvolutionGroupwise.get(), AST_EVOLUTION_GROUPWISE, bHaveEvolution);
+ m_aAllTypes.emplace_back(m_xEvolutionLdap.get(), AST_EVOLUTION_LDAP, bHaveEvolution);
+ m_aAllTypes.emplace_back(m_xThunderbird.get(), AST_THUNDERBIRD, true);
+ m_aAllTypes.emplace_back(m_xKab.get(), AST_KAB, bHaveKab);
+ m_aAllTypes.emplace_back(m_xMacab.get(), AST_MACAB, bHaveMacab);
+ m_aAllTypes.emplace_back(m_xOther.get(), AST_OTHER, true);
Link<weld::Toggleable&,void> aTypeSelectionHandler = LINK(this, TypeSelectionPage, OnTypeSelected );
for (auto const& elem : m_aAllTypes)
diff --git a/extensions/source/dbpilots/gridwizard.cxx b/extensions/source/dbpilots/gridwizard.cxx
index 99507008870d..f5a9f11b5d55 100644
--- a/extensions/source/dbpilots/gridwizard.cxx
+++ b/extensions/source/dbpilots/gridwizard.cxx
@@ -121,14 +121,14 @@ namespace dbp
{
case DataType::BIT:
case DataType::BOOLEAN:
- aColumnServiceNames.push_back(OUString("CheckBox"));
+ aColumnServiceNames.emplace_back("CheckBox");
aColumnLabelPostfixes.push_back(s_sEmptyString);
break;
case DataType::TINYINT:
case DataType::SMALLINT:
case DataType::INTEGER:
- aColumnServiceNames.push_back(OUString("NumericField"));
+ aColumnServiceNames.emplace_back("NumericField");
aColumnLabelPostfixes.push_back(s_sEmptyString);
break;
@@ -137,31 +137,31 @@ namespace dbp
case DataType::DOUBLE:
case DataType::NUMERIC:
case DataType::DECIMAL:
- aColumnServiceNames.push_back(OUString("FormattedField"));
+ aColumnServiceNames.emplace_back("FormattedField");
aColumnLabelPostfixes.push_back(s_sEmptyString);
break;
case DataType::DATE:
- aColumnServiceNames.push_back(OUString("DateField"));
+ aColumnServiceNames.emplace_back("DateField");
aColumnLabelPostfixes.push_back(s_sEmptyString);
break;
case DataType::TIME:
- aColumnServiceNames.push_back(OUString("TimeField"));
+ aColumnServiceNames.emplace_back("TimeField");
aColumnLabelPostfixes.push_back(s_sEmptyString);
break;
case DataType::TIMESTAMP:
- aColumnServiceNames.push_back(OUString("DateField"));
+ aColumnServiceNames.emplace_back("DateField");
aColumnLabelPostfixes.push_back(compmodule::ModuleRes(RID_STR_DATEPOSTFIX));
aFormFieldNames.push_back(*pSelectedFields);
- aColumnServiceNames.push_back(OUString("TimeField"));
+ aColumnServiceNames.emplace_back("TimeField");
aColumnLabelPostfixes.push_back(compmodule::ModuleRes(RID_STR_TIMEPOSTFIX));
break;
default:
- aColumnServiceNames.push_back(OUString("TextField"));
+ aColumnServiceNames.emplace_back("TextField");
aColumnLabelPostfixes.push_back(s_sEmptyString);
}
}
diff --git a/extensions/source/update/check/updatecheckconfig.cxx b/extensions/source/update/check/updatecheckconfig.cxx
index e728d91e77f1..708aba65811d 100644
--- a/extensions/source/update/check/updatecheckconfig.cxx
+++ b/extensions/source/update/check/updatecheckconfig.cxx
@@ -139,14 +139,14 @@ UpdateCheckROModel::getUpdateEntry(UpdateInfo& rInfo) const
bool isDirectDownload = false;
m_aNameAccess.getValue(IS_DIRECT_DOWNLOAD) >>= isDirectDownload;
- rInfo.Sources.push_back( DownloadSource( isDirectDownload, getStringValue(DOWNLOAD_URL) ) );
+ rInfo.Sources.emplace_back(isDirectDownload, getStringValue(DOWNLOAD_URL));
for(sal_Int32 n=1; n < 6; ++n )
{
OUString aUStr = getStringValue(
OString(OString::Concat(RELEASE_NOTE) + OString::number(n)).getStr());
if( !aUStr.isEmpty() )
- rInfo.ReleaseNotes.push_back(ReleaseNote(static_cast<sal_Int8>(n), aUStr));
+ rInfo.ReleaseNotes.emplace_back(static_cast<sal_Int8>(n), aUStr);
}
}
diff --git a/extensions/source/update/check/updateprotocol.cxx b/extensions/source/update/check/updateprotocol.cxx
index db8319c799df..2fb6be85286a 100644
--- a/extensions/source/update/check/updateprotocol.cxx
+++ b/extensions/source/update/check/updateprotocol.cxx
@@ -163,7 +163,7 @@ checkForUpdates(
OUString aType = xParent->getAttribute("type");
bool bIsDirect = !aType.equalsIgnoreAsciiCase("text/html");
- o_rUpdateInfo.Sources.push_back( DownloadSource(bIsDirect, xNode2->getNodeValue()) );
+ o_rUpdateInfo.Sources.emplace_back(bIsDirect, xNode2->getNodeValue());
}
}