-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathXLSX_Helpers.cs
1756 lines (1294 loc) · 88.7 KB
/
XLSX_Helpers.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DocumentFormat.OpenXml.Packaging;
using DocumentFormat.OpenXml.Spreadsheet;
using DocumentFormat.OpenXml;
using X14 = DocumentFormat.OpenXml.Office2010.Excel;
using X15 = DocumentFormat.OpenXml.Office2013.Excel;
using A = DocumentFormat.OpenXml.Drawing;
using X15ac = DocumentFormat.OpenXml.Office2013.ExcelAc;
using Ap = DocumentFormat.OpenXml.ExtendedProperties;
using Vt = DocumentFormat.OpenXml.VariantTypes;
using System.Text.RegularExpressions;
using System.Globalization;
namespace XlsAutoReportWindowsService.XLSX
{
class XLSX_Helpers
{
//Метод убирает из строки запрещенные спец символы.
//Если не использовать, то при наличии в строке таких символов, вылетит ошибка.
public static string ReplaceHexadecimalSymbols(string txt)
{
string r = "[\x00-\x08\x0B\x0C\x0E-\x1F\x26]";
if (txt != null)
return Regex.Replace(txt, r, "", RegexOptions.Compiled);
else
return "---";
}
public static string GetCellReference(int colIndex, uint rowInd)
{
int div = colIndex;
string colLetter = String.Empty;
int mod = 0;
while (div > 0)
{
mod = (div - 1) % 26;
colLetter = (char)(65 + mod) + colLetter;
div = (int)((div - mod) / 26);
}
return colLetter + rowInd.ToString();
}
/*Метод добавления текста в sharedStringTable*/
public static int InsertSharedStringItem(string text, SharedStringTablePart shareStringPart)
{
// If the part does not contain a SharedStringTable, create one.
if (shareStringPart.SharedStringTable == null)
{
shareStringPart.SharedStringTable = new SharedStringTable();
}
int i = 0;
// Iterate through all the items in the SharedStringTable. If the text already exists, return its index.
foreach (SharedStringItem item in shareStringPart.SharedStringTable.Elements<SharedStringItem>())
{
if (item.InnerText == text)
{
return i;
}
i++;
}
// The text does not exist in the part. Create the SharedStringItem and return its index.
shareStringPart.SharedStringTable.AppendChild(new SharedStringItem(new DocumentFormat.OpenXml.Spreadsheet.Text(text)));
shareStringPart.SharedStringTable.Save();
return i;
}
/*
Метод добавления ячейки в строку
на входе: строка, столбец, значение, тип значения, необязательный параметр - стиль
*/
public static int InsertCellToRow(Row row, int cellNum, string val, SharedStringTablePart sstp, uint style = 0U)
{
if (val != null)
{
string cellRef = GetCellReference(cellNum, row.RowIndex);
Cell refCell = null;
Cell newCell = new Cell() { CellReference = cellRef, StyleIndex = style };
row.InsertBefore(newCell, refCell);
decimal tmp = 0;
int tmp2 = 0;
DateTime tmp3 = DateTime.Now;
if (decimal.TryParse(val.Replace(',', '.'), out tmp))
{
newCell.DataType = new EnumValue<CellValues>(CellValues.Number);
newCell.CellValue = new CellValue(val);
}
else if (int.TryParse(val.Replace(',', '.'), out tmp2))
{
newCell.DataType = new EnumValue<CellValues>(CellValues.Number);
newCell.CellValue = new CellValue(val);
}
/* else if (DateTime.TryParseExact(val, "dd.MM.yyyy", CultureInfo.CurrentCulture, DateTimeStyles.None, out tmp3)) {
newCell.DataType = new EnumValue<CellValues>(CellValues.Date);
newCell.CellValue = new CellValue(val);
}
else if (DateTime.TryParseExact(val, "HH:mm:ss", CultureInfo.CurrentCulture, DateTimeStyles.None, out tmp3))
{
newCell.DataType = new EnumValue<CellValues>(CellValues.Number);
newCell.CellValue = new CellValue(val);
} */
else
{
newCell.CellValue = new CellValue(InsertSharedStringItem(val, sstp).ToString());
newCell.DataType = new EnumValue<CellValues>(CellValues.SharedString);
}
cellNum++;
}
return cellNum;
}
internal static ThemePart GenerateThemePartContent(ThemePart themePart)
{
A.Theme theme = new A.Theme() { Name = "Тема Office" };
theme.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");
A.ThemeElements themeElements = new A.ThemeElements();
A.ColorScheme colorScheme = new A.ColorScheme() { Name = "Стандартная" };
A.Dark1Color dark1Color = new A.Dark1Color();
A.SystemColor systemColor1 = new A.SystemColor() { Val = A.SystemColorValues.WindowText, LastColor = "000000" };
dark1Color.Append(systemColor1);
A.Light1Color light1Color = new A.Light1Color();
A.SystemColor systemColor2 = new A.SystemColor() { Val = A.SystemColorValues.Window, LastColor = "FFFFFF" };
light1Color.Append(systemColor2);
A.Dark2Color dark2Color = new A.Dark2Color();
A.RgbColorModelHex rgbColorModelHex1 = new A.RgbColorModelHex() { Val = "44546A" };
dark2Color.Append(rgbColorModelHex1);
A.Light2Color light2Color = new A.Light2Color();
A.RgbColorModelHex rgbColorModelHex2 = new A.RgbColorModelHex() { Val = "E7E6E6" };
light2Color.Append(rgbColorModelHex2);
A.Accent1Color accent1Color = new A.Accent1Color();
A.RgbColorModelHex rgbColorModelHex3 = new A.RgbColorModelHex() { Val = "5B9BD5" };
accent1Color.Append(rgbColorModelHex3);
A.Accent2Color accent2Color = new A.Accent2Color();
A.RgbColorModelHex rgbColorModelHex4 = new A.RgbColorModelHex() { Val = "ED7D31" };
accent2Color.Append(rgbColorModelHex4);
A.Accent3Color accent3Color = new A.Accent3Color();
A.RgbColorModelHex rgbColorModelHex5 = new A.RgbColorModelHex() { Val = "A5A5A5" };
accent3Color.Append(rgbColorModelHex5);
A.Accent4Color accent4Color = new A.Accent4Color();
A.RgbColorModelHex rgbColorModelHex6 = new A.RgbColorModelHex() { Val = "FFC000" };
accent4Color.Append(rgbColorModelHex6);
A.Accent5Color accent5Color = new A.Accent5Color();
A.RgbColorModelHex rgbColorModelHex7 = new A.RgbColorModelHex() { Val = "4472C4" };
accent5Color.Append(rgbColorModelHex7);
A.Accent6Color accent6Color = new A.Accent6Color();
A.RgbColorModelHex rgbColorModelHex8 = new A.RgbColorModelHex() { Val = "70AD47" };
accent6Color.Append(rgbColorModelHex8);
A.Hyperlink hyperlink = new A.Hyperlink();
A.RgbColorModelHex rgbColorModelHex9 = new A.RgbColorModelHex() { Val = "0563C1" };
hyperlink.Append(rgbColorModelHex9);
A.FollowedHyperlinkColor followedHyperlinkColor = new A.FollowedHyperlinkColor();
A.RgbColorModelHex rgbColorModelHex10 = new A.RgbColorModelHex() { Val = "954F72" };
followedHyperlinkColor.Append(rgbColorModelHex10);
colorScheme.Append(dark1Color);
colorScheme.Append(light1Color);
colorScheme.Append(dark2Color);
colorScheme.Append(light2Color);
colorScheme.Append(accent1Color);
colorScheme.Append(accent2Color);
colorScheme.Append(accent3Color);
colorScheme.Append(accent4Color);
colorScheme.Append(accent5Color);
colorScheme.Append(accent6Color);
colorScheme.Append(hyperlink);
colorScheme.Append(followedHyperlinkColor);
A.FontScheme fontScheme2 = new A.FontScheme() { Name = "Стандартная" };
A.MajorFont majorFont = new A.MajorFont();
majorFont.Append(new A.LatinFont() { Typeface = "Calibri Light", Panose = "020F0302020204030204" });
majorFont.Append(new A.EastAsianFont() { Typeface = "" });
majorFont.Append(new A.ComplexScriptFont() { Typeface = "" });
majorFont.Append(new A.SupplementalFont() { Script = "Jpan", Typeface = "游ゴシック Light" });
majorFont.Append(new A.SupplementalFont() { Script = "Hang", Typeface = "맑은 고딕" });
majorFont.Append(new A.SupplementalFont() { Script = "Hans", Typeface = "等线 Light" });
majorFont.Append(new A.SupplementalFont() { Script = "Hant", Typeface = "新細明體" });
majorFont.Append(new A.SupplementalFont() { Script = "Arab", Typeface = "Times New Roman" });
majorFont.Append(new A.SupplementalFont() { Script = "Hebr", Typeface = "Times New Roman" });
majorFont.Append(new A.SupplementalFont() { Script = "Thai", Typeface = "Tahoma" });
majorFont.Append(new A.SupplementalFont() { Script = "Ethi", Typeface = "Nyala" });
majorFont.Append(new A.SupplementalFont() { Script = "Beng", Typeface = "Vrinda" });
majorFont.Append(new A.SupplementalFont() { Script = "Gujr", Typeface = "Shruti" });
majorFont.Append(new A.SupplementalFont() { Script = "Khmr", Typeface = "MoolBoran" });
majorFont.Append(new A.SupplementalFont() { Script = "Knda", Typeface = "Tunga" });
majorFont.Append(new A.SupplementalFont() { Script = "Guru", Typeface = "Raavi" });
majorFont.Append(new A.SupplementalFont() { Script = "Cans", Typeface = "Euphemia" });
majorFont.Append(new A.SupplementalFont() { Script = "Cher", Typeface = "Plantagenet Cherokee" });
majorFont.Append(new A.SupplementalFont() { Script = "Yiii", Typeface = "Microsoft Yi Baiti" });
majorFont.Append(new A.SupplementalFont() { Script = "Tibt", Typeface = "Microsoft Himalaya" });
majorFont.Append(new A.SupplementalFont() { Script = "Thaa", Typeface = "MV Boli" });
majorFont.Append(new A.SupplementalFont() { Script = "Deva", Typeface = "Mangal" });
majorFont.Append(new A.SupplementalFont() { Script = "Telu", Typeface = "Gautami" });
majorFont.Append(new A.SupplementalFont() { Script = "Taml", Typeface = "Latha" });
majorFont.Append(new A.SupplementalFont() { Script = "Syrc", Typeface = "Estrangelo Edessa" });
majorFont.Append(new A.SupplementalFont() { Script = "Orya", Typeface = "Kalinga" });
majorFont.Append(new A.SupplementalFont() { Script = "Mlym", Typeface = "Kartika" });
majorFont.Append(new A.SupplementalFont() { Script = "Laoo", Typeface = "DokChampa" });
majorFont.Append(new A.SupplementalFont() { Script = "Sinh", Typeface = "Iskoola Pota" });
majorFont.Append(new A.SupplementalFont() { Script = "Mong", Typeface = "Mongolian Baiti" });
majorFont.Append(new A.SupplementalFont() { Script = "Viet", Typeface = "Times New Roman" });
majorFont.Append(new A.SupplementalFont() { Script = "Uigh", Typeface = "Microsoft Uighur" });
majorFont.Append(new A.SupplementalFont() { Script = "Geor", Typeface = "Sylfaen" });
A.MinorFont minorFont = new A.MinorFont();
minorFont.Append(new A.LatinFont() { Typeface = "Calibri", Panose = "020F0502020204030204" });
minorFont.Append(new A.EastAsianFont() { Typeface = "" });
minorFont.Append(new A.ComplexScriptFont() { Typeface = "" });
minorFont.Append(new A.SupplementalFont() { Script = "Jpan", Typeface = "游ゴシック" });
minorFont.Append(new A.SupplementalFont() { Script = "Hang", Typeface = "맑은 고딕" });
minorFont.Append(new A.SupplementalFont() { Script = "Hans", Typeface = "等线" });
minorFont.Append(new A.SupplementalFont() { Script = "Hant", Typeface = "新細明體" });
minorFont.Append(new A.SupplementalFont() { Script = "Arab", Typeface = "Arial" });
minorFont.Append(new A.SupplementalFont() { Script = "Hebr", Typeface = "Arial" });
minorFont.Append(new A.SupplementalFont() { Script = "Thai", Typeface = "Tahoma" });
minorFont.Append(new A.SupplementalFont() { Script = "Ethi", Typeface = "Nyala" });
minorFont.Append(new A.SupplementalFont() { Script = "Beng", Typeface = "Vrinda" });
minorFont.Append(new A.SupplementalFont() { Script = "Gujr", Typeface = "Shruti" });
minorFont.Append(new A.SupplementalFont() { Script = "Khmr", Typeface = "DaunPenh" });
minorFont.Append(new A.SupplementalFont() { Script = "Knda", Typeface = "Tunga" });
minorFont.Append(new A.SupplementalFont() { Script = "Guru", Typeface = "Raavi" });
minorFont.Append(new A.SupplementalFont() { Script = "Cans", Typeface = "Euphemia" });
minorFont.Append(new A.SupplementalFont() { Script = "Cher", Typeface = "Plantagenet Cherokee" });
minorFont.Append(new A.SupplementalFont() { Script = "Yiii", Typeface = "Microsoft Yi Baiti" });
minorFont.Append(new A.SupplementalFont() { Script = "Tibt", Typeface = "Microsoft Himalaya" });
minorFont.Append(new A.SupplementalFont() { Script = "Thaa", Typeface = "MV Boli" });
minorFont.Append(new A.SupplementalFont() { Script = "Deva", Typeface = "Mangal" });
minorFont.Append(new A.SupplementalFont() { Script = "Telu", Typeface = "Gautami" });
minorFont.Append(new A.SupplementalFont() { Script = "Taml", Typeface = "Latha" });
minorFont.Append(new A.SupplementalFont() { Script = "Syrc", Typeface = "Estrangelo Edessa" });
minorFont.Append(new A.SupplementalFont() { Script = "Orya", Typeface = "Kalinga" });
minorFont.Append(new A.SupplementalFont() { Script = "Mlym", Typeface = "Kartika" });
minorFont.Append(new A.SupplementalFont() { Script = "Laoo", Typeface = "DokChampa" });
minorFont.Append(new A.SupplementalFont() { Script = "Sinh", Typeface = "Iskoola Pota" });
minorFont.Append(new A.SupplementalFont() { Script = "Mong", Typeface = "Mongolian Baiti" });
minorFont.Append(new A.SupplementalFont() { Script = "Viet", Typeface = "Arial" });
minorFont.Append(new A.SupplementalFont() { Script = "Uigh", Typeface = "Microsoft Uighur" });
minorFont.Append(new A.SupplementalFont() { Script = "Geor", Typeface = "Sylfaen" });
fontScheme2.Append(majorFont);
fontScheme2.Append(minorFont);
A.FormatScheme formatScheme = new A.FormatScheme() { Name = "Стандартная" };
A.FillStyleList fillStyleList = new A.FillStyleList();
A.SolidFill solidFill1 = new A.SolidFill();
A.SchemeColor schemeColor1 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
solidFill1.Append(schemeColor1);
A.GradientFill gradientFill1 = new A.GradientFill() { RotateWithShape = true };
A.GradientStopList gradientStopList1 = new A.GradientStopList();
A.GradientStop gradientStop1 = new A.GradientStop() { Position = 0 };
A.SchemeColor schemeColor2 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.LuminanceModulation luminanceModulation1 = new A.LuminanceModulation() { Val = 110000 };
A.SaturationModulation saturationModulation1 = new A.SaturationModulation() { Val = 105000 };
A.Tint tint1 = new A.Tint() { Val = 67000 };
schemeColor2.Append(luminanceModulation1);
schemeColor2.Append(saturationModulation1);
schemeColor2.Append(tint1);
gradientStop1.Append(schemeColor2);
A.GradientStop gradientStop2 = new A.GradientStop() { Position = 50000 };
A.SchemeColor schemeColor3 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.LuminanceModulation luminanceModulation2 = new A.LuminanceModulation() { Val = 105000 };
A.SaturationModulation saturationModulation2 = new A.SaturationModulation() { Val = 103000 };
A.Tint tint2 = new A.Tint() { Val = 73000 };
schemeColor3.Append(luminanceModulation2);
schemeColor3.Append(saturationModulation2);
schemeColor3.Append(tint2);
gradientStop2.Append(schemeColor3);
A.GradientStop gradientStop3 = new A.GradientStop() { Position = 100000 };
A.SchemeColor schemeColor4 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.LuminanceModulation luminanceModulation3 = new A.LuminanceModulation() { Val = 105000 };
A.SaturationModulation saturationModulation3 = new A.SaturationModulation() { Val = 109000 };
A.Tint tint3 = new A.Tint() { Val = 81000 };
schemeColor4.Append(luminanceModulation3);
schemeColor4.Append(saturationModulation3);
schemeColor4.Append(tint3);
gradientStop3.Append(schemeColor4);
gradientStopList1.Append(gradientStop1);
gradientStopList1.Append(gradientStop2);
gradientStopList1.Append(gradientStop3);
A.LinearGradientFill linearGradientFill1 = new A.LinearGradientFill() { Angle = 5400000, Scaled = false };
gradientFill1.Append(gradientStopList1);
gradientFill1.Append(linearGradientFill1);
A.GradientFill gradientFill2 = new A.GradientFill() { RotateWithShape = true };
A.GradientStopList gradientStopList2 = new A.GradientStopList();
A.GradientStop gradientStop4 = new A.GradientStop() { Position = 0 };
A.SchemeColor schemeColor5 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.SaturationModulation saturationModulation4 = new A.SaturationModulation() { Val = 103000 };
A.LuminanceModulation luminanceModulation4 = new A.LuminanceModulation() { Val = 102000 };
A.Tint tint4 = new A.Tint() { Val = 94000 };
schemeColor5.Append(saturationModulation4);
schemeColor5.Append(luminanceModulation4);
schemeColor5.Append(tint4);
gradientStop4.Append(schemeColor5);
A.GradientStop gradientStop5 = new A.GradientStop() { Position = 50000 };
A.SchemeColor schemeColor6 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.SaturationModulation saturationModulation5 = new A.SaturationModulation() { Val = 110000 };
A.LuminanceModulation luminanceModulation5 = new A.LuminanceModulation() { Val = 100000 };
A.Shade shade1 = new A.Shade() { Val = 100000 };
schemeColor6.Append(saturationModulation5);
schemeColor6.Append(luminanceModulation5);
schemeColor6.Append(shade1);
gradientStop5.Append(schemeColor6);
A.GradientStop gradientStop6 = new A.GradientStop() { Position = 100000 };
A.SchemeColor schemeColor7 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.LuminanceModulation luminanceModulation6 = new A.LuminanceModulation() { Val = 99000 };
A.SaturationModulation saturationModulation6 = new A.SaturationModulation() { Val = 120000 };
A.Shade shade2 = new A.Shade() { Val = 78000 };
schemeColor7.Append(luminanceModulation6);
schemeColor7.Append(saturationModulation6);
schemeColor7.Append(shade2);
gradientStop6.Append(schemeColor7);
gradientStopList2.Append(gradientStop4);
gradientStopList2.Append(gradientStop5);
gradientStopList2.Append(gradientStop6);
A.LinearGradientFill linearGradientFill2 = new A.LinearGradientFill() { Angle = 5400000, Scaled = false };
gradientFill2.Append(gradientStopList2);
gradientFill2.Append(linearGradientFill2);
fillStyleList.Append(solidFill1);
fillStyleList.Append(gradientFill1);
fillStyleList.Append(gradientFill2);
A.LineStyleList lineStyleList = new A.LineStyleList();
A.Outline outline1 = new A.Outline() { Width = 6350, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center };
A.SolidFill solidFill2 = new A.SolidFill();
A.SchemeColor schemeColor8 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
solidFill2.Append(schemeColor8);
A.PresetDash presetDash1 = new A.PresetDash() { Val = A.PresetLineDashValues.Solid };
A.Miter miter1 = new A.Miter() { Limit = 800000 };
outline1.Append(solidFill2);
outline1.Append(presetDash1);
outline1.Append(miter1);
A.Outline outline2 = new A.Outline() { Width = 12700, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center };
A.SolidFill solidFill3 = new A.SolidFill();
A.SchemeColor schemeColor9 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
solidFill3.Append(schemeColor9);
A.PresetDash presetDash2 = new A.PresetDash() { Val = A.PresetLineDashValues.Solid };
A.Miter miter2 = new A.Miter() { Limit = 800000 };
outline2.Append(solidFill3);
outline2.Append(presetDash2);
outline2.Append(miter2);
A.Outline outline3 = new A.Outline() { Width = 19050, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center };
A.SolidFill solidFill4 = new A.SolidFill();
A.SchemeColor schemeColor10 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
solidFill4.Append(schemeColor10);
A.PresetDash presetDash3 = new A.PresetDash() { Val = A.PresetLineDashValues.Solid };
A.Miter miter3 = new A.Miter() { Limit = 800000 };
outline3.Append(solidFill4);
outline3.Append(presetDash3);
outline3.Append(miter3);
lineStyleList.Append(outline1);
lineStyleList.Append(outline2);
lineStyleList.Append(outline3);
A.EffectStyleList effectStyleList = new A.EffectStyleList();
A.EffectStyle effectStyle1 = new A.EffectStyle();
A.EffectList effectList1 = new A.EffectList();
effectStyle1.Append(effectList1);
A.EffectStyle effectStyle2 = new A.EffectStyle();
A.EffectList effectList2 = new A.EffectList();
effectStyle2.Append(effectList2);
A.EffectStyle effectStyle3 = new A.EffectStyle();
A.EffectList effectList3 = new A.EffectList();
A.OuterShadow outerShadow1 = new A.OuterShadow() { BlurRadius = 57150L, Distance = 19050L, Direction = 5400000, Alignment = A.RectangleAlignmentValues.Center, RotateWithShape = false };
A.RgbColorModelHex rgbColorModelHex11 = new A.RgbColorModelHex() { Val = "000000" };
A.Alpha alpha1 = new A.Alpha() { Val = 63000 };
rgbColorModelHex11.Append(alpha1);
outerShadow1.Append(rgbColorModelHex11);
effectList3.Append(outerShadow1);
effectStyle3.Append(effectList3);
effectStyleList.Append(effectStyle1);
effectStyleList.Append(effectStyle2);
effectStyleList.Append(effectStyle3);
A.BackgroundFillStyleList backgroundFillStyleList = new A.BackgroundFillStyleList();
A.SolidFill solidFill5 = new A.SolidFill();
A.SchemeColor schemeColor11 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
solidFill5.Append(schemeColor11);
A.SolidFill solidFill6 = new A.SolidFill();
A.SchemeColor schemeColor12 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.Tint tint5 = new A.Tint() { Val = 95000 };
A.SaturationModulation saturationModulation7 = new A.SaturationModulation() { Val = 170000 };
schemeColor12.Append(tint5);
schemeColor12.Append(saturationModulation7);
solidFill6.Append(schemeColor12);
A.GradientFill gradientFill3 = new A.GradientFill() { RotateWithShape = true };
A.GradientStopList gradientStopList3 = new A.GradientStopList();
A.GradientStop gradientStop7 = new A.GradientStop() { Position = 0 };
A.SchemeColor schemeColor13 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.Tint tint6 = new A.Tint() { Val = 93000 };
A.SaturationModulation saturationModulation8 = new A.SaturationModulation() { Val = 150000 };
A.Shade shade3 = new A.Shade() { Val = 98000 };
A.LuminanceModulation luminanceModulation7 = new A.LuminanceModulation() { Val = 102000 };
schemeColor13.Append(tint6);
schemeColor13.Append(saturationModulation8);
schemeColor13.Append(shade3);
schemeColor13.Append(luminanceModulation7);
gradientStop7.Append(schemeColor13);
A.GradientStop gradientStop8 = new A.GradientStop() { Position = 50000 };
A.SchemeColor schemeColor14 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.Tint tint7 = new A.Tint() { Val = 98000 };
A.SaturationModulation saturationModulation9 = new A.SaturationModulation() { Val = 130000 };
A.Shade shade4 = new A.Shade() { Val = 90000 };
A.LuminanceModulation luminanceModulation8 = new A.LuminanceModulation() { Val = 103000 };
schemeColor14.Append(tint7);
schemeColor14.Append(saturationModulation9);
schemeColor14.Append(shade4);
schemeColor14.Append(luminanceModulation8);
gradientStop8.Append(schemeColor14);
A.GradientStop gradientStop9 = new A.GradientStop() { Position = 100000 };
A.SchemeColor schemeColor15 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.Shade shade5 = new A.Shade() { Val = 63000 };
A.SaturationModulation saturationModulation10 = new A.SaturationModulation() { Val = 120000 };
schemeColor15.Append(shade5);
schemeColor15.Append(saturationModulation10);
gradientStop9.Append(schemeColor15);
gradientStopList3.Append(gradientStop7);
gradientStopList3.Append(gradientStop8);
gradientStopList3.Append(gradientStop9);
A.LinearGradientFill linearGradientFill3 = new A.LinearGradientFill() { Angle = 5400000, Scaled = false };
gradientFill3.Append(gradientStopList3);
gradientFill3.Append(linearGradientFill3);
backgroundFillStyleList.Append(solidFill5);
backgroundFillStyleList.Append(solidFill6);
backgroundFillStyleList.Append(gradientFill3);
formatScheme.Append(fillStyleList);
formatScheme.Append(lineStyleList);
formatScheme.Append(effectStyleList);
formatScheme.Append(backgroundFillStyleList);
themeElements.Append(colorScheme);
themeElements.Append(fontScheme2);
themeElements.Append(formatScheme);
A.ObjectDefaults objectDefaults = new A.ObjectDefaults();
A.ExtraColorSchemeList extraColorSchemeList = new A.ExtraColorSchemeList();
A.OfficeStyleSheetExtensionList officeStyleSheetExtensionList = new A.OfficeStyleSheetExtensionList();
theme.Append(themeElements);
theme.Append(objectDefaults);
theme.Append(extraColorSchemeList);
theme.Append(officeStyleSheetExtensionList);
themePart.Theme = theme;
return themePart;
}
internal static ThemePart GenerateThemePartWeeklyReportContent(ThemePart themePart)
{
A.Theme theme = new A.Theme() { Name = "Тема Office" };
theme.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");
A.ThemeElements themeElements = new A.ThemeElements();
A.ColorScheme colorScheme = new A.ColorScheme() { Name = "Стандартная" };
A.Dark1Color dark1Color = new A.Dark1Color();
A.SystemColor systemColor = new A.SystemColor() { Val = A.SystemColorValues.WindowText, LastColor = "000000" };
dark1Color.Append(systemColor);
A.Light1Color light1Color = new A.Light1Color();
A.SystemColor systemColor2 = new A.SystemColor() { Val = A.SystemColorValues.Window, LastColor = "FFFFFF" };
light1Color.Append(systemColor2);
A.Dark2Color dark2Color = new A.Dark2Color();
A.RgbColorModelHex rgbColorModelHex1 = new A.RgbColorModelHex() { Val = "44546A" };
dark2Color.Append(rgbColorModelHex1);
A.Light2Color light2Color = new A.Light2Color();
A.RgbColorModelHex rgbColorModelHex2 = new A.RgbColorModelHex() { Val = "E7E6E6" };
light2Color.Append(rgbColorModelHex2);
A.Accent1Color accent1Color = new A.Accent1Color();
A.RgbColorModelHex rgbColorModelHex3 = new A.RgbColorModelHex() { Val = "5B9BD5" };
accent1Color.Append(rgbColorModelHex3);
A.Accent2Color accent2Color = new A.Accent2Color();
A.RgbColorModelHex rgbColorModelHex4 = new A.RgbColorModelHex() { Val = "ED7D31" };
accent2Color.Append(rgbColorModelHex4);
A.Accent3Color accent3Color = new A.Accent3Color();
A.RgbColorModelHex rgbColorModelHex5 = new A.RgbColorModelHex() { Val = "A5A5A5" };
accent3Color.Append(rgbColorModelHex5);
A.Accent4Color accent4Color = new A.Accent4Color();
A.RgbColorModelHex rgbColorModelHex6 = new A.RgbColorModelHex() { Val = "FFC000" };
accent4Color.Append(rgbColorModelHex6);
A.Accent5Color accent5Color = new A.Accent5Color();
A.RgbColorModelHex rgbColorModelHex7 = new A.RgbColorModelHex() { Val = "4472C4" };
accent5Color.Append(rgbColorModelHex7);
A.Accent6Color accent6Color = new A.Accent6Color();
A.RgbColorModelHex rgbColorModelHex8 = new A.RgbColorModelHex() { Val = "70AD47" };
accent6Color.Append(rgbColorModelHex8);
A.Hyperlink hyperlink = new A.Hyperlink();
A.RgbColorModelHex rgbColorModelHex9 = new A.RgbColorModelHex() { Val = "0563C1" };
hyperlink.Append(rgbColorModelHex9);
A.FollowedHyperlinkColor followedHyperlinkColor = new A.FollowedHyperlinkColor();
A.RgbColorModelHex rgbColorModelHex10 = new A.RgbColorModelHex() { Val = "954F72" };
followedHyperlinkColor.Append(rgbColorModelHex10);
colorScheme.Append(dark1Color);
colorScheme.Append(light1Color);
colorScheme.Append(dark2Color);
colorScheme.Append(light2Color);
colorScheme.Append(accent1Color);
colorScheme.Append(accent2Color);
colorScheme.Append(accent3Color);
colorScheme.Append(accent4Color);
colorScheme.Append(accent5Color);
colorScheme.Append(accent6Color);
colorScheme.Append(hyperlink);
colorScheme.Append(followedHyperlinkColor);
A.FontScheme fontScheme = new A.FontScheme() { Name = "Стандартная" };
A.MajorFont majorFont = new A.MajorFont();
majorFont.Append(new A.LatinFont() { Typeface = "Calibri Light", Panose = "020F0302020204030204" });
majorFont.Append(new A.EastAsianFont() { Typeface = "" });
majorFont.Append(new A.ComplexScriptFont() { Typeface = "" });
majorFont.Append(new A.SupplementalFont() { Script = "Jpan", Typeface = "游ゴシック Light" });
majorFont.Append(new A.SupplementalFont() { Script = "Hang", Typeface = "맑은 고딕" });
majorFont.Append(new A.SupplementalFont() { Script = "Hans", Typeface = "等线 Light" });
majorFont.Append(new A.SupplementalFont() { Script = "Hant", Typeface = "新細明體" });
majorFont.Append(new A.SupplementalFont() { Script = "Arab", Typeface = "Times New Roman" });
majorFont.Append(new A.SupplementalFont() { Script = "Hebr", Typeface = "Times New Roman" });
majorFont.Append(new A.SupplementalFont() { Script = "Thai", Typeface = "Tahoma" });
majorFont.Append(new A.SupplementalFont() { Script = "Ethi", Typeface = "Nyala" });
majorFont.Append(new A.SupplementalFont() { Script = "Beng", Typeface = "Vrinda" });
majorFont.Append(new A.SupplementalFont() { Script = "Gujr", Typeface = "Shruti" });
majorFont.Append(new A.SupplementalFont() { Script = "Khmr", Typeface = "MoolBoran" });
majorFont.Append(new A.SupplementalFont() { Script = "Knda", Typeface = "Tunga" });
majorFont.Append(new A.SupplementalFont() { Script = "Guru", Typeface = "Raavi" });
majorFont.Append(new A.SupplementalFont() { Script = "Cans", Typeface = "Euphemia" });
majorFont.Append(new A.SupplementalFont() { Script = "Cher", Typeface = "Plantagenet Cherokee" });
majorFont.Append(new A.SupplementalFont() { Script = "Yiii", Typeface = "Microsoft Yi Baiti" });
majorFont.Append(new A.SupplementalFont() { Script = "Tibt", Typeface = "Microsoft Himalaya" });
majorFont.Append(new A.SupplementalFont() { Script = "Thaa", Typeface = "MV Boli" });
majorFont.Append(new A.SupplementalFont() { Script = "Deva", Typeface = "Mangal" });
majorFont.Append(new A.SupplementalFont() { Script = "Telu", Typeface = "Gautami" });
majorFont.Append(new A.SupplementalFont() { Script = "Taml", Typeface = "Latha" });
majorFont.Append(new A.SupplementalFont() { Script = "Syrc", Typeface = "Estrangelo Edessa" });
majorFont.Append(new A.SupplementalFont() { Script = "Orya", Typeface = "Kalinga" });
majorFont.Append(new A.SupplementalFont() { Script = "Mlym", Typeface = "Kartika" });
majorFont.Append(new A.SupplementalFont() { Script = "Laoo", Typeface = "DokChampa" });
majorFont.Append(new A.SupplementalFont() { Script = "Sinh", Typeface = "Iskoola Pota" });
majorFont.Append(new A.SupplementalFont() { Script = "Mong", Typeface = "Mongolian Baiti" });
majorFont.Append(new A.SupplementalFont() { Script = "Viet", Typeface = "Times New Roman" });
majorFont.Append(new A.SupplementalFont() { Script = "Uigh", Typeface = "Microsoft Uighur" });
majorFont.Append(new A.SupplementalFont() { Script = "Geor", Typeface = "Sylfaen" });
A.MinorFont minorFont = new A.MinorFont();
minorFont.Append(new A.LatinFont() { Typeface = "Calibri", Panose = "020F0502020204030204" });
minorFont.Append(new A.EastAsianFont() { Typeface = "" });
minorFont.Append(new A.ComplexScriptFont() { Typeface = "" });
minorFont.Append(new A.SupplementalFont() { Script = "Jpan", Typeface = "游ゴシック" });
minorFont.Append(new A.SupplementalFont() { Script = "Hang", Typeface = "맑은 고딕" });
minorFont.Append(new A.SupplementalFont() { Script = "Hans", Typeface = "等线" });
minorFont.Append(new A.SupplementalFont() { Script = "Hant", Typeface = "新細明體" });
minorFont.Append(new A.SupplementalFont() { Script = "Arab", Typeface = "Arial" });
minorFont.Append(new A.SupplementalFont() { Script = "Hebr", Typeface = "Arial" });
minorFont.Append(new A.SupplementalFont() { Script = "Thai", Typeface = "Tahoma" });
minorFont.Append(new A.SupplementalFont() { Script = "Ethi", Typeface = "Nyala" });
minorFont.Append(new A.SupplementalFont() { Script = "Beng", Typeface = "Vrinda" });
minorFont.Append(new A.SupplementalFont() { Script = "Gujr", Typeface = "Shruti" });
minorFont.Append(new A.SupplementalFont() { Script = "Khmr", Typeface = "DaunPenh" });
minorFont.Append(new A.SupplementalFont() { Script = "Knda", Typeface = "Tunga" });
minorFont.Append(new A.SupplementalFont() { Script = "Guru", Typeface = "Raavi" });
minorFont.Append(new A.SupplementalFont() { Script = "Cans", Typeface = "Euphemia" });
minorFont.Append(new A.SupplementalFont() { Script = "Cher", Typeface = "Plantagenet Cherokee" });
minorFont.Append(new A.SupplementalFont() { Script = "Yiii", Typeface = "Microsoft Yi Baiti" });
minorFont.Append(new A.SupplementalFont() { Script = "Tibt", Typeface = "Microsoft Himalaya" });
minorFont.Append(new A.SupplementalFont() { Script = "Thaa", Typeface = "MV Boli" });
minorFont.Append(new A.SupplementalFont() { Script = "Deva", Typeface = "Mangal" });
minorFont.Append(new A.SupplementalFont() { Script = "Telu", Typeface = "Gautami" });
minorFont.Append(new A.SupplementalFont() { Script = "Taml", Typeface = "Latha" });
minorFont.Append(new A.SupplementalFont() { Script = "Syrc", Typeface = "Estrangelo Edessa" });
minorFont.Append(new A.SupplementalFont() { Script = "Orya", Typeface = "Kalinga" });
minorFont.Append(new A.SupplementalFont() { Script = "Mlym", Typeface = "Kartika" });
minorFont.Append(new A.SupplementalFont() { Script = "Laoo", Typeface = "DokChampa" });
minorFont.Append(new A.SupplementalFont() { Script = "Sinh", Typeface = "Iskoola Pota" });
minorFont.Append(new A.SupplementalFont() { Script = "Mong", Typeface = "Mongolian Baiti" });
minorFont.Append(new A.SupplementalFont() { Script = "Viet", Typeface = "Arial" });
minorFont.Append(new A.SupplementalFont() { Script = "Uigh", Typeface = "Microsoft Uighur" });
minorFont.Append(new A.SupplementalFont() { Script = "Geor", Typeface = "Sylfaen" });
fontScheme.Append(majorFont);
fontScheme.Append(minorFont);
A.FormatScheme formatScheme = new A.FormatScheme() { Name = "Стандартная" };
A.FillStyleList fillStyleList = new A.FillStyleList();
A.SolidFill solidFill = new A.SolidFill();
A.SchemeColor schemeColor = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
solidFill.Append(schemeColor);
A.GradientFill gradientFill = new A.GradientFill() { RotateWithShape = true };
A.GradientStopList gradientStopList = new A.GradientStopList();
A.GradientStop gradientStop = new A.GradientStop() { Position = 0 };
A.SchemeColor schemeColor2 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.LuminanceModulation luminanceModulation = new A.LuminanceModulation() { Val = 110000 };
A.SaturationModulation saturationModulation = new A.SaturationModulation() { Val = 105000 };
A.Tint tint = new A.Tint() { Val = 67000 };
schemeColor2.Append(luminanceModulation);
schemeColor2.Append(saturationModulation);
schemeColor2.Append(tint);
gradientStop.Append(schemeColor2);
A.GradientStop gradientStop2 = new A.GradientStop() { Position = 50000 };
A.SchemeColor schemeColor3 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.LuminanceModulation luminanceModulation2 = new A.LuminanceModulation() { Val = 105000 };
A.SaturationModulation saturationModulation2 = new A.SaturationModulation() { Val = 103000 };
A.Tint tint2 = new A.Tint() { Val = 73000 };
schemeColor3.Append(luminanceModulation2);
schemeColor3.Append(saturationModulation2);
schemeColor3.Append(tint2);
gradientStop2.Append(schemeColor3);
A.GradientStop gradientStop3 = new A.GradientStop() { Position = 100000 };
A.SchemeColor schemeColor4 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.LuminanceModulation luminanceModulation3 = new A.LuminanceModulation() { Val = 105000 };
A.SaturationModulation saturationModulation3 = new A.SaturationModulation() { Val = 109000 };
A.Tint tint3 = new A.Tint() { Val = 81000 };
schemeColor4.Append(luminanceModulation3);
schemeColor4.Append(saturationModulation3);
schemeColor4.Append(tint3);
gradientStop3.Append(schemeColor4);
gradientStopList.Append(gradientStop);
gradientStopList.Append(gradientStop2);
gradientStopList.Append(gradientStop3);
A.LinearGradientFill linearGradientFill = new A.LinearGradientFill() { Angle = 5400000, Scaled = false };
gradientFill.Append(gradientStopList);
gradientFill.Append(linearGradientFill);
A.GradientFill gradientFill2 = new A.GradientFill() { RotateWithShape = true };
A.GradientStopList gradientStopList2 = new A.GradientStopList();
A.GradientStop gradientStop4 = new A.GradientStop() { Position = 0 };
A.SchemeColor schemeColor5 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.SaturationModulation saturationModulation4 = new A.SaturationModulation() { Val = 103000 };
A.LuminanceModulation luminanceModulation4 = new A.LuminanceModulation() { Val = 102000 };
A.Tint tint4 = new A.Tint() { Val = 94000 };
schemeColor5.Append(saturationModulation4);
schemeColor5.Append(luminanceModulation4);
schemeColor5.Append(tint4);
gradientStop4.Append(schemeColor5);
A.GradientStop gradientStop5 = new A.GradientStop() { Position = 50000 };
A.SchemeColor schemeColor6 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.SaturationModulation saturationModulation5 = new A.SaturationModulation() { Val = 110000 };
A.LuminanceModulation luminanceModulation5 = new A.LuminanceModulation() { Val = 100000 };
A.Shade shade1 = new A.Shade() { Val = 100000 };
schemeColor6.Append(saturationModulation5);
schemeColor6.Append(luminanceModulation5);
schemeColor6.Append(shade1);
gradientStop5.Append(schemeColor6);
A.GradientStop gradientStop6 = new A.GradientStop() { Position = 100000 };
A.SchemeColor schemeColor7 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.LuminanceModulation luminanceModulation6 = new A.LuminanceModulation() { Val = 99000 };
A.SaturationModulation saturationModulation6 = new A.SaturationModulation() { Val = 120000 };
A.Shade shade2 = new A.Shade() { Val = 78000 };
schemeColor7.Append(luminanceModulation6);
schemeColor7.Append(saturationModulation6);
schemeColor7.Append(shade2);
gradientStop6.Append(schemeColor7);
gradientStopList2.Append(gradientStop4);
gradientStopList2.Append(gradientStop5);
gradientStopList2.Append(gradientStop6);
A.LinearGradientFill linearGradientFill2 = new A.LinearGradientFill() { Angle = 5400000, Scaled = false };
gradientFill2.Append(gradientStopList2);
gradientFill2.Append(linearGradientFill2);
fillStyleList.Append(solidFill);
fillStyleList.Append(gradientFill);
fillStyleList.Append(gradientFill2);
A.LineStyleList lineStyleList = new A.LineStyleList();
A.Outline outline = new A.Outline() { Width = 6350, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center };
A.SolidFill solidFill2 = new A.SolidFill();
A.SchemeColor schemeColor8 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
solidFill2.Append(schemeColor8);
A.PresetDash presetDash = new A.PresetDash() { Val = A.PresetLineDashValues.Solid };
A.Miter miter = new A.Miter() { Limit = 800000 };
outline.Append(solidFill2);
outline.Append(presetDash);
outline.Append(miter);
A.Outline outline2 = new A.Outline() { Width = 12700, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center };
A.SolidFill solidFill3 = new A.SolidFill();
A.SchemeColor schemeColor9 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
solidFill3.Append(schemeColor9);
A.PresetDash presetDash2 = new A.PresetDash() { Val = A.PresetLineDashValues.Solid };
A.Miter miter2 = new A.Miter() { Limit = 800000 };
outline2.Append(solidFill3);
outline2.Append(presetDash2);
outline2.Append(miter2);
A.Outline outline3 = new A.Outline() { Width = 19050, CapType = A.LineCapValues.Flat, CompoundLineType = A.CompoundLineValues.Single, Alignment = A.PenAlignmentValues.Center };
A.SolidFill solidFill4 = new A.SolidFill();
A.SchemeColor schemeColor10 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
solidFill4.Append(schemeColor10);
A.PresetDash presetDash3 = new A.PresetDash() { Val = A.PresetLineDashValues.Solid };
A.Miter miter3 = new A.Miter() { Limit = 800000 };
outline3.Append(solidFill4);
outline3.Append(presetDash3);
outline3.Append(miter3);
lineStyleList.Append(outline);
lineStyleList.Append(outline2);
lineStyleList.Append(outline3);
A.EffectStyleList effectStyleList = new A.EffectStyleList();
A.EffectStyle effectStyle = new A.EffectStyle();
A.EffectList effectList = new A.EffectList();
effectStyle.Append(effectList);
A.EffectStyle effectStyle2 = new A.EffectStyle();
A.EffectList effectList2 = new A.EffectList();
effectStyle2.Append(effectList2);
A.EffectStyle effectStyle3 = new A.EffectStyle();
A.EffectList effectList3 = new A.EffectList();
A.OuterShadow outerShadow = new A.OuterShadow() { BlurRadius = 57150L, Distance = 19050L, Direction = 5400000, Alignment = A.RectangleAlignmentValues.Center, RotateWithShape = false };
A.RgbColorModelHex rgbColorModelHex11 = new A.RgbColorModelHex() { Val = "000000" };
A.Alpha alpha1 = new A.Alpha() { Val = 63000 };
rgbColorModelHex11.Append(alpha1);
outerShadow.Append(rgbColorModelHex11);
effectList3.Append(outerShadow);
effectStyle3.Append(effectList3);
effectStyleList.Append(effectStyle);
effectStyleList.Append(effectStyle2);
effectStyleList.Append(effectStyle3);
A.BackgroundFillStyleList backgroundFillStyleList = new A.BackgroundFillStyleList();
A.SolidFill solidFill5 = new A.SolidFill();
A.SchemeColor schemeColor11 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
solidFill5.Append(schemeColor11);
A.SolidFill solidFill6 = new A.SolidFill();
A.SchemeColor schemeColor12 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.Tint tint5 = new A.Tint() { Val = 95000 };
A.SaturationModulation saturationModulation7 = new A.SaturationModulation() { Val = 170000 };
schemeColor12.Append(tint5);
schemeColor12.Append(saturationModulation7);
solidFill6.Append(schemeColor12);
A.GradientFill gradientFill3 = new A.GradientFill() { RotateWithShape = true };
A.GradientStopList gradientStopList3 = new A.GradientStopList();
A.GradientStop gradientStop7 = new A.GradientStop() { Position = 0 };
A.SchemeColor schemeColor13 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.Tint tint6 = new A.Tint() { Val = 93000 };
A.SaturationModulation saturationModulation8 = new A.SaturationModulation() { Val = 150000 };
A.Shade shade3 = new A.Shade() { Val = 98000 };
A.LuminanceModulation luminanceModulation7 = new A.LuminanceModulation() { Val = 102000 };
schemeColor13.Append(tint6);
schemeColor13.Append(saturationModulation8);
schemeColor13.Append(shade3);
schemeColor13.Append(luminanceModulation7);
gradientStop7.Append(schemeColor13);
A.GradientStop gradientStop8 = new A.GradientStop() { Position = 50000 };
A.SchemeColor schemeColor14 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.Tint tint7 = new A.Tint() { Val = 98000 };
A.SaturationModulation saturationModulation9 = new A.SaturationModulation() { Val = 130000 };
A.Shade shade4 = new A.Shade() { Val = 90000 };
A.LuminanceModulation luminanceModulation8 = new A.LuminanceModulation() { Val = 103000 };
schemeColor14.Append(tint7);
schemeColor14.Append(saturationModulation9);
schemeColor14.Append(shade4);
schemeColor14.Append(luminanceModulation8);
gradientStop8.Append(schemeColor14);
A.GradientStop gradientStop9 = new A.GradientStop() { Position = 100000 };
A.SchemeColor schemeColor15 = new A.SchemeColor() { Val = A.SchemeColorValues.PhColor };
A.Shade shade5 = new A.Shade() { Val = 63000 };
A.SaturationModulation saturationModulation10 = new A.SaturationModulation() { Val = 120000 };
schemeColor15.Append(shade5);
schemeColor15.Append(saturationModulation10);
gradientStop9.Append(schemeColor15);
gradientStopList3.Append(gradientStop7);
gradientStopList3.Append(gradientStop8);
gradientStopList3.Append(gradientStop9);
A.LinearGradientFill linearGradientFill3 = new A.LinearGradientFill() { Angle = 5400000, Scaled = false };
gradientFill3.Append(gradientStopList3);
gradientFill3.Append(linearGradientFill3);
backgroundFillStyleList.Append(solidFill5);
backgroundFillStyleList.Append(solidFill6);
backgroundFillStyleList.Append(gradientFill3);
formatScheme.Append(fillStyleList);
formatScheme.Append(lineStyleList);
formatScheme.Append(effectStyleList);
formatScheme.Append(backgroundFillStyleList);
themeElements.Append(colorScheme);
themeElements.Append(fontScheme);
themeElements.Append(formatScheme);
A.ObjectDefaults objectDefaults = new A.ObjectDefaults();