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

правка бага с Redo в геометрии и Вертикальным выравниванием текста в автофигурах в документах

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@56054 954022d7-b5bf-4e40-9824-e11837661b57
parent 6d5d9af9
...@@ -701,13 +701,10 @@ Geometry.prototype= ...@@ -701,13 +701,10 @@ Geometry.prototype=
case historyitem_GeometryAddAdj: case historyitem_GeometryAddAdj:
{ {
this.gdLst[data.name] = parseInt(data.newVal); this.gdLst[data.name] = parseInt(data.newVal);
this.gdLst[data.name] = true; this.avLst[data.name] = true;
if(this.oldAvVal) if(this.parent && this.parent.handleUpdateGeometry)
{ {
if(this.parent && this.parent.handleUpdateGeometry) this.parent.handleUpdateGeometry();
{
this.parent.handleUpdateGeometry();
}
} }
break; break;
} }
......
...@@ -1197,7 +1197,7 @@ CShape.prototype = ...@@ -1197,7 +1197,7 @@ CShape.prototype =
var _text_rect_width = _r - _l; var _text_rect_width = _r - _l;
if (!_body_pr.upright) { if (!_body_pr.upright) {
if (!(_body_pr.vert === nVertTTvert || _body_pr.vert === nVertTTvert270)) { if (!(_body_pr.vert === nVertTTvert || _body_pr.vert === nVertTTvert270)) {
if (/*_content_height < _text_rect_height*/true) { if (!this.bWordShape || _content_height < _text_rect_height) {
switch (_body_pr.anchor) { switch (_body_pr.anchor) {
case 0: //b case 0: //b
{ // (Text Anchor Enum ( Bottom )) { // (Text Anchor Enum ( Bottom ))
...@@ -1228,17 +1228,15 @@ CShape.prototype = ...@@ -1228,17 +1228,15 @@ CShape.prototype =
} }
else { else {
_vertical_shift = 0; _vertical_shift = _text_rect_height - _content_height;
if(_body_pr.anchor === 0)
//_vertical_shift = _text_rect_height - _content_height;
/*if(_body_pr.anchor === 0)
{ {
_vertical_shift = _text_rect_height - _content_height; _vertical_shift = _text_rect_height - _content_height;
} }
else else
{ {
_vertical_shift = 0; _vertical_shift = 0;
} */ }
} }
global_MatrixTransformer.TranslateAppend(_text_transform, 0, _vertical_shift); global_MatrixTransformer.TranslateAppend(_text_transform, 0, _vertical_shift);
if (_dx_lt_rb * _dy_t - _dy_lt_rb * _dx_t <= 0) { if (_dx_lt_rb * _dy_t - _dy_lt_rb * _dx_t <= 0) {
...@@ -1253,7 +1251,7 @@ CShape.prototype = ...@@ -1253,7 +1251,7 @@ CShape.prototype =
} }
} }
else { else {
if (/*_content_height < _text_rect_width*/true) { if (!this.bWordShape || _content_height < _text_rect_width) {
switch (_body_pr.anchor) { switch (_body_pr.anchor) {
case 0: //b case 0: //b
{ // (Text Anchor Enum ( Bottom )) { // (Text Anchor Enum ( Bottom ))
...@@ -1283,15 +1281,14 @@ CShape.prototype = ...@@ -1283,15 +1281,14 @@ CShape.prototype =
} }
} }
else { else {
_vertical_shift = 0; if(_body_pr.anchor === 0)
/*if(_body_pr.anchor === 0)
{ {
_vertical_shift = _text_rect_width - _content_height; _vertical_shift = _text_rect_width - _content_height;
} }
else else
{ {
_vertical_shift = 0; _vertical_shift = 0;
} */ }
} }
global_MatrixTransformer.TranslateAppend(_text_transform, 0, _vertical_shift); global_MatrixTransformer.TranslateAppend(_text_transform, 0, _vertical_shift);
var _alpha; var _alpha;
...@@ -1362,7 +1359,7 @@ CShape.prototype = ...@@ -1362,7 +1359,7 @@ CShape.prototype =
} }
} }
if (/*_content_height < content_height2*/true) { if (!this.bWordShape || _content_height < content_height2) {
switch (_body_pr.anchor) { switch (_body_pr.anchor) {
case 0: //b case 0: //b
{ // (Text Anchor Enum ( Bottom )) { // (Text Anchor Enum ( Bottom ))
...@@ -1392,15 +1389,14 @@ CShape.prototype = ...@@ -1392,15 +1389,14 @@ CShape.prototype =
} }
} }
else { else {
_vertical_shift = 0; if(_body_pr.anchor === 0)
/*if(_body_pr.anchor === 0)
{ {
_vertical_shift = content_height2 - _content_height; _vertical_shift = content_height2 - _content_height;
} }
else else
{ {
_vertical_shift = 0; _vertical_shift = 0;
} */ }
} }
var _text_rect_xc = _l + (_r - _l) * 0.5; var _text_rect_xc = _l + (_r - _l) * 0.5;
......
...@@ -1095,8 +1095,28 @@ CGraphicObjects.prototype = ...@@ -1095,8 +1095,28 @@ CGraphicObjects.prototype =
para_pr = parent_para.Get_CompiledPr2(true).ParaPr; para_pr = parent_para.Get_CompiledPr2(true).ParaPr;
} }
} }
var TextPr = this.getParagraphTextPr();
var theme = this.document.Get_Theme();
if(theme && theme.themeElements && theme.themeElements.fontScheme)
{
if(TextPr.FontFamily)
{
TextPr.FontFamily.Name = theme.themeElements.fontScheme.checkFont(TextPr.FontFamily.Name);
}
if(TextPr.RFonts)
{
if(TextPr.RFonts.Ascii)
TextPr.RFonts.Ascii.Name = theme.themeElements.fontScheme.checkFont(TextPr.RFonts.Ascii.Name);
if(TextPr.RFonts.EastAsia)
TextPr.RFonts.EastAsia.Name = theme.themeElements.fontScheme.checkFont(TextPr.RFonts.EastAsia.Name);
if(TextPr.RFonts.HAnsi)
TextPr.RFonts.HAnsi.Name = theme.themeElements.fontScheme.checkFont(TextPr.RFonts.HAnsi.Name);
if(TextPr.RFonts.CS)
TextPr.RFonts.CS.Name = theme.themeElements.fontScheme.checkFont(TextPr.RFonts.CS.Name);
}
}
editor.UpdateParagraphProp(para_pr); editor.UpdateParagraphProp(para_pr);
editor.UpdateTextPr(this.getParagraphTextPr()); editor.UpdateTextPr(TextPr);
} }
}, },
......
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