Commit 325b6455 authored by Alexey.Musinov's avatar Alexey.Musinov Committed by Alexander.Trofimov

[ios] update

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@64998 954022d7-b5bf-4e40-9824-e11837661b57
parent 86a3d7ed
...@@ -554,7 +554,7 @@ CGraphics.prototype = ...@@ -554,7 +554,7 @@ CGraphics.prototype =
*/ */
this.m_oLastFont.Clear(); this.m_oLastFont.Clear();
this.m_oContext.save(); // this.m_oContext.save();
}, },
EndDraw : function() EndDraw : function()
{ {
......
...@@ -1853,6 +1853,7 @@ function OfflineEditor () { ...@@ -1853,6 +1853,7 @@ function OfflineEditor () {
return [left, top]; return [left, top];
}; };
this.getSelection = function(x, y, width, height) { this.getSelection = function(x, y, width, height) {
_null_object.width = width; _null_object.width = width;
_null_object.height = height; _null_object.height = height;
...@@ -2167,14 +2168,31 @@ function offline_stz(v) {_s.zoom = v; _api.asc_setZoom(v);} ...@@ -2167,14 +2168,31 @@ function offline_stz(v) {_s.zoom = v; _api.asc_setZoom(v);}
function offline_ds(x, y, width, height, ratio) {_s.drawSheet(x, y, width, height, ratio);} function offline_ds(x, y, width, height, ratio) {_s.drawSheet(x, y, width, height, ratio);}
function offline_dh(x, y, width, height, type, ratio) {_s.drawHeader(x, y, width, height, type, ratio);} function offline_dh(x, y, width, height, type, ratio) {_s.drawHeader(x, y, width, height, type, ratio);}
function offline_mouse_down(x, y, pin) { function offline_mouse_down(x, y, pin) {
_s.isShapeAction = false;
var ws = _api.wb.getWorksheet(); var ws = _api.wb.getWorksheet();
var wb = _api.wb;
var graphicsInfo = wb._onGetGraphicsInfo(x, y);
if (graphicsInfo) {
console.log('drawing onclick: ' + graphicsInfo.id);
var e = {Button: 0, ClickCount: 1, shiftKey: false, metaKey: false, ctrlKey: false};
wb._onGraphicObjectMouseDown(e, x, y);
wb._onUpdateSelectionShape(true);
_s.isShapeAction = true;
return {id:graphicsInfo.id};
}
_s.cellPin = pin; _s.cellPin = pin;
if (0 != _s.cellPin) { if (0 != _s.cellPin) {
ws.leftTopRange = ws.activeRange.clone(); ws.leftTopRange = ws.activeRange.clone();
return; return null;
} }
ws.changeSelectionStartPoint(x, y, true, true); ws.changeSelectionStartPoint(x, y, true, true);
return null;
} }
function offline_mouse_move(x, y) { function offline_mouse_move(x, y) {
if (-1 == _s.cellPin) if (-1 == _s.cellPin)
...@@ -2185,6 +2203,15 @@ function offline_mouse_move(x, y) { ...@@ -2185,6 +2203,15 @@ function offline_mouse_move(x, y) {
_api.wb.getWorksheet().changeSelectionEndPoint(x, y, true, true); _api.wb.getWorksheet().changeSelectionEndPoint(x, y, true, true);
} }
function offline_mouse_up(x, y) { function offline_mouse_up(x, y) {
var ws = _api.wb.getWorksheet();
var wb = _api.wb;
if (_s.isShapeAction) {
var e = {Button: 0, ClickCount: 1, shiftKey: false, metaKey: false, ctrlKey: false};
wb._onGraphicObjectMouseUp(e, x, y);
return;
}
_api.wb._onChangeSelectionDone(-1, -1); _api.wb._onChangeSelectionDone(-1, -1);
_s.cellPin = 0; _s.cellPin = 0;
_api.wb.getWorksheet().leftTopRange = undefined; _api.wb.getWorksheet().leftTopRange = undefined;
...@@ -2223,7 +2250,12 @@ function offline_cell_editor_open(isSelectAll, x, y, width, height, ratio) { ...@@ -2223,7 +2250,12 @@ function offline_cell_editor_open(isSelectAll, x, y, width, height, ratio) {
wb.cellEditor.isSelectAll = isSelectAll; wb.cellEditor.isSelectAll = isSelectAll;
wb._onEditCell(x, y, true,undefined, undefined, true, false); // if (isCoord) {
wb._onEditCell(x, y, true, undefined, undefined, true, false);
// }
// else {
// wb._onEditCell(parseInt(x), parseInt(y), false, undefined, undefined, true, false);
// }
return [wb.cellEditor.left, wb.cellEditor.top, wb.cellEditor.right, wb.cellEditor.bottom, return [wb.cellEditor.left, wb.cellEditor.top, wb.cellEditor.right, wb.cellEditor.bottom,
wb.cellEditor.curLeft, wb.cellEditor.curTop, wb.cellEditor.curHeight]; wb.cellEditor.curLeft, wb.cellEditor.curTop, wb.cellEditor.curHeight];
...@@ -2362,6 +2394,8 @@ function offline_get_cell_in_coord (x, y) { ...@@ -2362,6 +2394,8 @@ function offline_get_cell_in_coord (x, y) {
return [ return [
activeCell.c1, activeCell.c1,
activeCell.r1, activeCell.r1,
activeCell.c2,
activeCell.r2,
worksheet.cols[activeCell.c1].left, worksheet.cols[activeCell.c1].left,
worksheet.rows[activeCell.r1].top, worksheet.rows[activeCell.r1].top,
worksheet.cols[activeCell.c1].width, worksheet.cols[activeCell.c1].width,
...@@ -2370,7 +2404,8 @@ function offline_get_cell_in_coord (x, y) { ...@@ -2370,7 +2404,8 @@ function offline_get_cell_in_coord (x, y) {
function offline_get_cell_coord (c, r) { function offline_get_cell_coord (c, r) {
var worksheet = _api.wb.getWorksheet(); var worksheet = _api.wb.getWorksheet();
return [worksheet.cols[c].left, return [
worksheet.cols[c].left,
worksheet.rows[r].top, worksheet.rows[r].top,
worksheet.cols[c].width, worksheet.cols[c].width,
worksheet.rows[r].height]; worksheet.rows[r].height];
...@@ -2396,15 +2431,20 @@ function offline_copy() { ...@@ -2396,15 +2431,20 @@ function offline_copy() {
} }
// text format // text format
_stream["WriteByte"](0); // _stream["WriteByte"](0);
_stream["WriteString2"](sBase64.text); // _stream["WriteString2"](sBase64.text);
// image // image
// if (null != sBase64.drawingUrls && sBase64.drawingUrls.length > 0) if (null != sBase64.drawingUrls && sBase64.drawingUrls.length > 0)
// { {
// _stream["WriteByte"](1); _stream["WriteByte"](1);
// _stream["WriteStringA"](sBase64.drawingUrls[0]); _stream["WriteStringA"](sBase64.drawingUrls[0]);
// } }
else
{
_stream["WriteByte"](0);
_stream["WriteString2"](sBase64.text);
}
// owner format // owner format
_stream["WriteByte"](2); _stream["WriteByte"](2);
...@@ -2468,6 +2508,23 @@ function offline_cut() { ...@@ -2468,6 +2508,23 @@ function offline_cut() {
return _stream; return _stream;
} }
function offline_calculate_visible_range(x, y, w, h) {
var worksheet = _api.wb.getWorksheet();
var range = _s._updateRegion(worksheet, x, y, w, h);
worksheet.visibleRange.c1 = range.columnBeg < 0 ? 0 : range.columnBeg;
worksheet.visibleRange.r1 = range.rowBeg < 0 ? 0 : range.rowBeg;
worksheet.visibleRange.c2 = range.columnEnd < 0 ? 0 : range.columnEnd;
worksheet.visibleRange.r2 = range.rowEnd < 0 ? 0 : range.rowEnd;
return [worksheet.visibleRange.c1, worksheet.visibleRange.r1, worksheet.visibleRange.c2, worksheet.visibleRange.r2,
worksheet.cols[worksheet.visibleRange.c1].left,
worksheet.rows[worksheet.visibleRange.r1].top,
worksheet.cols[worksheet.visibleRange.c1].width,
worksheet.rows[worksheet.visibleRange.r1].height
];
}
function offline_apply_event(type,params) { function offline_apply_event(type,params) {
var _stream = null; var _stream = null;
......
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