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

Обводка floor. Добавление mod в Unifill

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@68371 954022d7-b5bf-4e40-9824-e11837661b57
parent 1ac11ce1
......@@ -6241,20 +6241,41 @@ CChartSpace.prototype =
{
return;
}
var parent_objects = this.getParentObjects();
if(oSide.spPr && oSide.spPr.ln)
{
oSide.pen = oSide.spPr.ln.createDuplicate();
}
else
{
oSide.pen = null;
var oCompiledPen = null;
if(this.style >= 1 && this.style <= 40 && 2 === nSideType)
{
if(parent_objects.theme && parent_objects.theme.themeElements
&& parent_objects.theme.themeElements.fmtScheme
&& parent_objects.theme.themeElements.fmtScheme.lnStyleLst
&& parent_objects.theme.themeElements.fmtScheme.lnStyleLst[0])
{
oCompiledPen = parent_objects.theme.themeElements.fmtScheme.lnStyleLst[0].createDuplicate();
if(this.style >= 1 && this.style <= 32)
{
oCompiledPen.Fill = CreateUnifillSolidFillSchemeColor(15, 0.75);
}
else
{
oCompiledPen.Fill = CreateUnifillSolidFillSchemeColor(8, 0.75);
}
}
}
oSide.pen = oCompiledPen;
}
if(this.style >= 1 && this.style <= 32)
{
if(oSide.spPr && oSide.spPr.Fill)
{
oSide.brush = oSide.spPr.Fill.createDuplicate();
if( oSide.brush.fill && oSide.brush.fill.color && (nSideType === 0 || nSideType === 2))
if(nSideType === 0 || nSideType === 2)
{
var cColorMod = new CColorMod;
if(nSideType === 2)
......@@ -6262,19 +6283,17 @@ CChartSpace.prototype =
else
cColorMod.val = 35000;
cColorMod.name = "shade";
oSide.brush.fill.color.Mods.addMod(cColorMod);
oSide.brush.addColorMod(cColorMod);
}
}
else
{
oSide.brush = null;
}
return;
}
else
{
var oSubtleFill;
var parent_objects = this.getParentObjects();
if(parent_objects.theme && parent_objects.theme.themeElements
&& parent_objects.theme.themeElements.fmtScheme
&& parent_objects.theme.themeElements.fmtScheme.fillStyleLst)
......@@ -6296,7 +6315,7 @@ CChartSpace.prototype =
oDefaultBrush.merge(oSide.spPr.Fill);
}
if( oDefaultBrush.fill && oDefaultBrush.fill.color && (nSideType === 0 || nSideType === 2))
if(nSideType === 0 || nSideType === 2)
{
var cColorMod = new CColorMod;
if(nSideType === 0)
......@@ -6304,10 +6323,19 @@ CChartSpace.prototype =
else
cColorMod.val = 35000;
cColorMod.name = "shade";
oDefaultBrush.fill.color.Mods.addMod(cColorMod);
oDefaultBrush.addColorMod(cColorMod);
}
oSide.brush = oDefaultBrush;
}
if(oSide.brush)
{
oSide.brush.calculate(parent_objects.theme, parent_objects.slide, parent_objects.layout, parent_objects.master, {R: 0, G: 0, B: 0, A: 255});
}
if(oSide.pen)
{
oSide.pen.calculate(parent_objects.theme, parent_objects.slide, parent_objects.layout, parent_objects.master, {R: 0, G: 0, B: 0, A: 255});
}
},
recalculateWalls: function()
......
......@@ -1429,6 +1429,16 @@ CUniColor.prototype =
}
},
addColorMod: function(mod)
{
if(!this.Mods)
{
this.Mods = new CColorModifiers();
}
this.Mods.addMod(mod.createDuplicate());
},
check: function(theme, colorMap)
{
if(this.color && this.color.check(theme, colorMap.color_map)/*возвращает был ли изменен RGBA*/)
......@@ -2928,6 +2938,60 @@ CUniFill.prototype =
}
},
addColorMod: function(mod)
{
if(this.fill)
{
switch(this.fill.type)
{
case FILL_TYPE_NONE:
{
break;
}
case FILL_TYPE_BLIP:
{
break;
}
case FILL_TYPE_NOFILL:
{
break;
}
case FILL_TYPE_SOLID:
{
if(this.fill.color && this.fill.color)
{
this.fill.color.addColorMod(mod);
}
break;
}
case FILL_TYPE_GRAD:
{
for(var i = 0; i < this.fill.colors.length; ++i)
{
if(this.fill.colors[i] && this.fill.colors[i].color)
{
this.fill.colors[i].color.addColorMod(mod);
}
}
break;
}
case FILL_TYPE_PATT:
{
if(this.fill.bgClr)
{
this.fill.bgClr.addColorMod(mod);
}
if(this.fill.fgClr)
{
this.fill.fgClr.addColorMod(mod);
}
break;
}
}
}
},
checkPhColor: function(unicolor)
{
if(this.fill)
......
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