diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-06-15 01:20:36 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-16 06:53:06 +0000 |
commit | dad8d71f4a73b64e534c1977e09e54905b8e27e8 (patch) | |
tree | 06b617112f58334b74db4c6679be1a0c7e0e9df2 /include/svtools | |
parent | 94d2b31d984382ba76c623236f6daf678204844a (diff) |
tdf#89329: use shared_ptr for pImpl in toolpanelopt
Change-Id: I2035971f6633aed1389ffae5815c7000699b9735
Reviewed-on: https://gerrit.libreoffice.org/26279
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/svtools')
-rw-r--r-- | include/svtools/toolpanelopt.hxx | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/include/svtools/toolpanelopt.hxx b/include/svtools/toolpanelopt.hxx index 8fcda683e36f..2480e2e0d8e5 100644 --- a/include/svtools/toolpanelopt.hxx +++ b/include/svtools/toolpanelopt.hxx @@ -25,13 +25,8 @@ #include <osl/mutex.hxx> #include <rtl/ustring.hxx> #include <unotools/options.hxx> +#include <memory> -/** forward declaration to our private date container implementation - - We use these class as internal member to support small memory requirements. - You can create the container if it is necessary. The class which use these mechanism - is faster and smaller then a complete implementation! -*/ class SvtToolPanelOptions_Impl; /** collect information about sidebar group @@ -41,16 +36,6 @@ class SvtToolPanelOptions_Impl; class SVT_DLLPUBLIC SvtToolPanelOptions: public utl::detail::Options { public: - /** standard constructor and destructor - - 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 ... - - \sa member m_nRefCount - \sa member m_pDataContainer - */ SvtToolPanelOptions(); virtual ~SvtToolPanelOptions(); @@ -77,17 +62,7 @@ class SVT_DLLPUBLIC SvtToolPanelOptions: public utl::detail::Options SVT_DLLPRIVATE static ::osl::Mutex& GetInitMutex(); private: - - /** - \attention - Don't initialize these static members in these headers! - \li Double defined symbols will be detected ... - \li and unresolved externals exist at linking time. - Do it in your source only. - */ - static SvtToolPanelOptions_Impl* m_pDataContainer; - static sal_Int32 m_nRefCount; - + std::shared_ptr<SvtToolPanelOptions_Impl> m_pImpl; }; #endif |