summaryrefslogtreecommitdiff
path: root/oox/source/ole/vbaproject.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 08:31:14 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 08:27:40 +0100
commit09d56ba6d907199b124929272db9b5f61e0bb2d9 (patch)
tree98189ed1cd71f3311a80c8d008b66ec491d642f6 /oox/source/ole/vbaproject.cxx
parentd4ed6ff5c1d0638dd46d3a2272c5c54b9700551f (diff)
loplugin:makeshared in oox
Change-Id: I6502e7be4881834b143ec7207c432881b2ae263c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87322 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox/source/ole/vbaproject.cxx')
-rw-r--r--oox/source/ole/vbaproject.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/oox/source/ole/vbaproject.cxx b/oox/source/ole/vbaproject.cxx
index d53fa0780e0c..cf9ad880ed9a 100644
--- a/oox/source/ole/vbaproject.cxx
+++ b/oox/source/ole/vbaproject.cxx
@@ -326,7 +326,7 @@ void VbaProject::readVbaModules( StorageBase& rVbaPrjStrg )
OSL_ENSURE( !aName.isEmpty(), "VbaProject::importVba - invalid module name" );
OSL_ENSURE( !maModules.has( aName ), "VbaProject::importVba - multiple modules with the same name" );
VbaModuleMap::mapped_type& rxModule = maModules[ aName ];
- rxModule.reset( new VbaModule( mxContext, mxDocModel, aName, eTextEnc, bExecutable ) );
+ rxModule = std::make_shared<VbaModule>( mxContext, mxDocModel, aName, eTextEnc, bExecutable );
// read all remaining records until the MODULEEND record
rxModule->importDirRecords( aDirStrm );
OSL_ENSURE( !maModulesByStrm.has( rxModule->getStreamName() ), "VbaProject::importVba - multiple modules with the same stream name" );
@@ -435,7 +435,7 @@ void VbaProject::importModulesAndForms( StorageBase& rVbaPrjStrg, const GraphicH
{
OSL_ENSURE( !maModules.has( dummyModule.first ) && !aDummyModules.has( dummyModule.first ), "VbaProject::importVba - multiple modules with the same name" );
VbaModuleMap::mapped_type& rxModule = aDummyModules[ dummyModule.first ];
- rxModule.reset( new VbaModule( mxContext, mxDocModel, dummyModule.first, eTextEnc, bExecutable ) );
+ rxModule = std::make_shared<VbaModule>( mxContext, mxDocModel, dummyModule.first, eTextEnc, bExecutable );
rxModule->setType( dummyModule.second );
}