Commit 0500e666 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

баги

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@60901 954022d7-b5bf-4e40-9824-e11837661b57
parent f111bd9e
......@@ -458,7 +458,7 @@ function CTableOutlineDr()
if (!this.TableMatrix || global_MatrixTransformer.IsIdentity(this.TableMatrix))
{
var pos = this.__DD_ConvertCoordsToCursor(this.TableOutline.X, this.TableOutline.Y, this.TableOutline.PageNum);
var pos = drDoc.__DD_ConvertCoordsToCursor(this.TableOutline.X, this.TableOutline.Y, this.TableOutline.PageNum);
var _x0 = 0;
var _y0 = 0;
......@@ -504,28 +504,28 @@ function CTableOutlineDr()
var _x1 = _bounds[0];
var _y1 = _bounds[1];
var pos0 = this.__DD_ConvertCoordsToCursor(x0, y0, this.TableOutline.PageNum);
var pos0 = drDoc.__DD_ConvertCoordsToCursor(x0, y0, this.TableOutline.PageNum);
if (pos0.X > _x0 && pos0.X < _x1 && pos0.Y > _y0 && pos0.Y < _y1)
{
this.TrackTablePos = 0;
return;
}
pos0 = this.__DD_ConvertCoordsToCursor(x1, y1, this.TableOutline.PageNum);
pos0 = drDoc.__DD_ConvertCoordsToCursor(x1, y1, this.TableOutline.PageNum);
if (pos0.X > _x0 && pos0.X < _x1 && pos0.Y > _y0 && pos0.Y < _y1)
{
this.TrackTablePos = 1;
return;
}
pos0 = this.__DD_ConvertCoordsToCursor(x3, y3, this.TableOutline.PageNum);
pos0 = drDoc.__DD_ConvertCoordsToCursor(x3, y3, this.TableOutline.PageNum);
if (pos0.X > _x0 && pos0.X < _x1 && pos0.Y > _y0 && pos0.Y < _y1)
{
this.TrackTablePos = 3;
return;
}
pos0 = this.__DD_ConvertCoordsToCursor(x2, y2, this.TableOutline.PageNum);
pos0 = drDoc.__DD_ConvertCoordsToCursor(x2, y2, this.TableOutline.PageNum);
if (pos0.X > _x0 && pos0.X < _x1 && pos0.Y > _y0 && pos0.Y < _y1)
{
this.TrackTablePos = 2;
......
......@@ -751,6 +751,7 @@ CShapeDrawer.prototype =
}
this.NativeGraphics["PD_put_BrushTextureMode"]((null == _fill.tile) ? 1 : 2);
this.NativeGraphics["PD_put_BrushTextureAlpha"]((null === this.UniFill.transparent) ? 255 : this.UniFill.transparent);
this.NativeGraphics["PD_put_BrushBounds"](this.min_x, this.min_y, (this.max_x - this.min_x), (this.max_y - this.min_y));
break;
......@@ -815,12 +816,18 @@ CShapeDrawer.prototype =
var arr_pos = [];
var arr_colors = [];
for (var i = 0; i < _fill.colors.length; i++)
{
arr_pos.push(_fill.colors[i].pos / 100000);
var _c = _fill.colors[i].color.RGBA;
var _a = _c.A;
if (this.UniFill.transparent != null)
_c.A = this.UniFill.transparent;
arr_colors.push(_c.R * 256*256*256 + _c.G * 256*256 + _c.B * 256 + _c.A);
_c.A = _a;
}
this.NativeGraphics["PD_put_BrushGragientColors"](arr_pos, arr_colors);
......
......@@ -4340,6 +4340,96 @@ asc_docs_api.prototype.put_AddLineBreak = function()
}
};
asc_docs_api.prototype.ImgApply = function(obj)
{
var ImagePr = obj;
// Если у нас меняется с Float->Inline мы также должны залочить соответствующий параграф
var AdditionalData = null;
var LogicDocument = this.WordControl.m_oLogicDocument;
if(obj && obj.ChartProperties && obj.ChartProperties.type === c_oAscChartTypeSettings.stock)
{
var selectedObjectsByType = LogicDocument.DrawingObjects.getSelectedObjectsByTypes();
if(selectedObjectsByType.charts[0])
{
var chartSpace = selectedObjectsByType.charts[0];
if(chartSpace && chartSpace.chart && chartSpace.chart.plotArea && chartSpace.chart.plotArea.charts[0] && chartSpace.chart.plotArea.charts[0].getObjectType() !== historyitem_type_StockChart)
{
if(chartSpace.chart.plotArea.charts[0].series.length !== 4)
{
this.asc_fireCallback("asc_onError", c_oAscError.ID.StockChartError,c_oAscError.Level.NoCritical);
this.WordControl.m_oLogicDocument.Document_UpdateInterfaceState();
return;
}
}
}
}
/*
if ( docpostype_FlowObjects == LogicDocument.CurPos.Type && "undefined" != typeof( ImagePr.WrappingStyle ) && null != ImagePr.WrappingStyle && c_oAscWrapStyle.Flow != ImagePr.WrappingStyle )
{
var FlowObject = LogicDocument.Pages[LogicDocument.Selection.Data.PageNum].FlowObjects.Get_ByIndex( LogicDocument.CurPos.ContentPos );
AdditionalData =
{
Type : 1,
X : FlowObject.X,
Y : FlowObject.Y,
PageNum : LogicDocument.Selection.Data.PageNum
}
}
*/
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Image_Properties, AdditionalData) )
{
if (ImagePr.ShapeProperties)
ImagePr.ImageUrl = "";
if(ImagePr.ImageUrl != undefined && ImagePr.ImageUrl != null && ImagePr.ImageUrl != "")
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
}
else if (ImagePr.ShapeProperties && ImagePr.ShapeProperties.fill && ImagePr.ShapeProperties.fill.fill &&
ImagePr.ShapeProperties.fill.fill.url !== undefined && ImagePr.ShapeProperties.fill.fill.url != null && ImagePr.ShapeProperties.fill.fill.url != "")
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
}
else
{
ImagePr.ImageUrl = null;
if(!this.noCreatePoint || this.exucuteHistory)
{
if( !this.noCreatePoint && !this.exucuteHistory && this.exucuteHistoryEnd)
{
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
this.exucuteHistoryEnd = false;
}
else
{
this.WordControl.m_oLogicDocument.Create_NewHistoryPoint();
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
}
if(this.exucuteHistory)
{
this.exucuteHistory = false;
}
}
else
{
ExecuteNoHistory(function(){
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
}, this, []);
}
this.WordControl.m_oLogicDocument.Set_ImageProps( ImagePr );
}
}
};
asc_docs_api.prototype.IncreaseIndent = function()
{
if ( false === this.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Paragraph_Properties) )
......
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