Commit d4418bd7 authored by Ilya Kirillov's avatar Ilya Kirillov

New class CInlineLevelSdt.

parent 8a8b68ac
......@@ -136,6 +136,7 @@
"../word/Editor/DocumentContentElementBase.js",
"../word/Editor/StructuredDocumentTags/BlockLevel.js",
"../word/Editor/StructuredDocumentTags/InlineLevel.js",
"../word/Editor/StructuredDocumentTags/SdtPr.js",
"../word/Editor/StructuredDocumentTags/SdtPrChanges.js",
"../word/Editor/Comments.js",
......
......@@ -138,6 +138,7 @@
"../slide/Editor/Format/Notes.js",
"../word/Editor/DocumentContentElementBase.js",
"../word/Editor/StructuredDocumentTags/BlockLevel.js",
"../word/Editor/StructuredDocumentTags/InlineLevel.js",
"../word/Editor/StructuredDocumentTags/SdtPr.js",
"../word/Editor/StructuredDocumentTags/SdtPrChanges.js",
"../word/Editor/Styles.js",
......
......@@ -110,6 +110,7 @@
"../word/Editor/GraphicObjects/WrapManager.js",
"../word/Editor/DocumentContentElementBase.js",
"../word/Editor/StructuredDocumentTags/BlockLevel.js",
"../word/Editor/StructuredDocumentTags/InlineLevel.js",
"../word/Editor/StructuredDocumentTags/SdtPr.js",
"../word/Editor/StructuredDocumentTags/SdtPrChanges.js",
"../word/Editor/Comments.js",
......
......@@ -947,38 +947,4 @@ CBlockLevelSdt.prototype.GetContentControlPr = function()
//--------------------------------------------------------export--------------------------------------------------------
window['AscCommonWord'] = window['AscCommonWord'] || {};
window['AscCommonWord'].CBlockLevelSdt = CBlockLevelSdt;
window['AscCommonWord'].type_BlockLevelSdt = type_BlockLevelSdt;
function TEST_ADD_SDT()
{
var oLogicDocument = editor.WordControl.m_oLogicDocument;
oLogicDocument.Create_NewHistoryPoint();
var oContentControl = oLogicDocument.AddContentControl();
oLogicDocument.AddToParagraph(new ParaText("S"));
oLogicDocument.AddToParagraph(new ParaText("d"));
oLogicDocument.AddToParagraph(new ParaText("t"));
oLogicDocument.Recalculate();
oLogicDocument.Document_UpdateSelectionState();
oLogicDocument.Document_UpdateInterfaceState();
oLogicDocument.Document_UpdateRulersState();
return oContentControl ? oContentControl.GetId() : null;
}
function TEST_REMOVE_SDT(Id)
{
var oLogicDocument = editor.WordControl.m_oLogicDocument;
oLogicDocument.Create_NewHistoryPoint();
oLogicDocument.RemoveContentControl(Id);
oLogicDocument.Recalculate();
oLogicDocument.Document_UpdateSelectionState();
oLogicDocument.Document_UpdateInterfaceState();
oLogicDocument.Document_UpdateRulersState();
}
\ No newline at end of file
window['AscCommonWord'].type_BlockLevelSdt = type_BlockLevelSdt;
\ No newline at end of file
......@@ -351,3 +351,23 @@ CInlineLevelSdt.prototype.Read_FromBinary2 = function(Reader)
this.Content.push(Element);
}
};
function TEST_ADD_SDT()
{
var oLogicDocument = editor.WordControl.m_oLogicDocument;
oLogicDocument.Create_NewHistoryPoint();
//var oPara = oLogicDocument.GetCurrentParagraph();
var oInlineContentControl = new CInlineLevelSdt();
oInlineContentControl.Add(new ParaRun());
oLogicDocument.AddToParagraph(oInlineContentControl);
oLogicDocument.Recalculate();
oLogicDocument.Document_UpdateSelectionState();
oLogicDocument.Document_UpdateInterfaceState();
oLogicDocument.Document_UpdateRulersState();
return oInlineContentControl ? oInlineContentControl.GetId() : null;
}
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