Commit 5b171ade authored by Sergey.Luzyanin's avatar Sergey.Luzyanin Committed by Alexander.Trofimov

git-svn-id:...

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@49090 954022d7-b5bf-4e40-9824-e11837661b57
parent b31247d7
This diff is collapsed.
......@@ -2144,7 +2144,7 @@ function CEditorPage(api)
{
this.m_oLogicDocument.Slides[drDoc.SlideCurrent].drawSelect();
var elements = this.m_oLogicDocument.Slides[this.m_oLogicDocument.CurPage].elementsManipulator;
var elements = this.m_oLogicDocument.Slides[this.m_oLogicDocument.CurPage].graphicObjects;
if (elements.State.id!=0 && -1 != drDoc.SlideCurrent)
{
var drawPage = drDoc.SlideCurrectRect;
......
This diff is collapsed.
......@@ -42,7 +42,6 @@ function GroupShape(parent)
GroupShape.prototype=
{
IsLine : function()
{
return false;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
var LAYOUT_MODE_EDGE = 0x00;
var LAYOUT_MODE_FACTOR = 0x01;
var LAYOUT_TARGET_INNER = 0x00;
var LAYOUT_TARGET_OUTER = 0x01;
function CChartLayout()
{
this.isManual = false;
this.layoutTarget = null;
this.xMode = null;
this.yMode = null;
this.wMode = null;
this.hMode = null;
this.x = null;
this.y = null;
this.w = null;
this.h = null;
this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id, null)
}
CChartLayout.prototype =
{
setXMode: function(mode)
{
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_Layout_Set_X_Mode, null, null, new UndoRedoDataGraphicObjects(this.Id, new UndoRedoDataGOSingleProp(this.xMode, mode)), null);
this.xMode = mode;
},
setYMode: function(mode)
{
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_Layout_Set_Y_Mode, null, null, new UndoRedoDataGraphicObjects(this.Id, new UndoRedoDataGOSingleProp(this.yMode, mode)), null);
this.yMode = mode;
},
setX: function(x)
{
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_Layout_Set_X, null, null, new UndoRedoDataGraphicObjects(this.Id, new UndoRedoDataGOSingleProp(this.x, x)), null);
this.x = x;
},
setY: function(y)
{
History.Add(g_oUndoRedoGraphicObjects, historyitem_AutoShapes_Layout_Set_Y, null, null, new UndoRedoDataGraphicObjects(this.Id, new UndoRedoDataGOSingleProp(this.y, y)), null);
this.y = y;
},
setIsManual: function(isManual)
{
this.isManual = isManual;
},
Undo: function(type, data)
{
switch(type)
{
case historyitem_AutoShapes_Layout_Set_X_Mode:
{
this.xMode = data.oldValue;
break;
}
case historyitem_AutoShapes_Layout_Set_Y_Mode:
{
this.yMode = data.oldValue;
break;
}
case historyitem_AutoShapes_Layout_Set_X:
{
this.x = data.oldValue;
break;
}
case historyitem_AutoShapes_Layout_Set_Y:
{
this.y = data.oldValue;
break;
}
}
},
Redo: function(type, data)
{
switch(type)
{
case historyitem_AutoShapes_Layout_Set_X_Mode:
{
this.xMode = data.newValue;
break;
}
case historyitem_AutoShapes_Layout_Set_Y_Mode:
{
this.yMode = data.newValue;
break;
}
case historyitem_AutoShapes_Layout_Set_X:
{
this.x = data.newValue;
break;
}
case historyitem_AutoShapes_Layout_Set_Y:
{
this.y = data.newValue;
break;
}
}
}
};
\ No newline at end of file
var LEGEND_ELEMENT_TYPE_RECT = 0x00;
var LEGEND_ELEMENT_TYPE_LINE = 0x01;
function CLegendEntry()
{
this.bDelete = null;
this.idx = null;
this.txPr = null;
this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id);
}
CLegendEntry.prototype =
{
Get_Id: function()
{
return this.Id;
},
getObjectType: function()
{
return CLASS_TYPE_LEGEND_ENTRY;
}
};
function CChartLegend()
{
this.chartGroup = null;
this.layout = null;
this.legendEntries = [];
this.legendPos = null;
this.overlay = false;
this.spPr = new CSpPr();
this.txPr = null;
this.x = null;
this.y = null;
this.extX = null;
this.extY = null;
this.calculatedEntry = [];
this.Id = g_oIdCounter.Get_NewId();
g_oTableId.Add(this, this.Id);
}
CChartLegend.prototype =
{
getObjectType: function()
{
return CLASS_TYPE_CHART_LEGEND;
},
Get_Id: function()
{
return this.Id;
},
getStyles: function(level)
{
var styles = new CStyles();
var default_legend_style = new CStyle("defaultLegendStyle", styles.Default, null, styletype_Paragraph);
default_legend_style.TextPr.FontSize = 10;
default_legend_style.TextPr.themeFont = "Calibri";
//TODO:ParaPr: default_legend_style.ParaPr.Ind
var tx_pr;
if(isRealObject(this.txPr))
{
//TODO
}
styles.Style[styles.Id] = default_legend_style;
++styles.Id;
return styles;
},
init: function()
{
this.setStartValues();
return;
var chart = this.chartGroup.chart;
var chart_legend = chart.getLegendInfo();
if(chart_legend.length > 0)
{
var shape_type = chart_legend[0].marker === c_oAscLegendMarkerType.Line ? "line" : "rect";
for(var i = 0; i < chart_legend.length; ++i)
{
var legend_entry_obj = chart_legend[i];
var entry_string = legend_entry_obj.text;
var cur_legend_entry = new CLegendEntryGroup(this);
cur_legend_entry.marker = chart_legend[0].marker;
cur_legend_entry.drawingObjects = this.chartGroup.drawingObjects;
cur_legend_entry.textBody = new CTextBody(cur_legend_entry);
cur_legend_entry.idx = i;
for(var key in entry_string)
{
cur_legend_entry.textBody.paragraphAdd(new ParaText(entry_string[key]), false);
}
cur_legend_entry.textBody.content.Reset(0, 0, 30, 30);
cur_legend_entry.textBody.content.Recalculate_Page(0, true);
cur_legend_entry.geometry = CreateGeometry(shape_type);
cur_legend_entry.geometry.Init(5, 5);
cur_legend_entry.brush = new CUniFill();
cur_legend_entry.brush.fill = new CSolidFill();
cur_legend_entry.brush.fill.color.color = new CRGBColor();
cur_legend_entry.brush.fill.color.color.RGBA = {R:legend_entry_obj.color.R, G:legend_entry_obj.color.G, B:legend_entry_obj.color.B, A:255}
}
}
},
draw: function(graphics)
{
for(var i = 0; i < this.calculatedEntry.length; ++i)
{
this.calculatedEntry[i].draw(graphics);
}
},
setStartValues: function()
{
var is_on_history = History.Is_On();
var is_on_table_id = !g_oTableId.m_bTurnOff;
if(is_on_history)
History.TurnOff();
if(is_on_table_id)
g_oTableId.m_bTurnOff = true;
g_oTableId.m_bTurnOff = true;
var chart = this.chartGroup.chart;
var legend_info = chart.getLegendInfo();
this.calculatedEntry.length = 0;
if(legend_info.length > 0)
{
var bullet_type = legend_info[0].marker === c_oAscLegendMarkerType.Line ? "line" : "rect";
for(var i = 0; i < legend_info.length; ++i)
{
var cur_legend_info = legend_info[i];
var legend_entry = this.legendEntries[i];
if(isRealObject(legend_entry) && legend_entry.bDelete === true)
continue;
var entry = new CLegendEntryGroup(this);
entry.bullet = new CShape(null, this.chartGroup.drawingObjects, legend_entry);
var uni_fill = new CUniFill();
uni_fill.setFill(new CSolidFill());
uni_fill.fill.setColor(new CUniColor());
uni_fill.fill.color.setColor(new CRGBColor());
uni_fill.fill.color.setColor(cur_legend_info.color.R*16*16 + cur_legend_info.color.G*16 +cur_legend_info.color.B);
if(bullet_type === "line")
{
entry.bullet.setPresetGeometry("line");
entry.bullet.setUniFill(uni_fill);
}
else
{
entry.bullet.setPresetGeometry("rect");
var shape_fill = new CUniFill();
shape_fill.setFill(new CNoFill());
var shape_line = new CLn();
var line_fill = new CUniFill();
line_fill.setFill(new CNoFill());
shape_line.setFill(line_fill);
entry.bullet.setUniFill(shape_fill);
entry.bullet.setUniLine(shape_line);
entry.bullet.addTextBody(new CTextBody(entry.bullet));
entry.bullet.paragraphAdd(new ParaTextPr({unifill: uni_fill}));
entry.bullet.paragraphAdd(new ParaText(String.fromCharCode(0x00A7)));
}
entry.title = new CShape(null, this.chartGroup.drawingObjects);
entry.title.addTextBody(new CTextBody(entry.title));
for(var i in cur_legend_info.text)
{
entry.title.paragraphAdd(new ParaText(cur_legend_info.text[i]));
}
this.calculatedEntry.push(entry);
}
}
if(is_on_history)
History.TurnOn();
if(is_on_table_id)
g_oTableId.m_bTurnOff = false;
},
setChartGroup: function(chartGroup)
{
this.chartGroup = chartGroup;
},
recalculateInternalPositionsAndExtents: function()
{
this.extX = null;
this.extY = null;
if(isRealObject(this.layout) && isRealNumber(this.layout.w) && isRealNumber(this.layout.h))
{
this.extX = this.chartGroup.extX*this.layout.w;
this.extY = this.chartGroup.extY*this.layout.h;
}
else
{
switch (this.legendPos)
{
case c_oAscChartLegend.right:
case c_oAscChartLegend.left:
{
for(var i = 0; i < this.calculatedEntry.length; ++i)
{
var cur_legend_entry = this.calculatedEntry[i];
}
break;
}
}
}
},
recalculateWithoutLayout: function()
{}
};
function CLegendEntryGroup(legend)
{
this.legend = legend;
this.bullet = null;
this.title = null;
}
CLegendEntryGroup.prototype =
{
setLegendGroup: function(legendGroup)
{
},
getStyles: function()
{
var styles = new CStyles();
var default_style = new CStyle("defaultEntryStyle", null, null, styletype_Paragraph);
default_style.TextPr.themeFont = "Calibri";
default_style.TextPr.FontSize = 10;
//default_style.ParaPr TODO
styles.Style[styles.Id] = default_style;
++styles.Id;
var legend_style = new CStyle("legend_style", styles.Id-1, null, styletype_Paragraph);
/*TODO*/
styles.Style[styles.Id] = legend_style;
++styles.Id;
var entry_style = new CStyle("entry_style", styles.Id - 1, null, styletype_Paragraph);
if(isRealObject(this.legendGroup.legendEntries[this.idx]) && isRealObject(this.legendGroup.legendEntries[this.idx].txPr))
{
//TODO
}
styles.Style[styles.Id] = entry_style;
++styles.Id;
return styles;
},
getBulletStyles: function()
{
},
getTitleStyles: function()
{},
recalculateInternalPosition: function()
{
},
draw: function(graphics)
{
if(isRealObject(this.bullet) && isRealObject(this.title))
{
this.bullet.draw(graphics);
this.title.draw(graphics);
}
}
};
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -48,10 +48,9 @@
<link type="text/css" href="../Word/Drawing/styles/word.css" rel="stylesheet"/>
<script type="text/javascript" src="Editor/CollaborativeEditing.js"></script>
<script type="text/javascript" src="Editor/Format/CollaborativeEditing.js"></script>
<script type="text/javascript" src="Editor/Styles.js"></script>
<script type="text/javascript" src="Editor/ParagraphContent.js"></script>
<script type="text/javascript" src="../Word/Drawing/Metafile.js"></script>
<script type="text/javascript" src="../Word/Drawing/GraphicsEvents.js"></script>
<script type="text/javascript" src="../Word/Drawing/WorkEvents.js"></script>
......@@ -59,22 +58,51 @@
<script type="text/javascript" src="../Word/Drawing/Rulers.js"></script>
<script type="text/javascript" src="../Word/Editor/Common.js"></script>
<script type="text/javascript" src="../Word/Editor/Sections.js"></script>
<script type="text/javascript" src="../Word/Editor/CollaborativeEditing.js"></script>
<script type="text/javascript" src="../Word/Drawing/scrolls/scroll.js"></script>
<script type="text/javascript" src="themes/Themes.js"></script>
<script type="text/javascript" src="Editor/Table.js"></script>
<script type="text/javascript" src="Editor/Format/Table.js"></script>
<script type="text/javascript" src="Editor/FlowObjects.js"></script>
<script type="text/javascript" src="Editor/History.js"></script>
<script type="text/javascript" src="Editor/Paragraph.js"></script>
<script type="text/javascript" src="Editor/DocumentContent.js"></script>
<script type="text/javascript" src="Editor/Presentation.js"></script>
<script type="text/javascript" src="Editor/Shape.js"></script>
<script type="text/javascript" src="Editor/GraphicFrame.js"></script>
<script type="text/javascript" src="Editor/Format/GraphicFrame.js"></script>
<script type="text/javascript" src="Editor/Numbering.js"></script>
<script type="text/javascript" src="Editor/TextBody.js"></script>
<script type="text/javascript" src="Editor/Format/Presentation.js"></script>
<script type="text/javascript" src="Editor/Format/Shape.js"></script>
<script type="text/javascript" src="Editor/Format/Image.js"></script>
<script type="text/javascript" src="Editor/Format/GroupShape.js"></script>
<script type="text/javascript" src="Editor/Format/Slide.js"></script>
<script type="text/javascript" src="Editor/Format/SlideMaster.js"></script>
<script type="text/javascript" src="Editor/Format/Layout.js"></script>
<script type="text/javascript" src="Editor/Format/Paragraph.js"></script>
<script type="text/javascript" src="Editor/Format/FontClassification.js"></script>
<script type="text/javascript" src="Editor/Format/ParagraphContent.js"></script>
<script type="text/javascript" src="Editor/Format/Spelling.js"></script>
<script type="text/javascript" src="Editor/Format/DocumentContent.js"></script>
<script type="text/javascript" src="Editor/Styles.js"></script>
<script type="text/javascript" src="../Common/SerializeCommonWordExcel.js"></script>
<script type="text/javascript" src="Editor/GraphicObjects.js"></script>
<script type="text/javascript" src="Editor/States.js"></script>
<script type="text/javascript" src="Editor/TrackObjects/AdjustmentTracks.js"></script>
<script type="text/javascript" src="Editor/TrackObjects/MoveTracks.js"></script>
<script type="text/javascript" src="Editor/TrackObjects/NewShapeTracks.js"></script>
<script type="text/javascript" src="Editor/TrackObjects/PolyLine.js"></script>
<script type="text/javascript" src="Editor/TrackObjects/ResizeTracks.js"></script>
<script type="text/javascript" src="Editor/TrackObjects/RotateTracks.js"></script>
<script type="text/javascript" src="Editor/TrackObjects/Spline.js"></script>
<script type="text/javascript" src="Editor/Format/TextBody.js"></script>
<script type="text/javascript" src="Editor/Drawing/Geometry.js"></script>
<script type="text/javascript" src="Editor/Drawing/CreateGoemetry.js"></script>
......@@ -85,8 +113,6 @@
<script type="text/javascript" src="Editor/Drawing/GraphicFigure.js"></script>
<script type="text/javascript" src="Editor/Drawing/Clone.js"></script>
<script type="text/javascript" src="Editor/Drawing/CImage.js"></script>
<script type="text/javascript" src="Editor/Drawing/StatesAutoShapes.js"></script>
<script type="text/javascript" src="Editor/Drawing/AutoShapesContainer.js"></script>
<script type="text/javascript" src="Editor/Drawing/Spline.js"></script>
<script type="text/javascript" src="Editor/Drawing/PolyLine.js"></script>
<script type="text/javascript" src="Editor/Drawing/PolyLine2.js"></script>
......@@ -1240,6 +1266,7 @@
// на всякий случай. Наверное этого не надо, сообщение пошлется в конце
editor.Resize();
ResizeStatus();
g_oToolBox.Init();
</script>
</div>
......@@ -1890,6 +1917,18 @@
</div>
</div>
<div id="prUsersDrag" style="display:none;width:200px;background-color:#fff;top:215px;right:50px;z-index:100;position:absolute;border: 4px ridge silver;cursor:move;">
<div style="float:left;width:180px;text-align: center;cursor:move;">
<b>Users</b>
</div>
<div style="float:left;cursor:default;width:20px;height:20px;" onmousemove="this.style.backgroundColor = 'RGB(249, 201, 16)';" onmouseout="this.style.backgroundColor = 'RGB(255, 255, 255)' " onmousedown="if ( c_oAscCollaborativeMarksShowType.LastChanges === editor.CollaborativeMarksShowType ) {CollaborativeEditing.Clear_CollaborativeMarks();} CollaborativeEditing.Apply_Changes(); setTimeout(function() {CollaborativeEditing.Send_Changes();}, 100);">
<img style="margin: 2px 3px" src="menu/img/savechanges.png" title="Save Changes" />
</div>
</div>
<div id="prUsers" style="display:none;width:200px;background-color:#fff;top:240px;right:50px;z-index:100;position:absolute;padding-top: 5px;border: 4px ridge silver;cursor:move;">
<div style="float:left;width:200px;text-align: center;cursor:move;" id="usersView">
</div>
</div>
<div id="shapeProp" style="display:none;width:400px;background-color:#fff;top:87px;right:25px;z-index:100;position:absolute;padding-top: 5px;border: 4px ridge silver;">
......@@ -2278,7 +2317,19 @@
</div>
</div>
<script>
Drag.init( document.getElementById("prUsersDrag"), null, null, null, null, null, true );
document.getElementById("prUsersDrag").onDrag = function(X, Y)
{
var sTop = Y + 25 + "px", sRight = X + "px";
document.getElementById("prUsers").style.top = sTop;
document.getElementById("prUsers").style.right = sRight;
};
</script>
</body>
</html>
\ No newline at end of file
This diff is collapsed.
......@@ -4,11 +4,46 @@
FitPage :2
};
var c_oAscCollaborativeMarksShowType = {
All : 0,
LastChanges : 1
};
var c_oAscAsyncActionType = {
Information : 0,
BlockInteraction : 1
};
var c_oAscHAnchor = {
Margin : 0x00,
Page : 0x01,
Text : 0x02,
PageInternal : 0xFF // только для внутреннего использования
};
var c_oAscXAlign = {
Center : 0x00,
Inside : 0x01,
Left : 0x02,
Outside : 0x03,
Right : 0x04
};
var c_oAscYAlign = {
Bottom : 0x00,
Center : 0x01,
Inline : 0x02,
Inside : 0x03,
Outside : 0x04,
Top : 0x05
};
var c_oAscVAnchor = {
Margin : 0x00,
Page : 0x01,
Text : 0x02
};
var c_oAscAsyncAction = {
Open : 0, // открытие документа
Save : 1,
......@@ -276,5 +311,11 @@ var c_oAscSlideTransitionParams = {
Zoom_AndRotate : 2
};
var c_oAscLockTypeElemPresentation = {
Object : 1,
Slide : 2,
Presentation: 3
};
var TABLE_STYLE_WIDTH_PIX = 70;
var TABLE_STYLE_HEIGHT_PIX = 50;
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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