Commit 4da1c33f authored by Dmitry.Vikulov's avatar Dmitry.Vikulov Committed by Alexander.Trofimov

- Fix #20584

- Выставление названий диаграммы в зависимости от языка

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@50353 954022d7-b5bf-4e40-9824-e11837661b57
parent 8624264a
...@@ -2339,22 +2339,13 @@ function DrawingObjects() { ...@@ -2339,22 +2339,13 @@ function DrawingObjects() {
// Scroll offset // Scroll offset
//----------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------
var ScrollOffset = function(x, y) { var ScrollOffset = function() {
this.rawX = x;
this.rawY = y;
this.setScroll = function(x, y) {
this.rawX -= x;
this.rawY -= y;
}
this.getX = function() { this.getX = function() {
//return this.rawX + worksheet.getCellLeft(0, 0);
return -ptToPx((worksheet.cols[worksheet.visibleRange.c1].left - worksheet.cellsLeft)) + worksheet.getCellLeft(0, 0); return -ptToPx((worksheet.cols[worksheet.visibleRange.c1].left - worksheet.cellsLeft)) + worksheet.getCellLeft(0, 0);
} }
this.getY = function() { this.getY = function() {
//return this.rawY + worksheet.getCellTop(0, 0);
return -ptToPx((worksheet.rows[worksheet.visibleRange.r1].top - worksheet.cellsTop)) + worksheet.getCellTop(0, 0); return -ptToPx((worksheet.rows[worksheet.visibleRange.r1].top - worksheet.cellsTop)) + worksheet.getCellTop(0, 0);
} }
} }
...@@ -2378,7 +2369,7 @@ function DrawingObjects() { ...@@ -2378,7 +2369,7 @@ function DrawingObjects() {
var trackOverlay = null; var trackOverlay = null;
var autoShapeTrack = null; var autoShapeTrack = null;
var scrollOffset = new ScrollOffset(0, 0); var scrollOffset = new ScrollOffset();
var aObjects = null; var aObjects = null;
var aBoundsCheckers = []; var aBoundsCheckers = [];
...@@ -4266,11 +4257,10 @@ function DrawingObjects() { ...@@ -4266,11 +4257,10 @@ function DrawingObjects() {
} }
} }
_this.setScrollOffset = function(x_px, y_px) { _this.setScrollOffset = function() {
if ( shapeCtx && shapeOverlayCtx && autoShapeTrack ) { if ( shapeCtx && shapeOverlayCtx && autoShapeTrack ) {
scrollOffset.setScroll(x_px, y_px);
var x = scrollOffset.getX(); var x = scrollOffset.getX();
var y = scrollOffset.getY(); var y = scrollOffset.getY();
...@@ -4507,7 +4497,12 @@ function DrawingObjects() { ...@@ -4507,7 +4497,12 @@ function DrawingObjects() {
var chart = this.controller.getAscChartObject(); var chart = this.controller.getAscChartObject();
if ( !chart ) { if ( !chart ) {
chart = new asc_CChart();
chart = new asc_CChart();
chart.header.title = api.chartTranslate.title;
chart.xAxis.title = api.chartTranslate.xAxis;
chart.yAxis.title = api.chartTranslate.yAxis;
chart.range.interval = function() { chart.range.interval = function() {
var result = ""; var result = "";
if (worksheet) { if (worksheet) {
......
...@@ -331,10 +331,10 @@ CChartAsGroup.prototype = ...@@ -331,10 +331,10 @@ CChartAsGroup.prototype =
this.chartTitle.drawingObjects = this.drawingObjects; this.chartTitle.drawingObjects = this.drawingObjects;
if(this.chartTitle.isEmpty()) if(this.chartTitle.isEmpty())
{ {
var title_str = "Chart Title"; /*var title_str = "Chart Title";
this.chartTitle.setTextBody(new CTextBody(this.chartTitle)); this.chartTitle.setTextBody(new CTextBody(this.chartTitle));
for(var i in title_str) for(var i in title_str)
this.chartTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false); this.chartTitle.txBody.content.Paragraph_Add(new ParaText(title_str[i]), false);*/
} }
else else
{ {
...@@ -599,9 +599,9 @@ CChartAsGroup.prototype = ...@@ -599,9 +599,9 @@ CChartAsGroup.prototype =
this.hAxisTitle.txBody.content.Paragraph_Add(new ParaText(title_string[i]), false); this.hAxisTitle.txBody.content.Paragraph_Add(new ParaText(title_string[i]), false);
this.chart.xAxis.bDefaultTitle = false; //this.chart.xAxis.bDefaultTitle = false;
this.chart.xAxis.bShow = false; //this.chart.xAxis.bShow = false;
this.chart.xAxis.title = ""; //this.chart.xAxis.title = "";
} }
if(isRealObject(this.chart.yAxis) && this.chart.yAxis.bShow) if(isRealObject(this.chart.yAxis) && this.chart.yAxis.bShow)
...@@ -617,9 +617,9 @@ CChartAsGroup.prototype = ...@@ -617,9 +617,9 @@ CChartAsGroup.prototype =
this.vAxisTitle.txBody.content.Paragraph_Add(new ParaText(title_string[i]), false); this.vAxisTitle.txBody.content.Paragraph_Add(new ParaText(title_string[i]), false);
this.chart.yAxis.bDefaultTitle = false; //this.chart.yAxis.bDefaultTitle = false;
this.chart.yAxis.bShow = false; //this.chart.yAxis.bShow = false;
this.chart.yAxis.title = ""; //this.chart.yAxis.title = "";
} }
this.init(); this.init();
......
...@@ -1842,7 +1842,7 @@ ...@@ -1842,7 +1842,7 @@
this._drawSelection(); this._drawSelection();
} }
this._drawGraphic(); this._drawGraphic();
this.objectRender.showDrawingObjects(true); this.objectRender.showDrawingObjectsEx(true);
return this; return this;
}, },
...@@ -4751,7 +4751,7 @@ ...@@ -4751,7 +4751,7 @@
var y = this.cellsTop + (dy > 0 && oldH > 0 ? dy : 0); var y = this.cellsTop + (dy > 0 && oldH > 0 ? dy : 0);
var oldW, x, dx; var oldW, x, dx;
this.objectRender.setScrollOffset(0, dy * asc_getcvt(1, 0, this._getPPIX()) ); this.objectRender.setScrollOffset();
var widthChanged = Math.max(calcDecades(vr.r2 + 1), 3) !== oldDec; var widthChanged = Math.max(calcDecades(vr.r2 + 1), 3) !== oldDec;
if (widthChanged) { if (widthChanged) {
...@@ -4848,7 +4848,7 @@ ...@@ -4848,7 +4848,7 @@
vr.c1 = start; vr.c1 = start;
this._updateVisibleColsCount(); this._updateVisibleColsCount();
this.objectRender.setScrollOffset( dx * asc_getcvt(1, 0, this._getPPIX()), 0 ); this.objectRender.setScrollOffset();
var oldW = ctxW - this.cellsLeft - Math.abs(dx); var oldW = ctxW - this.cellsLeft - Math.abs(dx);
var x = this.cellsLeft + (dx > 0 && oldW > 0 ? dx : 0); var x = this.cellsLeft + (dx > 0 && oldW > 0 ? dx : 0);
......
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