Commit 146d7880 authored by Ilya.Kirillov's avatar Ilya.Kirillov Committed by Alexander.Trofimov

Передаланы стандартные стили таблиц. Исправлен баг в порядке наследования...

Передаланы стандартные стили таблиц. Исправлен баг в порядке наследования стилей для ячейки таблицы.

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@61533 954022d7-b5bf-4e40-9824-e11837661b57
parent d5f4c504
......@@ -1116,7 +1116,7 @@ CStyle.prototype =
Left :
{
W : 1.9, // 5.4pt
W : 1.9,
Type : tblwidth_Mm
},
......@@ -1128,15 +1128,15 @@ CStyle.prototype =
Right :
{
W : 1.9, // 5.4pt
W : 1.9,
Type : tblwidth_Mm
}
}
};
this.Set_UiPriority( 59 );
this.Set_TablePr( TablePr );
this.Set_ParaPr( ParaPr );
this.Set_UiPriority(59);
this.Set_TablePr(TablePr);
this.Set_ParaPr(ParaPr);
},
Create_Quote : function()
......@@ -1992,9 +1992,29 @@ CStyle.prototype =
Create_Table_Lined : function(Color1, Color2)
{
this.uiPriority = 99;
var TextColor1 = new CDocumentColor(0xF2, 0xF2, 0xF2, false);
var TextFont1 = { Name : "Arial", Index : -1 };
var TextSize1 = 11;
var CellShd1 = new CDocumentShd();
CellShd1.Value = shd_Clear;
CellShd1.Color = new CDocumentColor(Color1.r, Color1.g, Color1.b);
var TableStylePrBoundary =
{
TextPr :
{
RFonts : { Ascii : TextFont1, HAnsi : TextFont1 },
Color : TextColor1,
FontSize : TextSize1
},
TableCellPr :
{
Shd : CellShd1
}
};
// ParaPr
var ParaPr =
{
Spacing :
......@@ -2002,94 +2022,91 @@ CStyle.prototype =
After : 0,
Line : 1,
LineRule : linerule_Auto
}
};
},
// TablePr
var TablePr =
Borders :
{
Top :
{
Color : { r : 0, g : 0, b : 0, Auto : true },
Space : 0,
Size : 0,
Value : border_None
},
TableStyleColBandSize : 1,
TableStyleRowBandSize : 1,
TableInd : 0,
TableCellMar :
Left :
{
Top : new CTableMeasurement( tblwidth_Auto, 0 ),
Left : new CTableMeasurement( tblwidth_Auto, 5.4 * g_dKoef_pt_to_mm ),
Bottom : new CTableMeasurement( tblwidth_Auto, 0 ),
Right : new CTableMeasurement( tblwidth_Auto, 5.4 * g_dKoef_pt_to_mm )
}
};
Color : { r : 0, g : 0, b : 0, Auto : true },
Space : 0,
Size : 0,
Value : border_None
},
// TableFirstRow
var TableFirstRow =
Bottom :
{
TableCellPr :
Color : { r : 0, g : 0, b : 0, Auto : true },
Space : 0,
Size : 0,
Value : border_None
},
Right :
{
Shd :
Color : { r : 0, g : 0, b : 0, Auto : true },
Space : 0,
Size : 0,
Value : border_None
},
Between :
{
Value : shd_Clear,
Color : { r : Color1.r, g : Color1.g, b : Color1.b}
Color : { r : 0, g : 0, b : 0, Auto : true },
Space : 0,
Size : 0,
Value : border_None
}
}
};
// TableLastRow
var TableLastRow =
{
TableCellPr :
{
Shd :
var TextPr =
{
Value : shd_Clear,
Color : { r : Color1.r, g : Color1.g, b : Color1.b}
}
}
Color : { r : 0x40, g : 0x40, b : 0x40 }
};
// TableFirstCol
var TableFirstCol =
{
TableCellPr :
var TablePr =
{
Shd :
TableStyleColBandSize : 1,
TableStyleRowBandSize : 1,
TableInd : 0,
TableCellMar :
{
Value : shd_Clear,
Color : { r : Color1.r, g : Color1.g, b : Color1.b}
}
Top : new CTableMeasurement(tblwidth_Mm, 4.8 * g_dKoef_pt_to_mm),
Left : new CTableMeasurement(tblwidth_Mm, 8.5 * g_dKoef_pt_to_mm),
Bottom : new CTableMeasurement(tblwidth_Mm, 4.8 * g_dKoef_pt_to_mm),
Right : new CTableMeasurement(tblwidth_Mm, 8.5 * g_dKoef_pt_to_mm)
}
};
// TableLastCol
var TableLastCol =
var TableStylePrBand1 =
{
TableCellPr :
{
Shd :
TextPr :
{
Value : shd_Clear,
Color : { r : Color1.r, g : Color1.g, b : Color1.b}
}
RFonts : { Ascii : TextFont1, HAnsi : TextFont1 },
Color : { r : 0x40, g : 0x40, b : 0x40 },
FontSize : TextSize1
}
};
// TableBand2Vert
var TableBand2Vert =
{
TableCellPr :
var TableStylePrBand2 =
{
Shd :
TextPr :
{
Value : shd_Clear,
Color : { r : Color2.r, g : Color2.g, b : Color2.b}
}
}
};
RFonts : { Ascii : TextFont1, HAnsi : TextFont1 },
Color : { r : 0x40, g : 0x40, b : 0x40 },
FontSize : TextSize1
},
// TableBand2Horz
var TableBand2Horz =
{
TableCellPr :
{
Shd :
......@@ -2100,20 +2117,32 @@ CStyle.prototype =
}
};
this.Set_UiPriority( 99 );
this.Set_ParaPr( ParaPr );
this.Set_TablePr( TablePr );
this.Set_TableFirstRow( TableFirstRow );
this.Set_TableLastRow( TableLastRow );
this.Set_TableFirstCol( TableFirstCol );
this.Set_TableLastCol( TableLastCol );
this.Set_TableBand2Horz( TableBand2Horz );
this.Set_TableBand2Vert( TableBand2Vert );
this.Set_UiPriority(99);
this.Set_ParaPr(ParaPr);
this.Set_TextPr(TextPr);
this.Set_TablePr(TablePr);
this.Set_TableFirstRow(TableStylePrBoundary);
this.Set_TableLastRow(TableStylePrBoundary);
this.Set_TableFirstCol(TableStylePrBoundary);
this.Set_TableLastCol(TableStylePrBoundary);
this.Set_TableBand1Horz(TableStylePrBand1);
this.Set_TableBand1Vert(TableStylePrBand1);
this.Set_TableBand2Horz(TableStylePrBand2);
this.Set_TableBand2Vert(TableStylePrBand2);
},
Create_Table_Bordered : function(Color1, Color2)
{
// ParaPr
var TableTextPr =
{
RFonts : {Ascii : {Name : "Arial", Index : -1}, HAnsi : {Name : "Arial", Index : -1}},
Color : { r : 0x40, g : 0x40, b : 0x40 },
FontSize : 11
};
var ParaPr =
{
Spacing :
......@@ -2121,324 +2150,366 @@ CStyle.prototype =
After : 0,
Line : 1,
LineRule : linerule_Auto
}
};
// TablePr
var TablePr =
{
TableInd : 0,
},
TableBorders :
Borders :
{
Top :
{
Color : { r : Color1.r, g : Color1.g, b : Color1.b },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm,
Space : 0
Color : { r : 0, g : 0, b : 0, Auto : true },
Space : 0,
Size : 0,
Value : border_None
},
Left :
{
Color : { r : Color1.r, g : Color1.g, b : Color1.b },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm,
Space : 0
Color : { r : 0, g : 0, b : 0, Auto : true },
Space : 0,
Size : 0,
Value : border_None
},
Bottom :
{
Color : { r : Color1.r, g : Color1.g, b : Color1.b },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm,
Space : 0
Color : { r : 0, g : 0, b : 0, Auto : true },
Space : 0,
Size : 0,
Value : border_None
},
Right :
{
Color : { r : Color1.r, g : Color1.g, b : Color1.b },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm,
Space : 0
Color : { r : 0, g : 0, b : 0, Auto : true },
Space : 0,
Size : 0,
Value : border_None
},
InsideH :
Between :
{
Color : { r : 0, g : 0, b : 0, Auto : true },
Space : 0,
Size : 0,
Value : border_None
}
}
};
var TextPr =
{
Color : { r : 0x40, g : 0x40, b : 0x40 }
};
var TableBorder1 =
{
Color : { r : Color1.r, g : Color1.g, b : Color1.b },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm,
Space : 0
},
};
InsideV :
var TableBorder2 =
{
Color : { r : Color1.r, g : Color1.g, b : Color1.b },
Color : { r : Color2.r, g : Color2.g, b : Color2.b },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm,
Size : 1.5 * g_dKoef_pt_to_mm,
Space : 0
}
};
var TablePr =
{
TableStyleColBandSize : 1,
TableStyleRowBandSize : 1,
TableInd : 0,
TableBorders :
{
Top : TableBorder1,
Left : TableBorder1,
Bottom : TableBorder1,
Right : TableBorder1,
InsideH : TableBorder1,
InsideV : TableBorder1
},
TableCellMar :
{
Top : new CTableMeasurement( tblwidth_Auto, 0 ),
Left : new CTableMeasurement( tblwidth_Auto, 5.4 * g_dKoef_pt_to_mm ),
Bottom : new CTableMeasurement( tblwidth_Auto, 0 ),
Right : new CTableMeasurement( tblwidth_Auto, 5.4 * g_dKoef_pt_to_mm )
Top : new CTableMeasurement(tblwidth_Mm, 4.8 * g_dKoef_pt_to_mm),
Left : new CTableMeasurement(tblwidth_Mm, 8.5 * g_dKoef_pt_to_mm),
Bottom : new CTableMeasurement(tblwidth_Mm, 4.8 * g_dKoef_pt_to_mm),
Right : new CTableMeasurement(tblwidth_Mm, 8.5 * g_dKoef_pt_to_mm)
}
};
// TableFirstRow
var TableFirstRow =
{
TextPr : TableTextPr,
TableCellPr :
{
TableCellBorders :
{
Bottom :
{
Color : { r : Color2.r, g : Color2.g, b : Color2.b },
Value : border_Single,
Size : 2.25 * g_dKoef_pt_to_mm,
Space : 0
}
Bottom : TableBorder2
}
}
};
// TableLastRow
var TableLastRow =
{
TextPr : TableTextPr,
TableCellPr :
{
TableCellBorders :
{
Top :
{
Color : { r : Color2.r, g : Color2.g, b : Color2.b },
Value : border_Single,
Size : 2.25 * g_dKoef_pt_to_mm,
Space : 0
}
Top : TableBorder2
}
}
};
// TableFirstCol
var TableFirstCol =
{
TextPr : TableTextPr,
TableCellPr :
{
TableCellBorders :
{
Right :
{
Color : { r : Color2.r, g : Color2.g, b : Color2.b },
Value : border_Single,
Size : 2.25 * g_dKoef_pt_to_mm,
Space : 0
}
Right : TableBorder2
}
}
};
// TableLastCol
var TableLastCol =
{
TextPr : TableTextPr,
TableCellPr :
{
TableCellBorders :
{
Left :
{
Color : { r : Color2.r, g : Color2.g, b : Color2.b },
Value : border_Single,
Size : 2.25 * g_dKoef_pt_to_mm,
Space : 0
Left : TableBorder2
}
}
};
var TableBand1Horz =
{
TextPr : TableTextPr,
TableCellPr :
{
TableCellBorders :
{
Top : TableBorder1,
Left : TableBorder1,
Bottom : TableBorder1,
Right : TableBorder1,
InsideH : TableBorder1,
InsideV : TableBorder1
}
}
};
this.Set_UiPriority( 99 );
this.Set_ParaPr( ParaPr );
this.Set_TablePr( TablePr );
this.Set_TableFirstRow( TableFirstRow );
this.Set_TableLastRow( TableLastRow );
this.Set_TableFirstCol( TableFirstCol );
this.Set_TableLastCol( TableLastCol );
this.Set_UiPriority(99);
this.Set_ParaPr(ParaPr);
this.Set_TablePr(TablePr);
this.Set_TableFirstRow(TableFirstRow);
this.Set_TableLastRow(TableLastRow);
this.Set_TableFirstCol(TableFirstCol);
this.Set_TableLastCol(TableLastCol);
this.Set_TableBand1Horz(TableBand1Horz);
},
Create_Table_BorderedAndLined : function(Color1, Color2, Color3)
Create_Table_BorderedAndLined : function(TableBorder, TableShdColorBoundary, TableShdColorVertBand, TableShdColorHorzBand)
{
var TextPr1 =
{
this.uiPriority = 99;
RFonts : { Ascii : { Name : "Arial", Index : -1 }, HAnsi : { Name : "Arial", Index : -1 } },
Color : { r : 0xF2, g : 0xF2, b : 0xF2 },
FontSize : 11
};
// ParaPr
var ParaPr =
var TextPr2 =
{
Spacing :
RFonts : { Ascii : { Name : "Arial", Index : -1 }, HAnsi : { Name : "Arial", Index : -1 } },
Color : { r : 0x40, g : 0x40, b : 0x40 },
FontSize : 11
};
var TableCellPr1 =
{
After : 0,
Line : 1,
LineRule : linerule_Auto
Shd :
{
Value : shd_Clear,
Color : { r : TableShdColorBoundary.r, g : TableShdColorBoundary.g, b : TableShdColorBoundary.b}
}
};
// TablePr
var TablePr =
var TableCellPrVert =
{
TableStyleColBandSize : 1,
TableStyleRowBandSize : 1,
TableInd : 0,
Shd :
{
Value : shd_Clear,
Color : { r : TableShdColorVertBand.r, g : TableShdColorVertBand.g, b : TableShdColorVertBand.b}
}
};
TableCellMar :
var TableCellPrHorz =
{
Shd :
{
Value : shd_Clear,
Color : { r : TableShdColorHorzBand.r, g : TableShdColorHorzBand.g, b : TableShdColorHorzBand.b}
}
};
var ParaPr =
{
Spacing :
{
Top : new CTableMeasurement( tblwidth_Auto, 0 ),
Left : new CTableMeasurement( tblwidth_Auto, 5.4 * g_dKoef_pt_to_mm ),
Bottom : new CTableMeasurement( tblwidth_Auto, 0 ),
Right : new CTableMeasurement( tblwidth_Auto, 5.4 * g_dKoef_pt_to_mm )
After : 0,
Line : 1,
LineRule : linerule_Auto
},
TableBorders :
Borders :
{
Top :
{
Color : { r : Color1.r, g : Color1.g, b : Color1.b },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm,
Space : 0
Color : { r : 0, g : 0, b : 0, Auto : true },
Space : 0,
Size : 0,
Value : border_None
},
Left :
{
Color : { r : Color1.r, g : Color1.g, b : Color1.b },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm,
Space : 0
Color : { r : 0, g : 0, b : 0, Auto : true },
Space : 0,
Size : 0,
Value : border_None
},
Bottom :
{
Color : { r : Color1.r, g : Color1.g, b : Color1.b },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm,
Space : 0
Color : { r : 0, g : 0, b : 0, Auto : true },
Space : 0,
Size : 0,
Value : border_None
},
Right :
{
Color : { r : Color1.r, g : Color1.g, b : Color1.b },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm,
Space : 0
Color : { r : 0, g : 0, b : 0, Auto : true },
Space : 0,
Size : 0,
Value : border_None
},
InsideH :
Between :
{
Color : { r : Color1.r, g : Color1.g, b : Color1.b },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm,
Space : 0
},
Color : { r : 0, g : 0, b : 0, Auto : true },
Space : 0,
Size : 0,
Value : border_None
}
}
};
InsideV :
var TextPr =
{
Color : { r : Color1.r, g : Color1.g, b : Color1.b },
Color : { r : 0x40, g : 0x40, b : 0x40 }
};
var TableBorder1 =
{
Color : { r : TableBorder.r, g : TableBorder.g, b : TableBorder.b },
Value : border_Single,
Size : 0.5 * g_dKoef_pt_to_mm,
Space : 0
}
}
};
// TableFirstRow
var TableFirstRow =
var TablePr =
{
TableCellPr :
TableStyleColBandSize : 1,
TableStyleRowBandSize : 1,
TableInd : 0,
TableCellMar :
{
Shd :
Top : new CTableMeasurement(tblwidth_Mm, 4.8 * g_dKoef_pt_to_mm),
Left : new CTableMeasurement(tblwidth_Mm, 8.5 * g_dKoef_pt_to_mm),
Bottom : new CTableMeasurement(tblwidth_Mm, 4.8 * g_dKoef_pt_to_mm),
Right : new CTableMeasurement(tblwidth_Mm, 8.5 * g_dKoef_pt_to_mm)
},
TableBorders :
{
Value : shd_Clear,
Color : { r : Color2.r, g : Color2.g, b : Color2.b}
}
Top : TableBorder1,
Left : TableBorder1,
Bottom : TableBorder1,
Right : TableBorder1,
InsideH : TableBorder1,
InsideV : TableBorder1
}
};
// TableLastRow
var TableLastRow =
{
TableCellPr :
var TableFirstRow =
{
Shd :
TextPr : TextPr1,
TableCellPr : TableCellPr1
};
var TableLastRow =
{
Value : shd_Clear,
Color : { r : Color2.r, g : Color2.g, b : Color2.b}
}
}
TextPr : TextPr1,
TableCellPr : TableCellPr1
};
// TableFirstCol
var TableFirstCol =
{
TableCellPr :
{
Shd :
{
Value : shd_Clear,
Color : { r : Color2.r, g : Color2.g, b : Color2.b}
}
}
TextPr : TextPr1,
TableCellPr : TableCellPr1
};
// TableLastCol
var TableLastCol =
{
TableCellPr :
{
Shd :
TextPr : TextPr1,
TableCellPr : TableCellPr1
};
var TableBand1Vert =
{
Value : shd_Clear,
Color : { r : Color2.r, g : Color2.g, b : Color2.b}
}
}
TextPr : TextPr2
};
// TableBand2Vert
var TableBand2Vert =
{
TableCellPr :
{
Shd :
TextPr : TextPr2,
TableCellPr : TableCellPrVert
};
var TableBand1Horz =
{
Value : shd_Clear,
Color : { r : Color3.r, g : Color3.g, b : Color3.b}
}
}
TextPr : TextPr2
};
// TableBand2Horz
var TableBand2Horz =
{
TableCellPr :
{
Shd :
{
Value : shd_Clear,
Color : { r : Color3.r, g : Color3.g, b : Color3.b}
}
}
TextPr : TextPr2,
TableCellPr : TableCellPrHorz
};
this.Set_UiPriority( 99 );
this.Set_ParaPr( ParaPr );
this.Set_TablePr( TablePr );
this.Set_TableFirstRow( TableFirstRow );
this.Set_TableLastRow( TableLastRow );
this.Set_TableFirstCol( TableFirstCol );
this.Set_TableLastCol( TableLastCol );
this.Set_TableBand2Horz( TableBand2Horz );
this.Set_TableBand2Vert( TableBand2Vert );
this.Set_UiPriority(99);
this.Set_ParaPr(ParaPr);
this.Set_TextPr(TextPr);
this.Set_TablePr(TablePr);
this.Set_TableFirstRow(TableFirstRow);
this.Set_TableLastRow(TableLastRow);
this.Set_TableFirstCol(TableFirstCol);
this.Set_TableLastCol(TableLastCol);
this.Set_TableBand1Horz(TableBand1Horz);
this.Set_TableBand1Vert(TableBand1Vert);
this.Set_TableBand2Horz(TableBand2Horz);
this.Set_TableBand2Vert(TableBand2Vert);
},
Create_Character_Hyperlink : function()
......@@ -3760,87 +3831,87 @@ function CStyles(bCreateDefault)
// Стандартные стили таблиц
var Style_Table_Lined = new CStyle("Lined", this.Default.Table, null, styletype_Table );
Style_Table_Lined.Create_Table_Lined( new CDocumentColor( 0xA6, 0xA6, 0xA6 ), new CDocumentColor( 0xD9, 0xD9, 0xD9 ) );
Style_Table_Lined.Create_Table_Lined(new CDocumentColor(0x7F, 0x7F, 0x7F), new CDocumentColor(0xF2, 0xF2, 0xF2));
this.Add( Style_Table_Lined );
var Style_Table_Lined_Accent1 = new CStyle("Lined - Accent 1", this.Default.Table, null, styletype_Table );
Style_Table_Lined_Accent1.Create_Table_Lined( new CDocumentColor( 0x95, 0xB3, 0xD7 ), new CDocumentColor( 0xDB, 0xE5, 0xF1 ) );
Style_Table_Lined_Accent1.Create_Table_Lined( new CDocumentColor(0x54, 0x8D, 0xD4), new CDocumentColor(0xC6, 0xD9, 0xF1));
this.Add( Style_Table_Lined_Accent1 );
var Style_Table_Lined_Accent2 = new CStyle("Lined - Accent 2", this.Default.Table, null, styletype_Table );
Style_Table_Lined_Accent2.Create_Table_Lined( new CDocumentColor( 0xD9, 0x95, 0x94 ), new CDocumentColor( 0xF2, 0xDB, 0xDB ) );
Style_Table_Lined_Accent2.Create_Table_Lined( new CDocumentColor(0xD9, 0x95, 0x94), new CDocumentColor(0xF2, 0xDB, 0xDB));
this.Add( Style_Table_Lined_Accent2 );
var Style_Table_Lined_Accent3 = new CStyle("Lined - Accent 3", this.Default.Table, null, styletype_Table );
Style_Table_Lined_Accent3.Create_Table_Lined( new CDocumentColor( 0xC2, 0xD6, 0x9B ), new CDocumentColor( 0xEA, 0xF1, 0xDD ) );
Style_Table_Lined_Accent3.Create_Table_Lined( new CDocumentColor(0x9B, 0xB5, 0x59), new CDocumentColor(0xEA, 0xF1, 0xDD));
this.Add( Style_Table_Lined_Accent3 );
var Style_Table_Lined_Accent4 = new CStyle("Lined - Accent 4", this.Default.Table, null, styletype_Table );
Style_Table_Lined_Accent4.Create_Table_Lined( new CDocumentColor( 0xB2, 0xA1, 0xC7 ), new CDocumentColor( 0xE5, 0xDF, 0xEC ) );
Style_Table_Lined_Accent4.Create_Table_Lined( new CDocumentColor(0xB2, 0xA1, 0xC7), new CDocumentColor(0xE5, 0xDF, 0xEC));
this.Add( Style_Table_Lined_Accent4 );
var Style_Table_Lined_Accent5 = new CStyle("Lined - Accent 5", this.Default.Table, null, styletype_Table );
Style_Table_Lined_Accent5.Create_Table_Lined( new CDocumentColor( 0x92, 0xCD, 0xDC ), new CDocumentColor( 0xDA, 0xEE, 0xF3 ) );
Style_Table_Lined_Accent5.Create_Table_Lined( new CDocumentColor(0x4B, 0xAC, 0xC6), new CDocumentColor(0xDA, 0xEE, 0xF3));
this.Add( Style_Table_Lined_Accent5 );
var Style_Table_Lined_Accent6 = new CStyle("Lined - Accent 6", this.Default.Table, null, styletype_Table );
Style_Table_Lined_Accent6.Create_Table_Lined( new CDocumentColor( 0xFA, 0xBF, 0x8F ), new CDocumentColor( 0xFD, 0xE9, 0xE9 ) );
Style_Table_Lined_Accent6.Create_Table_Lined( new CDocumentColor(0xF7, 0x96, 0x46), new CDocumentColor(0xFD, 0xE9, 0xD9));
this.Add( Style_Table_Lined_Accent6 );
var Style_Table_Bordered = new CStyle("Bordered", this.Default.Table, null, styletype_Table );
Style_Table_Bordered.Create_Table_Bordered( new CDocumentColor( 0xBF, 0xBF, 0xBF ), new CDocumentColor( 0x00, 0x00, 0x00 ) );
Style_Table_Bordered.Create_Table_Bordered( new CDocumentColor(0xD9, 0xD9, 0xD9), new CDocumentColor(0x7F, 0x7F, 0x7F));
this.Add( Style_Table_Bordered );
var Style_Table_Bordered_Accent_1 = new CStyle("Bordered - Accent 1", this.Default.Table, null, styletype_Table );
Style_Table_Bordered_Accent_1.Create_Table_Bordered( new CDocumentColor( 0xB8, 0xCC, 0xE4 ), new CDocumentColor( 0x36, 0x5F, 0x91 ) );
Style_Table_Bordered_Accent_1.Create_Table_Bordered( new CDocumentColor(0xB8, 0xCC, 0xE4), new CDocumentColor(0x4F, 0x81, 0xBD));
this.Add( Style_Table_Bordered_Accent_1 );
var Style_Table_Bordered_Accent_2 = new CStyle("Bordered - Accent 2", this.Default.Table, null, styletype_Table );
Style_Table_Bordered_Accent_2.Create_Table_Bordered( new CDocumentColor( 0xE5, 0xB8, 0xB7 ), new CDocumentColor( 0x94, 0x36, 0x34 ) );
Style_Table_Bordered_Accent_2.Create_Table_Bordered( new CDocumentColor(0xE5, 0xB8, 0xB7), new CDocumentColor(0xD9, 0x95, 0x94));
this.Add( Style_Table_Bordered_Accent_2 );
var Style_Table_Bordered_Accent_3 = new CStyle("Bordered - Accent 3", this.Default.Table, null, styletype_Table );
Style_Table_Bordered_Accent_3.Create_Table_Bordered( new CDocumentColor( 0xD6, 0xE3, 0xBC ), new CDocumentColor( 0x76, 0x92, 0x3C ) );
Style_Table_Bordered_Accent_3.Create_Table_Bordered( new CDocumentColor(0xD6, 0xE3, 0xBC), new CDocumentColor(0xC2, 0xD6, 0x9B));
this.Add( Style_Table_Bordered_Accent_3 );
var Style_Table_Bordered_Accent_4 = new CStyle("Bordered - Accent 4", this.Default.Table, null, styletype_Table );
Style_Table_Bordered_Accent_4.Create_Table_Bordered( new CDocumentColor( 0xCC, 0xC0, 0xD9 ), new CDocumentColor( 0x5F, 0x49, 0x7A ) );
Style_Table_Bordered_Accent_4.Create_Table_Bordered( new CDocumentColor(0xCC, 0xC0, 0xD9), new CDocumentColor(0xB2, 0xA1, 0xC7));
this.Add( Style_Table_Bordered_Accent_4 );
var Style_Table_Bordered_Accent_5 = new CStyle("Bordered - Accent 5", this.Default.Table, null, styletype_Table );
Style_Table_Bordered_Accent_5.Create_Table_Bordered( new CDocumentColor( 0xB6, 0xDD, 0xE8 ), new CDocumentColor( 0x31, 0x84, 0x9B ) );
Style_Table_Bordered_Accent_5.Create_Table_Bordered( new CDocumentColor(0xB6, 0xDD, 0xE8), new CDocumentColor(0x92, 0xCD, 0xDC));
this.Add( Style_Table_Bordered_Accent_5 );
var Style_Table_Bordered_Accent_6 = new CStyle("Bordered - Accent 6", this.Default.Table, null, styletype_Table );
Style_Table_Bordered_Accent_6.Create_Table_Bordered( new CDocumentColor( 0xFB, 0xD4, 0xB4 ), new CDocumentColor( 0xE3, 0x6C, 0x0A ) );
Style_Table_Bordered_Accent_6.Create_Table_Bordered( new CDocumentColor(0xFB, 0xD4, 0xB4), new CDocumentColor(0xFA, 0xBF, 0x8F));
this.Add( Style_Table_Bordered_Accent_6 );
var Style_Table_BorderedLined = new CStyle("Bordered & Lined", this.Default.Table, null, styletype_Table );
Style_Table_BorderedLined.Create_Table_BorderedAndLined( new CDocumentColor( 0x00, 0x00, 0x00 ), new CDocumentColor( 0xA6, 0xA6, 0xA6 ), new CDocumentColor( 0xD9, 0xD9, 0xD9 ) );
Style_Table_BorderedLined.Create_Table_BorderedAndLined(new CDocumentColor(0x59, 0x59, 0x59), new CDocumentColor(0x7F, 0x7F, 0x7F), new CDocumentColor(0xD9, 0xD9, 0xD9), new CDocumentColor(0xF2, 0xF2, 0xF2));
this.Add( Style_Table_BorderedLined );
var Style_Table_BorderedLined_Accent1 = new CStyle("Bordered & Lined - Accent 1", this.Default.Table, null, styletype_Table );
Style_Table_BorderedLined_Accent1.Create_Table_BorderedAndLined( new CDocumentColor( 0x17, 0x36, 0x5D ), new CDocumentColor( 0x8D, 0xB3, 0xE2 ), new CDocumentColor( 0xDB, 0xE5, 0xF1 ) );
Style_Table_BorderedLined_Accent1.Create_Table_BorderedAndLined(new CDocumentColor(0x1F, 0x49, 0x7D), new CDocumentColor(0x54, 0x8D, 0xD4), new CDocumentColor(0xC6, 0xD9, 0xF1), new CDocumentColor(0xC6, 0xD9, 0xF1));
this.Add( Style_Table_BorderedLined_Accent1 );
var Style_Table_BorderedLined_Accent2 = new CStyle("Bordered & Lined - Accent 2", this.Default.Table, null, styletype_Table );
Style_Table_BorderedLined_Accent2.Create_Table_BorderedAndLined( new CDocumentColor( 0x94, 0x36, 0x34 ), new CDocumentColor( 0xD9, 0x95, 0x94 ), new CDocumentColor( 0xF2, 0xDB, 0xDB ) );
Style_Table_BorderedLined_Accent2.Create_Table_BorderedAndLined( new CDocumentColor(0xC0, 0x50, 0x4D), new CDocumentColor(0xD9, 0x95, 0x94), new CDocumentColor(0xF2, 0xDB, 0xDB), new CDocumentColor(0xF2, 0xDB, 0xDB));
this.Add( Style_Table_BorderedLined_Accent2 );
var Style_Table_BorderedLined_Accent3 = new CStyle("Bordered & Lined - Accent 3", this.Default.Table, null, styletype_Table );
Style_Table_BorderedLined_Accent3.Create_Table_BorderedAndLined( new CDocumentColor( 0x76, 0x92, 0x3C ), new CDocumentColor( 0xC2, 0xD6, 0x9B ), new CDocumentColor( 0xEA, 0xF1, 0xDD ) );
Style_Table_BorderedLined_Accent3.Create_Table_BorderedAndLined( new CDocumentColor(0x76, 0x92, 0x3C), new CDocumentColor(0x9B, 0xBB, 0x59), new CDocumentColor(0xEA, 0xF1, 0xDD), new CDocumentColor(0xEA, 0xF1, 0xDD));
this.Add( Style_Table_BorderedLined_Accent3 );
var Style_Table_BorderedLined_Accent4 = new CStyle("Bordered & Lined - Accent 4", this.Default.Table, null, styletype_Table );
Style_Table_BorderedLined_Accent4.Create_Table_BorderedAndLined( new CDocumentColor( 0x5F, 0x49, 0x7A ), new CDocumentColor( 0xB2, 0xA1, 0xC7 ), new CDocumentColor( 0xE5, 0xDF, 0xEC ) );
Style_Table_BorderedLined_Accent4.Create_Table_BorderedAndLined( new CDocumentColor(0x80, 0x64, 0xA2), new CDocumentColor(0xB2, 0xA1, 0xC7), new CDocumentColor(0xE5, 0xDF, 0xEC), new CDocumentColor(0xE5, 0xDF, 0xEC));
this.Add( Style_Table_BorderedLined_Accent4 );
var Style_Table_BorderedLined_Accent5 = new CStyle("Bordered & Lined - Accent 5", this.Default.Table, null, styletype_Table );
Style_Table_BorderedLined_Accent5.Create_Table_BorderedAndLined( new CDocumentColor( 0x31, 0x84, 0x9B ), new CDocumentColor( 0x92, 0xCD, 0xDC ), new CDocumentColor( 0xDA, 0xEE, 0xF3 ) );
Style_Table_BorderedLined_Accent5.Create_Table_BorderedAndLined( new CDocumentColor(0x31, 0x84, 0x9B), new CDocumentColor(0x4B, 0xAC, 0xC6), new CDocumentColor(0xDA, 0xEE, 0xF3), new CDocumentColor(0xDA, 0xEE, 0xF3));
this.Add( Style_Table_BorderedLined_Accent5 );
var Style_Table_BorderedLined_Accent6 = new CStyle("Bordered & Lined - Accent 6", this.Default.Table, null, styletype_Table );
Style_Table_BorderedLined_Accent6.Create_Table_BorderedAndLined( new CDocumentColor( 0xE3, 0x6C, 0x0A ), new CDocumentColor( 0xFA, 0xBF, 0x8F ), new CDocumentColor( 0xFD, 0xE9, 0xD9 ) );
Style_Table_BorderedLined_Accent6.Create_Table_BorderedAndLined( new CDocumentColor(0xE3, 0x6C, 0x0A), new CDocumentColor(0xF7, 0x96, 0x46), new CDocumentColor(0xFD, 0xE9, 0xD9), new CDocumentColor(0xFD, 0xE9, 0xD9));
this.Add( Style_Table_BorderedLined_Accent6 );
// Создаем стиль гиперссылки
......@@ -4762,7 +4833,7 @@ CDocumentShd.prototype =
if ( shd_Nil != Shd.Value )
{
if( undefined != Shd.Color )
this.Color.Set( Shd.Color.r, Shd.Color.g, Shd.Color.b );
this.Color.Set( Shd.Color.r, Shd.Color.g, Shd.Color.b, Shd.Color.Auto );
if(undefined != Shd.Unifill)
{
this.Unifill = Shd.Unifill.createDuplicate();
......
......@@ -21248,6 +21248,24 @@ CTableCell.prototype =
{
TextPr = TablePr.TableWholeTable.TextPr.Copy();
}
// Совместим настройки с настройками для групп строк. Сначала группы строк, потом группы колонок.
if ( true === TableLook.Is_BandHor() )
{
var RowBandSize = TablePr.TablePr.TableStyleRowBandSize;
var __RowIndex = ( true != TableLook.Is_FirstRow() ? RowIndex : RowIndex - 1 )
var _RowIndex = ( 1 != RowBandSize ? Math.floor( __RowIndex / RowBandSize ) : __RowIndex );
var TableBandStyle = null;
if ( 0 === _RowIndex % 2 )
TableBandStyle = TablePr.TableBand1Horz;
else
TableBandStyle = TablePr.TableBand2Horz;
CellPr.Merge( TableBandStyle.TableCellPr );
TextPr.Merge( TableBandStyle.TextPr );
ParaPr.Merge( TableBandStyle.ParaPr );
}
// Совместим с настройками для групп колонок
// Согласно спецификации DOCX, совмещать надо всегда, но для первой и последней колонок Word
// не совмещает, поэтому делаем также.
......@@ -21267,22 +21285,6 @@ CTableCell.prototype =
ParaPr.Merge( TableBandStyle.ParaPr );
}
// Совместим настройки с настройками для групп строк
if ( true === TableLook.Is_BandHor() )
{
var RowBandSize = TablePr.TablePr.TableStyleRowBandSize;
var __RowIndex = ( true != TableLook.Is_FirstRow() ? RowIndex : RowIndex - 1 )
var _RowIndex = ( 1 != RowBandSize ? Math.floor( __RowIndex / RowBandSize ) : __RowIndex );
var TableBandStyle = null;
if ( 0 === _RowIndex % 2 )
TableBandStyle = TablePr.TableBand1Horz;
else
TableBandStyle = TablePr.TableBand2Horz;
CellPr.Merge( TableBandStyle.TableCellPr );
TextPr.Merge( TableBandStyle.TextPr );
ParaPr.Merge( TableBandStyle.ParaPr );
}
// Совместим настройки с настройками для последней колонки
if ( true === TableLook.Is_LastCol() && this.Row.Get_CellsCount() - 1 === CellIndex )
......
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