summaryrefslogtreecommitdiff
path: root/forms
diff options
context:
space:
mode:
Diffstat (limited to 'forms')
-rw-r--r--forms/source/richtext/rtattributes.hxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/forms/source/richtext/rtattributes.hxx b/forms/source/richtext/rtattributes.hxx
index 6f79286f653f..6c166b240bbf 100644
--- a/forms/source/richtext/rtattributes.hxx
+++ b/forms/source/richtext/rtattributes.hxx
@@ -43,7 +43,7 @@ namespace frm
struct AttributeState
{
private:
- SfxPoolItem *pItemHandleItem;
+ std::unique_ptr<SfxPoolItem> pItemHandleItem;
public:
AttributeCheckState eSimpleState;
@@ -91,17 +91,15 @@ namespace frm
inline const SfxPoolItem* AttributeState::getItem() const
{
- return pItemHandleItem;
+ return pItemHandleItem.get();
}
inline void AttributeState::setItem( const SfxPoolItem* _pItem )
{
- if ( pItemHandleItem )
- delete pItemHandleItem;
if ( _pItem )
- pItemHandleItem = _pItem->Clone();
+ pItemHandleItem.reset(_pItem->Clone());
else
- pItemHandleItem = nullptr;
+ pItemHandleItem.reset();
}
inline bool AttributeState::operator==( const AttributeState& _rRHS )