Commit 58e2faab authored by Alexander.Trofimov's avatar Alexander.Trofimov Committed by Alexander.Trofimov

delete unused code

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@54190 954022d7-b5bf-4e40-9824-e11837661b57
parent 67392bc9
......@@ -31,21 +31,7 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.HtmlElement = null;
this.topLineEditorElement = null;
this.isViewerMode = false;
// if ("function" === typeof(eventsController)) {
// var prot = eventsController.prototype;
// prot.init = prot["init"];
// prot.destroy = prot["destroy"];
// prot.enableKeyEventsHandler = prot["enableKeyEventsHandler"];
// prot.reinitializeScroll = prot["reinitializeScroll"];
// prot.scrollVertical = prot["scrollVertical"];
// prot.scrollHorizontal = prot["scrollHorizontal"];
//
// this.controller = new eventsController();
// } else {
this.controller = new asc.asc_CEventsController();
// }
this.controller = new asc.asc_CEventsController();
this.handlers = new asc.asc_CHandlersList(eventsHandlers);
this.options = options;
......@@ -505,8 +491,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
asc_OpenDocument: function(url, data)
{
// this._initEventController();
var wb = new Workbook(url, this.handlers, this);
this.initGlobalObjects(wb);
this.wbModel = wb;
......@@ -536,14 +520,6 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
g_oIdCounter.Set_Load(false);
CHART_STYLE_MANAGER = new CChartStyleManager();
},
_initEventController: function () {
if (this.isMobileVersion)
this.controller = new asc.asc_CEventsController(); //ToDo mobile
else
this.controller = new asc.asc_CEventsController();
this.controller.setViewerMode(this.isViewerMode);
},
asc_getEditorPermissions : function(){
if (this.DocInfo && this.DocInfo["Id"] && this.DocInfo["Url"]) {
......@@ -714,14 +690,11 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
},
asc_getViewerMode: function () {
return this.isViewerMode;
return this.controller.getViewerMode();
},
asc_setViewerMode: function (isViewerMode) {
this.isViewerMode = isViewerMode;
// Если нет controller-а, мы выставим позднее режим
// if (null !== this.controller)
// this.controller.setViewerMode(isViewerMode);
this.controller.setViewerMode(isViewerMode);
if (this.collaborativeEditing)
this.collaborativeEditing.setViewerMode(isViewerMode);
......
......@@ -163,18 +163,11 @@
this.element.addEventListener("mousewheel" , function () {return self._onMouseWheel.apply(self, arguments);} , false);
// for Mozilla Firefox (можно делать проверку на window.MouseScrollEvent || window.WheelEvent для FF)
this.element.addEventListener("DOMMouseScroll", function () {return self._onMouseWheel.apply(self, arguments);} , false);
if(!this.view.Api.isMobileVersion){
this.element.addEventListener("touchstart" , function (e) {self._onMouseDown(e.touches[0]); return false;} , false);
this.element.addEventListener("touchmove" , function (e) {self._onMouseMove(e.touches[0]); return false;} , false);
this.element.addEventListener("touchend" , function (e) {self._onMouseUp(e.changedTouches[0]); return false;} , false);
}
}
// Курсор для графических объектов. Определяем mousedown и mouseup для выделения текста.
var oShapeCursor = document.getElementById("id_target_cursor");
if (null != oShapeCursor && oShapeCursor.addEventListener && !this.view.Api.isMobileVersion) {
if (null != oShapeCursor && oShapeCursor.addEventListener) {
oShapeCursor.addEventListener("mousedown" , function () {return self._onMouseDown.apply(self, arguments);}, false);
oShapeCursor.addEventListener("mouseup" , function () {return self._onMouseUp.apply(self, arguments);} , false);
oShapeCursor.addEventListener("mousemove" , function () {return self._onMouseMove.apply(self, arguments);}, false);
......@@ -1415,7 +1408,7 @@
return true;
};
/** @param event {jQuery.Event} */
/** @param event {jQuery.Event} */
asc_CEventsController.prototype._onMouseLeave = function (event) {
var t = this;
this.hasCursor = false;
......@@ -1487,14 +1480,14 @@
asc_CEventsController.prototype._onTouchStart = function (event){
this.view.MobileTouchManager.onTouchStart(event);
}
};
asc_CEventsController.prototype._onTouchMove = function (event){
var n = new Date().getTime()
var n = new Date().getTime();
this.view.MobileTouchManager.onTouchMove(event);
}
};
asc_CEventsController.prototype._onTouchEnd = function (event){
this.view.MobileTouchManager.onTouchEnd(event);
}
};
/*
* Export
......
......@@ -488,22 +488,22 @@
};
WorkbookView.prototype._onScrollY = function (pos) {
console.log("_onScrollY " + pos)
// console.log("_onScrollY " + pos)
// document.getElementById("cv1" ).value = "_onScrollY " + pos;
var ws = this.getWorksheet();
var delta = asc_round(pos - ws.getFirstVisibleRow(/*allowPane*/true));
console.log("deltaY " + delta)
// console.log("deltaY " + delta)
if (delta !== 0) {
ws.scrollVertical(delta, this.cellEditor);
}
};
WorkbookView.prototype._onScrollX = function (pos) {
console.log("_onScrollX " + pos)
// console.log("_onScrollX " + pos)
// document.getElementById("cv1" ).value = "_onScrollX " + pos;
var ws = this.getWorksheet();
var delta = asc_round(pos - ws.getFirstVisibleCol(/*allowPane*/true));
console.log("deltaX " + delta)
// console.log("deltaX " + delta)
if (delta !== 0) {
ws.scrollHorizontal(delta, this.cellEditor);
}
......
......@@ -404,6 +404,10 @@
return this;
}
WorksheetView.prototype.getFrozenCell = function () {
return this.topLeftFrozenCell;
};
WorksheetView.prototype.getVisibleRange = function () {
return this.visibleRange;
};
......@@ -2414,7 +2418,7 @@
var textY = this._calcTextVertPos(y1, y2, bl, ct.metrics, ct.cellVA);
var textW = this._calcTextWidth(x1ct, x2ct, ct.metrics, ct.cellHA);
var xb1, yb1, wb, hb, bound, colLeft, colRight, i;
var xb1, yb1, wb, hb, colLeft, colRight, i;
var txtRotX, txtRotW, clipUse = false;
if (drawingCtx) {
......@@ -7485,10 +7489,10 @@
};
WorksheetView.prototype._pasteFromLocalBuff = function (isLargeRange, isLocal, val, bIsUpdate, canChangeColWidth, onlyActive) {
var t = this;
var callTrigger = false;
if (isLargeRange) { callTrigger = true; t.handlers.trigger("slowOperation", true); }
var selectData;
var t = this;
if(isLocal === 'binary')
selectData = t._pasteFromBinary(val);
else if (isLocal === true)
......@@ -8246,9 +8250,6 @@
var rMax = (activeCellsPasteFragment.r2 - activeCellsPasteFragment.r1) + arn.r1 + 1;
var cMax = (activeCellsPasteFragment.c2 - activeCellsPasteFragment.c1) + arn.c1 + 1;
var diffRow = arn.r1 - activeCellsPasteFragment.r1;
var diffCol = arn.c1 - activeCellsPasteFragment.c1;
var isMultiple = false;
var firstCell = t.model.getRange3(arn.r1, arn.c1, arn.r1, arn.c1);
var isMergedFirstCell = firstCell.hasMerged();
......@@ -8383,8 +8384,6 @@
var pasteCol = c - arn.c1 + activeCellsPasteFragment.c1;
newVal = val.getCell( new CellAddress(pasteRow, pasteCol, 0));
var startCell = val.getCell( new CellAddress(activeCellsPasteFragment.r1, activeCellsPasteFragment.c1, 0));
curMerge = newVal.hasMerged();
if(undefined !== newVal)
......@@ -8475,7 +8474,6 @@
if(numFormula == null)
numFormula = 0;
var numStyle = 0;
var cellValueWithoutFormat;
if(skipFormat != null && noSkipVal!= null)
numStyle = noSkipVal;
if(newVal.getFormula()){
......@@ -8492,8 +8490,6 @@
numFor++;
}
}
else if(cellValueWithoutFormat)
range.setValue(cellValueWithoutFormat);
else
range.setValue(value2[numStyle].text);
......@@ -10060,7 +10056,7 @@
}
s = "";
sa.forEach(function(e,i){
s += (i!=0?":":"")
s += (i!=0?":":"");
s += e;
})
}
......
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