Commit 2b427a1d authored by Oleg Korshul's avatar Oleg Korshul

reporter bugs & fonts to plugins

parent ee2f0d20
......@@ -1376,6 +1376,49 @@ CFontSelect.prototype =
return 3000;
return 10000;
},
Serialize : function()
{
var _obj = {};
_obj["m_wsFontName"] = this.m_wsFontName;
_obj["m_wsFontPath"] = this.m_wsFontPath;
_obj["m_lIndex"] = this.m_lIndex;
_obj["m_bBold"] = this.m_bBold;
_obj["m_bItalic"] = this.m_bItalic;
_obj["m_bIsFixed"] = this.m_bIsFixed;
_obj["m_aPanose"] = new Array(10);
for (var i = 0; i < 10; i++)
{
_obj["m_aPanose"][i] = this.m_aPanose[i];
}
_obj["m_ulUnicodeRange1"] = this.m_ulUnicodeRange1;
_obj["m_ulUnicodeRange2"] = this.m_ulUnicodeRange2;
_obj["m_ulUnicodeRange3"] = this.m_ulUnicodeRange3;
_obj["m_ulUnicodeRange4"] = this.m_ulUnicodeRange4;
_obj["m_ulCodePageRange1"] = this.m_ulCodePageRange1;
_obj["m_ulCodePageRange2"] = this.m_ulCodePageRange2;
_obj["m_usWeigth"] = this.m_usWeigth;
_obj["m_usWidth"] = this.m_usWidth;
_obj["m_sFamilyClass"] = this.m_sFamilyClass;
_obj["m_eFontFormat"] = this.m_eFontFormat;
_obj["m_shAvgCharWidth"] = this.m_shAvgCharWidth;
_obj["m_shAscent"] = this.m_shAscent;
_obj["m_shDescent"] = this.m_shDescent;
_obj["m_shLineGap"] = this.m_shLineGap;
_obj["m_shXHeight"] = this.m_shXHeight;
_obj["m_shCapHeight"] = this.m_shCapHeight;
return _obj;
}
};
......@@ -1439,6 +1482,15 @@ function memset(p, start, val, count)
CFontSelectList.prototype =
{
SerializeList : function()
{
var _list = [];
var _len = this.List.length;
for (var k = 0; k < _len; k++)
_list.push(this.List[k].Serialize());
return _list;
},
Init : function()
{
if (true == this.IsInit)
......
......@@ -1248,7 +1248,7 @@
baseEditorsApi.prototype["pluginMethod_GetFontList"] = function()
{
return AscFonts.g_fontApplication.g_fontSelections.List;
return AscFonts.g_fontApplication.g_fontSelections.SerializeList();
};
baseEditorsApi.prototype["pluginMethod_PasteHtml"] = function(htmlText)
......
......@@ -1831,19 +1831,20 @@ function CDrawingDocument()
this.CheckTargetDraw = function(x, y, isFocusOnSlide)
{
var isReporter = this.m_oWordControl.m_oApi.isReporterMode;
if (this.TargetHtmlElementOnSlide != isFocusOnSlide)
{
if (this.TargetHtmlElementOnSlide)
{
this.m_oWordControl.m_oMainView.HtmlElement.removeChild(this.TargetHtmlElement);
this.m_oWordControl.m_oNotesContainer.HtmlElement.appendChild(this.TargetHtmlElement);
this.TargetHtmlElement.style.zIndex = 4;
this.TargetHtmlElement.style.zIndex = isReporter ? 0 : 4;
}
else
{
this.m_oWordControl.m_oNotesContainer.HtmlElement.removeChild(this.TargetHtmlElement);
this.m_oWordControl.m_oMainView.HtmlElement.appendChild(this.TargetHtmlElement);
this.TargetHtmlElement.style.zIndex = 9;
this.TargetHtmlElement.style.zIndex = isReporter ? 0 : 9;
}
this.TargetHtmlElementOnSlide = isFocusOnSlide;
......
......@@ -863,6 +863,12 @@ function CEditorPage(api)
else
window.addEventListener('message', this.m_oApi.DemonstrationToReporterMessages, false);
}
document.oncontextmenu = function(e)
{
AscCommon.stopEvent(e);
return false;
};
}
else
{
......@@ -1804,6 +1810,10 @@ function CEditorPage(api)
var oWordControl = oThis;
if (oWordControl.m_oApi.isReporterMode && oWordControl.m_oMainParent && oWordControl.m_oMainParent.HtmlElement)
oWordControl.m_oMainParent.HtmlElement.style.pointerEvents = "none";
var x1 = oWordControl.Splitter1Pos * g_dKoef_mm_to_pix;
var x2 = (oWordControl.Splitter1Pos + GlobalSkin.SplitterWidthMM) * g_dKoef_mm_to_pix;
var y1 = oWordControl.Height - ((oWordControl.Splitter2Pos + GlobalSkin.SplitterWidthMM) * g_dKoef_mm_to_pix);
......@@ -1981,6 +1991,9 @@ function CEditorPage(api)
var oWordControl = oThis;
oWordControl.m_oDrawingDocument.UnlockCursorType();
if (oWordControl.m_oApi.isReporterMode && oWordControl.m_oMainParent && oWordControl.m_oMainParent.HtmlElement)
oWordControl.m_oMainParent.HtmlElement.style.pointerEvents = "";
if (null != oWordControl.SplitterDiv)
{
var _x = parseInt(oWordControl.SplitterDiv.style.left);
......
......@@ -3409,6 +3409,12 @@ function CDemonstrationManager(htmlpage)
this.onMouseUp = function(e)
{
if (oThis.PointerDiv)
{
AscCommon.stopEvent(e);
return false;
}
if (oThis.HtmlPage.m_oApi.reporterWindow)
{
var _msg_ = {
......
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