diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-06-15 01:57:25 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-21 08:04:09 +0000 |
commit | 5ee7d509e7c6d78e758286efb6145385a310cfa5 (patch) | |
tree | 75eec7c9445b5804a50d6bfeecc5348a28848016 /include/svtools | |
parent | 8a6bffd2fefcc81dc34951ba2e178d9938b59fb3 (diff) |
tdf#89329: use shared_ptr for pImpl in optionsdrawinglayer
Change-Id: Ic9da196c1dfe138ff6408a37fa8ff70492d00bc2
Reviewed-on: https://gerrit.libreoffice.org/26282
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/svtools')
-rw-r--r-- | include/svtools/optionsdrawinglayer.hxx | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/include/svtools/optionsdrawinglayer.hxx b/include/svtools/optionsdrawinglayer.hxx index 25951f671638..c096f48b78f4 100644 --- a/include/svtools/optionsdrawinglayer.hxx +++ b/include/svtools/optionsdrawinglayer.hxx @@ -25,6 +25,7 @@ #include <osl/mutex.hxx> #include <rtl/ustring.hxx> #include <tools/color.hxx> +#include <memory> /*-************************************************************************************************************ @short forward declaration to our private date container implementation @@ -44,17 +45,6 @@ class SVT_DLLPUBLIC SvtOptionsDrawinglayer { public: - /*-**************************************************************************************************** - @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 - *//*-*****************************************************************************************************/ - SvtOptionsDrawinglayer(); ~SvtOptionsDrawinglayer(); @@ -140,17 +130,7 @@ class SVT_DLLPUBLIC SvtOptionsDrawinglayer *//*-*****************************************************************************************************/ SVT_DLLPRIVATE static ::osl::Mutex& GetOwnStaticMutex(); - /*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 SvtOptionsDrawinglayer_Impl* m_pDataContainer ; - static sal_Int32 m_nRefCount ; - + std::shared_ptr<SvtOptionsDrawinglayer_Impl> m_pImpl; }; #endif // #ifndef INCLUDED_SVTOOLS_OPTIONSDRAWINGLAYER_HXX |