Commit 7b456aec authored by Alexander.Trofimov's avatar Alexander.Trofimov

add translate cell styles

parent f467f828
......@@ -2015,6 +2015,7 @@
asc_CStylesPainter.prototype.generateDefaultStyles = function (cellStylesAll, fmgrGraphics, oFont, sr) {
var cellStyles = cellStylesAll.DefaultStyles;
var translateName;
var oCanvas = document.createElement('canvas');
oCanvas.width = this.styleThumbnailWidthWithRetina;
oCanvas.height = this.styleThumbnailHeightWithRetina;
......@@ -2031,8 +2032,9 @@
// ToDo Возможно стоит переписать немного, чтобы не пробегать каждый раз по массиву custom-стилей (нужно генерировать AllStyles)
oCustomStyle = cellStylesAll.getCustomStyleByBuiltinId(oStyle.BuiltinId);
this.drawStyle(oGraphics, sr, oCustomStyle || oStyle, oStyle.Name);
this.defaultStyles.push(new AscCommon.CStyleImage(oStyle.Name, AscCommon.c_oAscStyleImage.Default,
translateName = AscCommon.translateManager.getValue(oStyle.Name);
this.drawStyle(oGraphics, sr, oCustomStyle || oStyle, translateName);
this.defaultStyles.push(new AscCommon.CStyleImage(translateName, AscCommon.c_oAscStyleImage.Default,
oCanvas.toDataURL("image/png")));
}
};
......
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