Commit 7657bdc0 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@47465 954022d7-b5bf-4e40-9824-e11837661b57
parent c73f9298
......@@ -494,6 +494,7 @@ function CGraphics()
this.globalAlpha = 1;
this.TextClipRect = null;
this.IsClipContext = false;
}
CGraphics.prototype =
......@@ -2527,10 +2528,10 @@ CGraphics.prototype =
SetTextClipRect : function(_l, _t, _r, _b)
{
this.TextClipRect = {
l : _l,
t : _t,
r : _r,
b : _b
l : (_l * this.m_oCoordTransform.sx) >> 0,
t : (_t * this.m_oCoordTransform.sy) >> 0,
r : (_r * this.m_oCoordTransform.sx) >> 0,
b : (_b * this.m_oCoordTransform.sy) >> 0
};
}
};
\ No newline at end of file
......@@ -426,6 +426,13 @@ function CDocMeta()
if (pageIndex == this.Drawings[i].Page)
{
oThisDoc.Drawings[i].BreakDrawing = 1;
if (oThisDoc.Drawings[i].Graphics.IsClipContext)
{
oThisDoc.Drawings[i].Graphics.m_oContext.restore();
oThisDoc.Drawings[i].Graphics.IsClipContext = false;
}
oThisDoc.Drawings.splice(i, 1);
i--;
}
......@@ -435,7 +442,9 @@ function CDocMeta()
this.OnImageLoad = function(obj)
{
if (obj.BreakDrawing == 1)
{
return;
}
var page = oThisDoc.Pages[obj.Page];
var s = oThisDoc.stream;
......@@ -580,6 +589,7 @@ function CDocMeta()
break;
}
case 98:
case 100:
{
// beginpath
......@@ -714,7 +724,9 @@ function CDocMeta()
//editor.WordControl.OnScroll();
if (_tr)
{
_ctx.restore();
}
}
oThisDoc.OnImageLoad(obj);
......@@ -783,6 +795,35 @@ function CDocMeta()
g.SetTextClipRect(s.GetDouble(), s.GetDouble(), s.GetDouble(), s.GetDouble());
break;
}
case 121:
{
var _command_type = s.GetLong();
if (32 == _command_type)
{
if (!g.IsClipContext)
{
g.m_oContext.save();
}
g.IsClipContext = true;
}
else if (64 == _command_type && g.IsClipContext)
{
g.m_oContext.restore();
g.IsClipContext = false;
}
break;
}
case 122:
{
var _command_type = s.GetLong();
if (32 == _command_type)
{
// clip
g.m_oContext.clip();
}
break;
}
default:
{
s.pos = page.end;
......@@ -884,6 +925,7 @@ function CDocMeta()
break;
}
case 98:
case 100:
{
break;
......@@ -1117,6 +1159,13 @@ function CDocMeta()
s.Skip(16);
break;
}
case 121:
case 122:
{
// begin/end command
s.Skip(4);
break;
}
default:
{
s.pos = page.end;
......@@ -1188,6 +1237,7 @@ function CDocMeta()
break;
}
case 98:
case 100:
{
break;
......@@ -1268,6 +1318,13 @@ function CDocMeta()
s.Skip(16);
break;
}
case 121:
case 122:
{
// begin/end command
s.Skip(4);
break;
}
default:
{
s.pos = page.end;
......@@ -1445,6 +1502,7 @@ function CDocMeta()
break;
}
case 98:
case 100:
{
break;
......@@ -1651,6 +1709,13 @@ function CDocMeta()
s.Skip(16);
break;
}
case 121:
case 122:
{
// begin/end command
s.Skip(4);
break;
}
default:
{
s.pos = page.end;
......@@ -1821,6 +1886,7 @@ function CDocMeta()
isChangeSpan = false;
break;
}
case 98:
case 100:
{
break;
......@@ -1972,6 +2038,13 @@ function CDocMeta()
s.Skip(16);
break;
}
case 121:
case 122:
{
// begin/end command
s.Skip(4);
break;
}
default:
{
s.pos = page.end;
......@@ -2068,6 +2141,7 @@ function CDocMeta()
break;
}
case 98:
case 100:
{
break;
......@@ -2168,6 +2242,13 @@ function CDocMeta()
s.Skip(16);
break;
}
case 121:
case 122:
{
// begin/end command
s.Skip(4);
break;
}
default:
{
s.pos = page.end;
......@@ -2353,6 +2434,7 @@ function CDocMeta()
break;
}
case 98:
case 100:
{
break;
......@@ -2434,6 +2516,13 @@ function CDocMeta()
s.Skip(16);
break;
}
case 121:
case 122:
{
// begin/end command
s.Skip(4);
break;
}
default:
{
s.pos = page.end;
......
......@@ -88,6 +88,45 @@ function CPPTXContentLoader()
return GrObject;
}
this.ReadTextBody = function(reader, stream)
{
this.BaseReader = reader;
if (this.Reader == null)
this.Reader = new BinaryPPTYLoader();
if (null != paraDrawing)
{
this.ParaDrawing = paraDrawing;
this.TempMainObject = null;
}
this.LogicDocument = null;
this.Reader.ImageMapChecker = this.ImageMapChecker;
if (null == this.stream)
{
this.stream = new FileStream();
this.stream.obj = stream.obj;
this.stream.data = stream.data;
this.stream.size = stream.size;
}
this.stream.pos = stream.pos;
this.stream.cur = stream.cur;
this.Reader.stream = this.stream;
var s = this.stream;
var _main_type = s.GetUChar(); // 0!!!
var txBody = this.Reader.ReadTextBody();
stream.pos = s.pos;
stream.cur = s.cur;
return txBody;
}
this.ReadShape = function()
{
var s = this.stream;
......
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