Commit 574868bb authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

Заливака ячеек таблицы UniFill'ами. Индексы тем в СлайдМастерах.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@58232 954022d7-b5bf-4e40-9824-e11837661b57
parent 3ba473fa
......@@ -7,6 +7,8 @@ function OverlayObject(geometry, extX, extY, brush, pen, transform )
this.ext = {};
this.ext.cx = extX;
this.ext.cy = extY;
this.extX = extX;
this.extY = extY;
var _brush, _pen;
if((!brush || !brush.fill || brush.fill.type === FILL_TYPE_NOFILL) &&
......@@ -138,6 +140,36 @@ function OverlayObject(geometry, extX, extY, brush, pen, transform )
}
}
function ObjectToDraw(brush, pen, extX, extY, geometry, transform)
{
this.brush = brush;
this.pen = pen;
this.extX = extX;
this.extY = extY;
this.transform = transform;
this.TransformMatrix = transform;
this.geometry = geometry;
}
ObjectToDraw.prototype =
{
check_bounds: function(boundsChecker)
{
if(this.geometry)
{
this.geometry.check_bounds(boundsChecker);
}
else
{
boundsChecker._s();
boundsChecker._m(0, 0);
boundsChecker._l(this.extX, 0);
boundsChecker._l(this.extX, this.extY);
boundsChecker._l(0, this.extY);
boundsChecker._z();
boundsChecker._e();
}
}
};
function RotateTrackShapeImage(originalObject)
{
this.originalObject = originalObject;
......
......@@ -768,6 +768,7 @@ function BinaryPPTYLoader()
{
var indexTh = s.GetULong();
master.setTheme(this.presentation.themes[indexTh]);
master.ThemeIndex = -indexTh - 1;
break;
}
case 1:
......
......@@ -116,6 +116,10 @@ function CThemeLoader()
History.MinorChanges = true;
_loader.Load(g_th, pres);
for(var i = 0; i < pres.slideMasters.length; ++i)
{
pres.slideMasters[i].ThemeIndex = oThis.CurrentLoadThemeIndex;
}
History.MinorChanges = false;
if (oThis.IsReloadBinaryThemeEditorNow)
......
......@@ -1647,7 +1647,7 @@ CPresentation.prototype =
this.CurPage = PageIndex;
e.ctrlKey = e.CtrlKey;
e.shiftKey = e.ShiftKey;
if(e.Button === 0)
//if(e.Button === 0)
{
var ret = this.Slides[this.CurPage].graphicObjects.onMouseDown(e, X, Y);
if(!ret)
......@@ -1668,6 +1668,15 @@ CPresentation.prototype =
e.ctrlKey = e.CtrlKey;
e.shiftKey = e.ShiftKey;
this.Slides[this.CurPage].graphicObjects && this.Slides[this.CurPage].graphicObjects.onMouseUp(e, X, Y);
if(e.Button === g_mouse_button_right)
{
var ContextData = new CContextMenuData();
var ConvertedPos = this.DrawingDocument.ConvertCoordsToCursorWR( X, Y, PageIndex );
ContextData.X_abs = ConvertedPos.X;
ContextData.Y_abs = ConvertedPos.Y;
ContextData.IsSlideSelect = false;
editor.sync_ContextMenuCallback( ContextData );
}
this.Document_UpdateInterfaceState();
},
......
......@@ -3770,7 +3770,7 @@ asc_docs_api.prototype.OpenDocumentEndCallback = function()
CollaborativeEditing.Apply_Changes();
CollaborativeEditing.Release_Locks();
this.bNoSendComments = false;
/// return;
return;
}
}
this.WordControl.m_oLogicDocument.Recalculate({Drawings: {All:true, Map: {}}});
......
......@@ -273,6 +273,8 @@ CMatrix.prototype =
}
};
function CMatrixL()
{
this.sx = 1.0;
......
......@@ -3497,6 +3497,11 @@ CTable.prototype =
// Рисуем заливку всех ячеек на странице
var Theme = this.Get_Theme();
var ColorMap = this.Get_ColorMap();
if(this.bPresentation)
{
pGraphics.SaveGrState();
pGraphics.SetIntegerGrid(false);
}
if ( this.HeaderInfo.Count > 0 && PNum > this.HeaderInfo.PageIndex && true === this.HeaderInfo.Pages[PNum].Draw )
{
var HeaderPage = this.HeaderInfo.Pages[PNum];
......@@ -3528,12 +3533,43 @@ CTable.prototype =
// Заливаем ячейку
var CellShd = Cell.Get_Shd();
if ( shd_Nil != CellShd.Value )
if(!this.bPresentation)
{
var RGBA = CellShd.Get_Color2(Theme, ColorMap);
pGraphics.b_color1( RGBA.r, RGBA.g, RGBA.b, 255 );
pGraphics.TableRect(Math.min(X_cell_start, X_cell_end), Math.min(Y, Y + RealHeight), Math.abs(X_cell_end - X_cell_start), Math.abs(RealHeight));
}
else
{
if(CellShd.Unifill && CellShd.Unifill.fill)
{
if(CellShd.Unifill.fill.type === FILL_TYPE_SOLID)
{
var Alpha, RGBA = CellShd.Get_Color3(Theme, ColorMap);
if(isRealNumber(CellShd.Unifill.transparent))
{
Alpha = 255 - CellShd.Unifill.transparent;
}
else
{
Alpha = 255;
}
pGraphics.b_color1( RGBA.r, RGBA.g, RGBA.b, Alpha );
pGraphics.TableRect(Math.min(X_cell_start, X_cell_end), Math.min(Y, Y + RealHeight), Math.abs(X_cell_end - X_cell_start), Math.abs(RealHeight));
}
else
{
var ShapeDrawer = new CShapeDrawer();
CellShd.Unifill.check(Theme, ColorMap);
var Transform = this.Parent.transform.CreateDublicate();
global_MatrixTransformer.TranslateAppend(Transform, Math.min(X_cell_start, X_cell_end), Math.min(Y, Y + RealHeight));
pGraphics.transform3(Transform, false);
ShapeDrawer.fromShape2(new ObjectToDraw(CellShd.Unifill, null, Math.abs(X_cell_end - X_cell_start), Math.abs(RealHeight), null, Transform), pGraphics, null);
ShapeDrawer.draw(null);
}
}
}
}
}
}
......@@ -3597,12 +3633,50 @@ CTable.prototype =
var CellShd = Cell.Get_Shd();
if ( shd_Nil != CellShd.Value )
{
var RGBA = CellShd.Get_Color2(Theme, ColorMap);
pGraphics.b_color1( RGBA.r, RGBA.g, RGBA.b, 255 );
pGraphics.TableRect(Math.min(X_cell_start, X_cell_end), Math.min(Y, Y + RealHeight), Math.abs(X_cell_end - X_cell_start), Math.abs(RealHeight));
if(!this.bPresentation)
{
var RGBA = CellShd.Get_Color2(Theme, ColorMap);
pGraphics.b_color1( RGBA.r, RGBA.g, RGBA.b, 255 );
pGraphics.TableRect(Math.min(X_cell_start, X_cell_end), Math.min(Y, Y + RealHeight), Math.abs(X_cell_end - X_cell_start), Math.abs(RealHeight));
}
else
{
if(CellShd.Unifill && CellShd.Unifill.fill)
{
if(CellShd.Unifill.fill.type === FILL_TYPE_SOLID)
{
var Alpha, RGBA = CellShd.Get_Color3(Theme, ColorMap);
if(isRealNumber(CellShd.Unifill.transparent))
{
Alpha = 255 - CellShd.Unifill.transparent;
}
else
{
Alpha = 255;
}
pGraphics.b_color1( RGBA.r, RGBA.g, RGBA.b, Alpha );
pGraphics.TableRect(Math.min(X_cell_start, X_cell_end), Math.min(Y, Y + RealHeight), Math.abs(X_cell_end - X_cell_start), Math.abs(RealHeight));
}
else
{
var ShapeDrawer = new CShapeDrawer();
CellShd.Unifill.check(Theme, ColorMap);
var Transform = this.Parent.transform.CreateDublicate();
global_MatrixTransformer.TranslateAppend(Transform, Math.min(X_cell_start, X_cell_end), Math.min(Y, Y + RealHeight));
pGraphics.transform3(Transform, false);
ShapeDrawer.fromShape2(new ObjectToDraw(CellShd.Unifill, null, Math.abs(X_cell_end - X_cell_start), Math.abs(RealHeight), null, Transform), pGraphics, null);
ShapeDrawer.draw(null);
}
}
}
}
}
}
if(this.bPresentation)
{
pGraphics.RestoreGrState();
}
},
Internal_Draw_3 : function(pGraphics, PNum, Row_start, Row_last)
......@@ -21156,7 +21230,8 @@ CTableCell.prototype =
var Shd_new =
{
Value : OtherPr.Shd.Value,
Color : { r : OtherPr.Shd.Color.r, g : OtherPr.Shd.Color.g, b : OtherPr.Shd.Color.b }
Color : { r : OtherPr.Shd.Color.r, g : OtherPr.Shd.Color.g, b : OtherPr.Shd.Color.b },
Unifill : OtherPr.Shd.Unifill ? OtherPr.Shd.Unifill.createDuplicate() : undefined
};
this.Set_Shd( Shd_new );
......
......@@ -821,6 +821,8 @@ CAscShapeProp.prototype.get_Width = function(){return this.w} ;
CAscShapeProp.prototype.put_Width = function(v){this.w = v;} ;
CAscShapeProp.prototype.get_Height = function(){return this.h} ;
CAscShapeProp.prototype.put_Height = function(v){this.h = v;} ;
CAscShapeProp.prototype.get_VerticalTextAlign = function(){return this.verticalTextAlign} ;
CAscShapeProp.prototype.put_VerticalTextAlign = function(v){this.verticalTextAlign = v;} ;
// эта функция ДОЛЖНА минимизироваться
function CreateAscShapeProp(shape)
......
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