Commit fb037de2 authored by Alexey.Musinov's avatar Alexey.Musinov

[ios] update

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@65326 954022d7-b5bf-4e40-9824-e11837661b57
parent 3b89a9b6
"use strict"; "use strict";
var TRACK_CIRCLE_RADIUS = 15; var TRACK_CIRCLE_RADIUS = 10;
var TRACK_RECT_SIZE2 = 6;//4; var TRACK_RECT_SIZE2 = 6;//4;
var TRACK_RECT_SIZE = 10;//8; var TRACK_RECT_SIZE = 10;//8;
var TRACK_DISTANCE_ROTATE = 25; var TRACK_DISTANCE_ROTATE = 25;
......
...@@ -778,6 +778,22 @@ function CPoint2() { ...@@ -778,6 +778,22 @@ function CPoint2() {
this.fRight = 0; this.fRight = 0;
this.fBottom = 0; this.fBottom = 0;
} }
function CPosition( obj ) {
if (obj)
{
this.X = (undefined == obj.X) ? null : obj.X;
this.Y = (undefined == obj.Y) ? null : obj.Y;
}
else
{
this.X = null;
this.Y = null;
}
}
CPosition.prototype.get_X = function() { return this.X; };
CPosition.prototype.put_X = function(v) { this.X = v; };
CPosition.prototype.get_Y = function() { return this.Y; };
CPosition.prototype.put_Y = function(v) { this.Y = v; };
function CFontManager() { function CFontManager() {
this.m_oLibrary = {}; this.m_oLibrary = {};
this.Initialize = function(){}; this.Initialize = function(){};
...@@ -3722,7 +3738,7 @@ function offline_of() {_s.openFile();} ...@@ -3722,7 +3738,7 @@ function offline_of() {_s.openFile();}
function offline_stz(v) {_s.zoom = v; _api.asc_setZoom(v);} 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, isViewer) {
_s.isShapeAction = false; _s.isShapeAction = false;
var ws = _api.wb.getWorksheet(); var ws = _api.wb.getWorksheet();
...@@ -3747,12 +3763,14 @@ function offline_mouse_down(x, y, pin) { ...@@ -3747,12 +3763,14 @@ function offline_mouse_down(x, y, pin) {
return null; return null;
} }
function offline_mouse_move(x, y) { function offline_mouse_move(x, y, isViewer) {
var ws = _api.wb.getWorksheet(); var ws = _api.wb.getWorksheet();
if (_s.isShapeAction) { if (_s.isShapeAction) {
if (!isViewer) {
var wb = _api.wb; var wb = _api.wb;
var e = {isLocked: true, Button: 0, ClickCount: 1, shiftKey: false, metaKey: false, ctrlKey: false}; var e = {isLocked: true, Button: 0, ClickCount: 1, shiftKey: false, metaKey: false, ctrlKey: false};
ws.objectRender.graphicObjectMouseMove(e, x, y); ws.objectRender.graphicObjectMouseMove(e, x, y);
}
} else { } else {
if (-1 == _s.cellPin) if (-1 == _s.cellPin)
ws._changeSelectionTopLeft(x, y, true, true, true); ws._changeSelectionTopLeft(x, y, true, true, true);
...@@ -3762,13 +3780,15 @@ function offline_mouse_move(x, y) { ...@@ -3762,13 +3780,15 @@ function offline_mouse_move(x, y) {
ws.changeSelectionEndPoint(x, y, true, true); ws.changeSelectionEndPoint(x, y, true, true);
} }
} }
function offline_mouse_up(x, y) { function offline_mouse_up(x, y, isViewer) {
var ws = _api.wb.getWorksheet(); var ws = _api.wb.getWorksheet();
var wb = _api.wb; var wb = _api.wb;
if (_s.isShapeAction) { if (_s.isShapeAction) {
//if (!isViewer) {
var e = {isLocked: true, Button: 0, ClickCount: 1, shiftKey: false, metaKey: false, ctrlKey: false}; var e = {isLocked: true, Button: 0, ClickCount: 1, shiftKey: false, metaKey: false, ctrlKey: false};
wb._onGraphicObjectMouseUp(e, x, y); wb._onGraphicObjectMouseUp(e, x, y);
//}
_s.isShapeAction = false; _s.isShapeAction = false;
} else { } else {
wb._onChangeSelectionDone(-1, -1); wb._onChangeSelectionDone(-1, -1);
...@@ -3953,7 +3973,7 @@ function offline_get_header_sizes() { ...@@ -3953,7 +3973,7 @@ function offline_get_header_sizes() {
} }
function offline_get_graphics_object(x, y) { function offline_get_graphics_object(x, y) {
var ws = _api.wb.getWorksheet(); var ws = _api.wb.getWorksheet();
ws.objectRender.drawingArea.reinitRanges(); // ws.objectRender.drawingArea.reinitRanges();
return ws.objectRender.checkCursorDrawingObject(x, y); return ws.objectRender.checkCursorDrawingObject(x, y);
} }
...@@ -4123,6 +4143,177 @@ function offline_apply_event(type,params) { ...@@ -4123,6 +4143,177 @@ function offline_apply_event(type,params) {
break; break;
} }
case 9 : // ASC_MENU_EVENT_TYPE_IMAGE
{
var _imagePr = new asc_CImgProperty();
while (_continue)
{
_attr = params[_current.pos++];
switch (_attr)
{
case 0:
{
_imagePr.CanBeFlow = params[_current.pos++];
break;
}
case 1:
{
_imagePr.Width = params[_current.pos++];
break;
}
case 2:
{
_imagePr.Height = params[_current.pos++];
break;
}
case 3:
{
_imagePr.WrappingStyle = params[_current.pos++];
break;
}
case 4:
{
_imagePr.Paddings = asc_menu_ReadPaddings(params, _current);
break;
}
case 5:
{
_imagePr.Position = asc_menu_ReadPosition(params, _current);
break;
}
case 6:
{
_imagePr.AllowOverlap = params[_current.pos++];
break;
}
case 7:
{
_imagePr.PositionH = asc_menu_ReadImagePosition(params, _current);
break;
}
case 8:
{
_imagePr.PositionV = asc_menu_ReadImagePosition(params, _current);
break;
}
case 9:
{
_imagePr.Internal_Position = params[_current.pos++];
break;
}
case 10:
{
_imagePr.ImageUrl = params[_current.pos++];
break;
}
case 11:
{
_imagePr.Locked = params[_current.pos++];
break;
}
case 12:
{
_imagePr.ChartProperties = asc_menu_ReadChartPr(params, _current);
break;
}
case 13:
{
_imagePr.ShapeProperties = asc_menu_ReadShapePr(params, _current);
break;
}
case 14:
{
_imagePr.ChangeLevel = params[_current.pos++];
break;
}
case 15:
{
_imagePr.Group = params[_current.pos++];
break;
}
case 16:
{
_imagePr.fromGroup = params[_current.pos++];
break;
}
case 17:
{
_imagePr.severalCharts = params[_current.pos++];
break;
}
case 18:
{
_imagePr.severalChartTypes = params[_current.pos++];
break;
}
case 19:
{
_imagePr.severalChartStyles = params[_current.pos++];
break;
}
case 20:
{
_imagePr.verticalTextAlign = params[_current.pos++];
break;
}
case 21:
{
var bIsNeed = params[_current.pos++];
if (bIsNeed)
{
// var _originSize = this.WordControl.m_oDrawingDocument.Native["DD_GetOriginalImageSize"](_imagePr.ImageUrl);
// var _w = _originSize[0];
// var _h = _originSize[1];
//
// // сбрасываем урл
// _imagePr.ImageUrl = undefined;
//
// var _section_select = this.WordControl.m_oLogicDocument.Get_PageSizesByDrawingObjects();
// var _page_width = Page_Width;
// var _page_height = Page_Height;
// var _page_x_left_margin = X_Left_Margin;
// var _page_y_top_margin = Y_Top_Margin;
// var _page_x_right_margin = X_Right_Margin;
// var _page_y_bottom_margin = Y_Bottom_Margin;
//
// if (_section_select)
// {
// if (_section_select.W)
// _page_width = _section_select.W;
//
// if (_section_select.H)
// _page_height = _section_select.H;
// }
//
// var __w = Math.max(1, _page_width - (_page_x_left_margin + _page_x_right_margin));
// var __h = Math.max(1, _page_height - (_page_y_top_margin + _page_y_bottom_margin));
//
// var wI = (undefined !== _w) ? Math.max(_w * g_dKoef_pix_to_mm, 1) : 1;
// var hI = (undefined !== _h) ? Math.max(_h * g_dKoef_pix_to_mm, 1) : 1;
//
// wI = Math.max(5, Math.min(wI, __w));
// hI = Math.max(5, Math.min(hI, __h));
//
// _imagePr.Width = wI;
// _imagePr.Height = hI;
}
break;
}
case 255:
default:
{
_continue = false;
break;
}
}
}
_api.asc_setGraphicObjectProps(_imagePr);
break;
}
case 52: // ASC_MENU_EVENT_TYPE_INSERT_HYPERLINK case 52: // ASC_MENU_EVENT_TYPE_INSERT_HYPERLINK
{ {
var props = asc_menu_ReadHyperPr(params, _current); var props = asc_menu_ReadHyperPr(params, _current);
......
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