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 <caolanm@redhat.com>
diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx
index d08460b..fd7eee0 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() );
}