Commit d4e933d7 authored by Alexey.Golubev's avatar Alexey.Golubev

Мерж изменений с бранча 2.5.1

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51819 954022d7-b5bf-4e40-9824-e11837661b57
parent f6bf48db
......@@ -3476,13 +3476,13 @@ function CBinaryFileWriter()
oThis.StartRecord(0);
oThis.WriteRecord3(0, _part.TableCellPr.TableCellBorders.Left, oThis.WriteTableCellBorderLineStyle);
oThis.WriteRecord3(1, _part.TableCellPr.TableCellBorders.Right, oThis.WriteTableCellBorderLineStyle);
oThis.WriteRecord3(2, _part.TableCellPr.TableCellBorders.Top, oThis.WriteTableCellBorderLineStyle);
oThis.WriteRecord3(3, _part.TableCellPr.TableCellBorders.Bottom, oThis.WriteTableCellBorderLineStyle);
oThis.WriteTableCellBorderLineStyle2(0, _part.TableCellPr.TableCellBorders.Left);
oThis.WriteTableCellBorderLineStyle2(1, _part.TableCellPr.TableCellBorders.Right);
oThis.WriteTableCellBorderLineStyle2(2, _part.TableCellPr.TableCellBorders.Top);
oThis.WriteTableCellBorderLineStyle2(3, _part.TableCellPr.TableCellBorders.Bottom);
oThis.WriteRecord3(4, _part.TablePr.TableBorders.InsideH, oThis.WriteTableCellBorderLineStyle);
oThis.WriteRecord3(5, _part.TablePr.TableBorders.InsideV, oThis.WriteTableCellBorderLineStyle);
oThis.WriteTableCellBorderLineStyle2(4, _part.TableCellPr.TableCellBorders.InsideH);
oThis.WriteTableCellBorderLineStyle2(5, _part.TableCellPr.TableCellBorders.InsideV);
oThis.EndRecord();
......@@ -3570,9 +3570,23 @@ function CBinaryFileWriter()
this.WriteTableCellBorder = function(_border)
{
if (_border.Value == border_None)
{
oThis.StartRecord(0);
oThis.WriteUChar(g_nodeAttributeStart);
oThis.WriteUChar(g_nodeAttributeEnd);
var _unifill = new CUniFill();
_unifill.fill = new CNoFill();
oThis.WriteRecord2(0, _unifill, oThis.WriteUniFill);
oThis.EndRecord();
return;
}
var bIsFill = false;
var bIsSize = false;
if (_border.unifill !== undefined && _border.unifill != null)
if ((_border.unifill !== undefined && _border.unifill != null) || _border.Color instanceof CDocumentColor)
{
bIsFill = true;
}
......@@ -3591,17 +3605,71 @@ function CBinaryFileWriter()
}
oThis.WriteUChar(g_nodeAttributeEnd);
// TODO: потом переделать по-нормальному
if (!_border.unifill && _border.Color instanceof CDocumentColor)
{
var _unifill = new CUniFill();
_unifill.fill = new CSolidFill();
_unifill.fill.color.color = new CRGBColor();
_unifill.fill.color.color.RGBA.R = _border.Color.r;
_unifill.fill.color.color.RGBA.G = _border.Color.g;
_unifill.fill.color.color.RGBA.B = _border.Color.b;
oThis.WriteRecord2(0, _unifill, oThis.WriteUniFill);
}
oThis.WriteRecord2(0, _border.unifill, oThis.WriteUniFill);
oThis.EndRecord();
}
}
this.WriteTableCellBorderLineStyle2 = function(rec_type, _border)
{
if (!_border)
{
oThis.StartRecord(rec_type);
oThis.StartRecord(0);
oThis.WriteUChar(g_nodeAttributeStart);
oThis.WriteUChar(g_nodeAttributeEnd);
var _unifill = new CUniFill();
_unifill.fill = new CNoFill();
oThis.WriteRecord2(0, _unifill, oThis.WriteUniFill);
oThis.EndRecord();
oThis.EndRecord();
return;
}
else
{
oThis.WriteRecord3(rec_type, _border, oThis.WriteTableCellBorderLineStyle);
}
}
this.WriteTableCellBorderLineStyle = function(_border)
{
if (_border.Value == border_None)
{
oThis.StartRecord(0);
oThis.WriteUChar(g_nodeAttributeStart);
oThis.WriteUChar(g_nodeAttributeEnd);
var _unifill = new CUniFill();
_unifill.fill = new CNoFill();
oThis.WriteRecord2(0, _unifill, oThis.WriteUniFill);
oThis.EndRecord();
return;
}
var bIsFill = false;
var bIsSize = false;
var bIsLnRef = false;
if (_border.unifill !== undefined && _border.unifill != null)
if ((_border.unifill !== undefined && _border.unifill != null) || _border.Color instanceof CDocumentColor)
{
bIsFill = true;
}
......@@ -3620,6 +3688,20 @@ function CBinaryFileWriter()
}
oThis.WriteUChar(g_nodeAttributeEnd);
// TODO: потом переделать по-нормальному
if (!_border.unifill && _border.Color instanceof CDocumentColor)
{
var _unifill = new CUniFill();
_unifill.fill = new CSolidFill();
_unifill.fill.color.color = new CRGBColor();
_unifill.fill.color.color.RGBA.R = _border.Color.r;
_unifill.fill.color.color.RGBA.G = _border.Color.g;
_unifill.fill.color.color.RGBA.B = _border.Color.b;
oThis.WriteRecord2(0, _unifill, oThis.WriteUniFill);
}
oThis.WriteRecord2(0, _border.unifill, oThis.WriteUniFill);
oThis.EndRecord();
......
......@@ -1804,6 +1804,15 @@ CopyProcessor.prototype =
this.oPresentationWriter.WriteDouble(presentation.Width);
this.oPresentationWriter.WriteDouble(presentation.Height);
this.CopyPresentationTableCells(this.ElemToSelect, graphicObjects.State.textObject);
var selected_objects = graphicObjects.State.id === STATES_ID_GROUP ? graphicObjects.State.group.selectedObjects : graphicObjects.selectedObjects;
for(var i = 0; i < selected_objects.length; ++i)
{
var selected_object = selected_objects[i];
this.oPresentationWriter.WriteDouble(selected_object.x);
this.oPresentationWriter.WriteDouble(selected_object.y);
this.oPresentationWriter.WriteDouble(selected_object.extX);
this.oPresentationWriter.WriteDouble(selected_object.extY);
}
break;
}
}
......@@ -1836,6 +1845,14 @@ CopyProcessor.prototype =
this.CopyPresentationTableFull(this.ElemToSelect, selected_objects[i]);
}
}
for(var i = 0; i < selected_objects.length; ++i)
{
var selected_object = selected_objects[i];
this.oPresentationWriter.WriteDouble(selected_object.x);
this.oPresentationWriter.WriteDouble(selected_object.y);
this.oPresentationWriter.WriteDouble(selected_object.extX);
this.oPresentationWriter.WriteDouble(selected_object.extY);
}
this.CommitSpan(false);
for(var i = 0; i < this.Para.childNodes.length; i++)
......@@ -1956,8 +1973,18 @@ CopyProcessor.prototype =
this.oPresentationWriter.WriteULong(table_styles_ids[i]);
}
}
this.oPresentationWriter.WriteSlide(slide);
this.oPresentationWriter.WriteULong(sp_tree.length);
for(var i = 0; i < sp_tree.length; ++i)
{
var sp = sp_tree[i];
this.oPresentationWriter.WriteDouble(sp.x);
this.oPresentationWriter.WriteDouble(sp.y);
this.oPresentationWriter.WriteDouble(sp.extX);
this.oPresentationWriter.WriteDouble(sp.extY);
}
var j = 0;
for(var i = 0; i < sp_tree.length; ++i)
{
......@@ -3511,6 +3538,7 @@ PasteProcessor.prototype =
{
var objects = this.ReadPresentationShapes(stream);
var arr_shapes = objects.arrShapes;
var arrTransforms = objects.arrTransforms;
var presentation = editor.WordControl.m_oLogicDocument;
oThis = this;
var font_map = {};
......@@ -3545,6 +3573,18 @@ PasteProcessor.prototype =
arr_shapes[i].changeSize(kw, kh);
slide.addToSpTreeToPos(slide.cSld.spTree.length, arr_shapes[i]);
arr_shapes[i].select(slide.graphicObjects);
var current_shape = arr_shapes[i];
if(!current_shape.checkNotNullTransform() && arrTransforms[i])
{
var t = arrTransforms[i];
current_shape.setOffset(t.x, t.y);
current_shape.setExtents(t.extX, t.extY);
if(current_shape instanceof CGroupShape)
{
current_shape.setChildOffset(0, 0);
current_shape.setChildExtents(t.extX, t.extY);
}
}
}
}
presentation.Recalculate();
......@@ -3629,6 +3669,7 @@ PasteProcessor.prototype =
loader.stream = stream;
loader.presentation = editor.WordControl.m_oLogicDocument;
var slide_count = stream.GetULong();
var arr_arrTransforms = [];
for(var i = 0; i < slide_count; ++i)
{
arr_layouts_id[i] = stream.GetString2();
......@@ -3652,6 +3693,18 @@ PasteProcessor.prototype =
++t;
}
}
var arrTransforms = [];
var sp_tree_length = stream.GetULong();
for(s = 0; s < sp_tree_length; ++s)
{
var transform_object = {};
transform_object.x = stream.GetULong()/100000;
transform_object.y = stream.GetULong()/100000;
transform_object.extX = stream.GetULong()/100000;
transform_object.extY = stream.GetULong()/100000;
arrTransforms.push(transform_object);
}
arr_arrTransforms.push(arrTransforms);
}
var arr_layouts = [];
......@@ -3686,8 +3739,7 @@ PasteProcessor.prototype =
{
arr_slides[i].changeSize(kw, kh);
arr_slides[i].setLayout(arr_layouts[arr_indexes[i]]);
arr_slides[i].Width = presentation.Width;
arr_slides[i].Height = presentation.Height;
arr_slides[i].setSlideSize(presentation.Width, presentation.Height);
}
}
else
......@@ -3721,11 +3773,13 @@ PasteProcessor.prototype =
if(isRealObject(g_oTableId.Get_ById(arr_layouts_id[i])))
{
arr_slides[i].changeSize(kw, kh);
arr_slides[i].setSlideSize(presentation.Width, presentation.Height);
arr_slides[i].setLayout(g_oTableId.Get_ById(arr_layouts_id[i]));
}
else
{
arr_slides[i].changeSize(kw, kh);
arr_slides[i].setSlideSize(presentation.Width, presentation.Height);
arr_slides[i].setLayout(arr_layouts[arr_indexes[i]]);
for(var j = 0; j < addedLayouts.length; ++j)
{
......@@ -3748,6 +3802,7 @@ PasteProcessor.prototype =
for(var i =0; i < slide_count; ++i)
{
arr_slides[i].changeSize(kw, kh);
arr_slides[i].setSlideSize(presentation.Width, presentation.Height);
arr_slides[i].setLayout(g_oTableId.Get_ById(arr_layouts_id[i]));
arr_slides[i].Width = presentation.Width;
arr_slides[i].Height = presentation.Height;
......@@ -3784,7 +3839,25 @@ PasteProcessor.prototype =
{
for(var i = 0; i < arr_slides.length; ++i)
{
presentation.insertSlide(presentation.CurPage + i+1, arr_slides[i]);
var cur_arr_transform = arr_arrTransforms[i];
var cur_slide = arr_slides[i];
var sp_tree = cur_slide.cSld.spTree;
for(var j = 0; j < sp_tree.length; ++j)
{
var sp = sp_tree[j];
if(!sp.checkNotNullTransform() && cur_arr_transform && cur_arr_transform[j])
{
var t_object = cur_arr_transform[j];
sp.setOffset(t_object.x, t_object.y);
sp.setExtents(t_object.extX, t_object.extY);
if(sp instanceof CGroupShape)
{
sp.setChildOffset(0, 0);
sp.setChildExtents(t_object.extX, t_object.extY);
}
}
}
presentation.insertSlide(presentation.CurPage + i+1, cur_slide);
}
presentation.Recalculate();
nodeDisplay.blur();
......@@ -3793,7 +3866,7 @@ PasteProcessor.prototype =
};
var image_objects = loader.End_UseFullUrl();
var objects = {arrImages:image_objects}
var objects = {arrImages:image_objects};
var oImagesToDownload = {};
if(objects.arrImages.length > 0)
{
......@@ -4074,6 +4147,7 @@ PasteProcessor.prototype =
var presentation = editor.WordControl.m_oLogicDocument;
var count = stream.GetULong();
var arr_shapes = [];
var arr_transforms = [];
for(var i = 0; i < count; ++i)
{
loader.TempMainObject = presentation.Slides[presentation.CurPage];
......@@ -4108,7 +4182,16 @@ PasteProcessor.prototype =
}
}
return {arrShapes: arr_shapes, arrImages: loader.End_UseFullUrl()};
for(var i = 0; i < count; ++i)
{
var x = stream.GetULong()/100000;
var y = stream.GetULong()/100000;
var extX = stream.GetULong()/100000;
var extY = stream.GetULong()/100000;
arr_transforms.push({x:x, y:y, extX: extX, extY:extY});
}
return {arrShapes: arr_shapes, arrImages: loader.End_UseFullUrl(), arrTransforms: arr_transforms};
},
ReadPresentationSlides: function(stream)
......
......@@ -365,7 +365,7 @@ CChartAsGroup.prototype =
var title_str = api.chartTranslate.title;
this.chartTitle.setTextBody(new CTextBody(this.chartTitle));
for(var i in title_str)
this.chartTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false);
this.chartTitle.txBody.content.Paragraph_Add(CreateParagraphContent(title_str[i]), false);
this.chart.header.title = this.chartTitle.txBody.content.getTextString();
}
else
......@@ -400,7 +400,7 @@ CChartAsGroup.prototype =
var title_str = api.chartTranslate.xAxis;;
this.hAxisTitle.setTextBody(new CTextBody(this.hAxisTitle));
for(var i in title_str)
this.hAxisTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false);
this.hAxisTitle.txBody.content.Paragraph_Add(CreateParagraphContent(title_str[i]), false);
this.chart.xAxis.title = this.hAxisTitle.txBody.content.getTextString();
}
......@@ -440,7 +440,7 @@ CChartAsGroup.prototype =
this.vAxisTitle.txBody.setVert(90);
for(var i in title_str)
this.vAxisTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false);
this.vAxisTitle.txBody.content.Paragraph_Add(CreateParagraphContent(title_str[i]), false);
this.chart.yAxis.title = this.vAxisTitle.txBody.content.getTextString();
}
......@@ -535,7 +535,7 @@ CChartAsGroup.prototype =
var title_str = chart.header.title;
for(var i in title_str)
{
tx_body.content.Paragraph_Add(new ParaText(title_str[i]));
tx_body.content.Paragraph_Add(CreateParagraphContent(title_str[i]));
}
chart_title.setTextBody(tx_body);
this.addTitle(chart_title);
......@@ -570,7 +570,7 @@ CChartAsGroup.prototype =
var title_str = this.chart.xAxis.title;
for(var i in title_str)
{
tx_body.content.Paragraph_Add(new ParaText(title_str[i]));
tx_body.content.Paragraph_Add(CreateParagraphContent(title_str[i]));
}
chart_title.setTextBody(tx_body);
this.addXAxis(chart_title);
......@@ -615,7 +615,7 @@ CChartAsGroup.prototype =
var title_str = this.chart.yAxis.title;
for(var i in title_str)
{
tx_body.content.Paragraph_Add(new ParaText(title_str[i]));
tx_body.content.Paragraph_Add(CreateParagraphContent(title_str[i]));
}
chart_title.setTextBody(tx_body);
this.addYAxis(chart_title);
......@@ -732,7 +732,7 @@ CChartAsGroup.prototype =
this.addTitle(new CChartTitle(this, CHART_TITLE_TYPE_TITLE));
this.chartTitle.setTextBody(new CTextBody(this.chartTitle));
for(var i in title_string)
this.chartTitle.txBody.content.Paragraph_Add(new ParaText(title_string[i]), false);
this.chartTitle.txBody.content.Paragraph_Add(CreateParagraphContent(title_string[i]), false);
}
if(isRealObject(this.chart.xAxis) && this.chart.xAxis.bShow)
......@@ -745,7 +745,7 @@ CChartAsGroup.prototype =
this.addXAxis(new CChartTitle(this, CHART_TITLE_TYPE_H_AXIS));
this.hAxisTitle.setTextBody(new CTextBody(this.hAxisTitle));
for(var i in title_string)
this.hAxisTitle.txBody.content.Paragraph_Add(new ParaText(title_string[i]), false);
this.hAxisTitle.txBody.content.Paragraph_Add(CreateParagraphContent(title_string[i]), false);
//this.chart.xAxis.bDefaultTitle = false;
......@@ -763,7 +763,7 @@ CChartAsGroup.prototype =
this.addYAxis(new CChartTitle(this, CHART_TITLE_TYPE_V_AXIS));
this.vAxisTitle.setTextBody(new CTextBody(this.vAxisTitle));
for(var i in title_string)
this.vAxisTitle.txBody.content.Paragraph_Add(new ParaText(title_string[i]), false);
this.vAxisTitle.txBody.content.Paragraph_Add(CreateParagraphContent(title_string[i]), false);
}
this.init();
......
......@@ -4001,8 +4001,9 @@ Woorksheet.prototype.renameDependencyNodes = function(offset, oBBox, rec, noDele
var n = objForRebuldFormula.move[id].node;
var _sn = n.getSlaveEdges2();
for( var _id in _sn ){
var cell = _sn[_id].returnCell(), cellName = cell.getName();
var cell = _sn[_id].returnCell(), cellName;
if( undefined == cell ) { continue; }
cellName = cell.getName();
if( cell.formulaParsed ){
cell.formulaParsed.shiftCells( objForRebuldFormula.move[id].offset, oBBox, n, this.Id, objForRebuldFormula.move[id].toDelete );
cell.setFormula(cell.formulaParsed.assemble());
......
......@@ -609,6 +609,35 @@ CChartAsGroup.prototype =
this.setExtents(new_ext_x, new_ext_y);
},
checkNotNullTransform: function()
{
if(this.spPr.xfrm && this.spPr.xfrm.isNotNull())
return true;
if(this.isPlaceholder())
{
var ph_type = this.getPlaceholderType();
var ph_index = this.getPlaceholderIndex();
switch (this.parent.kind)
{
case SLIDE_KIND:
{
var placeholder = this.parent.Layout.getMatchingShape(ph_type, ph_index);
if(placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNull())
return true;
placeholder = this.parent.Layout.Master.getMatchingShape(ph_type, ph_index);
return placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNull();
}
case LAYOUT_KIND:
{
var placeholder = this.parent.Master.getMatchingShape(ph_type, ph_index);
return placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNull();
}
}
}
return false;
},
setRotate: function(rot)
{
var xfrm = this.spPr.xfrm;
......@@ -832,7 +861,7 @@ CChartAsGroup.prototype =
var title_str = chart.header.title;
for(var i in title_str)
{
tx_body.content.Paragraph_Add(new ParaText(title_str[i]));
tx_body.content.Paragraph_Add(CreateParagraphContent(title_str[i]));
}
chart_title.setTextBody(tx_body);
this.addTitle(chart_title);
......@@ -849,7 +878,7 @@ CChartAsGroup.prototype =
var title_str = this.chart.xAxis.title;
for(var i in title_str)
{
tx_body.content.Paragraph_Add(new ParaText(title_str[i]));
tx_body.content.Paragraph_Add(CreateParagraphContent(title_str[i]));
}
chart_title.setTextBody(tx_body);
this.addXAxis(chart_title);
......@@ -861,7 +890,7 @@ CChartAsGroup.prototype =
var title_str = this.chart.yAxis.title;
for(var i in title_str)
{
tx_body.content.Paragraph_Add(new ParaText(title_str[i]));
tx_body.content.Paragraph_Add(CreateParagraphContent(title_str[i]));
}
chart_title.setTextBody(tx_body);
this.addYAxis(chart_title);
......@@ -1352,7 +1381,7 @@ CChartAsGroup.prototype =
this.chartTitle.setTextBody(new CTextBody(this.chartTitle));
for(var i in title_str)
this.chartTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false);
this.chartTitle.txBody.content.Paragraph_Add(CreateParagraphContent(title_str[i]), false);
}
else
{
......@@ -1388,7 +1417,7 @@ CChartAsGroup.prototype =
var title_str = "X Axis";
this.hAxisTitle.setTextBody(new CTextBody(this.hAxisTitle));
for(var i in title_str)
this.hAxisTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false);
this.hAxisTitle.txBody.content.Paragraph_Add(CreateParagraphContent(title_str[i]), false);
}
else
{
......@@ -1430,7 +1459,7 @@ CChartAsGroup.prototype =
this.vAxisTitle.setBodyPr(body_pr);
for(var i in title_str)
this.vAxisTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false);
this.vAxisTitle.txBody.content.Paragraph_Add(CreateParagraphContent(title_str[i]), false);
}
else
{
......@@ -2761,6 +2790,8 @@ CChartAsGroup.prototype =
}
};
window["Asc"].CChartAsGroup = CChartAsGroup;
window["Asc"]["CChartAsGroup"] = CChartAsGroup;
prot = CChartAsGroup.prototype;
......
......@@ -82,6 +82,12 @@ CGraphicFrame.prototype =
cells[j].Content.Document_Get_AllFontNames(fonts);
}
}
delete fonts["+mj-lt"];
delete fonts["+mn-lt"];
delete fonts["+mj-ea"];
delete fonts["+mn-ea"];
delete fonts["+mj-cs"];
delete fonts["+mn-cs"];
}
},
......@@ -261,6 +267,35 @@ CGraphicFrame.prototype =
return this.Id;
},
checkNotNullTransform: function()
{
if(this.spPr.xfrm && this.spPr.xfrm.isNotNull())
return true;
if(this.isPlaceholder())
{
var ph_type = this.getPlaceholderType();
var ph_index = this.getPlaceholderIndex();
switch (this.parent.kind)
{
case SLIDE_KIND:
{
var placeholder = this.parent.Layout.getMatchingShape(ph_type, ph_index);
if(placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNull())
return true;
placeholder = this.parent.Layout.Master.getMatchingShape(ph_type, ph_index);
return placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNull();
}
case LAYOUT_KIND:
{
var placeholder = this.parent.Master.getMatchingShape(ph_type, ph_index);
return placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNull();
}
}
}
return false;
},
getHierarchy: function()
{
if(this.recalcInfo.recalculateShapeHierarchy)
......@@ -799,7 +834,7 @@ CGraphicFrame.prototype =
}
}
this.graphicObject.Selection_SetStart(tx, ty, 0, e);
this.graphicObject.RecalculateCurPos();
return
}
......
......@@ -691,6 +691,35 @@ CGroupShape.prototype =
return this.isPlaceholder() ? this.nvGrpSpPr.nvPr.ph.idx : null;
},
checkNotNullTransform: function()
{
if(this.spPr.xfrm && this.spPr.xfrm.isNotNullForGroup())
return true;
if(this.isPlaceholder())
{
var ph_type = this.getPlaceholderType();
var ph_index = this.getPlaceholderIndex();
switch (this.parent.kind)
{
case SLIDE_KIND:
{
var placeholder = this.parent.Layout.getMatchingShape(ph_type, ph_index);
if(placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNullForGroup())
return true;
placeholder = this.parent.Layout.Master.getMatchingShape(ph_type, ph_index);
return placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNullForGroup();
}
case LAYOUT_KIND:
{
var placeholder = this.parent.Master.getMatchingShape(ph_type, ph_index);
return placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNullForGroup();
}
}
}
return false;
},
getHierarchy: function()
{
this.compiledHierarchy = [];
......
......@@ -494,6 +494,35 @@ CImageShape.prototype =
},
checkNotNullTransform: function()
{
if(this.spPr.xfrm && this.spPr.xfrm.isNotNull())
return true;
if(this.isPlaceholder())
{
var ph_type = this.getPlaceholderType();
var ph_index = this.getPlaceholderIndex();
switch (this.parent.kind)
{
case SLIDE_KIND:
{
var placeholder = this.parent.Layout.getMatchingShape(ph_type, ph_index);
if(placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNull())
return true;
placeholder = this.parent.Layout.Master.getMatchingShape(ph_type, ph_index);
return placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNull();
}
case LAYOUT_KIND:
{
var placeholder = this.parent.Master.getMatchingShape(ph_type, ph_index);
return placeholder && placeholder.spPr && placeholder.spPr.xfrm && placeholder.spPr.xfrm.isNotNull();
}
}
}
return false;
},
getHierarchy: function()
{
if(this.recalcInfo.recalculateShapeHierarchy)
......
......@@ -557,7 +557,7 @@ SlideLayout.prototype =
changeBackground: function(bg)
{
History.Add(this, {Type: historyitem_ChangeBg, oldBg: this.cSld.Bg ? this.cSld.Bg.createFullCopy() : null, newBg: bg});
this.cSld.Bg = bg.createFullCopy();
this.cSld.Bg = bg;
},
setCSldName: function(name)
......
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -1036,14 +1036,14 @@ Slide.prototype =
setSlideSize: function(w, h)
{
History.Add(this, {Type: historyitem_SetSlideSizes, oldW: this.Width, oldH: this.Height, newW: w, newH: h});
this.w = w;
this.h = h;
this.Width = w;
this.Height = h;
},
changeBackground: function(bg)
{
History.Add(this, {Type: historyitem_ChangeBg, oldBg: this.cSld.Bg ? this.cSld.Bg.createFullCopy() : null, newBg: bg});
this.cSld.Bg = bg.createFullCopy();
this.cSld.Bg = bg;
this.recalcInfo.recalculateBackground = true;
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
},
......
......@@ -406,7 +406,7 @@ MasterSlide.prototype =
changeBackground: function(bg)
{
History.Add(this, {Type: historyitem_ChangeBg, oldBg: this.cSld.Bg ? this.cSld.Bg.createFullCopy() : null, newBg: bg});
this.cSld.Bg = bg.createFullCopy();
this.cSld.Bg = bg;
this.recalcInfo.recalculateBackground = true;
editor.WordControl.m_oLogicDocument.recalcMap[this.Id] = this;
},
......
......@@ -766,7 +766,7 @@ CTextBody.prototype =
var par = dc.Content[i];
for(var i = 0; i < par.Content.length; ++i)
{
if(!(par.Content[i] instanceof ParaEnd || par.Content[i] instanceof ParaEmpty) && par.Content[i].Copy)
if(!(par.Content[i] instanceof ParaEnd || par.Content[i] instanceof ParaEmpty || par.Content[i] instanceof ParaNumbering) && par.Content[i].Copy)
this.content.Paragraph_Add(par.Content[i].Copy());
}
}
......
......@@ -752,7 +752,7 @@ CChartAsGroup.prototype =
var title_str = chart.header.title;
for(var i in title_str)
{
tx_body.content.Paragraph_Add(new ParaText(title_str[i]));
tx_body.content.Paragraph_Add(CreateParagraphContent(title_str[i]));
}
chart_title.setTextBody(tx_body);
this.addTitle(chart_title);
......@@ -769,7 +769,7 @@ CChartAsGroup.prototype =
var title_str = this.chart.xAxis.title;
for(var i in title_str)
{
tx_body.content.Paragraph_Add(new ParaText(title_str[i]));
tx_body.content.Paragraph_Add(CreateParagraphContent(title_str[i]));
}
chart_title.setTextBody(tx_body);
this.addXAxis(chart_title);
......@@ -781,7 +781,7 @@ CChartAsGroup.prototype =
var title_str = this.chart.yAxis.title;
for(var i in title_str)
{
tx_body.content.Paragraph_Add(new ParaText(title_str[i]));
tx_body.content.Paragraph_Add(CreateParagraphContent(title_str[i]));
}
chart_title.setTextBody(tx_body);
this.addYAxis(chart_title);
......@@ -1261,7 +1261,7 @@ CChartAsGroup.prototype =
}
//this.chartTitle.txBody.content.Styles = this.chartTitle.getStyles();
for(var i in title_str)
this.chartTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false);
this.chartTitle.txBody.content.Paragraph_Add(CreateParagraphContent(title_str[i]), false);
}
else
{
......@@ -1363,7 +1363,7 @@ CChartAsGroup.prototype =
}
for(var i in title_str)
this.hAxisTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false);
this.hAxisTitle.txBody.content.Paragraph_Add(CreateParagraphContent(title_str[i]), false);
}
else
{
......@@ -1469,7 +1469,7 @@ CChartAsGroup.prototype =
this.vAxisTitle.txBody.bodyPr.vert = (nVertTTvert270);
for(var i in title_str)
this.vAxisTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false);
this.vAxisTitle.txBody.content.Paragraph_Add(CreateParagraphContent(title_str[i]), false);
}
else
{
......
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