Commit 96048106 authored by Anna.Pavlova's avatar Anna.Pavlova Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@47187 954022d7-b5bf-4e40-9824-e11837661b57
parent 077a5c09
......@@ -1387,7 +1387,9 @@ CDocument.prototype =
var Count = this.Content.length;
for ( var Index = this.Pages[nPageIndex].Pos; Index < Count; Index++ )
var Page_StartPos = this.Pages[nPageIndex].Pos;
var Page_EndPos = this.Pages[nPageIndex].EndPos;
for ( var Index = Page_StartPos; Index <= Page_EndPos; Index++ )
{
if ( -1 == this.Content[Index].Draw(nPageIndex, pGraphics) )
break;
......@@ -3681,7 +3683,7 @@ CDocument.prototype =
break;
}
}
else if ( type_Paragraph === this.Content[Index].GetType() && undefined === NumPr )
else if ( (type_Paragraph === this.Content[Index].GetType() && undefined === NumPr) || type_Table === this.Content[Index].GetType() )
{
bDiffLvl = true;
break;
......@@ -3879,7 +3881,7 @@ CDocument.prototype =
break;
}
}
else if ( type_Paragraph === this.Content[Index].GetType() && undefined === NumPr )
else if ( ( type_Paragraph === this.Content[Index].GetType() && undefined === NumPr ) || type_Table === this.Content[Index].GetType() )
{
bDiffLvl = true;
break;
......@@ -5310,21 +5312,10 @@ CDocument.prototype =
if ( docpostype_HdrFtr === this.CurPos.Type )
{
this.HdrFtr.Set_TableProps(Props);
this.Document_UpdateInterfaceState();
this.Document_UpdateRulersState();
this.Document_UpdateSelectionState();
return;
}
else if ( docpostype_DrawingObjects === this.CurPos.Type )
{
this.DrawingObjects.setTableProps(Props);
this.Document_UpdateInterfaceState();
this.Document_UpdateRulersState();
this.Document_UpdateSelectionState();
return;
}
else //if ( docpostype_Content === this.CurPos.Type )
{
......@@ -5339,11 +5330,13 @@ CDocument.prototype =
var Table = this.Content[Pos];
Table.Set_Props(Props);
}
this.Document_UpdateInterfaceState();
this.Document_UpdateRulersState();
this.Document_UpdateSelectionState();
}
this.Recalculate();
this.Document_UpdateInterfaceState();
this.Document_UpdateRulersState();
this.Document_UpdateSelectionState();
},
Get_Paragraph_ParaPr : function()
......@@ -5761,12 +5754,17 @@ CDocument.prototype =
// Обновляем данные в интерфейсе о свойствах графики (картинки, автофигуры)
Interface_Update_DrawingPr : function(Flag)
{
var DrawingPr = this.DrawingObjects.getProps();
if(!(this.DrawingObjects.curState.id === STATES_ID_TEXT_ADD || this.DrawingObjects.curState.id === STATES_ID_TEXT_ADD_IN_GROUP))
{
var DrawingPr = this.DrawingObjects.getProps();
if ( true === Flag )
return DrawingPr;
else
editor.sync_ImgPropCallback( DrawingPr );
if ( true === Flag )
return DrawingPr;
else
editor.sync_ImgPropCallback( DrawingPr );
}
if(Flag)
return null;
},
// Обновляем данные в интерфейсе о свойствах таблицы
......@@ -6747,7 +6745,7 @@ CDocument.prototype =
{
return this.HdrFtr.Is_TableBorder( X, Y, PageIndex );
}
else if ( -1 != this.DrawingObjects.isPointInDrawingObjects( X,Y, this.CurPage, this ) )
else if ( -1 != this.DrawingObjects.isPointInDrawingObjects( X,Y, PageIndex, this ) )
{
return null;
}
......@@ -6895,7 +6893,15 @@ CDocument.prototype =
}
else if ( e.KeyCode == 27 ) // Esc
{
if ( docpostype_HdrFtr == this.CurPos.Type )
// 1. Если у нас выделена автофигура (в колонтитуле или документе), тогда снимаем выделение с нее
// 2. Если мы просто находимся в колонтитуле (автофигура не выделена) выходим из колонтитула
if ( docpostype_DrawingObjects === this.CurPos.Type || (docpostype_HdrFtr === this.CurPos.Type && null != this.HdrFtr.CurHdrFtr && docpostype_DrawingObjects === this.HdrFtr.CurHdrFtr.Content.CurPos.Type ) )
{
this.DrawingObjects.resetSelection2();
this.Document_UpdateInterfaceState();
this.Document_UpdateSelectionState();
}
else if ( docpostype_HdrFtr == this.CurPos.Type )
{
this.Document_End_HdrFtrEditing();
}
......@@ -7320,7 +7326,7 @@ CDocument.prototype =
}
else if ( e.KeyCode == 75 && false === editor.isViewMode && true === e.CtrlKey ) // Ctrl + K - добавление гиперссылки
{
if ( true === this.Hyperlink_CanAdd() )
if ( true === this.Hyperlink_CanAdd(false) )
editor.sync_DialogAddHyperlink();
bRetValue = true;
......@@ -7691,7 +7697,8 @@ CDocument.prototype =
// TODO : Если в MouseEvent будет использоваться что-то кроме ClickCount, Type и CtrlKey, добавить здесь
ClickCount : 1,
Type : g_mouse_event_type_down,
CtrlKey : false
CtrlKey : false,
Button : g_mouse_button_right
};
this.Selection_SetStart( X, Y, MouseEvent_new );
......@@ -7955,7 +7962,7 @@ CDocument.prototype =
if ( true != bAnchor )
{
// Проверяем попадание в графические объекты
var NearestPos = this.DrawingObjects.getNearestPos( X, Y, PageNum );
var NearestPos = this.DrawingObjects.getNearestPos( X, Y, PageNum, Drawing);
if ( ( nInDrawing === DRAWING_ARRAY_TYPE_BEFORE || nInDrawing === DRAWING_ARRAY_TYPE_INLINE || ( false === bInText && nInDrawing >= 0 ) ) && null != NearestPos )
return NearestPos;
}
......@@ -8541,7 +8548,7 @@ CDocument.prototype =
}
else if ( docpostype_DrawingObjects == this.CurPos.Type )
{
this.HdrFtr.tableRemoveRow();
this.DrawingObjects.tableRemoveRow();
}
else if ( docpostype_Content == this.CurPos.Type && ( ( true === this.Selection.Use && this.Selection.StartPos == this.Selection.EndPos && type_Table == this.Content[this.Selection.StartPos].GetType() ) || ( false == this.Selection.Use && type_Table == this.Content[this.CurPos.ContentPos].GetType() ) ) )
{
......@@ -9009,7 +9016,7 @@ CDocument.prototype =
Document_UpdateCanAddHyperlinkState : function()
{
// Проверяем можно ли добавить гиперссылку
editor.sync_CanAddHyperlinkCallback( this.Hyperlink_CanAdd() );
editor.sync_CanAddHyperlinkCallback( this.Hyperlink_CanAdd(false) );
},
//-----------------------------------------------------------------------------------
// Функции для работы с номерами страниц
......@@ -9554,13 +9561,13 @@ CDocument.prototype =
this.Document_UpdateInterfaceState();
},
Hyperlink_CanAdd : function()
Hyperlink_CanAdd : function(bCheckInHyperlink)
{
// Проверим можно ли добавлять гиперссылку
if ( docpostype_HdrFtr === this.CurPos.Type )
return this.HdrFtr.Hyperlink_CanAdd();
return this.HdrFtr.Hyperlink_CanAdd(bCheckInHyperlink);
else if ( docpostype_DrawingObjects === this.CurPos.Type )
return this.DrawingObjects.hyperlinkCanAdd();
return this.DrawingObjects.hyperlinkCanAdd(bCheckInHyperlink);
else //if ( docpostype_Content === this.CurPos.Type )
{
if ( true === this.Selection.Use )
......@@ -9573,12 +9580,12 @@ CDocument.prototype =
if ( this.Selection.StartPos != this.Selection.EndPos )
return false;
return this.Content[this.Selection.StartPos].Hyperlink_CanAdd();
return this.Content[this.Selection.StartPos].Hyperlink_CanAdd(bCheckInHyperlink);
}
}
}
else
return this.Content[this.CurPos.ContentPos].Hyperlink_CanAdd();
return this.Content[this.CurPos.ContentPos].Hyperlink_CanAdd(bCheckInHyperlink);
}
return false;
......
......@@ -1341,6 +1341,7 @@ CMathContent.prototype =
{
component = new CMathText();
component.init(this.params);
component.relate(this);
component.addCode(StartTextElement);
result = this;
}
......@@ -1348,12 +1349,14 @@ CMathContent.prototype =
{
component = new CMathText();
component.init(this.params);
component.relate(this);
result = this;
}
else
{
component = this.getMathComponent(type);
component.init(this.params);
component.relate(this);
result = component;
}
......@@ -1609,11 +1612,6 @@ CMathComposition.prototype =
this.ClearSelect();
this.CurrentContent = this.SelectContent = this.Root.mouseDown({x: mouseX, y: mouseY}, -1);
if(typeof(this.CurrentContent) == "undefined")
{
var stop = true;
}
this.СheckTarget();
},
MouseMove: function(mouseX, mouseY)
......
......@@ -19,63 +19,65 @@
<script type="text/javascript" src="menu/js/jquery.clickmenu.js"></script>
<script type="text/javascript" src="menu/js/jquery-ui-1.8.13.custom.min.js"></script>
<script type="text/javascript" src="menu/js/ui.spinner.min.js"></script>
<script src="../../Common/downloaderfiles.js"></script>
<script src="../../Common/docscoapicommon.js"></script>
<script type="text/javascript" src="../../Common/3rdparty/Underscore/underscore-min.js"></script>
<script type="text/javascript" src="../../Common/3rdparty/Sockjs/sockjs-0.3.min.js"></script>
<script type="text/javascript" src="../../Common/docscoapi.js"></script>
<script type="text/javascript" src="../../Common/wordcopypaste.js"></script>
<script type="text/javascript" src="../../Common/CommonDefines.js"></script>
<script type="text/javascript" src="../../Common/NumFormat.js"></script>
<script src="../Common/downloaderfiles.js"></script>
<script src="../Common/docscoapicommon.js"></script>
<script type="text/javascript" src="../Common/3rdparty/Underscore/underscore-min.js"></script>
<script type="text/javascript" src="../Common/3rdparty/Sockjs/sockjs-0.3.min.js"></script>
<script type="text/javascript" src="../Common/docscoapi.js"></script>
<script type="text/javascript" src="../Common/wordcopypaste.js"></script>
<script type="text/javascript" src="../Common/CommonDefines.js"></script>
<script type="text/javascript" src="../Common/NumFormat.js"></script>
<script type="text/javascript" src="../Common/editorscommon.js"></script>
<!-- For chart editor -->
<script type="text/javascript" src="../../Excel/apiDefines.js"></script>
<script type="text/javascript" src="../../Common/Charts/DrawingObjects.js"></script>
<script type="text/javascript" src="../../Common/Charts/charts.js"></script>
<script type="text/javascript" src="../../Common/SerializeCommonWordExcel.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.common.core.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.common.annotate.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.common.context.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.common.effects.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.common.key.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.common.resizing.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.common.tooltips.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.common.zoom.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.bar.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.bipolar.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.gantt.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.hbar.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.line.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.pie.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.radar.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.rose.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.rscatter.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.scatter.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.waterfall.js"></script>
<script src="../../Common/Charts/libraries/OfficeExcel.chartProperties.js"></script>
<script src="../../Common/Charts/libraries/hsv.js"></script>
<script src="../../Common/Charts/libraries/rgbcolor.js"></script>
<script type="text/javascript" src="../Excel/apiDefines.js"></script>
<script type="text/javascript" src="../Common/Charts/DrawingObjects.js"></script>
<script type="text/javascript" src="../Common/Charts/charts.js"></script>
<script type="text/javascript" src="../Common/SerializeCommonWordExcel.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.common.core.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.common.annotate.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.common.context.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.common.effects.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.common.key.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.common.resizing.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.common.tooltips.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.common.zoom.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.bar.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.bipolar.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.gantt.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.hbar.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.line.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.pie.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.radar.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.rose.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.rscatter.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.scatter.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.waterfall.js"></script>
<script src="../Common/Charts/libraries/OfficeExcel.chartProperties.js"></script>
<script src="../Common/Charts/libraries/hsv.js"></script>
<script src="../Common/Charts/libraries/rgbcolor.js"></script>
<script type="text/javascript" src="menu/main_menu.js"></script>
<script type="text/javascript" src="menu/Statusbar.js"></script>
<script src="../FontsFreeType/font_engine.js"></script>
<!--
<script src="../FontEngine/FreeType/config.js"></script>
<script src="../FontEngine/FreeType/services.js"></script>
<script src="../FontEngine/FreeType/base.js"></script>
<script src="../FontEngine/FreeType/modules/psnames.js"></script>
<script src="../FontEngine/FreeType/modules/psaux.js"></script>
<script src="../FontEngine/FreeType/modules/sfnt.js"></script>
<script src="../FontEngine/FreeType/modules/render.js"></script>
<script src="../FontEngine/FreeType/drivers/ttinterp.js"></script>
<script src="../FontEngine/FreeType/drivers/truetype.js"></script>
<script src="../FontEngine/FreeType/drivers/cff.js"></script>
<script src="../FontEngine/FreeType/drivers/t1.js"></script>
<script src="../FontEngine/FreeType/freetype.js"></script>
<script src="../Common/FontsFreeType/font_engine.js"></script>
<!--
<script src="../Fonts/Engine/FreeType/config.js"></script>
<script src="../Fonts/Engine/FreeType/services.js"></script>
<script src="../Fonts/Engine/FreeType/base.js"></script>
<script src="../Fonts/Engine/FreeType/modules/psnames.js"></script>
<script src="../Fonts/Engine/FreeType/modules/psaux.js"></script>
<script src="../Fonts/Engine/FreeType/modules/sfnt.js"></script>
<script src="../Fonts/Engine/FreeType/modules/render.js"></script>
<script src="../Fonts/Engine/FreeType/drivers/ttinterp.js"></script>
<script src="../Fonts/Engine/FreeType/drivers/truetype.js"></script>
<script src="../Fonts/Engine/FreeType/drivers/cff.js"></script>
<script src="../Fonts/Engine/FreeType/drivers/t1.js"></script>
<script src="../Fonts/Engine/FreeType/freetype.js"></script>
-->
<script src="../FontsFreeType/FontFile.js"></script>
<script src="../FontsFreeType/FontManager.js"></script>
<script src="../Common/FontsFreeType/FontFile.js"></script>
<script src="../Common/FontsFreeType/FontManager.js"></script>
<script src="Drawing/Externals.js"></script>
<script src="Drawing/AllFonts.js"></script>
<!--<script src="Drawing/GlobalLoaders.js"></script>-->
......@@ -85,6 +87,7 @@
<!--<script type="text/javascript" src="Math/docfiles/main_menu.js"></script>-->
<script type="text/javascript" src="Math/docfiles/Document.js"></script>
<script type="text/javascript" src="Math/drawingBracket.js"></script>
<script type="text/javascript" src="Math/docfiles/DrawingDocument.js"></script>
<!---->
<script type="text/javascript" src="Drawing/translations.js"></script>
......@@ -126,6 +129,8 @@
<script type="text/javascript" src="Editor/DocumentContent.js"></script>
<script type="text/javascript" src="Editor/Table.js"></script>
<script type="text/javascript" src="Editor/Serialize2.js"></script>
<script type="text/javascript" src="Editor/Search.js"></script>
<script type="text/javascript" src="Editor/FontClassification.js"></script>
<script type="text/javascript" src="Drawing/Graphics.js"></script>
<script type="text/javascript" src="Drawing/ArcTo.js"></script>
......@@ -147,12 +152,13 @@
<script type="text/javascript" src="api.js"></script>
<script type="text/javascript" src="Drawing/scrolls/scroll.js"></script>
<script type="text/javascript" src="../../Common/Shapes/EditorSettings.js"></script>
<script type="text/javascript" src="../../Common/Shapes/Serialize.js"></script>
<script type="text/javascript" src="../../Common/Shapes/SerializeWriter.js"></script>
<script type="text/javascript" src="../../Common/SerializeCommonWordExcel.js"></script>
<script type="text/javascript" src="../Common/Shapes/EditorSettings.js"></script>
<script type="text/javascript" src="../Common/Shapes/Serialize.js"></script>
<script type="text/javascript" src="../Common/Shapes/SerializeWriter.js"></script>
<script type="text/javascript" src="../Common/SerializeCommonWordExcel.js"></script>
<script type="text/javascript" src="Editor/SerializeCommon.js"></script>
<!---->
<script type = "text/javascript" src ="Math/print.js"></script>
......@@ -1330,7 +1336,7 @@
var editor = new asc_docs_api("editor_sdk");
editor.CreateComponents();
editor.SetFontsPath("../FontsFreeType/FontFiles/");
editor.SetFontsPath("../Fonts/");
editor.Init();
//editor.LoadDocument();
......@@ -3105,6 +3111,30 @@
<div id="comments" style="display:none;max-height:600px;width:430px;background-color:#fff;top:122px;right:25px;z-index:100;position:absolute;padding-top: 5px;border: 4px ridge silver;overflow-y:scroll;">
</div>
<div id="searchDrag" style="display:none;width:430px;background-color:#fff;top:90px;right:25px;z-index:100;position:absolute;padding-top: 5px;border: 4px ridge silver; cursor:move;">
<div id="searchCaption" style="float:left;width:430px;text-align: center;">
<b>Search</b>
</div>
</div>
<div id="search" style="display:none;width:430px;background-color:#fff;top:119px;right:25px;z-index:100;position:absolute;padding-top: 5px;border: 4px ridge silver;">
<div style="float:left;width:430px;">
<input id="searchString" style="margin-left:10px;float:left;width:300px;"/>
<input id="searchStringButton" style="flaot:left;" type="button" value="Find"/>
</div>
<div style="float:left;width:430px;border-bottom: 2px ridge silver;">
<input id="searchMatchCase" style="flaot:left;" type="checkbox" value="false"/> Match case
</div>
<div style="float:left;width:430px;border-bottom: 4px ridge silver;">
<input id="replaceString" style="margin-left:10px;float:left;width:260px;"/>
<input id="replaceStringButton" style="flaot:left;" type="button" value="Replace"/>
<input id="replaceAllStringButton" style="flaot:left;" type="button" value="ReplaceAll"/>
</div>
<div style="float:left;width:430px; max-height:600px; overflow-y:scroll;">
<div id="searchResults" style="float:left;width:400px;">
</div>
</div>
</div>
<script>
Drag.init( document.getElementById("commentsDrag"), null, null, null, null, null, true );
document.getElementById("commentsDrag").onDrag = function(X, Y)
......@@ -3130,6 +3160,14 @@
document.getElementById("prChat").style.right = sRight;
};
Drag.init( document.getElementById("searchDrag"), null, null, null, null, null, true );
document.getElementById("searchDrag").onDrag = function(X, Y)
{
var sTop = Y + 29 + "px", sRight = X + "px";
document.getElementById("search").style.top = sTop;
document.getElementById("search").style.right = sRight;
};
</script>
......
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