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

grpFill

parent 02f25345
...@@ -6030,6 +6030,10 @@ DrawingObjectsController.prototype = ...@@ -6030,6 +6030,10 @@ DrawingObjectsController.prototype =
sp.spPr.xfrm.setFlipH(cur_group.spPr.xfrm.flipH === true ? !(sp.spPr.xfrm.flipH === true) : sp.spPr.xfrm.flipH === true); sp.spPr.xfrm.setFlipH(cur_group.spPr.xfrm.flipH === true ? !(sp.spPr.xfrm.flipH === true) : sp.spPr.xfrm.flipH === true);
sp.spPr.xfrm.setFlipV(cur_group.spPr.xfrm.flipV === true ? !(sp.spPr.xfrm.flipV === true) : sp.spPr.xfrm.flipV === true); sp.spPr.xfrm.setFlipV(cur_group.spPr.xfrm.flipV === true ? !(sp.spPr.xfrm.flipV === true) : sp.spPr.xfrm.flipV === true);
sp.setGroup(null); sp.setGroup(null);
if(sp.spPr.Fill && sp.spPr.Fill.fill && sp.spPr.Fill.fill.type === Asc.c_oAscFill.FILL_TYPE_GRP && cur_group.spPr && cur_group.spPr.Fill)
{
sp.spPr.setFill(cur_group.spPr.Fill.createDuplicate());
}
sp.addToDrawingObjects(); sp.addToDrawingObjects();
sp.checkDrawingBaseCoords(); sp.checkDrawingBaseCoords();
this.selectObject(sp, 0); this.selectObject(sp, 0);
......
...@@ -11242,11 +11242,6 @@ function CreateAscFill(unifill) ...@@ -11242,11 +11242,6 @@ function CreateAscFill(unifill)
ret.type = c_oAscFill.FILL_TYPE_NOFILL; ret.type = c_oAscFill.FILL_TYPE_NOFILL;
break; break;
} }
case c_oAscFill.FILL_TYPE_GRP:
{
ret.type = c_oAscFill.FILL_TYPE_GRP;
break;
}
default: default:
break; break;
} }
......
...@@ -26,7 +26,7 @@ function CheckObjectLine(obj) ...@@ -26,7 +26,7 @@ function CheckObjectLine(obj)
function CheckWordArtTextPr(oRun) function CheckWordArtTextPr(oRun)
{ {
var oTextPr = oRun.Get_CompiledPr() var oTextPr = oRun.Get_CompiledPr();
if(oTextPr.TextFill || oTextPr.TextOutline || (oTextPr.Unifill && oTextPr.Unifill.fill && (oTextPr.Unifill.fill.type !== c_oAscFill.FILL_TYPE_SOLID || oTextPr.Unifill.transparent != null && oTextPr.Unifill.transparent < 254.5))) if(oTextPr.TextFill || oTextPr.TextOutline || (oTextPr.Unifill && oTextPr.Unifill.fill && (oTextPr.Unifill.fill.type !== c_oAscFill.FILL_TYPE_SOLID || oTextPr.Unifill.transparent != null && oTextPr.Unifill.transparent < 254.5)))
return true; return true;
return false; return false;
...@@ -1119,6 +1119,24 @@ CShape.prototype = ...@@ -1119,6 +1119,24 @@ CShape.prototype =
} }
} }
this.compiledFill = this.spPr.Fill.createDuplicate(); this.compiledFill = this.spPr.Fill.createDuplicate();
if(this.compiledFill && this.compiledFill.fill && this.compiledFill.fill.type === c_oAscFill.FILL_TYPE_GRP)
{
if(this.group)
{
var group_compiled_fill = this.group.getCompiledFill();
if (isRealObject(group_compiled_fill) && isRealObject(group_compiled_fill.fill)) {
this.compiledFill = group_compiled_fill.createDuplicate();
}
else
{
this.compiledFill = null;
}
}
else
{
this.compiledFill = null;
}
}
} }
else if (isRealObject(this.group)) { else if (isRealObject(this.group)) {
var group_compiled_fill = this.group.getCompiledFill(); var group_compiled_fill = this.group.getCompiledFill();
...@@ -1201,8 +1219,24 @@ CShape.prototype = ...@@ -1201,8 +1219,24 @@ CShape.prototype =
getCompiledTransparent: function () { getCompiledTransparent: function () {
if (this.recalcInfo.recalculateTransparent) { if (this.recalcInfo.recalculateTransparent) {
this.compiledTransparent = null; this.compiledTransparent = null;
if (isRealObject(this.spPr) && isRealObject(this.spPr.Fill) && AscFormat.isRealNumber(this.spPr.Fill.transparent)) if (isRealObject(this.spPr) && isRealObject(this.spPr.Fill))
{
if(AscFormat.isRealNumber(this.spPr.Fill.transparent))
{
this.compiledTransparent = this.spPr.Fill.transparent; this.compiledTransparent = this.spPr.Fill.transparent;
}
else
{
if(this.spPr.Fill && this.spPr.Fill.fill && this.spPr.Fill.fill.type === c_oAscFill.FILL_TYPE_GRP)
{
if(this.group && this.group.spPr && this.group.spPr.Fill && AscFormat.isRealNumber(this.group.spPr.Fill.transparent))
{
this.compiledTransparent = this.group.spPr.Fill.transparent;
}
}
}
}
else if (isRealObject(this.group)) { else if (isRealObject(this.group)) {
var group_transparent = this.group.getCompiledTransparent(); var group_transparent = this.group.getCompiledTransparent();
if (AscFormat.isRealNumber(group_transparent)) { if (AscFormat.isRealNumber(group_transparent)) {
......
...@@ -2432,6 +2432,11 @@ CGraphicObjects.prototype = ...@@ -2432,6 +2432,11 @@ CGraphicObjects.prototype =
sp.spPr.xfrm.setFlipH(cur_group.spPr.xfrm.flipH === true ? !(sp.spPr.xfrm.flipH === true) : sp.spPr.xfrm.flipH === true); sp.spPr.xfrm.setFlipH(cur_group.spPr.xfrm.flipH === true ? !(sp.spPr.xfrm.flipH === true) : sp.spPr.xfrm.flipH === true);
sp.spPr.xfrm.setFlipV(cur_group.spPr.xfrm.flipV === true ? !(sp.spPr.xfrm.flipV === true) : sp.spPr.xfrm.flipV === true); sp.spPr.xfrm.setFlipV(cur_group.spPr.xfrm.flipV === true ? !(sp.spPr.xfrm.flipV === true) : sp.spPr.xfrm.flipV === true);
sp.setGroup(null); sp.setGroup(null);
if(sp.spPr.Fill && sp.spPr.Fill.fill && sp.spPr.Fill.fill.type === Asc.c_oAscFill.FILL_TYPE_GRP && cur_group.spPr && cur_group.spPr.Fill)
{
sp.spPr.setFill(cur_group.spPr.Fill.createDuplicate());
}
nearest_pos = this.document.Get_NearestPos(page_num, sp.bounds.x + sp.posX, sp.bounds.y + sp.posY, true, drawing); nearest_pos = this.document.Get_NearestPos(page_num, sp.bounds.x + sp.posX, sp.bounds.y + sp.posY, true, drawing);
nearest_pos.Paragraph.Check_NearestPos(nearest_pos); nearest_pos.Paragraph.Check_NearestPos(nearest_pos);
......
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