diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-06-15 20:22:29 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-16 06:42:43 +0000 |
commit | 2400c271748f85355b689391d3aec405fcf3bff7 (patch) | |
tree | 11909e8b8a90ec6ccf2ec4fbe8f4a978361a2c8f /include | |
parent | 912f14c4e5c7db2a3acc0ae75995114ddfb12dea (diff) |
tdf#89329: use shared_ptr for pImpl in extendedsecurityoptions
Change-Id: I3d344c4872bbed9527f254a4eabc48534e38452f
Reviewed-on: https://gerrit.libreoffice.org/26326
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/unotools/extendedsecurityoptions.hxx | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/include/unotools/extendedsecurityoptions.hxx b/include/unotools/extendedsecurityoptions.hxx index 070e377c8dfc..8726c72ad79d 100644 --- a/include/unotools/extendedsecurityoptions.hxx +++ b/include/unotools/extendedsecurityoptions.hxx @@ -24,6 +24,7 @@ #include <osl/mutex.hxx> #include <rtl/ustring.hxx> #include <unotools/options.hxx> +#include <memory> /*-************************************************************************************************************ @short forward declaration to our private date container implementation @@ -52,17 +53,6 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtExtendedSecurityOptions : public utl OPEN_ALWAYS }; - /*-**************************************************************************************************** - @short standard constructor and destructor - @descr This will initialize an instance with default values. - We implement these class with a refcount mechanism! Every instance of this class increase it - at create and decrease it at delete time - but all instances use the same data container! - He is implemented as a static member ... - - @seealso member m_nRefCount - @seealso member m_pDataContainer - *//*-*****************************************************************************************************/ - SvtExtendedSecurityOptions(); virtual ~SvtExtendedSecurityOptions(); @@ -83,17 +73,7 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtExtendedSecurityOptions : public utl // private member private: - - /*Attention - - Don't initialize these static members in these headers! - a) Double defined symbols will be detected ... - b) and unresolved externals exist at linking time. - Do it in your source only. - */ - - static SvtExtendedSecurityOptions_Impl* m_pDataContainer; - static sal_Int32 m_nRefCount; + std::shared_ptr<SvtExtendedSecurityOptions_Impl> m_pImpl; }; // class SvtExtendedSecurityOptions |