Fix missing images when exporting a presentation

pull/1/head
yflory 3 years ago
parent 8c299a59fb
commit 493b0ebcca

@ -1546,6 +1546,16 @@ define([
}); });
var type = common.getMetadataMgr().getPrivateData().ooType; var type = common.getMetadataMgr().getPrivateData().ooType;
var images = (e && window.frames[0].AscCommon.g_oDocumentUrls.urls) || {}; var images = (e && window.frames[0].AscCommon.g_oDocumentUrls.urls) || {};
// Fix race condition which could drop images sometimes
// ==> make sure each image has a 'media/image_name.ext' entry as well
Object.keys(images).forEach(function (img) {
if (/^media\//.test(img)) { return; }
if (images['media/'+img]) { return; }
images['media/'+img] = images[img];
});
// Add theme images
var theme = e && window.frames[0].AscCommon.g_image_loader.map_image_index; var theme = e && window.frames[0].AscCommon.g_image_loader.map_image_index;
if (theme) { if (theme) {
Object.keys(theme).forEach(function (url) { Object.keys(theme).forEach(function (url) {
@ -1554,6 +1564,7 @@ define([
} }
}); });
} }
sframeChan.query('Q_OO_CONVERT', { sframeChan.query('Q_OO_CONVERT', {
data: data, data: data,
type: type, type: type,

Loading…
Cancel
Save