diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-03-14 07:15:34 +0100 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-03-14 08:00:49 +0100 |
commit | 7cdf055109d75ce37611bd0c4f796d67614d93d2 (patch) | |
tree | 4bbb5638661b93eb377af1559d77d5c3842982da /sc/inc/textuno.hxx | |
parent | 82ed61ab269eca25c8bc22537327e812efe222bb (diff) |
use unique_ptr for memory owning ptr
Change-Id: I26efcebf750ff9947b936e990ce87ddbcb41b7ba
Diffstat (limited to 'sc/inc/textuno.hxx')
-rw-r--r-- | sc/inc/textuno.hxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/inc/textuno.hxx b/sc/inc/textuno.hxx index 86297586fa27..ef98720e74ca 100644 --- a/sc/inc/textuno.hxx +++ b/sc/inc/textuno.hxx @@ -33,6 +33,8 @@ #include <rtl/ref.hxx> #include "scdllapi.h" +#include <memory> + #include <boost/noncopyable.hpp> class EditEngine; @@ -111,7 +113,7 @@ public: class ScHeaderFooterTextData : private boost::noncopyable { private: - EditTextObject* mpTextObj; + std::unique_ptr<EditTextObject> mpTextObj; rtl::Reference<ScHeaderFooterContentObj> rContentObj; sal_uInt16 nPart; ScEditEngineDefaulter* pEditEngine; @@ -132,7 +134,7 @@ public: sal_uInt16 GetPart() const { return nPart; } rtl::Reference<ScHeaderFooterContentObj> GetContentObj() const { return rContentObj; } - const EditTextObject* GetTextObject() const { return mpTextObj; } + const EditTextObject* GetTextObject() const { return mpTextObj.get(); } void dispose() { rContentObj.clear(); } }; |