diff options
author | Xisco Fauli <anistenis@gmail.com> | 2016-06-14 01:53:10 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-06-14 11:19:26 +0000 |
commit | decc3bfae82ddde724b351d8c4618436d45e43fb (patch) | |
tree | e02cd9b49ee2afc11ca57cc4a87d79feaa8ab771 /include/unotools | |
parent | 7a60b2f3deaeced4352152525d1bb511a26b42bb (diff) |
tdf#89329: use shared_ptr for pImpl in compatibility...
... and remove some, at least from my point of view,
useless comments
Change-Id: Id97c90dd7764ae4569468abc73c79ae9b2a56e75
Reviewed-on: https://gerrit.libreoffice.org/26235
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/unotools')
-rw-r--r-- | include/unotools/compatibility.hxx | 37 |
1 files changed, 2 insertions, 35 deletions
diff --git a/include/unotools/compatibility.hxx b/include/unotools/compatibility.hxx index 85c88b8375ac..23a6367e9282 100644 --- a/include/unotools/compatibility.hxx +++ b/include/unotools/compatibility.hxx @@ -25,8 +25,7 @@ #include <com/sun/star/uno/Sequence.h> #include <com/sun/star/beans/PropertyValue.hpp> #include <unotools/options.hxx> - -// types, enums, ... +#include <memory> enum CompatibilityOptions { @@ -84,24 +83,7 @@ class SvtCompatibilityOptions_Impl; class UNOTOOLS_DLLPUBLIC SvtCompatibilityOptions: public utl::detail::Options { - - // public methods - public: - - // constructor / destructor - - /*-**************************************************************************************************** - @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 - *//*-*****************************************************************************************************/ - SvtCompatibilityOptions(); virtual ~SvtCompatibilityOptions(); @@ -164,8 +146,6 @@ class UNOTOOLS_DLLPUBLIC SvtCompatibilityOptions: public utl::detail::Options bool IsConsiderWrappingStyle() const; bool IsExpandWordSpace() const; - // private methods - private: /*-**************************************************************************************************** @@ -178,20 +158,7 @@ class UNOTOOLS_DLLPUBLIC SvtCompatibilityOptions: public utl::detail::Options UNOTOOLS_DLLPRIVATE static ::osl::Mutex& GetOwnStaticMutex(); - // private member - - 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 SvtCompatibilityOptions_Impl* m_pDataContainer; - static sal_Int32 m_nRefCount; + std::shared_ptr<SvtCompatibilityOptions_Impl> m_pImpl; }; // class SvtCompatibilityOptions |