Commit 6549d5ac authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

дополение к Revision: 47235

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47239 954022d7-b5bf-4e40-9824-e11837661b57
parent c0a45bcc
......@@ -1227,7 +1227,7 @@ NumFormat.prototype =
{
if(null == format)
format = new Font();
format.c = this.Color;
format.c = new RgbColor(this.Color);
}
if(null != prev && ((null == prev.format && null == format) || (null != prev.format && null != format && format.isEqual(prev.format))))
{
......
......@@ -33,6 +33,9 @@ for(var i in map_themeExcel_to_themePresentation)
map_themePresentation_to_themeExcel[map_themeExcel_to_themePresentation[i]] = i - 0;
function RgbColor(rgb)
{
this.Properties = {
rgb : 0
}
this.rgb = rgb;
}
RgbColor.prototype =
......@@ -41,6 +44,24 @@ RgbColor.prototype =
{
return UndoRedoDataTypes.RgbColor;
},
getProperties : function()
{
return this.Properties;
},
getProperty : function(nType)
{
switch(nType)
{
case this.Properties.rgb:return this.rgb;break;
}
},
setProperty : function(nType, value)
{
switch(nType)
{
case this.Properties.rgb: this.rgb = value;break;
}
},
Write_ToBinary2 : function(oBinaryWriter)
{
oBinaryWriter.WriteLong(this.rgb);
......@@ -68,6 +89,11 @@ RgbColor.prototype =
}
function ThemeColor()
{
this.Properties = {
rgb: 0,
theme: 1,
tint: 2
}
this.rgb = null;
this.theme = null;
this.tint = null;
......@@ -78,6 +104,28 @@ ThemeColor.prototype =
{
return UndoRedoDataTypes.ThemeColor;
},
getProperties : function()
{
return this.Properties;
},
getProperty : function(nType)
{
switch(nType)
{
case this.Properties.rgb:return this.rgb;break;
case this.Properties.theme:return this.theme;break;
case this.Properties.tint:return this.tint;break;
}
},
setProperty : function(nType, value)
{
switch(nType)
{
case this.Properties.rgb: this.rgb = value;break;
case this.Properties.theme: this.theme= value;break;
case this.Properties.tint: this.tint = value;break;
}
},
Write_ToBinary2 : function(oBinaryWriter)
{
oBinaryWriter.WriteByte(this.theme);
......
......@@ -1497,12 +1497,15 @@
opt.fragments.splice(i, 1);
continue;
}
if (i < opt.fragments.length - 1 &&
t._isEqualFormats(opt.fragments[i].format, opt.fragments[i + 1].format)) {
if (i < opt.fragments.length - 1)
{
var fr = opt.fragments[i];
opt.fragments.splice(i, 2,
{format: fr.format, text: fr.text + fr.text, theme: fr.theme, tint: fr.tint});
continue;
var nextFr = opt.fragments[i + 1];
if(t._isEqualFormats(fr.format, nextFr.format) && fr.theme == nextFr.theme && fr.tint == nextFr.tint) {
opt.fragments.splice(i, 2,
{format: fr.format, text: fr.text + fr.text, theme: fr.theme, tint: fr.tint});
continue;
}
}
++i;
}
......
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