Commit 2136ce56 authored by konovalovsergey's avatar konovalovsergey

Bug 32184 - Теряется Page Numbering после сборки версии

parent c1a08a35
......@@ -4102,11 +4102,15 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap, copyPa
if (null != elem.pageNum) {
var Instr = "PAGE \\* MERGEFORMAT";
this.bs.WriteItem(c_oSerParType.FldSimple, function(){oThis.WriteFldSimple(Instr, function(){
if(null != elem.pageNum.String && "string" == typeof(elem.pageNum.String)){
oThis.WriteRun2(function () {
oThis.WriteText(elem.pageNum.String, delText);
}, oRun);
}
oThis.WriteRun2(function () {
//всегда что-то пишем, потому что если ничего нет в w:t, то и не применяются настройки
//todo не писать через fldsimple
var numText = '1';
if (null != elem.pageNum.String && "string" == typeof(elem.pageNum.String)) {
numText = elem.pageNum.String;
}
oThis.WriteText(numText, delText);
}, oRun);
});});
}
}
......@@ -12458,7 +12462,7 @@ OpenParStruct.prototype = {
var oPrevElem = this.stack.pop();
this.cur = this.stack[this.stack.length - 1];
var elem = oPrevElem.elem;
if (null != elem && elem.Content && elem.Content.length > 0) {
if (null != elem && elem.Content) {
if (para_Field == elem.Get_Type() && fieldtype_PAGENUM == elem.Get_FieldType()) {
var oNewRun = new ParaRun(this.paragraph);
var rPr = getStyleFirstRun(elem);
......@@ -12467,7 +12471,7 @@ OpenParStruct.prototype = {
}
oNewRun.Add_ToContent(0, new ParaPageNum());
this.addToContent(oNewRun);
} else {
} else if(elem.Content.length > 0) {
this.addToContent(elem);
}
}
......
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