sfx2/source/appl/appopen.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 8a967b566603225d2719735c0d27bf6c91a49bd2
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Wed Mar 23 16:21:12 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Wed Mar 23 18:18:38 2022 +0100

    tdf#148146 Selecting an Impress template results in failed assert
    
    regression from
        commit 31e7845339b30a69f06a04619660398fe4267268
        Author: Noel Grandin <noel.gran...@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.gran...@collabora.co.uk>

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();

Reply via email to