Commit 565f2ed2 authored by Ilya Kirillov's avatar Ilya Kirillov

Implemented saving/opening of a new field type "FORMTEXT".

parent 6027d075
......@@ -4238,6 +4238,26 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap, copyPa
});
}
}
else if (fieldtype_FORMTEXT === item.Get_FieldType()){
if(this.saveParams && this.saveParams.bMailMergeDocx)
oThis.WriteParagraphContent(item, bUseSelection, false);
else
{
var Instr = "FORMTEXT";
for(var j = 0; j < item.Arguments.length; ++j){
var argument = item.Arguments[j];
argument = argument.replace(/(\\|")/g, "\\$1");
if(-1 != argument.indexOf(' '))
argument = "\"" + argument + "\"";
Instr += " " + argument;
}
for(var j = 0; j < item.Switches.length; ++j)
Instr += " \\" + item.Switches[j];
this.bs.WriteItem(c_oSerParType.FldSimple, function () {
oThis.WriteFldSimple(Instr, function(){oThis.WriteParagraphContent(item, bUseSelection, false);});
});
}
}
break;
case para_Hyperlink:
this.bs.WriteItem(c_oSerParType.Hyperlink, function () {
......@@ -9349,6 +9369,11 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, curFoo
if (editor)
editor.WordControl.m_oLogicDocument.Register_Field(oRes);
}
else if ("FORMTEXT" == sFieldType){
oRes = new ParaField(fieldtype_FORMTEXT, aArguments, aSwitches);
if (editor)
editor.WordControl.m_oLogicDocument.Register_Field(oRes);
}
return oRes;
}
this.ReadImage = function(type, length, img)
......
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