Commit a5d16dd0 authored by Sergey.Luzyanin's avatar Sergey.Luzyanin

Bug 27553 - Опция Ряд с данными (Data series) не подбирается автоматически при создании диаграммы

Bug 28095 - Координаты автофигуры, при добавлении за пределы слайда, привязываются к краям
Bug 28094 - Нельзя выйти из режима ввода текста автофигуры клавишей Escape
Bug 26247 - Легенда диаграммы типа Pie начинается с нуля 
Bug 26148 - Совпадение 7 эскизов стилей и построения диаграмм типа Line
Bug 11478 - Изображение удаляется после нажатия Enter когда объект выбран мышкой 
Bug 27129 - у диаграмм надписи над столбцами, а у нас на столбцах
Bug 28081 - Фокус остается на панели эскизов после добавления изображения
Bug 26572 - [Copy&Paste] Вставлять диаграмму с пустым графиком, если она вставляется из CDE
Bug 27985 - [Copy&Paste] Спадает select с графического объекта, после копирования его на другой слайд
Bug 28262 - Операция Undo отменяет измененный Shape Opacity\Gradient только со второго раза
Bug 28248 - Имя шрифта на панели инструментов отображается некорректно, для сгруппированной автофигуры с текстом

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60605 954022d7-b5bf-4e40-9824-e11837661b57
parent a0ac8ba0
This diff is collapsed.
......@@ -1076,11 +1076,19 @@ DrawingObjectsController.prototype =
{
this.parent.GoTo_Text();
this.resetSelection();
if(this.document && (docpostype_DrawingObjects !== this.document.CurPos.Type || isRealObject(getTargetTextObject(this.document.DrawingObjects))) && CDocumentContent.prototype.Add_NewParagraph === docContentFunction)
{
this.document.Add_NewParagraph(args[0]);
}
}
else if(this.selectedObjects.length > 0 && this.selectedObjects[0].parent && this.selectedObjects[0].parent.GoTo_Text)
{
this.selectedObjects[0].parent.GoTo_Text();
this.resetSelection();
if(this.document && (docpostype_DrawingObjects !== this.document.CurPos.Type || isRealObject(getTargetTextObject(this))) && CDocumentContent.prototype.Add_NewParagraph === docContentFunction)
{
this.document.Add_NewParagraph(args[0]);
}
}
}
},
......@@ -5569,7 +5577,7 @@ DrawingObjectsController.prototype =
return;
}
}
this.checkSelectedObjectsAndCallback(this.setGraphicObjectPropsCallBack, [props]);
this.checkSelectedObjectsAndCallback(this.setGraphicObjectPropsCallBack, [props], true);
}
else
{
......@@ -5577,7 +5585,7 @@ DrawingObjectsController.prototype =
}
},
checkSelectedObjectsAndCallback: function(callback, args)
checkSelectedObjectsAndCallback: function(callback, args, bNoSendProps)
{
var selection_state = this.getSelectionState();
this.drawingObjects.objectLocker.reset();
......@@ -5601,7 +5609,10 @@ DrawingObjectsController.prototype =
}
callback.apply(_this, args);
_this.startRecalculate();
_this.drawingObjects.sendGraphicObjectProps();
if(!(bNoSendProps === true))
{
_this.drawingObjects.sendGraphicObjectProps();
}
}
};
this.drawingObjects.objectLocker.checkObjects(callback2);
......
This diff is collapsed.
......@@ -132,7 +132,7 @@ function CChartStyleManager()
this.styles[25] = new CChartStyle(EFFECT_MODERATE, EFFECT_INTENSE, s[1], EFFECT_SUBTLE, EFFECT_NONE, [], 7, s[1], 13);
for(i = 26; i < 32; ++i)
{
this.styles[i] = new CChartStyle(EFFECT_MODERATE, EFFECT_INTENSE, [f(i-26,0)], EFFECT_SUBTLE, EFFECT_NONE, [], 7, s[1], 13);
this.styles[i] = new CChartStyle(EFFECT_MODERATE, EFFECT_INTENSE, [f(i-26,0)], EFFECT_SUBTLE, EFFECT_NONE, [], 7, [f(i-26,0)], 13);
}
this.styles[32] = new CChartStyle(EFFECT_NONE, EFFECT_SUBTLE, s[0], EFFECT_SUBTLE, EFFECT_SUBTLE, [f(8, -0.5)], 5, s[0], 9);
this.styles[33] = new CChartStyle(EFFECT_NONE, EFFECT_SUBTLE, s[1], EFFECT_SUBTLE, EFFECT_SUBTLE, s[2], 5, s[1], 9);
......@@ -2211,13 +2211,6 @@ CChartSpace.prototype =
}
},
recalculatePointMap: function()
{
},
recalculateReferences: function()
{
var worksheet = this.worksheet;
......@@ -2225,7 +2218,12 @@ CChartSpace.prototype =
if(!worksheet)
return;
var checkValByNumRef = function(oThis, ser, val)
if(this.recalcInfo.recalculateBBox)
{
this.recalculateBBox();
this.recalcInfo.recalculateBBox = false;
}
var checkValByNumRef = function(oThis, ser, val, bVertical)
{
if(val && val.numRef && typeof val.numRef.f === "string"/*(!val.numRef.numCache || val.numRef.numCache.pts.length === 0)*/)
{
......@@ -2257,7 +2255,7 @@ CChartSpace.prototype =
removePtsFromLit(num_cache);
}
var lit_format_code = typeof num_cache.formatCode === "string" && num_cache.formatCode.length > 0 ? num_cache.formatCode : "General";
var pt_index = 0, i, j, cell, pt, worksheet_id, hidden = true, row_hidden, col_hidden;
var pt_index = 0, i, j, cell, pt, worksheet_id, hidden = true, row_hidden, col_hidden, nPtCount;
for(i = 0; i < arr_f.length; ++i)
{
var parsed_ref = parserHelp.parse3DRef(arr_f[i]);
......@@ -2271,7 +2269,8 @@ CChartSpace.prototype =
if(range1)
{
var range = range1.bbox;
if(range.r1 === range.r2)
if(range.r1 === range.r2 || bVertical === true)
{
row_hidden = source_worksheet.getRowHidden(range.r1);
for(j = range.c1; j <= range.c2; ++j)
......@@ -2335,7 +2334,7 @@ CChartSpace.prototype =
}
};
var checkCatByNumRef = function(oThis, ser, cat)
var checkCatByNumRef = function(oThis, ser, cat, bVertical)
{
if(cat && cat.strRef && typeof cat.strRef.f === "string" /*(!cat.strRef.strCache || cat.strRef.strCache.pt.length === 0)*/)
{
......@@ -2369,7 +2368,7 @@ CChartSpace.prototype =
if(range1)
{
var range = range1.bbox;
if(range.r1 === range.r2)
if(range.r1 === range.r2 || bVertical === true)
{
row_hidden = source_worksheet.getRowHidden(range.r1);
for(j = range.c1; j <= range.c2; ++j)
......@@ -2435,10 +2434,10 @@ CChartSpace.prototype =
//val
checkValByNumRef(this, ser, ser.val);
//cat
checkValByNumRef(this, ser, ser.cat);
checkCatByNumRef(this, ser, ser.cat);
checkValByNumRef(this, ser, ser.cat, this.bbox.seriesBBox.bVert);
checkCatByNumRef(this, ser, ser.cat, this.bbox.seriesBBox.bVert);
//tx
checkCatByNumRef(this, ser, ser.tx);
checkCatByNumRef(this, ser, ser.tx, !this.bbox.seriesBBox.bVert);
if(ser.isHidden)
{
......@@ -2456,9 +2455,9 @@ CChartSpace.prototype =
for(j = 0; j < series.length; ++j)
{
ser = series[j];
checkValByNumRef(this, ser, ser.xVal);
checkValByNumRef(this, ser, ser.xVal, this.bbox.seriesBBox.bVert);
checkValByNumRef(this, ser, ser.yVal);
checkCatByNumRef(this, ser, ser.tx);
checkCatByNumRef(this, ser, ser.tx, !this.bbox.seriesBBox.bVert);
if(ser.isHidden)
{
......@@ -5391,7 +5390,7 @@ CChartSpace.prototype =
if(str_pt)
arr_str_labels.push(str_pt.val);
else
arr_str_labels.push(pt.idx+"");
arr_str_labels.push((pt.idx + 1) + "");
calc_entry = new CalcLegendEntry(legend, this);
calc_entry.txBody = CreateTextBodyFromString(arr_str_labels[i], this.getDrawingDocument(), calc_entry);
......@@ -6605,9 +6604,15 @@ CChartSpace.prototype =
{
if(this.chart && this.chart.plotArea && this.chart.plotArea.chart && this.chart.plotArea.chart.series)
{
var default_lbl = new CDLbl();
default_lbl.initDefault();
var series = this.chart.plotArea.chart.series;
var nDefaultPosition;
if(this.chart.plotArea.chart.getDefaultDataLabelsPosition)
{
nDefaultPosition = this.chart.plotArea.chart.getDefaultDataLabelsPosition();
}
var default_lbl = new CDLbl();
default_lbl.initDefault(nDefaultPosition);
for(var i = 0; i < series.length; ++i)
{
var ser = series[i];
......
......@@ -82,13 +82,17 @@ StartAddNewShape.prototype =
{
History.Create_NewPoint();
var shape = track.getShape(false, oThis.drawingObjects.getDrawingDocument(), oThis.drawingObjects.drawingObjects);
if(shape.spPr.xfrm.offX < 0)
{
shape.spPr.xfrm.setOffX(0);
}
if(shape.spPr.xfrm.offY < 0)
if(!(oThis.drawingObjects.drawingObjects && oThis.drawingObjects.drawingObjects.cSld))
{
shape.spPr.xfrm.setOffY(0);
if(shape.spPr.xfrm.offX < 0)
{
shape.spPr.xfrm.setOffX(0);
}
if(shape.spPr.xfrm.offY < 0)
{
shape.spPr.xfrm.setOffY(0);
}
}
oThis.drawingObjects.drawingObjects.getWorksheetModel && shape.setWorksheet(oThis.drawingObjects.drawingObjects.getWorksheetModel());
if(oThis.drawingObjects.drawingObjects && oThis.drawingObjects.drawingObjects.cSld)
......
......@@ -124,6 +124,11 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
this.shapeElementId = null;
this.isImageChangeUrl = false;
this.isShapeImageChangeUrl = false;
//Флаги для применения свойств через слайдеры
this.noCreatePoint = false;
this.exucuteHistory = false;
this.exucuteHistoryEnd = false;
//находится ли фокус в рабочей области редактора(используется для copy/paste в MAC)
this.IsFocus = null;
......@@ -2630,9 +2635,15 @@ var ASC_DOCS_API_USE_EMBEDDED_FONTS = "@@ASC_DOCS_API_USE_EMBEDDED_FONTS";
};
// Shapes
spreadsheet_api.prototype.setStartPointHistory = function(){History.Create_NewPoint(); History.StartTransaction()};
spreadsheet_api.prototype.setStartPointHistory = function(){
this.noCreatePoint = true;
this.exucuteHistory = true;
};
spreadsheet_api.prototype.setEndPointHistory = function(){History.EndTransaction()};
spreadsheet_api.prototype.setEndPointHistory = function(){
this.noCreatePoint = false;
this.exucuteHistoryEnd = true;
};
spreadsheet_api.prototype.asc_startAddShape = function(sPreset) {
this.isStartAddShape = this.controller.isShapeAction = true;
......
......@@ -1330,7 +1330,8 @@
event.ClickCount = this.clickCounter.clickCount;
this.handlers.trigger("graphicObjectMouseUp", event, coord.x, coord.y);
this._changeSelectionDone(event);
if (asc["editor"].isStartAddShape) {
if (asc["editor"].isStartAddShape)
{
event.preventDefault && event.preventDefault();
event.stopPropagation && event.stopPropagation();
}
......
......@@ -783,7 +783,7 @@ CGraphicFrame.prototype =
{
var main_group = this.group.getMainGroup();
this.parent.graphicObjects.selectObject(main_group, 0);
main_group.selectObject(this, this.parent.num);
main_group.selectObject(this, 0);
main_group.selection.textSelection = this;
}
else
......
......@@ -933,7 +933,7 @@ CPresentation.prototype =
Image.setParent(this.Slides[this.CurPage]);
Image.addToDrawingObjects();
this.Slides[this.CurPage].graphicObjects.resetSelection();
this.Slides[this.CurPage].graphicObjects.selectObject(Image, this.Slides[this.CurPage].num);
this.Slides[this.CurPage].graphicObjects.selectObject(Image, 0);
this.Recalculate();
this.Document_UpdateInterfaceState();
}
......@@ -950,7 +950,7 @@ CPresentation.prototype =
Image.spPr.xfrm.setOffX((_this.Slides[_this.CurPage].Width - Image.spPr.xfrm.extX)/2);
Image.spPr.xfrm.setOffY((_this.Slides[_this.CurPage].Height - Image.spPr.xfrm.extY)/2);
_this.Slides[_this.CurPage].graphicObjects.resetSelection();
_this.Slides[_this.CurPage].graphicObjects.selectObject(Image, _this.Slides[_this.CurPage].num);
_this.Slides[_this.CurPage].graphicObjects.selectObject(Image, 0);
_this.Document_UpdateInterfaceState();
}, []);
},
......@@ -993,7 +993,7 @@ CPresentation.prototype =
if(this.Document_Is_SelectionLocked(changestype_AddShape, graphic_frame) === false)
{
this.Slides[this.CurPage].graphicObjects.resetSelection();
this.Slides[this.CurPage].graphicObjects.selectObject(graphic_frame, this.CurPage);
this.Slides[this.CurPage].graphicObjects.selectObject(graphic_frame, 0);
this.Check_GraphicFrameRowHeight(graphic_frame);
this.Slides[this.CurPage].addToSpTreeToPos(this.Slides[this.CurPage].cSld.spTree.length, graphic_frame);
this.Recalculate();
......@@ -1649,7 +1649,85 @@ CPresentation.prototype =
}
else if ( e.KeyCode == 27 ) // Esc
{
// TODO !!!
if(this.Slides[this.CurPage])
{
var oDrawingObjects = this.Slides[this.CurPage].graphicObjects;
var oTargetTextObject = getTargetTextObject(oDrawingObjects);
var bNeedRedraw;
if(oTargetTextObject && oTargetTextObject.isEmptyPlaceholder && oTargetTextObject.isEmptyPlaceholder())
{
bNeedRedraw = true;
}
else
{
bNeedRedraw = false;
}
if(e.ShiftKey || (!oDrawingObjects.selection.groupSelection && !oDrawingObjects.selection.textSelection && !oDrawingObjects.selection.chartSelection))
{
oDrawingObjects.resetSelection();
}
else
{
if(oDrawingObjects.selection.groupSelection)
{
var oGroupSelection = oDrawingObjects.selection.groupSelection.selection;
if(oGroupSelection.textSelection)
{
if(oGroupSelection.textSelection.getObjectType() === historyitem_type_GraphicFrame)
{
if(oGroupSelection.textSelection.graphicObject)
{
oGroupSelection.textSelection.graphicObject.Selection_Remove();
}
}
else
{
var content = oGroupSelection.textSelection.getDocContent();
content && content.Selection_Remove();
}
oGroupSelection.textSelection = null;
}
else if(oGroupSelection.chartSelection)
{
oGroupSelection.chartSelection.resetSelection(false);
oGroupSelection.chartSelection = null;
}
else
{
oDrawingObjects.selection.groupSelection.resetSelection(this);
oDrawingObjects.selection.groupSelection = null;
}
}
else if(oDrawingObjects.selection.textSelection)
{
if(oDrawingObjects.selection.textSelection.getObjectType() === historyitem_type_GraphicFrame)
{
if(oDrawingObjects.selection.textSelection.graphicObject)
{
oDrawingObjects.selection.textSelection.graphicObject.Selection_Remove();
}
}
else
{
var content = oDrawingObjects.selection.textSelection.getDocContent();
content && content.Selection_Remove();
}
oDrawingObjects.selection.textSelection = null;
}
else if(oDrawingObjects.selection.chartSelection)
{
oDrawingObjects.selection.chartSelection.resetSelection(false);
oDrawingObjects.selection.chartSelection = null;
}
}
if(bNeedRedraw)
{
this.DrawingDocument.OnRecalculatePage(this.CurPage, this.Slides[this.CurPage]);
}
this.Document_UpdateSelectionState();
this.Document_UpdateInterfaceState();
}
bRetValue = true;
}
else if ( e.KeyCode == 32 && false === editor.isViewMode ) // Space
......@@ -3125,7 +3203,7 @@ CPresentation.prototype =
this.Check_GraphicFrameRowHeight(Content.Drawings[i].Drawing);
}
Content.Drawings[i].Drawing.addToDrawingObjects();
this.Slides[this.CurPage].graphicObjects.selectObject(Content.Drawings[i].Drawing, this.CurPage);
this.Slides[this.CurPage].graphicObjects.selectObject(Content.Drawings[i].Drawing, 0);
}
}
else if(Content.DocContent)
......@@ -3168,7 +3246,7 @@ CPresentation.prototype =
shape.setParent(this.Slides[this.CurPage]);
shape.addToDrawingObjects();
this.Slides[this.CurPage].graphicObjects.resetSelection();
this.Slides[this.CurPage].graphicObjects.selectObject(shape, this.CurPage);
this.Slides[this.CurPage].graphicObjects.selectObject(shape, 0);
}
}
}
......
......@@ -61,6 +61,36 @@ CGroupShape.prototype.documentUpdateInterfaceState = function()
{
text_pr = new CTextPr();
}
var theme = this.Get_Theme();
if(theme && theme.themeElements && theme.themeElements.fontScheme)
{
if(text_pr.FontFamily)
{
text_pr.FontFamily.Name = theme.themeElements.fontScheme.checkFont(text_pr.FontFamily.Name);
}
if(text_pr.RFonts)
{
if(text_pr.RFonts.Ascii)
text_pr.RFonts.Ascii.Name = theme.themeElements.fontScheme.checkFont(text_pr.RFonts.Ascii.Name);
if(text_pr.RFonts.EastAsia)
text_pr.RFonts.EastAsia.Name = theme.themeElements.fontScheme.checkFont(text_pr.RFonts.EastAsia.Name);
if(text_pr.RFonts.HAnsi)
text_pr.RFonts.HAnsi.Name = theme.themeElements.fontScheme.checkFont(text_pr.RFonts.HAnsi.Name);
if(text_pr.RFonts.CS)
text_pr.RFonts.CS.Name = theme.themeElements.fontScheme.checkFont(text_pr.RFonts.CS.Name);
}
}
if(text_pr.Unifill)
{
var RGBAColor = text_pr.Unifill.getRGBAColor();
text_pr.Color = new CDocumentColor(RGBAColor.R, RGBAColor.G, RGBAColor.B, false);
}
if(text_pr.Shd && text_pr.Shd.Unifill && theme)
{
text_pr.Shd.Unifill.check(theme, this.Get_ColorMap());
}
editor.UpdateParagraphProp(para_pr);
editor.UpdateTextPr(text_pr);
}
......
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