diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-06-15 19:34:52 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-16 06:53:57 +0000 |
commit | 2d2ef979c2feb8cd70a1dbc3f47cf7f86a5d39ea (patch) | |
tree | 93b4cdea56bd00cd677cea05485f922620e00098 /include | |
parent | dad8d71f4a73b64e534c1977e09e54905b8e27e8 (diff) |
tdf#89329: use shared_ptr for pImpl in menuoptions
Change-Id: I93ece349dc15ea9af00c661ac34fed80a57ea3d2
Reviewed-on: https://gerrit.libreoffice.org/26318
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/svtools/menuoptions.hxx | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/include/svtools/menuoptions.hxx b/include/svtools/menuoptions.hxx index e59f6a873a7f..64bdc735f625 100644 --- a/include/svtools/menuoptions.hxx +++ b/include/svtools/menuoptions.hxx @@ -25,6 +25,7 @@ #include <tools/link.hxx> #include <osl/mutex.hxx> #include <unotools/options.hxx> +#include <memory> /*-************************************************************************************************************ @short forward declaration to our private date container implementation @@ -43,18 +44,6 @@ class SvtMenuOptions_Impl; class SAL_WARN_UNUSED SVT_DLLPUBLIC SvtMenuOptions: public utl::detail::Options { 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 - *//*-*****************************************************************************************************/ - SvtMenuOptions(); virtual ~SvtMenuOptions(); @@ -91,17 +80,7 @@ class SAL_WARN_UNUSED SVT_DLLPUBLIC SvtMenuOptions: public utl::detail::Options SVT_DLLPRIVATE static ::osl::Mutex& GetOwnStaticMutex(); 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 SvtMenuOptions_Impl* m_pDataContainer ; - static sal_Int32 m_nRefCount ; + std::shared_ptr<SvtMenuOptions_Impl> m_pImpl; }; // class SvtMenuOptions |