Commit f14bec10 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Реализованы функции для редатирования списка получателей для рассылок....

Реализованы функции для редатирования списка получателей для рассылок. Исправлен баг, что после добавления поля курсор не выходил за пределы поля.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61581 954022d7-b5bf-4e40-9824-e11837661b57
parent 88177cb8
......@@ -410,26 +410,26 @@ function CTableId()
// Long : SumIndex
// Long : DeletedIndex
var FileCheckSum = Reader.GetLong();
var FileSize = Reader.GetLong();
var Description = Reader.GetLong();
var ItemsCount = Reader.GetLong();
var PointIndex = Reader.GetLong();
var StartPoint = Reader.GetLong();
var LastPoint = Reader.GetLong();
var SumIndex = Reader.GetLong();
var DeletedIndex = Reader.GetLong();
console.log("----------------------------");
console.log("FileCheckSum " + FileCheckSum);
console.log("FileSize " + FileSize);
console.log("Description " + Description + " " + Get_HistoryPointStringDescription(Description));
console.log("ItemsCount " + ItemsCount);
console.log("PointIndex " + PointIndex);
console.log("StartPoint " + StartPoint);
console.log("LastPoint " + LastPoint);
console.log("SumIndex " + SumIndex);
console.log("DeletedIndex " + (-10 === DeletedIndex ? null : DeletedIndex));
// var FileCheckSum = Reader.GetLong();
// var FileSize = Reader.GetLong();
// var Description = Reader.GetLong();
// var ItemsCount = Reader.GetLong();
// var PointIndex = Reader.GetLong();
// var StartPoint = Reader.GetLong();
// var LastPoint = Reader.GetLong();
// var SumIndex = Reader.GetLong();
// var DeletedIndex = Reader.GetLong();
//
// console.log("----------------------------");
// console.log("FileCheckSum " + FileCheckSum);
// console.log("FileSize " + FileSize);
// console.log("Description " + Description + " " + Get_HistoryPointStringDescription(Description));
// console.log("ItemsCount " + ItemsCount);
// console.log("PointIndex " + PointIndex);
// console.log("StartPoint " + StartPoint);
// console.log("LastPoint " + LastPoint);
// console.log("SumIndex " + SumIndex);
// console.log("DeletedIndex " + (-10 === DeletedIndex ? null : DeletedIndex));
break;
}
......
......@@ -14063,6 +14063,8 @@ CDocument.prototype.Recalculate_FromStart = function(bUpdateStates)
};
CDocument.prototype.Start_MailMerge = function(MailMergeMap)
{
this.EndPreview_MailMergeResult();
this.MailMergeMap = MailMergeMap;
editor.sync_HighlightMailMergeFields(this.MailMergeFieldsHighlight);
editor.sync_StartMailMerge();
......@@ -14089,6 +14091,36 @@ CDocument.prototype.Get_MailMergeFieldsNameList = function()
return aList;
};
CDocument.prototype.Get_MailMergeReceptionsList = function()
{
var aList = [];
var aHeaders = [];
var nCount = this.MailMergeMap.length
if (nCount <= 0)
return [];
for (var sId in this.MailMergeMap[0])
aHeaders.push(sId);
var nHeadersCount = aHeaders.length;
aList.push(aHeaders);
for (var nIndex = 0; nIndex < nCount; nIndex++)
{
var aReception = [];
var oReception = this.MailMergeMap[nIndex];
for (var nHeaderIndex = 0; nHeaderIndex < nHeadersCount; nHeaderIndex++)
{
var sValue = oReception[aHeaders[nHeaderIndex]];
aReception.push(sValue ? sValue : "");
}
aList.push(aReception);
}
return aList;
};
CDocument.prototype.Preview_MailMergeResult = function(Index)
{
if (null === this.MailMergeMap)
......
......@@ -96,8 +96,16 @@ ParaHyperlink.prototype.Add = function(Item)
this.Add_ToContent(CurPos + 1, Item);
this.State.ContentPos = CurPos + 1;
this.Content[this.State.ContentPos].Cursor_MoveToEndPos(false);
if (para_Field === Item.Type)
{
this.State.ContentPos = CurPos + 2;
this.Content[this.State.ContentPos].Cursor_MoveToStartPos(false);
}
else
{
this.State.ContentPos = CurPos + 1;
this.Content[this.State.ContentPos].Cursor_MoveToEndPos(false);
}
}
else
CurItem.Add(Item);
......
......@@ -2872,9 +2872,9 @@ Paragraph.prototype =
this.Internal_Content_Add(CurPos + 1, Item);
// Перемещаем кусор в конец формулы
this.CurPos.ContentPos = CurPos + 1;
this.Content[this.CurPos.ContentPos].Cursor_MoveToEndPos(false);
// Перемещаем в начало следующейго элемента
this.CurPos.ContentPos = CurPos + 2;
this.Content[this.CurPos.ContentPos].Cursor_MoveToStartPos(false);
}
else
this.Content[CurPos].Add(Item);
......
......@@ -7157,15 +7157,6 @@ asc_docs_api.prototype.sync_closeChartEditor = function()
this.asc_fireCallback("asc_onCloseChartEditor");
};
asc_docs_api.prototype.asc_getMailMergeData = function()
{
// ToDo Add code here
};
asc_docs_api.prototype.asc_setMailMergeData = function(data)
{
// ToDo Add code here
};
asc_docs_api.prototype.asc_setDrawCollaborationMarks = function (bDraw)
{
if ( bDraw !== this.isCoMarksDraw )
......@@ -7276,6 +7267,14 @@ asc_docs_api.prototype.sync_HighlightMailMergeFields = function(Value)
{
this.asc_fireCallback("asc_onHighlightMailMergeFields", Value);
};
asc_docs_api.prototype.asc_getMailMergeData = function()
{
return this.WordControl.m_oLogicDocument.Get_MailMergeReceptionsList();
};
asc_docs_api.prototype.asc_setMailMergeData = function(aList)
{
this.asc_StartMailMergeByList(aList);
};
window["asc_docs_api"] = asc_docs_api;
......
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