summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-06-15 20:18:38 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-16 06:42:00 +0000
commit912f14c4e5c7db2a3acc0ae75995114ddfb12dea (patch)
treebce9a764f5f4fc4b3dd7afebdd890f77bf28b4a8 /include
parentf698ddfeffda7391965b7bb8b488420332ac37bf (diff)
tdf#89329: use shared_ptr for pImpl in fontoptions
Change-Id: I844f23d7674fe6e564575b150ba1f94754da4d3b Reviewed-on: https://gerrit.libreoffice.org/26325 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/unotools/fontoptions.hxx24
1 files changed, 2 insertions, 22 deletions
diff --git a/include/unotools/fontoptions.hxx b/include/unotools/fontoptions.hxx
index 51e349fdc159..82e98d06505a 100644
--- a/include/unotools/fontoptions.hxx
+++ b/include/unotools/fontoptions.hxx
@@ -24,6 +24,7 @@
#include <osl/mutex.hxx>
#include <rtl/ustring.hxx>
#include <unotools/options.hxx>
+#include <memory>
/*-************************************************************************************************************
@short forward declaration to our private date container implementation
@@ -42,17 +43,6 @@ class SvtFontOptions_Impl;
class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtFontOptions : 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
- *//*-*****************************************************************************************************/
-
SvtFontOptions();
virtual ~SvtFontOptions();
@@ -87,17 +77,7 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtFontOptions : public utl::detail::Op
UNOTOOLS_DLLPRIVATE static ::osl::Mutex& impl_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 SvtFontOptions_Impl* m_pDataContainer;
- static sal_Int32 m_nRefCount;
+ std::shared_ptr<SvtFontOptions_Impl> m_pImpl;
}; // class SvtFontOptions