Commit ff4081a2 authored by Oleg Korshul's avatar Oleg Korshul

reader mode & presentation copy/paste new scheme

parent dc7312fa
...@@ -273,7 +273,7 @@ function CTableOutlineDr() ...@@ -273,7 +273,7 @@ function CTableOutlineDr()
var _dist = 15 * g_dKoef_pix_to_mm * 100 / word_control.m_nZoomValue; var _dist = 15 * g_dKoef_pix_to_mm * 100 / word_control.m_nZoomValue;
if ((Math.abs(_pos.X - this.ChangeSmallPoint.X) < _dist) && (Math.abs(_pos.Y - this.ChangeSmallPoint.Y) < _dist) && (_pos.Page == this.ChangeSmallPoint.Page)) if ((Math.abs(_pos.X - this.ChangeSmallPoint.X) < _dist) && (Math.abs(_pos.Y - this.ChangeSmallPoint.Y) < _dist) && (_pos.Page == this.ChangeSmallPoint.Page))
{ {
this.CurPos = { X: this.ChangeSmallPoint.X, Y : this.ChangeSmallPoint.Y, Page: this.ChangeSmallPoint.Page }; this.CurPos = {X : this.ChangeSmallPoint.X, Y : this.ChangeSmallPoint.Y, Page : this.ChangeSmallPoint.Page};
switch (this.TrackTablePos) switch (this.TrackTablePos)
{ {
...@@ -500,7 +500,7 @@ CDrawingCollaborativeTarget.prototype = ...@@ -500,7 +500,7 @@ CDrawingCollaborativeTarget.prototype =
this.HtmlElement.height = 1; this.HtmlElement.height = 1;
this.Color = AscCommon.getUserColorById(this.ShortId, null, true); this.Color = AscCommon.getUserColorById(this.ShortId, null, true);
this.Style ="rgb(" + this.Color.r + "," + this.Color.g + "," + this.Color.b + ")"; this.Style = "rgb(" + this.Color.r + "," + this.Color.g + "," + this.Color.b + ")";
} }
// 2) определяем размер // 2) определяем размер
...@@ -575,7 +575,7 @@ CDrawingCollaborativeTarget.prototype = ...@@ -575,7 +575,7 @@ CDrawingCollaborativeTarget.prototype =
ctx.strokeStyle = this.Style; ctx.strokeStyle = this.Style;
ctx.lineWidth = 2; ctx.lineWidth = 2;
if (((pos1.X - pos2.X)*(pos1.Y - pos2.Y)) >= 0) if (((pos1.X - pos2.X) * (pos1.Y - pos2.Y)) >= 0)
{ {
ctx.moveTo(0, 0); ctx.moveTo(0, 0);
ctx.lineTo(_newW, _newH); ctx.lineTo(_newW, _newH);
...@@ -713,7 +713,7 @@ function CDrawingDocument() ...@@ -713,7 +713,7 @@ function CDrawingDocument()
this.CanvasHit.height = 10; this.CanvasHit.height = 10;
this.CanvasHitContext = this.CanvasHit.getContext('2d'); this.CanvasHitContext = this.CanvasHit.getContext('2d');
this.TargetCursorColor = {R: 0, G: 0, B: 0}; this.TargetCursorColor = {R : 0, G : 0, B : 0};
this.TableStylesLastLook = null; this.TableStylesLastLook = null;
...@@ -764,7 +764,7 @@ function CDrawingDocument() ...@@ -764,7 +764,7 @@ function CDrawingDocument()
this.ConvertCoordsToAnotherPage = function(x, y) this.ConvertCoordsToAnotherPage = function(x, y)
{ {
return {X: x, Y: y}; return {X : x, Y : y};
}; };
this.SetCursorType = function(sType, Data) this.SetCursorType = function(sType, Data)
...@@ -778,10 +778,10 @@ function CDrawingDocument() ...@@ -778,10 +778,10 @@ function CDrawingDocument()
} }
else else
this.m_oWordControl.m_oMainContent.HtmlElement.style.cursor = this.m_sLockedCursorType; this.m_oWordControl.m_oMainContent.HtmlElement.style.cursor = this.m_sLockedCursorType;
if ( "undefined" === typeof(Data) || null === Data ) if ("undefined" === typeof(Data) || null === Data)
Data = new AscCommon.CMouseMoveData(); Data = new AscCommon.CMouseMoveData();
editor.sync_MouseMoveCallback( Data ); editor.sync_MouseMoveCallback(Data);
} }
this.LockCursorType = function(sType) this.LockCursorType = function(sType)
{ {
...@@ -809,7 +809,8 @@ function CDrawingDocument() ...@@ -809,7 +809,8 @@ function CDrawingDocument()
} }
this.StartTrackTable = function() this.StartTrackTable = function()
{}; {
};
this.OnRecalculatePage = function(index, pageObject) this.OnRecalculatePage = function(index, pageObject)
{ {
...@@ -1089,14 +1090,14 @@ function CDrawingDocument() ...@@ -1089,14 +1090,14 @@ function CDrawingDocument()
var _oldTurn = editor.isViewMode; var _oldTurn = editor.isViewMode;
editor.isViewMode = true; editor.isViewMode = true;
var docContent = new CDocumentContent(this.m_oWordControl.m_oLogicDocument, this.m_oWordControl.m_oDrawingDocument, 0, 0,1000, 1000, false, false, true); var docContent = new CDocumentContent(this.m_oWordControl.m_oLogicDocument, this.m_oWordControl.m_oDrawingDocument, 0, 0, 1000, 1000, false, false, true);
var par = docContent.Content[0]; var par = docContent.Content[0];
par.Cursor_MoveToStartPos(); par.Cursor_MoveToStartPos();
par.Set_Pr(new CParaPr()); par.Set_Pr(new CParaPr());
var _textPr = new CTextPr(); var _textPr = new CTextPr();
_textPr.FontFamily = { Name : "Arial", Index : -1 }; _textPr.FontFamily = {Name : "Arial", Index : -1};
_textPr.Strikeout = this.GuiLastTextProps.Strikeout; _textPr.Strikeout = this.GuiLastTextProps.Strikeout;
...@@ -1114,14 +1115,15 @@ function CDrawingDocument() ...@@ -1114,14 +1115,15 @@ function CDrawingDocument()
_textPr.Spacing = this.GuiLastTextProps.TextSpacing; _textPr.Spacing = this.GuiLastTextProps.TextSpacing;
_textPr.Position = this.GuiLastTextProps.Position; _textPr.Position = this.GuiLastTextProps.Position;
var parRun = new ParaRun(par); var Pos = 0; var parRun = new ParaRun(par);
var Pos = 0;
parRun.Set_Pr(_textPr); parRun.Set_Pr(_textPr);
parRun.Add_ToContent(Pos++,new ParaText("H"), false); parRun.Add_ToContent(Pos++, new ParaText("H"), false);
parRun.Add_ToContent(Pos++,new ParaText("e"), false); parRun.Add_ToContent(Pos++, new ParaText("e"), false);
parRun.Add_ToContent(Pos++,new ParaText("l"), false); parRun.Add_ToContent(Pos++, new ParaText("l"), false);
parRun.Add_ToContent(Pos++,new ParaText("l"), false); parRun.Add_ToContent(Pos++, new ParaText("l"), false);
parRun.Add_ToContent(Pos++,new ParaText("o"), false); parRun.Add_ToContent(Pos++, new ParaText("o"), false);
parRun.Add_ToContent(Pos++,new ParaSpace(1), false); parRun.Add_ToContent(Pos++, new ParaSpace(1), false);
parRun.Add_ToContent(Pos++, new ParaText("W"), false); parRun.Add_ToContent(Pos++, new ParaText("W"), false);
parRun.Add_ToContent(Pos++, new ParaText("o"), false); parRun.Add_ToContent(Pos++, new ParaText("o"), false);
parRun.Add_ToContent(Pos++, new ParaText("r"), false); parRun.Add_ToContent(Pos++, new ParaText("r"), false);
...@@ -1183,7 +1185,7 @@ function CDrawingDocument() ...@@ -1183,7 +1185,7 @@ function CDrawingDocument()
graphics.m_oCoordTransform.tx = _xOffset; graphics.m_oCoordTransform.tx = _xOffset;
graphics.m_oCoordTransform.ty = _yOffset; graphics.m_oCoordTransform.ty = _yOffset;
graphics.transform(1,0,0,1,0,0); graphics.transform(1, 0, 0, 1, 0, 0);
var old_marks = this.m_oWordControl.m_oApi.ShowParaMarks; var old_marks = this.m_oWordControl.m_oApi.ShowParaMarks;
this.m_oWordControl.m_oApi.ShowParaMarks = false; this.m_oWordControl.m_oApi.ShowParaMarks = false;
...@@ -1228,7 +1230,7 @@ function CDrawingDocument() ...@@ -1228,7 +1230,7 @@ function CDrawingDocument()
if ((_y + _h) > overlay.max_y) if ((_y + _h) > overlay.max_y)
overlay.max_y = _y + _h; overlay.max_y = _y + _h;
ctx.rect(_x,_y,_w,_h); ctx.rect(_x, _y, _w, _h);
} }
else else
{ {
...@@ -1294,7 +1296,7 @@ function CDrawingDocument() ...@@ -1294,7 +1296,7 @@ function CDrawingDocument()
if ((_y + _h) > overlay.max_y) if ((_y + _h) > overlay.max_y)
overlay.max_y = _y + _h; overlay.max_y = _y + _h;
ctx.rect(_x,_y,_w,_h); ctx.rect(_x, _y, _w, _h);
} }
else else
{ {
...@@ -1371,7 +1373,7 @@ function CDrawingDocument() ...@@ -1371,7 +1373,7 @@ function CDrawingDocument()
var dKoef = (100 * g_dKoef_pix_to_mm / this.m_oWordControl.m_nZoomValue); var dKoef = (100 * g_dKoef_pix_to_mm / this.m_oWordControl.m_nZoomValue);
var Pos = { X : 0, Y : 0, Page: this.SlideCurrent }; var Pos = {X : 0, Y : 0, Page : this.SlideCurrent};
if (this.SlideCurrent != -1) if (this.SlideCurrent != -1)
{ {
...@@ -1428,7 +1430,7 @@ function CDrawingDocument() ...@@ -1428,7 +1430,7 @@ function CDrawingDocument()
var x_pix = (this.SlideCurrectRect.left + __x * dKoef + (_word_control.m_oMainContent.AbsolutePosition.L + _word_control.m_oMainView.AbsolutePosition.L) * g_dKoef_mm_to_pix) >> 0; var x_pix = (this.SlideCurrectRect.left + __x * dKoef + (_word_control.m_oMainContent.AbsolutePosition.L + _word_control.m_oMainView.AbsolutePosition.L) * g_dKoef_mm_to_pix) >> 0;
var y_pix = (this.SlideCurrectRect.top + __y * dKoef + (_word_control.m_oMainContent.AbsolutePosition.T + _word_control.m_oMainView.AbsolutePosition.T) * g_dKoef_mm_to_pix) >> 0; var y_pix = (this.SlideCurrectRect.top + __y * dKoef + (_word_control.m_oMainContent.AbsolutePosition.T + _word_control.m_oMainView.AbsolutePosition.T) * g_dKoef_mm_to_pix) >> 0;
return { X : x_pix, Y : y_pix, Error: false }; return {X : x_pix, Y : y_pix, Error : false};
} }
this.ConvertCoordsToCursorWR_2 = function(x, y) this.ConvertCoordsToCursorWR_2 = function(x, y)
...@@ -1442,7 +1444,7 @@ function CDrawingDocument() ...@@ -1442,7 +1444,7 @@ function CDrawingDocument()
x_pix += _word_control.X; x_pix += _word_control.X;
y_pix += _word_control.Y; y_pix += _word_control.Y;
return { X : x_pix, Y : y_pix, Error: false }; return {X : x_pix, Y : y_pix, Error : false};
} }
this.ConvertCoordsToCursorWR_Comment = function(x, y) this.ConvertCoordsToCursorWR_Comment = function(x, y)
...@@ -1456,7 +1458,7 @@ function CDrawingDocument() ...@@ -1456,7 +1458,7 @@ function CDrawingDocument()
x_pix += COMMENT_WIDTH; x_pix += COMMENT_WIDTH;
y_pix += ((COMMENT_HEIGHT / 3) >> 0); y_pix += ((COMMENT_HEIGHT / 3) >> 0);
return { X : x_pix, Y : y_pix, Error: false }; return {X : x_pix, Y : y_pix, Error : false};
} }
this.ConvertCoordsToCursor = function(x, y) this.ConvertCoordsToCursor = function(x, y)
...@@ -1467,14 +1469,14 @@ function CDrawingDocument() ...@@ -1467,14 +1469,14 @@ function CDrawingDocument()
var x_pix = (this.SlideCurrectRect.left + x * dKoef) >> 0; var x_pix = (this.SlideCurrectRect.left + x * dKoef) >> 0;
var y_pix = (this.SlideCurrectRect.top + y * dKoef) >> 0; var y_pix = (this.SlideCurrectRect.top + y * dKoef) >> 0;
return { X : x_pix, Y : y_pix, Error: false }; return {X : x_pix, Y : y_pix, Error : false};
} }
this.TargetStart = function() this.TargetStart = function()
{ {
if ( this.m_lTimerTargetId != -1 ) if (this.m_lTimerTargetId != -1)
clearInterval( this.m_lTimerTargetId ); clearInterval(this.m_lTimerTargetId);
this.m_lTimerTargetId = setInterval( oThis.DrawTarget, 500 ); this.m_lTimerTargetId = setInterval(oThis.DrawTarget, 500);
} }
this.TargetEnd = function() this.TargetEnd = function()
{ {
...@@ -1483,7 +1485,7 @@ function CDrawingDocument() ...@@ -1483,7 +1485,7 @@ function CDrawingDocument()
this.TargetShowFlag = false; this.TargetShowFlag = false;
this.TargetShowNeedFlag = false; this.TargetShowNeedFlag = false;
clearInterval( this.m_lTimerTargetId ); clearInterval(this.m_lTimerTargetId);
this.m_lTimerTargetId = -1; this.m_lTimerTargetId = -1;
this.TargetHtmlElement.style.display = "none"; this.TargetHtmlElement.style.display = "none";
...@@ -1553,7 +1555,7 @@ function CDrawingDocument() ...@@ -1553,7 +1555,7 @@ function CDrawingDocument()
ctx.strokeStyle = this.GetTargetStyle(); ctx.strokeStyle = this.GetTargetStyle();
ctx.lineWidth = 2; ctx.lineWidth = 2;
if (((pos1.X - pos2.X)*(pos1.Y - pos2.Y)) >= 0) if (((pos1.X - pos2.X) * (pos1.Y - pos2.Y)) >= 0)
{ {
ctx.moveTo(0, 0); ctx.moveTo(0, 0);
ctx.lineTo(_newW, _newH); ctx.lineTo(_newW, _newH);
...@@ -1612,7 +1614,7 @@ function CDrawingDocument() ...@@ -1612,7 +1614,7 @@ function CDrawingDocument()
this.UpdateTarget = function(x, y, pageIndex) this.UpdateTarget = function(x, y, pageIndex)
{ {
this.m_oWordControl.m_oLogicDocument.Set_TargetPos( x, y, pageIndex ); this.m_oWordControl.m_oLogicDocument.Set_TargetPos(x, y, pageIndex);
if (pageIndex != this.SlideCurrent) if (pageIndex != this.SlideCurrent)
{ {
// сначала выставим страницу // сначала выставим страницу
...@@ -1725,7 +1727,7 @@ function CDrawingDocument() ...@@ -1725,7 +1727,7 @@ function CDrawingDocument()
} }
this.DrawTarget = function() this.DrawTarget = function()
{ {
if ( 0 != oThis.SlidesCount && "block" != oThis.TargetHtmlElement.style.display && oThis.NeedTarget && !oThis.TransitionSlide.IsPlaying()) if (0 != oThis.SlidesCount && "block" != oThis.TargetHtmlElement.style.display && oThis.NeedTarget && !oThis.TransitionSlide.IsPlaying())
oThis.TargetHtmlElement.style.display = "block"; oThis.TargetHtmlElement.style.display = "block";
else else
oThis.TargetHtmlElement.style.display = "none"; oThis.TargetHtmlElement.style.display = "none";
...@@ -1748,7 +1750,7 @@ function CDrawingDocument() ...@@ -1748,7 +1750,7 @@ function CDrawingDocument()
this.TargetShowNeedFlag = false; this.TargetShowNeedFlag = false;
if ( -1 == this.m_lTimerTargetId ) if (-1 == this.m_lTimerTargetId)
this.TargetStart(); this.TargetStart();
if (oThis.NeedTarget) if (oThis.NeedTarget)
...@@ -1805,9 +1807,9 @@ function CDrawingDocument() ...@@ -1805,9 +1807,9 @@ function CDrawingDocument()
this.m_oWordControl.m_oOverlayApi.m_oContext.globalAlpha = 0.2; this.m_oWordControl.m_oOverlayApi.m_oContext.globalAlpha = 0.2;
} }
var navigator = { Page : rects[0].PageNum, Place : rects.slice(0, _len) }; var navigator = {Page : rects[0].PageNum, Place : rects.slice(0, _len)};
var _find = { text: findText, navigator : navigator }; var _find = {text : findText, navigator : navigator};
this.m_oWordControl.m_oApi.sync_SearchFoundCallback(_find); this.m_oWordControl.m_oApi.sync_SearchFoundCallback(_find);
var is_update = false; var is_update = false;
...@@ -1882,7 +1884,7 @@ function CDrawingDocument() ...@@ -1882,7 +1884,7 @@ function CDrawingDocument()
if (_b > overlay.max_y) if (_b > overlay.max_y)
overlay.max_y = _b; overlay.max_y = _b;
overlay.m_oContext.rect(_x, _y, _r - _x + 1,_b - _y + 1); overlay.m_oContext.rect(_x, _y, _r - _x + 1, _b - _y + 1);
} }
else else
{ {
...@@ -2163,7 +2165,7 @@ function CDrawingDocument() ...@@ -2163,7 +2165,7 @@ function CDrawingDocument()
this.GetMMPerDot = function(value) this.GetMMPerDot = function(value)
{ {
return value / this.GetDotsPerMM( 1 ); return value / this.GetDotsPerMM(1);
} }
this.GetVisibleMMHeight = function() this.GetVisibleMMHeight = function()
{ {
...@@ -2306,7 +2308,7 @@ function CDrawingDocument() ...@@ -2306,7 +2308,7 @@ function CDrawingDocument()
var arr_colors = new Array(10); var arr_colors = new Array(10);
var _theme = _master.Theme; var _theme = _master.Theme;
var rgba = {R:0, G:0, B:0, A:255}; var rgba = {R : 0, G : 0, B : 0, A : 255};
// bg1,tx1,bg2,tx2,accent1 - accent6 // bg1,tx1,bg2,tx2,accent1 - accent6
var array_colors_types = [6, 15, 7, 16, 0, 1, 2, 3, 4, 5]; var array_colors_types = [6, 15, 7, 16, 0, 1, 2, 3, 4, 5];
var _count = array_colors_types.length; var _count = array_colors_types.length;
...@@ -2391,7 +2393,7 @@ function CDrawingDocument() ...@@ -2391,7 +2393,7 @@ function CDrawingDocument()
var dst_mods = new AscFormat.CColorModifiers(); var dst_mods = new AscFormat.CColorModifiers();
dst_mods.Mods = AscCommon.GetDefaultMods(_color_src.r, _color_src.g, _color_src.b, j + 1, 0); dst_mods.Mods = AscCommon.GetDefaultMods(_color_src.r, _color_src.g, _color_src.b, j + 1, 0);
var _rgba = {R:_color_src.r, G: _color_src.g, B:_color_src.b, A: 255}; var _rgba = {R : _color_src.r, G : _color_src.g, B : _color_src.b, A : 255};
dst_mods.Apply(_rgba); dst_mods.Apply(_rgba);
_ret_array[_cur_index] = new CColor(_rgba.R, _rgba.G, _rgba.B); _ret_array[_cur_index] = new CColor(_rgba.R, _rgba.G, _rgba.B);
...@@ -2461,7 +2463,7 @@ function CDrawingDocument() ...@@ -2461,7 +2463,7 @@ function CDrawingDocument()
var _theme = this.m_oWordControl.MasterLayouts.Theme; var _theme = this.m_oWordControl.MasterLayouts.Theme;
var _extra = _theme.extraClrSchemeLst; var _extra = _theme.extraClrSchemeLst;
var _count = _extra.length; var _count = _extra.length;
var _rgba = {R:0, G: 0, B: 0, A: 255}; var _rgba = {R : 0, G : 0, B : 0, A : 255};
for (var i = 0; i < _count; ++i) for (var i = 0; i < _count; ++i)
{ {
var _scheme = _extra[i].clrScheme; var _scheme = _extra[i].clrScheme;
...@@ -2664,7 +2666,6 @@ function CDrawingDocument() ...@@ -2664,7 +2666,6 @@ function CDrawingDocument()
} }
this.DrawImageTextureFillTextArt = function(url) this.DrawImageTextureFillTextArt = function(url)
{ {
if (this.GuiCanvasFillTextureTextArt == null) if (this.GuiCanvasFillTextureTextArt == null)
...@@ -2840,7 +2841,7 @@ function CDrawingDocument() ...@@ -2840,7 +2841,7 @@ function CDrawingDocument()
var graphics = new AscCommon.CGraphics(); var graphics = new AscCommon.CGraphics();
graphics.init(ctx, _canvas.width, _canvas.height, _pageW, _pageH); graphics.init(ctx, _canvas.width, _canvas.height, _pageW, _pageH);
graphics.m_oFontManager = AscCommon.g_fontManager; graphics.m_oFontManager = AscCommon.g_fontManager;
graphics.transform(1,0,0,1,0,0); graphics.transform(1, 0, 0, 1, 0, 0);
logicDoc.TablesForInterface[i].graphicObject.Draw(0, graphics); logicDoc.TablesForInterface[i].graphicObject.Draw(0, graphics);
var _styleD = new CAscTableStyle(); var _styleD = new CAscTableStyle();
...@@ -2884,7 +2885,7 @@ function CDrawingDocument() ...@@ -2884,7 +2885,7 @@ function CDrawingDocument()
{ {
if (this.m_oWordControl.m_oApi.ShowSnapLines) if (this.m_oWordControl.m_oApi.ShowSnapLines)
{ {
this.HorVerAnchors.push({ Type : 0, Pos : xPos }); this.HorVerAnchors.push({Type : 0, Pos : xPos});
} }
return; return;
} }
...@@ -2904,7 +2905,7 @@ function CDrawingDocument() ...@@ -2904,7 +2905,7 @@ function CDrawingDocument()
{ {
if (this.m_oWordControl.m_oApi.ShowSnapLines) if (this.m_oWordControl.m_oApi.ShowSnapLines)
{ {
this.HorVerAnchors.push({ Type : 1, Pos : yPos }); this.HorVerAnchors.push({Type : 1, Pos : yPos});
} }
return; return;
} }
...@@ -3107,15 +3108,18 @@ function CThumbnailsManager() ...@@ -3107,15 +3108,18 @@ function CThumbnailsManager()
this.initEvents2MobileAdvances = function() this.initEvents2MobileAdvances = function()
{ {
var control = this.m_oWordControl.m_oThumbnails.HtmlElement; var control = this.m_oWordControl.m_oThumbnails.HtmlElement;
control["ontouchstart"] = function (e){ control["ontouchstart"] = function(e)
{
oThis.onMouseDown(e.touches[0]); oThis.onMouseDown(e.touches[0]);
return false; return false;
} }
control["ontouchmove"] = function (e){ control["ontouchmove"] = function(e)
{
oThis.onMouseMove(e.touches[0]); oThis.onMouseMove(e.touches[0]);
return false; return false;
} }
control["ontouchend"] = function (e){ control["ontouchend"] = function(e)
{
oThis.onMouseUp(e.changedTouches[0]); oThis.onMouseUp(e.changedTouches[0]);
return false; return false;
} }
...@@ -3127,10 +3131,12 @@ function CThumbnailsManager() ...@@ -3127,10 +3131,12 @@ function CThumbnailsManager()
return null; return null;
var drawRect = this.m_arrPages[pageIndex]; var drawRect = this.m_arrPages[pageIndex];
var _ret = { X : this.m_oWordControl.X + drawRect.left, var _ret = {
X : this.m_oWordControl.X + drawRect.left,
Y : this.m_oWordControl.X + drawRect.top, Y : this.m_oWordControl.X + drawRect.top,
W : drawRect.right - drawRect.left + 1, W : drawRect.right - drawRect.left + 1,
H : drawRect.bottom - drawRect.top + 1}; H : drawRect.bottom - drawRect.top + 1
};
return _ret; return _ret;
} }
...@@ -3736,11 +3742,11 @@ function CThumbnailsManager() ...@@ -3736,11 +3742,11 @@ function CThumbnailsManager()
var bBold = true === font.Bold; var bBold = true === font.Bold;
var oFontStyle = FontStyle.FontStyleRegular; var oFontStyle = FontStyle.FontStyleRegular;
if ( !bItalic && bBold ) if (!bItalic && bBold)
oFontStyle = FontStyle.FontStyleBold; oFontStyle = FontStyle.FontStyleBold;
else if ( bItalic && !bBold ) else if (bItalic && !bBold)
oFontStyle = FontStyle.FontStyleItalic; oFontStyle = FontStyle.FontStyleItalic;
else if ( bItalic && bBold ) else if (bItalic && bBold)
oFontStyle = FontStyle.FontStyleBoldItalic; oFontStyle = FontStyle.FontStyleBoldItalic;
g_fontApplication.LoadFont(font.FontFamily.Name, AscCommon.g_font_loader, this.m_oFontManager, font.FontSize, oFontStyle, 96, 96); g_fontApplication.LoadFont(font.FontFamily.Name, AscCommon.g_font_loader, this.m_oFontManager, font.FontSize, oFontStyle, 96, 96);
...@@ -3751,7 +3757,7 @@ function CThumbnailsManager() ...@@ -3751,7 +3757,7 @@ function CThumbnailsManager()
this.m_oFontManager.Initialize(true); this.m_oFontManager.Initialize(true);
this.m_oFontManager.SetHintsProps(true, true); this.m_oFontManager.SetHintsProps(true, true);
var font = { FontFamily : { Name : "Arial", Index : -1}, Italic : false, Bold : false, FontSize : 10 }; var font = {FontFamily : {Name : "Arial", Index : -1}, Italic : false, Bold : false, FontSize : 10};
this.SetFont(font); this.SetFont(font);
// измеряем все цифры // измеряем все цифры
...@@ -3902,12 +3908,12 @@ function CThumbnailsManager() ...@@ -3902,12 +3908,12 @@ function CThumbnailsManager()
// теперь нужно выставить размеры // теперь нужно выставить размеры
var settings = { var settings = {
showArrows: false, showArrows : false,
animateScroll: false, animateScroll : false,
screenW: word_control.m_oThumbnails.HtmlElement.width, screenW : word_control.m_oThumbnails.HtmlElement.width,
screenH: word_control.m_oThumbnails.HtmlElement.height, screenH : word_control.m_oThumbnails.HtmlElement.height,
cornerRadius: 1, cornerRadius : 1,
slimScroll: true, slimScroll : true,
scrollBackgroundColor : GlobalSkin.BackgroundColorThumbnails, scrollBackgroundColor : GlobalSkin.BackgroundColorThumbnails,
scrollBackgroundColorHover : GlobalSkin.BackgroundColorThumbnails, scrollBackgroundColorHover : GlobalSkin.BackgroundColorThumbnails,
scrollBackgroundColorActive : GlobalSkin.BackgroundColorThumbnails scrollBackgroundColorActive : GlobalSkin.BackgroundColorThumbnails
...@@ -3922,9 +3928,10 @@ function CThumbnailsManager() ...@@ -3922,9 +3928,10 @@ function CThumbnailsManager()
} }
else else
{ {
word_control.m_oScrollThumb_ = new AscCommon.ScrollObject( "id_vertical_scroll_thmbnl",settings); word_control.m_oScrollThumb_ = new AscCommon.ScrollObject("id_vertical_scroll_thmbnl", settings);
word_control.m_oScrollThumb_.bind("scrollvertical",function(evt){ word_control.m_oScrollThumb_.bind("scrollvertical", function(evt)
oThis.verticalScroll(this,evt.scrollD,evt.maxScrollY); {
oThis.verticalScroll(this, evt.scrollD, evt.maxScrollY);
}); });
word_control.m_oScrollThumbApi = word_control.m_oScrollThumb_; word_control.m_oScrollThumbApi = word_control.m_oScrollThumb_;
word_control.m_oScrollThumb_.isHorizontalScroll = false; word_control.m_oScrollThumb_.isHorizontalScroll = false;
...@@ -3941,7 +3948,7 @@ function CThumbnailsManager() ...@@ -3941,7 +3948,7 @@ function CThumbnailsManager()
this.m_bIsUpdate = true; this.m_bIsUpdate = true;
} }
this.verticalScroll = function(sender,scrollPositionY,maxY,isAtTop,isAtBottom) this.verticalScroll = function(sender, scrollPositionY, maxY, isAtTop, isAtBottom)
{ {
if (false === this.m_oWordControl.m_oApi.bInit_word_control || false === this.m_bIsScrollVisible) if (false === this.m_oWordControl.m_oApi.bInit_word_control || false === this.m_bIsScrollVisible)
return; return;
...@@ -4061,9 +4068,9 @@ function CThumbnailsManager() ...@@ -4061,9 +4068,9 @@ function CThumbnailsManager()
var g = new AscCommon.CGraphics(); var g = new AscCommon.CGraphics();
g.init(context, _width, _height, _width * g_dKoef_pix_to_mm, _height * g_dKoef_pix_to_mm); g.init(context, _width, _height, _width * g_dKoef_pix_to_mm, _height * g_dKoef_pix_to_mm);
g.m_oFontManager = this.m_oFontManager; g.m_oFontManager = this.m_oFontManager;
g.transform(1,0,0,1,0,0); g.transform(1, 0, 0, 1, 0, 0);
var font = { FontFamily : { Name : "Arial", Index : -1}, Italic : false, Bold : false, FontSize : 10 }; var font = {FontFamily : {Name : "Arial", Index : -1}, Italic : false, Bold : false, FontSize : 10};
g.SetFont(font); g.SetFont(font);
// меряем надпись номера слайда // меряем надпись номера слайда
...@@ -4094,7 +4101,7 @@ function CThumbnailsManager() ...@@ -4094,7 +4101,7 @@ function CThumbnailsManager()
else else
g.b_color1(211, 79, 79, 255); g.b_color1(211, 79, 79, 255);
g.t("" + (i+1), (_digit_distance - num_slide_text_width) / 2, (page.top * g_dKoef_pix_to_mm + 3)); g.t("" + (i + 1), (_digit_distance - num_slide_text_width) / 2, (page.top * g_dKoef_pix_to_mm + 3));
} }
this.OnUpdateOverlay(); this.OnUpdateOverlay();
...@@ -4223,7 +4230,7 @@ function CThumbnailsManager() ...@@ -4223,7 +4230,7 @@ function CThumbnailsManager()
this.FocusRectDraw = function(ctx, x, y, r, b) this.FocusRectDraw = function(ctx, x, y, r, b)
{ {
ctx.rect(x - this.const_border_w, y, r-x + this.const_border_w, b-y); ctx.rect(x - this.const_border_w, y, r - x + this.const_border_w, b - y);
} }
this.FocusRectFlat = function(_color, ctx, x, y, r, b) this.FocusRectFlat = function(_color, ctx, x, y, r, b)
{ {
...@@ -4319,7 +4326,7 @@ function CThumbnailsManager() ...@@ -4319,7 +4326,7 @@ function CThumbnailsManager()
g.init(page.cachedImage.image.ctx, w, h, this.SlideWidth, this.SlideHeight); g.init(page.cachedImage.image.ctx, w, h, this.SlideWidth, this.SlideHeight);
g.m_oFontManager = this.m_oFontManager; g.m_oFontManager = this.m_oFontManager;
g.transform(1,0,0,1,0,0); g.transform(1, 0, 0, 1, 0, 0);
var bIsShowPars = this.m_oWordControl.m_oApi.ShowParaMarks; var bIsShowPars = this.m_oWordControl.m_oApi.ShowParaMarks;
this.m_oWordControl.m_oApi.ShowParaMarks = false; this.m_oWordControl.m_oApi.ShowParaMarks = false;
...@@ -4380,7 +4387,7 @@ function CThumbnailsManager() ...@@ -4380,7 +4387,7 @@ function CThumbnailsManager()
_max = i; _max = i;
} }
} }
return { Min : _min, Max : _max }; return {Min : _min, Max : _max};
} }
this.GetSelectedArray = function() this.GetSelectedArray = function()
...@@ -4479,10 +4486,10 @@ function CThumbnailsManager() ...@@ -4479,10 +4486,10 @@ function CThumbnailsManager()
{ {
case 13: // enter case 13: // enter
{ {
if(this.m_oWordControl.m_oLogicDocument.viewMode === false) if (this.m_oWordControl.m_oLogicDocument.viewMode === false)
{ {
var _selected_thumbnails = this.GetSelectedArray(); var _selected_thumbnails = this.GetSelectedArray();
if(_selected_thumbnails.length > 0) if (_selected_thumbnails.length > 0)
{ {
var _last_selected_slide_num = _selected_thumbnails[_selected_thumbnails.length - 1]; var _last_selected_slide_num = _selected_thumbnails[_selected_thumbnails.length - 1];
this.m_oWordControl.GoToPage(_last_selected_slide_num); this.m_oWordControl.GoToPage(_last_selected_slide_num);
...@@ -4495,7 +4502,7 @@ function CThumbnailsManager() ...@@ -4495,7 +4502,7 @@ function CThumbnailsManager()
case 46: // delete case 46: // delete
case 8: // backspace case 8: // backspace
{ {
if(this.m_oWordControl.m_oLogicDocument.viewMode === false) if (this.m_oWordControl.m_oLogicDocument.viewMode === false)
{ {
var _delete_array = this.GetSelectedArray(); var _delete_array = this.GetSelectedArray();
...@@ -4518,9 +4525,9 @@ function CThumbnailsManager() ...@@ -4518,9 +4525,9 @@ function CThumbnailsManager()
case 34: //PgDown case 34: //PgDown
case 40: // bottom arrow case 40: // bottom arrow
{ {
if(global_keyboardEvent.CtrlKey && global_keyboardEvent.ShiftKey) if (global_keyboardEvent.CtrlKey && global_keyboardEvent.ShiftKey)
{ {
if(this.m_oWordControl.m_oLogicDocument.viewMode === false) if (this.m_oWordControl.m_oLogicDocument.viewMode === false)
{ {
var _presentation = this.m_oWordControl.m_oLogicDocument; var _presentation = this.m_oWordControl.m_oLogicDocument;
History.Create_NewPoint(AscDFH.historydescription_Presentation_MoveSlidesToEnd); History.Create_NewPoint(AscDFH.historydescription_Presentation_MoveSlidesToEnd);
...@@ -4531,18 +4538,18 @@ function CThumbnailsManager() ...@@ -4531,18 +4538,18 @@ function CThumbnailsManager()
} }
//return false; //return false;
} }
else if(global_keyboardEvent.CtrlKey) else if (global_keyboardEvent.CtrlKey)
{ {
if(this.m_oWordControl.m_oLogicDocument.viewMode === false) if (this.m_oWordControl.m_oLogicDocument.viewMode === false)
{ {
_presentation = this.m_oWordControl.m_oLogicDocument; _presentation = this.m_oWordControl.m_oLogicDocument;
var _selected_array = this.GetSelectedArray(); var _selected_array = this.GetSelectedArray();
var can_move = false, first_index; var can_move = false, first_index;
for(var i = _selected_array.length - 1; i > -1; i--) for (var i = _selected_array.length - 1; i > -1; i--)
{ {
if(i === _selected_array.length - 1) if (i === _selected_array.length - 1)
{ {
if(_selected_array[i] < _presentation.Slides.length - 1) if (_selected_array[i] < _presentation.Slides.length - 1)
{ {
can_move = true; can_move = true;
first_index = i; first_index = i;
...@@ -4551,7 +4558,7 @@ function CThumbnailsManager() ...@@ -4551,7 +4558,7 @@ function CThumbnailsManager()
} }
else else
{ {
if(Math.abs(_selected_array[i] - _selected_array[i + 1]) > 1) if (Math.abs(_selected_array[i] - _selected_array[i + 1]) > 1)
{ {
can_move = true; can_move = true;
first_index = i; first_index = i;
...@@ -4559,10 +4566,10 @@ function CThumbnailsManager() ...@@ -4559,10 +4566,10 @@ function CThumbnailsManager()
} }
} }
} }
if(can_move) if (can_move)
{ {
History.Create_NewPoint(AscDFH.historydescription_Presentation_MoveSlidesNextPos); History.Create_NewPoint(AscDFH.historydescription_Presentation_MoveSlidesNextPos);
for(var i = first_index; i > -1; --i) for (var i = first_index; i > -1; --i)
{ {
_presentation.moveSlides([_selected_array[i]], _selected_array[i] + 2); _presentation.moveSlides([_selected_array[i]], _selected_array[i] + 2);
} }
...@@ -4607,7 +4614,7 @@ function CThumbnailsManager() ...@@ -4607,7 +4614,7 @@ function CThumbnailsManager()
} }
else else
{ {
if(drDoc.SlideCurrent > 0) if (drDoc.SlideCurrent > 0)
{ {
this.CorrectShiftSelect(true, true); this.CorrectShiftSelect(true, true);
} }
...@@ -4628,7 +4635,7 @@ function CThumbnailsManager() ...@@ -4628,7 +4635,7 @@ function CThumbnailsManager()
} }
else else
{ {
if(drDoc.SlideCurrent > 0) if (drDoc.SlideCurrent > 0)
{ {
this.CorrectShiftSelect(false, true); this.CorrectShiftSelect(false, true);
} }
...@@ -4669,78 +4676,37 @@ function CThumbnailsManager() ...@@ -4669,78 +4676,37 @@ function CThumbnailsManager()
case 88:// X case 88:// X
{ {
if(global_keyboardEvent.CtrlKey) if (global_keyboardEvent.CtrlKey)
{
var doc = editor.WordControl.m_oLogicDocument;
if(this.m_oWordControl.m_oLogicDocument.viewMode === true || doc.Document_Is_SelectionLocked(AscCommon.changestype_RemoveSlide) === false)
{ {
AscCommon.Editor_Copy(editor, this.m_oWordControl.m_oLogicDocument.viewMode === false);
return undefined; return undefined;
} }
}
break; break;
} }
case 86 : case 86 :
{ {
if(global_keyboardEvent.CtrlKey) if (global_keyboardEvent.CtrlKey)
{
if (!window.GlobalPasteFlag)
{
if(this.m_oWordControl.m_oLogicDocument.viewMode === false)
{
if (!AscCommon.AscBrowser.isSafariMacOs)
{
this.m_oWordControl.m_oLogicDocument.Create_NewHistoryPoint(AscDFH.historydescription_Presentation_PasteOnThumbnails);
window.GlobalPasteFlag = true;
editor.incrementCounterLongAction();
AscCommon.Editor_Paste(this.m_oWordControl.m_oApi, true);
return undefined;
//не возвращаем true чтобы не было preventDefault
}
else
{
if (0 === window.GlobalPasteFlagCounter)
{
this.m_oWordControl.m_oLogicDocument.Create_NewHistoryPoint(AscDFH.historydescription_Presentation_PasteOnThumbnailsSafari);
AscCommon.SafariIntervalFocus();
window.GlobalPasteFlag = true;
editor.incrementCounterLongAction();
AscCommon.Editor_Paste(this.m_oWordControl.m_oApi, true);
return undefined;
//не возвращаем true чтобы не было preventDefault
}
}
}
}
else
{ {
if (AscCommon.AscBrowser.isSafariMacOs)
return undefined; return undefined;
} }
}
break; break;
} }
case 67 : case 67 :
{ {
if(global_keyboardEvent.CtrlKey) if (global_keyboardEvent.CtrlKey)
{ {
AscCommon.Editor_Copy(editor);
return undefined; return undefined;
} }
break; break;
} }
case 77 :// M case 77 :// M
{ {
if(global_keyboardEvent.CtrlKey) if (global_keyboardEvent.CtrlKey)
{ {
if(this.m_oWordControl.m_oLogicDocument.viewMode === false) if (this.m_oWordControl.m_oLogicDocument.viewMode === false)
{ {
var _selected_thumbnails = this.GetSelectedArray(); var _selected_thumbnails = this.GetSelectedArray();
if(_selected_thumbnails.length > 0) if (_selected_thumbnails.length > 0)
{ {
var _last_selected_slide_num = _selected_thumbnails[_selected_thumbnails.length - 1]; var _last_selected_slide_num = _selected_thumbnails[_selected_thumbnails.length - 1];
this.m_oWordControl.GoToPage(_last_selected_slide_num); this.m_oWordControl.GoToPage(_last_selected_slide_num);
...@@ -4754,9 +4720,9 @@ function CThumbnailsManager() ...@@ -4754,9 +4720,9 @@ function CThumbnailsManager()
case 68://D case 68://D
{ {
if(global_keyboardEvent.CtrlKey) if (global_keyboardEvent.CtrlKey)
{ {
if(this.m_oWordControl.m_oLogicDocument.viewMode === false) if (this.m_oWordControl.m_oLogicDocument.viewMode === false)
{ {
editor.DublicateSlide(); editor.DublicateSlide();
return false; return false;
...@@ -4768,10 +4734,10 @@ function CThumbnailsManager() ...@@ -4768,10 +4734,10 @@ function CThumbnailsManager()
case 33: // PgUp case 33: // PgUp
case 38 : //UpArrow case 38 : //UpArrow
{ {
if(global_keyboardEvent.CtrlKey && global_keyboardEvent.ShiftKey) if (global_keyboardEvent.CtrlKey && global_keyboardEvent.ShiftKey)
{ {
if(this.m_oWordControl.m_oLogicDocument.viewMode === false) if (this.m_oWordControl.m_oLogicDocument.viewMode === false)
{ {
var _presentation = this.m_oWordControl.m_oLogicDocument; var _presentation = this.m_oWordControl.m_oLogicDocument;
History.Create_NewPoint(AscDFH.historydescription_Presentation_MoveSlidesToStart); History.Create_NewPoint(AscDFH.historydescription_Presentation_MoveSlidesToStart);
...@@ -4782,18 +4748,18 @@ function CThumbnailsManager() ...@@ -4782,18 +4748,18 @@ function CThumbnailsManager()
} }
//return false; //return false;
} }
else if(global_keyboardEvent.CtrlKey) else if (global_keyboardEvent.CtrlKey)
{ {
if(this.m_oWordControl.m_oLogicDocument.viewMode === false) if (this.m_oWordControl.m_oLogicDocument.viewMode === false)
{ {
_presentation = this.m_oWordControl.m_oLogicDocument; _presentation = this.m_oWordControl.m_oLogicDocument;
var _selected_array = this.GetSelectedArray(); var _selected_array = this.GetSelectedArray();
var can_move = false, first_index; var can_move = false, first_index;
for(var i = 0; i < _selected_array.length; ++i) for (var i = 0; i < _selected_array.length; ++i)
{ {
if(i === 0) if (i === 0)
{ {
if(_selected_array[i] > 0) if (_selected_array[i] > 0)
{ {
can_move = true; can_move = true;
first_index = i; first_index = i;
...@@ -4802,7 +4768,7 @@ function CThumbnailsManager() ...@@ -4802,7 +4768,7 @@ function CThumbnailsManager()
} }
else else
{ {
if(Math.abs(_selected_array[i] - _selected_array[i - 1]) > 1) if (Math.abs(_selected_array[i] - _selected_array[i - 1]) > 1)
{ {
can_move = true; can_move = true;
first_index = i; first_index = i;
...@@ -4810,10 +4776,10 @@ function CThumbnailsManager() ...@@ -4810,10 +4776,10 @@ function CThumbnailsManager()
} }
} }
} }
if(can_move) if (can_move)
{ {
History.Create_NewPoint(AscDFH.historydescription_Presentation_MoveSlidesPrevPos); History.Create_NewPoint(AscDFH.historydescription_Presentation_MoveSlidesPrevPos);
for(var i = first_index; i > -1; --i) for (var i = first_index; i > -1; --i)
{ {
_presentation.moveSlides([_selected_array[i]], _selected_array[i] - 1); _presentation.moveSlides([_selected_array[i]], _selected_array[i] - 1);
} }
...@@ -4848,7 +4814,7 @@ function CThumbnailsManager() ...@@ -4848,7 +4814,7 @@ function CThumbnailsManager()
} }
case 80: // P case 80: // P
{ {
if(global_keyboardEvent.CtrlKey) if (global_keyboardEvent.CtrlKey)
{ {
this.m_oWordControl.m_oApi.onPrint(); this.m_oWordControl.m_oApi.onPrint();
} }
...@@ -4856,7 +4822,7 @@ function CThumbnailsManager() ...@@ -4856,7 +4822,7 @@ function CThumbnailsManager()
} }
case 83: // S case 83: // S
{ {
if(global_keyboardEvent.CtrlKey) if (global_keyboardEvent.CtrlKey)
{ {
this.m_oWordControl.m_oApi.asc_Save(); this.m_oWordControl.m_oApi.asc_Save();
} }
...@@ -4867,24 +4833,24 @@ function CThumbnailsManager() ...@@ -4867,24 +4833,24 @@ function CThumbnailsManager()
{ {
var aSelected = this.GetSelectedArray(); var aSelected = this.GetSelectedArray();
var nSlideIndex = Math.min.apply(Math, aSelected); var nSlideIndex = Math.min.apply(Math, aSelected);
var ConvertedPos = this.GetThumbnailPagePosition(nSlideIndex ); var ConvertedPos = this.GetThumbnailPagePosition(nSlideIndex);
if(ConvertedPos) if (ConvertedPos)
{ {
editor.sync_ContextMenuCallback(new AscCommonSlide.CContextMenuData({ Type : Asc.c_oAscContextMenuTypes.Thumbnails, X_abs : ConvertedPos.X, Y_abs : ConvertedPos.Y, IsSlideSelect: true }) ); editor.sync_ContextMenuCallback(new AscCommonSlide.CContextMenuData({Type : Asc.c_oAscContextMenuTypes.Thumbnails, X_abs : ConvertedPos.X, Y_abs : ConvertedPos.Y, IsSlideSelect : true}));
} }
return false; return false;
} }
case 121: case 121:
{ {
if(global_keyboardEvent.ShiftKey) if (global_keyboardEvent.ShiftKey)
{ {
var aSelected = this.GetSelectedArray(); var aSelected = this.GetSelectedArray();
var nSlideIndex = Math.min.apply(Math, aSelected); var nSlideIndex = Math.min.apply(Math, aSelected);
var ConvertedPos = this.GetThumbnailPagePosition(nSlideIndex ); var ConvertedPos = this.GetThumbnailPagePosition(nSlideIndex);
if(ConvertedPos) if (ConvertedPos)
{ {
editor.sync_ContextMenuCallback(new AscCommonSlide.CContextMenuData({ Type : Asc.c_oAscContextMenuTypes.Thumbnails, X_abs : ConvertedPos.X, Y_abs : ConvertedPos.Y, IsSlideSelect: true }) ); editor.sync_ContextMenuCallback(new AscCommonSlide.CContextMenuData({Type : Asc.c_oAscContextMenuTypes.Thumbnails, X_abs : ConvertedPos.X, Y_abs : ConvertedPos.Y, IsSlideSelect : true}));
} }
return false; return false;
} }
...@@ -5009,7 +4975,7 @@ function CSlideDrawer() ...@@ -5009,7 +4975,7 @@ function CSlideDrawer()
var h_px = (h_mm * dKoef) >> 0; var h_px = (h_mm * dKoef) >> 0;
this.BoundsChecker.init(w_px, h_px, w_mm, h_mm); this.BoundsChecker.init(w_px, h_px, w_mm, h_mm);
this.BoundsChecker.transform(1,0,0,1,0,0); this.BoundsChecker.transform(1, 0, 0, 1, 0, 0);
if (this.bIsEmptyPresentation) if (this.bIsEmptyPresentation)
{ {
...@@ -5045,7 +5011,7 @@ function CSlideDrawer() ...@@ -5045,7 +5011,7 @@ function CSlideDrawer()
var _need_pix_height = this.BoundsChecker.Bounds.max_y - this.BoundsChecker.Bounds.min_y + 1 + 2 * this.SlideEps; var _need_pix_height = this.BoundsChecker.Bounds.max_y - this.BoundsChecker.Bounds.min_y + 1 + 2 * this.SlideEps;
this.IsCached = false; this.IsCached = false;
if (4 *_need_pix_width * _need_pix_height < this.CONST_MAX_SLIDE_CACHE_SIZE) if (4 * _need_pix_width * _need_pix_height < this.CONST_MAX_SLIDE_CACHE_SIZE)
this.IsCached = true; this.IsCached = true;
if (this.IsCached) if (this.IsCached)
...@@ -5088,7 +5054,7 @@ function CSlideDrawer() ...@@ -5088,7 +5054,7 @@ function CSlideDrawer()
g.m_oCoordTransform.tx = -this.BoundsChecker.Bounds.min_x + this.SlideEps; g.m_oCoordTransform.tx = -this.BoundsChecker.Bounds.min_x + this.SlideEps;
g.m_oCoordTransform.ty = -this.BoundsChecker.Bounds.min_y + this.SlideEps; g.m_oCoordTransform.ty = -this.BoundsChecker.Bounds.min_y + this.SlideEps;
g.transform(1,0,0,1,0,0); g.transform(1, 0, 0, 1, 0, 0);
if (this.m_oWordControl.m_oApi.isViewMode) if (this.m_oWordControl.m_oApi.isViewMode)
g.IsNoDrawingEmptyPlaceholderText = true; g.IsNoDrawingEmptyPlaceholderText = true;
...@@ -5166,7 +5132,7 @@ function CSlideDrawer() ...@@ -5166,7 +5132,7 @@ function CSlideDrawer()
g.m_oCoordTransform.tx = _x - _bounds.min_x; g.m_oCoordTransform.tx = _x - _bounds.min_x;
g.m_oCoordTransform.ty = _y - _bounds.min_y; g.m_oCoordTransform.ty = _y - _bounds.min_y;
g.transform(1,0,0,1,0,0); g.transform(1, 0, 0, 1, 0, 0);
if (this.m_oWordControl.m_oApi.isViewMode) if (this.m_oWordControl.m_oApi.isViewMode)
g.IsNoDrawingEmptyPlaceholderText = true; g.IsNoDrawingEmptyPlaceholderText = true;
...@@ -5179,7 +5145,8 @@ function CSlideDrawer() ...@@ -5179,7 +5145,8 @@ function CSlideDrawer()
window.g_comment_image = new Image(); window.g_comment_image = new Image();
window.g_comment_image; window.g_comment_image;
window.g_comment_image.asc_complete = false; window.g_comment_image.asc_complete = false;
window.g_comment_image.onload = function(){ window.g_comment_image.onload = function()
{
window.g_comment_image.asc_complete = true; window.g_comment_image.asc_complete = true;
}; };
window.g_comment_image.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAR0AAAAlCAMAAABI6s09AAAABGdBTUEAALGPC/xhBQAAAMBQTFRF2Ypk03pP0nZJ1oNb68Ku03hL1X9U7MWy1X9V9d7T3JNv5bCW0nZJ9uXc////8dPE+vDq5rSb5a6U4aOF5K6T2Idg////1HxR6r6o03lN0nZJ6Lef+u7p8NDA0ndK////78++0nZJ8dPE////0nZJ1HtP2Ihh////03hM////////3JVy0nZJ0nZJ9+Xc0nZJ////3JVy3JVx////////AAAA3Zh38tbJ3ZZ08dXH4qaJ5a6U9N3R+/Tw////0nZJQeZHfgAAADZ0Uk5TZJaoUk+v3lzdEi9hDlIbKVN8eY54xTTnc/NKegRg9EJm8WQz7+3EFPYoSKborlkmCqeoJ00ATKvZ0wAAA3tJREFUaN7dmOdi2jAUhelukjaQkkGCGIHYbDAYNYOh93+r2mZIsq6WwVHD+RfukWx93OtjUsCxHoaE0fAB7yWvHFCcjB6JRI+jCc7kzMVfSEzD5zWj5yFdPuSXDLm9C7/nVOMyX5SvnDwRhZ4mWZz5+Dd0yJoToevTK7jNLxHzByryRYZcqemzK0fkbbWWaPVGRqxTqVH6tJ8/XbBfGPPVjVtlT/Tr9t/ToZ+l6bR2l2hxdITJQfLil6/syjqRwonwkDrrVKqePu15fy5XWfTr9s/eO+I0EvlYnRFuz7VCRHF1ZSdHavfOEIaEUHBZE/0XJbjTmuWfyf7Ze0ckqjgWeh86AVaoKPrlrVb6ztGx7h2RKLesRa8UUcUiHei0MJ2KePMVgY4+rQJj/7fzy0YZ6h2AzuacTYCOee8cRKcq0qmm78YgrZCNH/1w2zvHnSyTHOT9mjQsUjreK7vbq0d38fhVnqp3PFXvePnSMclB3q9Jw4DS+XNHFvHuq0X82d013SWqMGIrwjSia6B3dgPJrczhuWNC3Io7onQ6jfk0wrNazOJLNzp0l7iS2IWK0Duoo+gdbmUOz52j08GUTqQwwrOYhkAShjEesSKfRuVA5jRZJsTTO1fgMK8AdHA4+AvCiSsAHMU0KgfyP6JThelUITo4rIaS9yiwIp/GTXGW3NsUKEInUdGpAE+cd56s+EjS10xJRT6N8oHMQOdqzOjKFR17yadxgwcufsTnTjY80mlUFD/kcyeTOhmKXfWbW5d1KtW1nKyu5WR1D6WTRb76rd9nnUr5lnR8Szq+Czq1+/j6L0t698sXel/3tbRTJtZp8KT/5dWUz51Kmo5Xc0Gn3bxJRmaPZ8kMy02zLTrBseKcJnRabZ4Ol4VCGnp+q+2CTpD802m2x7Pc/k7ZqB8ATiqJ02CyEO/XTVa8vws6OLjtM3g4OP3bAHSKcHinCR3er6PTbwfYCZ1EvS2eBE5P69zB6R2agzZp6I7OFo8eDoNH7jTPQZs0dEgnOvRUfWQLp3kO2qShSzo4jA89nYdHcJrnoE0aOqUTHXpgBEfvNM9B1j9goQxEv1s60aHN4Oid5jnI+gcQHOp3TAeH4TGd5jm470gKB9jfNR1nOZjCA8I5NToWOcjhgeGcHB2LHGTwSOCcHh2LHNz7ZXBOkI5FDmr9J0jHIgd1/n8LiumvxDAoYwAAAABJRU5ErkJggg=="; window.g_comment_image.src = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAR0AAAAlCAMAAABI6s09AAAABGdBTUEAALGPC/xhBQAAAMBQTFRF2Ypk03pP0nZJ1oNb68Ku03hL1X9U7MWy1X9V9d7T3JNv5bCW0nZJ9uXc////8dPE+vDq5rSb5a6U4aOF5K6T2Idg////1HxR6r6o03lN0nZJ6Lef+u7p8NDA0ndK////78++0nZJ8dPE////0nZJ1HtP2Ihh////03hM////////3JVy0nZJ0nZJ9+Xc0nZJ////3JVy3JVx////////AAAA3Zh38tbJ3ZZ08dXH4qaJ5a6U9N3R+/Tw////0nZJQeZHfgAAADZ0Uk5TZJaoUk+v3lzdEi9hDlIbKVN8eY54xTTnc/NKegRg9EJm8WQz7+3EFPYoSKborlkmCqeoJ00ATKvZ0wAAA3tJREFUaN7dmOdi2jAUhelukjaQkkGCGIHYbDAYNYOh93+r2mZIsq6WwVHD+RfukWx93OtjUsCxHoaE0fAB7yWvHFCcjB6JRI+jCc7kzMVfSEzD5zWj5yFdPuSXDLm9C7/nVOMyX5SvnDwRhZ4mWZz5+Dd0yJoToevTK7jNLxHzByryRYZcqemzK0fkbbWWaPVGRqxTqVH6tJ8/XbBfGPPVjVtlT/Tr9t/ToZ+l6bR2l2hxdITJQfLil6/syjqRwonwkDrrVKqePu15fy5XWfTr9s/eO+I0EvlYnRFuz7VCRHF1ZSdHavfOEIaEUHBZE/0XJbjTmuWfyf7Ze0ckqjgWeh86AVaoKPrlrVb6ztGx7h2RKLesRa8UUcUiHei0MJ2KePMVgY4+rQJj/7fzy0YZ6h2AzuacTYCOee8cRKcq0qmm78YgrZCNH/1w2zvHnSyTHOT9mjQsUjreK7vbq0d38fhVnqp3PFXvePnSMclB3q9Jw4DS+XNHFvHuq0X82d013SWqMGIrwjSia6B3dgPJrczhuWNC3Io7onQ6jfk0wrNazOJLNzp0l7iS2IWK0Duoo+gdbmUOz52j08GUTqQwwrOYhkAShjEesSKfRuVA5jRZJsTTO1fgMK8AdHA4+AvCiSsAHMU0KgfyP6JThelUITo4rIaS9yiwIp/GTXGW3NsUKEInUdGpAE+cd56s+EjS10xJRT6N8oHMQOdqzOjKFR17yadxgwcufsTnTjY80mlUFD/kcyeTOhmKXfWbW5d1KtW1nKyu5WR1D6WTRb76rd9nnUr5lnR8Szq+Czq1+/j6L0t698sXel/3tbRTJtZp8KT/5dWUz51Kmo5Xc0Gn3bxJRmaPZ8kMy02zLTrBseKcJnRabZ4Ol4VCGnp+q+2CTpD802m2x7Pc/k7ZqB8ATiqJ02CyEO/XTVa8vws6OLjtM3g4OP3bAHSKcHinCR3er6PTbwfYCZ1EvS2eBE5P69zB6R2agzZp6I7OFo8eDoNH7jTPQZs0dEgnOvRUfWQLp3kO2qShSzo4jA89nYdHcJrnoE0aOqUTHXpgBEfvNM9B1j9goQxEv1s60aHN4Oid5jnI+gcQHOp3TAeH4TGd5jm470gKB9jfNR1nOZjCA8I5NToWOcjhgeGcHB2LHGTwSOCcHh2LHNz7ZXBOkI5FDmr9J0jHIgd1/n8LiumvxDAoYwAAAABJRU5ErkJggg==";
......
...@@ -46,8 +46,6 @@ var changestype_Paragraph_Content = AscCommon.changestype_Paragraph_Content; ...@@ -46,8 +46,6 @@ var changestype_Paragraph_Content = AscCommon.changestype_Paragraph_Content;
var changestype_2_Element_and_Type = AscCommon.changestype_2_Element_and_Type; var changestype_2_Element_and_Type = AscCommon.changestype_2_Element_and_Type;
var changestype_2_ElementsArray_and_Type = AscCommon.changestype_2_ElementsArray_and_Type; var changestype_2_ElementsArray_and_Type = AscCommon.changestype_2_ElementsArray_and_Type;
var g_oTableId = AscCommon.g_oTableId; var g_oTableId = AscCommon.g_oTableId;
var Editor_Copy = AscCommon.Editor_Copy;
var Editor_Paste = AscCommon.Editor_Paste;
var History = AscCommon.History; var History = AscCommon.History;
var c_oAscHAnchor = Asc.c_oAscHAnchor; var c_oAscHAnchor = Asc.c_oAscHAnchor;
......
...@@ -753,14 +753,17 @@ background-repeat: no-repeat;\ ...@@ -753,14 +753,17 @@ background-repeat: no-repeat;\
asc_docs_api.prototype.ContentToHTML = function(bIsRet) asc_docs_api.prototype.ContentToHTML = function(bIsRet)
{ {
this.DocumentReaderMode = new AscCommon.CDocumentReaderMode(); this.DocumentReaderMode = new AscCommon.CDocumentReaderMode();
var _old = PasteElementsId.copyPasteUseBinary;
PasteElementsId.copyPasteUseBinary = false;
this.WordControl.m_oLogicDocument.Select_All(); this.WordControl.m_oLogicDocument.Select_All();
AscCommon.Editor_Copy(this); var text_data = {
data : "",
pushData : function(format, value) { this.data = value; }
};
this.asc_CheckCopy(text_data, 2);
this.WordControl.m_oLogicDocument.Selection_Remove(); this.WordControl.m_oLogicDocument.Selection_Remove();
PasteElementsId.copyPasteUseBinary = _old;
this.DocumentReaderMode = null; return text_data.data;
return document.getElementById("SelectId").innerHTML;
}; };
asc_docs_api.prototype.InitEditor = function() asc_docs_api.prototype.InitEditor = function()
......
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