Commit c3d71be2 authored by Alexander.Trofimov's avatar Alexander.Trofimov

asc_CStyleImage -> CStyleImage

CStyleImage теперь один для всех редакторов.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@66640 954022d7-b5bf-4e40-9824-e11837661b57
parent d6e19bb1
...@@ -87,14 +87,6 @@ CTableMarkup.prototype = ...@@ -87,14 +87,6 @@ CTableMarkup.prototype =
} }
}; };
function CStyleImage(_name, _ind, _type, _uiPriority)
{
this.Name = _name;
this.ThumbnailOffset = _ind;
this.Type = _type;
this.uiPriority = _uiPriority;
}
function CTableOutline(Table, PageNum, X, Y, W, H) function CTableOutline(Table, PageNum, X, Y, W, H)
{ {
this.Table = Table; this.Table = Table;
......
...@@ -2836,6 +2836,16 @@ CAscMathCategory.prototype["get_W"] = function(){ return this.W; }; ...@@ -2836,6 +2836,16 @@ CAscMathCategory.prototype["get_W"] = function(){ return this.W; };
CAscMathCategory.prototype["get_H"] = function(){ return this.H; }; CAscMathCategory.prototype["get_H"] = function(){ return this.H; };
CAscMathCategory.prototype.private_Sort = function(){ this.Data.sort( function(a,b){ return a.Id- b.Id; } ); }; CAscMathCategory.prototype.private_Sort = function(){ this.Data.sort( function(a,b){ return a.Id- b.Id; } ); };
function CStyleImage(name, ind, type, uiPriority) {
this.name = name;
this.thumbnailOffset = ind;
this.type = type;
this.uiPriority = uiPriority;
}
CStyleImage.prototype['asc_getThumbnailOffset'] = CStyleImage.prototype['get_ThumbnailOffset'] = function() { return this.thumbnailOffset; };
CStyleImage.prototype['asc_getType'] = CStyleImage.prototype['get_Type'] = function() { return this.type; };
CStyleImage.prototype['asc_getName'] = CStyleImage.prototype['get_Name'] = function() { return this.name; };
// эта функция ДОЛЖНА минимизироваться // эта функция ДОЛЖНА минимизироваться
function CreateAscFill(unifill) function CreateAscFill(unifill)
{ {
......
...@@ -4868,13 +4868,6 @@ function CDrawingDocument(drawingObjects) ...@@ -4868,13 +4868,6 @@ function CDrawingDocument(drawingObjects)
} }
} }
function CStyleImage(_name, _ind, _type, _uiPriority)
{
this.Name = _name;
this.ThumbnailOffset = _ind;
this.Type = _type;
this.uiPriority = _uiPriority;
}
function CStylesPainter() function CStylesPainter()
{ {
// base64 defaultStyles image // base64 defaultStyles image
......
...@@ -4064,13 +4064,6 @@ function CDrawingDocument(drawingObjects) ...@@ -4064,13 +4064,6 @@ function CDrawingDocument(drawingObjects)
} }
} }
function CStyleImage(_name, _ind, _type, _uiPriority)
{
this.Name = _name;
this.ThumbnailOffset = _ind;
this.Type = _type;
this.uiPriority = _uiPriority;
}
function CStylesPainter() function CStylesPainter()
{ {
// base64 defaultStyles image // base64 defaultStyles image
......
...@@ -1300,20 +1300,6 @@ ...@@ -1300,20 +1300,6 @@
this.bAddRemoveRowCol = false; this.bAddRemoveRowCol = false;
} }
/** @constructor */
function asc_CStyleImage(name, thumbnailOffset, type) {
this.name = name;
this.thumbnailOffset = thumbnailOffset;
this.type = type;
}
asc_CStyleImage.prototype = {
constructor: asc_CStyleImage,
asc_getName: function () { return this.name; },
asc_getThumbnailOffset: function () { return this.thumbnailOffset; },
asc_getType: function () { return this.type; }
};
/** @constructor */ /** @constructor */
function asc_CStylesPainter() { function asc_CStylesPainter() {
...@@ -1372,7 +1358,7 @@ ...@@ -1372,7 +1358,7 @@
// ToDo Возможно стоит переписать немного, чтобы не пробегать каждый раз по массиву custom-стилей (нужно генерировать AllStyles) // ToDo Возможно стоит переписать немного, чтобы не пробегать каждый раз по массиву custom-стилей (нужно генерировать AllStyles)
oCustomStyle = cellStylesAll.getCustomStyleByBuiltinId(oStyle.BuiltinId); oCustomStyle = cellStylesAll.getCustomStyleByBuiltinId(oStyle.BuiltinId);
this.defaultStyles[i] = new asc_CStyleImage(oStyle.Name, styleIndex, c_oAscStyleImage.Default); this.defaultStyles[i] = new CStyleImage(oStyle.Name, styleIndex, c_oAscStyleImage.Default);
this.native.BeginDrawDefaultStyle(oStyle.Name, styleIndex); this.native.BeginDrawDefaultStyle(oStyle.Name, styleIndex);
this.drawStyle(oGraphics, stringRenderer, oCustomStyle || oStyle, oStyle.Name, styleIndex); this.drawStyle(oGraphics, stringRenderer, oCustomStyle || oStyle, oStyle.Name, styleIndex);
this.native.EndDrawStyle(); this.native.EndDrawStyle();
...@@ -1396,7 +1382,7 @@ ...@@ -1396,7 +1382,7 @@
oStyle = cellStyles[i]; oStyle = cellStyles[i];
if (oStyle.Hidden || null != oStyle.BuiltinId) if (oStyle.Hidden || null != oStyle.BuiltinId)
continue; continue;
this.docStyles[styleIndex] = new asc_CStyleImage(oStyle.Name, styleIndex, c_oAscStyleImage.Document); this.docStyles[styleIndex] = new CStyleImage(oStyle.Name, styleIndex, c_oAscStyleImage.Document);
this.native.BeginDrawDocumentStyle(oStyle.Name, styleIndex); this.native.BeginDrawDocumentStyle(oStyle.Name, styleIndex);
this.drawStyle(oGraphics, stringRenderer, oStyle, oStyle.Name, styleIndex); this.drawStyle(oGraphics, stringRenderer, oStyle, oStyle.Name, styleIndex);
this.native.EndDrawStyle(); this.native.EndDrawStyle();
...@@ -1708,12 +1694,6 @@ ...@@ -1708,12 +1694,6 @@
window["Asc"]["asc_CPane"] = window["Asc"].asc_CPane = asc_CPane; window["Asc"]["asc_CPane"] = window["Asc"].asc_CPane = asc_CPane;
window["Asc"]["asc_CStyleImage"] = window["Asc"].asc_CStyleImage = asc_CStyleImage;
prot = asc_CStyleImage.prototype;
prot["asc_getName"] = prot.asc_getName;
prot["asc_getThumbnailOffset"] = prot.asc_getThumbnailOffset;
prot["asc_getType"] = prot.asc_getType;
window["Asc"]["asc_CStylesPainter"] = window["Asc"].asc_CStylesPainter = asc_CStylesPainter; window["Asc"]["asc_CStylesPainter"] = window["Asc"].asc_CStylesPainter = asc_CStylesPainter;
prot = asc_CStylesPainter.prototype; prot = asc_CStylesPainter.prototype;
prot["asc_getStyleThumbnailWidth"] = prot.asc_getStyleThumbnailWidth; prot["asc_getStyleThumbnailWidth"] = prot.asc_getStyleThumbnailWidth;
......
...@@ -1313,19 +1313,6 @@ ...@@ -1313,19 +1313,6 @@
this.bAddRemoveRowCol = false; this.bAddRemoveRowCol = false;
} }
/** @constructor */
function asc_CStyleImage(name, thumbnailOffset, type) {
this.name = name;
this.thumbnailOffset = thumbnailOffset;
this.type = type;
}
asc_CStyleImage.prototype = {
constructor: asc_CStyleImage,
asc_getName: function () { return this.name; },
asc_getThumbnailOffset: function () { return this.thumbnailOffset; },
asc_getType: function () { return this.type; }
};
/** @constructor */ /** @constructor */
function asc_CStylesPainter() { function asc_CStylesPainter() {
...@@ -1380,7 +1367,7 @@ ...@@ -1380,7 +1367,7 @@
// ToDo Возможно стоит переписать немного, чтобы не пробегать каждый раз по массиву custom-стилей (нужно генерировать AllStyles) // ToDo Возможно стоит переписать немного, чтобы не пробегать каждый раз по массиву custom-стилей (нужно генерировать AllStyles)
oCustomStyle = cellStylesAll.getCustomStyleByBuiltinId(oStyle.BuiltinId); oCustomStyle = cellStylesAll.getCustomStyleByBuiltinId(oStyle.BuiltinId);
this.defaultStyles[i] = new asc_CStyleImage(oStyle.Name, styleIndex, c_oAscStyleImage.Default); this.defaultStyles[i] = new CStyleImage(oStyle.Name, styleIndex, c_oAscStyleImage.Default);
this.drawStyle(oGraphics, stringRenderer, oCustomStyle || oStyle, oStyle.Name, styleIndex); this.drawStyle(oGraphics, stringRenderer, oCustomStyle || oStyle, oStyle.Name, styleIndex);
++styleIndex; ++styleIndex;
} }
...@@ -1402,7 +1389,7 @@ ...@@ -1402,7 +1389,7 @@
oStyle = cellStyles[i]; oStyle = cellStyles[i];
if (oStyle.Hidden || null != oStyle.BuiltinId) if (oStyle.Hidden || null != oStyle.BuiltinId)
continue; continue;
this.docStyles[styleIndex] = new asc_CStyleImage(oStyle.Name, styleIndex, c_oAscStyleImage.Document); this.docStyles[styleIndex] = new CStyleImage(oStyle.Name, styleIndex, c_oAscStyleImage.Document);
this.drawStyle(oGraphics, stringRenderer, oStyle, oStyle.Name, styleIndex); this.drawStyle(oGraphics, stringRenderer, oStyle, oStyle.Name, styleIndex);
++styleIndex; ++styleIndex;
} }
...@@ -1705,12 +1692,6 @@ ...@@ -1705,12 +1692,6 @@
window["Asc"]["asc_CPane"] = window["Asc"].asc_CPane = asc_CPane; window["Asc"]["asc_CPane"] = window["Asc"].asc_CPane = asc_CPane;
window["Asc"]["asc_CStyleImage"] = window["Asc"].asc_CStyleImage = asc_CStyleImage;
prot = asc_CStyleImage.prototype;
prot["asc_getName"] = prot.asc_getName;
prot["asc_getThumbnailOffset"] = prot.asc_getThumbnailOffset;
prot["asc_getType"] = prot.asc_getType;
window["Asc"]["asc_CStylesPainter"] = window["Asc"].asc_CStylesPainter = asc_CStylesPainter; window["Asc"]["asc_CStylesPainter"] = window["Asc"].asc_CStylesPainter = asc_CStylesPainter;
prot = asc_CStylesPainter.prototype; prot = asc_CStylesPainter.prototype;
prot["asc_getStyleThumbnailWidth"] = prot.asc_getStyleThumbnailWidth; prot["asc_getStyleThumbnailWidth"] = prot.asc_getStyleThumbnailWidth;
......
...@@ -6975,14 +6975,6 @@ function CDrawingDocument() ...@@ -6975,14 +6975,6 @@ function CDrawingDocument()
return null; return null;
}; };
} }
function CStyleImage(_name, _ind, _type, _uiPriority)
{
this.Name = _name;
this.ThumbnailOffset = _ind;
this.Type = _type;
this.uiPriority = _uiPriority;
}
function CStylesPainter() function CStylesPainter()
{ {
// base64 defaultStyles image // base64 defaultStyles image
......
...@@ -135,7 +135,6 @@ CHeaderProp.prototype.get_Locked = function() { return this.Locked; }; ...@@ -135,7 +135,6 @@ CHeaderProp.prototype.get_Locked = function() { return this.Locked; };
// [!dirty hack for minimizer - don't delete this comment!] function CStylesPainter () // [!dirty hack for minimizer - don't delete this comment!] function CStylesPainter ()
// [!dirty hack for minimizer - don't delete this comment!] function CStyleImage ()
// [!dirty hack for minimizer - don't delete this comment!] function CFont () // [!dirty hack for minimizer - don't delete this comment!] function CFont ()
CStylesPainter.prototype.get_DefaultStylesImage = function() { return this.defaultStylesImage; }; CStylesPainter.prototype.get_DefaultStylesImage = function() { return this.defaultStylesImage; };
CStylesPainter.prototype.get_DocStylesImage = function() { return this.docStylesImage; }; CStylesPainter.prototype.get_DocStylesImage = function() { return this.docStylesImage; };
...@@ -144,10 +143,6 @@ CStylesPainter.prototype.get_STYLE_THUMBNAIL_WIDTH = function() { return this.ST ...@@ -144,10 +143,6 @@ CStylesPainter.prototype.get_STYLE_THUMBNAIL_WIDTH = function() { return this.ST
CStylesPainter.prototype.get_STYLE_THUMBNAIL_HEIGHT = function() { return this.STYLE_THUMBNAIL_HEIGHT; }; CStylesPainter.prototype.get_STYLE_THUMBNAIL_HEIGHT = function() { return this.STYLE_THUMBNAIL_HEIGHT; };
CStylesPainter.prototype.get_IsRetinaEnabled = function() { return this.IsRetinaEnabled; }; CStylesPainter.prototype.get_IsRetinaEnabled = function() { return this.IsRetinaEnabled; };
CStyleImage.prototype.get_ThumbnailOffset = function() { return this.ThumbnailOffset; };
CStyleImage.prototype.get_Type = function() { return this.Type; };
CStyleImage.prototype.get_Name = function() { return this.Name; };
CFont.prototype.asc_getFontId = function() { return this.id; }; CFont.prototype.asc_getFontId = function() { return this.id; };
CFont.prototype.asc_getFontName = function() { return this.name; }; CFont.prototype.asc_getFontName = function() { return this.name; };
CFont.prototype.asc_getFontThumbnail = function() { return this.thumbnail; }; CFont.prototype.asc_getFontThumbnail = function() { return this.thumbnail; };
......
...@@ -46,10 +46,6 @@ CStylesPainter.prototype['get_MergedStyles'] = CStylesPainter.prototype.get_Merg ...@@ -46,10 +46,6 @@ CStylesPainter.prototype['get_MergedStyles'] = CStylesPainter.prototype.get_Merg
CStylesPainter.prototype['get_STYLE_THUMBNAIL_WIDTH'] = CStylesPainter.prototype.get_STYLE_THUMBNAIL_WIDTH; CStylesPainter.prototype['get_STYLE_THUMBNAIL_WIDTH'] = CStylesPainter.prototype.get_STYLE_THUMBNAIL_WIDTH;
CStylesPainter.prototype['get_STYLE_THUMBNAIL_HEIGHT'] = CStylesPainter.prototype.get_STYLE_THUMBNAIL_HEIGHT; CStylesPainter.prototype['get_STYLE_THUMBNAIL_HEIGHT'] = CStylesPainter.prototype.get_STYLE_THUMBNAIL_HEIGHT;
CStylesPainter.prototype['get_IsRetinaEnabled'] = CStylesPainter.prototype.get_IsRetinaEnabled; CStylesPainter.prototype['get_IsRetinaEnabled'] = CStylesPainter.prototype.get_IsRetinaEnabled;
window['CStyleImage'] = CStyleImage;
CStyleImage.prototype['get_ThumbnailOffset'] = CStyleImage.prototype.get_ThumbnailOffset;
CStyleImage.prototype['get_Type'] = CStyleImage.prototype.get_Type;
CStyleImage.prototype['get_Name'] = CStyleImage.prototype.get_Name;
window['CFont'] = CFont; window['CFont'] = CFont;
CFont.prototype['asc_getFontId'] = CFont.prototype.asc_getFontId; CFont.prototype['asc_getFontId'] = CFont.prototype.asc_getFontId;
CFont.prototype['asc_getFontName'] = CFont.prototype.asc_getFontName; CFont.prototype['asc_getFontName'] = CFont.prototype.asc_getFontName;
......
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