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 = ...@@ -1227,7 +1227,7 @@ NumFormat.prototype =
{ {
if(null == format) if(null == format)
format = new Font(); 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)))) 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) ...@@ -33,6 +33,9 @@ for(var i in map_themeExcel_to_themePresentation)
map_themePresentation_to_themeExcel[map_themeExcel_to_themePresentation[i]] = i - 0; map_themePresentation_to_themeExcel[map_themeExcel_to_themePresentation[i]] = i - 0;
function RgbColor(rgb) function RgbColor(rgb)
{ {
this.Properties = {
rgb : 0
}
this.rgb = rgb; this.rgb = rgb;
} }
RgbColor.prototype = RgbColor.prototype =
...@@ -41,6 +44,24 @@ RgbColor.prototype = ...@@ -41,6 +44,24 @@ RgbColor.prototype =
{ {
return UndoRedoDataTypes.RgbColor; 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) Write_ToBinary2 : function(oBinaryWriter)
{ {
oBinaryWriter.WriteLong(this.rgb); oBinaryWriter.WriteLong(this.rgb);
...@@ -68,6 +89,11 @@ RgbColor.prototype = ...@@ -68,6 +89,11 @@ RgbColor.prototype =
} }
function ThemeColor() function ThemeColor()
{ {
this.Properties = {
rgb: 0,
theme: 1,
tint: 2
}
this.rgb = null; this.rgb = null;
this.theme = null; this.theme = null;
this.tint = null; this.tint = null;
...@@ -78,6 +104,28 @@ ThemeColor.prototype = ...@@ -78,6 +104,28 @@ ThemeColor.prototype =
{ {
return UndoRedoDataTypes.ThemeColor; 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) Write_ToBinary2 : function(oBinaryWriter)
{ {
oBinaryWriter.WriteByte(this.theme); oBinaryWriter.WriteByte(this.theme);
......
...@@ -1497,12 +1497,15 @@ ...@@ -1497,12 +1497,15 @@
opt.fragments.splice(i, 1); opt.fragments.splice(i, 1);
continue; continue;
} }
if (i < opt.fragments.length - 1 && if (i < opt.fragments.length - 1)
t._isEqualFormats(opt.fragments[i].format, opt.fragments[i + 1].format)) { {
var fr = opt.fragments[i]; var fr = opt.fragments[i];
opt.fragments.splice(i, 2, var nextFr = opt.fragments[i + 1];
{format: fr.format, text: fr.text + fr.text, theme: fr.theme, tint: fr.tint}); if(t._isEqualFormats(fr.format, nextFr.format) && fr.theme == nextFr.theme && fr.tint == nextFr.tint) {
continue; opt.fragments.splice(i, 2,
{format: fr.format, text: fr.text + fr.text, theme: fr.theme, tint: fr.tint});
continue;
}
} }
++i; ++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