[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - svtools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Wed Jan 30 14:42:38 UTC 2019
svtools/source/misc/embedhlp.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 00bf2dc3ccf462174aeefca30e28a6a87a6b93ee
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jan 30 10:12:44 2019 +0000
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jan 30 15:42:07 2019 +0100
crashtesting: crash exporting ooo58458-1.odt to doc
since...
commit 8780fa41dcd164af244742461f4e57a4bcf4c7a4
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/67128
Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
Tested-by: Jenkins
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index fa7f7b791b1d..5f6593905648 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -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");
}
}
More information about the Libreoffice-commits
mailing list