Commit de481eed authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

копирование темы и colorMap при MailMerge

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@63599 954022d7-b5bf-4e40-9824-e11837661b57
parent c69120d3
...@@ -9587,6 +9587,19 @@ FontScheme.prototype = ...@@ -9587,6 +9587,19 @@ FontScheme.prototype =
return this.Id; return this.Id;
}, },
createDuplicate: function()
{
var oCopy = new FontScheme();
oCopy.majorFont.latin = this.majorFont.latin;
oCopy.majorFont.ea = this.majorFont.ea;
oCopy.majorFont.cs = this.majorFont.cs;
oCopy.minorFont.latin = this.minorFont.latin;
oCopy.minorFont.ea = this.minorFont.ea;
oCopy.minorFont.cs = this.minorFont.cs;
return oCopy;
},
Refresh_RecalcData: function() Refresh_RecalcData: function()
{}, {},
Write_ToBinary2: function (w) Write_ToBinary2: function (w)
...@@ -9897,6 +9910,26 @@ FmtScheme.prototype = ...@@ -9897,6 +9910,26 @@ FmtScheme.prototype =
} }
}, },
createDuplicate: function()
{
var oCopy = new FmtScheme();
oCopy.name = this.name;
for(i = 0; i < this.fillStyleLst.length; ++i)
{
oCopy.fillStyleLst[i] = this.fillStyleLst[i].createDuplicate();
}
for(i = 0; i < this.lnStyleLst.length; ++i)
{
oCopy.lnStyleLst[i] = this.lnStyleLst[i].createDuplicate();
}
for(i = 0; i < this.bgFillStyleLst.length; ++i)
{
oCopy.bgFillStyleLst[i] = this.bgFillStyleLst[i].createDuplicate();
}
return oCopy;
},
setName: function(pr) setName: function(pr)
{ {
// History.Add(this, {Type:historyitem_FormatScheme_SetName, oldPr: this.name, newPr: pr}); // History.Add(this, {Type:historyitem_FormatScheme_SetName, oldPr: this.name, newPr: pr});
...@@ -10121,6 +10154,15 @@ CTheme.prototype = ...@@ -10121,6 +10154,15 @@ CTheme.prototype =
return this.Id; return this.Id;
}, },
createDuplicate: function()
{
var oTheme = new CTheme();
oTheme.changeColorScheme(this.themeElements.clrScheme.createDuplicate());
oTheme.setFontScheme(this.themeElements.fontScheme.createDuplicate());
oTheme.setFontScheme(this.themeElements.fmtScheme.createDuplicate());
return oTheme;
},
Document_Get_AllFontNames: function(AllFonts) Document_Get_AllFontNames: function(AllFonts)
{ {
var font_scheme = this.themeElements.fontScheme; var font_scheme = this.themeElements.fontScheme;
......
...@@ -14133,6 +14133,10 @@ CDocument.prototype.Get_MailMergedDocument = function(_nStartIndex, _nEndIndex) ...@@ -14133,6 +14133,10 @@ CDocument.prototype.Get_MailMergedDocument = function(_nStartIndex, _nEndIndex)
// Нумерацию придется повторить для каждого отдельного файла // Нумерацию придется повторить для каждого отдельного файла
LogicDocument.Numbering.Clear(); LogicDocument.Numbering.Clear();
LogicDocument.theme = this.theme.createDuplicate();
LogicDocument.clrSchemeMap = this.clrSchemeMap.createDuplicate();
var FieldsManager = this.FieldsManager; var FieldsManager = this.FieldsManager;
var ContentCount = this.Content.length; var ContentCount = this.Content.length;
......
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