Commit 90fae94a authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

git-svn-id:...

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54952 954022d7-b5bf-4e40-9824-e11837661b57
parent e83e08de
......@@ -5732,6 +5732,12 @@ function CStylesPainter()
this.STYLE_THUMBNAIL_WIDTH = 80;
this.STYLE_THUMBNAIL_HEIGHT = 40;
if (window["flat_desine"] === true)
{
this.STYLE_THUMBNAIL_WIDTH = 109;
this.STYLE_THUMBNAIL_HEIGHT = 45;
}
this.CurrentTranslate = null;
this.IsRetinaEnabled = false;
......@@ -5883,8 +5889,11 @@ function CStylesPainter()
_canvas.height = _count * this.STYLE_THUMBNAIL_HEIGHT;
var ctx = _canvas.getContext('2d');
ctx.fillStyle = "#FFFFFF";
ctx.fillRect(0, 0, _canvas.width, _canvas.height);
if (window["flat_desine"] !== true)
{
ctx.fillStyle = "#FFFFFF";
ctx.fillRect(0, 0, _canvas.width, _canvas.height);
}
var graphics = new CGraphics();
if (!this.IsRetinaEnabled)
......@@ -5905,7 +5914,10 @@ function CStylesPainter()
var res = formalStyle.match(/^heading([1-9][0-9]*)$/);
var index = (res) ? res[1] - 1 : -1;
this.drawStyle(graphics, __Styles.Get_Pr(i, styletype_Paragraph), cur_index);
var _dr_style = __Styles.Get_Pr(i, styletype_Paragraph);
_dr_style.Name = style.Name;
this.drawStyle(graphics, _dr_style, cur_index);
this.docStyles[cur_index] = new CStyleImage(style.Name, cur_index, c_oAscStyleImage.Document, style.uiPriority);
// алгоритм смены имени
......@@ -5968,45 +5980,68 @@ function CStylesPainter()
if (this.IsRetinaEnabled)
dKoefToMM /= 2;
var y = index * dKoefToMM * this.STYLE_THUMBNAIL_HEIGHT;
var b = (index + 1) * dKoefToMM * this.STYLE_THUMBNAIL_HEIGHT;
var w = dKoefToMM * this.STYLE_THUMBNAIL_WIDTH;
if (window["flat_desine"] !== true)
{
var y = index * dKoefToMM * this.STYLE_THUMBNAIL_HEIGHT;
var b = (index + 1) * dKoefToMM * this.STYLE_THUMBNAIL_HEIGHT;
var w = dKoefToMM * this.STYLE_THUMBNAIL_WIDTH;
graphics.transform(1,0,0,1,0,0);
graphics.save();
graphics._s();
graphics._m(-0.5, y);
graphics._l(w, y);
graphics._l(w, b);
graphics._l(0, b);
graphics._z();
graphics.clip();
graphics.t(this.CurrentTranslate.StylesText, 0.5, (y + b) / 2);
var ctx = graphics.m_oContext;
ctx.setTransform(1,0,0,1,0,0);
ctx.fillStyle = "#E8E8E8";
var _b = (index + 1) * this.STYLE_THUMBNAIL_HEIGHT - 1.5;
var _x = 2;
var _w = this.STYLE_THUMBNAIL_WIDTH - 4;
var _h = (this.STYLE_THUMBNAIL_HEIGHT / 3) >> 0;
ctx.beginPath();
ctx.moveTo(_x, _b - _h);
ctx.lineTo(_x + _w, _b - _h);
ctx.lineTo(_x + _w, _b);
ctx.lineTo(_x, _b);
ctx.closePath();
ctx.fill();
graphics.transform(1,0,0,1,0,0);
graphics.save();
graphics._s();
graphics._m(-0.5, y);
graphics._l(w, y);
graphics._l(w, b);
graphics._l(0, b);
graphics._z();
graphics.clip();
graphics.t(this.CurrentTranslate.StylesText, 0.5, (y + b) / 2);
var ctx = graphics.m_oContext;
ctx.setTransform(1,0,0,1,0,0);
ctx.fillStyle = "#E8E8E8";
ctx.lineWidth = 1;
ctx.strokeStyle = "#D8D8D8";
ctx.beginPath();
ctx.rect(0.5, index * this.STYLE_THUMBNAIL_HEIGHT + 0.5, this.STYLE_THUMBNAIL_WIDTH - 1, this.STYLE_THUMBNAIL_HEIGHT - 1);
var _b = (index + 1) * this.STYLE_THUMBNAIL_HEIGHT - 1.5;
var _x = 2;
var _w = this.STYLE_THUMBNAIL_WIDTH - 4;
var _h = (this.STYLE_THUMBNAIL_HEIGHT / 3) >> 0;
ctx.beginPath();
ctx.moveTo(_x, _b - _h);
ctx.lineTo(_x + _w, _b - _h);
ctx.lineTo(_x + _w, _b);
ctx.lineTo(_x, _b);
ctx.closePath();
ctx.fill();
ctx.stroke();
ctx.lineWidth = 1;
ctx.strokeStyle = "#D8D8D8";
ctx.beginPath();
ctx.rect(0.5, index * this.STYLE_THUMBNAIL_HEIGHT + 0.5, this.STYLE_THUMBNAIL_WIDTH - 1, this.STYLE_THUMBNAIL_HEIGHT - 1);
ctx.stroke();
graphics.restore();
graphics.restore();
}
else
{
var y = index * dKoefToMM * this.STYLE_THUMBNAIL_HEIGHT;
var b = (index + 1) * dKoefToMM * this.STYLE_THUMBNAIL_HEIGHT;
var w = dKoefToMM * this.STYLE_THUMBNAIL_WIDTH;
graphics.transform(1,0,0,1,0,0);
graphics.save();
graphics._s();
graphics._m(0, y);
graphics._l(w, y);
graphics._l(w, b);
graphics._l(0, b);
graphics._z();
graphics.clip();
graphics.t(style.Name, 0.5, y + 0.75 * (b - y));
graphics.restore();
}
}
}
\ No newline at end of file
......@@ -44,6 +44,8 @@ if (AscBrowser.isIE || window.opera)
}
}
var global_style_color = "#B0B0B0";
function CEditorPage(api)
{
this.Name = "";
......@@ -3031,7 +3033,7 @@ function CEditorPage(api)
return;
var context = canvas.getContext("2d");
context.fillStyle = "#B0B0B0";
context.fillStyle = global_style_color;
//this.m_oBoundsController.Clear(context);
// сначала посморим, изменились ли ректы страниц
......
......@@ -416,7 +416,7 @@ function CHorRuler()
else
context.setTransform(2, 0, 0, 2, 10, 0);
context.fillStyle = "#B0B0B0";
context.fillStyle = global_style_color;
context.fillRect(0, 0, this.m_oCanvas.width, this.m_oCanvas.height);
// ���������� ����� ���������
......@@ -599,7 +599,7 @@ function CHorRuler()
var _count = markup.Cols.length;
if (0 != _count)
{
context.fillStyle = "#B0B0B0";
context.fillStyle = global_style_color;
context.strokeStyle = "#929292";
var _offset = markup.X;
......@@ -1948,7 +1948,7 @@ function CVerRuler()
else
context.setTransform(2, 0, 0, 2, 0, 10);
context.fillStyle = "#B0B0B0";
context.fillStyle = global_style_color;
context.fillRect(0, 0, this.m_oCanvas.width, this.m_oCanvas.height);
var top_margin = 0;
......@@ -2150,7 +2150,7 @@ function CVerRuler()
var start_dark = (((markup.Rows[0].Y + markup.Rows[0].H) * dKoef_mm_to_pix) >> 0) + 0.5;
var end_dark = 0;
context.fillStyle = "#B0B0B0";
context.fillStyle = global_style_color;
context.strokeStyle = "#929292";
var _x = this.m_nLeft + 0.5;
......
......@@ -1087,6 +1087,11 @@ asc_docs_api.prototype.DecreaseReaderFontSize = function()
asc_docs_api.prototype.CreateCSS = function()
{
if (window["flat_desine"] === true)
{
global_style_color = "#CBCBCB";
}
var _head = document.getElementsByTagName('head')[0];
var style0 = document.createElement('style');
......@@ -1097,7 +1102,7 @@ asc_docs_api.prototype.CreateCSS = function()
var style1 = document.createElement('style');
style1.type = 'text/css';
style1.innerHTML = ".buttonTabs {\
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAA5CAYAAADUZxCcAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOxAAADsQBlSsOGwAAAUVJREFUWEftlr9OhEAQhwex4i0srXwWXsCERhsTKwoaCLWViY2WvgC8ipXlvQOE/wHMbGa5nHe77J57ykW+ZLLshPyyswlfsNI0HcEQF7QawWjYNObH54Y1juHm+oqtO2EPd7esqcPL2/sUttw7O9OwMAwhiiLazSMNK4qClSrSsLIsWakye7Kqqmg3zyWtB2maBmzbBs/zwHGcqeI4pjd2kZ6sbVvo+x6GYZhqHMWSWe7ndBprmMDomGdwZ6tplfm7MDRvEAS020crrOs6qOuadvtohWGQzLxaYWhdmXmlpsU7QkGicXnQ0WPiHWEQjsaDsCdiNa0+RsdcbtjptO0/3rOmDk/Pr6u2f4BSmO/7rOb4/ZPNSZGjFJbnOWRZRjsxQm27rktPW7BnWRb7r02ShLpbhCfjzv9eXOGHWO7n9C+0DfAFUOr1fzFrfLcAAAAASUVORK5CYII=);\
background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABMAAAA5CAYAAADUZxCcAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAOwwAADsMBx2+oZAAAABp0RVh0U29mdHdhcmUAUGFpbnQuTkVUIHYzLjUuMTAw9HKhAAABP0lEQVRYR+2Wu6qFMBBFz5fZKCgoVr4q8YE2+hOnOuX9FX/M1jaXCRyJZOOdDOJtLBaGnWRhJjj4WpblMmAoBYZS9sH786OkQNm6rs48MrzhDLZsmiY1z7OVm7BlTdOotm2t3IQtK4pClWVp5SZsWRzHKk1TKzdhy4IgUGEYamFVVarrOquGbJnneVqYJIk+MtWQLsVcw5ZxuEcmxZJdAQylwFDKPkC14AJl6Lb+4pHhDWeIZfSRj+N4yMQyEtV1fcjEMhJlWXbIxLI8z3X3NTO2jGo0DIN+IxJRk/R9/7CGLfvWiI5GIuq61H3NNWwZh3tkUizZFcBQCgylwFDKPkCF5QJl27Y588jwhjOcZdSKCDT3vzL6/ez7Hs45y6jLEmiOJaMfY0QURfrpJKP2fIaTjMs9MimW7ApgKGN5/QLYSxIfSlbxIQAAAABJRU5ErkJggg==);\
background-position: 0px 0px;\
background-repeat: no-repeat;\
}";
......@@ -1137,7 +1142,7 @@ asc_docs_api.prototype.CreateComponents = function()
var element = document.getElementById(this.HtmlElementName);
if (element != null)
element.innerHTML = "<div id=\"id_main\" class=\"block_elem\" style=\"-moz-user-select:none;-khtml-user-select:none;user-select:none;background-color:#B0B0B0;overflow:hidden;\" UNSELECTABLE=\"on\">\
element.innerHTML = "<div id=\"id_main\" class=\"block_elem\" style=\"-moz-user-select:none;-khtml-user-select:none;user-select:none;background-color:" + global_style_color + ";overflow:hidden;\" UNSELECTABLE=\"on\">\
<div id=\"id_panel_left\" class=\"block_elem\">\
<div id=\"id_buttonTabs\" class=\"block_elem buttonTabs\"></div>\
<canvas id=\"id_vert_ruler\" class=\"block_elem\"></canvas>\
......@@ -1146,12 +1151,12 @@ asc_docs_api.prototype.CreateComponents = function()
<canvas id=\"id_hor_ruler\" class=\"block_elem\"></canvas>\
</div>\
<div id=\"id_main_view\" class=\"block_elem\" style=\"overflow:hidden\">\
<canvas id=\"id_viewer\" class=\"block_elem\" style=\"background-color:#B0B0B0;z-index:1\"></canvas>\
<canvas id=\"id_viewer\" class=\"block_elem\" style=\"background-color:" + global_style_color + ";z-index:1\"></canvas>\
<canvas id=\"id_viewer_overlay\" class=\"block_elem\" style=\"z-index:2\"></canvas>\
<canvas id=\"id_target_cursor\" class=\"block_elem\" width=\"1\" height=\"1\" style=\"width:2px;height:13px;display:none;z-index:3;\"></canvas>\
</div>\
</div>\
<div id=\"id_panel_right\" class=\"block_elem\" style=\"margin-right:1px;background-color:#B0B0B0;\">\
<div id=\"id_panel_right\" class=\"block_elem\" style=\"margin-right:1px;background-color:" + global_style_color + ";\">\
<div id=\"id_buttonRulers\" class=\"block_elem buttonRuler\"></div>\
<div id=\"id_vertical_scroll\" style=\"left:0;top:0;width:16px;overflow:hidden;position:absolute;\">\
<div id=\"panel_right_scroll\" class=\"block_elem\" style=\"left:0;top:0;width:16px;height:6000px;\"></div>\
......@@ -1159,7 +1164,7 @@ asc_docs_api.prototype.CreateComponents = function()
<div id=\"id_buttonPrevPage\" class=\"block_elem buttonPrevPage\"></div>\
<div id=\"id_buttonNextPage\" class=\"block_elem buttonNextPage\"></div>\
</div>\
<div id=\"id_horscrollpanel\" class=\"block_elem\" style=\"margin-bottom:1px;background-color:#B0B0B0;\">\
<div id=\"id_horscrollpanel\" class=\"block_elem\" style=\"margin-bottom:1px;background-color:" + global_style_color + ";\">\
<div id=\"id_horizontal_scroll\" style=\"left:0;top:0;height:16px;overflow:hidden;position:absolute;width:100%;\">\
<div id=\"panel_hor_scroll\" class=\"block_elem\" style=\"left:0;top:0;width:6000px;height:16px;\"></div>\
</div>\
......@@ -9700,7 +9705,7 @@ window["asc_docs_api"].prototype["asc_nativeCheckPdfRenderer"] = function(_memor
_printer.Memory = _memory1;
_printer.VectorMemoryForPrint = _memory2;
return _printer;
},
}
window["asc_docs_api"].prototype["asc_nativeCalculate"] = function()
{
......
......@@ -395,4 +395,6 @@ var c_oAscDropCap =
None : 0,
Drop : 1,
Margin : 2
};
\ No newline at end of file
};
window["flat_desine"] = true;
\ No newline at end of file
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