Commit 1fcb92cd authored by konovalovsergey's avatar konovalovsergey

save corrupt xslx file if chart has themeoverride

parent 6f5a0cfb
...@@ -4838,11 +4838,38 @@ function CBinaryFileWriter() ...@@ -4838,11 +4838,38 @@ function CBinaryFileWriter()
this.WriteTheme = function(memory, theme) this.WriteTheme = function(memory, theme)
{ {
this.BinaryFileWriter.pos = 0; if (this.BinaryFileWriter.UseContinueWriter)
{
this.BinaryFileWriter.ImData = memory.ImData;
this.BinaryFileWriter.data = memory.data;
this.BinaryFileWriter.len = memory.len;
this.BinaryFileWriter.pos = memory.pos;
}
else
{
this.TreeDrawingIndex++;
this.arrayStackStarts.push(this.BinaryFileWriter.pos);
}
this.BinaryFileWriter.WriteTheme(theme); this.BinaryFileWriter.WriteTheme(theme);
memory.WriteBuffer(this.BinaryFileWriter.data, 0, this.BinaryFileWriter.pos); if (this.BinaryFileWriter.UseContinueWriter)
this.BinaryFileWriter.pos = 0; {
memory.ImData = this.BinaryFileWriter.ImData;
memory.data = this.BinaryFileWriter.data;
memory.len = this.BinaryFileWriter.len;
memory.pos = this.BinaryFileWriter.pos;
}
else
{
this.TreeDrawingIndex--;
var oldPos = this.arrayStackStarts[this.arrayStackStarts.length - 1];
memory.WriteBuffer(this.BinaryFileWriter.data, oldPos, this.BinaryFileWriter.pos - oldPos);
this.BinaryFileWriter.pos = oldPos;
this.arrayStackStarts.splice(this.arrayStackStarts.length - 1, 1);
}
} }
} }
......
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