summaryrefslogtreecommitdiff
path: root/forms/source/richtext/rtattributehandler.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'forms/source/richtext/rtattributehandler.cxx')
-rw-r--r--forms/source/richtext/rtattributehandler.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/forms/source/richtext/rtattributehandler.cxx b/forms/source/richtext/rtattributehandler.cxx
index 7c2845e9b34f..1f17b32c3396 100644
--- a/forms/source/richtext/rtattributehandler.cxx
+++ b/forms/source/richtext/rtattributehandler.cxx
@@ -291,13 +291,12 @@ namespace frm
{
if ( _pAdditionalArg )
{
- std::unique_ptr<SfxPoolItem> pCorrectWich(_pAdditionalArg->Clone());
- pCorrectWich->SetWhich( getWhich() );
+ std::unique_ptr<SfxPoolItem> pCorrectWich(_pAdditionalArg->CloneSetWhich(getWhich()));
if ( m_bScriptDependent )
putItemForScript( _rNewAttribs, *pCorrectWich, _nForScriptType );
else
- _rNewAttribs.Put( *pCorrectWich );
+ _rNewAttribs.Put( std::move(pCorrectWich) );
}
else
OSL_FAIL( "SlotHandler::executeAttribute: need attributes to do something!" );
@@ -433,9 +432,7 @@ namespace frm
OSL_ENSURE( dynamic_cast<const SfxBoolItem*>( _pAdditionalArg) != nullptr, "BooleanHandler::executeAttribute: invalid argument!" );
if ( _pAdditionalArg )
{
- std::unique_ptr<SfxPoolItem> pCorrectWich(_pAdditionalArg->Clone());
- pCorrectWich->SetWhich( getWhich() );
- _rNewAttribs.Put( *pCorrectWich );
+ _rNewAttribs.Put( _pAdditionalArg->CloneSetWhich(getWhich()) );
}
}