summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-11 16:43:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-12 08:03:09 +0200
commit65e293f524437a548b6c099bbe6099b56957063c (patch)
treef058b4f61a6f046e71c45814e1a8c0fb749162a9 /reportdesign
parentbaa5f32c21185025b64c01fc589c69961528b0c5 (diff)
clang-tidy modernize-use-emplace in package..sax
Change-Id: Ibc0258fd79df987a0e295552bcc5bf89ee12007a Reviewed-on: https://gerrit.libreoffice.org/42173 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/filter/xml/xmlExport.cxx18
-rw-r--r--reportdesign/source/ui/dlg/GroupsSorting.cxx2
-rw-r--r--reportdesign/source/ui/misc/RptUndo.cxx2
-rw-r--r--reportdesign/source/ui/report/ReportSection.cxx2
4 files changed, 12 insertions, 12 deletions
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index f7345aa0118f..a08b4cce1779 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -498,7 +498,7 @@ void lcl_calculate(const ::std::vector<sal_Int32>& _aPosX,const ::std::vector<sa
void ORptExport::collectStyleNames(sal_Int32 _nFamily,const ::std::vector< sal_Int32>& _aSize, ORptExport::TStringVec& _rStyleNames)
{
::std::vector< XMLPropertyState > aPropertyStates;
- aPropertyStates.push_back(XMLPropertyState(0));
+ aPropertyStates.emplace_back(0);
::std::vector<sal_Int32>::const_iterator aIter = _aSize.begin();
::std::vector<sal_Int32>::const_iterator aIter2 = aIter + 1;
::std::vector<sal_Int32>::const_iterator aEnd = _aSize.end();
@@ -1155,15 +1155,15 @@ void ORptExport::exportAutoStyle(XPropertySet* _xProp,const Reference<XFormatted
if ( !aPos.X )
{
sBorderProp = PROPERTY_BORDERLEFT;
- aProps.push_back(PROPERTY_BORDERRIGHT);
+ aProps.emplace_back(PROPERTY_BORDERRIGHT);
}
else
{
sBorderProp = PROPERTY_BORDERRIGHT;
- aProps.push_back(PROPERTY_BORDERLEFT);
+ aProps.emplace_back(PROPERTY_BORDERLEFT);
}
- aProps.push_back(PROPERTY_BORDERTOP);
- aProps.push_back(PROPERTY_BORDERBOTTOM);
+ aProps.emplace_back(PROPERTY_BORDERTOP);
+ aProps.emplace_back(PROPERTY_BORDERBOTTOM);
}
else // horizontal
{
@@ -1171,15 +1171,15 @@ void ORptExport::exportAutoStyle(XPropertySet* _xProp,const Reference<XFormatted
if ( (aPos.Y + aSize.Height) == nSectionHeight )
{
sBorderProp = PROPERTY_BORDERBOTTOM;
- aProps.push_back(PROPERTY_BORDERTOP);
+ aProps.emplace_back(PROPERTY_BORDERTOP);
}
else
{
sBorderProp = PROPERTY_BORDERTOP;
- aProps.push_back(PROPERTY_BORDERBOTTOM);
+ aProps.emplace_back(PROPERTY_BORDERBOTTOM);
}
- aProps.push_back(PROPERTY_BORDERRIGHT);
- aProps.push_back(PROPERTY_BORDERLEFT);
+ aProps.emplace_back(PROPERTY_BORDERRIGHT);
+ aProps.emplace_back(PROPERTY_BORDERLEFT);
}
xBorderProp->setPropertyValue(sBorderProp,uno::makeAny(aValue));
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx
index 77f2eaa8ba12..3ffff9305280 100644
--- a/reportdesign/source/ui/dlg/GroupsSorting.cxx
+++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx
@@ -68,7 +68,7 @@ using namespace ::comphelper;
OUString sLabel;
if ( xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_LABEL) )
xColumn->getPropertyValue(PROPERTY_LABEL) >>= sLabel;
- o_aColumnList.push_back( ColumnInfo(*pEntries,sLabel) );
+ o_aColumnList.emplace_back(*pEntries,sLabel );
if ( !sLabel.isEmpty() )
_rListBox.InsertEntry( sLabel );
else
diff --git a/reportdesign/source/ui/misc/RptUndo.cxx b/reportdesign/source/ui/misc/RptUndo.cxx
index dec9f097b337..2c5b9697997e 100644
--- a/reportdesign/source/ui/misc/RptUndo.cxx
+++ b/reportdesign/source/ui/misc/RptUndo.cxx
@@ -163,7 +163,7 @@ void OSectionUndo::collectControls(const uno::Reference< report::XSection >& _xS
for(;pIter != pEnd;++pIter)
{
if ( 0 == (pIter->Attributes & beans::PropertyAttribute::READONLY) )
- m_aValues.push_back(::std::pair< OUString ,uno::Any>(pIter->Name,_xSection->getPropertyValue(pIter->Name)));
+ m_aValues.emplace_back(pIter->Name,_xSection->getPropertyValue(pIter->Name));
}
lcl_collectElements(_xSection,m_aControls);
}
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index feeb8eb09903..81eab1451313 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -359,7 +359,7 @@ void OReportSection::Copy(uno::Sequence< beans::NamedValue >& _rAllreadyCopiedOb
try
{
SdrObject* pNewObj = pSdrObject->Clone();
- aCopies.push_back(uno::Reference<report::XReportComponent>(pNewObj->getUnoShape(),uno::UNO_QUERY));
+ aCopies.emplace_back(pNewObj->getUnoShape(),uno::UNO_QUERY);
if ( _bEraseAnddNoClone )
{
m_pView->AddUndo( rUndo.CreateUndoDeleteObject( *pSdrObject ) );