Commit 1fa0b53f authored by Alexey.Golubev's avatar Alexey.Golubev Committed by Alexander.Trofimov

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

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51819 954022d7-b5bf-4e40-9824-e11837661b57
parent 16395501
......@@ -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();
......
This diff is collapsed.
......@@ -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 diff is collapsed.
This diff is collapsed.
......@@ -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