Commit aa2ab166 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51094 954022d7-b5bf-4e40-9824-e11837661b57
parent be11cefa
var c_dScalePPTXSizes = 36000; var c_dScalePPTXSizes = 36000;
function IsHiddenObj(object)
{
if (!object)
return false;
var _uniProps = object.nvSpPr;
if (!_uniProps)
_uniProps = object.nvPicPr;
if (!_uniProps)
_uniProps = object.nvGrpSpPr;
if (!_uniProps)
return false;
if (_uniProps.cNvPr && _uniProps.cNvPr.isHidden)
return true;
return false;
}
function FileStream(data, size) function FileStream(data, size)
{ {
...@@ -4432,31 +4450,49 @@ function BinaryPPTYLoader() ...@@ -4432,31 +4450,49 @@ function BinaryPPTYLoader()
var _type = s.GetUChar(); var _type = s.GetUChar();
var _object = null;
switch (_type) switch (_type)
{ {
case 1: case 1:
{ {
shape.addToSpTree(shape.spTree.length,this.ReadShape()); _object = this.ReadShape();
shape.spTree[shape.spTree.length-1].setGroup(shape); if (!IsHiddenObj(_object))
{
shape.addToSpTree(shape.spTree.length,_object);
shape.spTree[shape.spTree.length-1].setGroup(shape);
}
break; break;
} }
case 2: case 2:
{ {
shape.addToSpTree(shape.spTree.length,this.ReadPic()); _object = this.ReadPic();
shape.spTree[shape.spTree.length-1].setGroup(shape); if (!IsHiddenObj(_object))
{
shape.addToSpTree(shape.spTree.length,_object);
shape.spTree[shape.spTree.length-1].setGroup(shape);
}
break; break;
} }
case 3: case 3:
{ {
shape.addToSpTree(shape.spTree.length,this.ReadCxn()); _object = this.ReadCxn();
shape.spTree[shape.spTree.length-1].setGroup(shape); if (!IsHiddenObj(_object))
{
shape.addToSpTree(shape.spTree.length,_object);
shape.spTree[shape.spTree.length-1].setGroup(shape);
}
break; break;
} }
case 4: case 4:
{ {
shape.addToSpTree(shape.spTree.length,this.ReadGroupShape()); _object = this.ReadGroupShape();
shape.spTree[shape.spTree.length-1].setGroup(shape); if (!IsHiddenObj(_object))
this.TempGroupObject = shape; {
shape.addToSpTree(shape.spTree.length,_object);
shape.spTree[shape.spTree.length-1].setGroup(shape);
this.TempGroupObject = shape;
}
break; break;
} }
case 5: case 5:
...@@ -4532,22 +4568,38 @@ function BinaryPPTYLoader() ...@@ -4532,22 +4568,38 @@ function BinaryPPTYLoader()
{ {
case 1: case 1:
{ {
shapes[shapes.length] = this.ReadShape(); var _object = this.ReadShape();
if (!IsHiddenObj(_object))
{
shapes[shapes.length] = _object;
}
break; break;
} }
case 2: case 2:
{ {
shapes[shapes.length] = this.ReadPic(); var _object = this.ReadPic();
if (!IsHiddenObj(_object))
{
shapes[shapes.length] = _object;
}
break; break;
} }
case 3: case 3:
{ {
shapes[shapes.length] = this.ReadCxn(); var _object = this.ReadCxn();
if (!IsHiddenObj(_object))
{
shapes[shapes.length] = _object;
}
break; break;
} }
case 4: case 4:
{ {
shapes[shapes.length] = this.ReadGroupShape(); var _object = this.ReadGroupShape();
if (!IsHiddenObj(_object))
{
shapes[shapes.length] = _object;
}
break; break;
} }
case 5: case 5:
...@@ -4851,7 +4903,7 @@ function BinaryPPTYLoader() ...@@ -4851,7 +4903,7 @@ function BinaryPPTYLoader()
} }
case 2: case 2:
{ {
s.Skip2(1); cNvPr.isHidden = (1 == s.GetUChar()) ? true : false;
break; break;
} }
case 3: case 3:
......
...@@ -2446,12 +2446,14 @@ function CNvPr() ...@@ -2446,12 +2446,14 @@ function CNvPr()
{ {
this.id = 0; this.id = 0;
this.name = ""; this.name = "";
this.isHidden = false;
this.createDuplicate = function() this.createDuplicate = function()
{ {
var duplicate = new CNvPr(); var duplicate = new CNvPr();
duplicate.id = this.id; duplicate.id = this.id;
duplicate.name = this.name; duplicate.name = this.name;
duplicate.isHidden = this.isHidden;
return duplicate; return duplicate;
}; };
......
...@@ -1237,11 +1237,14 @@ function CLayoutThumbnailDrawer() ...@@ -1237,11 +1237,14 @@ function CLayoutThumbnailDrawer()
var h_px = 67; var h_px = 67;
var w_px = (this.WidthMM * h_px / this.HeightMM) >> 0; var w_px = (this.WidthMM * h_px / this.HeightMM) >> 0;
// пока не будем генерить для ретины
/*
if (this.IsRetina) if (this.IsRetina)
{ {
w_px <<= 1; w_px <<= 1;
h_px <<= 1; h_px <<= 1;
} }
*/
if (this.CanvasImage == null) if (this.CanvasImage == null)
this.CanvasImage = document.createElement('canvas'); this.CanvasImage = document.createElement('canvas');
......
...@@ -1013,11 +1013,14 @@ function CMasterThumbnailDrawer() ...@@ -1013,11 +1013,14 @@ function CMasterThumbnailDrawer()
var h_px = 40; var h_px = 40;
var w_px = (this.WidthMM * h_px / this.HeightMM) >> 0; var w_px = (this.WidthMM * h_px / this.HeightMM) >> 0;
// пока не будем генерить для ретины
/*
if (this.IsRetina) if (this.IsRetina)
{ {
w_px <<= 1; w_px <<= 1;
h_px <<= 1; h_px <<= 1;
} }
*/
if (this.CanvasImage == null) if (this.CanvasImage == null)
this.CanvasImage = document.createElement('canvas'); this.CanvasImage = document.createElement('canvas');
......
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