summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--oox/source/core/filterdetect.cxx2
-rw-r--r--oox/source/core/recordparser.cxx2
-rw-r--r--oox/source/drawingml/chart/titleconverter.cxx2
-rw-r--r--oox/source/drawingml/clrscheme.cxx2
-rw-r--r--oox/source/drawingml/color.cxx8
-rw-r--r--oox/source/drawingml/diagram/datamodelcontext.cxx4
-rw-r--r--oox/source/drawingml/diagram/diagram.cxx5
-rw-r--r--oox/source/drawingml/linepropertiescontext.cxx2
-rw-r--r--oox/source/drawingml/textfield.cxx12
-rw-r--r--oox/source/dump/dffdumper.cxx2
-rw-r--r--oox/source/dump/dumperbase.cxx4
-rw-r--r--oox/source/dump/oledumper.cxx14
-rw-r--r--oox/source/export/chartexport.cxx8
-rw-r--r--oox/source/export/shapes.cxx4
-rw-r--r--oox/source/mathml/importutils.cxx6
-rw-r--r--oox/source/ole/axcontrol.cxx2
-rw-r--r--oox/source/ppt/conditioncontext.cxx2
-rw-r--r--oox/source/ppt/slidefragmenthandler.cxx2
-rw-r--r--oox/source/vml/vmlformatting.cxx46
-rw-r--r--oox/source/vml/vmlshape.cxx28
-rw-r--r--oox/source/vml/vmlshapecontext.cxx2
-rw-r--r--oox/source/vml/vmltextbox.cxx2
22 files changed, 80 insertions, 81 deletions
diff --git a/oox/source/core/filterdetect.cxx b/oox/source/core/filterdetect.cxx
index 24e47c1ca7c2..1770a6aca440 100644
--- a/oox/source/core/filterdetect.cxx
+++ b/oox/source/core/filterdetect.cxx
@@ -327,7 +327,7 @@ Reference< XInputStream > FilterDetect::extractUnencryptedPackage( MediaDescript
feature with password. Try this first before prompting the
user for a password. */
std::vector<OUString> aDefaultPasswords;
- aDefaultPasswords.push_back("VelvetSweatshop");
+ aDefaultPasswords.emplace_back("VelvetSweatshop");
/* Use the comphelper password helper to request a password.
This helper returns either with the correct password
diff --git a/oox/source/core/recordparser.cxx b/oox/source/core/recordparser.cxx
index ebcd3a8cef29..0f6e463d693d 100644
--- a/oox/source/core/recordparser.cxx
+++ b/oox/source/core/recordparser.cxx
@@ -137,7 +137,7 @@ void ContextStack::pushContext( const RecordInfo& rRecInfo, const ContextHandler
{
OSL_ENSURE( (rRecInfo.mnEndRecId >= 0) || maStack.empty() || hasCurrentEndRecId(),
"ContextStack::pushContext - nested incomplete context record identifiers" );
- maStack.push_back( ContextInfo( rRecInfo, rxContext ) );
+ maStack.emplace_back( rRecInfo, rxContext );
}
void ContextStack::popContext()
diff --git a/oox/source/drawingml/chart/titleconverter.cxx b/oox/source/drawingml/chart/titleconverter.cxx
index 8586ccbbc339..6237e39ba0b3 100644
--- a/oox/source/drawingml/chart/titleconverter.cxx
+++ b/oox/source/drawingml/chart/titleconverter.cxx
@@ -124,7 +124,7 @@ Reference< XFormattedString > TextConverter::appendFormattedString(
{
xFmtStr = FormattedString::create( ConverterRoot::getComponentContext() );
xFmtStr->setString( bAddNewLine ? (rString + "\n") : rString );
- orStringVec.push_back( xFmtStr );
+ orStringVec.emplace_back(xFmtStr );
}
catch( Exception& )
{
diff --git a/oox/source/drawingml/clrscheme.cxx b/oox/source/drawingml/clrscheme.cxx
index 2f8e93701e97..8447f6e7a5a1 100644
--- a/oox/source/drawingml/clrscheme.cxx
+++ b/oox/source/drawingml/clrscheme.cxx
@@ -82,7 +82,7 @@ bool ClrScheme::getColor( sal_Int32 nSchemeClrToken, sal_Int32& rColor ) const
void ClrScheme::setColor( sal_Int32 nSchemeClrToken, sal_Int32 nColor )
{
- maClrScheme.push_back(std::pair<sal_Int32, sal_Int32>(nSchemeClrToken, nColor));
+ maClrScheme.emplace_back(nSchemeClrToken, nColor);
}
bool ClrScheme::getColorByIndex(size_t nIndex, sal_Int32& rColor) const
diff --git a/oox/source/drawingml/color.cxx b/oox/source/drawingml/color.cxx
index 8470c4a0f182..4629c6ab63b7 100644
--- a/oox/source/drawingml/color.cxx
+++ b/oox/source/drawingml/color.cxx
@@ -295,7 +295,7 @@ void Color::addTransformation( sal_Int32 nElement, sal_Int32 nValue )
case XML_alpha: lclSetValue( mnAlpha, nValue ); break;
case XML_alphaMod: lclModValue( mnAlpha, nValue ); break;
case XML_alphaOff: lclOffValue( mnAlpha, nValue ); break;
- default: maTransforms.push_back( Transformation( nToken, nValue ) );
+ default: maTransforms.emplace_back( nToken, nValue );
}
sal_Int32 nSize = maInteropTransformations.getLength();
maInteropTransformations.realloc(nSize + 1);
@@ -307,15 +307,15 @@ void Color::addChartTintTransformation( double fTint )
{
sal_Int32 nValue = getLimitedValue< sal_Int32, double >( fTint * MAX_PERCENT + 0.5, -MAX_PERCENT, MAX_PERCENT );
if( nValue < 0 )
- maTransforms.push_back( Transformation( XML_shade, nValue + MAX_PERCENT ) );
+ maTransforms.emplace_back( XML_shade, nValue + MAX_PERCENT );
else if( nValue > 0 )
- maTransforms.push_back( Transformation( XML_tint, MAX_PERCENT - nValue ) );
+ maTransforms.emplace_back( XML_tint, MAX_PERCENT - nValue );
}
void Color::addExcelTintTransformation( double fTint )
{
sal_Int32 nValue = getLimitedValue< sal_Int32, double >( fTint * MAX_PERCENT + 0.5, -MAX_PERCENT, MAX_PERCENT );
- maTransforms.push_back( Transformation( XLS_TOKEN( tint ), nValue ) );
+ maTransforms.emplace_back( XLS_TOKEN( tint ), nValue );
}
void Color::clearTransformations()
diff --git a/oox/source/drawingml/diagram/datamodelcontext.cxx b/oox/source/drawingml/diagram/datamodelcontext.cxx
index 2c5f8f97784f..7846a94216a5 100644
--- a/oox/source/drawingml/diagram/datamodelcontext.cxx
+++ b/oox/source/drawingml/diagram/datamodelcontext.cxx
@@ -51,7 +51,7 @@ public:
{
case DGM_TOKEN( cxn ):
{
- mrConnection.push_back( dgm::Connection() );
+ mrConnection.emplace_back( );
dgm::Connection& rConnection=mrConnection.back();
rConnection.mnType = rAttribs.getToken( XML_type, XML_parOf );
@@ -266,7 +266,7 @@ public:
case DGM_TOKEN( pt ):
{
// CT_Pt
- mrPoints.push_back( dgm::Point() );
+ mrPoints.emplace_back( );
return new PtContext( *this, rAttribs, mrPoints.back() );
}
default:
diff --git a/oox/source/drawingml/diagram/diagram.cxx b/oox/source/drawingml/diagram/diagram.cxx
index 5d060799caab..4ddbc20630bc 100644
--- a/oox/source/drawingml/diagram/diagram.cxx
+++ b/oox/source/drawingml/diagram/diagram.cxx
@@ -277,9 +277,8 @@ void Diagram::build( )
if( aCurrCxn->mnType == XML_presOf )
{
DiagramData::StringMap::value_type::second_type& rVec=getData()->getPresOfNameMap()[aCurrCxn->msDestId];
- rVec.push_back(
- std::make_pair(
- aCurrCxn->msSourceId,sal_Int32(0)));
+ rVec.emplace_back(
+ aCurrCxn->msSourceId,sal_Int32(0));
}
++aCurrCxn;
diff --git a/oox/source/drawingml/linepropertiescontext.cxx b/oox/source/drawingml/linepropertiescontext.cxx
index 17180a7dc216..dc4a941a8096 100644
--- a/oox/source/drawingml/linepropertiescontext.cxx
+++ b/oox/source/drawingml/linepropertiescontext.cxx
@@ -109,7 +109,7 @@ ContextHandlerRef LinePropertiesContext::onCreateContext( sal_Int32 nElement, co
nSp = rAttribs.getInteger( XML_sp, 0 );
}
- mrLineProperties.maCustomDash.push_back( LineProperties::DashStop( nDash, nSp ) );
+ mrLineProperties.maCustomDash.emplace_back( nDash, nSp );
}
break;
diff --git a/oox/source/drawingml/textfield.cxx b/oox/source/drawingml/textfield.cxx
index df3be9cf4a9d..2a3527779e41 100644
--- a/oox/source/drawingml/textfield.cxx
+++ b/oox/source/drawingml/textfield.cxx
@@ -69,7 +69,7 @@ void lclCreateTextFields( std::list< Reference< XTextField > > & aFields,
int idx = p.toInt32();
sal_uInt16 nNumFmt;
xIface = xFactory->createInstance( "com.sun.star.text.TextField.DateTime" );
- aFields.push_back( Reference< XTextField > ( xIface, UNO_QUERY ) );
+ aFields.emplace_back( xIface, UNO_QUERY );
Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW );
// here we should format the field properly. waiting after #i81091.
@@ -136,17 +136,17 @@ void lclCreateTextFields( std::list< Reference< XTextField > > & aFields,
else if ( sType == "slidenum" )
{
xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageNumber" );
- aFields.push_back( Reference< XTextField > ( xIface, UNO_QUERY ) );
+ aFields.emplace_back( xIface, UNO_QUERY );
}
else if ( sType == "slidecount" )
{
xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageCount" );
- aFields.push_back( Reference< XTextField > ( xIface, UNO_QUERY ) );
+ aFields.emplace_back( xIface, UNO_QUERY );
}
else if ( sType == "slidename" )
{
xIface = xFactory->createInstance( "com.sun.star.text.TextField.PageName" );
- aFields.push_back( Reference< XTextField > ( xIface, uno::UNO_QUERY ) );
+ aFields.emplace_back( xIface, uno::UNO_QUERY );
}
else if ( sType.startsWith("file") )
{
@@ -154,7 +154,7 @@ void lclCreateTextFields( std::list< Reference< XTextField > > & aFields,
OString p( s.pData->buffer + 4 );
int idx = p.toInt32();
xIface = xFactory->createInstance( "com.sun.star.text.TextField.FileName" );
- aFields.push_back( Reference< XTextField > ( xIface, UNO_QUERY ) );
+ aFields.emplace_back( xIface, UNO_QUERY );
Reference< XPropertySet > xProps( xIface, UNO_QUERY_THROW );
switch( idx )
@@ -175,7 +175,7 @@ void lclCreateTextFields( std::list< Reference< XTextField > > & aFields,
else if( sType == "author" )
{
xIface = xFactory->createInstance( "com.sun.star.text.TextField.Author" );
- aFields.push_back( Reference< XTextField > ( xIface, UNO_QUERY ) );
+ aFields.emplace_back( xIface, UNO_QUERY );
}
}
diff --git a/oox/source/dump/dffdumper.cxx b/oox/source/dump/dffdumper.cxx
index abbd96d3b7b1..6c8cb05b3e9c 100644
--- a/oox/source/dump/dffdumper.cxx
+++ b/oox/source/dump/dffdumper.cxx
@@ -185,7 +185,7 @@ void DffStreamObject::dumpDffOpt()
if( getFlag( nPropId, DFF_OPT_COMPLEX ) )
{
writeHexItem( "complex-size", nValue, "CONV-DEC" );
- aPropInfos.push_back( PropInfo( String( "property-data" ), PROPTYPE_BINARY, nBaseId, nValue ) );
+ aPropInfos.emplace_back( String( "property-data" ), PROPTYPE_BINARY, nBaseId, nValue );
}
else
{
diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx
index 36e9bf1a7c3d..f307f44e4b42 100644
--- a/oox/source/dump/dumperbase.cxx
+++ b/oox/source/dump/dumperbase.cxx
@@ -1829,13 +1829,13 @@ void StorageObjectBase::implDumpBaseStream( const BinaryInputStreamRef&, const O
void StorageObjectBase::addPreferredStream( const String& rStrmName )
{
if( rStrmName.has() )
- maPreferred.push_back( PreferredItem( rStrmName, false ) );
+ maPreferred.emplace_back( rStrmName, false );
}
void StorageObjectBase::addPreferredStorage( const String& rStrgPath )
{
if( rStrgPath.has() )
- maPreferred.push_back( PreferredItem( rStrgPath, true ) );
+ maPreferred.emplace_back( rStrgPath, true );
}
OUString StorageObjectBase::getSysFileName( const OUString& rStrmName, const OUString& rSysOutPath )
diff --git a/oox/source/dump/oledumper.cxx b/oox/source/dump/oledumper.cxx
index 376b500ce15d..865a318ac0fb 100644
--- a/oox/source/dump/oledumper.cxx
+++ b/oox/source/dump/oledumper.cxx
@@ -957,19 +957,19 @@ void AxPropertyObjectBase::dumpUnknownProperty()
void AxPropertyObjectBase::dumpPosProperty()
{
if( startNextProperty() )
- maLargeProps.push_back( LargeProperty( LargeProperty::PROPTYPE_POS, getPropertyName(), 8 ) );
+ maLargeProps.emplace_back( LargeProperty::PROPTYPE_POS, getPropertyName(), 8 );
}
void AxPropertyObjectBase::dumpSizeProperty()
{
if( startNextProperty() )
- maLargeProps.push_back( LargeProperty( LargeProperty::PROPTYPE_SIZE, getPropertyName(), 8 ) );
+ maLargeProps.emplace_back( LargeProperty::PROPTYPE_SIZE, getPropertyName(), 8 );
}
void AxPropertyObjectBase::dumpGuidProperty( OUString* pValue )
{
if( startNextProperty() )
- maLargeProps.push_back( LargeProperty( LargeProperty::PROPTYPE_GUID, getPropertyName(), 16, pValue ) );
+ maLargeProps.emplace_back( LargeProperty::PROPTYPE_GUID, getPropertyName(), 16, pValue );
}
void AxPropertyObjectBase::dumpStringProperty( OUString* pValue )
@@ -978,7 +978,7 @@ void AxPropertyObjectBase::dumpStringProperty( OUString* pValue )
{
alignInput< sal_uInt32 >();
sal_uInt32 nLen = dumpHex< sal_uInt32 >( getPropertyName(), "AX-STRINGLEN" );
- maLargeProps.push_back( LargeProperty( LargeProperty::PROPTYPE_STRING, getPropertyName(), nLen, pValue ) );
+ maLargeProps.emplace_back( LargeProperty::PROPTYPE_STRING, getPropertyName(), nLen, pValue );
}
}
@@ -988,7 +988,7 @@ void AxPropertyObjectBase::dumpStringArrayProperty()
{
alignInput< sal_uInt32 >();
sal_uInt32 nLen = dumpHex< sal_uInt32 >( getPropertyName(), "CONV-DEC" );
- maLargeProps.push_back( LargeProperty( LargeProperty::PROPTYPE_STRINGARRAY, getPropertyName(), nLen ) );
+ maLargeProps.emplace_back( LargeProperty::PROPTYPE_STRINGARRAY, getPropertyName(), nLen );
}
}
@@ -998,7 +998,7 @@ void AxPropertyObjectBase::dumpStreamProperty()
{
alignInput< sal_uInt16 >();
sal_uInt16 nData = dumpHex< sal_uInt16 >( getPropertyName() );
- maStreamProps.push_back( StreamProperty( getPropertyName(), nData ) );
+ maStreamProps.emplace_back( getPropertyName(), nData );
}
}
@@ -1495,7 +1495,7 @@ VbaFormClassInfoObject::VbaFormClassInfoObject( const InputObjectBase& rParent,
void VbaFormClassInfoObject::implDumpShortProperties()
{
- mrFormData.maClassInfoProgIds.push_back( OUString() );
+ mrFormData.maClassInfoProgIds.emplace_back( );
dumpGuidProperty( &mrFormData.maClassInfoProgIds.back() );
dumpGuidProperty();
dumpUnknownProperty();
diff --git a/oox/source/export/chartexport.cxx b/oox/source/export/chartexport.cxx
index f0536a1cbfaf..60bdc4d8c6c7 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -1540,7 +1540,7 @@ std::vector<Sequence<Reference<chart2::XDataSeries> > > splitDataSeriesByAxis(co
auto it = aMapAxisToIndex.find(nAxisIndex);
if (it == aMapAxisToIndex.end())
{
- aSplitSeries.push_back(Sequence<Reference<chart2::XDataSeries> >());
+ aSplitSeries.emplace_back();
nVectorPos = aSplitSeries.size() - 1;
aMapAxisToIndex.insert(std::pair<sal_Int32, size_t>(nAxisIndex, nVectorPos));
}
@@ -3075,8 +3075,8 @@ void ChartExport::exportAxesId(bool bPrimaryAxes)
sal_Int32 nAxisIdy = lcl_generateRandomValue();
AxesType eXAxis = bPrimaryAxes ? AXIS_PRIMARY_X : AXIS_SECONDARY_X;
AxesType eYAxis = bPrimaryAxes ? AXIS_PRIMARY_Y : AXIS_SECONDARY_Y;
- maAxes.push_back( AxisIdPair( eXAxis, nAxisIdx, nAxisIdy ) );
- maAxes.push_back( AxisIdPair( eYAxis, nAxisIdy, nAxisIdx ) );
+ maAxes.emplace_back( eXAxis, nAxisIdx, nAxisIdy );
+ maAxes.emplace_back( eYAxis, nAxisIdy, nAxisIdx );
FSHelperPtr pFS = GetFS();
pFS->singleElement( FSNS( XML_c, XML_axId ),
XML_val, I32S( nAxisIdx ),
@@ -3090,7 +3090,7 @@ void ChartExport::exportAxesId(bool bPrimaryAxes)
if( isDeep3dChart() )
{
nAxisIdz = lcl_generateRandomValue();
- maAxes.push_back( AxisIdPair( AXIS_PRIMARY_Z, nAxisIdz, nAxisIdy ) );
+ maAxes.emplace_back( AXIS_PRIMARY_Z, nAxisIdz, nAxisIdy );
}
pFS->singleElement( FSNS( XML_c, XML_axId ),
XML_val, I32S( nAxisIdz ),
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 990525681c49..955f15894dfa 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -702,14 +702,14 @@ void lcl_AnalyzeHandles( const uno::Sequence<beans::PropertyValues> & rHandles,
// For polar handles, nXPosition is radius and nYPosition is angle
lcl_GetHandlePosition( nXPosition, aPosition.First , rSeq );
lcl_GetHandlePosition( nYPosition, aPosition.Second, rSeq );
- rHandlePositionList.push_back( std::pair<sal_Int32, sal_Int32> ( nXPosition, nYPosition ) );
+ rHandlePositionList.emplace_back( nXPosition, nYPosition );
}
}
}
void lcl_AppendAdjustmentValue( std::vector< std::pair< sal_Int32, sal_Int32> > &rAvList, sal_Int32 nAdjIdx, sal_Int32 nValue )
{
- rAvList.push_back( std::pair<sal_Int32, sal_Int32> ( nAdjIdx , nValue ) );
+ rAvList.emplace_back( nAdjIdx , nValue );
}
sal_Int32 lcl_NormalizeAngle( sal_Int32 nAngle )
diff --git a/oox/source/mathml/importutils.cxx b/oox/source/mathml/importutils.cxx
index 77f5ec94b84f..af3efdc8caef 100644
--- a/oox/source/mathml/importutils.cxx
+++ b/oox/source/mathml/importutils.cxx
@@ -320,17 +320,17 @@ void XmlStream::handleUnexpectedTag()
void XmlStreamBuilder::appendOpeningTag( int token, const uno::Reference< xml::sax::XFastAttributeList >& attrs )
{
- tags.push_back( Tag( OPENING( token ), attrs ));
+ tags.emplace_back( OPENING( token ), attrs );
}
void XmlStreamBuilder::appendOpeningTag( int token, const AttributeList& attrs )
{
- tags.push_back( Tag( OPENING( token ), attrs ));
+ tags.emplace_back( OPENING( token ), attrs );
}
void XmlStreamBuilder::appendClosingTag( int token )
{
- tags.push_back( Tag( CLOSING( token )));
+ tags.emplace_back( CLOSING( token ));
}
void XmlStreamBuilder::appendCharacters( const OUString& chars )
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 8e2b87634ce4..efe55b582eeb 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -2405,7 +2405,7 @@ bool AxContainerModelBase::importClassTable( BinaryInputStream& rInStrm, AxClass
sal_uInt16 nCount = rInStrm.readuInt16();
for( sal_uInt16 nIndex = 0; bValid && (nIndex < nCount); ++nIndex )
{
- orClassTable.push_back( OUString() );
+ orClassTable.emplace_back( );
AxBinaryPropertyReader aReader( rInStrm );
aReader.readGuidProperty( orClassTable.back() );
aReader.skipGuidProperty(); // source interface GUID
diff --git a/oox/source/ppt/conditioncontext.cxx b/oox/source/ppt/conditioncontext.cxx
index 2b6aca2c42a3..160dcd047440 100644
--- a/oox/source/ppt/conditioncontext.cxx
+++ b/oox/source/ppt/conditioncontext.cxx
@@ -172,7 +172,7 @@ namespace oox { namespace ppt {
{
case PPT_TOKEN( cond ):
// add a condition to the list
- maConditions.push_back( AnimationCondition() );
+ maConditions.emplace_back( );
return new CondContext( *this, rAttribs.getFastAttributeList(), mpNode, maConditions.back() );
default:
break;
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index 9d6fcf16aa99..91772a22ba1b 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -204,7 +204,7 @@ SlideFragmentHandler::~SlideFragmentHandler()
mpSlidePersistPtr->getCommentsList().cmLst.back().setText( getCharVector().back() );
}
// insert a new comment in vector commentsList
- mpSlidePersistPtr->getCommentsList().cmLst.push_back(Comment());
+ mpSlidePersistPtr->getCommentsList().cmLst.emplace_back();
mpSlidePersistPtr->getCommentsList().cmLst.back().setAuthorId(rAttribs.getString(XML_authorId, OUString()));
mpSlidePersistPtr->getCommentsList().cmLst.back().setdt(rAttribs.getString(XML_dt, OUString()));
mpSlidePersistPtr->getCommentsList().cmLst.back().setidx(rAttribs.getString(XML_idx, OUString()));
diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx
index e2b4583ff7a2..86443dd5c298 100644
--- a/oox/source/vml/vmlformatting.cxx
+++ b/oox/source/vml/vmlformatting.cxx
@@ -305,8 +305,8 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
LINE_REL, LINE_ABS, CLOSE, END, UNSUPPORTED };
VML_State state = START;
- rPointLists.push_back( ::std::vector< Point>() );
- rFlagLists.push_back( ::std::vector< PolygonFlags >() );
+ rPointLists.emplace_back( );
+ rFlagLists.emplace_back( );
for ( sal_Int32 i = 0; i < rPath.getLength(); i++ )
{
@@ -340,10 +340,10 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
case MOVE_REL: // 2* params -> param count reset
if ( rPointLists.size() > 0 && rPointLists.back().size() > 0 )
{
- rPointLists.push_back( ::std::vector< Point >() );
- rFlagLists.push_back( ::std::vector< PolygonFlags >() );
+ rPointLists.emplace_back( );
+ rFlagLists.emplace_back( );
}
- rPointLists.back().push_back( Point( aCoordList[ 0 ], aCoordList[ 1 ] ) );
+ rPointLists.back().emplace_back( aCoordList[ 0 ], aCoordList[ 1 ] );
rFlagLists.back().push_back( PolygonFlags_NORMAL );
aCurrentPoint = rPointLists.back().back();
nParamCount = 2;
@@ -352,21 +352,21 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
case MOVE_ABS: // 2 params -> no param count reset
if ( rPointLists.size() > 0 && rPointLists.back().size() > 0 )
{
- rPointLists.push_back( ::std::vector< Point >() );
- rFlagLists.push_back( ::std::vector< PolygonFlags >() );
+ rPointLists.emplace_back( );
+ rFlagLists.emplace_back( );
}
- rPointLists.back().push_back( Point( (aCoordList[ 0 ]), (aCoordList.size() > 1 ? aCoordList[ 1 ] : 0) ) );
+ rPointLists.back().emplace_back( (aCoordList[ 0 ]), (aCoordList.size() > 1 ? aCoordList[ 1 ] : 0) );
rFlagLists.back().push_back( PolygonFlags_NORMAL );
aCurrentPoint = rPointLists.back().back();
break;
case BEZIER_REL: // 6* params -> param count reset
- rPointLists.back().push_back( Point( aCurrentPoint.X + aCoordList[ 0 ],
- aCurrentPoint.Y + aCoordList[ 1 ] ) );
- rPointLists.back().push_back( Point( aCurrentPoint.X + aCoordList[ 2 ],
- aCurrentPoint.Y + aCoordList[ 3 ] ) );
- rPointLists.back().push_back( Point( aCurrentPoint.X + aCoordList[ 4 ],
- aCurrentPoint.Y + aCoordList[ 5 ] ) );
+ rPointLists.back().emplace_back( aCurrentPoint.X + aCoordList[ 0 ],
+ aCurrentPoint.Y + aCoordList[ 1 ] );
+ rPointLists.back().emplace_back( aCurrentPoint.X + aCoordList[ 2 ],
+ aCurrentPoint.Y + aCoordList[ 3 ] );
+ rPointLists.back().emplace_back( aCurrentPoint.X + aCoordList[ 4 ],
+ aCurrentPoint.Y + aCoordList[ 5 ] );
rFlagLists.back().push_back( PolygonFlags_CONTROL );
rFlagLists.back().push_back( PolygonFlags_CONTROL );
rFlagLists.back().push_back( PolygonFlags_NORMAL );
@@ -375,9 +375,9 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
break;
case BEZIER_ABS: // 6* params -> param count reset
- rPointLists.back().push_back( Point( aCoordList[ 0 ], aCoordList[ 1 ] ) );
- rPointLists.back().push_back( Point( aCoordList[ 2 ], aCoordList[ 3 ] ) );
- rPointLists.back().push_back( Point( aCoordList[ 4 ], aCoordList[ 5 ] ) );
+ rPointLists.back().emplace_back( aCoordList[ 0 ], aCoordList[ 1 ] );
+ rPointLists.back().emplace_back( aCoordList[ 2 ], aCoordList[ 3 ] );
+ rPointLists.back().emplace_back( aCoordList[ 4 ], aCoordList[ 5 ] );
rFlagLists.back().push_back( PolygonFlags_CONTROL );
rFlagLists.back().push_back( PolygonFlags_CONTROL );
rFlagLists.back().push_back( PolygonFlags_NORMAL );
@@ -386,15 +386,15 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
break;
case LINE_REL: // 2* params -> param count reset
- rPointLists.back().push_back( Point( aCurrentPoint.X + aCoordList[ 0 ],
- aCurrentPoint.Y + aCoordList[ 1 ] ) );
+ rPointLists.back().emplace_back( aCurrentPoint.X + aCoordList[ 0 ],
+ aCurrentPoint.Y + aCoordList[ 1 ] );
rFlagLists.back().push_back( PolygonFlags_NORMAL );
aCurrentPoint = rPointLists.back().back();
nParamCount = 2;
break;
case LINE_ABS: // 2* params -> param count reset
- rPointLists.back().push_back( Point( aCoordList[ 0 ], (aCoordList.size() > 1 ? aCoordList[ 1 ] : 0) ) );
+ rPointLists.back().emplace_back( aCoordList[ 0 ], (aCoordList.size() > 1 ? aCoordList[ 1 ] : 0) );
rFlagLists.back().push_back( PolygonFlags_NORMAL );
aCurrentPoint = rPointLists.back().back();
nParamCount = 2;
@@ -411,8 +411,8 @@ void ConversionHelper::decodeVmlPath( ::std::vector< ::std::vector< Point > >& r
break;
case END: // 0 param
- rPointLists.push_back( ::std::vector< Point >() );
- rFlagLists.push_back( ::std::vector< PolygonFlags >() );
+ rPointLists.emplace_back( );
+ rFlagLists.emplace_back( );
break;
case START:
@@ -559,7 +559,7 @@ void lclGetDmlLineDash( OptValue< sal_Int32 >& oroPresetDash, LineProperties::Da
aValues.push_back( rDashStyle.getToken( 0, ' ', nIndex ).toInt32() );
size_t nPairs = aValues.size() / 2; // ignore last value if size is odd
for( size_t nPairIdx = 0; nPairIdx < nPairs; ++nPairIdx )
- orCustomDash.push_back( LineProperties::DashStop( aValues[ 2 * nPairIdx ], aValues[ 2 * nPairIdx + 1 ] ) );
+ orCustomDash.emplace_back( aValues[ 2 * nPairIdx ], aValues[ 2 * nPairIdx + 1 ] );
}
}
}
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index d6a14caf16b5..420b92f595cc 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -1019,25 +1019,25 @@ Reference< XShape > BezierShape::implConvertAndInsert( const Reference< XShapes
// Curve defined by to, from, control1 and control2 attributes
if ( maShapeModel.maVmlPath.isEmpty() )
{
- aCoordLists.push_back( ::std::vector< awt::Point >() );
- aFlagLists.push_back( ::std::vector< PolygonFlags >() );
+ aCoordLists.emplace_back( );
+ aFlagLists.emplace_back( );
// Start point
- aCoordLists[ 0 ].push_back(
- awt::Point(ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maFrom.getToken( 0, ',', nIndex ), 0, true, true ),
- ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maFrom.getToken( 0, ',', nIndex ), 0, false, true ) ) );
+ aCoordLists[ 0 ].emplace_back(
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maFrom.getToken( 0, ',', nIndex ), 0, true, true ),
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maFrom.getToken( 0, ',', nIndex ), 0, false, true ) );
// Control point 1
- aCoordLists[ 0 ].push_back(
- awt::Point( ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maControl1.getToken( 0, ',', nIndex ), 0, true, true ),
- ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maControl1.getToken( 0, ',', nIndex ), 0, false, true ) ) );
+ aCoordLists[ 0 ].emplace_back(
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maControl1.getToken( 0, ',', nIndex ), 0, true, true ),
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maControl1.getToken( 0, ',', nIndex ), 0, false, true ) );
// Control point 2
- aCoordLists[ 0 ].push_back(
- awt::Point( ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maControl2.getToken( 0, ',', nIndex ), 0, true, true ),
- ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maControl2.getToken( 0, ',', nIndex ), 0, false, true ) ) );
+ aCoordLists[ 0 ].emplace_back(
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maControl2.getToken( 0, ',', nIndex ), 0, true, true ),
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maControl2.getToken( 0, ',', nIndex ), 0, false, true ) );
// End point
- aCoordLists[ 0 ].push_back(
- awt::Point( ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maTo.getToken( 0, ',', nIndex ), 0, true, true ),
- ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maTo.getToken( 0, ',', nIndex ), 0, false, true ) ) );
+ aCoordLists[ 0 ].emplace_back(
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maTo.getToken( 0, ',', nIndex ), 0, true, true ),
+ ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maShapeModel.maTo.getToken( 0, ',', nIndex ), 0, false, true ) );
// First and last points are normals, points 2 and 4 are controls
aFlagLists[ 0 ].resize( aCoordLists[ 0 ].size(), PolygonFlags_CONTROL );
diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx
index 4ddd8c5d8e0a..84185d40ecfd 100644
--- a/oox/source/vml/vmlshapecontext.cxx
+++ b/oox/source/vml/vmlshapecontext.cxx
@@ -501,7 +501,7 @@ void ShapeContext::setPoints( const OUString& rPoints )
{
sal_Int32 nX = rPoints.getToken( 0, ',', nIndex ).toInt32();
sal_Int32 nY = rPoints.getToken( 0, ',', nIndex ).toInt32();
- mrShapeModel.maPoints.push_back( awt::Point( nX, nY ) );
+ mrShapeModel.maPoints.emplace_back( nX, nY );
}
}
diff --git a/oox/source/vml/vmltextbox.cxx b/oox/source/vml/vmltextbox.cxx
index cfa07b0546db..810b7fd7cc46 100644
--- a/oox/source/vml/vmltextbox.cxx
+++ b/oox/source/vml/vmltextbox.cxx
@@ -57,7 +57,7 @@ TextBox::TextBox(ShapeTypeModel& rTypeModel)
void TextBox::appendPortion( const TextParagraphModel& rParagraph, const TextFontModel& rFont, const OUString& rText )
{
- maPortions.push_back( TextPortionModel( rParagraph, rFont, rText ) );
+ maPortions.emplace_back( rParagraph, rFont, rText );
}
const TextFontModel* TextBox::getFirstFont() const