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

Функции для работы с редактором стилей, для рецензирования, для рассылок...

Функции для работы с редактором стилей, для рецензирования, для рассылок перенесены в закрытую часть Private/StyleManager.js, Private/TrackRevisions.js, Private/MailMerge.js соответственно.  Сделано, чтобы окно с теущими измнениями в рецензировании всегда показывалось, а не как раньше только в режиме рецензирования. Исправлены баги в MailMerge: не перерисовывалась подсветка полей при изменении колонтитулов (баг 30520), неправильно формировались настройки конечной сеции документа (баг 30346). Исправлен баг с неправильным выставлением текущего колонтитула после снятия галки "Специальный колонтитул для первой страницы" (баг 30476).

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@65238 954022d7-b5bf-4e40-9824-e11837661b57
parent 7670fa44
......@@ -115,7 +115,6 @@
"../../Word/Editor/SerializeCommon.js",
"../../Word/apiDefines.js",
"../../Word/api.js",
"../../Word/Private/api.js",
"../../Word/apiCommon.js",
"../../Word/apiExport.js",
"../../Word/document/empty.js",
......@@ -139,7 +138,12 @@
"../../Excel/model/Workbook.js",
"../../Excel/model/CellInfo.js",
"../../Common/AdvancedOptions.js",
"../../Common/Locks.js"
"../../Common/Locks.js",
"../../Word/Private/api.js",
"../../Word/Private/StyleManager.js",
"../../Word/Private/MailMerge.js",
"../../Word/Private/TrackRevisions.js"
],
"dst": "../../Word/sdk-all.js",
"externs": [
......
......@@ -1575,6 +1575,12 @@ var historydescription_Document_AddNewStyle = 0x0123;
var historydescription_Document_RemoveStyle = 0x0124;
var historydescription_Document_AddTextArt = 0x0125;
var historydescription_Document_RemoveAllCustomStyles = 0x0126;
var historydescription_Document_AcceptAllRevisionChanges = 0x0127;
var historydescription_Document_RejectAllRevisionChanges = 0x0128;
var historydescription_Document_AcceptRevisionChange = 0x0129;
var historydescription_Document_RejectRevisionChange = 0x012a;
var historydescription_Document_AcceptRevisionChangesBySelection = 0x012b;
var historydescription_Document_RejectRevisionChangesBySelection = 0x012c;
......@@ -1881,6 +1887,13 @@ function Get_HistoryPointStringDescription(nDescription)
case historydescription_Document_RemoveStyle : sString = "Document_RemoveStyle "; break;
case historydescription_Document_AddTextArt : sString = "Document_AddTextArt "; break;
case historydescription_Document_RemoveAllCustomStyles : sString = "Document_RemoveAllCustomStyles "; break;
case historydescription_Document_AcceptAllRevisionChanges : sString = "Document_AcceptAllRevisionChanges "; break;
case historydescription_Document_RejectAllRevisionChanges : sString = "Document_RejectAllRevisionChanges "; break;
case historydescription_Document_AcceptRevisionChange : sString = "Document_AcceptRevisionChange "; break;
case historydescription_Document_RejectRevisionChange : sString = "Document_RejectRevisionChange "; break;
case historydescription_Document_AcceptRevisionChangesBySelection : sString = "Document_AcceptRevisionChangesBySelection "; break;
case historydescription_Document_RejectRevisionChangesBySelection : sString = "Document_RejectRevisionChangesBySelection "; break;
}
return sString;
}
This diff is collapsed.
......@@ -9488,177 +9488,6 @@ CDocumentContent.prototype.Set_ParagraphFramePr = function(FramePr, bDelete)
}
}
};
CDocumentContent.prototype.Accept_RevisionChanges = function(Type, bAll)
{
if (docpostype_Content === this.CurPos.Type || true === bAll)
{
if (true === this.Selection.Use || true === bAll)
{
var StartPos = this.Selection.StartPos;
var EndPos = this.Selection.EndPos;
if (StartPos > EndPos)
{
StartPos = this.Selection.EndPos;
EndPos = this.Selection.StartPos;
}
var LastElement = this.Content[EndPos];
var LastParaEnd = (type_Paragraph === LastElement.Get_Type() && true === LastElement.Selection_CheckParaEnd() ? true : false);
if (true === bAll)
{
StartPos = 0;
EndPos = this.Content.length - 1;
LastParaEnd = true;
}
if (undefined === Type || c_oAscRevisionsChangeType.ParaPr === Type)
{
for (var CurPos = StartPos; CurPos <= EndPos; CurPos++)
{
var Element = this.Content[CurPos];
if (type_Paragraph === Element.Get_Type() && (true === Element.Is_SelectedAll() || true === bAll) && true === Element.Have_PrChange())
{
Element.Accept_PrChange();
}
}
}
for (var CurPos = StartPos; CurPos <= EndPos; CurPos++)
{
var Element = this.Content[CurPos];
Element.Accept_RevisionChanges(Type, bAll);
}
if (undefined === Type || c_oAscRevisionsChangeType.ParaAdd === Type || c_oAscRevisionsChangeType.ParaRem === Type)
{
EndPos = (true === LastParaEnd ? EndPos : EndPos - 1);
for (var CurPos = EndPos; CurPos >= StartPos; CurPos--)
{
var Element = this.Content[CurPos];
if (type_Paragraph === Element.Get_Type())
{
var ReviewType = Element.Get_ReviewType();
if (reviewtype_Add === ReviewType && (undefined === Type || c_oAscRevisionsChangeType.ParaAdd === Type))
{
Element.Set_ReviewType(reviewtype_Common);
}
else if (reviewtype_Remove === ReviewType && (undefined === Type || c_oAscRevisionsChangeType.ParaRem === Type))
{
Element.Set_ReviewType(reviewtype_Common);
this.Concat_Paragraphs(CurPos);
}
}
}
}
}
}
else if (docpostype_DrawingObjects === this.CurPos.Type)
{
this.DrawingObjects.Accept_RevisionChanges(Type, bAll);
}
};
CDocumentContent.prototype.Reject_RevisionChanges = function(Type, bAll)
{
if (docpostype_Content === this.CurPos.Type || true === bAll)
{
if (true === this.Selection.Use || true === bAll)
{
var StartPos = this.Selection.StartPos;
var EndPos = this.Selection.EndPos;
if (StartPos > EndPos)
{
StartPos = this.Selection.EndPos;
EndPos = this.Selection.StartPos;
}
var LastElement = this.Content[EndPos];
var LastParaEnd = (type_Paragraph === LastElement.Get_Type() && true === LastElement.Selection_CheckParaEnd() ? true : false);
if (true === bAll)
{
StartPos = 0;
EndPos = this.Content.length - 1;
LastParaEnd = true;
}
if (undefined === Type || c_oAscRevisionsChangeType.ParaPr === Type)
{
for (var CurPos = StartPos; CurPos <= EndPos; CurPos++)
{
var Element = this.Content[CurPos];
if (type_Paragraph === Element.Get_Type() && (true === Element.Is_SelectedAll() || true === bAll) && true === Element.Have_PrChange())
{
Element.Reject_PrChange();
}
}
}
for (var CurPos = StartPos; CurPos <= EndPos; CurPos++)
{
var Element = this.Content[CurPos];
Element.Reject_RevisionChanges(Type, bAll);
}
if (undefined === Type || c_oAscRevisionsChangeType.ParaAdd === Type || c_oAscRevisionsChangeType.ParaRem === Type)
{
EndPos = (true === LastParaEnd ? EndPos : EndPos - 1);
for (var CurPos = EndPos; CurPos >= StartPos; CurPos--)
{
var Element = this.Content[CurPos];
if (type_Paragraph === Element.Get_Type())
{
var ReviewType = Element.Get_ReviewType();
if (reviewtype_Add === ReviewType && (undefined === Type || c_oAscRevisionsChangeType.ParaAdd === Type))
{
Element.Set_ReviewType(reviewtype_Common);
this.Concat_Paragraphs(CurPos);
}
else if (reviewtype_Remove === ReviewType && (undefined === Type || c_oAscRevisionsChangeType.ParaRem === Type))
{
Element.Set_ReviewType(reviewtype_Common);
}
}
}
}
}
}
else if (docpostype_DrawingObjects === this.CurPos.Type)
{
this.DrawingObjects.Reject_RevisionChanges(Type, bAll);
}
};
CDocumentContent.prototype.Get_RevisionsChangeParagraph = function(SearchEngine)
{
if (true === SearchEngine.Is_Found())
return;
var Direction = SearchEngine.Get_Direction();
var Pos = 0;
if (true !== SearchEngine.Is_CurrentFound())
{
Pos = (true === this.Selection.Use ? (this.Selection.StartPos <= this.Selection.EndPos ? this.Selection.StartPos : this.Selection.EndPos) : this.CurPos.ContentPos);
}
else
{
if (Direction > 0)
{
Pos = 0;
}
else
{
Pos = this.Content.length - 1;
}
}
this.Content[Pos].Get_RevisionsChangeParagraph(SearchEngine);
while (true !== SearchEngine.Is_Found())
{
Pos = (Direction > 0 ? Pos + 1 : Pos - 1);
if (Pos >= this.Content.length || Pos < 0)
break;
this.Content[Pos].Get_RevisionsChangeParagraph(SearchEngine);
}
};
CDocumentContent.prototype.Add_ToContent = function(Pos, Item)
{
this.Internal_Content_Add(Pos, Item);
......
......@@ -2368,16 +2368,6 @@ CHeaderFooterController.prototype.Set_ParagraphFramePr = function(FramePr, bDele
if (null !== this.CurHdrFtr)
this.CurHdrFtr.Set_ParagraphFramePr(FramePr, bDelete);
};
CHeaderFooterController.prototype.Accept_RevisionChanges = function(Type, bAll)
{
if (null !== this.CurHdrFtr)
this.CurHdrFtr.Content.Accept_RevisionChanges(Type, bAll);
};
CHeaderFooterController.prototype.Reject_RevisionChanges = function(Type, bAll)
{
if (null !== this.CurHdrFtr)
this.CurHdrFtr.Content.Reject_RevisionChanges(Type, bAll);
};
CHeaderFooterController.prototype.Get_SelectionBounds = function()
{
if (null !== this.CurHdrFtr)
......
......@@ -9291,7 +9291,7 @@ Paragraph.prototype =
this.Content[this.CurPos.ContentPos].Document_UpdateInterfaceState();
}
if (this.Is_TrackRevisions() && editor && this.bFromDocument)
if (editor && this.bFromDocument)
{
var TrackManager = this.LogicDocument.Get_TrackRevisionsManager();
var _Y = 0, Page_abs = 0, TextTransform = undefined;
......
......@@ -2224,7 +2224,6 @@ CParagraphContentWithParagraphLikeContent.prototype.Check_RevisionsChanges = fun
ContentPos.Update(CurPos, Depth);
this.Content[CurPos].Check_RevisionsChanges(Checker, ContentPos, Depth + 1);
}
};
CParagraphContentWithParagraphLikeContent.prototype.Accept_RevisionChanges = function(Type, bAll)
{
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -376,7 +376,6 @@
<script type="text/javascript" src="../../../../OfficeWeb/Word/apiDefines.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/apiCommon.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/api.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/Private/api.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/document/empty.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Common/scroll.js"></script>
......@@ -419,6 +418,11 @@
<!-- apply changes -->
<script type="text/javascript" src="../../../../OfficeWeb/OfflineDocuments/ApplyDocumentChanges.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/Private/api.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/Private/StyleManager.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/Private/MailMerge.js"></script>
<script type="text/javascript" src="../../../../OfficeWeb/Word/Private/TrackRevisions.js"></script>
<!-- application -->
<script data-main="app" src="../../../vendor/requirejs/require.js"></script>
</body>
......
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