tdf#150325 Newly created animated gif is not saved

regression from
    commit 6621c3c67f
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Wed Jun 20 16:51:48 2018 +0200
    loplugin:useuniqueptr in AnimationWindow

Change-Id: I995a278aff3945070af45b01f1e63b253cceb24c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138202
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2022-08-12 15:58:51 +02:00
parent 65f6447f89
commit fd26ff2418

View File

@@ -507,7 +507,7 @@ void AnimationWindow::UpdateControl(bool const bDisableCtrls)
// tdf#95298 check m_nCurrentFrame for EMPTY_FRAMELIST to avoid out-of-bound array access
if (!m_FrameList.empty() && EMPTY_FRAMELIST != m_nCurrentFrame)
{
BitmapEx & rBmp(m_FrameList[m_nCurrentFrame].first);
BitmapEx aBmp(m_FrameList[m_nCurrentFrame].first);
SdPage* pPage = pMyDoc->GetSdPage(0, PageKind::Standard);
SdrObject *const pObject = pPage->GetObj(m_nCurrentFrame);
@@ -529,10 +529,10 @@ void AnimationWindow::UpdateControl(bool const bDisableCtrls)
: sd::OUTPUT_DRAWMODE_COLOR );
pVD->Erase();
pObject->SingleObjectPainter( *pVD );
rBmp = pVD->GetBitmapEx( aObjRect.TopLeft(), aObjSize );
aBmp = pVD->GetBitmapEx( aObjRect.TopLeft(), aObjSize );
}
m_xCtlDisplay->SetBitmapEx(&rBmp);
m_xCtlDisplay->SetBitmapEx(&aBmp);
}
else
{