Commit beb1dba0 authored by GoshaZotov's avatar GoshaZotov

fix bug with paste paragraph with line_height from html(ms word)

parent 69bf28fe
......@@ -4717,9 +4717,22 @@ PasteProcessor.prototype =
var margin_bottom = computedStyle.getPropertyValue( "margin-bottom" );
if(margin_bottom && null != (margin_bottom = this._ValueToMm(margin_bottom)) && margin_bottom >= 0)
Spacing.After = margin_bottom;
var line_height = computedStyle.getPropertyValue( "line-height" );
if(line_height && null != (line_height = this._ValueToMm(line_height)) && line_height >= 0)
Spacing.After = line_height;
//line height
//computedStyle возвращает значение в px. мне нужны %(ms записывает именно % в html)
var line_height = node.style && node.style.lineHeight ? node.style.lineHeight : computedStyle.getPropertyValue( "line-height" );
if(line_height)
{
var oLineHeight = this._ValueToMmType(line_height);
if(oLineHeight && "%" === oLineHeight.type)
{
Spacing.Line = oLineHeight.val;
}
else if(line_height && null != (line_height = this._ValueToMm(line_height)) && line_height >= 0)
{
Spacing.Line = line_height;
Spacing.LineRule = Asc.linerule_Exact;
}
}
if(false == this._isEmptyProperty(Spacing))
Para.Set_Spacing(Spacing);
//Shd
......
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