summaryrefslogtreecommitdiffstats
path: root/forms/source/richtext/parametrizedattributedispatcher.cxx
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 11:48:25 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 11:48:25 +0000
commit9c0049cfae49c8e4ddef9125a69db2ad134c10c6 (patch)
tree812a86c0eee63dfc5ace12f2622ed3ce9cd3d680 /forms/source/richtext/parametrizedattributedispatcher.cxx
parentReleasing progress-linux version 4:24.2.3-2~progress7.99u1. (diff)
downloadlibreoffice-9c0049cfae49c8e4ddef9125a69db2ad134c10c6.tar.xz
libreoffice-9c0049cfae49c8e4ddef9125a69db2ad134c10c6.zip
Merging upstream version 4:24.2.4.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'forms/source/richtext/parametrizedattributedispatcher.cxx')
-rw-r--r--forms/source/richtext/parametrizedattributedispatcher.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/forms/source/richtext/parametrizedattributedispatcher.cxx b/forms/source/richtext/parametrizedattributedispatcher.cxx
index d6666e2b02..bc226decd8 100644
--- a/forms/source/richtext/parametrizedattributedispatcher.cxx
+++ b/forms/source/richtext/parametrizedattributedispatcher.cxx
@@ -89,7 +89,7 @@ namespace frm
}
- const SfxPoolItem* OParametrizedAttributeDispatcher::convertDispatchArgsToItem( const Sequence< PropertyValue >& _rArguments )
+ SfxPoolItemHolder OParametrizedAttributeDispatcher::convertDispatchArgsToItem( const Sequence< PropertyValue >& _rArguments )
{
// get the real slot id. This may differ from our attribute id: for instance, both
// SID_ATTR_CHAR_HEIGHT and SID_ATTR_CHAR_LATIN_HEIGHT are mapped to the same which id
@@ -98,16 +98,16 @@ namespace frm
SfxAllItemSet aParameterSet( getEditView()->GetEmptyItemSet() );
TransformParameters( nSlotId, _rArguments, aParameterSet );
- const SfxPoolItem* pArgument = nullptr;
if ( aParameterSet.Count() )
{
OSL_ENSURE( aParameterSet.Count() == 1, "OParametrizedAttributeDispatcher::convertDispatchArgsToItem: Arguments which form more than 1 item? How this?" );
WhichId nAttributeWhich = aParameterSet.GetPool()->GetWhich( nSlotId );
- pArgument = aParameterSet.GetItem( nAttributeWhich );
- OSL_ENSURE( pArgument, "OParametrizedAttributeDispatcher::convertDispatchArgsToItem: suspicious: there were arguments, but they're not for my slot!" );
+ SfxPoolItemHolder aArgument(*aParameterSet.GetPool(), aParameterSet.GetItem(nAttributeWhich));
+ OSL_ENSURE( aArgument.getItem(), "OParametrizedAttributeDispatcher::convertDispatchArgsToItem: suspicious: there were arguments, but they're not for my slot!" );
+ return aArgument;
}
- return pArgument;
+ return SfxPoolItemHolder();
}
@@ -117,8 +117,8 @@ namespace frm
OSL_ENSURE( _rURL.Complete == getFeatureURL().Complete, "OParametrizedAttributeDispatcher::dispatch: invalid URL!" );
if ( m_pMasterDispatcher )
{
- const SfxPoolItem* pConvertedArgument = convertDispatchArgsToItem( _rArguments );
- m_pMasterDispatcher->executeAttribute( m_nAttributeId, pConvertedArgument );
+ const SfxPoolItemHolder aConvertedArgument(convertDispatchArgsToItem(_rArguments));
+ m_pMasterDispatcher->executeAttribute(m_nAttributeId, aConvertedArgument.getItem());
}
}