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

Bug 25207 - Не устанавливается курсор в область текста после смене отступов автофигуры

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@57146 954022d7-b5bf-4e40-9824-e11837661b57
parent 46409cc2
...@@ -1360,11 +1360,11 @@ CShape.prototype = ...@@ -1360,11 +1360,11 @@ CShape.prototype =
if(this.spPr && isRealObject(this.spPr.geometry) && isRealObject(this.spPr.geometry.rect)) if(this.spPr && isRealObject(this.spPr.geometry) && isRealObject(this.spPr.geometry.rect))
{ {
var rect = this.spPr.geometry.rect; var rect = this.spPr.geometry.rect;
this.clipRect = {x: rect.l, y: rect.t, w: rect.r - rect.l, h: rect.b - rect.t}; this.clipRect = {x: rect.l + _body_pr.lIns, y: rect.t + _body_pr.tIns, w: rect.r - rect.l - _body_pr.rIns, h: rect.b - rect.t - _body_pr.bIns};
} }
else else
{ {
this.clipRect = {x: 0, y: 0, w: this.extX, h: this.extY}; this.clipRect = {x: _body_pr.lIns, y: _body_pr.tIns, w: this.extX - _body_pr.rIns, h: this.extY - _body_pr.bIns};
} }
} }
else { else {
......
...@@ -588,39 +588,24 @@ CShape.prototype.hitInTextRect = function(x, y) ...@@ -588,39 +588,24 @@ CShape.prototype.hitInTextRect = function(x, y)
t_y = this.invertTransform.TransformPointY(x, y); t_y = this.invertTransform.TransformPointY(x, y);
var w, h, x, y; var w, h, x, y;
var l_ins, t_ins, r_ins, b_ins;
var body_pr = this.bodyPr;
if(body_pr)
{
l_ins = isRealNumber(body_pr.lIns) ? body_pr.lIns : 2.54;
r_ins = isRealNumber(body_pr.rIns) ? body_pr.rIns : 2.54;
t_ins = isRealNumber(body_pr.tIns) ? body_pr.tIns : 1.27;
b_ins = isRealNumber(body_pr.bIns) ? body_pr.bIns : 1.27;
}
else
{
l_ins = 2.54;
r_ins = 2.54;
t_ins = 1.27;
b_ins = 1.27;
}
if(this.spPr && this.spPr.geometry && this.spPr.geometry.rect if(this.spPr && this.spPr.geometry && this.spPr.geometry.rect
&& isRealNumber(this.spPr.geometry.rect.l) && isRealNumber(this.spPr.geometry.rect.t) && isRealNumber(this.spPr.geometry.rect.l) && isRealNumber(this.spPr.geometry.rect.t)
&& isRealNumber(this.spPr.geometry.rect.r) && isRealNumber(this.spPr.geometry.rect.r)) && isRealNumber(this.spPr.geometry.rect.r) && isRealNumber(this.spPr.geometry.rect.r))
{ {
x = this.spPr.geometry.rect.l; x = this.spPr.geometry.rect.l;
y = this.spPr.geometry.rect.t; y = this.spPr.geometry.rect.t;
w = this.spPr.geometry.rect.r - this.spPr.geometry.rect.l - (l_ins + r_ins); w = this.spPr.geometry.rect.r - this.spPr.geometry.rect.l;
h = this.spPr.geometry.rect.b - this.spPr.geometry.rect.t - (t_ins + b_ins); h = this.spPr.geometry.rect.b - this.spPr.geometry.rect.t;
} }
else else
{ {
x = 0; x = 0;
y = 0; y = 0;
w = this.extX - (l_ins + r_ins); w = this.extX ;
h = this.extY - (t_ins + b_ins); h = this.extY ;
} }
return t_x > x + l_ins && t_x < x + w - r_ins && t_y > y + t_ins && t_y < y + h - b_ins; return t_x > x && t_x < x + w && t_y > y && t_y < y + h;
} }
return false; return false;
}; };
......
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