Commit 379f7d14 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47849 954022d7-b5bf-4e40-9824-e11837661b57
parent 1bb3bbc9
......@@ -260,10 +260,6 @@ function CEditorPage(api)
this.Init = function()
{
//-
InitPanelAnimation();
//-
this.m_oBody = CreateControlContainer(this.Name);
this.m_oBody.HtmlElement.style.backgroundColor = "#D3D3D3";
......@@ -2601,8 +2597,6 @@ function CEditorPage(api)
drDoc.SlideCurrent = lPageNum;
this.m_oLogicDocument.Set_CurPage(lPageNum);
this.m_oApi.asc_fireCallback("asc_onSlideTiming", this.m_oLogicDocument.Slides[lPageNum].timing);
// теперь пошлем все шаблоны первой темы
this.CheckLayouts();
......
This diff is collapsed.
......@@ -1483,52 +1483,40 @@ asc_docs_api.prototype.SetSlideProps = function(prop)
var arr_ind = this.WordControl.Thumbnails.GetSelectedArray();
var _back_fill = prop.get_background();
if (_back_fill.get_type() == c_oAscFill.FILL_TYPE_NOFILL)
if (_back_fill)
{
this.WordControl.m_oLogicDocument.changeBackground(null, arr_ind);
return;
}
if (_back_fill.get_type() == c_oAscFill.FILL_TYPE_NOFILL)
{
this.WordControl.m_oLogicDocument.changeBackground(null, arr_ind);
return;
}
var _old_fill = null;
var _oldBg = this.WordControl.m_oLogicDocument.Slides[this.WordControl.m_oLogicDocument.CurPage].cSld.Bg;
if (_oldBg != null && _oldBg.bgPr != null && _oldBg.bgPr.Fill != null)
_old_fill = _oldBg.bgPr.Fill.createDuplicate();
var _old_fill = null;
var _oldBg = this.WordControl.m_oLogicDocument.Slides[this.WordControl.m_oLogicDocument.CurPage].cSld.Bg;
if (_oldBg != null && _oldBg.bgPr != null && _oldBg.bgPr.Fill != null)
_old_fill = _oldBg.bgPr.Fill.createDuplicate();
var bg = new CBg();
bg.bgPr = new CBgPr();
bg.bgPr.Fill = CorrectUniFill(_back_fill, _old_fill);
var bg = new CBg();
bg.bgPr = new CBgPr();
bg.bgPr.Fill = CorrectUniFill(_back_fill, _old_fill);
var image_url = "";
if (bg.bgPr.Fill != null && bg.bgPr.Fill.fill != null && bg.bgPr.Fill.fill.type == FILL_TYPE_BLIP)
{
image_url = bg.bgPr.Fill.fill.RasterImageId;
}
if (image_url != "")
{
var _image = this.ImageLoader.LoadImage(image_url, 1);
var sFindString = editor.DocumentUrl + "media/";
if(0 == image_url.indexOf(sFindString))
var image_url = "";
if (bg.bgPr.Fill != null && bg.bgPr.Fill.fill != null && bg.bgPr.Fill.fill.type == FILL_TYPE_BLIP)
{
image_url = image_url.substring(sFindString.length);
bg.bgPr.Fill.fill.RasterImageId = image_url; // erase documentUrl
image_url = bg.bgPr.Fill.fill.RasterImageId;
}
if (null != _image)
if (image_url != "")
{
if (bg.bgPr.Fill != null && bg.bgPr.Fill.fill != null && bg.bgPr.Fill.fill.type == c_oAscFill.FILL_TYPE_BLIP)
var _image = this.ImageLoader.LoadImage(image_url, 1);
var sFindString = editor.DocumentUrl + "media/";
if(0 == image_url.indexOf(sFindString))
{
this.WordControl.m_oDrawingDocument.DrawImageTextureFillSlide(bg.bgPr.Fill.fill.RasterImageId);
image_url = image_url.substring(sFindString.length);
bg.bgPr.Fill.fill.RasterImageId = image_url; // erase documentUrl
}
this.WordControl.m_oLogicDocument.changeBackground(bg, arr_ind);
}
else
{
this.sync_StartAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.LoadImage);
var oProp = prop;
this.asyncImageEndLoaded2 = function(_image)
if (null != _image)
{
if (bg.bgPr.Fill != null && bg.bgPr.Fill.fill != null && bg.bgPr.Fill.fill.type == c_oAscFill.FILL_TYPE_BLIP)
{
......@@ -1536,17 +1524,38 @@ asc_docs_api.prototype.SetSlideProps = function(prop)
}
this.WordControl.m_oLogicDocument.changeBackground(bg, arr_ind);
this.asyncImageEndLoaded2 = null;
}
else
{
this.sync_StartAction(c_oAscAsyncActionType.Information, c_oAscAsyncAction.LoadImage);
var oProp = prop;
this.asyncImageEndLoaded2 = function(_image)
{
if (bg.bgPr.Fill != null && bg.bgPr.Fill.fill != null && bg.bgPr.Fill.fill.type == c_oAscFill.FILL_TYPE_BLIP)
{
this.WordControl.m_oDrawingDocument.DrawImageTextureFillSlide(bg.bgPr.Fill.fill.RasterImageId);
}
this.WordControl.m_oLogicDocument.changeBackground(bg, arr_ind);
this.asyncImageEndLoaded2 = null;
}
}
}
}
else
{
if (bg.bgPr.Fill != null && bg.bgPr.Fill.fill != null && bg.bgPr.Fill.fill.type == c_oAscFill.FILL_TYPE_BLIP)
else
{
this.WordControl.m_oDrawingDocument.DrawImageTextureFillSlide(bg.bgPr.Fill.fill.RasterImageId);
if (bg.bgPr.Fill != null && bg.bgPr.Fill.fill != null && bg.bgPr.Fill.fill.type == c_oAscFill.FILL_TYPE_BLIP)
{
this.WordControl.m_oDrawingDocument.DrawImageTextureFillSlide(bg.bgPr.Fill.fill.RasterImageId);
}
this.WordControl.m_oLogicDocument.changeBackground(bg, arr_ind);
}
this.WordControl.m_oLogicDocument.changeBackground(bg, arr_ind);
}
var _timing = prop.get_timing();
if (_timing)
{
this.ApplySlideTiming(_timing);
}
}
......@@ -3314,6 +3323,8 @@ asc_docs_api.prototype.sync_slidePropCallback = function(slide)
}
}
obj.Timing = slide.timing;
var _len = this.SelectedObjectsStack.length;
if (_len > 0)
{
......
......@@ -505,10 +505,13 @@ function CorrectUniFill(asc_fill, unifill)
function CAscSlideProps()
{
this.Background = null;
this.Timing = null;
}
CAscSlideProps.prototype.get_background = function(){return this.Background;}
CAscSlideProps.prototype.put_background = function(v){this.Background = v;}
CAscSlideProps.prototype.get_timing = function(){return this.Timing;}
CAscSlideProps.prototype.put_timing = function(v){this.Timing = v;}
// ---------------------------------------------------------------
......
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