Commit 0a7f2268 authored by Alexey.Golubev's avatar Alexey.Golubev Committed by Alexander.Trofimov

Рефакторинг. Пределал объявление методов CStylePainter через прототипы.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58185 954022d7-b5bf-4e40-9824-e11837661b57
parent 68d463e6
...@@ -4542,8 +4542,10 @@ function CStylesPainter() ...@@ -4542,8 +4542,10 @@ function CStylesPainter()
this.defaultStyles = []; this.defaultStyles = [];
this.docStyles = []; this.docStyles = [];
this.mergedStyles = []; this.mergedStyles = [];
}
this.GenerateStyles = function(_api, ds) CDrawingDocument.prototype =
{
GenerateStyles: function(_api, ds)
{ {
if (_api.WordControl.bIsRetinaSupport) if (_api.WordControl.bIsRetinaSupport)
{ {
...@@ -4626,8 +4628,8 @@ function CStylesPainter() ...@@ -4626,8 +4628,8 @@ function CStylesPainter()
_stream["WriteByte"](1); _stream["WriteByte"](1);
_api.WordControl.m_oDrawingDocument.Native["DD_EndNativeDraw"](_stream); _api.WordControl.m_oDrawingDocument.Native["DD_EndNativeDraw"](_stream);
} },
this.GenerateDefaultStyles = function(_api, ds, _graphics) GenerateDefaultStyles: function(_api, ds, _graphics)
{ {
var styles = ds; var styles = ds;
...@@ -4640,9 +4642,9 @@ function CStylesPainter() ...@@ -4640,9 +4642,9 @@ function CStylesPainter()
//this.drawStyle(_graphics, style, _api); //this.drawStyle(_graphics, style, _api);
} }
} }
} },
this.GenerateDocumentStyles = function(_api, _graphics) GenerateDocumentStyles: function(_api, _graphics)
{ {
if (_api.WordControl.m_oLogicDocument == null) if (_api.WordControl.m_oLogicDocument == null)
return; return;
...@@ -4697,9 +4699,9 @@ function CStylesPainter() ...@@ -4697,9 +4699,9 @@ function CStylesPainter()
this.docStyles.push({ Name: _name, Style: _dr_style }); this.docStyles.push({ Name: _name, Style: _dr_style });
} }
} }
} },
this.drawStyle = function(graphics, style, _api) drawStyle: function(graphics, style, _api)
{ {
_api.WordControl.m_oDrawingDocument.Native["DD_StartNativeDraw"](this.STYLE_THUMBNAIL_WIDTH, this.STYLE_THUMBNAIL_HEIGHT, _api.WordControl.m_oDrawingDocument.Native["DD_StartNativeDraw"](this.STYLE_THUMBNAIL_WIDTH, this.STYLE_THUMBNAIL_HEIGHT,
this.STYLE_THUMBNAIL_WIDTH * g_dKoef_pix_to_mm, this.STYLE_THUMBNAIL_HEIGHT * g_dKoef_pix_to_mm); this.STYLE_THUMBNAIL_WIDTH * g_dKoef_pix_to_mm, this.STYLE_THUMBNAIL_HEIGHT * g_dKoef_pix_to_mm);
......
...@@ -5761,8 +5761,10 @@ function CStylesPainter() ...@@ -5761,8 +5761,10 @@ function CStylesPainter()
this.CurrentTranslate = null; this.CurrentTranslate = null;
this.IsRetinaEnabled = false; this.IsRetinaEnabled = false;
}
this.GenerateStyles = function(_api, ds) CStylesPainter.prototype =
{
GenerateStyles: function(_api, ds)
{ {
if (_api.WordControl.bIsRetinaSupport) if (_api.WordControl.bIsRetinaSupport)
{ {
...@@ -5831,8 +5833,8 @@ function CStylesPainter() ...@@ -5831,8 +5833,8 @@ function CStylesPainter()
// теперь просто отдаем евент наверх // теперь просто отдаем евент наверх
_api.sync_InitEditorStyles(this); _api.sync_InitEditorStyles(this);
} },
this.GenerateDefaultStyles = function(_api, ds) GenerateDefaultStyles: function(_api, ds)
{ {
var styles = ds; var styles = ds;
var _count = 0; var _count = 0;
...@@ -5884,9 +5886,9 @@ function CStylesPainter() ...@@ -5884,9 +5886,9 @@ function CStylesPainter()
} }
this.defaultStylesImage = _canvas.toDataURL("image/png"); this.defaultStylesImage = _canvas.toDataURL("image/png");
} },
this.GenerateDocumentStyles = function(_api) GenerateDocumentStyles: function(_api)
{ {
if (_api.WordControl.m_oLogicDocument == null) if (_api.WordControl.m_oLogicDocument == null)
return; return;
...@@ -5970,9 +5972,9 @@ function CStylesPainter() ...@@ -5970,9 +5972,9 @@ function CStylesPainter()
} }
this.docStylesImage = _canvas.toDataURL("image/png"); this.docStylesImage = _canvas.toDataURL("image/png");
} },
this.drawStyle = function(graphics, style, index) drawStyle: function(graphics, style, index)
{ {
var font = { FontFamily : { Name: "Times New Roman", Index : -1 }, Color : { r : 0, g : 0, b : 0 }, Bold : false, Italic : false, FontSize : 10 }; var font = { FontFamily : { Name: "Times New Roman", Index : -1 }, Color : { r : 0, g : 0, b : 0 }, Bold : false, Italic : false, FontSize : 10 };
......
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