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

поправлен баг с неправильным клипом текста при выставленном флаге upright

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@67789 954022d7-b5bf-4e40-9824-e11837661b57
parent 4b5c7319
......@@ -597,11 +597,10 @@ CDLbl.prototype =
}
global_MatrixTransformer.TranslateAppend(_text_transform, _transformed_text_xc - _content_width * 0.5, _transformed_text_yc - content_height2 * 0.5);
var body_pr = this.bodyPr;
var l_ins = typeof body_pr.lIns === "number" ? body_pr.lIns : 2.54;
var t_ins = typeof body_pr.tIns === "number" ? body_pr.tIns : 1.27;
var r_ins = typeof body_pr.rIns === "number" ? body_pr.rIns : 2.54;
var b_ins = typeof body_pr.bIns === "number" ? body_pr.bIns : 1.27;
var l_ins = typeof _body_pr.lIns === "number" ? _body_pr.lIns : 2.54;
var t_ins = typeof _body_pr.tIns === "number" ? _body_pr.tIns : 1.27;
var r_ins = typeof _body_pr.rIns === "number" ? _body_pr.rIns : 2.54;
var b_ins = typeof _body_pr.bIns === "number" ? _body_pr.bIns : 1.27;
this.clipRect = {
x: -l_ins,
y: -_vertical_shift - t_ins,
......
......@@ -1971,12 +1971,18 @@ CShape.prototype =
}
global_MatrixTransformer.TranslateAppend(oMatrix, _transformed_text_xc - _content_width * 0.5, _transformed_text_yc - content_height2 * 0.5);
oClipRect = {
x: -1,
y: - 1,
w: Math.max(this.extX, this.extY) + 2,
h: this.contentHeight + (b_ins + t_ins) + 2
};
var Diff = 1.6;
var clipW = oRect.r - oRect.l + Diff - l_ins - r_ins;
if(clipW <= 0)
{
clipW = 0.01;
}
var clipH = oRect.b - oRect.t + Diff - b_ins - t_ins;
if(clipH < 0)
{
clipH = 0.01;
}
oClipRect = {x: oRect.l + l_ins - Diff, y: oRect.t - Diff + t_ins, w: clipW, h: clipH};
}
return oClipRect;
},
......@@ -3843,8 +3849,26 @@ CShape.prototype =
{
graphics.SaveGrState();
graphics.SetIntegerGrid(false);
graphics.transform3(this.transformText, true);
var oTransform = new CMatrix();
var cX = this.transform.TransformPointX(this.extX/2, this.extY/2);
var cY = this.transform.TransformPointY(this.extX/2, this.extY/2);
if(checkNormalRotate(this.rot))
{
oTransform.tx = cX - this.extX/2;
oTransform.ty = cY - this.extY/2;
}
else
{
global_MatrixTransformer.TranslateAppend(oTransform, - this.extX/2, -this.extY/2);
global_MatrixTransformer.RotateRadAppend(oTransform, Math.PI/2);
global_MatrixTransformer.TranslateAppend(oTransform, cX, cY);
}
graphics.transform3(oTransform, true);
graphics.AddClipRect(clip_rect.x, clip_rect.y, clip_rect.w, clip_rect.h);
graphics.SetIntegerGrid(false);
graphics.transform3(this.transformText, true);
}
var result_page_index = isRealNumber(graphics.shapePageIndex) ? graphics.shapePageIndex : old_start_page;
......@@ -5246,6 +5270,7 @@ CShape.prototype =
checkTextWarp: function(oContent, oBodyPr, dWidth, dHeight, bNeedNoTransform, bNeedWarp)
{
var oRet = {oTxWarpStruct: null, oTxWarpStructParamarks: null, oTxWarpStructNoTransform: null, oTxWarpStructParamarksNoTransform: null};
//return oRet;
var bTransform = this.chekBodyPrTransform(oBodyPr) && bNeedWarp;
var warpGeometry = oBodyPr.prstTxWarp;
warpGeometry && warpGeometry.Recalculate(dWidth, dHeight);
......
......@@ -167,7 +167,7 @@ CShape.prototype.handleUpdateExtents = function()
CShape.prototype.handleUpdateRot = function()
{
this.recalcTransform();
if(this.txBody && this.txBody.bodyPr && this.txBody.bodyPr.upright)
if(this.bodyPr && this.bodyPr.upright)
{
this.recalcContent();
}
......
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