diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 11:47:06 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-07 11:47:06 +0000 |
commit | 8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59 (patch) | |
tree | ca2b0cc4fba88107f5f6e740285184a061011866 /forms/source/richtext/parametrizedattributedispatcher.cxx | |
parent | Adding debian version 4:24.2.3-2. (diff) | |
download | libreoffice-8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59.tar.xz libreoffice-8ceff95c69cf9bd9ff5ab3a4b5689925b8bd6a59.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.cxx | 14 |
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()); } } |