summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2023-12-28 14:38:17 +0100
committerJulien Nabet <serval2412@yahoo.fr>2023-12-28 15:44:25 +0100
commitb05e660b98d202876806353dff1eb0a5b53e8dec (patch)
tree77fa5473ed240d9e135d131ac04f52cce91cd1d8
parent2ddec231d513cf317f9fb2c2a82c7e3a0a2d7ef3 (diff)
Use emplace_back instead of push_back (svx)
Change-Id: Icf796bba7f4dbfea17e13225b03d7b5b507317da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161383 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
-rw-r--r--svx/source/customshapes/EnhancedCustomShapeFontWork.cxx4
-rw-r--r--svx/source/dialog/ClassificationDialog.cxx10
-rw-r--r--svx/source/sdr/primitive2d/sdrdecompositiontools.cxx4
3 files changed, 9 insertions, 9 deletions
diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
index 2e19aa344ec4..a5f377912c6f 100644
--- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx
@@ -437,7 +437,7 @@ static void GetTextAreaOutline(
aDXArry[a],
aFont.GetFontHeight()
)));
- aCharacterData.vOutlines.push_back(tools::PolyPolygon(tools::Polygon(aPolygon)));
+ aCharacterData.vOutlines.emplace_back(tools::Polygon(aPolygon));
}
}
else
@@ -450,7 +450,7 @@ static void GetTextAreaOutline(
aDXArry.empty() ? 10 : aDXArry.back(),
aFont.GetFontHeight()
)));
- aCharacterData.vOutlines.push_back(tools::PolyPolygon(tools::Polygon(aPolygon)));
+ aCharacterData.vOutlines.emplace_back(tools::Polygon(aPolygon));
}
diff --git a/svx/source/dialog/ClassificationDialog.cxx b/svx/source/dialog/ClassificationDialog.cxx
index 03f38bb2f389..9c39e086edc3 100644
--- a/svx/source/dialog/ClassificationDialog.cxx
+++ b/svx/source/dialog/ClassificationDialog.cxx
@@ -357,7 +357,7 @@ void ClassificationDialog::readRecentlyUsed()
}
aWalker.parent();
- aResults.push_back({ eType, sString, sAbbreviatedString, sIdentifier });
+ aResults.emplace_back(eType, sString, sAbbreviatedString, sIdentifier);
}
}
aWalker.next();
@@ -541,7 +541,7 @@ std::vector<ClassificationResult> ClassificationDialog::getResult()
sWeightProperty = "BOLD";
// Insert into collection
OUString sBlank;
- aClassificationResults.push_back({ ClassificationType::PARAGRAPH, sWeightProperty, sBlank, sBlank });
+ aClassificationResults.emplace_back(ClassificationType::PARAGRAPH, sWeightProperty, sBlank, sBlank);
}
const SvxFieldItem* pFieldItem = findField(rSection);
@@ -554,12 +554,12 @@ std::vector<ClassificationResult> ClassificationDialog::getResult()
if (pClassificationField)
{
- aClassificationResults.push_back({ pClassificationField->meType, pClassificationField->msFullClassName,
- pClassificationField->msDescription, pClassificationField->msIdentifier });
+ aClassificationResults.emplace_back(pClassificationField->meType, pClassificationField->msFullClassName,
+ pClassificationField->msDescription, pClassificationField->msIdentifier);
}
else
{
- aClassificationResults.push_back({ ClassificationType::TEXT, sDisplayString, sDisplayString, OUString() });
+ aClassificationResults.emplace_back(ClassificationType::TEXT, sDisplayString, sDisplayString, OUString());
}
}
}
diff --git a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
index 0994b4a38197..d0ed4839dcfb 100644
--- a/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
+++ b/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx
@@ -849,9 +849,9 @@ sal_uInt32 SlideBackgroundFillPrimitive2D::getPrimitive2DID() const
Primitive2DContainer aRetval;
for (const auto& xChild : rContentForShadow)
{
- aRetval.push_back(Primitive2DReference(
+ aRetval.emplace_back(
new ShadowPrimitive2D(aShadowOffset, rShadow.getColor(), rShadow.getBlur(),
- Primitive2DContainer({ xChild }))));
+ Primitive2DContainer({ xChild })));
if (rShadow.getTransparence() != 0.0)
{
Primitive2DContainer aTempContent{ aRetval.back() };