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() ...@@ -410,26 +410,26 @@ function CTableId()
// Long : SumIndex // Long : SumIndex
// Long : DeletedIndex // Long : DeletedIndex
var FileCheckSum = Reader.GetLong(); // var FileCheckSum = Reader.GetLong();
var FileSize = Reader.GetLong(); // var FileSize = Reader.GetLong();
var Description = Reader.GetLong(); // var Description = Reader.GetLong();
var ItemsCount = Reader.GetLong(); // var ItemsCount = Reader.GetLong();
var PointIndex = Reader.GetLong(); // var PointIndex = Reader.GetLong();
var StartPoint = Reader.GetLong(); // var StartPoint = Reader.GetLong();
var LastPoint = Reader.GetLong(); // var LastPoint = Reader.GetLong();
var SumIndex = Reader.GetLong(); // var SumIndex = Reader.GetLong();
var DeletedIndex = Reader.GetLong(); // var DeletedIndex = Reader.GetLong();
//
console.log("----------------------------"); // console.log("----------------------------");
console.log("FileCheckSum " + FileCheckSum); // console.log("FileCheckSum " + FileCheckSum);
console.log("FileSize " + FileSize); // console.log("FileSize " + FileSize);
console.log("Description " + Description + " " + Get_HistoryPointStringDescription(Description)); // console.log("Description " + Description + " " + Get_HistoryPointStringDescription(Description));
console.log("ItemsCount " + ItemsCount); // console.log("ItemsCount " + ItemsCount);
console.log("PointIndex " + PointIndex); // console.log("PointIndex " + PointIndex);
console.log("StartPoint " + StartPoint); // console.log("StartPoint " + StartPoint);
console.log("LastPoint " + LastPoint); // console.log("LastPoint " + LastPoint);
console.log("SumIndex " + SumIndex); // console.log("SumIndex " + SumIndex);
console.log("DeletedIndex " + (-10 === DeletedIndex ? null : DeletedIndex)); // console.log("DeletedIndex " + (-10 === DeletedIndex ? null : DeletedIndex));
break; break;
} }
......
...@@ -14063,6 +14063,8 @@ CDocument.prototype.Recalculate_FromStart = function(bUpdateStates) ...@@ -14063,6 +14063,8 @@ CDocument.prototype.Recalculate_FromStart = function(bUpdateStates)
}; };
CDocument.prototype.Start_MailMerge = function(MailMergeMap) CDocument.prototype.Start_MailMerge = function(MailMergeMap)
{ {
this.EndPreview_MailMergeResult();
this.MailMergeMap = MailMergeMap; this.MailMergeMap = MailMergeMap;
editor.sync_HighlightMailMergeFields(this.MailMergeFieldsHighlight); editor.sync_HighlightMailMergeFields(this.MailMergeFieldsHighlight);
editor.sync_StartMailMerge(); editor.sync_StartMailMerge();
...@@ -14089,6 +14091,36 @@ CDocument.prototype.Get_MailMergeFieldsNameList = function() ...@@ -14089,6 +14091,36 @@ CDocument.prototype.Get_MailMergeFieldsNameList = function()
return aList; 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) CDocument.prototype.Preview_MailMergeResult = function(Index)
{ {
if (null === this.MailMergeMap) if (null === this.MailMergeMap)
......
...@@ -96,9 +96,17 @@ ParaHyperlink.prototype.Add = function(Item) ...@@ -96,9 +96,17 @@ ParaHyperlink.prototype.Add = function(Item)
this.Add_ToContent(CurPos + 1, Item); this.Add_ToContent(CurPos + 1, Item);
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.State.ContentPos = CurPos + 1;
this.Content[this.State.ContentPos].Cursor_MoveToEndPos(false); this.Content[this.State.ContentPos].Cursor_MoveToEndPos(false);
} }
}
else else
CurItem.Add(Item); CurItem.Add(Item);
......
...@@ -2872,9 +2872,9 @@ Paragraph.prototype = ...@@ -2872,9 +2872,9 @@ Paragraph.prototype =
this.Internal_Content_Add(CurPos + 1, Item); this.Internal_Content_Add(CurPos + 1, Item);
// Перемещаем кусор в конец формулы // Перемещаем в начало следующейго элемента
this.CurPos.ContentPos = CurPos + 1; this.CurPos.ContentPos = CurPos + 2;
this.Content[this.CurPos.ContentPos].Cursor_MoveToEndPos(false); this.Content[this.CurPos.ContentPos].Cursor_MoveToStartPos(false);
} }
else else
this.Content[CurPos].Add(Item); this.Content[CurPos].Add(Item);
......
...@@ -7157,15 +7157,6 @@ asc_docs_api.prototype.sync_closeChartEditor = function() ...@@ -7157,15 +7157,6 @@ asc_docs_api.prototype.sync_closeChartEditor = function()
this.asc_fireCallback("asc_onCloseChartEditor"); 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) asc_docs_api.prototype.asc_setDrawCollaborationMarks = function (bDraw)
{ {
if ( bDraw !== this.isCoMarksDraw ) if ( bDraw !== this.isCoMarksDraw )
...@@ -7276,6 +7267,14 @@ asc_docs_api.prototype.sync_HighlightMailMergeFields = function(Value) ...@@ -7276,6 +7267,14 @@ asc_docs_api.prototype.sync_HighlightMailMergeFields = function(Value)
{ {
this.asc_fireCallback("asc_onHighlightMailMergeFields", 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; 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