diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-05-22 16:05:29 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-26 13:38:04 +0000 |
commit | 859773200c59aa59f9a8e7ea589e9896ce2da6e5 (patch) | |
tree | 8aa62a8e2022ab5dada4e3766510ed3043ad5001 | |
parent | f90b77d0f27294b00ceb58b21f4d644fa84a3289 (diff) |
tdf#89329: use unique_ptr for pImpl in sfxhelp
Change-Id: I357b53f644384452c5dc2b74d3aba3d3dafae00e
Reviewed-on: https://gerrit.libreoffice.org/25314
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
-rw-r--r-- | include/sfx2/sfxhelp.hxx | 3 | ||||
-rw-r--r-- | sfx2/source/appl/sfxhelp.cxx | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx index 5a4675e221fc..aee749cc6220 100644 --- a/include/sfx2/sfxhelp.hxx +++ b/include/sfx2/sfxhelp.hxx @@ -24,13 +24,14 @@ #include <sfx2/dllapi.h> #include <sal/types.h> #include <vcl/help.hxx> +#include <memory> class SfxHelp_Impl; class SfxFrame; class SFX2_DLLPUBLIC SfxHelp : public Help { bool bIsDebug; - SfxHelp_Impl* pImp; + std::unique_ptr< SfxHelp_Impl > pImpl; private: SAL_DLLPRIVATE bool Start_Impl( const OUString& rURL, const vcl::Window* pWindow, const OUString& rKeyword ); diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 9b46a53c35a1..22253868af2c 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -218,7 +218,7 @@ OUString SfxHelp_Impl::GetHelpText( const OUString& aCommandURL, const OUString& SfxHelp::SfxHelp() : bIsDebug( false ), - pImp ( nullptr ) + pImpl( new SfxHelp_Impl ) { // read the environment variable "HELP_DEBUG" // if it's set, you will see debug output on active help @@ -228,13 +228,10 @@ SfxHelp::SfxHelp() : osl_getEnvironment( sEnvVarName.pData, &sHelpDebug.pData ); bIsDebug = !sHelpDebug.isEmpty(); } - - pImp = new SfxHelp_Impl(); } SfxHelp::~SfxHelp() { - delete pImp; } OUString getDefaultModule_Impl() |