Commit 1e25875d authored by Alexander.Trofimov's avatar Alexander.Trofimov

add asc_getMultiselect

parent cf991600
...@@ -33,34 +33,41 @@ ...@@ -33,34 +33,41 @@
"use strict"; "use strict";
(/** (/**
* @param {Window} window * @param {Window} window
* @param {undefined} undefined * @param {undefined} undefined
*/ */
function(window, undefined) { function (window, undefined) {
// Import // Import
var c_oAscBorderStyles = AscCommon.c_oAscBorderStyles; var c_oAscBorderStyles = AscCommon.c_oAscBorderStyles;
/** @constructor */ /** @constructor */
function asc_CCellFlag(m, s, w, t, l) { function asc_CCellFlag(m, s, w, t, l) {
this.merge = !!m; this.merge = !!m;
this.shrinkToFit = !!s; this.shrinkToFit = !!s;
this.wrapText = !!w; this.wrapText = !!w;
this.selectionType = t; this.selectionType = t;
this.lockText = !!l; this.lockText = !!l;
} this.multiselect = false;
asc_CCellFlag.prototype = { }
asc_getMerge: function() {
return this.merge; asc_CCellFlag.prototype.asc_getMerge = function () {
}, asc_getShrinkToFit: function() { return this.merge;
return this.shrinkToFit; };
}, asc_getWrapText: function() { asc_CCellFlag.prototype.asc_getShrinkToFit = function () {
return this.wrapText; return this.shrinkToFit;
}, asc_getSelectionType: function() { };
return this.selectionType; asc_CCellFlag.prototype.asc_getWrapText = function () {
}, asc_getLockText: function() { return this.wrapText;
return this.lockText; };
} asc_CCellFlag.prototype.asc_getSelectionType = function () {
}; return this.selectionType;
};
asc_CCellFlag.prototype.asc_getMultiselect = function () {
return this.multiselect;
};
asc_CCellFlag.prototype.asc_getLockText = function () {
return this.lockText;
};
/** @constructor */ /** @constructor */
function asc_CFont(name, size, color, b, i, u, s, sub, sup) { function asc_CFont(name, size, color, b, i, u, s, sub, sup) {
...@@ -373,6 +380,7 @@ ...@@ -373,6 +380,7 @@
prot["asc_getShrinkToFit"] = prot.asc_getShrinkToFit; prot["asc_getShrinkToFit"] = prot.asc_getShrinkToFit;
prot["asc_getWrapText"] = prot.asc_getWrapText; prot["asc_getWrapText"] = prot.asc_getWrapText;
prot["asc_getSelectionType"] = prot.asc_getSelectionType; prot["asc_getSelectionType"] = prot.asc_getSelectionType;
prot["asc_getMultiselect"] = prot.asc_getMultiselect;
prot["asc_getLockText"] = prot.asc_getLockText; prot["asc_getLockText"] = prot.asc_getLockText;
window["AscCommonExcel"].asc_CFont = asc_CFont; window["AscCommonExcel"].asc_CFont = asc_CFont;
......
...@@ -73,7 +73,6 @@ ...@@ -73,7 +73,6 @@
var asc_CMM = AscCommonExcel.asc_CMouseMoveData; var asc_CMM = AscCommonExcel.asc_CMouseMoveData;
var asc_VR = AscCommonExcel.VisibleRange; var asc_VR = AscCommonExcel.VisibleRange;
var asc_CCellFlag = AscCommonExcel.asc_CCellFlag;
var asc_CFont = AscCommonExcel.asc_CFont; var asc_CFont = AscCommonExcel.asc_CFont;
var asc_CFill = AscCommonExcel.asc_CFill; var asc_CFill = AscCommonExcel.asc_CFill;
var asc_CCellInfo = AscCommonExcel.asc_CCellInfo; var asc_CCellInfo = AscCommonExcel.asc_CCellInfo;
...@@ -6968,12 +6967,13 @@ ...@@ -6968,12 +6967,13 @@
cell_info.styleName = c.getStyleName(); cell_info.styleName = c.getStyleName();
cell_info.angle = c.getAngle(); cell_info.angle = c.getAngle();
cell_info.flags = new asc_CCellFlag(); cell_info.flags = new AscCommonExcel.asc_CCellFlag();
cell_info.flags.shrinkToFit = c.getShrinkToFit(); cell_info.flags.shrinkToFit = c.getShrinkToFit();
cell_info.flags.wrapText = c.getWrap(); cell_info.flags.wrapText = c.getWrap();
// ToDo activeRange type // ToDo activeRange type
cell_info.flags.selectionType = selectionRange.getLast().type; cell_info.flags.selectionType = selectionRange.getLast().type;
cell_info.flags.multiselect = !selectionRange.isSingleRange();
cell_info.flags.lockText = ("" !== cell_info.text && (isNumberFormat || "" !== cell_info.formula)); cell_info.flags.lockText = ("" !== cell_info.text && (isNumberFormat || "" !== cell_info.formula));
...@@ -7031,7 +7031,7 @@ ...@@ -7031,7 +7031,7 @@
WorksheetView.prototype._getSelectionInfoObject = function () { WorksheetView.prototype._getSelectionInfoObject = function () {
var objectInfo = new asc_CCellInfo(); var objectInfo = new asc_CCellInfo();
objectInfo.flags = new asc_CCellFlag(); objectInfo.flags = new AscCommonExcel.asc_CCellFlag();
var graphicObjects = this.objectRender.getSelectedGraphicObjects(); var graphicObjects = this.objectRender.getSelectedGraphicObjects();
if (graphicObjects.length) { if (graphicObjects.length) {
objectInfo.flags.selectionType = this.objectRender.getGraphicSelectionType(graphicObjects[0].Id); objectInfo.flags.selectionType = this.objectRender.getGraphicSelectionType(graphicObjects[0].Id);
...@@ -8722,13 +8722,13 @@ ...@@ -8722,13 +8722,13 @@
}; };
if ("paste" === prop && val.onlyImages !== true) { if ("paste" === prop && val.onlyImages !== true) {
// Для past свой диапазон // Для past свой диапазон
var newRange; var newRange;
if (isLocal === "binary") { if (isLocal === "binary") {
newRange = this._pasteFromBinary(val, true); newRange = this._pasteFromBinary(val, true);
} else { } else {
newRange = this._pasteFromHTML(val, true); newRange = this._pasteFromHTML(val, true);
} }
checkRange = [newRange]; checkRange = [newRange];
} }
if ("paste" === prop && val.onlyImages === true) { if ("paste" === prop && val.onlyImages === true) {
onSelectionCallback(); onSelectionCallback();
......
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