summaryrefslogtreecommitdiff
path: root/include/unotools
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2016-06-15 19:49:05 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-06-16 06:44:31 +0000
commit6cf574071e83663f8e1bcf70b0135a6258788a29 (patch)
treea3dbcb480a099f369ff1b57fdccbc926676b7212 /include/unotools
parent11c2acfa5a837b7d1fff31e20a87eddbba08f742 (diff)
tdf#89329: use shared_ptr for pImpl in cmdoptions
Change-Id: Ie6297cf8c26964a6c7cc017c1257c61825c2c791 Reviewed-on: https://gerrit.libreoffice.org/26320 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include/unotools')
-rw-r--r--include/unotools/cmdoptions.hxx24
1 files changed, 2 insertions, 22 deletions
diff --git a/include/unotools/cmdoptions.hxx b/include/unotools/cmdoptions.hxx
index 8e0b48782f4e..b5d0ad854893 100644
--- a/include/unotools/cmdoptions.hxx
+++ b/include/unotools/cmdoptions.hxx
@@ -25,6 +25,7 @@
#include <com/sun/star/frame/XFrame.hpp>
#include <rtl/ustring.hxx>
#include <unotools/options.hxx>
+#include <memory>
/*-************************************************************************************************************
@descr The method GetList() returns a list of property values.
@@ -58,17 +59,6 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtCommandOptions : public utl::detail:
CMDOPTION_NONE
};
- /*-****************************************************************************************************
- @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
- *//*-*****************************************************************************************************/
-
SvtCommandOptions();
virtual ~SvtCommandOptions();
@@ -121,17 +111,7 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtCommandOptions : public utl::detail:
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 SvtCommandOptions_Impl* m_pDataContainer;
- static sal_Int32 m_nRefCount;
+ std::shared_ptr<SvtCommandOptions_Impl> m_pImpl;
}; // class SvtCmdOptions