diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-10 12:30:24 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-10 13:07:41 +0100 |
commit | 175a2063effa1c5a3eab896c6c4b0d07f3588edb (patch) | |
tree | 4a252a7e9e6e714343e9ff21c3d78c8e41086009 /xmloff | |
parent | ddf901664d3dd12191f98b77182652a6889f2b26 (diff) |
use more std::make_shared
found using 'git grep', I tried using clang-tidy, but it only
successfully found a tiny fraction of these
Change-Id: I61c7d85105ff7a911722750e759d6641d578da33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86526
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/table/XMLTableExport.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/table/XMLTableImport.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx index 2b9480a96842..db34766a09cb 100644 --- a/xmloff/source/table/XMLTableExport.cxx +++ b/xmloff/source/table/XMLTableExport.cxx @@ -209,7 +209,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates ) if( !mbExportTables ) return; - std::shared_ptr< XMLTableInfo > xTableInfo( new XMLTableInfo ); + auto xTableInfo = std::make_shared<XMLTableInfo>(); maTableInfoMap[xColumnRowRange] = xTableInfo; try diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx index 0da1812c7d58..6caa85c9afbb 100644 --- a/xmloff/source/table/XMLTableImport.cxx +++ b/xmloff/source/table/XMLTableImport.cxx @@ -237,7 +237,7 @@ SvXMLStyleContext* XMLTableImport::CreateTableTemplateContext( sal_uInt16 nPrfx, void XMLTableImport::addTableTemplate( const OUString& rsStyleName, XMLTableTemplate& xTableTemplate ) { - std::shared_ptr< XMLTableTemplate > xPtr( new XMLTableTemplate ); + auto xPtr = std::make_shared<XMLTableTemplate>(); xPtr->swap( xTableTemplate ); maTableTemplates[rsStyleName] = xPtr; } @@ -370,7 +370,7 @@ SvXMLImportContextRef XMLTableImportContext::ImportColumn( sal_uInt16 nPrefix, c { if( mxColumns.is() && (mnCurrentRow == -1) ) try { - std::shared_ptr< ColumnInfo > xInfo ( new ColumnInfo ); + auto xInfo = std::make_shared<ColumnInfo>(); sal_Int32 nRepeated = 1; |