Commit 8e3f755b authored by Sergey.Konovalov's avatar Sergey.Konovalov

(2.0.0.131): AVSOfficeDocxFile2

(1.0.0.54): XlsxSerializerCom
открытие для chart текстовых настроек.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47592 954022d7-b5bf-4e40-9824-e11837661b57
parent b284ea0f
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
"../Common/FontsFreeType/font_engine.js", "../Common/FontsFreeType/font_engine.js",
"../Common/FontsFreeType/FontFile.js", "../Common/FontsFreeType/FontFile.js",
"../Common/FontsFreeType/FontManager.js", "../Common/FontsFreeType/FontManager.js",
"../Common/PresentationSerializeAdapter.js",
"../Word/Drawing/Externals.js", "../Word/Drawing/Externals.js",
"../Word/Drawing/Graphics.js", "../Word/Drawing/Graphics.js",
"../Word/Drawing/Metafile.js", "../Word/Drawing/Metafile.js",
......
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
"../Common/FontsFreeType/font_engine.js", "../Common/FontsFreeType/font_engine.js",
"../Common/FontsFreeType/FontFile.js", "../Common/FontsFreeType/FontFile.js",
"../Common/FontsFreeType/FontManager.js", "../Common/FontsFreeType/FontManager.js",
"../Common/PresentationSerializeAdapter.js",
"../Word/Drawing/Externals.js", "../Word/Drawing/Externals.js",
"../Word/Drawing/AllFonts.js", "../Word/Drawing/AllFonts.js",
"../Word/Drawing/GlobalLoaders.js", "../Word/Drawing/GlobalLoaders.js",
......
...@@ -217,6 +217,7 @@ function CChartData(bWordContext, chart) { ...@@ -217,6 +217,7 @@ function CChartData(bWordContext, chart) {
_this.data = []; _this.data = [];
_this.themeColors = []; _this.themeColors = [];
_this.series = [];
if ( chart ) { if ( chart ) {
for (var row = 0; row < chart.data.length; row++) { for (var row = 0; row < chart.data.length; row++) {
...@@ -993,6 +994,42 @@ asc_CChart.prototype = { ...@@ -993,6 +994,42 @@ asc_CChart.prototype = {
asc_getChartEditorFlag: function() { return this.bChartEditor; }, asc_getChartEditorFlag: function() { return this.bChartEditor; },
asc_setChartEditorFlag: function(value) { this.bChartEditor = value; }, asc_setChartEditorFlag: function(value) { this.bChartEditor = value; },
generateFontMap: function(oFontMap)
{
var font;
font = this.header.asc_getFont();
if(null != font)
oFontMap[font.asc_getName()] = 1;
font = this.xAxis.asc_getTitleFont();
if(null != font)
oFontMap[font.asc_getName()] = 1;
font = this.xAxis.asc_getLabelFont();
if(null != font)
oFontMap[font.asc_getName()] = 1;
font = this.yAxis.asc_getTitleFont();
if(null != font)
oFontMap[font.asc_getName()] = 1;
font = this.yAxis.asc_getLabelFont();
if(null != font)
oFontMap[font.asc_getName()] = 1;
font = this.legend.asc_getFont();
if(null != font)
oFontMap[font.asc_getName()] = 1;
for(var i = 0, length = this.series.length; i < length; ++i)
{
var seria = this.series[i];
if(null != seria)
{
font = seria.asc_getTitleFont();
if(null != font)
oFontMap[font.asc_getName()] = 1;
font = seria.asc_getLabelFont();
if(null != font)
oFontMap[font.asc_getName()] = 1;
}
}
},
rebuildSeries: function() { rebuildSeries: function() {
var _t = this; var _t = this;
var bbox = _t.range.intervalObject.getBBox0(); var bbox = _t.range.intervalObject.getBBox0();
...@@ -1674,6 +1711,7 @@ function asc_CChartSeria() { ...@@ -1674,6 +1711,7 @@ function asc_CChartSeria() {
this.Val = { Formula: null, NumCache: [] }; this.Val = { Formula: null, NumCache: [] };
this.xVal = { Formula: null, NumCache: [] }; this.xVal = { Formula: null, NumCache: [] };
this.Tx = null; this.Tx = null;
this.TxFont = new asc_CChartFont();
this.Marker = { Size: null, Symbol: null }; this.Marker = { Size: null, Symbol: null };
this.OutlineColor = null; this.OutlineColor = null;
this.FormatCode = ""; this.FormatCode = "";
...@@ -1689,7 +1727,8 @@ function asc_CChartSeria() { ...@@ -1689,7 +1727,8 @@ function asc_CChartSeria() {
MarkerSymbol: 6, MarkerSymbol: 6,
OutlineColor: 7, OutlineColor: 7,
FormatCode: 8, FormatCode: 8,
LabelFont: 9 LabelFont: 9,
TxFont: 10
}; };
} }
...@@ -1704,6 +1743,9 @@ asc_CChartSeria.prototype = { ...@@ -1704,6 +1743,9 @@ asc_CChartSeria.prototype = {
asc_getTitle: function() { return this.Tx; }, asc_getTitle: function() { return this.Tx; },
asc_setTitle: function(title) { this.Tx = title; }, asc_setTitle: function(title) { this.Tx = title; },
asc_getTitleFont: function() { return this.TxFont; },
asc_setTitleFont: function(title) { this.TxFont = title; },
asc_getMarkerSize: function() { return this.Marker.Size; }, asc_getMarkerSize: function() { return this.Marker.Size; },
asc_setMarkerSize: function(size) { this.Marker.Size = size; }, asc_setMarkerSize: function(size) { this.Marker.Size = size; },
...@@ -1716,6 +1758,9 @@ asc_CChartSeria.prototype = { ...@@ -1716,6 +1758,9 @@ asc_CChartSeria.prototype = {
asc_getFormatCode: function() { return this.FormatCode; }, asc_getFormatCode: function() { return this.FormatCode; },
asc_setFormatCode: function(format) { this.FormatCode = format; }, asc_setFormatCode: function(format) { this.FormatCode = format; },
asc_getLabelFont: function() { return this.LabelFont; },
asc_setLabelFont: function(format) { this.LabelFont = format; },
// For collaborative editing // For collaborative editing
getType: function() { getType: function() {
return UndoRedoDataTypes.ChartSeriesData; return UndoRedoDataTypes.ChartSeriesData;
...@@ -1732,6 +1777,7 @@ asc_CChartSeria.prototype = { ...@@ -1732,6 +1777,7 @@ asc_CChartSeria.prototype = {
case this.Properties.XValFormula: return this.xVal.Formula; break; case this.Properties.XValFormula: return this.xVal.Formula; break;
case this.Properties.XValNumCache: return this.xVal.NumCache; break; case this.Properties.XValNumCache: return this.xVal.NumCache; break;
case this.Properties.Tx: return this.Tx; break; case this.Properties.Tx: return this.Tx; break;
case this.Properties.TxFont: return this.TxFont; break;
case this.Properties.MarkerSize: return this.Marker.Size; break; case this.Properties.MarkerSize: return this.Marker.Size; break;
case this.Properties.MarkerSymbol: return this.Marker.Symbol; break; case this.Properties.MarkerSymbol: return this.Marker.Symbol; break;
case this.Properties.OutlineColor: return this.OutlineColor; break; case this.Properties.OutlineColor: return this.OutlineColor; break;
...@@ -1747,6 +1793,7 @@ asc_CChartSeria.prototype = { ...@@ -1747,6 +1793,7 @@ asc_CChartSeria.prototype = {
case this.Properties.XValFormula: this.xVal.Formula = value; break; case this.Properties.XValFormula: this.xVal.Formula = value; break;
case this.Properties.XValNumCache: this.xVal.NumCache = value; break; case this.Properties.XValNumCache: this.xVal.NumCache = value; break;
case this.Properties.Tx: this.Tx = value; break; case this.Properties.Tx: this.Tx = value; break;
case this.Properties.TxFont: this.TxFont = value; break;
case this.Properties.MarkerSize: this.Marker.Size = value; break; case this.Properties.MarkerSize: this.Marker.Size = value; break;
case this.Properties.MarkerSymbol: this.Marker.Symbol = value; break; case this.Properties.MarkerSymbol: this.Marker.Symbol = value; break;
case this.Properties.OutlineColor: this.OutlineColor = value; break; case this.Properties.OutlineColor: this.OutlineColor = value; break;
......
This diff is collapsed.
This diff is collapsed.
...@@ -100,6 +100,9 @@ ...@@ -100,6 +100,9 @@
<script type="text/javascript" src="api.js"></script> <script type="text/javascript" src="api.js"></script>
<script type="text/javascript" src="menu/menu.js"></script> <script type="text/javascript" src="menu/menu.js"></script>
<!--for presentation-->
<script type="text/javascript" src="../Common/PresentationSerializeAdapter.js"></script>
<!--for theme--> <!--for theme-->
<script type="text/javascript" src="../Common/Shapes/EditorSettings.js"></script> <script type="text/javascript" src="../Common/Shapes/EditorSettings.js"></script>
<script type="text/javascript" src="../Common/Shapes/Serialize.js"></script> <script type="text/javascript" src="../Common/Shapes/Serialize.js"></script>
......
...@@ -4827,8 +4827,6 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs, ...@@ -4827,8 +4827,6 @@ function Binary_WorksheetTableReader(stream, wb, aSharedStrings, aCellXfs, Dxfs,
} }
else if ( c_oSerWorksheetsTypes.Drawings == type ) else if ( c_oSerWorksheetsTypes.Drawings == type )
{ {
if(null == oWorksheet.Drawings)
oWorksheet.Drawings = new Array();
res = this.bcr.Read1(length, function(t,l){ res = this.bcr.Read1(length, function(t,l){
return oThis.ReadDrawings(t,l, oWorksheet.Drawings, oWorksheet.Id); return oThis.ReadDrawings(t,l, oWorksheet.Drawings, oWorksheet.Id);
}); });
......
...@@ -1361,6 +1361,7 @@ function Workbook(sUrlPath, eventsHandlers, oApi){ ...@@ -1361,6 +1361,7 @@ function Workbook(sUrlPath, eventsHandlers, oApi){
this.nActive = 0; this.nActive = 0;
this.theme = GenerateDefaultTheme(this); this.theme = GenerateDefaultTheme(this);
this.clrSchemeMap = GenerateDefaultColorMap();
this.DefinedNames = new Object(); this.DefinedNames = new Object();
this.oRealDefinedNames = new Object(); this.oRealDefinedNames = new Object();
...@@ -2095,6 +2096,7 @@ function Woorksheet(wb, _index, bAddUserId, sId){ ...@@ -2095,6 +2096,7 @@ function Woorksheet(wb, _index, bAddUserId, sId){
this.nColsCount = 0; this.nColsCount = 0;
this.aGCells = new Object();// 0 based this.aGCells = new Object();// 0 based
this.aCols = new Array();// 0 based this.aCols = new Array();// 0 based
this.Drawings = new Array();
this.oAllCol = null; this.oAllCol = null;
this.objForRebuldFormula = {}; this.objForRebuldFormula = {};
this.aComments = new Array(); this.aComments = new Array();
...@@ -2150,6 +2152,16 @@ Woorksheet.prototype.generateFontMap=function(oFontMap){ ...@@ -2150,6 +2152,16 @@ Woorksheet.prototype.generateFontMap=function(oFontMap){
} }
} }
} }
//пробегаемся по chart
for(var i = 0, length = this.Drawings.length; i < length; ++i)
{
var drawing = this.Drawings[i];
if(drawing.isChart())
{
var chart = drawing.chart;
chart.generateFontMap(oFontMap);
}
}
} }
Woorksheet.prototype.clone=function(sNewId){ Woorksheet.prototype.clone=function(sNewId){
var oNewWs; var oNewWs;
...@@ -2309,9 +2321,9 @@ Woorksheet.prototype.initPostOpen = function(){ ...@@ -2309,9 +2321,9 @@ Woorksheet.prototype.initPostOpen = function(){
//анализируем series //анализируем series
var oBounds = null; var oBounds = null;
var ws = null; var ws = null;
for(var j = 0; j < chart.seriesOpen.length; ++j) for(var j = 0; j < chart.series.length; ++j)
{ {
var seria = chart.seriesOpen[j]; var seria = chart.series[j];
if(0 == j && null != seria && null != seria.xVal && null != seria.xVal.Formula) if(0 == j && null != seria && null != seria.xVal && null != seria.xVal.Formula)
{ {
var sRef = seria.xVal.Formula.replace(/\$/g,""); var sRef = seria.xVal.Formula.replace(/\$/g,"");
......
...@@ -5183,9 +5183,9 @@ function Binary_DocumentTableReader(doc, openParams, ImageMap, stream, bAllowFlo ...@@ -5183,9 +5183,9 @@ function Binary_DocumentTableReader(doc, openParams, ImageMap, stream, bAllowFlo
}); });
oBinary_ChartReader.PostRead(); oBinary_ChartReader.PostRead();
//анализируем серии заполняем data //анализируем серии заполняем data
for(var i = 0, length = chart.seriesOpen.length; i < length; ++i) for(var i = 0, length = chart.series.length; i < length; ++i)
{ {
var seria = chart.seriesOpen[i]; var seria = chart.series[i];
if(null != seria) if(null != seria)
{ {
if(0 == i) if(0 == i)
......
...@@ -154,6 +154,9 @@ ...@@ -154,6 +154,9 @@
<script type="text/javascript" src="../Common/SerializeCommonWordExcel.js"></script> <script type="text/javascript" src="../Common/SerializeCommonWordExcel.js"></script>
<script type="text/javascript" src="Editor/SerializeCommon.js"></script> <script type="text/javascript" src="Editor/SerializeCommon.js"></script>
<!--for presentation-->
<script type="text/javascript" src="../Common/PresentationSerializeAdapter.js"></script>
</head> </head>
<body id="id_body" class="block_elem" style="-moz-user-select:none;-khtml-user-select:none;user-select:none;width:100%;height:100%;background-color:#B0B0B0;overflow:hidden;position:fixed;" UNSELECTABLE="on"> <body id="id_body" class="block_elem" style="-moz-user-select:none;-khtml-user-select:none;user-select:none;width:100%;height:100%;background-color:#B0B0B0;overflow:hidden;position:fixed;" UNSELECTABLE="on">
<div id="id_menu" class="block_elem" style="width:100%;height:21mm;background-color:#F4F5F6;"> <div id="id_menu" class="block_elem" style="width:100%;height:21mm;background-color:#F4F5F6;">
......
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