Commit 18ff92f2 authored by alexey.musinov's avatar alexey.musinov

Merge branch 'develop' of https://github.com/ONLYOFFICE/sdkjs into develop

parents 6d22a5ba 6123d3a5
......@@ -553,7 +553,13 @@
if(filterObj.filter.TableStyleInfo !== undefined)
autoFilter = filterObj.filter.AutoFilter;
if(!autoFilter)
{
autoFilter = new AscCommonExcel.AutoFilter();
autoFilter.Ref = currentFilter.Ref.clone();
filterObj.filter.AutoFilter = autoFilter;
}
var newFilterColumn;
if(filterObj.index !== null)
{
......
......@@ -11611,6 +11611,7 @@ function CreateAscStroke(ln, _canChangeArrows)
break;
}
}
}
......@@ -11650,7 +11651,12 @@ function CreateAscStroke(ln, _canChangeArrows)
{
ret.asc_putLineendstyle(LineEndType.None);
}
if(AscFormat.isRealNumber(ln.prstDash)){
ret.prstDash = ln.prstDash;
}
else{
ret.prstDash = Asc.c_oDashType.solid;
}
if (true === _canChangeArrows)
ret.canChangeArrows = true;
......@@ -11739,7 +11745,12 @@ function CorrectUniStroke(asc_stroke, unistroke, flag)
ret.tailEnd.w = 2 - ((_end_size/3) >> 0);
ret.tailEnd.len = 2 - (_end_size % 3);
}
if(AscFormat.isRealNumber(asc_stroke.prstDash)){
ret.prstDash = asc_stroke.prstDash;
}
else{
ret.prstDash = Asc.c_oDashType.solid;
}
return ret;
}
......
......@@ -867,7 +867,7 @@
// Offline mode
baseEditorsApi.prototype.asc_isOffline = function()
{
return false;
return (window.location.protocol.indexOf("file") == 0) ? true : false;
};
baseEditorsApi.prototype.asc_getUrlType = function(url)
{
......
......@@ -2022,6 +2022,7 @@
this.type = null;
this.width = null;
this.color = null;
this.prstDash = null;
this.LineJoin = null;
this.LineCap = null;
......@@ -2057,7 +2058,10 @@
asc_getLineendsize: function(){return this.LineEndSize;},
asc_putLineendsize: function(v){this.LineEndSize = v;},
asc_getCanChangeArrows: function(){return this.canChangeArrows;}
asc_getCanChangeArrows: function(){return this.canChangeArrows;},
asc_putPrstDash: function(v){this.prstDash = v;},
asc_getPrstDash: function(){ return this.prstDash;}
};
// цвет. может быть трех типов:
......@@ -2868,6 +2872,8 @@
prot["get_lineendsize"] = prot["asc_getLineendsize"] = prot.asc_getLineendsize;
prot["put_lineendsize"] = prot["asc_putLineendsize"] = prot.asc_putLineendsize;
prot["get_canChangeArrows"] = prot["asc_getCanChangeArrows"] = prot.asc_getCanChangeArrows;
prot["put_prstDash"] = prot["asc_putPrstDash"] = prot.asc_putPrstDash;
prot["get_prstDash"] = prot["asc_getPrstDash"] = prot.asc_getPrstDash;
window["AscCommon"].CAscColorScheme = CAscColorScheme;
prot = CAscColorScheme.prototype;
......
......@@ -812,6 +812,20 @@ var c_oAscPrintDefaultSettings = {
CustomMode : 3
};
var c_oDashType = {
dash: 0,
dashDot: 1,
dot: 2,
lgDash: 3,
lgDashDot: 4,
lgDashDotDot: 5,
solid: 6,
sysDash: 7,
sysDashDot: 8,
sysDashDotDot: 9,
sysDot: 10
};
var c_oAscEncodings = [
[ 0, 28596, "ISO-8859-6", "Arabic (ISO 8859-6)" ],
[ 1, 720, "DOS-720", "Arabic (OEM 720)" ],
......@@ -1399,7 +1413,21 @@ window['Asc']['c_oAscMaxCellOrCommentLength'] = window['Asc'].c_oAscMaxCellOrCom
prot['DeleteRows'] = prot.DeleteRows;
prot['DeleteTable'] = prot.DeleteTable;
window['AscCommon'] = window['AscCommon'] || {};
window['Asc']['c_oDashType'] = window['Asc'].c_oDashType = c_oDashType;
prot = c_oDashType;
prot['dash'] = prot.dash;
prot['dashDot'] = prot.dashDot;
prot['dot'] = prot.dot;
prot['lgDash'] = prot.lgDash;
prot['lgDashDot'] = prot.lgDashDot;
prot['lgDashDotDot'] = prot.lgDashDotDot;
prot['solid'] = prot.solid;
prot['sysDash'] = prot.sysDash;
prot['sysDashDot'] = prot.sysDashDot;
prot['sysDashDotDot'] = prot.sysDashDotDot;
prot['sysDot'] = prot.sysDot;
window['AscCommon'] = window['AscCommon'] || {};
window["AscCommon"].g_cCharDelimiter = g_cCharDelimiter;
window["AscCommon"].bDate1904 = false;
window["AscCommon"].c_oAscAdvancedOptionsAction = c_oAscAdvancedOptionsAction;
......
......@@ -580,6 +580,33 @@ CFootnotesController.prototype.private_GetFootnotesOnPage = function(PageAbs, St
oFootnotes[oFootnote.Get_Id()] = oFootnote;
}
};
CFootnotesController.prototype.private_OnNotValidActionForFootnotes = function()
{
// Пока ничего не делаем, если надо будет выдавать сообщение, то обработать нужно будет здесь.
};
CFootnotesController.prototype.private_IsOnFootnoteSelected = function()
{
var nCounter = 0;
for (var sId in this.Selection.Footnotes)
{
nCounter++;
if (nCounter > 1)
return false;
}
return true;
};
CFootnotesController.prototype.private_CheckFootnotesSelectionBeforeAction = function()
{
if (true !== this.private_IsOnFootnoteSelected() || null === this.CurFootnote)
{
this.private_OnNotValidActionForFootnotes();
return false;
}
return true;
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Controller area
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
......@@ -603,108 +630,75 @@ CFootnotesController.prototype.GetCurPage = function()
};
CFootnotesController.prototype.AddNewParagraph = function(bRecalculate, bForceAdd)
{
var bRetValue = false;
// TODO: Доделать селект и курсор
if (true === this.Selection.Use)
{
}
else
{
if (null !== this.CurFootnote)
bRetValue = this.CurFootnote.Add_NewParagraph(bRecalculate, bForceAdd);
}
if (false === this.private_CheckFootnotesSelectionBeforeAction())
return false;
return bRetValue;
return this.CurFootnote.Add_NewParagraph(bRecalculate, bForceAdd);
};
CFootnotesController.prototype.AddInlineImage = function(nW, nH, oImage, oChart, bFlow)
{
var bRetValue = false;
// TODO: Доделать селект и курсор
if (true === this.Selection.Use)
{
}
else
{
if (null !== this.CurFootnote)
bRetValue = this.CurFootnote.Add_InlineImage(nW, nH, oImage, oChart, bFlow);
}
if (false === this.private_CheckFootnotesSelectionBeforeAction())
return false;
return bRetValue;
return this.CurFootnote.Add_InlineImage(nW, nH, oImage, oChart, bFlow);
};
CFootnotesController.prototype.AddOleObject = function(W, H, nWidthPix, nHeightPix, Img, Data, sApplicationId)
{
var bRetValue = false;
// TODO: Доделать селект и курсор
if (true === this.Selection.Use)
{
}
else
{
if (null !== this.CurFootnote)
bRetValue = this.CurFootnote.Add_OleObject(W, H, nWidthPix, nHeightPix, Img, Data, sApplicationId);
}
if (false === this.private_CheckFootnotesSelectionBeforeAction())
return false;
return bRetValue;
return this.CurFootnote.Add_OleObject(W, H, nWidthPix, nHeightPix, Img, Data, sApplicationId);
};
CFootnotesController.prototype.AddTextArt = function(nStyle)
{
var bRetValue = false;
// TODO: Доделать селект и курсор
if (true === this.Selection.Use)
{
}
else
{
if (null !== this.CurFootnote)
bRetValue = this.CurFootnote.Add_TextArt(nStyle);
}
if (false === this.private_CheckFootnotesSelectionBeforeAction())
return false;
return bRetValue;
return this.CurFootnote.Add_TextArt(nStyle);
};
CFootnotesController.prototype.EditChart = function(Chart)
{
// TODO: Реализовать
if (false === this.private_CheckFootnotesSelectionBeforeAction())
return;
this.CurFootnote.Edit_Chart(Chart);
};
CFootnotesController.prototype.AddInlineTable = function(Cols, Rows)
{
// TODO: Доделать селект и курсор
if (true === this.Selection.Use)
{
}
else
{
if (null !== this.CurFootnote)
this.CurFootnote.Add_InlineTable(Cols, Rows);
}
if (false === this.private_CheckFootnotesSelectionBeforeAction())
return;
if (null !== this.CurFootnote)
this.CurFootnote.Add_InlineTable(Cols, Rows);
};
CFootnotesController.prototype.ClearParagraphFormatting = function()
{
// TODO: Доделать селект и курсор
if (true === this.Selection.Use)
{
}
else
for (var sId in this.Selection.Footnotes)
{
if (null !== this.CurFootnote)
this.CurFootnote.Paragraph_ClearFormatting();
var oFootnote = this.Selection.Footnotes[sId];
oFootnote.Paragraph_ClearFormatting();
}
};
CFootnotesController.prototype.AddToParagraph = function(oItem, bRecalculate)
{
// TODO: Доделать селект и курсор
if (true === this.Selection.Use)
if (oItem instanceof ParaTextPr)
{
for (var sId in this.Selection.Footnotes)
{
var oFootnote = this.Selection.Footnotes[sId];
oFootnote.Paragraph_Add(oItem, false);
}
if (false !== bRecalculate)
{
this.LogicDocument.Recalculate();
}
}
else
{
if (false === this.private_CheckFootnotesSelectionBeforeAction())
return;
if (null !== this.CurFootnote)
this.CurFootnote.Paragraph_Add(oItem, bRecalculate);
}
......
......@@ -655,7 +655,8 @@
asc_docs_api.prototype.SetReaderModeOnly = function()
{
this.isOnlyReaderMode = true;
this.ImageLoader.bIsAsyncLoadDocumentImages = false;
if (this.ImageLoader)
this.ImageLoader.bIsAsyncLoadDocumentImages = false;
};
asc_docs_api.prototype.IncreaseReaderFontSize = function()
......@@ -7875,6 +7876,9 @@ background-repeat: no-repeat;\
this.asc_setDrawCollaborationMarks(this.tmpCoMarksDraw);
asc_docs_api.superclass._onEndLoadSdk.call(this);
if (this.isOnlyReaderMode)
this.ImageLoader.bIsAsyncLoadDocumentImages = false;
};
asc_docs_api.prototype.asc_Recalculate = function(bIsUpdateInterface)
......
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