[Libreoffice-commits] core.git: include/sfx2 sfx2/source
Xisco Fauli
anistenis at gmail.com
Thu May 26 13:38:30 UTC 2016
include/sfx2/sfxhelp.hxx | 3 ++-
sfx2/source/appl/sfxhelp.cxx | 5 +----
2 files changed, 3 insertions(+), 5 deletions(-)
New commits:
commit 859773200c59aa59f9a8e7ea589e9896ce2da6e5
Author: Xisco Fauli <anistenis at gmail.com>
Date: Sun May 22 16:05:29 2016 +0200
tdf#89329: use unique_ptr for pImpl in sfxhelp
Change-Id: I357b53f644384452c5dc2b74d3aba3d3dafae00e
Reviewed-on: https://gerrit.libreoffice.org/25314
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx
index 5a4675e..aee749c 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 9b46a53..2225386 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()
More information about the Libreoffice-commits
mailing list