summaryrefslogtreecommitdiff
path: root/sc/source/filter
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-09-12 08:14:36 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-09-12 09:42:55 +0200
commitb6819a53c0b56a47d6ac7c6eb5aa7d82ca49136c (patch)
tree393e90116f9b141c5f1e189dbc48ca774f171967 /sc/source/filter
parentda705eff910f512623a689aaf28604270fb8f1c4 (diff)
clang-tidy modernize-use-emplace in sc
Change-Id: Ifc38e1fc188fe957a0c717aec19cdd6637e4c658 Reviewed-on: https://gerrit.libreoffice.org/42183 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc/source/filter')
-rw-r--r--sc/source/filter/dif/difimp.cxx2
-rw-r--r--sc/source/filter/excel/exctools.cxx2
-rw-r--r--sc/source/filter/excel/namebuff.cxx2
-rw-r--r--sc/source/filter/excel/tokstack.cxx8
-rw-r--r--sc/source/filter/excel/xedbdata.cxx2
-rw-r--r--sc/source/filter/excel/xelink.cxx6
-rw-r--r--sc/source/filter/excel/xepivot.cxx4
-rw-r--r--sc/source/filter/excel/xepivotxml.cxx8
-rw-r--r--sc/source/filter/excel/xestring.cxx2
-rw-r--r--sc/source/filter/excel/xestyle.cxx4
-rw-r--r--sc/source/filter/excel/xichart.cxx2
-rw-r--r--sc/source/filter/excel/xicontent.cxx2
-rw-r--r--sc/source/filter/excel/xiescher.cxx2
-rw-r--r--sc/source/filter/excel/xipivot.cxx2
-rw-r--r--sc/source/filter/excel/xistream.cxx2
-rw-r--r--sc/source/filter/excel/xistring.cxx2
-rw-r--r--sc/source/filter/excel/xistyle.cxx4
-rw-r--r--sc/source/filter/ftools/fapihelper.cxx2
-rw-r--r--sc/source/filter/html/htmlexp2.cxx4
-rw-r--r--sc/source/filter/oox/condformatbuffer.cxx6
-rw-r--r--sc/source/filter/oox/excelvbaproject.cxx2
-rw-r--r--sc/source/filter/oox/formulabase.cxx4
-rw-r--r--sc/source/filter/oox/formulabuffer.cxx7
-rw-r--r--sc/source/filter/oox/formulaparser.cxx2
-rw-r--r--sc/source/filter/oox/pivottablebuffer.cxx4
-rw-r--r--sc/source/filter/oox/sheetdatabuffer.cxx8
-rw-r--r--sc/source/filter/oox/workbookfragment.cxx2
-rw-r--r--sc/source/filter/orcus/interface.cxx2
-rw-r--r--sc/source/filter/xml/pivotsource.cxx8
-rw-r--r--sc/source/filter/xml/sheetdata.cxx16
-rw-r--r--sc/source/filter/xml/xmlannoi.cxx2
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx62
-rw-r--r--sc/source/filter/xml/xmlfilti.cxx2
-rw-r--r--sc/source/filter/xml/xmlstyli.cxx2
34 files changed, 95 insertions, 96 deletions
diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx
index 7cd8190ecd3a..41a967a19ade 100644
--- a/sc/source/filter/dif/difimp.cxx
+++ b/sc/source/filter/dif/difimp.cxx
@@ -642,7 +642,7 @@ void DifColumn::SetNumFormat( SCROW nRow, const sal_uInt32 nNumFormat )
void DifColumn::NewEntry( const SCROW nPos, const sal_uInt32 nNumFormat )
{
- maEntries.push_back(ENTRY());
+ maEntries.emplace_back();
mpAkt = &maEntries.back();
mpAkt->nStart = mpAkt->nEnd = nPos;
mpAkt->nNumFormat = nNumFormat;
diff --git a/sc/source/filter/excel/exctools.cxx b/sc/source/filter/excel/exctools.cxx
index 85f759859329..1db868817a7c 100644
--- a/sc/source/filter/excel/exctools.cxx
+++ b/sc/source/filter/excel/exctools.cxx
@@ -210,7 +210,7 @@ ExcScenario::ExcScenario( XclImpStream& rIn, const RootData& rR )
nR = rIn.ReaduInt16();
nC = rIn.ReaduInt16();
- aEntries.push_back(ExcScenarioCell( nC, nR ));
+ aEntries.emplace_back( nC, nR );
n--;
}
diff --git a/sc/source/filter/excel/namebuff.cxx b/sc/source/filter/excel/namebuff.cxx
index 0a80cf8e6c9b..d52f48bcfcf8 100644
--- a/sc/source/filter/excel/namebuff.cxx
+++ b/sc/source/filter/excel/namebuff.cxx
@@ -81,7 +81,7 @@ const ScTokenArray* SharedFormulaBuffer::Find( const ScAddress& rRefPos ) const
sal_Int16 ExtSheetBuffer::Add( const OUString& rFPAN, const OUString& rTN, const bool bSWB )
{
- maEntries.push_back( Cont( rFPAN, rTN, bSWB ) );
+ maEntries.emplace_back( rFPAN, rTN, bSWB );
// return 1-based index of EXTERNSHEET
return static_cast< sal_Int16 >( maEntries.size() );
}
diff --git a/sc/source/filter/excel/tokstack.cxx b/sc/source/filter/excel/tokstack.cxx
index 9ffbd7c8c892..d7a32f547028 100644
--- a/sc/source/filter/excel/tokstack.cxx
+++ b/sc/source/filter/excel/tokstack.cxx
@@ -605,7 +605,7 @@ const TokenId TokenPool::StoreName( sal_uInt16 nIndex, sal_Int16 nSheet )
pElement[nElementAkt] = static_cast<sal_uInt16>(maRangeNames.size());
pType[nElementAkt] = T_RN;
- maRangeNames.push_back(RangeName());
+ maRangeNames.emplace_back();
RangeName& r = maRangeNames.back();
r.mnIndex = nIndex;
r.mnSheet = nSheet;
@@ -624,7 +624,7 @@ const TokenId TokenPool::StoreExtName( sal_uInt16 nFileId, const OUString& rName
pElement[nElementAkt] = static_cast<sal_uInt16>(maExtNames.size());
pType[nElementAkt] = T_ExtName;
- maExtNames.push_back(ExtName());
+ maExtNames.emplace_back();
ExtName& r = maExtNames.back();
r.mnFileId = nFileId;
r.maName = rName;
@@ -643,7 +643,7 @@ const TokenId TokenPool::StoreExtRef( sal_uInt16 nFileId, const OUString& rTabNa
pElement[nElementAkt] = static_cast<sal_uInt16>(maExtCellRefs.size());
pType[nElementAkt] = T_ExtRefC;
- maExtCellRefs.push_back(ExtCellRef());
+ maExtCellRefs.emplace_back();
ExtCellRef& r = maExtCellRefs.back();
r.mnFileId = nFileId;
r.maTabName = rTabName;
@@ -663,7 +663,7 @@ const TokenId TokenPool::StoreExtRef( sal_uInt16 nFileId, const OUString& rTabNa
pElement[nElementAkt] = static_cast<sal_uInt16>(maExtAreaRefs.size());
pType[nElementAkt] = T_ExtRefA;
- maExtAreaRefs.push_back(ExtAreaRef());
+ maExtAreaRefs.emplace_back();
ExtAreaRef& r = maExtAreaRefs.back();
r.mnFileId = nFileId;
r.maTabName = rTabName;
diff --git a/sc/source/filter/excel/xedbdata.cxx b/sc/source/filter/excel/xedbdata.cxx
index 7437ce90b525..70cc722e731b 100644
--- a/sc/source/filter/excel/xedbdata.cxx
+++ b/sc/source/filter/excel/xedbdata.cxx
@@ -171,7 +171,7 @@ XclExpTables::~XclExpTables()
void XclExpTables::AppendTable( const ScDBData* pData, sal_Int32 nTableId )
{
- maTables.push_back( Entry( pData, nTableId));
+ maTables.emplace_back( pData, nTableId);
}
void XclExpTables::SaveTableXml( XclExpXmlStream& rStrm, const Entry& rEntry )
diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx
index 6fc4a8294e29..8817561d8704 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1875,7 +1875,7 @@ void XclExpSupbookBuffer::StoreCell( sal_uInt16 nFileId, const OUString& rTabNam
FindSBIndexEntry f(nSupbookId, nSheetId);
if (::std::none_of(maSBIndexVec.begin(), maSBIndexVec.end(), f))
{
- maSBIndexVec.push_back(XclExpSBIndex());
+ maSBIndexVec.emplace_back();
XclExpSBIndex& r = maSBIndexVec.back();
r.mnSupbook = nSupbookId;
r.mnSBTab = nSheetId;
@@ -1939,7 +1939,7 @@ void XclExpSupbookBuffer::StoreCellRange( sal_uInt16 nFileId, const OUString& rT
FindSBIndexEntry f(nSupbookId, nSheetId);
if (::std::none_of(maSBIndexVec.begin(), maSBIndexVec.end(), f))
{
- maSBIndexVec.push_back(XclExpSBIndex());
+ maSBIndexVec.emplace_back();
XclExpSBIndex& r = maSBIndexVec.back();
r.mnSupbook = nSupbookId;
r.mnSBTab = nSheetId;
@@ -2042,7 +2042,7 @@ XclExpXti XclExpSupbookBuffer::GetXti( sal_uInt16 nFileId, const OUString& rTabN
FindSBIndexEntry f(nSupbookId, nSheetId);
if (::std::none_of(maSBIndexVec.begin(), maSBIndexVec.end(), f))
{
- maSBIndexVec.push_back(XclExpSBIndex());
+ maSBIndexVec.emplace_back();
XclExpSBIndex& r = maSBIndexVec.back();
r.mnSupbook = nSupbookId;
r.mnSBTab = nSheetId;
diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx
index 00fe96fa8e37..99a2ce55c47c 100644
--- a/sc/source/filter/excel/xepivot.cxx
+++ b/sc/source/filter/excel/xepivot.cxx
@@ -1061,7 +1061,7 @@ void XclExpPTField::SetPropertiesFromDim( const ScDPSaveDimension& rSaveDim )
void XclExpPTField::SetDataPropertiesFromDim( const ScDPSaveDimension& rSaveDim )
{
- maDataInfoVec.push_back( XclPTDataFieldInfo() );
+ maDataInfoVec.emplace_back( );
XclPTDataFieldInfo& rDataInfo = maDataInfoVec.back();
rDataInfo.mnField = GetFieldIndex();
@@ -1356,7 +1356,7 @@ void XclExpPivotTable::SetDataFieldPropertiesFromDim( const ScDPSaveDimension& r
// field properties
pField->SetDataPropertiesFromDim( rSaveDim );
// update the data field position list
- maDataFields.push_back( XclPTDataFieldPos( pField->GetFieldIndex(), pField->GetLastDataInfoIndex() ) );
+ maDataFields.emplace_back( pField->GetFieldIndex(), pField->GetLastDataInfoIndex() );
}
}
diff --git a/sc/source/filter/excel/xepivotxml.cxx b/sc/source/filter/excel/xepivotxml.cxx
index e416a2842a42..3b44b67022ef 100644
--- a/sc/source/filter/excel/xepivotxml.cxx
+++ b/sc/source/filter/excel/xepivotxml.cxx
@@ -647,7 +647,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
aPageFields.push_back(nPos);
break;
case sheet::DataPilotFieldOrientation_DATA:
- aDataFields.push_back(DataField(nPos, &rDim));
+ aDataFields.emplace_back(nPos, &rDim);
break;
case sheet::DataPilotFieldOrientation_HIDDEN:
default:
@@ -765,7 +765,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
if (it != iCacheFieldItems_end)
{
size_t nCachePos = it - iCacheFieldItems_begin;
- aMemberSequence.push_back(std::make_pair(nCachePos, !rMember.mbVisible));
+ aMemberSequence.emplace_back(nCachePos, !rMember.mbVisible);
aUsedCachePositions.insert(nCachePos);
}
}
@@ -773,7 +773,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
for (size_t nItem = 0; nItem < rCacheFieldItems.size(); ++nItem)
{
if (aUsedCachePositions.find(nItem) == aUsedCachePositions.end())
- aMemberSequence.push_back(std::make_pair(nItem, true));
+ aMemberSequence.emplace_back(nItem, true);
}
auto pAttList = sax_fastparser::FastSerializerHelper::createAttrList();
@@ -935,7 +935,7 @@ void XclExpXmlPivotTables::SavePivotTableXml( XclExpXmlStream& rStrm, const ScDP
void XclExpXmlPivotTables::AppendTable( const ScDPObject* pTable, sal_Int32 nCacheId, sal_Int32 nPivotId )
{
- maTables.push_back(Entry(pTable, nCacheId, nPivotId));
+ maTables.emplace_back(pTable, nCacheId, nPivotId);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/excel/xestring.cxx b/sc/source/filter/excel/xestring.cxx
index b02ec636d449..d69f6676dd67 100644
--- a/sc/source/filter/excel/xestring.cxx
+++ b/sc/source/filter/excel/xestring.cxx
@@ -164,7 +164,7 @@ void XclExpString::AppendFormat( sal_uInt16 nChar, sal_uInt16 nFontIdx, bool bDr
OSL_ENSURE( maFormats.empty() || (maFormats.back().mnChar < nChar), "XclExpString::AppendFormat - invalid char index" );
size_t nMaxSize = static_cast< size_t >( mbIsBiff8 ? EXC_STR_MAXLEN : EXC_STR_MAXLEN_8BIT );
if( maFormats.empty() || ((maFormats.size() < nMaxSize) && (!bDropDuplicate || (maFormats.back().mnFontIdx != nFontIdx))) )
- maFormats.push_back( XclFormatRun( nChar, nFontIdx ) );
+ maFormats.emplace_back( nChar, nFontIdx );
}
void XclExpString::AppendTrailingFormat( sal_uInt16 nFontIdx )
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index b0c18a16cc13..066c64ba651f 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -324,7 +324,7 @@ XclExpPaletteImpl::XclExpPaletteImpl( const XclDefaultPalette& rDefPal ) :
sal_uInt16 nCount = static_cast< sal_uInt16 >( mrDefPal.GetColorCount() );
maPalette.reserve( nCount );
for( sal_uInt16 nIdx = 0; nIdx < nCount; ++nIdx )
- maPalette.push_back( XclPaletteColor( mrDefPal.GetDefColor( GetXclIndex( nIdx ) ) ) );
+ maPalette.emplace_back( mrDefPal.GetDefColor( GetXclIndex( nIdx ) ) );
InsertColor( Color( COL_BLACK ), EXC_COLOR_CELLTEXT );
}
@@ -1384,7 +1384,7 @@ sal_uInt16 XclExpNumFmtBuffer::Insert( sal_uInt32 nScNumFmt )
if( nSize < static_cast< size_t >( 0xFFFF - mnXclOffset ) )
{
sal_uInt16 nXclNumFmt = static_cast< sal_uInt16 >( nSize + mnXclOffset );
- maFormatMap.push_back( XclExpNumFmt( nScNumFmt, nXclNumFmt, GetFormatCode( nScNumFmt ) ) );
+ maFormatMap.emplace_back( nScNumFmt, nXclNumFmt, GetFormatCode( nScNumFmt ) );
return nXclNumFmt;
}
diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx
index 3d034c5d1db3..10f238fc1e92 100644
--- a/sc/source/filter/excel/xichart.cxx
+++ b/sc/source/filter/excel/xichart.cxx
@@ -884,7 +884,7 @@ Sequence< Reference< XFormattedString > > XclImpChSourceLink::CreateStringSequen
rRoot.ConvertFont( aStringProp, nFontIdx );
// add string to vector of strings
- aStringVec.push_back( xFmtStr );
+ aStringVec.emplace_back(xFmtStr );
}
}
return ScfApiHelper::VectorToSequence( aStringVec );
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index bad8d6f79fea..3a13c8d3edec 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -1044,7 +1044,7 @@ void XclImpWebQueryBuffer::ReadQsi( XclImpStream& rStrm )
{
ScRange aRange;
if( pRangeData->IsReference( aRange ) )
- maWQList.push_back( XclImpWebQuery( aRange ) );
+ maWQList.emplace_back( aRange );
}
}
}
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 3b08416f6d5d..17c4f163c886 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -1305,7 +1305,7 @@ void XclImpPolygonObj::ReadCoordList( XclImpStream& rStrm )
sal_uInt16 nX, nY;
nX = rStrm.ReaduInt16();
nY = rStrm.ReaduInt16();
- maCoords.push_back( Point( nX, nY ) );
+ maCoords.emplace_back( nX, nY );
}
}
}
diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx
index a232c9bb8444..d045eccb4041 100644
--- a/sc/source/filter/excel/xipivot.cxx
+++ b/sc/source/filter/excel/xipivot.cxx
@@ -412,7 +412,7 @@ void XclImpPCField::ConvertStdGroupField( ScDPSaveData& rSaveData, const ScfStri
aGroupItems.reserve( maItems.size() );
// initialize with own item names
for( XclImpPCItemVec::const_iterator aIt = maItems.begin(), aEnd = maItems.end(); aIt != aEnd; ++aIt )
- aGroupItems.push_back( ScDPSaveGroupItem( (*aIt)->ConvertToText() ) );
+ aGroupItems.emplace_back( (*aIt)->ConvertToText() );
// *** iterate over all base items, set their names at corresponding own items ***
for( sal_uInt16 nItemIdx = 0, nItemCount = static_cast< sal_uInt16 >( maGroupOrder.size() ); nItemIdx < nItemCount; ++nItemIdx )
diff --git a/sc/source/filter/excel/xistream.cxx b/sc/source/filter/excel/xistream.cxx
index ed7a8ca26276..302c472f4d35 100644
--- a/sc/source/filter/excel/xistream.cxx
+++ b/sc/source/filter/excel/xistream.cxx
@@ -519,7 +519,7 @@ void XclImpStream::EnableDecryption( bool bEnable )
void XclImpStream::PushPosition()
{
- maPosStack.push_back( XclImpStreamPos() );
+ maPosStack.emplace_back( );
StorePosition( maPosStack.back() );
}
diff --git a/sc/source/filter/excel/xistring.cxx b/sc/source/filter/excel/xistring.cxx
index 959db49e4eaf..d4866e4c3a84 100644
--- a/sc/source/filter/excel/xistring.cxx
+++ b/sc/source/filter/excel/xistring.cxx
@@ -96,7 +96,7 @@ void XclImpString::AppendFormat( XclFormatRunVec& rFormats, sal_uInt16 nChar, sa
// #i33341# real life -- same character index may occur several times
OSL_ENSURE( rFormats.empty() || (rFormats.back().mnChar <= nChar), "XclImpString::AppendFormat - wrong char order" );
if( rFormats.empty() || (rFormats.back().mnChar < nChar) )
- rFormats.push_back( XclFormatRun( nChar, nFontIdx ) );
+ rFormats.emplace_back( nChar, nFontIdx );
else
rFormats.back().mnFontIdx = nFontIdx;
}
diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx
index 600c1ab5d042..d29ab77e0ce5 100644
--- a/sc/source/filter/excel/xistyle.cxx
+++ b/sc/source/filter/excel/xistyle.cxx
@@ -560,7 +560,7 @@ const XclImpFont* XclImpFontBuffer::GetFont( sal_uInt16 nFontIndex ) const
void XclImpFontBuffer::ReadFont( XclImpStream& rStrm )
{
- maFontList.push_back( XclImpFont( GetRoot() ) );
+ maFontList.emplace_back( GetRoot() );
XclImpFont& rFont = maFontList.back();
rFont.ReadFont( rStrm );
@@ -1964,7 +1964,7 @@ void XclImpXFRangeBuffer::SetBorderLine( const ScRange& rRange, SCTAB nScTab, Sv
void XclImpXFRangeBuffer::SetHyperlink( const XclRange& rXclRange, const OUString& rUrl )
{
- maHyperlinks.push_back( XclImpHyperlinkRange( rXclRange, rUrl ) );
+ maHyperlinks.emplace_back( rXclRange, rUrl );
}
void XclImpXFRangeBuffer::SetMerge( SCCOL nScCol1, SCROW nScRow1, SCCOL nScCol2, SCROW nScRow2 )
diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx
index 6e5f3dba15a1..3a4dd2b48ab5 100644
--- a/sc/source/filter/ftools/fapihelper.cxx
+++ b/sc/source/filter/ftools/fapihelper.cxx
@@ -282,7 +282,7 @@ ScfPropSetHelper::ScfPropSetHelper( const sal_Char* const* ppcPropNames ) :
for( size_t nVecIdx = 0; *ppcPropNames; ++ppcPropNames, ++nVecIdx )
{
OUString aPropName = OUString::createFromAscii( *ppcPropNames );
- aPropNameVec.push_back( IndexedOUString( aPropName, nVecIdx ) );
+ aPropNameVec.emplace_back( aPropName, nVecIdx );
}
// sorts the pairs, which will be sorted by first component (the property name)
diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx
index 3b9179b081f4..493a4ddced41 100644
--- a/sc/source/filter/html/htmlexp2.cxx
+++ b/sc/source/filter/html/htmlexp2.cxx
@@ -106,8 +106,8 @@ void ScHTMLExport::FillGraphList( const SdrPage* pPage, SCTAB nTab,
aSpace.Width() /= 2;
aSpace.Height() /= 2;
}
- aGraphList.push_back( ScHTMLGraphEntry( pObject,
- aR, aSize, bInCell, aSpace ) );
+ aGraphList.emplace_back( pObject,
+ aR, aSize, bInCell, aSpace );
}
pObject = aIter.Next();
}
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx
index 732288b1a71c..f052286dd7e6 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -160,7 +160,7 @@ ColorScaleRule::ColorScaleRule( const CondFormat& rFormat ):
void ColorScaleRule::importCfvo( const AttributeList& rAttribs )
{
if(mnCfvo >= maColorScaleRuleEntries.size())
- maColorScaleRuleEntries.push_back(ColorScaleRuleModelEntry());
+ maColorScaleRuleEntries.emplace_back();
SetCfvoData( &maColorScaleRuleEntries[mnCfvo], rAttribs );
@@ -227,7 +227,7 @@ void ColorScaleRule::importColor( const AttributeList& rAttribs )
::Color aColor = importOOXColor(rAttribs, rThemeBuffer, rGraphicHelper);
if(mnCol >= maColorScaleRuleEntries.size())
- maColorScaleRuleEntries.push_back(ColorScaleRuleModelEntry());
+ maColorScaleRuleEntries.emplace_back();
maColorScaleRuleEntries[mnCol].maColor = aColor;
++mnCol;
@@ -386,7 +386,7 @@ void IconSetRule::importIcon(const AttributeList& rAttribs)
}
ScIconSetType eIconSetType = getType(aIconSet);
- mxFormatData->maCustomVector.push_back(std::pair<ScIconSetType, sal_Int32>(eIconSetType, nIndex));
+ mxFormatData->maCustomVector.emplace_back(eIconSetType, nIndex);
}
void IconSetRule::SetData( ScIconSetFormat* pFormat, ScDocument* pDoc, const ScAddress& rPos )
diff --git a/sc/source/filter/oox/excelvbaproject.cxx b/sc/source/filter/oox/excelvbaproject.cxx
index 5ecb1c6ef8a8..f119268e799d 100644
--- a/sc/source/filter/oox/excelvbaproject.cxx
+++ b/sc/source/filter/oox/excelvbaproject.cxx
@@ -90,7 +90,7 @@ void ExcelVbaProject::prepareImport()
else
{
// TODO: once we have chart sheets we need a switch/case on sheet type ('SheetNNN' vs. 'ChartNNN')
- aCodeNameInfos.push_back( SheetCodeNameInfo( aSheetProp, "Sheet" ) );
+ aCodeNameInfos.emplace_back( aSheetProp, "Sheet" );
}
}
catch( Exception& )
diff --git a/sc/source/filter/oox/formulabase.cxx b/sc/source/filter/oox/formulabase.cxx
index ca99ec621dcb..52bc7189d04c 100644
--- a/sc/source/filter/oox/formulabase.cxx
+++ b/sc/source/filter/oox/formulabase.cxx
@@ -1697,8 +1697,8 @@ void FormulaProcessorBase::convertStringToStringList(
aEntry = aEntry.copy( nStart );
}
if( !aNewTokens.empty() )
- aNewTokens.push_back( ApiToken( OPCODE_SEP, Any() ) );
- aNewTokens.push_back( ApiToken( OPCODE_PUSH, Any( aEntry ) ) );
+ aNewTokens.emplace_back( OPCODE_SEP, Any() );
+ aNewTokens.emplace_back( OPCODE_PUSH, Any( aEntry ) );
}
orTokens = ContainerHelper::vectorToSequence( aNewTokens );
}
diff --git a/sc/source/filter/oox/formulabuffer.cxx b/sc/source/filter/oox/formulabuffer.cxx
index a677ce01abf5..d52f7fd6d789 100644
--- a/sc/source/filter/oox/formulabuffer.cxx
+++ b/sc/source/filter/oox/formulabuffer.cxx
@@ -402,15 +402,14 @@ void FormulaBuffer::createSharedFormulaMapEntry(
void FormulaBuffer::setCellFormula( const ScAddress& rAddress, const OUString& rTokenStr )
{
assert( rAddress.Tab() >= 0 && (size_t)rAddress.Tab() < maCellFormulas.size() );
- maCellFormulas[ rAddress.Tab() ].push_back( TokenAddressItem( rTokenStr, rAddress ) );
+ maCellFormulas[ rAddress.Tab() ].emplace_back( rTokenStr, rAddress );
}
void FormulaBuffer::setCellFormula(
const ScAddress& rAddress, sal_Int32 nSharedId, const OUString& rCellValue, sal_Int32 nValueType )
{
assert( rAddress.Tab() >= 0 && (size_t)rAddress.Tab() < maSharedFormulaIds.size() );
- maSharedFormulaIds[rAddress.Tab()].push_back(
- SharedFormulaDesc(rAddress, nSharedId, rCellValue, nValueType));
+ maSharedFormulaIds[rAddress.Tab()].emplace_back(rAddress, nSharedId, rCellValue, nValueType);
}
void FormulaBuffer::setCellArrayFormula( const ScRange& rRangeAddress, const ScAddress& rTokenAddress, const OUString& rTokenStr )
@@ -418,7 +417,7 @@ void FormulaBuffer::setCellArrayFormula( const ScRange& rRangeAddress, const ScA
TokenAddressItem tokenPair( rTokenStr, rTokenAddress );
assert( rRangeAddress.aStart.Tab() >= 0 && (size_t)rRangeAddress.aStart.Tab() < maCellArrayFormulas.size() );
- maCellArrayFormulas[ rRangeAddress.aStart.Tab() ].push_back( TokenRangeAddressItem( tokenPair, rRangeAddress ) );
+ maCellArrayFormulas[ rRangeAddress.aStart.Tab() ].emplace_back( tokenPair, rRangeAddress );
}
void FormulaBuffer::setCellFormulaValue(
diff --git a/sc/source/filter/oox/formulaparser.cxx b/sc/source/filter/oox/formulaparser.cxx
index aab7e0927fbd..8ac625f58215 100644
--- a/sc/source/filter/oox/formulaparser.cxx
+++ b/sc/source/filter/oox/formulaparser.cxx
@@ -641,7 +641,7 @@ void FormulaParserImpl::appendSpaces( WhiteSpaceVec& orSpaces, sal_Int32 nCount,
{
OSL_ENSURE( nCount >= 0, "FormulaParserImpl::appendSpaces - negative count" );
if( nCount > 0 )
- orSpaces.push_back( WhiteSpace( nCount, bLineFeed ) );
+ orSpaces.emplace_back( nCount, bLineFeed );
}
void FormulaParserImpl::appendLeadingSpaces( sal_Int32 nCount, bool bLineFeed )
diff --git a/sc/source/filter/oox/pivottablebuffer.cxx b/sc/source/filter/oox/pivottablebuffer.cxx
index eaeab3b07c38..cd1025f73abc 100644
--- a/sc/source/filter/oox/pivottablebuffer.cxx
+++ b/sc/source/filter/oox/pivottablebuffer.cxx
@@ -411,7 +411,7 @@ void PivotTableField::finalizeImport( const Reference< XDataPilotDescriptor >& r
pCacheField->getCacheItemNames( aItems );
PivotCacheGroupItemVector aItemNames;
for( ::std::vector< OUString >::iterator aIt = aItems.begin(), aEnd = aItems.end(); aIt != aEnd; ++aIt )
- aItemNames.push_back( PivotCacheGroupItem( *aIt ) );
+ aItemNames.emplace_back( *aIt );
// create all nested group fields (if any)
mrPivotTable.finalizeParentGroupingImport( xDPField, *pCacheField, aItemNames );
}
@@ -450,7 +450,7 @@ void PivotTableField::finalizeParentGroupingImport( const Reference< XDataPilotF
for( ItemModelVector::iterator aIt = maItems.begin(), aEnd = maItems.end(); aIt != aEnd; ++aIt )
{
if ( aIt->mnType == XML_data && aIt->msCaption.getLength() )
- captionList.push_back( IdCaptionPair( aIt->mnCacheItem, aIt->msCaption ) );
+ captionList.emplace_back( aIt->mnCacheItem, aIt->msCaption );
}
if ( !captionList.empty() )
pCacheField->applyItemCaptions( captionList );
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx
index 28b48da25a77..4dba319eee72 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -279,7 +279,7 @@ void SheetDataBuffer::createArrayFormula( const ScRange& rRange, const ApiTokenS
/* Array formulas will be inserted later in finalizeImport(). This is
needed to not disturb collecting all the cells, which will be put into
the sheet in large blocks to increase performance. */
- maArrayFormulas.push_back( ArrayFormula( rRange, rTokens ) );
+ maArrayFormulas.emplace_back( rRange, rTokens );
}
void SheetDataBuffer::createTableOperation( const ScRange& rRange, const DataTableModel& rModel )
@@ -287,7 +287,7 @@ void SheetDataBuffer::createTableOperation( const ScRange& rRange, const DataTab
/* Table operations will be inserted later in finalizeImport(). This is
needed to not disturb collecting all the cells, which will be put into
the sheet in large blocks to increase performance. */
- maTableOperations.push_back( TableOperation( rRange, rModel ) );
+ maTableOperations.emplace_back( rRange, rModel );
}
void SheetDataBuffer::setRowFormat( sal_Int32 nRow, sal_Int32 nXfId, bool bCustomFormat )
@@ -313,7 +313,7 @@ void SheetDataBuffer::setRowFormat( sal_Int32 nRow, sal_Int32 nXfId, bool bCusto
void SheetDataBuffer::setMergedRange( const ScRange& rRange )
{
- maMergedRanges.push_back( MergedRange( rRange ) );
+ maMergedRanges.emplace_back( rRange );
}
typedef std::pair<sal_Int32, sal_Int32> FormatKeyPair;
@@ -709,7 +709,7 @@ void SheetDataBuffer::setCellFormat( const CellModel& rModel )
/* start new merged range, if cell is not empty (#108781#),
or try to expand last range with empty cell */
if( rModel.mnCellType != XML_TOKEN_INVALID )
- maCenterFillRanges.push_back( MergedRange( rModel.maCellAddr, nHorAlign ) );
+ maCenterFillRanges.emplace_back( rModel.maCellAddr, nHorAlign );
else if( !maCenterFillRanges.empty() )
maCenterFillRanges.rbegin()->tryExpand( rModel.maCellAddr, nHorAlign );
}
diff --git a/sc/source/filter/oox/workbookfragment.cxx b/sc/source/filter/oox/workbookfragment.cxx
index c52af23143d5..0f852206415e 100644
--- a/sc/source/filter/oox/workbookfragment.cxx
+++ b/sc/source/filter/oox/workbookfragment.cxx
@@ -440,7 +440,7 @@ void WorkbookFragment::finalizeImport()
// insert the fragment into the map
if( xFragment.is() )
{
- aSheetFragments.push_back( SheetFragmentHandler( xSheetGlob, xFragment.get() ) );
+ aSheetFragments.emplace_back( xSheetGlob, xFragment.get() );
aHelpers.push_back(xFragment.get());
}
}
diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx
index 9683661671cd..c24e15742e29 100644
--- a/sc/source/filter/orcus/interface.cxx
+++ b/sc/source/filter/orcus/interface.cxx
@@ -204,7 +204,7 @@ size_t ScOrcusFactory::addString(const OUString& rStr)
void ScOrcusFactory::pushStringCell(const ScAddress& rPos, size_t nStrIndex)
{
- maStringCells.push_back(StringCellCache(rPos, nStrIndex));
+ maStringCells.emplace_back(rPos, nStrIndex);
}
void ScOrcusFactory::incrementProgress()
diff --git a/sc/source/filter/xml/pivotsource.cxx b/sc/source/filter/xml/pivotsource.cxx
index 322459239320..8ae4d40b52aa 100644
--- a/sc/source/filter/xml/pivotsource.cxx
+++ b/sc/source/filter/xml/pivotsource.cxx
@@ -31,17 +31,17 @@ PivotTableSources::PivotTableSources() {}
void PivotTableSources::appendSheetSource( ScDPObject* pObj, const ScSheetSourceDesc& rDesc )
{
- maSheetSources.push_back(SheetSource(pObj, rDesc));
+ maSheetSources.emplace_back(pObj, rDesc);
}
void PivotTableSources::appendDBSource( ScDPObject* pObj, const ScImportSourceDesc& rDesc )
{
- maDBSources.push_back(DBSource(pObj, rDesc));
+ maDBSources.emplace_back(pObj, rDesc);
}
void PivotTableSources::appendServiceSource( ScDPObject* pObj, const ScDPServiceDesc& rDesc )
{
- maServiceSources.push_back(ServiceSource(pObj, rDesc));
+ maServiceSources.emplace_back(pObj, rDesc);
}
void PivotTableSources::appendSelectedPages( ScDPObject* pObj, const SelectedPagesType& rSelected )
@@ -49,7 +49,7 @@ void PivotTableSources::appendSelectedPages( ScDPObject* pObj, const SelectedPag
if (rSelected.empty())
return;
- maSelectedPagesList.push_back(SelectedPages(pObj, rSelected));
+ maSelectedPagesList.emplace_back(pObj, rSelected);
}
namespace {
diff --git a/sc/source/filter/xml/sheetdata.cxx b/sc/source/filter/xml/sheetdata.cxx
index 1d1cfb93487d..682d466d2a49 100644
--- a/sc/source/filter/xml/sheetdata.cxx
+++ b/sc/source/filter/xml/sheetdata.cxx
@@ -39,22 +39,22 @@ ScSheetSaveData::~ScSheetSaveData()
void ScSheetSaveData::AddCellStyle( const OUString& rName, const ScAddress& rCellPos )
{
- maCellStyles.push_back( ScCellStyleEntry( rName, rCellPos ) );
+ maCellStyles.emplace_back( rName, rCellPos );
}
void ScSheetSaveData::AddColumnStyle( const OUString& rName, const ScAddress& rCellPos )
{
- maColumnStyles.push_back( ScCellStyleEntry( rName, rCellPos ) );
+ maColumnStyles.emplace_back( rName, rCellPos );
}
void ScSheetSaveData::AddRowStyle( const OUString& rName, const ScAddress& rCellPos )
{
- maRowStyles.push_back( ScCellStyleEntry( rName, rCellPos ) );
+ maRowStyles.emplace_back( rName, rCellPos );
}
void ScSheetSaveData::AddTableStyle( const OUString& rName, const ScAddress& rCellPos )
{
- maTableStyles.push_back( ScCellStyleEntry( rName, rCellPos ) );
+ maTableStyles.emplace_back( rName, rCellPos );
}
void ScSheetSaveData::HandleNoteStyles( const OUString& rStyleName, const OUString& rTextName, const ScAddress& rCellPos )
@@ -78,14 +78,14 @@ void ScSheetSaveData::HandleNoteStyles( const OUString& rStyleName, const OUStri
void ScSheetSaveData::AddNoteContentStyle( sal_uInt16 nFamily, const OUString& rName, const ScAddress& rCellPos, const ESelection& rSelection )
{
if ( nFamily == XML_STYLE_FAMILY_TEXT_PARAGRAPH )
- maNoteParaStyles.push_back( ScTextStyleEntry( rName, rCellPos, rSelection ) );
+ maNoteParaStyles.emplace_back( rName, rCellPos, rSelection );
else
- maNoteTextStyles.push_back( ScTextStyleEntry( rName, rCellPos, rSelection ) );
+ maNoteTextStyles.emplace_back( rName, rCellPos, rSelection );
}
void ScSheetSaveData::AddTextStyle( const OUString& rName, const ScAddress& rCellPos, const ESelection& rSelection )
{
- maTextStyles.push_back( ScTextStyleEntry( rName, rCellPos, rSelection ) );
+ maTextStyles.emplace_back( rName, rCellPos, rSelection );
}
void ScSheetSaveData::BlockSheet( SCTAB nTab )
@@ -194,7 +194,7 @@ void ScSheetSaveData::StoreLoadedNamespaces( const SvXMLNamespaceMap& rNamespace
if ( maInitialPrefixes.find( aIter->first ) == maInitialPrefixes.end() )
{
const NameSpaceEntry& rEntry = *(aIter->second);
- maLoadedNamespaces.push_back( ScLoadedNamespaceEntry( rEntry.sPrefix, rEntry.sName, rEntry.nKey ) );
+ maLoadedNamespaces.emplace_back( rEntry.sPrefix, rEntry.sName, rEntry.nKey );
}
++aIter;
}
diff --git a/sc/source/filter/xml/xmlannoi.cxx b/sc/source/filter/xml/xmlannoi.cxx
index f88643686540..42d7de994fd9 100644
--- a/sc/source/filter/xml/xmlannoi.cxx
+++ b/sc/source/filter/xml/xmlannoi.cxx
@@ -180,7 +180,7 @@ void ScXMLAnnotationContext::SetShape( const uno::Reference< drawing::XShape >&
void ScXMLAnnotationContext::AddContentStyle( sal_uInt16 nFamily, const OUString& rName, const ESelection& rSelection )
{
- mrAnnotationData.maContentStyles.push_back( ScXMLAnnotationStyleEntry( nFamily, rName, rSelection ) );
+ mrAnnotationData.maContentStyles.emplace_back( nFamily, rName, rSelection );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 8c1a6442cf21..48156659941a 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -911,7 +911,7 @@ void ScXMLExport::ExportExternalRefCacheStyles()
aVal <<= nNumFmt;
vector<XMLPropertyState> aProps;
aVal <<= aDefaultStyle;
- aProps.push_back(XMLPropertyState(nEntryIndex, aVal));
+ aProps.emplace_back(nEntryIndex, aVal);
OUString aName;
sal_Int32 nIndex;
@@ -953,7 +953,7 @@ void handleFont(
if (!pItem->QueryValue(aAny, MID_FONT_FAMILY_NAME))
return;
- rPropStates.push_back(XMLPropertyState(nIndexFontName, aAny));
+ rPropStates.emplace_back(nIndexFontName, aAny);
}
const SvxFieldData* toXMLPropertyStates(
@@ -1002,7 +1002,7 @@ const SvxFieldData* toXMLPropertyStates(
if (!static_cast<const SvxWeightItem*>(p)->QueryValue(aAny, pEntry->mnFlag))
continue;
- rPropStates.push_back(XMLPropertyState(nIndex, aAny));
+ rPropStates.emplace_back(nIndex, aAny);
}
break;
case EE_CHAR_FONTHEIGHT:
@@ -1012,7 +1012,7 @@ const SvxFieldData* toXMLPropertyStates(
if (!static_cast<const SvxFontHeightItem*>(p)->QueryValue(aAny, pEntry->mnFlag))
continue;
- rPropStates.push_back(XMLPropertyState(nIndex, aAny));
+ rPropStates.emplace_back(nIndex, aAny);
}
break;
case EE_CHAR_ITALIC:
@@ -1022,7 +1022,7 @@ const SvxFieldData* toXMLPropertyStates(
if (!static_cast<const SvxPostureItem*>(p)->QueryValue(aAny, pEntry->mnFlag))
continue;
- rPropStates.push_back(XMLPropertyState(nIndex, aAny));
+ rPropStates.emplace_back(nIndex, aAny);
}
break;
case EE_CHAR_UNDERLINE:
@@ -1050,15 +1050,15 @@ const SvxFieldData* toXMLPropertyStates(
const SvxUnderlineItem* pUL = static_cast<const SvxUnderlineItem*>(p);
pUL->QueryValue(aAny, MID_TL_STYLE);
- rPropStates.push_back(XMLPropertyState(nIndexStyle, aAny));
- rPropStates.push_back(XMLPropertyState(nIndexType, aAny));
- rPropStates.push_back(XMLPropertyState(nIndexWidth, aAny));
+ rPropStates.emplace_back(nIndexStyle, aAny);
+ rPropStates.emplace_back(nIndexType, aAny);
+ rPropStates.emplace_back(nIndexWidth, aAny);
pUL->QueryValue(aAny, MID_TL_COLOR);
- rPropStates.push_back(XMLPropertyState(nIndexColor, aAny));
+ rPropStates.emplace_back(nIndexColor, aAny);
pUL->QueryValue(aAny, MID_TL_HASCOLOR);
- rPropStates.push_back(XMLPropertyState(nIndexHasColor, aAny));
+ rPropStates.emplace_back(nIndexHasColor, aAny);
}
break;
case EE_CHAR_OVERLINE:
@@ -1086,15 +1086,15 @@ const SvxFieldData* toXMLPropertyStates(
const SvxOverlineItem* pOL = static_cast<const SvxOverlineItem*>(p);
pOL->QueryValue(aAny, MID_TL_STYLE);
- rPropStates.push_back(XMLPropertyState(nIndexStyle, aAny));
- rPropStates.push_back(XMLPropertyState(nIndexType, aAny));
- rPropStates.push_back(XMLPropertyState(nIndexWidth, aAny));
+ rPropStates.emplace_back(nIndexStyle, aAny);
+ rPropStates.emplace_back(nIndexType, aAny);
+ rPropStates.emplace_back(nIndexWidth, aAny);
pOL->QueryValue(aAny, MID_TL_COLOR);
- rPropStates.push_back(XMLPropertyState(nIndexColor, aAny));
+ rPropStates.emplace_back(nIndexColor, aAny);
pOL->QueryValue(aAny, MID_TL_HASCOLOR);
- rPropStates.push_back(XMLPropertyState(nIndexHasColor, aAny));
+ rPropStates.emplace_back(nIndexHasColor, aAny);
}
break;
case EE_CHAR_COLOR:
@@ -1107,7 +1107,7 @@ const SvxFieldData* toXMLPropertyStates(
{
sal_Int32 nIndexColor = ( nColor == COL_AUTO ) ? xMapper->GetEntryIndex(
XML_NAMESPACE_STYLE, GetXMLToken( XML_USE_WINDOW_FONT_COLOR ), 0 ) : nIndex;
- rPropStates.push_back( XMLPropertyState( nIndexColor, aAny ) );
+ rPropStates.emplace_back( nIndexColor, aAny );
}
}
break;
@@ -1116,7 +1116,7 @@ const SvxFieldData* toXMLPropertyStates(
if (!static_cast<const SvxWordLineModeItem*>(p)->QueryValue(aAny, pEntry->mnFlag))
continue;
- rPropStates.push_back(XMLPropertyState(nIndex, aAny));
+ rPropStates.emplace_back(nIndex, aAny);
}
break;
case EE_CHAR_STRIKEOUT:
@@ -1124,7 +1124,7 @@ const SvxFieldData* toXMLPropertyStates(
if (!static_cast<const SvxCrossedOutItem*>(p)->QueryValue(aAny, pEntry->mnFlag))
continue;
- rPropStates.push_back(XMLPropertyState(nIndex, aAny));
+ rPropStates.emplace_back(nIndex, aAny);
}
break;
case EE_CHAR_RELIEF:
@@ -1132,7 +1132,7 @@ const SvxFieldData* toXMLPropertyStates(
if (!static_cast<const SvxCharReliefItem*>(p)->QueryValue(aAny, pEntry->mnFlag))
continue;
- rPropStates.push_back(XMLPropertyState(nIndex, aAny));
+ rPropStates.emplace_back(nIndex, aAny);
}
break;
case EE_CHAR_OUTLINE:
@@ -1140,7 +1140,7 @@ const SvxFieldData* toXMLPropertyStates(
if (!static_cast<const SvxContourItem*>(p)->QueryValue(aAny, pEntry->mnFlag))
continue;
- rPropStates.push_back(XMLPropertyState(nIndex, aAny));
+ rPropStates.emplace_back(nIndex, aAny);
}
break;
case EE_CHAR_SHADOW:
@@ -1148,7 +1148,7 @@ const SvxFieldData* toXMLPropertyStates(
if (!static_cast<const SvxShadowedItem*>(p)->QueryValue(aAny, pEntry->mnFlag))
continue;
- rPropStates.push_back(XMLPropertyState(nIndex, aAny));
+ rPropStates.emplace_back(nIndex, aAny);
}
break;
case EE_CHAR_KERNING:
@@ -1156,7 +1156,7 @@ const SvxFieldData* toXMLPropertyStates(
if (!static_cast<const SvxKerningItem*>(p)->QueryValue(aAny, pEntry->mnFlag))
continue;
- rPropStates.push_back(XMLPropertyState(nIndex, aAny));
+ rPropStates.emplace_back(nIndex, aAny);
}
break;
case EE_CHAR_PAIRKERNING:
@@ -1164,7 +1164,7 @@ const SvxFieldData* toXMLPropertyStates(
if (!static_cast<const SvxAutoKernItem*>(p)->QueryValue(aAny, pEntry->mnFlag))
continue;
- rPropStates.push_back(XMLPropertyState(nIndex, aAny));
+ rPropStates.emplace_back(nIndex, aAny);
}
break;
case EE_CHAR_FONTWIDTH:
@@ -1172,7 +1172,7 @@ const SvxFieldData* toXMLPropertyStates(
if (!static_cast<const SvxCharScaleWidthItem*>(p)->QueryValue(aAny, pEntry->mnFlag))
continue;
- rPropStates.push_back(XMLPropertyState(nIndex, aAny));
+ rPropStates.emplace_back(nIndex, aAny);
}
break;
case EE_CHAR_ESCAPEMENT:
@@ -1188,10 +1188,10 @@ const SvxFieldData* toXMLPropertyStates(
const SvxEscapementItem* pEsc = static_cast<const SvxEscapementItem*>(p);
pEsc->QueryValue(aAny);
- rPropStates.push_back(XMLPropertyState(nIndexEsc, aAny));
+ rPropStates.emplace_back(nIndexEsc, aAny);
pEsc->QueryValue(aAny, MID_ESC_HEIGHT);
- rPropStates.push_back(XMLPropertyState(nIndexEscHeight, aAny));
+ rPropStates.emplace_back(nIndexEscHeight, aAny);
}
break;
@@ -1200,7 +1200,7 @@ const SvxFieldData* toXMLPropertyStates(
if (!static_cast<const SvxEmphasisMarkItem*>(p)->QueryValue(aAny, pEntry->mnFlag))
continue;
- rPropStates.push_back(XMLPropertyState(nIndex, aAny));
+ rPropStates.emplace_back(nIndex, aAny);
}
break;
case EE_CHAR_LANGUAGE:
@@ -1236,10 +1236,10 @@ const SvxFieldData* toXMLPropertyStates(
nIndexLanguage = nIndexCountry = nIndexScript = nIndexTag = -1;
}
assert( nIndexLanguage >= 0 && nIndexCountry >= 0 && nIndexScript >= 0 && nIndexTag >= 0);
- rPropStates.push_back( XMLPropertyState( nIndexLanguage, aAny));
- rPropStates.push_back( XMLPropertyState( nIndexCountry, aAny));
- rPropStates.push_back( XMLPropertyState( nIndexScript, aAny));
- rPropStates.push_back( XMLPropertyState( nIndexTag, aAny));
+ rPropStates.emplace_back( nIndexLanguage, aAny);
+ rPropStates.emplace_back( nIndexCountry, aAny);
+ rPropStates.emplace_back( nIndexScript, aAny);
+ rPropStates.emplace_back( nIndexTag, aAny);
}
break;
default:
diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
index 9ccdc8bda4cb..42c63ec57665 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -149,7 +149,7 @@ void SAL_CALL ScXMLFilterContext::endFastElement( sal_Int32 /*nElement*/ )
void ScXMLFilterContext::OpenConnection(bool b)
{
- maConnStack.push_back(ConnStackItem(b));
+ maConnStack.emplace_back(b);
}
void ScXMLFilterContext::CloseConnection()
diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx
index 305c7ad55ed8..42ddf57fc7c1 100644
--- a/sc/source/filter/xml/xmlstyli.cxx
+++ b/sc/source/filter/xml/xmlstyli.cxx
@@ -267,7 +267,7 @@ void ScXMLRowImportPropertyMapper::finished(::std::vector< XMLPropertyState >& r
}
else if (pHeight)
{
- rProperties.push_back(XMLPropertyState(maPropMapper->FindEntryIndex(CTF_SC_ROWOPTIMALHEIGHT), css::uno::Any(false)));
+ rProperties.emplace_back(maPropMapper->FindEntryIndex(CTF_SC_ROWOPTIMALHEIGHT), css::uno::Any(false));
}
// don't access pointers to rProperties elements after push_back!
}