Kaydet (Commit) 232d0f4f authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in SwModule

Change-Id: I37f4df7d309e83b3232dab8268c3b7557b259ae8
Reviewed-on: https://gerrit.libreoffice.org/57869
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 07d0c305
...@@ -91,7 +91,7 @@ class SW_DLLPUBLIC SwModule final : public SfxModule, public SfxListener, public ...@@ -91,7 +91,7 @@ class SW_DLLPUBLIC SwModule final : public SfxModule, public SfxListener, public
SvtCTLOptions* m_pCTLOptions; SvtCTLOptions* m_pCTLOptions;
SvtUserOptions* m_pUserOptions; SvtUserOptions* m_pUserOptions;
SfxErrorHandler* m_pErrorHandler; std::unique_ptr<SfxErrorHandler> m_pErrorHandler;
SwAttrPool *m_pAttrPool; SwAttrPool *m_pAttrPool;
......
...@@ -171,10 +171,10 @@ SwModule::SwModule( SfxObjectFactory* pWebFact, ...@@ -171,10 +171,10 @@ SwModule::SwModule( SfxObjectFactory* pWebFact,
{ {
SetName( "StarWriter" ); SetName( "StarWriter" );
SvxErrorHandler::ensure(); SvxErrorHandler::ensure();
m_pErrorHandler = new SfxErrorHandler( RID_SW_ERRHDL, m_pErrorHandler.reset( new SfxErrorHandler( RID_SW_ERRHDL,
ErrCodeArea::Sw, ErrCodeArea::Sw,
ErrCodeArea::Sw, ErrCodeArea::Sw,
GetResLocale() ); GetResLocale() ) );
m_pModuleConfig = new SwModuleOptions; m_pModuleConfig = new SwModuleOptions;
...@@ -225,7 +225,7 @@ SwModule::~SwModule() ...@@ -225,7 +225,7 @@ SwModule::~SwModule()
{ {
css::uno::Sequence< css::uno::Any > aArgs; css::uno::Sequence< css::uno::Any > aArgs;
CallAutomationApplicationEventSinks( "Quit", aArgs ); CallAutomationApplicationEventSinks( "Quit", aArgs );
delete m_pErrorHandler; m_pErrorHandler.reset();
EndListening( *SfxGetpApp() ); EndListening( *SfxGetpApp() );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment