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;
} }
......
...@@ -5360,6 +5360,13 @@ ...@@ -5360,6 +5360,13 @@
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,18 +5396,9 @@ ...@@ -5389,18 +5396,9 @@
ar.assign(c, r, c, r); ar.assign(c, r, c, r);
ar.startCol = c; ar.startCol = c;
ar.startRow = r; ar.startRow = r;
var cursorInfo = this.objectRender.checkCursorDrawingObject(xpos, ypos);
if ( cursorInfo ) {
var graphicSelectionType = this.objectRender.getGraphicSelectionType(cursorInfo.data);
ar.type = graphicSelectionType;
}
else
{
ar.type = c_oAscSelectionType.RangeCells; ar.type = c_oAscSelectionType.RangeCells;
this._fixSelectionOfMergedCells(); this._fixSelectionOfMergedCells();
} }
}
}, },
_moveActiveCellToOffset: function (dc, dr) { _moveActiveCellToOffset: function (dc, dr) {
...@@ -5713,6 +5711,21 @@ ...@@ -5713,6 +5711,21 @@
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();
var isGraphicObject = this.objectRender.selectedGraphicObjectsExists();
var textPr = this.objectRender.controller.getParagraphTextPr();
if ( isGraphicObject && textPr && (textPr.Bold != undefined) && (textPr.Italic != undefined) && (textPr.Underline != undefined) && (textPr.FontFamily != undefined) ) {
cell_info.font.name = textPr.FontFamily.Name;
cell_info.font.size = textPr.FontSize;
cell_info.font.bold = textPr.Bold;
cell_info.font.italic = textPr.Italic;
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.name = c.getFontname();
cell_info.font.size = c.getFontsize(); cell_info.font.size = c.getFontsize();
cell_info.font.bold = c.getBold(); cell_info.font.bold = c.getBold();
...@@ -5722,6 +5735,7 @@ ...@@ -5722,6 +5735,7 @@
cell_info.font.subscript = fa === "subscript"; cell_info.font.subscript = fa === "subscript";
cell_info.font.superscript = fa === "superscript"; cell_info.font.superscript = fa === "superscript";
cell_info.font.color = (fc ? asc_obj2Color(fc) : asc_n2Color(c_opt.defaultState.colorNumber)); 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