diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-29 19:48:17 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-06-30 08:50:57 +0200 |
commit | ae27500eaf5cd7e0800cfc5d584809dc4e1739cb (patch) | |
tree | a7bd76dd310a47ca6120863d5cb098279cc5955d /sd | |
parent | 333e24b347293503f1c3abf8871769191b0c751d (diff) |
tdf#137544 only construct SdAnimationInfo when we need it
Change-Id: I15377a0f32bf4554c8feddc6c6c967002de9dd9d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136657
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/source/ui/unoidl/unoobj.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sd/source/ui/unoidl/unoobj.cxx b/sd/source/ui/unoidl/unoobj.cxx index 6ed6729f9a75..bdd8104bef7c 100644 --- a/sd/source/ui/unoidl/unoobj.cxx +++ b/sd/source/ui/unoidl/unoobj.cxx @@ -95,7 +95,6 @@ using ::com::sun::star::drawing::XShape; #define WID_ANIMPATH 16 #define WID_IMAGEMAP 17 #define WID_ISANIMATION 18 -#define WID_THAT_NEED_ANIMINFO 19 #define WID_ISEMPTYPRESOBJ 20 #define WID_ISPRESOBJ 21 @@ -421,8 +420,6 @@ void SAL_CALL SdXShape::setPropertyValue( const OUString& aPropertyName, const c SdrObject* pObj = mpShape->GetSdrObject(); if( pObj ) { - SdAnimationInfo* pInfo = GetAnimationInfo(pEntry->nWID <= WID_THAT_NEED_ANIMINFO); - switch(pEntry->nWID) { case WID_NAVORDER: @@ -506,19 +503,23 @@ void SAL_CALL SdXShape::setPropertyValue( const OUString& aPropertyName, const c if(!(aValue >>= aString)) throw lang::IllegalArgumentException(); + SdAnimationInfo* pInfo = GetAnimationInfo(true); pInfo->SetBookmark( SdDrawPage::getUiNameFromPageApiName( aString ) ); break; } case WID_CLICKACTION: + { + SdAnimationInfo* pInfo = GetAnimationInfo(true); ::cppu::any2enum< presentation::ClickAction >( pInfo->meClickAction, aValue); break; - + } // TODO: WID_PLAYFULL: case WID_SOUNDFILE: { OUString aString; if(!(aValue >>= aString)) throw lang::IllegalArgumentException(); + SdAnimationInfo* pInfo = GetAnimationInfo(true); pInfo->maSoundFile = aString; EffectMigration::UpdateSoundEffect( mpShape, pInfo ); break; @@ -526,6 +527,7 @@ void SAL_CALL SdXShape::setPropertyValue( const OUString& aPropertyName, const c case WID_SOUNDON: { + SdAnimationInfo* pInfo = GetAnimationInfo(true); if( !(aValue >>= pInfo->mbSoundOn) ) throw lang::IllegalArgumentException(); EffectMigration::UpdateSoundEffect( mpShape, pInfo ); @@ -537,6 +539,7 @@ void SAL_CALL SdXShape::setPropertyValue( const OUString& aPropertyName, const c if(!(aValue >>= nVerb)) throw lang::IllegalArgumentException(); + SdAnimationInfo* pInfo = GetAnimationInfo(true); pInfo->mnVerb = static_cast<sal_uInt16>(nVerb); break; } |