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

- Добавлены asc_putPrLineSpacing + asc_putLineSpacingBeforeAfter

- Если кликаем по граф.объекту, то cellInfo.asc_getFont() возвращает настройки текста для шейпа
- При клике по граф.объекту не меняется selectionName
- Если граф.объект заселекчен, то по Esc селект сбросится и выделится последняя заселекченная ячейка

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48817 954022d7-b5bf-4e40-9824-e11837661b57
parent 94ee4579
...@@ -2252,6 +2252,16 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -2252,6 +2252,16 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.asc_showImageFileDialog(); this.asc_showImageFileDialog();
}, },
asc_putPrLineSpacing: function(type, value) {
var ws = this.wb.getWorksheet();
ws.objectRender.controller.putPrLineSpacing(type, value);
},
asc_putLineSpacingBeforeAfter: function(type,value) { // "type == 0" means "Before", "type == 1" means "After"
var ws = this.wb.getWorksheet();
ws.objectRender.controller.putLineSpacingBeforeAfter(type, value);
},
asyncImageStartLoaded: function() { asyncImageStartLoaded: function() {
}, },
...@@ -3162,6 +3172,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS"; ...@@ -3162,6 +3172,8 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
prot["asc_changeShapeType"] = prot.asc_changeShapeType; prot["asc_changeShapeType"] = prot.asc_changeShapeType;
prot["asc_setInterfaceDrawImagePlaceShape"] = prot.asc_setInterfaceDrawImagePlaceShape; prot["asc_setInterfaceDrawImagePlaceShape"] = prot.asc_setInterfaceDrawImagePlaceShape;
prot["asc_changeImageFromFile"] = prot.asc_changeImageFromFile; prot["asc_changeImageFromFile"] = prot.asc_changeImageFromFile;
prot["asc_putPrLineSpacing"] = prot.asc_putPrLineSpacing;
prot["asc_putLineSpacingBeforeAfter"] = prot.asc_putLineSpacingBeforeAfter;
prot["asc_changeShapeImageFromFile"] = prot.asc_changeShapeImageFromFile; prot["asc_changeShapeImageFromFile"] = prot.asc_changeShapeImageFromFile;
// Cell interface // Cell interface
......
...@@ -1005,7 +1005,7 @@ DrawingObjectsController.prototype = ...@@ -1005,7 +1005,7 @@ DrawingObjectsController.prototype =
prepareTextProperties: function(TextPr) prepareTextProperties: function(TextPr)
{ {
var _this = this; /*var _this = this;
var trigger = this.drawingObjects.callTrigger; var trigger = this.drawingObjects.callTrigger;
if ( "undefined" != typeof(TextPr) ) if ( "undefined" != typeof(TextPr) )
...@@ -1033,7 +1033,7 @@ DrawingObjectsController.prototype = ...@@ -1033,7 +1033,7 @@ DrawingObjectsController.prototype =
{ {
oTextPrMap[Item]( this, TextPr[Item] ); oTextPrMap[Item]( this, TextPr[Item] );
} }
} }*/
}, },
prepareParagraphProperties: function(ParaPr, TextPr) prepareParagraphProperties: function(ParaPr, TextPr)
...@@ -1086,6 +1086,12 @@ DrawingObjectsController.prototype = ...@@ -1086,6 +1086,12 @@ DrawingObjectsController.prototype =
ascSelectedObjects.push(new asc_CSelectedObject( c_oAscTypeSelectElement.Paragraph, new asc_CParagraphProperty( ParaPr ) )); ascSelectedObjects.push(new asc_CSelectedObject( c_oAscTypeSelectElement.Paragraph, new asc_CParagraphProperty( ParaPr ) ));
}, },
putPrLineSpacing: function(type, value) {
},
putLineSpacingBeforeAfter: function(type, value) {
},
setGraphicObjectProps: function(props) setGraphicObjectProps: function(props)
{ {
History.Create_NewPoint(); History.Create_NewPoint();
......
...@@ -4846,6 +4846,8 @@ function DefaultKeyDownHandle(drawingObjectsController, e) ...@@ -4846,6 +4846,8 @@ function DefaultKeyDownHandle(drawingObjectsController, e)
{ {
case STATES_ID_NULL: case STATES_ID_NULL:
{ {
drawingObjectsController.drawingObjects.unselectDrawingObjects();
drawingObjectsController.drawingObjects.getWorksheet()._drawSelection();
bRetValue = true; bRetValue = true;
break; break;
} }
......
...@@ -5359,6 +5359,13 @@ ...@@ -5359,6 +5359,13 @@
var xpos = x; var xpos = x;
var ypos = y; var ypos = y;
var ar = (this.isFormulaEditMode) ? this.arrActiveFormulaRanges[this.arrActiveFormulaRanges.length - 1] : this.activeRange; var ar = (this.isFormulaEditMode) ? this.arrActiveFormulaRanges[this.arrActiveFormulaRanges.length - 1] : this.activeRange;
var cursorInfo = this.objectRender.checkCursorDrawingObject(xpos, ypos);
if ( cursorInfo ) {
var graphicSelectionType = this.objectRender.getGraphicSelectionType(cursorInfo.data);
ar.type = graphicSelectionType;
return;
}
x *= asc_getcvt( 0/*px*/, 1/*pt*/, this._getPPIX() ); x *= asc_getcvt( 0/*px*/, 1/*pt*/, this._getPPIX() );
y *= asc_getcvt( 0/*px*/, 1/*pt*/, this._getPPIY() ); y *= asc_getcvt( 0/*px*/, 1/*pt*/, this._getPPIY() );
...@@ -5389,17 +5396,8 @@ ...@@ -5389,17 +5396,8 @@
ar.assign(c, r, c, r); ar.assign(c, r, c, r);
ar.startCol = c; ar.startCol = c;
ar.startRow = r; ar.startRow = r;
ar.type = c_oAscSelectionType.RangeCells;
var cursorInfo = this.objectRender.checkCursorDrawingObject(xpos, ypos); this._fixSelectionOfMergedCells();
if ( cursorInfo ) {
var graphicSelectionType = this.objectRender.getGraphicSelectionType(cursorInfo.data);
ar.type = graphicSelectionType;
}
else
{
ar.type = c_oAscSelectionType.RangeCells;
this._fixSelectionOfMergedCells();
}
} }
}, },
...@@ -5713,15 +5711,31 @@ ...@@ -5713,15 +5711,31 @@
cell_info.flags.lockText = ("" !== cell_info.text && (isNumberFormat || "" !== cell_info.formula)); cell_info.flags.lockText = ("" !== cell_info.text && (isNumberFormat || "" !== cell_info.formula));
cell_info.font = new asc_CFont(); cell_info.font = new asc_CFont();
cell_info.font.name = c.getFontname(); var isGraphicObject = this.objectRender.selectedGraphicObjectsExists();
cell_info.font.size = c.getFontsize(); var textPr = this.objectRender.controller.getParagraphTextPr();
cell_info.font.bold = c.getBold();
cell_info.font.italic = c.getItalic(); if ( isGraphicObject && textPr && (textPr.Bold != undefined) && (textPr.Italic != undefined) && (textPr.Underline != undefined) && (textPr.FontFamily != undefined) ) {
cell_info.font.underline = ("none" !== c.getUnderline()); // ToDo убрать, когда будет реализовано двойное подчеркивание cell_info.font.name = textPr.FontFamily.Name;
cell_info.font.strikeout = c.getStrikeout(); cell_info.font.size = textPr.FontSize;
cell_info.font.subscript = fa === "subscript"; cell_info.font.bold = textPr.Bold;
cell_info.font.superscript = fa === "superscript"; cell_info.font.italic = textPr.Italic;
cell_info.font.color = (fc ? asc_obj2Color(fc) : asc_n2Color(c_opt.defaultState.colorNumber)); cell_info.font.underline = textPr.Underline;
cell_info.font.strikeout = textPr.Strikeout;
//cell_info.font.subscript = fa === "subscript";
//cell_info.font.superscript = fa === "superscript";
cell_info.font.color = CreateAscColorCustom(textPr.Color.r, textPr.Color.g, textPr.Color.b);
}
else {
cell_info.font.name = c.getFontname();
cell_info.font.size = c.getFontsize();
cell_info.font.bold = c.getBold();
cell_info.font.italic = c.getItalic();
cell_info.font.underline = ("none" !== c.getUnderline()); // ToDo убрать, когда будет реализовано двойное подчеркивание
cell_info.font.strikeout = c.getStrikeout();
cell_info.font.subscript = fa === "subscript";
cell_info.font.superscript = fa === "superscript";
cell_info.font.color = (fc ? asc_obj2Color(fc) : asc_n2Color(c_opt.defaultState.colorNumber));
}
cell_info.fill = new asc_CFill((null !== bg && undefined !== bg) ? asc_obj2Color(bg) : bg); cell_info.fill = new asc_CFill((null !== bg && undefined !== bg) ? asc_obj2Color(bg) : bg);
......
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