Commit 6dc1130c authored by Oleg Korshul's avatar Oleg Korshul

add paragraph if cursor not at begin (insert content controls)

parent 22acc4ef
...@@ -456,6 +456,10 @@ ...@@ -456,6 +456,10 @@
_content_control_pr.Lock = AscCommonWord.sdtlock_Unlocked; _content_control_pr.Lock = AscCommonWord.sdtlock_Unlocked;
_content_control_pr.InternalId = _current["Props"]["InternalId"]; _content_control_pr.InternalId = _current["Props"]["InternalId"];
var oCurPara = LogicDocument.GetCurrentParagraph();
if (oCurPara && !oCurPara.IsCursorAtBegin())
LogicDocument.AddNewParagraph(false, true);
var _blockStd = LogicDocument.AddContentControl(AscCommonWord.sdttype_BlockLevel); var _blockStd = LogicDocument.AddContentControl(AscCommonWord.sdttype_BlockLevel);
_blockStd.SetContentControlPr(_content_control_pr); _blockStd.SetContentControlPr(_content_control_pr);
......
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