diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-08-16 10:00:00 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-08-16 13:58:45 +0200 |
commit | 707f8c10328290c8bcd928755101cbb88ab6a8cb (patch) | |
tree | a16d2834375fed0f9573d0fd7c2979510a4a4934 /basic | |
parent | bc91ece78e3ea2df4082c796469e42cc5fc72107 (diff) |
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>
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/classes/sbunoobj.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
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() ); } |