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,23 +2074,29 @@ CPresentation.prototype = ...@@ -2074,23 +2074,29 @@ 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) {
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);
this.Paragraph_Add(new ParaNewLine(break_Line)); 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) {
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);
this.Paragraph_Add(new ParaNewLine(break_Page)); this.Paragraph_Add(new ParaNewLine(break_Page));
} }
} }
}
else else
{ {
if(this.Slides[this.CurPage] && this.Slides[this.CurPage].graphicObjects && this.Slides[this.CurPage].graphicObjects.selectedObjects.length !== 0) {
this.Add_NewParagraph(); this.Add_NewParagraph();
} }
} }
}
bRetValue = keydownresult_PreventAll; bRetValue = keydownresult_PreventAll;
} }
...@@ -2212,10 +2218,12 @@ CPresentation.prototype = ...@@ -2212,10 +2218,12 @@ 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) {
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); History.Create_NewPoint(AscDFH.historydescription_Presentation_ParagraphAdd);
this.Paragraph_Add(new ParaText(String.fromCharCode(0x00A0))); this.Paragraph_Add(new ParaText(String.fromCharCode(0x00A0)));
} }
} }
}
else if ( true === e.CtrlKey ) else if ( true === e.CtrlKey )
{ {
this.Paragraph_ClearFormatting(); this.Paragraph_ClearFormatting();
...@@ -2226,10 +2234,12 @@ CPresentation.prototype = ...@@ -2226,10 +2234,12 @@ 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) {
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); History.Create_NewPoint(AscDFH.historydescription_Presentation_ParagraphAdd);
this.Paragraph_Add(new ParaSpace(1)); this.Paragraph_Add(new ParaSpace(1));
} }
} }
}
bRetValue = keydownresult_PreventAll; bRetValue = keydownresult_PreventAll;
} }
...@@ -2756,27 +2766,22 @@ CPresentation.prototype = ...@@ -2756,27 +2766,22 @@ CPresentation.prototype =
} }
} }
else if ( e.KeyCode == 189 && false === editor.isViewMode ) // Клавиша Num- else if ( e.KeyCode == 189 && false === editor.isViewMode ) // Клавиша Num-
{
if ((true === e.CtrlKey && true === e.ShiftKey) && (AscCommon.CollaborativeEditing.Is_Fast() ||
editor.WordControl.m_oLogicDocument.Document_Is_SelectionLocked(changestype_Drawing_Props) === false))
{ {
this.DrawingDocument.TargetStart(); this.DrawingDocument.TargetStart();
this.DrawingDocument.TargetShow(); 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 = new ParaText( String.fromCharCode( 0x2013 ) );
Item.SpaceAfter = false; 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 + .
{ {
var TextPr = this.Get_Paragraph_TextPr(); var TextPr = this.Get_Paragraph_TextPr();
......
...@@ -15511,15 +15511,33 @@ CDocument.prototype.private_MoveCursorDown = function(StartX, StartY, AddToSelec ...@@ -15511,15 +15511,33 @@ CDocument.prototype.private_MoveCursorDown = function(StartX, StartY, AddToSelec
if (this.CurPage < NewPage) if (this.CurPage < NewPage)
{ {
this.CurPage = NewPage; 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; StartY += 0.1;
} }
this.CurPage = NewPage;
}
else else
{ {
break; break;
} }
} }
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)
{ {
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); 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