Commit 7b63c57b authored by Sergey Luzyanin's avatar Sergey Luzyanin

fix Bug 34319

parent 9a15d499
...@@ -4928,7 +4928,7 @@ function BinaryPPTYLoader() ...@@ -4928,7 +4928,7 @@ function BinaryPPTYLoader()
if(!oGroup || !oGroup.spPr){ if(!oGroup || !oGroup.spPr){
return; return;
} }
if(!oGroup.spPr.xfrm){ if(!oGroup.spPr.xfrm && oGroup.spTree.length > 0){
var oXfrm = new AscFormat.CXfrm(); var oXfrm = new AscFormat.CXfrm();
oXfrm.setOffX(0); oXfrm.setOffX(0);
oXfrm.setOffY(0); oXfrm.setOffY(0);
...@@ -4998,7 +4998,7 @@ function BinaryPPTYLoader() ...@@ -4998,7 +4998,7 @@ function BinaryPPTYLoader()
case 1: case 1:
{ {
_object = this.ReadShape(); _object = this.ReadShape();
if (!IsHiddenObj(_object)) if (!IsHiddenObj(_object) && _object.spPr && _object.spPr.xfrm)
{ {
shape.addToSpTree(shape.spTree.length,_object); shape.addToSpTree(shape.spTree.length,_object);
shape.spTree[shape.spTree.length-1].setGroup(shape); shape.spTree[shape.spTree.length-1].setGroup(shape);
...@@ -5009,7 +5009,7 @@ function BinaryPPTYLoader() ...@@ -5009,7 +5009,7 @@ function BinaryPPTYLoader()
case 2: case 2:
{ {
_object = this.ReadPic(6 === _type); _object = this.ReadPic(6 === _type);
if (!IsHiddenObj(_object)) if (!IsHiddenObj(_object) && _object.spPr && _object.spPr.xfrm)
{ {
shape.addToSpTree(shape.spTree.length,_object); shape.addToSpTree(shape.spTree.length,_object);
shape.spTree[shape.spTree.length-1].setGroup(shape); shape.spTree[shape.spTree.length-1].setGroup(shape);
...@@ -5019,7 +5019,7 @@ function BinaryPPTYLoader() ...@@ -5019,7 +5019,7 @@ function BinaryPPTYLoader()
case 3: case 3:
{ {
_object = this.ReadCxn(); _object = this.ReadCxn();
if (!IsHiddenObj(_object)) if (!IsHiddenObj(_object) && _object.spPr && _object.spPr.xfrm)
{ {
shape.addToSpTree(shape.spTree.length,_object); shape.addToSpTree(shape.spTree.length,_object);
shape.spTree[shape.spTree.length-1].setGroup(shape); shape.spTree[shape.spTree.length-1].setGroup(shape);
...@@ -5029,7 +5029,7 @@ function BinaryPPTYLoader() ...@@ -5029,7 +5029,7 @@ function BinaryPPTYLoader()
case 4: case 4:
{ {
_object = this.ReadGroupShape(); _object = this.ReadGroupShape();
if (!IsHiddenObj(_object)) if (!IsHiddenObj(_object) && _object.spPr && _object.spPr.xfrm && _object.spTree.length > 0)
{ {
shape.addToSpTree(shape.spTree.length,_object); shape.addToSpTree(shape.spTree.length,_object);
shape.spTree[shape.spTree.length-1].setGroup(shape); shape.spTree[shape.spTree.length-1].setGroup(shape);
...@@ -9153,30 +9153,38 @@ function CPres() ...@@ -9153,30 +9153,38 @@ function CPres()
case 1: case 1:
{ {
sp = this.ReadShape(); sp = this.ReadShape();
sp.setGroup(shape); if(sp.spPr && sp.spPr.xfrm){
shape.addToSpTree(shape.spTree.length, sp); sp.setGroup(shape);
shape.addToSpTree(shape.spTree.length, sp);
}
break; break;
} }
case 6: case 6:
case 2: case 2:
{ {
sp = this.ReadPic(6 == _type); sp = this.ReadPic(6 == _type);
sp.setGroup(shape); if(sp.spPr && sp.spPr.xfrm){
shape.addToSpTree(shape.spTree.length, sp); sp.setGroup(shape);
shape.addToSpTree(shape.spTree.length, sp);
}
break; break;
} }
case 3: case 3:
{ {
sp = this.ReadCxn(); sp = this.ReadCxn();
sp.setGroup(shape); if(sp.spPr && sp.spPr.xfrm) {
shape.addToSpTree(shape.spTree.length, sp); sp.setGroup(shape);
shape.addToSpTree(shape.spTree.length, sp);
}
break; break;
} }
case 4: case 4:
{ {
sp = this.ReadGroupShape(); sp = this.ReadGroupShape();
sp.setGroup(shape); if(sp.spPr && sp.spPr.xfrm && sp.spTree.length > 0) {
shape.addToSpTree(shape.spTree.length, sp); sp.setGroup(shape);
shape.addToSpTree(shape.spTree.length, sp);
}
break; break;
} }
case 5: case 5:
...@@ -9206,6 +9214,9 @@ function CPres() ...@@ -9206,6 +9214,9 @@ function CPres()
this.ParaDrawing = oldParaDrawing; this.ParaDrawing = oldParaDrawing;
s.Seek2(_end_rec); s.Seek2(_end_rec);
this.TempGroupObject = null; this.TempGroupObject = null;
if(shape.spTree.length === 0){
return null;
}
return shape; return shape;
} }
......
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