diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-06-15 20:11:15 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-16 06:46:37 +0000 |
commit | 4c8ff754ea25a77476a31aec9a9214c30490f0ad (patch) | |
tree | cac01a01f29d3cda936601282c93e633121b4ca9 /include | |
parent | 3c31796bedc77dc55ee645987da0922c17162454 (diff) |
tdf#89329: use shared_ptr for pImpl in localisationoptions
Change-Id: I9b2f7f7e59a71c056608635773c4b4fb2120a902
Reviewed-on: https://gerrit.libreoffice.org/26323
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/unotools/localisationoptions.hxx | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/include/unotools/localisationoptions.hxx b/include/unotools/localisationoptions.hxx index ff183fe68766..cfd706a5b1fb 100644 --- a/include/unotools/localisationoptions.hxx +++ b/include/unotools/localisationoptions.hxx @@ -23,6 +23,7 @@ #include <unotools/unotoolsdllapi.h> #include <osl/mutex.hxx> #include <unotools/options.hxx> +#include <memory> /*-************************************************************************************************************ @short forward declaration to our private date container implementation @@ -41,17 +42,6 @@ class SvtLocalisationOptions_Impl; class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtLocalisationOptions : 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 - *//*-*****************************************************************************************************/ - SvtLocalisationOptions(); virtual ~SvtLocalisationOptions(); @@ -98,17 +88,7 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtLocalisationOptions : public utl::de UNOTOOLS_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 SvtLocalisationOptions_Impl* m_pDataContainer; - static sal_Int32 m_nRefCount; + std::shared_ptr<SvtLocalisationOptions_Impl> m_pImpl; }; // class SvtLocalisationOptions |