summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-06-15 20:41:11 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-16 06:40:55 +0000
commitf698ddfeffda7391965b7bb8b488420332ac37bf (patch)
tree347dec01300b4416d0481fb7be4104a8f0555867 /include
parentc0d9642b4df485c32350cdc7a16084a2eac2cbf7 (diff)
tdf#89329: use shared_ptr for pImpl in miscopt
Change-Id: I7c60116d4f14e1451e7b96568104baada01dfaca Reviewed-on: https://gerrit.libreoffice.org/26330 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/svtools/miscopt.hxx24
1 files changed, 2 insertions, 22 deletions
diff --git a/include/svtools/miscopt.hxx b/include/svtools/miscopt.hxx
index 31b745fb92f3..80835a9058e7 100644
--- a/include/svtools/miscopt.hxx
+++ b/include/svtools/miscopt.hxx
@@ -25,6 +25,7 @@
#include <osl/mutex.hxx>
#include <rtl/ustring.hxx>
#include <unotools/options.hxx>
+#include <memory>
/*-************************************************************************************************************
@short forward declaration to our private date container implementation
@@ -45,17 +46,6 @@ class SvtMiscOptions_Impl;
class SVT_DLLPUBLIC SvtMiscOptions: 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
- *//*-*****************************************************************************************************/
-
SvtMiscOptions();
virtual ~SvtMiscOptions();
@@ -108,17 +98,7 @@ class SVT_DLLPUBLIC SvtMiscOptions: public utl::detail::Options
SVT_DLLPRIVATE static ::osl::Mutex& GetInitMutex();
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 SvtMiscOptions_Impl* m_pDataContainer ;
- static sal_Int32 m_nRefCount ;
+ std::shared_ptr<SvtMiscOptions_Impl> m_pImpl;
}; // class SvtMiscOptions