Commit 8ba9ad44 authored by GoshaZotov's avatar GoshaZotov

Merge branch 'develop' into Feature/special_paste

parents 1ad4a1b8 a14badcf
...@@ -776,6 +776,11 @@ ...@@ -776,6 +776,11 @@
return this; return this;
}; };
DrawingContext.prototype.setLineDash = function (segments) {
this.ctx.setLineDash(segments);
return this;
};
DrawingContext.prototype.fillRect = function (x, y, w, h) { DrawingContext.prototype.fillRect = function (x, y, w, h) {
var r = this._calcRect(x, y, w, h); var r = this._calcRect(x, y, w, h);
this.ctx.fillRect(r.x, r.y, r.w, r.h); this.ctx.fillRect(r.x, r.y, r.w, r.h);
......
...@@ -214,6 +214,14 @@ CPdfPrinter.prototype = ...@@ -214,6 +214,14 @@ CPdfPrinter.prototype =
this.DocumentRenderer.p_width(val * 1000 * vector_koef); this.DocumentRenderer.p_width(val * 1000 * vector_koef);
return this; return this;
}, },
setLineDash : function(params)
{
var tmp = [];
for (var i = 0; i < params.length; ++i) {
tmp.push(params[i] * vector_koef);
}
return this.DocumentRenderer.p_dash(tmp);
},
setLineCap : function(cap) setLineCap : function(cap)
{ {
return this; return this;
...@@ -458,7 +466,7 @@ CPdfPrinter.prototype = ...@@ -458,7 +466,7 @@ CPdfPrinter.prototype =
}, },
p_dash : function(params) p_dash : function(params)
{ {
// TODO: return this.DocumentRenderer.p_dash(params);
}, },
// brush methods // brush methods
b_color1 : function(r,g,b,a) b_color1 : function(r,g,b,a)
......
...@@ -856,19 +856,18 @@ Fill.prototype = ...@@ -856,19 +856,18 @@ Fill.prototype =
} }
} }
}; };
var g_oBorderPropProperties = { var g_oBorderPropProperties = {
s: 0, s: 0, c: 1
c: 1
}; };
function BorderProp()
{ function BorderProp() {
this.Properties = g_oBorderPropProperties; this.Properties = g_oBorderPropProperties;
this.s = c_oAscBorderStyles.None; this.s = c_oAscBorderStyles.None;
this.w = c_oAscBorderWidth.None; this.w = c_oAscBorderWidth.None;
this.c = g_oColorManager.getThemeColor(1); this.c = g_oColorManager.getThemeColor(1);
} }
BorderProp.prototype = {
setStyle : function (style) { BorderProp.prototype.setStyle = function (style) {
this.s = style; this.s = style;
switch (this.s) { switch (this.s) {
case c_oAscBorderStyles.Thin: case c_oAscBorderStyles.Thin:
...@@ -894,63 +893,94 @@ BorderProp.prototype = { ...@@ -894,63 +893,94 @@ BorderProp.prototype = {
this.w = c_oAscBorderWidth.None; this.w = c_oAscBorderWidth.None;
break; break;
} }
}, };
getRgbOrNull : function() BorderProp.prototype.getDashSegments = function () {
{ var res;
switch (this.s) {
case c_oAscBorderStyles.Hair:
res = [1, 1];
break;
case c_oAscBorderStyles.Dotted:
res = [2, 2];
break;
case c_oAscBorderStyles.DashDotDot:
case c_oAscBorderStyles.MediumDashDotDot:
res = [3, 3, 3, 3, 9, 3];
break;
case c_oAscBorderStyles.DashDot:
case c_oAscBorderStyles.MediumDashDot:
case c_oAscBorderStyles.SlantDashDot:
res = [3, 3, 9, 3];
break;
case c_oAscBorderStyles.Dashed:
res = [3, 1];
break;
case c_oAscBorderStyles.MediumDashed:
res = [9, 3];
break;
case c_oAscBorderStyles.Thin:
case c_oAscBorderStyles.Medium:
case c_oAscBorderStyles.Thick:
case c_oAscBorderStyles.Double:
default:
res = [];
break;
}
return res;
};
BorderProp.prototype.getRgbOrNull = function () {
var nRes = null; var nRes = null;
if(null != this.c) if (null != this.c) {
nRes = this.c.getRgb(); nRes = this.c.getRgb();
}
return nRes; return nRes;
}, };
isEmpty : function() BorderProp.prototype.isEmpty = function () {
{
return c_oAscBorderStyles.None === this.s; return c_oAscBorderStyles.None === this.s;
}, };
isEqual : function(val) BorderProp.prototype.isEqual = function (val) {
{
return this.s === val.s && g_oColorManager.isEqual(this.c, val.c); return this.s === val.s && g_oColorManager.isEqual(this.c, val.c);
}, };
clone : function() BorderProp.prototype.clone = function () {
{
var res = new BorderProp(); var res = new BorderProp();
res.merge(this); res.merge(this);
return res; return res;
}, };
merge : function(oBorderProp) BorderProp.prototype.merge = function (oBorderProp) {
{ if (null != oBorderProp.s && c_oAscBorderStyles.None !== oBorderProp.s) {
if(null != oBorderProp.s && c_oAscBorderStyles.None !== oBorderProp.s)
{
this.s = oBorderProp.s; this.s = oBorderProp.s;
this.w = oBorderProp.w; this.w = oBorderProp.w;
if(null != oBorderProp.c) if (null != oBorderProp.c) {
this.c = oBorderProp.c; this.c = oBorderProp.c;
} }
}, }
getType : function() };
{ BorderProp.prototype.getType = function () {
return UndoRedoDataTypes.StyleBorderProp; return UndoRedoDataTypes.StyleBorderProp;
}, };
getProperties : function() BorderProp.prototype.getProperties = function () {
{
return this.Properties; return this.Properties;
}, };
getProperty : function(nType) BorderProp.prototype.getProperty = function (nType) {
{ switch (nType) {
switch(nType) case this.Properties.s:
{ return this.s;
case this.Properties.s: return this.s;break; break;
case this.Properties.c: return this.c;break; case this.Properties.c:
} return this.c;
}, break;
setProperty : function(nType, value)
{
switch(nType)
{
case this.Properties.s: this.setStyle(value);break;
case this.Properties.c: this.c = value;break;
} }
};
BorderProp.prototype.setProperty = function (nType, value) {
switch (nType) {
case this.Properties.s:
this.setStyle(value);
break;
case this.Properties.c:
this.c = value;
break;
} }
}; };
var g_oBorderProperties = { var g_oBorderProperties = {
l: 0, l: 0,
t: 1, t: 1,
......
...@@ -776,6 +776,11 @@ ...@@ -776,6 +776,11 @@
return this; return this;
}; };
DrawingContext.prototype.setLineDash = function (segments) {
//TODO:
return this;
};
DrawingContext.prototype.fillRect = function (x, y, w, h) { DrawingContext.prototype.fillRect = function (x, y, w, h) {
var r = this._calcRect(x, y, w, h); var r = this._calcRect(x, y, w, h);
this.nctx["PD_rect"](r.x, r.y, r.w, r.h); this.nctx["PD_rect"](r.x, r.y, r.w, r.h);
......
...@@ -7592,7 +7592,7 @@ window["Asc"]["spreadsheet_api"].prototype.openDocument = function(sData) { ...@@ -7592,7 +7592,7 @@ window["Asc"]["spreadsheet_api"].prototype.openDocument = function(sData) {
t.DocumentLoadComplete = true; t.DocumentLoadComplete = true;
t.asc_CheckGuiControlColors(); t.asc_CheckGuiControlColors();
t.sendColorThemes(); t.sendColorThemes(_api.wbModel.theme);
t.asc_ApplyColorScheme(false); t.asc_ApplyColorScheme(false);
t.sendStandartTextures(); t.sendStandartTextures();
......
This diff is collapsed.
...@@ -3415,6 +3415,8 @@ ...@@ -3415,6 +3415,8 @@
prot["get_UserId"] = prot.get_UserId; prot["get_UserId"] = prot.get_UserId;
prot["get_HaveChanges"] = prot.get_HaveChanges; prot["get_HaveChanges"] = prot.get_HaveChanges;
prot["get_LockedObjectType"] = prot.get_LockedObjectType; prot["get_LockedObjectType"] = prot.get_LockedObjectType;
prot["get_FootnoteText"] = prot.get_FootnoteText;
prot["get_FootnoteNumber"] = prot.get_FootnoteNumber;
window["Asc"]["asc_CUserInfo"] = window["Asc"].asc_CUserInfo = asc_CUserInfo; window["Asc"]["asc_CUserInfo"] = window["Asc"].asc_CUserInfo = asc_CUserInfo;
prot = asc_CUserInfo.prototype; prot = asc_CUserInfo.prototype;
......
...@@ -527,6 +527,7 @@ function CDocumentPageSection() ...@@ -527,6 +527,7 @@ function CDocumentPageSection()
this.YLimit2 = 0; this.YLimit2 = 0;
this.Columns = []; this.Columns = [];
this.ColumnsSep = false;
this.IterationsCount = 0; this.IterationsCount = 0;
this.CurrentY = 0; this.CurrentY = 0;
...@@ -670,6 +671,10 @@ CDocumentPageColumn.prototype.Reset = function() ...@@ -670,6 +671,10 @@ CDocumentPageColumn.prototype.Reset = function()
this.XLimit = 0; this.XLimit = 0;
this.YLimit = 0; this.YLimit = 0;
}; };
CDocumentPageColumn.prototype.IsEmpty = function()
{
return this.Empty;
};
function CDocumentPage() function CDocumentPage()
{ {
...@@ -2184,6 +2189,7 @@ CDocument.prototype.Recalculate_Page = function() ...@@ -2184,6 +2189,7 @@ CDocument.prototype.Recalculate_Page = function()
{ {
Page.Sections[0].Columns[ColumnIndex] = new CDocumentPageColumn(); Page.Sections[0].Columns[ColumnIndex] = new CDocumentPageColumn();
} }
Page.Sections[0].ColumnsSep = SectPr.Get_ColumnsSep();
} }
var Count = this.Content.length; var Count = this.Content.length;
...@@ -2545,6 +2551,7 @@ CDocument.prototype.Recalculate_PageColumn = function() ...@@ -2545,6 +2551,7 @@ CDocument.prototype.Recalculate_PageColumn = function()
NewPageSection.EndPos = Index; NewPageSection.EndPos = Index;
NewPageSection.Y = SectionY + 0.001; NewPageSection.Y = SectionY + 0.001;
NewPageSection.YLimit = true === PageSection.Is_CalculatingSectionBottomLine() ? PageSection.YLimit2 : RealYLimit; NewPageSection.YLimit = true === PageSection.Is_CalculatingSectionBottomLine() ? PageSection.YLimit2 : RealYLimit;
NewPageSection.ColumnsSep = NextSectInfo.SectPr.Get_ColumnsSep();
Page.Sections[_SectionIndex] = NewPageSection; Page.Sections[_SectionIndex] = NewPageSection;
var ColumnsCount = NextSectInfo.SectPr.Get_ColumnsCount(); var ColumnsCount = NextSectInfo.SectPr.Get_ColumnsCount();
...@@ -3620,6 +3627,14 @@ CDocument.prototype.Draw = function(nPageInd ...@@ -3620,6 +3627,14 @@ CDocument.prototype.Draw = function(nPageInd
var ColumnStartPos = Column.Pos; var ColumnStartPos = Column.Pos;
var ColumnEndPos = Column.EndPos; var ColumnEndPos = Column.EndPos;
if (true === PageSection.ColumnsSep && ColumnIndex > 0 && !Column.IsEmpty())
{
var SepX = (Column.X + PageSection.Columns[ColumnIndex - 1].XLimit) / 2;
pGraphics.p_color(0, 0, 0, 255);
pGraphics.drawVerLine(c_oAscLineDrawingRule.Left, SepX, PageSection.Y, PageSection.YLimit, 0.75 * g_dKoef_pt_to_mm);
}
// Плавающие объекты не должны попадать в клип колонок // Плавающие объекты не должны попадать в клип колонок
var FlowElements = []; var FlowElements = [];
......
...@@ -665,6 +665,11 @@ CSectionPr.prototype = ...@@ -665,6 +665,11 @@ CSectionPr.prototype =
return this.Columns.Get_ColumnSpace(ColIndex); return this.Columns.Get_ColumnSpace(ColIndex);
}, },
Get_ColumnsSep : function()
{
return this.Columns.Sep;
},
Set_Columns_EqualWidth : function(Equal) Set_Columns_EqualWidth : function(Equal)
{ {
if (Equal !== this.Columns.Equal) if (Equal !== this.Columns.Equal)
......
...@@ -309,6 +309,14 @@ CParaSpellChecker.prototype = ...@@ -309,6 +309,14 @@ CParaSpellChecker.prototype =
Add : function(StartPos, EndPos, Word, Lang) Add : function(StartPos, EndPos, Word, Lang)
{ {
if (Word.length > 0)
{
if (Word.charAt(Word.length - 1) == '\'')
Word = Word.substr(0, Word.length - 1);
if (Word.charAt(0) == '\'')
Word = Word.substr(1);
}
var SpellCheckerEl = new CParaSpellCheckerElement( StartPos, EndPos, Word, Lang ); var SpellCheckerEl = new CParaSpellCheckerElement( StartPos, EndPos, Word, Lang );
this.Paragraph.Add_SpellCheckerElement( SpellCheckerEl ); this.Paragraph.Add_SpellCheckerElement( SpellCheckerEl );
this.Elements.push( SpellCheckerEl ); this.Elements.push( SpellCheckerEl );
......
...@@ -8501,7 +8501,7 @@ background-repeat: no-repeat;\ ...@@ -8501,7 +8501,7 @@ background-repeat: no-repeat;\
CHeaderProp.prototype['put_DifferentEvenOdd'] = CHeaderProp.prototype.put_DifferentEvenOdd; CHeaderProp.prototype['put_DifferentEvenOdd'] = CHeaderProp.prototype.put_DifferentEvenOdd;
CHeaderProp.prototype['get_LinkToPrevious'] = CHeaderProp.prototype.get_LinkToPrevious; CHeaderProp.prototype['get_LinkToPrevious'] = CHeaderProp.prototype.get_LinkToPrevious;
CHeaderProp.prototype['get_Locked'] = CHeaderProp.prototype.get_Locked; CHeaderProp.prototype['get_Locked'] = CHeaderProp.prototype.get_Locked;
window['Asc']['CMailMergeSendData'] = CMailMergeSendData; window['Asc']['CMailMergeSendData'] = window['Asc'].CMailMergeSendData = CMailMergeSendData;
CMailMergeSendData.prototype['get_From'] = CMailMergeSendData.prototype.get_From; CMailMergeSendData.prototype['get_From'] = CMailMergeSendData.prototype.get_From;
CMailMergeSendData.prototype['put_From'] = CMailMergeSendData.prototype.put_From; CMailMergeSendData.prototype['put_From'] = CMailMergeSendData.prototype.put_From;
CMailMergeSendData.prototype['get_To'] = CMailMergeSendData.prototype.get_To; CMailMergeSendData.prototype['get_To'] = CMailMergeSendData.prototype.get_To;
...@@ -8522,7 +8522,7 @@ background-repeat: no-repeat;\ ...@@ -8522,7 +8522,7 @@ background-repeat: no-repeat;\
CMailMergeSendData.prototype['put_RecordCount'] = CMailMergeSendData.prototype.put_RecordCount; CMailMergeSendData.prototype['put_RecordCount'] = CMailMergeSendData.prototype.put_RecordCount;
CMailMergeSendData.prototype['get_UserId'] = CMailMergeSendData.prototype.get_UserId; CMailMergeSendData.prototype['get_UserId'] = CMailMergeSendData.prototype.get_UserId;
CMailMergeSendData.prototype['put_UserId'] = CMailMergeSendData.prototype.put_UserId; CMailMergeSendData.prototype['put_UserId'] = CMailMergeSendData.prototype.put_UserId;
window['Asc']['CAscFootnotePr'] = CAscFootnotePr; window['Asc']['CAscFootnotePr'] = window['Asc'].CAscFootnotePr = CAscFootnotePr;
CAscFootnotePr.prototype['get_Pos'] = CAscFootnotePr.prototype.get_Pos; CAscFootnotePr.prototype['get_Pos'] = CAscFootnotePr.prototype.get_Pos;
CAscFootnotePr.prototype['put_Pos'] = CAscFootnotePr.prototype.put_Pos; CAscFootnotePr.prototype['put_Pos'] = CAscFootnotePr.prototype.put_Pos;
CAscFootnotePr.prototype['get_NumStart'] = CAscFootnotePr.prototype.get_NumStart; CAscFootnotePr.prototype['get_NumStart'] = CAscFootnotePr.prototype.get_NumStart;
......
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