Commit b0f492f6 authored by Oleg Korshul's avatar Oleg Korshul

hidden slides, reporter translate

parent f963eff4
......@@ -4461,6 +4461,7 @@ function CThumbnailsManager()
var _digit_distance = this.const_offset_x * g_dKoef_pix_to_mm;
var _logicDocument = word_control.m_oLogicDocument;
for (var i = 0; i < this.SlidesCount; i++)
{
var page = this.m_arrPages[i];
......@@ -4509,7 +4510,17 @@ function CThumbnailsManager()
else
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));
var _bounds = g.t("" + (i + 1), (_digit_distance - num_slide_text_width) / 2, (page.top * g_dKoef_pix_to_mm + 3), true);
if (!_logicDocument.Slides[i].isVisible())
{
context.lineWidth = 1;
context.strokeStyle = "#000000";
context.beginPath();
context.moveTo(_bounds.x - 3, _bounds.y);
context.lineTo(_bounds.r + 3, _bounds.b);
context.stroke();
context.beginPath();
}
}
this.OnUpdateOverlay();
......
......@@ -682,6 +682,15 @@ function CEditorPage(api)
style.innerHTML = styleContent;
_head.appendChild(style);
this.reporterTranslates = ["Reset", "Slide {0} of {1}", "End slideshow"];
var _translates = this.m_oApi.reporterTranslates;
if (_translates)
{
this.reporterTranslates[0] = _translates[0];
this.reporterTranslates[1] = _translates[1];
this.reporterTranslates[2] = _translates[2];
}
var _buttonsContent = "";
_buttonsContent += "<label class=\"block_elem_no_select\" id=\"dem_id_time\" style=\"color:#666666;text-shadow: none;white-space: nowrap;font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 11px; position:absolute; left:10px; bottom: 7px;\">00:00:00</label>";
_buttonsContent += "<button class=\"btn-text-default-img\" id=\"dem_id_play\" style=\"left: 60px; bottom: 3px; width: 20px; height: 20px;\"><span class=\"btn-play back_image_buttons\" id=\"dem_id_play_span\" style=\"width:100%;height:100%;\"></span></button>";
......@@ -713,10 +722,18 @@ function CEditorPage(api)
if (_current > _count)
_current = _count;
_elem.innerHTML = "Slide " + _current + " of " + _count;
var _text = "Slide {0} of {1}";
if (window.editor.WordControl.reporterTranslates)
_text = window.editor.WordControl.reporterTranslates[1];
_text = _text.replace("{0}", _current);
_text = _text.replace("{1}", _count);
_elem.innerHTML = _text;
//window.editor.WordControl.Thumbnails.SelectPage(_current - 1);
window.editor.WordControl.GoToPage(_current - 1, false, false, true);
window.editor.WordControl.OnResizeReporter();
});
this.m_oApi.asc_registerCallback("asc_onEndDemonstration", function ()
......
......@@ -6006,6 +6006,23 @@ background-repeat: no-repeat;\
}
};
asc_docs_api.prototype.preloadReporter = function(data)
{
this.reporterTranslates = [data["translations"]["reset"], data["translations"]["slideOf"], data["translations"]["endSlideshow"]];
this.WordControl.reporterTranslates = this.reporterTranslates;
var _button1 = document.getElementById("dem_id_reset");
var _button2 = document.getElementById("dem_id_end");
if (_button1)
_button1.innerHTML = this.reporterTranslates[0];
if (_button2)
{
_button2.innerHTML = this.reporterTranslates[2];
this.WordControl.OnResizeReporter();
}
};
asc_docs_api.prototype.sendToReporter = function(value)
{
if (window["AscDesktopEditor"])
......
......@@ -972,7 +972,7 @@ CGraphics.prototype =
this.m_oFullTransform.sy,this.m_oFullTransform.tx,this.m_oFullTransform.ty);
}
},
t : function(text,x,y)
t : function(text,x,y,isBounds)
{
if (this.m_bIsBreak)
return;
......@@ -991,6 +991,7 @@ CGraphics.prototype =
}
this.m_oContext.setTransform(1,0,0,1,0,0);
var _bounds = isBounds ? {x:100000, y:100000, r:-100000, b:-100000} : null;
while (true)
{
var pGlyph = _font_manager.GetNextChar2();
......@@ -999,7 +1000,7 @@ CGraphics.prototype =
if (null != pGlyph.oBitmap)
{
this.private_FillGlyph(pGlyph);
this.private_FillGlyph(pGlyph, _bounds);
}
}
if (false === this.m_bIntegerGrid)
......@@ -1007,6 +1008,8 @@ CGraphics.prototype =
this.m_oContext.setTransform(this.m_oFullTransform.sx,this.m_oFullTransform.shy,this.m_oFullTransform.shx,
this.m_oFullTransform.sy,this.m_oFullTransform.tx,this.m_oFullTransform.ty);
}
return _bounds;
},
FillText2 : function(x,y,text,cropX,cropW)
{
......@@ -1172,7 +1175,7 @@ CGraphics.prototype =
},
// private methods
private_FillGlyph : function(pGlyph)
private_FillGlyph : function(pGlyph, _bounds)
{
// new scheme
var nW = pGlyph.oBitmap.nWidth;
......@@ -1192,6 +1195,20 @@ CGraphics.prototype =
pGlyph.oBitmap.draw(this.m_oContext, nX, nY, this.TextClipRect);
else
pGlyph.oBitmap.drawCropInRect(this.m_oContext, nX, nY, this.TextClipRect);
if (_bounds)
{
var _r = nX + pGlyph.oBitmap.nWidth;
var _b = nY + pGlyph.oBitmap.nHeight;
if (_bounds.x > nX)
_bounds.x = nX;
if (_bounds.y > nY)
_bounds.y = nY;
if (_bounds.r < _r)
_bounds.r = _r;
if (_bounds.b < _b)
_bounds.b = _b;
}
},
private_FillGlyphC : function(pGlyph,cropX,cropW)
{
......
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