Commit 8ba9ad44 authored by GoshaZotov's avatar GoshaZotov

Merge branch 'develop' into Feature/special_paste

parents 1ad4a1b8 a14badcf
......@@ -776,6 +776,11 @@
return this;
};
DrawingContext.prototype.setLineDash = function (segments) {
this.ctx.setLineDash(segments);
return this;
};
DrawingContext.prototype.fillRect = function (x, y, w, h) {
var r = this._calcRect(x, y, w, h);
this.ctx.fillRect(r.x, r.y, r.w, r.h);
......
......@@ -214,6 +214,14 @@ CPdfPrinter.prototype =
this.DocumentRenderer.p_width(val * 1000 * vector_koef);
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)
{
return this;
......@@ -458,7 +466,7 @@ CPdfPrinter.prototype =
},
p_dash : function(params)
{
// TODO:
return this.DocumentRenderer.p_dash(params);
},
// brush methods
b_color1 : function(r,g,b,a)
......
......@@ -856,19 +856,18 @@ Fill.prototype =
}
}
};
var g_oBorderPropProperties = {
s: 0,
c: 1
var g_oBorderPropProperties = {
s: 0, c: 1
};
function BorderProp()
{
function BorderProp() {
this.Properties = g_oBorderPropProperties;
this.s = c_oAscBorderStyles.None;
this.w = c_oAscBorderWidth.None;
this.c = g_oColorManager.getThemeColor(1);
}
BorderProp.prototype = {
setStyle : function (style) {
}
BorderProp.prototype.setStyle = function (style) {
this.s = style;
switch (this.s) {
case c_oAscBorderStyles.Thin:
......@@ -894,63 +893,94 @@ BorderProp.prototype = {
this.w = c_oAscBorderWidth.None;
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;
if(null != this.c)
if (null != this.c) {
nRes = this.c.getRgb();
}
return nRes;
},
isEmpty : function()
{
};
BorderProp.prototype.isEmpty = function () {
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);
},
clone : function()
{
};
BorderProp.prototype.clone = function () {
var res = new BorderProp();
res.merge(this);
return res;
},
merge : function(oBorderProp)
{
if(null != oBorderProp.s && c_oAscBorderStyles.None !== oBorderProp.s)
{
};
BorderProp.prototype.merge = function (oBorderProp) {
if (null != oBorderProp.s && c_oAscBorderStyles.None !== oBorderProp.s) {
this.s = oBorderProp.s;
this.w = oBorderProp.w;
if(null != oBorderProp.c)
if (null != oBorderProp.c) {
this.c = oBorderProp.c;
}
},
getType : function()
{
}
};
BorderProp.prototype.getType = function () {
return UndoRedoDataTypes.StyleBorderProp;
},
getProperties : function()
{
};
BorderProp.prototype.getProperties = function () {
return this.Properties;
},
getProperty : function(nType)
{
switch(nType)
{
case this.Properties.s: return this.s;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.getProperty = function (nType) {
switch (nType) {
case this.Properties.s:
return this.s;
break;
case this.Properties.c:
return this.c;
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 = {
l: 0,
t: 1,
......
......@@ -776,6 +776,11 @@
return this;
};
DrawingContext.prototype.setLineDash = function (segments) {
//TODO:
return this;
};
DrawingContext.prototype.fillRect = function (x, y, w, h) {
var r = this._calcRect(x, y, w, 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) {
t.DocumentLoadComplete = true;
t.asc_CheckGuiControlColors();
t.sendColorThemes();
t.sendColorThemes(_api.wbModel.theme);
t.asc_ApplyColorScheme(false);
t.sendStandartTextures();
......
This diff is collapsed.
......@@ -3415,6 +3415,8 @@
prot["get_UserId"] = prot.get_UserId;
prot["get_HaveChanges"] = prot.get_HaveChanges;
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;
prot = asc_CUserInfo.prototype;
......
......@@ -527,6 +527,7 @@ function CDocumentPageSection()
this.YLimit2 = 0;
this.Columns = [];
this.ColumnsSep = false;
this.IterationsCount = 0;
this.CurrentY = 0;
......@@ -670,6 +671,10 @@ CDocumentPageColumn.prototype.Reset = function()
this.XLimit = 0;
this.YLimit = 0;
};
CDocumentPageColumn.prototype.IsEmpty = function()
{
return this.Empty;
};
function CDocumentPage()
{
......@@ -2184,6 +2189,7 @@ CDocument.prototype.Recalculate_Page = function()
{
Page.Sections[0].Columns[ColumnIndex] = new CDocumentPageColumn();
}
Page.Sections[0].ColumnsSep = SectPr.Get_ColumnsSep();
}
var Count = this.Content.length;
......@@ -2545,6 +2551,7 @@ CDocument.prototype.Recalculate_PageColumn = function()
NewPageSection.EndPos = Index;
NewPageSection.Y = SectionY + 0.001;
NewPageSection.YLimit = true === PageSection.Is_CalculatingSectionBottomLine() ? PageSection.YLimit2 : RealYLimit;
NewPageSection.ColumnsSep = NextSectInfo.SectPr.Get_ColumnsSep();
Page.Sections[_SectionIndex] = NewPageSection;
var ColumnsCount = NextSectInfo.SectPr.Get_ColumnsCount();
......@@ -3620,6 +3627,14 @@ CDocument.prototype.Draw = function(nPageInd
var ColumnStartPos = Column.Pos;
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 = [];
......
......@@ -665,6 +665,11 @@ CSectionPr.prototype =
return this.Columns.Get_ColumnSpace(ColIndex);
},
Get_ColumnsSep : function()
{
return this.Columns.Sep;
},
Set_Columns_EqualWidth : function(Equal)
{
if (Equal !== this.Columns.Equal)
......
......@@ -309,6 +309,14 @@ CParaSpellChecker.prototype =
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 );
this.Paragraph.Add_SpellCheckerElement( SpellCheckerEl );
this.Elements.push( SpellCheckerEl );
......
......@@ -8501,7 +8501,7 @@ background-repeat: no-repeat;\
CHeaderProp.prototype['put_DifferentEvenOdd'] = CHeaderProp.prototype.put_DifferentEvenOdd;
CHeaderProp.prototype['get_LinkToPrevious'] = CHeaderProp.prototype.get_LinkToPrevious;
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['put_From'] = CMailMergeSendData.prototype.put_From;
CMailMergeSendData.prototype['get_To'] = CMailMergeSendData.prototype.get_To;
......@@ -8522,7 +8522,7 @@ background-repeat: no-repeat;\
CMailMergeSendData.prototype['put_RecordCount'] = CMailMergeSendData.prototype.put_RecordCount;
CMailMergeSendData.prototype['get_UserId'] = CMailMergeSendData.prototype.get_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['put_Pos'] = CAscFootnotePr.prototype.put_Pos;
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