Add feedback about OO charts

pull/1/head
yflory 3 years ago
parent 33eca166e6
commit b6804f98f4

@ -1586,6 +1586,8 @@ define([
var $tb = $iframe.find('head');
var css = // Old OO
//'#id-toolbar-full .toolbar-group:nth-child(2), #id-toolbar-full .separator:nth-child(3) { display: none; }' +
'#slot-btn-inschart { display: none !important; }' + // XXX XXX
'#slot-btn-insertchart { display: none !important; }' + // XXX XXX
//'#fm-btn-save { display: none !important; }' +
//'#panel-settings-general tr.autosave { display: none !important; }' +
//'#panel-settings-general tr.coauth { display: none !important; }' +
@ -1630,6 +1632,27 @@ define([
}
},
"onDocumentReady": function () {
// XXX remove the following block
try {
var app = common.getMetadataMgr().getPrivateData().ooType;
var d, hasChart;
if (app === 'doc') {
d = getEditor().GetDocument();
hasChart = d.GetAllCharts().length;
if (hasChart) { Feedback.send('OO_DOC_CHART', true); }
} else if (app === 'presentation') {
d = getEditor().GetPresentation().Presentation;
hasChart = d.Slides.some(function (slide) {
return slide.getDrawingObjects().some(function (obj) {
return obj instanceof getWindow().AscFormat.CChartSpace;
});
});
if (hasChart) { Feedback.send('OO_SLIDE_CHART', true); }
}
} catch (e) {}
evOnSync.fire();
var onMigrateRdy = Util.mkEvent();
onMigrateRdy.reg(function () {

Loading…
Cancel
Save