summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-06-25 19:58:11 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-06-26 09:57:06 +0200
commitb6589ad8c7a5aed5ae13cf8bf8482ceba19a2067 (patch)
tree0ee63ec137b01b4decc28d7726c53074853c310b /sd/source
parentdb90a3838f9cdd4866a0add4a5b5f5859d78e0d7 (diff)
ofz: Use-of-uninitialized-value
Change-Id: Ia064835f3fee71e9a177b2ab37f66e3fd2a94fce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153569 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/filter/ppt/pptin.cxx63
1 files changed, 32 insertions, 31 deletions
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index 53d28a3c46ea..3eaebfd1892b 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2686,44 +2686,45 @@ rtl::Reference<SdrObject> ImplSdPPTImport::ProcessObj( SvStream& rSt, DffObjData
if ( SeekToRec( rSt, PPT_PST_InteractiveInfoAtom, nHdRecEnd, &aHdInteractiveInfoAtom ) )
{
PptInteractiveInfoAtom aInteractiveInfoAtom;
- ReadPptInteractiveInfoAtom( rSt, aInteractiveInfoAtom );
-
- // interactive object
- SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pObj, true);
-
- FillSdAnimationInfo(pInfo, aInteractiveInfoAtom, aMacroName);
- if ( aInteractiveInfoAtom.nAction == 6 ) // Sj -> media action
+ if (ReadPptInteractiveInfoAtom(rSt, aInteractiveInfoAtom))
{
- rHdClientData.SeekToContent( rStCtrl );
- DffRecordHeader aObjRefAtomHd;
- if ( SeekToRec( rSt, PPT_PST_ExObjRefAtom, nHdRecEnd, &aObjRefAtomHd ) )
+ // interactive object
+ SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pObj, true);
+
+ FillSdAnimationInfo(pInfo, aInteractiveInfoAtom, aMacroName);
+ if ( aInteractiveInfoAtom.nAction == 6 ) // Sj -> media action
{
- sal_uInt32 nRef;
- rSt.ReadUInt32( nRef );
- OUString aMediaURL( ReadMedia( nRef ) );
- if ( aMediaURL.isEmpty() )
- aMediaURL = ReadSound( nRef );
- if ( !aMediaURL.isEmpty() )
+ rHdClientData.SeekToContent( rStCtrl );
+ DffRecordHeader aObjRefAtomHd;
+ if ( SeekToRec( rSt, PPT_PST_ExObjRefAtom, nHdRecEnd, &aObjRefAtomHd ) )
{
- rtl::Reference<SdrMediaObj> pMediaObj = new SdrMediaObj(
- pObj->getSdrModelFromSdrObject(),
- pObj->GetSnapRect());
- pMediaObj->SetMergedItemSet( pObj->GetMergedItemSet() );
-
- //--remove object from maAnimations list and add the new object instead
- Ppt97AnimationPtr pAnimation;
+ sal_uInt32 nRef;
+ rSt.ReadUInt32( nRef );
+ OUString aMediaURL( ReadMedia( nRef ) );
+ if ( aMediaURL.isEmpty() )
+ aMediaURL = ReadSound( nRef );
+ if ( !aMediaURL.isEmpty() )
{
- tAnimationMap::iterator aFound = maAnimations.find( pObj.get() );
- if( aFound != maAnimations.end() )
+ rtl::Reference<SdrMediaObj> pMediaObj = new SdrMediaObj(
+ pObj->getSdrModelFromSdrObject(),
+ pObj->GetSnapRect());
+ pMediaObj->SetMergedItemSet( pObj->GetMergedItemSet() );
+
+ //--remove object from maAnimations list and add the new object instead
+ Ppt97AnimationPtr pAnimation;
{
- pAnimation = (*aFound).second;
- maAnimations.erase(aFound);
+ tAnimationMap::iterator aFound = maAnimations.find( pObj.get() );
+ if( aFound != maAnimations.end() )
+ {
+ pAnimation = (*aFound).second;
+ maAnimations.erase(aFound);
+ }
+ maAnimations[pMediaObj.get()] = pAnimation;
}
- maAnimations[pMediaObj.get()] = pAnimation;
- }
- pObj = pMediaObj; // SJ: hoping that pObj is not inserted in any list
- pMediaObj->setURL( aMediaURL, ""/*TODO?*/ );
+ pObj = pMediaObj; // SJ: hoping that pObj is not inserted in any list
+ pMediaObj->setURL( aMediaURL, ""/*TODO?*/ );
+ }
}
}
}