diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-11 16:41:56 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-12 08:03:01 +0200 |
commit | baa5f32c21185025b64c01fc589c69961528b0c5 (patch) | |
tree | 74cac2c06c169986ca89c446fd69c745305bcc82 /oox/source/drawingml/textfield.cxx | |
parent | 7e2a6709d9511f983f9981258c38ccc125bcd3fe (diff) |
clang-tidy modernize-use-emplace in oox
Change-Id: I9ea063b7f6c63ae1ad039859efeebb292d44c6e2
Reviewed-on: https://gerrit.libreoffice.org/42172
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox/source/drawingml/textfield.cxx')
-rw-r--r-- | oox/source/drawingml/textfield.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
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 ); } } |