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

git-svn-id:...

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() ...@@ -494,6 +494,7 @@ function CGraphics()
this.globalAlpha = 1; this.globalAlpha = 1;
this.TextClipRect = null; this.TextClipRect = null;
this.IsClipContext = false;
} }
CGraphics.prototype = CGraphics.prototype =
...@@ -2527,10 +2528,10 @@ CGraphics.prototype = ...@@ -2527,10 +2528,10 @@ CGraphics.prototype =
SetTextClipRect : function(_l, _t, _r, _b) SetTextClipRect : function(_l, _t, _r, _b)
{ {
this.TextClipRect = { this.TextClipRect = {
l : _l, l : (_l * this.m_oCoordTransform.sx) >> 0,
t : _t, t : (_t * this.m_oCoordTransform.sy) >> 0,
r : _r, r : (_r * this.m_oCoordTransform.sx) >> 0,
b : _b b : (_b * this.m_oCoordTransform.sy) >> 0
}; };
} }
}; };
\ No newline at end of file
...@@ -426,6 +426,13 @@ function CDocMeta() ...@@ -426,6 +426,13 @@ function CDocMeta()
if (pageIndex == this.Drawings[i].Page) if (pageIndex == this.Drawings[i].Page)
{ {
oThisDoc.Drawings[i].BreakDrawing = 1; 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); oThisDoc.Drawings.splice(i, 1);
i--; i--;
} }
...@@ -435,7 +442,9 @@ function CDocMeta() ...@@ -435,7 +442,9 @@ function CDocMeta()
this.OnImageLoad = function(obj) this.OnImageLoad = function(obj)
{ {
if (obj.BreakDrawing == 1) if (obj.BreakDrawing == 1)
{
return; return;
}
var page = oThisDoc.Pages[obj.Page]; var page = oThisDoc.Pages[obj.Page];
var s = oThisDoc.stream; var s = oThisDoc.stream;
...@@ -580,6 +589,7 @@ function CDocMeta() ...@@ -580,6 +589,7 @@ function CDocMeta()
break; break;
} }
case 98:
case 100: case 100:
{ {
// beginpath // beginpath
...@@ -714,8 +724,10 @@ function CDocMeta() ...@@ -714,8 +724,10 @@ function CDocMeta()
//editor.WordControl.OnScroll(); //editor.WordControl.OnScroll();
if (_tr) if (_tr)
{
_ctx.restore(); _ctx.restore();
} }
}
oThisDoc.OnImageLoad(obj); oThisDoc.OnImageLoad(obj);
}; };
...@@ -783,6 +795,35 @@ function CDocMeta() ...@@ -783,6 +795,35 @@ function CDocMeta()
g.SetTextClipRect(s.GetDouble(), s.GetDouble(), s.GetDouble(), s.GetDouble()); g.SetTextClipRect(s.GetDouble(), s.GetDouble(), s.GetDouble(), s.GetDouble());
break; 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: default:
{ {
s.pos = page.end; s.pos = page.end;
...@@ -884,6 +925,7 @@ function CDocMeta() ...@@ -884,6 +925,7 @@ function CDocMeta()
break; break;
} }
case 98:
case 100: case 100:
{ {
break; break;
...@@ -1117,6 +1159,13 @@ function CDocMeta() ...@@ -1117,6 +1159,13 @@ function CDocMeta()
s.Skip(16); s.Skip(16);
break; break;
} }
case 121:
case 122:
{
// begin/end command
s.Skip(4);
break;
}
default: default:
{ {
s.pos = page.end; s.pos = page.end;
...@@ -1188,6 +1237,7 @@ function CDocMeta() ...@@ -1188,6 +1237,7 @@ function CDocMeta()
break; break;
} }
case 98:
case 100: case 100:
{ {
break; break;
...@@ -1268,6 +1318,13 @@ function CDocMeta() ...@@ -1268,6 +1318,13 @@ function CDocMeta()
s.Skip(16); s.Skip(16);
break; break;
} }
case 121:
case 122:
{
// begin/end command
s.Skip(4);
break;
}
default: default:
{ {
s.pos = page.end; s.pos = page.end;
...@@ -1445,6 +1502,7 @@ function CDocMeta() ...@@ -1445,6 +1502,7 @@ function CDocMeta()
break; break;
} }
case 98:
case 100: case 100:
{ {
break; break;
...@@ -1651,6 +1709,13 @@ function CDocMeta() ...@@ -1651,6 +1709,13 @@ function CDocMeta()
s.Skip(16); s.Skip(16);
break; break;
} }
case 121:
case 122:
{
// begin/end command
s.Skip(4);
break;
}
default: default:
{ {
s.pos = page.end; s.pos = page.end;
...@@ -1821,6 +1886,7 @@ function CDocMeta() ...@@ -1821,6 +1886,7 @@ function CDocMeta()
isChangeSpan = false; isChangeSpan = false;
break; break;
} }
case 98:
case 100: case 100:
{ {
break; break;
...@@ -1972,6 +2038,13 @@ function CDocMeta() ...@@ -1972,6 +2038,13 @@ function CDocMeta()
s.Skip(16); s.Skip(16);
break; break;
} }
case 121:
case 122:
{
// begin/end command
s.Skip(4);
break;
}
default: default:
{ {
s.pos = page.end; s.pos = page.end;
...@@ -2068,6 +2141,7 @@ function CDocMeta() ...@@ -2068,6 +2141,7 @@ function CDocMeta()
break; break;
} }
case 98:
case 100: case 100:
{ {
break; break;
...@@ -2168,6 +2242,13 @@ function CDocMeta() ...@@ -2168,6 +2242,13 @@ function CDocMeta()
s.Skip(16); s.Skip(16);
break; break;
} }
case 121:
case 122:
{
// begin/end command
s.Skip(4);
break;
}
default: default:
{ {
s.pos = page.end; s.pos = page.end;
...@@ -2353,6 +2434,7 @@ function CDocMeta() ...@@ -2353,6 +2434,7 @@ function CDocMeta()
break; break;
} }
case 98:
case 100: case 100:
{ {
break; break;
...@@ -2434,6 +2516,13 @@ function CDocMeta() ...@@ -2434,6 +2516,13 @@ function CDocMeta()
s.Skip(16); s.Skip(16);
break; break;
} }
case 121:
case 122:
{
// begin/end command
s.Skip(4);
break;
}
default: default:
{ {
s.pos = page.end; s.pos = page.end;
......
...@@ -88,6 +88,45 @@ function CPPTXContentLoader() ...@@ -88,6 +88,45 @@ function CPPTXContentLoader()
return GrObject; 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() this.ReadShape = function()
{ {
var s = this.stream; 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