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

Падение при открытии textFit с гиперссылкой

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60124 954022d7-b5bf-4e40-9824-e11837661b57
parent fcdda1b2
...@@ -477,34 +477,50 @@ CTextBody.prototype = ...@@ -477,34 +477,50 @@ CTextBody.prototype =
new_spacing.After = spc; new_spacing.After = spc;
parg.Set_Spacing(new_spacing); parg.Set_Spacing(new_spacing);
} }
if(isRealNumber(font_scale)) if(isRealNumber(font_scale))
{ {
var par_font_size = parg.Get_CompiledPr(false).TextPr.FontSize; this.checkParagraphContent(parg, font_scale, true);
}
}
}
}
}
}
this.bodyPr.textFit = null;
},
checkParagraphContent: function(parg, fontScale, bParagraph)
{
for(var r = 0; r < parg.Content.length; ++r) for(var r = 0; r < parg.Content.length; ++r)
{ {
var item = parg.Content[r]; var item = parg.Content[r];
switch(item.Type)
{
case para_Run:
{
if(isRealNumber(item.Pr.FontSize)) if(isRealNumber(item.Pr.FontSize))
{ {
item.Set_FontSize(Math.round(item.Pr.FontSize*font_scale)); item.Set_FontSize(Math.round(item.Pr.FontSize*fontScale));
} }
else else if(bParagraph)
{ {
if(r === 0) if(r === 0)
{ {
item.Set_FontSize(Math.round(par_font_size*font_scale)); var par_font_size = parg.Get_CompiledPr(false).TextPr.FontSize;
} item.Set_FontSize(Math.round(par_font_size*fontScale));
}
}
} }
} }
break;
} }
case para_Hyperlink:
{
this.checkParagraphContent(item, fontScale, false);
break;
} }
} }
} }
this.bodyPr.textFit = null;
}, },
Refresh_RecalcData: function() Refresh_RecalcData: function()
......
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