basic/source/classes/sbunoobj.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 707f8c10328290c8bcd928755101cbb88ab6a8cb
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Tue Aug 16 10:00:00 2022 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Tue Aug 16 13:58:45 2022 +0200

    cid#1509215 Using a moved object
    
    and
    
    cid#1509294 Using a moved object
    
    Change-Id: Ic4ef9bbc94d7b946d7d1904edf4b5b23278baafd
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138348
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/basic/source/classes/sbunoobj.cxx 
b/basic/source/classes/sbunoobj.cxx
index d08460bc6ae4..fd7eee031799 100644
--- a/basic/source/classes/sbunoobj.cxx
+++ b/basic/source/classes/sbunoobj.cxx
@@ -4676,7 +4676,8 @@ SbxVariable* SbUnoStructRefObject::Find( const OUString& 
rName, SbxClassType t )
             Property aProp;
             aProp.Name = rName;
             aProp.Type = css::uno::Type( it->second->getTypeClass(), 
it->second->getTypeName() );
-            SbUnoProperty* pProp = new SbUnoProperty( rName, eSbxType, 
eRealSbxType, std::move(aProp), 0, false, ( aProp.Type.getTypeClass() == 
css::uno::TypeClass_STRUCT) );
+            const bool bIsStruct = aProp.Type.getTypeClass() == 
css::uno::TypeClass_STRUCT;
+            SbUnoProperty* pProp = new SbUnoProperty( rName, eSbxType, 
eRealSbxType, std::move(aProp), 0, false, bIsStruct );
             SbxVariableRef xVarRef = pProp;
             QuickInsert( xVarRef.get() );
             pRes = xVarRef.get();
@@ -4736,7 +4737,8 @@ void SbUnoStructRefObject::implCreateAll()
         Property aProp;
         aProp.Name = rName;
         aProp.Type = css::uno::Type( field.second->getTypeClass(), 
field.second->getTypeName() );
-        SbUnoProperty* pProp = new SbUnoProperty( rName, eSbxType, 
eRealSbxType, std::move(aProp), 0, false, ( aProp.Type.getTypeClass() == 
css::uno::TypeClass_STRUCT) );
+        const bool bIsStruct = aProp.Type.getTypeClass() == 
css::uno::TypeClass_STRUCT;
+        SbUnoProperty* pProp = new SbUnoProperty( rName, eSbxType, 
eRealSbxType, std::move(aProp), 0, false, bIsStruct );
         SbxVariableRef xVarRef = pProp;
         QuickInsert( xVarRef.get() );
     }

Reply via email to