Commit d5947268 authored by Oleg Korshul's avatar Oleg Korshul

Merge pull request #13 from ONLYOFFICE/release/3.8.0

Release/3.8.0
parents 0bef7a97 39d3528b
...@@ -367,8 +367,8 @@ function PolarAdjustmentTrack(originalShape, adjIndex, bTextWarp) ...@@ -367,8 +367,8 @@ function PolarAdjustmentTrack(originalShape, adjIndex, bTextWarp)
var _pos_x_relative_center = _relative_x - this.shapeHeight*0.5; var _pos_x_relative_center = _relative_x - this.shapeWidth*0.5;
var _pos_y_relative_center = _relative_y - this.shapeWidth*0.5; var _pos_y_relative_center = _relative_y - this.shapeHeight*0.5;
if(this.radiusFlag) if(this.radiusFlag)
{ {
var _radius = Math.sqrt(_pos_x_relative_center*_pos_x_relative_center + _pos_y_relative_center*_pos_y_relative_center); var _radius = Math.sqrt(_pos_x_relative_center*_pos_x_relative_center + _pos_y_relative_center*_pos_y_relative_center);
......
...@@ -1515,7 +1515,7 @@ CPresentation.prototype = ...@@ -1515,7 +1515,7 @@ CPresentation.prototype =
if ( "undefined" === typeof(bRemoveOnlySelection) ) if ( "undefined" === typeof(bRemoveOnlySelection) )
bRemoveOnlySelection = false; bRemoveOnlySelection = false;
if(this.Slides[this.CurPage]) if(this.Slides[this.CurPage] && this.Slides[this.CurPage].graphicObjects && this.Slides[this.CurPage].graphicObjects.selectedObjects.length !== 0)
{ {
this.Slides[this.CurPage].graphicObjects.remove(Count, bOnlyText, bRemoveOnlySelection, AscCommon.CollaborativeEditing.Is_Fast()); this.Slides[this.CurPage].graphicObjects.remove(Count, bOnlyText, bRemoveOnlySelection, AscCommon.CollaborativeEditing.Is_Fast());
this.Document_UpdateInterfaceState(); this.Document_UpdateInterfaceState();
...@@ -2074,21 +2074,27 @@ CPresentation.prototype = ...@@ -2074,21 +2074,27 @@ CPresentation.prototype =
{ {
if ( e.ShiftKey ) if ( e.ShiftKey )
{ {
if(AscCommon.CollaborativeEditing.Is_Fast() || editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props) === false) { if(this.Slides[this.CurPage] && this.Slides[this.CurPage].graphicObjects && this.Slides[this.CurPage].graphicObjects.selectedObjects.length !== 0) {
History.Create_NewPoint(AscDFH.historydescription_Presentation_ParagraphAdd); if (AscCommon.CollaborativeEditing.Is_Fast() || editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props) === false) {
this.Paragraph_Add(new ParaNewLine(break_Line)); History.Create_NewPoint(AscDFH.historydescription_Presentation_ParagraphAdd);
this.Paragraph_Add(new ParaNewLine(break_Line));
}
} }
} }
else if ( e.CtrlKey ) else if ( e.CtrlKey )
{ {
if(AscCommon.CollaborativeEditing.Is_Fast() || editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props) === false) { if(this.Slides[this.CurPage] && this.Slides[this.CurPage].graphicObjects && this.Slides[this.CurPage].graphicObjects.selectedObjects.length !== 0) {
History.Create_NewPoint(AscDFH.historydescription_Presentation_ParagraphAdd); if (AscCommon.CollaborativeEditing.Is_Fast() || editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props) === false) {
this.Paragraph_Add(new ParaNewLine(break_Page)); History.Create_NewPoint(AscDFH.historydescription_Presentation_ParagraphAdd);
this.Paragraph_Add(new ParaNewLine(break_Page));
}
} }
} }
else else
{ {
this.Add_NewParagraph(); if(this.Slides[this.CurPage] && this.Slides[this.CurPage].graphicObjects && this.Slides[this.CurPage].graphicObjects.selectedObjects.length !== 0) {
this.Add_NewParagraph();
}
} }
} }
...@@ -2212,8 +2218,10 @@ CPresentation.prototype = ...@@ -2212,8 +2218,10 @@ CPresentation.prototype =
if(AscCommon.CollaborativeEditing.Is_Fast() || editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props) === false) { if(AscCommon.CollaborativeEditing.Is_Fast() || editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props) === false) {
History.Create_NewPoint(AscDFH.historydescription_Presentation_ParagraphAdd); if(this.Slides[this.CurPage] && this.Slides[this.CurPage].graphicObjects && this.Slides[this.CurPage].graphicObjects.selectedObjects.length !== 0){
this.Paragraph_Add(new ParaText(String.fromCharCode(0x00A0))); History.Create_NewPoint(AscDFH.historydescription_Presentation_ParagraphAdd);
this.Paragraph_Add(new ParaText(String.fromCharCode(0x00A0)));
}
} }
} }
else if ( true === e.CtrlKey ) else if ( true === e.CtrlKey )
...@@ -2226,8 +2234,10 @@ CPresentation.prototype = ...@@ -2226,8 +2234,10 @@ CPresentation.prototype =
// this.DrawingDocument.TargetShow(); // this.DrawingDocument.TargetShow();
if(AscCommon.CollaborativeEditing.Is_Fast() || editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props) === false) { if(AscCommon.CollaborativeEditing.Is_Fast() || editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props) === false) {
History.Create_NewPoint(AscDFH.historydescription_Presentation_ParagraphAdd); if(this.Slides[this.CurPage] && this.Slides[this.CurPage].graphicObjects && this.Slides[this.CurPage].graphicObjects.selectedObjects.length !== 0) {
this.Paragraph_Add(new ParaSpace(1)); History.Create_NewPoint(AscDFH.historydescription_Presentation_ParagraphAdd);
this.Paragraph_Add(new ParaSpace(1));
}
} }
} }
...@@ -2757,25 +2767,20 @@ CPresentation.prototype = ...@@ -2757,25 +2767,20 @@ CPresentation.prototype =
} }
else if ( e.KeyCode == 189 && false === editor.isViewMode ) // Клавиша Num- else if ( e.KeyCode == 189 && false === editor.isViewMode ) // Клавиша Num-
{ {
this.DrawingDocument.TargetStart(); if ((true === e.CtrlKey && true === e.ShiftKey) && (AscCommon.CollaborativeEditing.Is_Fast() ||
this.DrawingDocument.TargetShow(); editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props) === false))
{
this.DrawingDocument.TargetStart();
this.DrawingDocument.TargetShow();
if(AscCommon.CollaborativeEditing.Is_Fast() || editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props) === false) {
History.Create_NewPoint(AscDFH.historydescription_Presentation_ParagraphAdd); History.Create_NewPoint(AscDFH.historydescription_Presentation_ParagraphAdd);
var Item = null;
if ( true === e.CtrlKey && true === e.ShiftKey ) var Item = new ParaText( String.fromCharCode( 0x2013 ) );
{ Item.SpaceAfter = false;
Item = new ParaText( String.fromCharCode( 0x2013 ) );
Item.SpaceAfter = false;
}
else if ( true === e.ShiftKey )
Item = new ParaText( "_" );
else
Item = new ParaText( "-" );
this.Paragraph_Add( Item ); this.Paragraph_Add( Item );
bRetValue = keydownresult_PreventAll;
} }
bRetValue = keydownresult_PreventAll;
} }
else if ( e.KeyCode == 190 && true === e.CtrlKey ) // Ctrl + . else if ( e.KeyCode == 190 && true === e.CtrlKey ) // Ctrl + .
{ {
......
...@@ -15511,8 +15511,23 @@ CDocument.prototype.private_MoveCursorDown = function(StartX, StartY, AddToSelec ...@@ -15511,8 +15511,23 @@ CDocument.prototype.private_MoveCursorDown = function(StartX, StartY, AddToSelec
if (this.CurPage < NewPage) if (this.CurPage < NewPage)
{ {
this.CurPage = NewPage;
StartY += 0.1; StartY += 0.1;
if (StartY > this.Pages[NewPage].Height)
{
NewPage++;
if (this.Pages.length - 1 < NewPage)
{
Result = false;
break;
}
StartY = 0;
}
else
{
StartY += 0.1;
}
this.CurPage = NewPage;
} }
else else
{ {
...@@ -15520,6 +15535,9 @@ CDocument.prototype.private_MoveCursorDown = function(StartX, StartY, AddToSelec ...@@ -15520,6 +15535,9 @@ CDocument.prototype.private_MoveCursorDown = function(StartX, StartY, AddToSelec
} }
} }
if (false === Result)
break;
CurY = StartY; CurY = StartY;
} }
} }
......
...@@ -1755,7 +1755,15 @@ CMathContent.prototype.SplitContent = function(NewContent, ContentPos, Depth) ...@@ -1755,7 +1755,15 @@ CMathContent.prototype.SplitContent = function(NewContent, ContentPos, Depth)
}; };
CMathContent.prototype.Add_ToContent = function(Pos, Item) CMathContent.prototype.Add_ToContent = function(Pos, Item)
{ {
this.Internal_Content_Add(Pos, Item); if (Item && para_Run === Item.Type)
{
var MathRun = new ParaRun(Item.Get_Paragraph(), true);
this.Internal_Content_Add(Pos, MathRun);
}
else
{
this.Internal_Content_Add(Pos, Item);
}
}; };
CMathContent.prototype.Concat_ToEnd = function(NewItems) CMathContent.prototype.Concat_ToEnd = function(NewItems)
{ {
......
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