summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-03-23 16:21:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-03-23 18:18:38 +0100
commit8a967b566603225d2719735c0d27bf6c91a49bd2 (patch)
treebda8849bef39897b0ce6afc5bef4b483ac36c353 /sfx2
parentfc6055b84c3ec4dd021aff723c7c318b2d19d1de (diff)
tdf#148146 Selecting an Impress template results in failed assert
regression from commit 31e7845339b30a69f06a04619660398fe4267268 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Thu Feb 17 12:19:49 2022 +0200 use more SfxItemSet::CloneAsValue Change-Id: Ie56fe208b64d464bf24c480db69c03cbe438a032 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131979 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appopen.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index 89d8266aa9bd..94fcdf924bdd 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -388,11 +388,11 @@ ErrCode SfxApplication::LoadTemplate( SfxObjectShellLock& xDoc, const OUString &
css::uno::Reference< css::frame::XModel > xModel = xDoc->GetModel();
if ( xModel.is() )
{
- SfxItemSet aNew = xDoc->GetMedium()->GetItemSet()->CloneAsValue();
- aNew.ClearItem( SID_PROGRESS_STATUSBAR_CONTROL );
- aNew.ClearItem( SID_FILTER_NAME );
+ std::unique_ptr<SfxItemSet> pNew = xDoc->GetMedium()->GetItemSet()->Clone();
+ pNew->ClearItem( SID_PROGRESS_STATUSBAR_CONTROL );
+ pNew->ClearItem( SID_FILTER_NAME );
css::uno::Sequence< css::beans::PropertyValue > aArgs;
- TransformItems( SID_OPENDOC, aNew, aArgs );
+ TransformItems( SID_OPENDOC, *pNew, aArgs );
sal_Int32 nLength = aArgs.getLength();
aArgs.realloc( nLength + 1 );
auto pArgs = aArgs.getArray();