Kaydet (Commit) 00bf2dc3 authored tarafından Caolán McNamara's avatar Caolán McNamara

crashtesting: crash exporting ooo58458-1.odt to doc

since...

commit 8780fa41
Date:   Tue Oct 30 12:23:36 2018 +0100

    svtools: fix lost replacement grpahic when updating it via OLE fails

EmbeddedObjectRef::UpdateReplacementOnDemand is called by a chart during
EmbeddedObjectRef::GetReplacement which resets mpImpl->pGraphic to null

Change-Id: Id473b807582164eeb1791a26f6e0005a240f5989
Reviewed-on: https://gerrit.libreoffice.org/67128Reviewed-by: 's avatarMichael Stahl <Michael.Stahl@cib.de>
Tested-by: Jenkins
üst 1bb91265
......@@ -431,12 +431,14 @@ void EmbeddedObjectRef::GetReplacement( bool bUpdate )
mpImpl->mnGraphicVersion++;
}
if (bUpdate && !*mpImpl->pGraphic && aOldGraphic)
// note that UpdateReplacementOnDemand which resets mpImpl->pGraphic to null may have been called
// e.g. when exporting ooo58458-1.odt to doc
if (bUpdate && (!mpImpl->pGraphic || !*mpImpl->pGraphic) && aOldGraphic)
{
// We used to have an old graphic, tried to update and the update
// failed. Go back to the old graphic instead of having no graphic at
// all.
(*mpImpl->pGraphic) = aOldGraphic;
mpImpl->pGraphic.reset(new Graphic(aOldGraphic));
SAL_WARN("svtools.misc", "EmbeddedObjectRef::GetReplacement: update failed");
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment