Commit c47edc4f authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@55647 954022d7-b5bf-4e40-9824-e11837661b57
parent d46f669b
...@@ -494,7 +494,7 @@ CDLbl.prototype = ...@@ -494,7 +494,7 @@ CDLbl.prototype =
global_MatrixTransformer.TranslateAppend(_text_transform, 0, _vertical_shift); global_MatrixTransformer.TranslateAppend(_text_transform, 0, _vertical_shift);
if (_body_pr.vert === nVertTTvert) { if (_body_pr.vert === nVertTTvert) {
global_MatrixTransformer.TranslateAppend(_text_transform, -_content_width * 0.5, -content_height2 * 0.5); global_MatrixTransformer.TranslateAppend(_text_transform, -_content_width * 0.5, -content_height2 * 0.5);
global_MatrixTransformer.RotateRadAppend(_text_transform, -Math.PI * 0.5); global_MatrixTransformer.RotateRadAppend(_text_transform, -Math.PI * 1.5);
global_MatrixTransformer.TranslateAppend(_text_transform, _content_width * 0.5, content_height2 * 0.5); global_MatrixTransformer.TranslateAppend(_text_transform, _content_width * 0.5, content_height2 * 0.5);
} }
...@@ -604,7 +604,7 @@ CDLbl.prototype = ...@@ -604,7 +604,7 @@ CDLbl.prototype =
style.TextPr.Merge(this.legend.txPr.content.Content[0].Pr.DefaultRunPr); style.TextPr.Merge(this.legend.txPr.content.Content[0].Pr.DefaultRunPr);
} }
if(this.parent && this.parent.txPr if(!(this instanceof CTitle) && this.parent && this.parent.txPr
&& this.parent.txPr.content && this.parent.txPr.content
&& this.parent.txPr.content.Content[0] && this.parent.txPr.content.Content[0]
&& this.parent.txPr.content.Content[0].Pr) && this.parent.txPr.content.Content[0].Pr)
...@@ -705,7 +705,7 @@ CDLbl.prototype = ...@@ -705,7 +705,7 @@ CDLbl.prototype =
getMaxWidth: function(bodyPr) getMaxWidth: function(bodyPr)
{ {
if(!(this.parent && this.chart && this.chart.plotArea && this.chart.plotArea.valAx === this.parent)) if(!(this.parent && (this.parent.axPos === AX_POS_L || this.parent.axPos === AX_POS_R)))
{ {
switch (bodyPr.vert) switch (bodyPr.vert)
{ {
...@@ -740,6 +740,15 @@ CDLbl.prototype = ...@@ -740,6 +740,15 @@ CDLbl.prototype =
{ {
ret.merge(this.txPr.bodyPr); ret.merge(this.txPr.bodyPr);
} }
if(this.parent && isRealNumber(this.parent.axPos) && (this.parent.axPos === AX_POS_L || this.parent.axPos === AX_POS_R)
&& (!this.txPr || !this.txPr.bodyPr || !isRealNumber(this.txPr.bodyPr.vert)))
{
ret.vert = nVertTTvert270;
}
if( (!this.txPr || !this.txPr.bodyPr || !isRealNumber(this.txPr.bodyPr.anchor)))
{
ret.anchor = 1;
}
switch (ret.vert) switch (ret.vert)
{ {
...@@ -2734,6 +2743,8 @@ CAreaSeries.prototype = ...@@ -2734,6 +2743,8 @@ CAreaSeries.prototype =
} }
}, },
getSeriesName: function() getSeriesName: function()
{ {
if(this.tx) if(this.tx)
...@@ -15675,6 +15686,12 @@ CTitle.prototype = ...@@ -15675,6 +15686,12 @@ CTitle.prototype =
case nVertTTwordArtVertRtl: case nVertTTwordArtVertRtl:
case nVertTTvert270: case nVertTTvert270:
{ {
var vert_axis = this.chart.chart.plotArea.getVerticalAxis();
if( vert_axis && vert_axis.title === this)
{
var hor_axis = this.chart.chart.plotArea.getHorizontalAxis();
return this.chart.extY - (hor_axis && hor_axis.title ? hor_axis.title.extY : 0 )
}
return this.chart.extY/2; return this.chart.extY/2;
} }
case nVertTThorz: case nVertTThorz:
......
...@@ -4917,17 +4917,19 @@ CChartSpace.prototype = ...@@ -4917,17 +4917,19 @@ CChartSpace.prototype =
} }
if(this.chart && this.chart.plotArea) if(this.chart && this.chart.plotArea)
{ {
if(this.chart.plotArea.catAx && this.chart.plotArea.catAx.title) var hor_axis = this.chart.plotArea.getHorizontalAxis();
if(hor_axis && hor_axis.title)
{ {
var title = this.chart.plotArea.catAx.title; var title = hor_axis.title;
title.parent = this.chart.plotArea.catAx; title.parent = hor_axis;
title.chart = this; title.chart = this;
title.recalculate(); title.recalculate();
} }
if(this.chart.plotArea.valAx && this.chart.plotArea.valAx.title) var vert_axis = this.chart.plotArea.getVerticalAxis();
if(vert_axis && vert_axis.title)
{ {
var title = this.chart.plotArea.valAx.title; var title = vert_axis.title;
title.parent = this.chart.plotArea.valAx; title.parent = vert_axis;
title.chart = this; title.chart = this;
title.recalculate(); title.recalculate();
} }
......
...@@ -459,8 +459,8 @@ function CColorMod() ...@@ -459,8 +459,8 @@ function CColorMod()
{ {
this.name = ""; this.name = "";
this.val = 0; this.val = 0;
this.Id = g_oIdCounter.Get_NewId(); //this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id); //g_oTableId.Add(this, this.Id);
} }
CColorMod.prototype = CColorMod.prototype =
...@@ -479,13 +479,13 @@ CColorMod.prototype = ...@@ -479,13 +479,13 @@ CColorMod.prototype =
setName: function(name) setName: function(name)
{ {
History.Add(this, {Type: historyitem_ColorMod_SetName, oldName: this.name, newName: name}); //History.Add(this, {Type: historyitem_ColorMod_SetName, oldName: this.name, newName: name});
this.name = name; this.name = name;
}, },
setVal: function(val) setVal: function(val)
{ {
History.Add(this, {Type: historyitem_ColorMod_SetVal, oldVal: this.val, newVal: val}); //History.Add(this, {Type: historyitem_ColorMod_SetVal, oldVal: this.val, newVal: val});
this.val = val; this.val = val;
}, },
...@@ -590,8 +590,8 @@ function CColorModifiers() ...@@ -590,8 +590,8 @@ function CColorModifiers()
{ {
this.Mods = []; this.Mods = [];
this.Id = g_oIdCounter.Get_NewId(); //this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id); //g_oTableId.Add(this, this.Id);
} }
CColorModifiers.prototype = CColorModifiers.prototype =
...@@ -712,14 +712,14 @@ CColorModifiers.prototype = ...@@ -712,14 +712,14 @@ CColorModifiers.prototype =
addMod: function(mod) addMod: function(mod)
{ {
this.Mods.push(mod); this.Mods.push(mod);
History.Add(this, {Type: historyitem_ColorModifiers_AddColorMod, modId: mod.Get_Id()}); //History.Add(this, {Type: historyitem_ColorModifiers_AddColorMod, modId: mod.Get_Id()});
}, },
removeMod: function(pos) removeMod: function(pos)
{ {
var mod = this.Mods.splice(pos, 1)[0]; var mod = this.Mods.splice(pos, 1)[0];
History.Add(this, {Type: historyitem_ColorModifiers_RemoveColorMod, pos: pos, pr: mod}); //History.Add(this, {Type: historyitem_ColorModifiers_RemoveColorMod, pos: pos, pr: mod});
}, },
...@@ -1020,8 +1020,8 @@ function CSysColor() ...@@ -1020,8 +1020,8 @@ function CSysColor()
}; };
this.Id = g_oIdCounter.Get_NewId(); //this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id); //g_oTableId.Add(this, this.Id);
} }
CSysColor.prototype = CSysColor.prototype =
...@@ -1037,17 +1037,17 @@ CSysColor.prototype = ...@@ -1037,17 +1037,17 @@ CSysColor.prototype =
setR: function(pr) setR: function(pr)
{ {
History.Add(this, {Type:historyitem_SysColor_SetR, oldPr: this.RGBA.R, newPr:pr}); //History.Add(this, {Type:historyitem_SysColor_SetR, oldPr: this.RGBA.R, newPr:pr});
this.RGBA.R = pr; this.RGBA.R = pr;
}, },
setG: function(pr) setG: function(pr)
{ {
History.Add(this, {Type:historyitem_SysColor_SetG, oldPr: this.RGBA.G, newPr:pr}); //History.Add(this, {Type:historyitem_SysColor_SetG, oldPr: this.RGBA.G, newPr:pr});
this.RGBA.G = pr; this.RGBA.G = pr;
}, },
setB: function(pr) setB: function(pr)
{ {
History.Add(this, {Type:historyitem_SysColor_SetB, oldPr: this.RGBA.B, newPr:pr}); //History.Add(this, {Type:historyitem_SysColor_SetB, oldPr: this.RGBA.B, newPr:pr});
this.RGBA.B = pr; this.RGBA.B = pr;
}, },
...@@ -1130,7 +1130,7 @@ CSysColor.prototype = ...@@ -1130,7 +1130,7 @@ CSysColor.prototype =
setId: function(id) setId: function(id)
{ {
History.Add(this, {Type: historyitem_SysColor_SetId, oldId: this.id, newId: id}); //History.Add(this, {Type: historyitem_SysColor_SetId, oldId: this.id, newId: id});
this.id = id; this.id = id;
}, },
...@@ -1214,8 +1214,8 @@ function CPrstColor() ...@@ -1214,8 +1214,8 @@ function CPrstColor()
this.RGBA = { this.RGBA = {
R:0, G:0, B:0, A:255, needRecalc: true R:0, G:0, B:0, A:255, needRecalc: true
}; };
this.Id = g_oIdCounter.Get_NewId(); //this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id); //g_oTableId.Add(this, this.Id);
} }
CPrstColor.prototype = CPrstColor.prototype =
...@@ -1246,7 +1246,7 @@ CPrstColor.prototype = ...@@ -1246,7 +1246,7 @@ CPrstColor.prototype =
setId: function(id) setId: function(id)
{ {
History.Add(this, {Type: historyitem_PrstColor_SetId, oldId: this.id, newId: id}); //History.Add(this, {Type: historyitem_PrstColor_SetId, oldId: this.id, newId: id});
this.id = id; this.id = id;
}, },
...@@ -1333,8 +1333,8 @@ function CRGBColor() ...@@ -1333,8 +1333,8 @@ function CRGBColor()
{ {
this.type = COLOR_TYPE_SRGB; this.type = COLOR_TYPE_SRGB;
this.RGBA = {R:0, G:0, B:0, A:255, needRecalc: true}; this.RGBA = {R:0, G:0, B:0, A:255, needRecalc: true};
this.Id = g_oIdCounter.Get_NewId(); //this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id); //g_oTableId.Add(this, this.Id);
} }
CRGBColor.prototype = CRGBColor.prototype =
...@@ -1376,7 +1376,7 @@ CRGBColor.prototype = ...@@ -1376,7 +1376,7 @@ CRGBColor.prototype =
setColor: function(r, g, b) setColor: function(r, g, b)
{ {
var rgba = this.RGBA; var rgba = this.RGBA;
History.Add(this, {Type: historyitem_RGBColor_SetColor, oldColor: {r: rgba.R, g: rgba.G, b: rgba.B}, newColor: {r: r, g: g, b: b}}); // History.Add(this, {Type: historyitem_RGBColor_SetColor, oldColor: {r: rgba.R, g: rgba.G, b: rgba.B}, newColor: {r: r, g: g, b: b}});
this.RGBA.R = r; this.RGBA.R = r;
this.RGBA.G = g; this.RGBA.G = g;
this.RGBA.B = b; this.RGBA.B = b;
...@@ -1484,8 +1484,8 @@ function CSchemeColor() ...@@ -1484,8 +1484,8 @@ function CSchemeColor()
A:255, A:255,
needRecalc: true needRecalc: true
}; };
this.Id = g_oIdCounter.Get_NewId(); //this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id); //g_oTableId.Add(this, this.Id);
} }
CSchemeColor.prototype = CSchemeColor.prototype =
...@@ -1549,7 +1549,7 @@ CSchemeColor.prototype = ...@@ -1549,7 +1549,7 @@ CSchemeColor.prototype =
setId: function(id) setId: function(id)
{ {
History.Add(this, {Type: historyitem_SchemeColor_SetId, oldId: this.id, newId: id}); //History.Add(this, {Type: historyitem_SchemeColor_SetId, oldId: this.id, newId: id});
this.id = id; this.id = id;
}, },
...@@ -1667,8 +1667,8 @@ function CUniColor() ...@@ -1667,8 +1667,8 @@ function CUniColor()
B: 0, B: 0,
A: 255 A: 255
}; };
this.Id = g_oIdCounter.Get_NewId(); //this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id); //g_oTableId.Add(this, this.Id);
} }
CUniColor.prototype = CUniColor.prototype =
...@@ -1713,13 +1713,13 @@ CUniColor.prototype = ...@@ -1713,13 +1713,13 @@ CUniColor.prototype =
setColor: function(color) setColor: function(color)
{ {
History.Add(this, {Type: historyitem_UniColor_SetColor, oldColor: this.color, newColor: color}); //History.Add(this, {Type: historyitem_UniColor_SetColor, oldColor: this.color, newColor: color});
this.color = color; this.color = color;
}, },
setMods: function(mods) setMods: function(mods)
{ {
History.Add(this, {Type: historyitem_UniColor_SetMods, oldMods: this.Mods, newMods: mods}); //History.Add(this, {Type: historyitem_UniColor_SetMods, oldMods: this.Mods, newMods: mods});
this.Mods = mods; this.Mods = mods;
}, },
...@@ -2179,37 +2179,37 @@ CBlipFill.prototype = ...@@ -2179,37 +2179,37 @@ CBlipFill.prototype =
setRasterImageId: function(rasterImageId) setRasterImageId: function(rasterImageId)
{ {
History.Add(this, {Type: historyitem_BlipFill_SetRasterImageId, oldRasterImageId: this.RasterImageId, newRasterImageId: rasterImageId}); //History.Add(this, {Type: historyitem_BlipFill_SetRasterImageId, oldRasterImageId: this.RasterImageId, newRasterImageId: rasterImageId});
this.RasterImageId = rasterImageId; this.RasterImageId = rasterImageId;
}, },
setVectorImageBin: function(vectorImageBin) setVectorImageBin: function(vectorImageBin)
{ {
History.Add(this, {Type: historyitem_BlipFill_SetVectorImageBin, oldVectorImageBin: this.VectorImageBin, newVectorImageBin: vectorImageBin}); //History.Add(this, {Type: historyitem_BlipFill_SetVectorImageBin, oldVectorImageBin: this.VectorImageBin, newVectorImageBin: vectorImageBin});
this.VectorImageBin = vectorImageBin; this.VectorImageBin = vectorImageBin;
}, },
setSrcRect: function(srcRect) setSrcRect: function(srcRect)
{ {
History.Add(this, {Type: historyitem_BlipFill_SetSrcRect, oldSrcRect: this.srcRect, newSrcRect: srcRect}); //History.Add(this, {Type: historyitem_BlipFill_SetSrcRect, oldSrcRect: this.srcRect, newSrcRect: srcRect});
this.srcRect = srcRect; this.srcRect = srcRect;
}, },
setStretch: function(stretch) setStretch: function(stretch)
{ {
History.Add(this, {Type: historyitem_BlipFill_SetStretch, oldStretch: this.stretch, newStretch: stretch}); //History.Add(this, {Type: historyitem_BlipFill_SetStretch, oldStretch: this.stretch, newStretch: stretch});
this.stretch = stretch; this.stretch = stretch;
}, },
setTile: function(tile) setTile: function(tile)
{ {
History.Add(this, {Type: historyitem_BlipFill_SetTile, oldTile: this.tile, newTile: tile}); //History.Add(this, {Type: historyitem_BlipFill_SetTile, oldTile: this.tile, newTile: tile});
this.tile = tile; this.tile = tile;
}, },
setRotWithShape: function(rotWithShape) setRotWithShape: function(rotWithShape)
{ {
History.Add(this, {Type: historyitem_BlipFill_SetRotWithShape, oldRotWithShape: this.rotWithShape, newRotWidth: rotWithShape}); //History.Add(this, {Type: historyitem_BlipFill_SetRotWithShape, oldRotWithShape: this.rotWithShape, newRotWidth: rotWithShape});
this.rotWithShape = rotWithShape; this.rotWithShape = rotWithShape;
}, },
...@@ -2548,7 +2548,7 @@ function CSolidFill() ...@@ -2548,7 +2548,7 @@ function CSolidFill()
{ {
this.type = FILL_TYPE_SOLID; this.type = FILL_TYPE_SOLID;
this.color = null; this.color = null;
this.Id = g_oIdCounter.Get_NewId(); //this.Id = g_oIdCounter.Get_NewId();
} }
CSolidFill.prototype = CSolidFill.prototype =
...@@ -2577,7 +2577,7 @@ CSolidFill.prototype = ...@@ -2577,7 +2577,7 @@ CSolidFill.prototype =
setColor: function(color) setColor: function(color)
{ {
History.Add(this, {Type: historyitem_SolidFill_SetColor, oldColor: this.color, newColor: color}); //History.Add(this, {Type: historyitem_SolidFill_SetColor, oldColor: this.color, newColor: color});
this.color = color; this.color = color;
}, },
...@@ -3215,19 +3215,19 @@ CGradFill.prototype = ...@@ -3215,19 +3215,19 @@ CGradFill.prototype =
addColor: function(color) addColor: function(color)
{ {
History.Add(this, {Type: historyitem_GradFill_AddColor, color: color}); //History.Add(this, {Type: historyitem_GradFill_AddColor, color: color});
this.colors.push(color); this.colors.push(color);
}, },
setLin: function(lin) setLin: function(lin)
{ {
History.Add(this, {Type: historyitem_GradFill_SetLin, oldLin: this.lin, newLin: lin}); //History.Add(this, {Type: historyitem_GradFill_SetLin, oldLin: this.lin, newLin: lin});
this.lin = lin; this.lin = lin;
}, },
setPath: function(path) setPath: function(path)
{ {
History.Add(this, {Type: historyitem_GradFill_SetPath, oldPath: this.path, newPath: path}); //History.Add(this, {Type: historyitem_GradFill_SetPath, oldPath: this.path, newPath: path});
this.path = path; this.path = path;
}, },
...@@ -3444,19 +3444,19 @@ CPattFill.prototype = ...@@ -3444,19 +3444,19 @@ CPattFill.prototype =
setFType: function(fType) setFType: function(fType)
{ {
History.Add(this, {Type: historyitem_PathFill_SetFType, oldFType: this.ftype, newFType: fType}); //History.Add(this, {Type: historyitem_PathFill_SetFType, oldFType: this.ftype, newFType: fType});
this.ftype = fType; this.ftype = fType;
}, },
setFgColor: function(fgClr) setFgColor: function(fgClr)
{ {
History.Add(this, {Type: historyitem_PathFill_SetFgClr, oldFgClr: this.fgClr, newFgClr: fgClr}); //History.Add(this, {Type: historyitem_PathFill_SetFgClr, oldFgClr: this.fgClr, newFgClr: fgClr});
this.fgClr = fgClr; this.fgClr = fgClr;
}, },
setBgColor: function(bgClr) setBgColor: function(bgClr)
{ {
History.Add(this, {Type: historyitem_PathFill_SetBgClr, oldBgClr: this.bgClr, newBgClr: bgClr}); //History.Add(this, {Type: historyitem_PathFill_SetBgClr, oldBgClr: this.bgClr, newBgClr: bgClr});
this.bgClr = bgClr; this.bgClr = bgClr;
}, },
...@@ -3741,7 +3741,7 @@ function CUniFill() ...@@ -3741,7 +3741,7 @@ function CUniFill()
{ {
this.fill = null; this.fill = null;
this.transparent = null; this.transparent = null;
this.Id = g_oIdCounter.Get_NewId(); // this.Id = g_oIdCounter.Get_NewId();
} }
CUniFill.prototype = CUniFill.prototype =
...@@ -3774,13 +3774,13 @@ CUniFill.prototype = ...@@ -3774,13 +3774,13 @@ CUniFill.prototype =
setFill: function(fill) setFill: function(fill)
{ {
History.Add(this, {Type: historyitem_UniFill_SetFill, oldFill: this.fill, newFill: fill}); //History.Add(this, {Type: historyitem_UniFill_SetFill, oldFill: this.fill, newFill: fill});
this.fill = fill; this.fill = fill;
}, },
setTransparent: function(transparent) setTransparent: function(transparent)
{ {
History.Add(this, {Type: historyitem_UniFill_SetTransparent, oldTransparent: this.transparent, newTransparent: transparent}); //History.Add(this, {Type: historyitem_UniFill_SetTransparent, oldTransparent: this.transparent, newTransparent: transparent});
this.transparent = transparent; this.transparent = transparent;
}, },
......
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