Доп коммит
This commit is contained in:
parent
243f9e7db0
commit
f9a3b82b02
@ -145,7 +145,9 @@ namespace GarmentFactoryBusinessLogic.OfficePackage.Implements
|
|||||||
_table = new Table();
|
_table = new Table();
|
||||||
|
|
||||||
var tableProp = new TableProperties();
|
var tableProp = new TableProperties();
|
||||||
|
//фиксированные значения столбцов/строк
|
||||||
tableProp.AppendChild(new TableLayout { Type = TableLayoutValues.Fixed });
|
tableProp.AppendChild(new TableLayout { Type = TableLayoutValues.Fixed });
|
||||||
|
//задание всех границ (внешних и внутренних)
|
||||||
tableProp.AppendChild(new TableBorders(
|
tableProp.AppendChild(new TableBorders(
|
||||||
new TopBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4 },
|
new TopBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4 },
|
||||||
new LeftBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4 },
|
new LeftBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4 },
|
||||||
@ -154,10 +156,11 @@ namespace GarmentFactoryBusinessLogic.OfficePackage.Implements
|
|||||||
new InsideHorizontalBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4 },
|
new InsideHorizontalBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4 },
|
||||||
new InsideVerticalBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4 }
|
new InsideVerticalBorder() { Val = new EnumValue<BorderValues>(BorderValues.Single), Size = 4 }
|
||||||
));
|
));
|
||||||
tableProp.AppendChild(new TableWidth { Type = TableWidthUnitValues.Auto });
|
|
||||||
_table.AppendChild(tableProp);
|
_table.AppendChild(tableProp);
|
||||||
|
|
||||||
|
//сетка таблцы(строки/столбцы)
|
||||||
TableGrid tableGrid = new TableGrid();
|
TableGrid tableGrid = new TableGrid();
|
||||||
|
//columns - передаваемые размеры (ширина) столбцов
|
||||||
foreach (var column in columns)
|
foreach (var column in columns)
|
||||||
{
|
{
|
||||||
tableGrid.AppendChild(new GridColumn() { Width = column });
|
tableGrid.AppendChild(new GridColumn() { Width = column });
|
||||||
@ -186,6 +189,7 @@ namespace GarmentFactoryBusinessLogic.OfficePackage.Implements
|
|||||||
|
|
||||||
foreach (var run in paragraph.Texts)
|
foreach (var run in paragraph.Texts)
|
||||||
{
|
{
|
||||||
|
//задание свойств для каждого текста в абзаце
|
||||||
var docRun = new Run();
|
var docRun = new Run();
|
||||||
|
|
||||||
var properties = new RunProperties();
|
var properties = new RunProperties();
|
||||||
@ -197,10 +201,10 @@ namespace GarmentFactoryBusinessLogic.OfficePackage.Implements
|
|||||||
docRun.AppendChild(properties);
|
docRun.AppendChild(properties);
|
||||||
|
|
||||||
docRun.AppendChild(new Text { Text = run.Item1, Space = SpaceProcessingModeValues.Preserve });
|
docRun.AppendChild(new Text { Text = run.Item1, Space = SpaceProcessingModeValues.Preserve });
|
||||||
|
//добавления текста в абзац
|
||||||
docParagraph.AppendChild(docRun);
|
docParagraph.AppendChild(docRun);
|
||||||
}
|
}
|
||||||
|
//добавление абзаца в ячейку, а ячейки в строку
|
||||||
TableCell docCell = new TableCell();
|
TableCell docCell = new TableCell();
|
||||||
docCell.AppendChild(docParagraph);
|
docCell.AppendChild(docParagraph);
|
||||||
docRow.AppendChild(docCell);
|
docRow.AppendChild(docCell);
|
||||||
|
Loading…
Reference in New Issue
Block a user