summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-11 08:54:58 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-11 09:42:55 +0200
commit9c5c905680f7cb58eb3d0fbf25725a50c17896da (patch)
treed15a5bade5d44301a6292649a23ff65e219a8adb
parentba7492ebe6f943976fc41274672ec41c035b4fbb (diff)
clang-tidy modernize-use-emplace in editeng..framework
Change-Id: I7739c4f77c856d34f8484754244df13d8fef840e Reviewed-on: https://gerrit.libreoffice.org/42151 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--editeng/source/editeng/editobj.cxx4
-rw-r--r--editeng/source/editeng/edtspell.cxx2
-rw-r--r--editeng/source/editeng/impedit.cxx2
-rw-r--r--editeng/source/editeng/impedit2.cxx8
-rw-r--r--editeng/source/editeng/impedit3.cxx2
-rw-r--r--editeng/source/editeng/impedit4.cxx4
-rw-r--r--editeng/source/uno/unotext2.cxx6
-rw-r--r--filter/source/config/cache/filtercache.cxx44
-rw-r--r--filter/source/flash/swfwriter2.cxx14
-rw-r--r--filter/source/msfilter/escherex.cxx6
-rw-r--r--filter/source/msfilter/msdffimp.cxx8
-rw-r--r--filter/source/svg/svgexport.cxx2
-rw-r--r--filter/source/svg/svgreader.cxx6
-rw-r--r--forms/source/component/DatabaseForm.cxx24
-rw-r--r--forms/source/component/ListBox.cxx4
-rw-r--r--forms/source/solar/control/navtoolbar.cxx2
-rw-r--r--forms/source/xforms/binding.cxx8
-rw-r--r--formula/source/ui/dlg/FormulaHelper.cxx6
-rw-r--r--fpicker/source/office/RemoteFilesDialog.cxx4
-rw-r--r--framework/source/layoutmanager/toolbarlayoutmanager.cxx24
-rw-r--r--framework/source/services/autorecovery.cxx6
21 files changed, 92 insertions, 94 deletions
diff --git a/editeng/source/editeng/editobj.cxx b/editeng/source/editeng/editobj.cxx
index a20217749d46..549d8cee1992 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -924,7 +924,7 @@ void EditTextObjectImpl::GetAllSections( std::vector<editeng::Section>& rAttrs )
if (rBorders.size() == 1 && rBorders[0] == 0)
{
// Empty paragraph. Push an empty section.
- aAttrs.push_back(editeng::Section(nPara, 0, 0));
+ aAttrs.emplace_back(nPara, 0, 0);
continue;
}
@@ -934,7 +934,7 @@ void EditTextObjectImpl::GetAllSections( std::vector<editeng::Section>& rAttrs )
for (++itBorder; itBorder != itBorderEnd; ++itBorder, nPrev = nCur)
{
nCur = *itBorder;
- aAttrs.push_back(editeng::Section(nPara, nPrev, nCur));
+ aAttrs.emplace_back(nPara, nPrev, nCur);
}
}
diff --git a/editeng/source/editeng/edtspell.cxx b/editeng/source/editeng/edtspell.cxx
index c2810f49ed07..47603ca1a039 100644
--- a/editeng/source/editeng/edtspell.cxx
+++ b/editeng/source/editeng/edtspell.cxx
@@ -428,7 +428,7 @@ void WrongList::InsertWrong( size_t nStart, size_t nEnd )
if (nPos != maRanges.end())
maRanges.insert(nPos, editeng::MisspellRange(nStart, nEnd));
else
- maRanges.push_back(editeng::MisspellRange(nStart, nEnd));
+ maRanges.emplace_back(nStart, nEnd);
SAL_WARN_IF(DbgIsBuggy(), "editeng", "InsertWrong: WrongList broken!");
}
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index f0f80b4f700d..aaf24df25f18 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -451,7 +451,7 @@ void ImpEditView::DrawSelectionXOR( EditSelection aTmpSel, vcl::Region* pRegion,
if (bMm100ToTwip)
rRectangle = OutputDevice::LogicToLogic(rRectangle, MapUnit::Map100thMM, MapUnit::MapTwip);
rRectangle.Move(aOrigin.getX(), aOrigin.getY());
- v.push_back(rRectangle.toString().getStr());
+ v.emplace_back(rRectangle.toString().getStr());
}
sRectangle = comphelper::string::join("; ", v);
}
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index adf436e894b7..1e020d6d5ac3 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -1672,7 +1672,7 @@ void ImpEditEngine::InitScriptTypes( sal_Int32 nPara )
sal_Int32 nPos = 0;
short nScriptType = _xBI->getScriptType( aText, nPos );
- rTypes.push_back( ScriptTypePosInfo( nScriptType, nPos, nTextLen ) );
+ rTypes.emplace_back( nScriptType, nPos, nTextLen );
nPos = _xBI->endOfScript( aText, nPos, nScriptType );
while ( ( nPos != (-1) ) && ( nPos < nTextLen ) )
{
@@ -1699,7 +1699,7 @@ void ImpEditEngine::InitScriptTypes( sal_Int32 nPara )
break;
}
}
- rTypes.push_back( ScriptTypePosInfo( nScriptType, nPos, nTextLen ) );
+ rTypes.emplace_back( nScriptType, nPos, nTextLen );
}
nPos = nEndPos;
@@ -1950,7 +1950,7 @@ void ImpEditEngine::InitWritingDirections( sal_Int32 nPara )
for (int32_t nIdx = 0; nIdx < nCount; ++nIdx)
{
ubidi_getLogicalRun( pBidi, nStart, &nEnd, &nCurrDir );
- rInfos.push_back( WritingDirectionInfo( nCurrDir, nStart, nEnd ) );
+ rInfos.emplace_back( nCurrDir, nStart, nEnd );
nStart = nEnd;
}
}
@@ -1960,7 +1960,7 @@ void ImpEditEngine::InitWritingDirections( sal_Int32 nPara )
// No infos mean no CTL and default dir is L2R...
if ( rInfos.empty() )
- rInfos.push_back( WritingDirectionInfo( 0, 0, pParaPortion->GetNode()->Len() ) );
+ rInfos.emplace_back( 0, 0, pParaPortion->GetNode()->Len() );
}
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 4699ce520fc9..121428166c91 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3380,7 +3380,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, tools::Rectangle aClipRect, Po
}
// add to vector
- aWrongSpellVector.push_back(EEngineData::WrongSpellClass(nStart, nEnd));
+ aWrongSpellVector.emplace_back(nStart, nEnd);
// goto next index
nStart = nEnd + 1;
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 926949c77a65..2bade0c2e8a9 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -386,7 +386,7 @@ ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
// Write out ColorList ...
SvxColorList aColorList;
// COL_AUTO should be the default color, always put it first
- aColorList.push_back(COL_AUTO);
+ aColorList.emplace_back(COL_AUTO);
SvxColorItem const& rDefault(static_cast<SvxColorItem const&>(
aEditDoc.GetItemPool().GetDefaultItem(EE_CHAR_COLOR)));
if (rDefault.GetValue() != COL_AUTO) // is the default always AUTO?
@@ -1376,7 +1376,7 @@ void ImpEditEngine::GetAllMisspellRanges( std::vector<editeng::MisspellRanges>&
if (!pWrongList)
continue;
- aRanges.push_back(editeng::MisspellRanges(i, pWrongList->GetRanges()));
+ aRanges.emplace_back(i, pWrongList->GetRanges());
}
aRanges.swap(rRanges);
diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx
index 6f16b855e751..e647433ebf9c 100644
--- a/editeng/source/uno/unotext2.cxx
+++ b/editeng/source/uno/unotext2.cxx
@@ -69,7 +69,7 @@ SvxUnoTextContentEnumeration::SvxUnoTextContentEnumeration( const SvxUnoTextBase
if( aIterSel.IsEqual( aCurrentParaSel ) )
{
pContent = pIterContent;
- maContents.push_back( pContent );
+ maContents.emplace_back(pContent );
}
}
}
@@ -77,7 +77,7 @@ SvxUnoTextContentEnumeration::SvxUnoTextContentEnumeration( const SvxUnoTextBase
{
pContent = new SvxUnoTextContent( mrText, currentPara );
pContent->SetSelection( aCurrentParaSel );
- maContents.push_back( pContent );
+ maContents.emplace_back(pContent );
}
}
}
@@ -416,7 +416,7 @@ SvxUnoTextRangeEnumeration::SvxUnoTextRangeEnumeration( const SvxUnoTextBase& rT
pRange = new SvxUnoTextRange( mrParentText, true );
pRange->SetSelection( aSel );
}
- maPortions.push_back( pRange );
+ maPortions.emplace_back(pRange );
}
}
}
diff --git a/filter/source/config/cache/filtercache.cxx b/filter/source/config/cache/filtercache.cxx
index e4b245016f54..bb4c95b3c95a 100644
--- a/filter/source/config/cache/filtercache.cxx
+++ b/filter/source/config/cache/filtercache.cxx
@@ -1853,28 +1853,28 @@ css::uno::Sequence< OUString > FilterCache::impl_convertFlagField2FlagNames(SfxF
{
OUStringList lFlagNames;
- if (nFlags & SfxFilterFlags::STARONEFILTER ) lFlagNames.push_back(FLAGNAME_3RDPARTYFILTER );
- if (nFlags & SfxFilterFlags::ALIEN ) lFlagNames.push_back(FLAGNAME_ALIEN );
- if (nFlags & SfxFilterFlags::CONSULTSERVICE ) lFlagNames.push_back(FLAGNAME_CONSULTSERVICE );
- if (nFlags & SfxFilterFlags::DEFAULT ) lFlagNames.push_back(FLAGNAME_DEFAULT );
- if (nFlags & SfxFilterFlags::ENCRYPTION ) lFlagNames.push_back(FLAGNAME_ENCRYPTION );
- if (nFlags & SfxFilterFlags::EXPORT ) lFlagNames.push_back(FLAGNAME_EXPORT );
- if (nFlags & SfxFilterFlags::IMPORT ) lFlagNames.push_back(FLAGNAME_IMPORT );
- if (nFlags & SfxFilterFlags::INTERNAL ) lFlagNames.push_back(FLAGNAME_INTERNAL );
- if (nFlags & SfxFilterFlags::NOTINFILEDLG ) lFlagNames.push_back(FLAGNAME_NOTINFILEDIALOG );
- if (nFlags & SfxFilterFlags::MUSTINSTALL ) lFlagNames.push_back(FLAGNAME_NOTINSTALLED );
- if (nFlags & SfxFilterFlags::OWN ) lFlagNames.push_back(FLAGNAME_OWN );
- if (nFlags & SfxFilterFlags::PACKED ) lFlagNames.push_back(FLAGNAME_PACKED );
- if (nFlags & SfxFilterFlags::PASSWORDTOMODIFY ) lFlagNames.push_back(FLAGNAME_PASSWORDTOMODIFY );
- if (nFlags & SfxFilterFlags::PREFERED ) lFlagNames.push_back(FLAGNAME_PREFERRED );
- if (nFlags & SfxFilterFlags::STARTPRESENTATION) lFlagNames.push_back(FLAGNAME_STARTPRESENTATION);
- if (nFlags & SfxFilterFlags::OPENREADONLY ) lFlagNames.push_back(FLAGNAME_READONLY );
- if (nFlags & SfxFilterFlags::SUPPORTSSELECTION) lFlagNames.push_back(FLAGNAME_SUPPORTSSELECTION);
- if (nFlags & SfxFilterFlags::TEMPLATE ) lFlagNames.push_back(FLAGNAME_TEMPLATE );
- if (nFlags & SfxFilterFlags::TEMPLATEPATH ) lFlagNames.push_back(FLAGNAME_TEMPLATEPATH );
- if (nFlags & SfxFilterFlags::COMBINED ) lFlagNames.push_back(FLAGNAME_COMBINED );
- if (nFlags & SfxFilterFlags::SUPPORTSSIGNING) lFlagNames.push_back(FLAGNAME_SUPPORTSSIGNING);
- if (nFlags & SfxFilterFlags::GPGENCRYPTION) lFlagNames.push_back(FLAGNAME_GPGENCRYPTION);
+ if (nFlags & SfxFilterFlags::STARONEFILTER ) lFlagNames.emplace_back(FLAGNAME_3RDPARTYFILTER );
+ if (nFlags & SfxFilterFlags::ALIEN ) lFlagNames.emplace_back(FLAGNAME_ALIEN );
+ if (nFlags & SfxFilterFlags::CONSULTSERVICE ) lFlagNames.emplace_back(FLAGNAME_CONSULTSERVICE );
+ if (nFlags & SfxFilterFlags::DEFAULT ) lFlagNames.emplace_back(FLAGNAME_DEFAULT );
+ if (nFlags & SfxFilterFlags::ENCRYPTION ) lFlagNames.emplace_back(FLAGNAME_ENCRYPTION );
+ if (nFlags & SfxFilterFlags::EXPORT ) lFlagNames.emplace_back(FLAGNAME_EXPORT );
+ if (nFlags & SfxFilterFlags::IMPORT ) lFlagNames.emplace_back(FLAGNAME_IMPORT );
+ if (nFlags & SfxFilterFlags::INTERNAL ) lFlagNames.emplace_back(FLAGNAME_INTERNAL );
+ if (nFlags & SfxFilterFlags::NOTINFILEDLG ) lFlagNames.emplace_back(FLAGNAME_NOTINFILEDIALOG );
+ if (nFlags & SfxFilterFlags::MUSTINSTALL ) lFlagNames.emplace_back(FLAGNAME_NOTINSTALLED );
+ if (nFlags & SfxFilterFlags::OWN ) lFlagNames.emplace_back(FLAGNAME_OWN );
+ if (nFlags & SfxFilterFlags::PACKED ) lFlagNames.emplace_back(FLAGNAME_PACKED );
+ if (nFlags & SfxFilterFlags::PASSWORDTOMODIFY ) lFlagNames.emplace_back(FLAGNAME_PASSWORDTOMODIFY );
+ if (nFlags & SfxFilterFlags::PREFERED ) lFlagNames.emplace_back(FLAGNAME_PREFERRED );
+ if (nFlags & SfxFilterFlags::STARTPRESENTATION) lFlagNames.emplace_back(FLAGNAME_STARTPRESENTATION);
+ if (nFlags & SfxFilterFlags::OPENREADONLY ) lFlagNames.emplace_back(FLAGNAME_READONLY );
+ if (nFlags & SfxFilterFlags::SUPPORTSSELECTION) lFlagNames.emplace_back(FLAGNAME_SUPPORTSSELECTION);
+ if (nFlags & SfxFilterFlags::TEMPLATE ) lFlagNames.emplace_back(FLAGNAME_TEMPLATE );
+ if (nFlags & SfxFilterFlags::TEMPLATEPATH ) lFlagNames.emplace_back(FLAGNAME_TEMPLATEPATH );
+ if (nFlags & SfxFilterFlags::COMBINED ) lFlagNames.emplace_back(FLAGNAME_COMBINED );
+ if (nFlags & SfxFilterFlags::SUPPORTSSIGNING) lFlagNames.emplace_back(FLAGNAME_SUPPORTSSIGNING);
+ if (nFlags & SfxFilterFlags::GPGENCRYPTION) lFlagNames.emplace_back(FLAGNAME_GPGENCRYPTION);
return comphelper::containerToSequence(lFlagNames);
}
diff --git a/filter/source/flash/swfwriter2.cxx b/filter/source/flash/swfwriter2.cxx
index dd8b3d158ac5..9fa89c3aa01e 100644
--- a/filter/source/flash/swfwriter2.cxx
+++ b/filter/source/flash/swfwriter2.cxx
@@ -558,8 +558,8 @@ void FillStyle::Impl_addGradient( Tag* pTag ) const
case GradientStyle::Elliptical:
case GradientStyle::Radial:
{
- aGradientRecords.push_back( GradRecord( 0x00, maGradient.GetEndColor() ) );
- aGradientRecords.push_back( GradRecord( 0xff, maGradient.GetStartColor() ) );
+ aGradientRecords.emplace_back( 0x00, maGradient.GetEndColor() );
+ aGradientRecords.emplace_back( 0xff, maGradient.GetStartColor() );
double tx = ( maGradient.GetOfsX() * 32768.0 ) / 100.0;
double ty = ( maGradient.GetOfsY() * 32768.0 ) / 100.0;
@@ -591,9 +591,9 @@ void FillStyle::Impl_addGradient( Tag* pTag ) const
break;
case GradientStyle::Axial:
{
- aGradientRecords.push_back( GradRecord( 0x00, maGradient.GetEndColor() ) );
- aGradientRecords.push_back( GradRecord( 0x80, maGradient.GetStartColor() ) );
- aGradientRecords.push_back( GradRecord( 0xff, maGradient.GetEndColor() ) );
+ aGradientRecords.emplace_back( 0x00, maGradient.GetEndColor() );
+ aGradientRecords.emplace_back( 0x80, maGradient.GetStartColor() );
+ aGradientRecords.emplace_back( 0xff, maGradient.GetEndColor() );
double scalex = (double)maBoundRect.GetWidth() / 32768.0;
double scaley = (double)maBoundRect.GetHeight() / 32768.0;
m.translate( 32768.0 / 2.0, 32768.0 / 2.0 );
@@ -604,8 +604,8 @@ void FillStyle::Impl_addGradient( Tag* pTag ) const
case GradientStyle::Rect:
case GradientStyle::Linear:
{
- aGradientRecords.push_back( GradRecord( 0x00, maGradient.GetStartColor() ) );
- aGradientRecords.push_back( GradRecord( 0xff, maGradient.GetEndColor() ) );
+ aGradientRecords.emplace_back( 0x00, maGradient.GetStartColor() );
+ aGradientRecords.emplace_back( 0xff, maGradient.GetEndColor() );
double scalex = (double)maBoundRect.GetWidth() / 32768.0;
double scaley = (double)maBoundRect.GetHeight() / 32768.0;
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 84530d4e4269..187661fa05cc 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -4775,8 +4775,8 @@ sal_uInt32 EscherExGlobal::GenerateDrawingId()
// drawing identifiers are one-based
sal_uInt32 nDrawingId = static_cast< sal_uInt32 >( maDrawingInfos.size() + 1 );
// prepare new entries in the tables
- maClusterTable.push_back( ClusterEntry( nDrawingId ) );
- maDrawingInfos.push_back( DrawingInfo( nClusterId ) );
+ maClusterTable.emplace_back( nDrawingId );
+ maDrawingInfos.emplace_back( nClusterId );
// return the new drawing identifier
return nDrawingId;
}
@@ -4801,7 +4801,7 @@ sal_uInt32 EscherExGlobal::GenerateShapeId( sal_uInt32 nDrawingId, bool bIsInSpg
if( pClusterEntry->mnNextShapeId == DFF_DGG_CLUSTER_SIZE )
{
// start a new cluster in the cluster table
- maClusterTable.push_back( ClusterEntry( nDrawingId ) );
+ maClusterTable.emplace_back( nDrawingId );
pClusterEntry = &maClusterTable.back();
// new size of maClusterTable is equal to one-based identifier of the new cluster
rDrawingInfo.mnClusterId = static_cast< sal_uInt32 >( maClusterTable.size() );
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index 6c749473d1f9..62b43b4ea6a6 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -1088,14 +1088,14 @@ void GetShadeColors( const SvxMSDffManager& rManager, const DffPropertyReader& r
sal_Int32 nDist(0);
rIn.ReadInt32( nColor ).ReadInt32( nDist );
- rShadeColors.push_back( ShadeColor( rManager.MSO_CLR_ToColor( nColor, DFF_Prop_fillColor ), 1.0 - ( nDist / 65536.0 ) ) );
+ rShadeColors.emplace_back( rManager.MSO_CLR_ToColor( nColor, DFF_Prop_fillColor ), 1.0 - ( nDist / 65536.0 ) );
}
}
}
if ( rShadeColors.empty() )
{
- rShadeColors.push_back( ShadeColor( rManager.MSO_CLR_ToColor( rProperties.GetPropertyValue( DFF_Prop_fillBackColor, COL_WHITE ), DFF_Prop_fillBackColor ), 0 ) );
- rShadeColors.push_back( ShadeColor( rManager.MSO_CLR_ToColor( rProperties.GetPropertyValue( DFF_Prop_fillColor, COL_WHITE ), DFF_Prop_fillColor ), 1 ) );
+ rShadeColors.emplace_back( rManager.MSO_CLR_ToColor( rProperties.GetPropertyValue( DFF_Prop_fillBackColor, COL_WHITE ), DFF_Prop_fillBackColor ), 0 );
+ rShadeColors.emplace_back( rManager.MSO_CLR_ToColor( rProperties.GetPropertyValue( DFF_Prop_fillColor, COL_WHITE ), DFF_Prop_fillColor ), 1 );
}
rIn.Seek( nPos );
}
@@ -4845,7 +4845,7 @@ SdrObject* SvxMSDffManager::ImportShape( const DffRecordHeader& rHd, SvStream& r
if (size_t(nCalledByGroup) > maPendingGroupData.size())
{
std::shared_ptr<DffRecordHeader> rHdClone(new DffRecordHeader(aObjData.rSpHd));
- maPendingGroupData.push_back( make_pair(DffObjData(rHdClone, aObjData), rHdClone) );
+ maPendingGroupData.emplace_back(DffObjData(rHdClone, aObjData), rHdClone );
}
else
{
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 23a64e98ea08..070f389785c8 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -2337,7 +2337,7 @@ void SVGExport::writeMtf( const GDIMetaFile& rMtf )
std::vector< ObjectRepresentation > aObjects;
- aObjects.push_back( ObjectRepresentation( Reference< XInterface >(), rMtf ) );
+ aObjects.emplace_back( Reference< XInterface >(), rMtf );
SVGFontExport aSVGFontExport( *this, aObjects );
Point aPoint100thmm( OutputDevice::LogicToLogic( rMtf.GetPrefMapMode().GetOrigin(), rMtf.GetPrefMapMode(), MapUnit::Map100thMM ) );
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index 79fb13c1e11c..778dc1a42f45 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -225,7 +225,7 @@ struct AnnotatingVisitor
case XML_LINEARGRADIENT:
{
const sal_Int32 nNumAttrs( xAttributes->getLength() );
- maGradientVector.push_back(Gradient(Gradient::LINEAR));
+ maGradientVector.emplace_back(Gradient::LINEAR);
// do we have a reference to a parent gradient? parse
// that first, as it sets our defaults here (manually
@@ -268,7 +268,7 @@ struct AnnotatingVisitor
case XML_RADIALGRADIENT:
{
const sal_Int32 nNumAttrs( xAttributes->getLength() );
- maGradientVector.push_back(Gradient(Gradient::RADIAL));
+ maGradientVector.emplace_back(Gradient::RADIAL);
// do we have a reference to a parent gradient? parse
// that first, as it sets our defaults here (manually
@@ -388,7 +388,7 @@ struct AnnotatingVisitor
if (!maGradientVector.empty())
{
const sal_Int32 nNumAttrs( xAttributes->getLength() );
- maGradientStopVector.push_back(GradientStop());
+ maGradientStopVector.emplace_back();
maGradientVector.back().maStops.push_back(maGradientStopVector.size()-1);
// first parse 'color' as 'stop-color' might depend on it
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 1aae5d88aa39..4c2b039442cc 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -570,7 +570,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
// <name>=<label>
OUString aLabel;
xComponentSet->getPropertyValue( PROPERTY_LABEL ) >>= aLabel;
- rList.push_back( HtmlSuccessfulObj(aName, aLabel) );
+ rList.emplace_back(aName, aLabel );
}
}
} break;
@@ -594,7 +594,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
aLhs.append(".x");
else
aLhs.append("x");
- rList.push_back( HtmlSuccessfulObj(aLhs.makeStringAndClear(), aRhs) );
+ rList.emplace_back(aLhs.makeStringAndClear(), aRhs );
aLhs.append(aName);
aRhs = OUString::number( MouseEvt.Y );
@@ -602,7 +602,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
aLhs.append(".y");
else
aLhs.append("y");
- rList.push_back( HtmlSuccessfulObj(aLhs.makeStringAndClear(), aRhs) );
+ rList.emplace_back(aLhs.makeStringAndClear(), aRhs );
}
}
} break;
@@ -623,7 +623,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
if( hasProperty(PROPERTY_REFVALUE, xComponentSet) )
xComponentSet->getPropertyValue( PROPERTY_REFVALUE ) >>= aStrValue;
- rList.push_back( HtmlSuccessfulObj(aName, aStrValue) );
+ rList.emplace_back(aName, aStrValue );
} break;
// Edit
@@ -669,7 +669,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
else
xComponentSet->getPropertyValue( PROPERTY_TEXT ) >>= sText;
- rList.push_back( HtmlSuccessfulObj(aName, sText) );
+ rList.emplace_back(aName, sText );
} break;
// ComboBox, Patternfield
@@ -681,7 +681,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
{
OUString aText;
xComponentSet->getPropertyValue( PROPERTY_TEXT ) >>= aText;
- rList.push_back( HtmlSuccessfulObj(aName, aText) );
+ rList.emplace_back(aName, aText );
}
} break;
case FormComponentType::CURRENCYFIELD:
@@ -701,7 +701,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
xComponentSet->getPropertyValue( PROPERTY_DECIMAL_ACCURACY ) >>= nScale;
aText = ::rtl::math::doubleToUString(aDoubleVal, rtl_math_StringFormat_F, nScale, '.', true);
}
- rList.push_back( HtmlSuccessfulObj(aName, aText) );
+ rList.emplace_back(aName, aText );
}
} break;
case FormComponentType::DATEFIELD:
@@ -724,7 +724,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
appendDigits( aDate.GetYear(), 4, aBuffer );
aText = aBuffer.makeStringAndClear();
}
- rList.push_back( HtmlSuccessfulObj(aName, aText) );
+ rList.emplace_back(aName, aText );
}
} break;
case FormComponentType::TIMEFIELD:
@@ -747,7 +747,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
appendDigits( aTime.GetSec(), 2, aBuffer );
aText = aBuffer.makeStringAndClear();
}
- rList.push_back( HtmlSuccessfulObj(aName, aText) );
+ rList.emplace_back(aName, aText );
}
} break;
@@ -760,7 +760,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
{
OUString aText;
xComponentSet->getPropertyValue( PROPERTY_HIDDEN_VALUE ) >>= aText;
- rList.push_back( HtmlSuccessfulObj(aName, aText) );
+ rList.emplace_back(aName, aText );
}
} break;
@@ -773,7 +773,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
OUString aText;
xComponentSet->getPropertyValue( PROPERTY_TEXT ) >>= aText;
- rList.push_back( HtmlSuccessfulObj(aName, aText, SUCCESSFUL_REPRESENT_FILE) );
+ rList.emplace_back(aName, aText, SUCCESSFUL_REPRESENT_FILE );
}
} break;
@@ -831,7 +831,7 @@ void ODatabaseForm::AppendComponent(HtmlSuccessfulObjList& rList, const Referenc
{
aSubValue = pStrings[nSelPos];
}
- rList.push_back( HtmlSuccessfulObj(aName, aSubValue) );
+ rList.emplace_back(aName, aSubValue );
}
} break;
case FormComponentType::GRIDCONTROL:
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx
index 4da790559b6b..b8bd02146cd5 100644
--- a/forms/source/component/ListBox.cxx
+++ b/forms/source/component/ListBox.cxx
@@ -944,7 +944,7 @@ namespace frm
while ( xListCursor->next() && ( entryPos++ < SHRT_MAX ) ) // SHRT_MAX is the maximum number of entries
{
aStr = aValueFormatter.getFormattedValue();
- aDisplayList.push_back( aStr );
+ aDisplayList.emplace_back(aStr );
if(*aBoundColumn >= 0)
aBoundValue.fill( *aBoundColumn + 1, m_nBoundColumnType, xCursorRow );
@@ -980,7 +980,7 @@ namespace frm
// the type of i matters! It will be the type of the ORowSetValue pushed to aValueList!
for(size_t i=0; i < aDisplayList.size(); ++i)
{
- aValueList.push_back(ORowSetValue(sal_Int16(i)));
+ aValueList.emplace_back(sal_Int16(i));
}
}
else
diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx
index 981a711d085e..14ea335570d4 100644
--- a/forms/source/solar/control/navtoolbar.cxx
+++ b/forms/source/solar/control/navtoolbar.cxx
@@ -308,7 +308,7 @@ namespace frm
pItemWindow->SetBackground();
pItemWindow->SetPaintTransparent(true);
}
- m_aChildWins.push_back( pItemWindow );
+ m_aChildWins.emplace_back(pItemWindow );
switch ( pSupportedFeatures->nId )
{
diff --git a/forms/source/xforms/binding.cxx b/forms/source/xforms/binding.cxx
index cb045441cd97..247286ad643d 100644
--- a/forms/source/xforms/binding.cxx
+++ b/forms/source/xforms/binding.cxx
@@ -532,8 +532,7 @@ static void lcl_removeListenerFromNode( const Reference<XNode>& xNode,
OSL_ENSURE( aIter->is(), "no node?" );
// create proper evaluation context for this MIP
- aVector.push_back( EvaluationContext( *aIter, getModel(),
- getBindingNamespaces() ) );
+ aVector.emplace_back( *aIter, getModel(), getBindingNamespaces() );
}
return aVector;
}
@@ -590,9 +589,8 @@ void Binding::bind( bool bForceRebind )
++aIter )
maEventNodes.push_back( *aIter );
else
- maEventNodes.push_back(
- Reference<XNode>( aContext.mxContextNode->getOwnerDocument(),
- UNO_QUERY_THROW ) );
+ maEventNodes.emplace_back( aContext.mxContextNode->getOwnerDocument(),
+ UNO_QUERY_THROW );
for( PathExpression::NodeVector_t::iterator aIter2 = maEventNodes.begin();
aIter2 != maEventNodes.end();
++aIter2 )
diff --git a/formula/source/ui/dlg/FormulaHelper.cxx b/formula/source/ui/dlg/FormulaHelper.cxx
index f6eae1381561..f1b747fa8058 100644
--- a/formula/source/ui/dlg/FormulaHelper.cxx
+++ b/formula/source/ui/dlg/FormulaHelper.cxx
@@ -147,7 +147,7 @@ void FormulaHelper::FillArgStrings( const OUString& rFormula,
_rArgs.push_back(rFormula.copy( nStart, nEnd-1-nStart ));
else
{
- _rArgs.push_back(OUString());
+ _rArgs.emplace_back();
bLast = true;
}
}
@@ -157,13 +157,13 @@ void FormulaHelper::FillArgStrings( const OUString& rFormula,
if ( nStart < nEnd )
_rArgs.push_back( rFormula.copy( nStart, nEnd-nStart ) );
else
- _rArgs.push_back(OUString());
+ _rArgs.emplace_back();
}
}
if ( bLast )
for ( ; i<nArgs; i++ )
- _rArgs.push_back(OUString());
+ _rArgs.emplace_back();
}
diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx
index df8e1282e415..6d4194245f94 100644
--- a/fpicker/source/office/RemoteFilesDialog.cxx
+++ b/fpicker/source/office/RemoteFilesDialog.cxx
@@ -550,7 +550,7 @@ void RemoteFilesDialog::AddFilter( const OUString& rFilter, const OUString& rTyp
if ( rType.isEmpty() )
sName = "------------------------------------------";
- m_aFilters.push_back( std::pair< OUString, OUString >( rFilter, rType ) );
+ m_aFilters.emplace_back( rFilter, rType );
m_pFilter_lb->InsertEntry( sName );
if( m_pFilter_lb->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
@@ -1372,7 +1372,7 @@ void RemoteFilesDialog::UpdateControls( const OUString& rURL )
if( rFolder.mbIsFolder )
{
- aFolders.push_back( std::pair< OUString, OUString > ( sTitle, aFolderName ) );
+ aFolders.emplace_back( sTitle, aFolderName );
}
// add entries to the autocompletion mechanism
diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
index 9599f8fecbfc..dd29eecba748 100644
--- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx
+++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx
@@ -1951,11 +1951,11 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfos( ui::DockingArea eD
rRowColumnsWindowData[nIndex].aRowColumnWindows.push_back( xWindow );
rRowColumnsWindowData[nIndex].aUIElementNames.push_back( rElement.m_aName );
- rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.push_back(
- awt::Rectangle( rElement.m_aDockedData.m_aPos.X,
+ rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.emplace_back(
+ rElement.m_aDockedData.m_aPos.X,
rElement.m_aDockedData.m_aPos.Y,
aPosSize.Width,
- aPosSize.Height ));
+ aPosSize.Height );
if ( rRowColumnsWindowData[nIndex].nStaticSize < aPosSize.Height )
rRowColumnsWindowData[nIndex].nStaticSize = aPosSize.Height;
if ( eDockingArea == ui::DockingArea_DOCKINGAREA_TOP )
@@ -2009,11 +2009,11 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfos( ui::DockingArea eD
rRowColumnsWindowData[nIndex].aRowColumnWindows.push_back( xWindow );
rRowColumnsWindowData[nIndex].aUIElementNames.push_back( rElement.m_aName );
- rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.push_back(
- awt::Rectangle( rElement.m_aDockedData.m_aPos.X,
+ rRowColumnsWindowData[nIndex].aRowColumnWindowSizes.emplace_back(
+ rElement.m_aDockedData.m_aPos.X,
rElement.m_aDockedData.m_aPos.Y,
aPosSize.Width,
- aPosSize.Height ));
+ aPosSize.Height );
if ( rRowColumnsWindowData[nIndex].nStaticSize < aPosSize.Width )
rRowColumnsWindowData[nIndex].nStaticSize = aPosSize.Width;
if ( eDockingArea == ui::DockingArea_DOCKINGAREA_LEFT )
@@ -2101,9 +2101,9 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D
nLastPos = rElement.m_aDockedData.m_aPos.X + aPosSize.Width;
- rRowColumnWindowData.aRowColumnWindowSizes.push_back(
- awt::Rectangle( rElement.m_aDockedData.m_aPos.X, rElement.m_aDockedData.m_aPos.Y,
- aPosSize.Width, aPosSize.Height ));
+ rRowColumnWindowData.aRowColumnWindowSizes.emplace_back(
+ rElement.m_aDockedData.m_aPos.X, rElement.m_aDockedData.m_aPos.Y,
+ aPosSize.Width, aPosSize.Height );
if ( rRowColumnWindowData.nStaticSize < aPosSize.Height )
rRowColumnWindowData.nStaticSize = aPosSize.Height;
rRowColumnWindowData.nVarSize += aPosSize.Width;
@@ -2119,9 +2119,9 @@ void ToolbarLayoutManager::implts_getDockingAreaElementInfoOnSingleRowCol( ui::D
nLastPos = rElement.m_aDockedData.m_aPos.Y + aPosSize.Height;
- rRowColumnWindowData.aRowColumnWindowSizes.push_back(
- awt::Rectangle( rElement.m_aDockedData.m_aPos.X, rElement.m_aDockedData.m_aPos.Y,
- aPosSize.Width, aPosSize.Height ));
+ rRowColumnWindowData.aRowColumnWindowSizes.emplace_back(
+ rElement.m_aDockedData.m_aPos.X, rElement.m_aDockedData.m_aPos.Y,
+ aPosSize.Width, aPosSize.Height );
if ( rRowColumnWindowData.nStaticSize < aPosSize.Width )
rRowColumnWindowData.nStaticSize = aPosSize.Width;
rRowColumnWindowData.nVarSize += aPosSize.Height;
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index bde4a609c068..8273e53542bf 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -3352,7 +3352,7 @@ void AutoRecovery::implts_openOneDoc(const OUString& sURL ,
// create a new document of the desired type
Reference< XModel2 > xModel(m_xContext->getServiceManager()->createInstanceWithContext(
rInfo.FactoryService, m_xContext), UNO_QUERY_THROW);
- aCleanup.push_back( xModel.get() );
+ aCleanup.emplace_back(xModel.get() );
// put the filter name into the descriptor - we're not going to involve any type detection, so
// the document might be lost without the FilterName property
@@ -3392,7 +3392,7 @@ void AutoRecovery::implts_openOneDoc(const OUString& sURL ,
::std::copy( rInfo.ViewNames.begin(), rInfo.ViewNames.end(), aViewsToRestore.begin() );
// if we don't have views for whatever reason, then create a default-view, at least
if ( aViewsToRestore.empty() )
- aViewsToRestore.push_back( OUString() );
+ aViewsToRestore.emplace_back( );
for ( ::std::vector< OUString >::const_iterator viewName = aViewsToRestore.begin();
viewName != aViewsToRestore.end();
@@ -3401,7 +3401,7 @@ void AutoRecovery::implts_openOneDoc(const OUString& sURL ,
{
// create a frame
Reference< XFrame > xTargetFrame = xDesktop->findFrame( SPECIALTARGET_BLANK, 0 );
- aCleanup.push_back( xTargetFrame.get() );
+ aCleanup.emplace_back(xTargetFrame.get() );
// create a view to the document
Reference< XController2 > xController;