basic/source/classes/sbunoobj.cxx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
New commits: commit 8e9bc34c0555ed09e2f996a949dc9cf9e028beac Author: Caolán McNamara <[email protected]> AuthorDate: Tue Aug 16 10:00:00 2022 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Tue Aug 16 20:26:18 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/+/138284 Reviewed-by: Michael Stahl <[email protected]> Tested-by: Jenkins diff --git a/basic/source/classes/sbunoobj.cxx b/basic/source/classes/sbunoobj.cxx index 51b1b956b170..604ac8d866f5 100644 --- a/basic/source/classes/sbunoobj.cxx +++ b/basic/source/classes/sbunoobj.cxx @@ -4679,7 +4679,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(); @@ -4739,7 +4740,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() ); }
