Exemplo n.º 1
0
        public static void RemoveDefaultPagination(OpenXmlElement element)
        {
            Paragraph mainParagraph = element.Elements <Paragraph>().First();
            Run       mainRun       = mainParagraph.Elements <Run>().ElementAt(1);
            Picture   pic           = mainRun.Elements <Picture>().First();

            V.Shape        sh                 = pic.Elements <V.Shape>().First();
            V.TextBox      textBox            = sh.Elements <V.TextBox>().First();
            TextBoxContent textBoxContent     = textBox.Elements <TextBoxContent>().First();
            Paragraph      paginatedParagraph = textBoxContent.Elements <Paragraph>().First();
            //paginatedParagraph.RemoveAllChildren();
            List <Run> paginatedRuns = paginatedParagraph.Elements <Run>().ToList();
            List <Run> newRuns       = paginatedRuns.GetRange(0, 7);

            var indexValue = 0;

            foreach (Run item in newRuns)
            {
                item.RemoveAllChildren();
                item.Remove();
                //RunProperties runProperties4 = new RunProperties();
                //FontSize fontSize2 = new FontSize() { Val = "16" };

                //runProperties4.Append(fontSize2);
                //Text text2 = new Text();
                //text2.Text = "P";
                //item.Append(runProperties4);
                //item.Append(text2);
                //item.Remove();
            }
        }
Exemplo n.º 2
0
        // Generates content of documentSettingsPart2.
        private void GenerateDocumentSettingsPart2Content(DocumentSettingsPart documentSettingsPart2)
        {
            Settings settings2 = new Settings(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "w14 w15" }  };
            settings2.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            settings2.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            settings2.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            settings2.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            settings2.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            settings2.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            settings2.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            settings2.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            settings2.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2010/11/wordml");
            settings2.AddNamespaceDeclaration("sl", "http://schemas.openxmlformats.org/schemaLibrary/2006/main");
            Zoom zoom1 = new Zoom(){ Percent = "100" };
            BordersDoNotSurroundHeader bordersDoNotSurroundHeader2 = new BordersDoNotSurroundHeader();
            BordersDoNotSurroundFooter bordersDoNotSurroundFooter2 = new BordersDoNotSurroundFooter();
            ProofState proofState1 = new ProofState(){ Spelling = ProofingStateValues.Clean, Grammar = ProofingStateValues.Clean };
            DefaultTabStop defaultTabStop2 = new DefaultTabStop(){ Val = 840 };
            DisplayHorizontalDrawingGrid displayHorizontalDrawingGrid2 = new DisplayHorizontalDrawingGrid(){ Val = 0 };
            DisplayVerticalDrawingGrid displayVerticalDrawingGrid2 = new DisplayVerticalDrawingGrid(){ Val = 2 };
            CharacterSpacingControl characterSpacingControl2 = new CharacterSpacingControl(){ Val = CharacterSpacingValues.CompressPunctuation };

            HeaderShapeDefaults headerShapeDefaults1 = new HeaderShapeDefaults();

            Ovml.ShapeDefaults shapeDefaults1 = new Ovml.ShapeDefaults(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 2049 };
            V.TextBox textBox1 = new V.TextBox(){ Inset = "5.85pt,.7pt,5.85pt,.7pt" };

            shapeDefaults1.Append(textBox1);

            headerShapeDefaults1.Append(shapeDefaults1);

            FootnoteDocumentWideProperties footnoteDocumentWideProperties1 = new FootnoteDocumentWideProperties();
            FootnoteSpecialReference footnoteSpecialReference1 = new FootnoteSpecialReference(){ Id = -1 };
            FootnoteSpecialReference footnoteSpecialReference2 = new FootnoteSpecialReference(){ Id = 0 };

            footnoteDocumentWideProperties1.Append(footnoteSpecialReference1);
            footnoteDocumentWideProperties1.Append(footnoteSpecialReference2);

            EndnoteDocumentWideProperties endnoteDocumentWideProperties1 = new EndnoteDocumentWideProperties();
            EndnoteSpecialReference endnoteSpecialReference1 = new EndnoteSpecialReference(){ Id = -1 };
            EndnoteSpecialReference endnoteSpecialReference2 = new EndnoteSpecialReference(){ Id = 0 };

            endnoteDocumentWideProperties1.Append(endnoteSpecialReference1);
            endnoteDocumentWideProperties1.Append(endnoteSpecialReference2);

            Compatibility compatibility2 = new Compatibility();
            SpaceForUnderline spaceForUnderline2 = new SpaceForUnderline();
            BalanceSingleByteDoubleByteWidth balanceSingleByteDoubleByteWidth2 = new BalanceSingleByteDoubleByteWidth();
            DoNotLeaveBackslashAlone doNotLeaveBackslashAlone2 = new DoNotLeaveBackslashAlone();
            UnderlineTrailingSpaces underlineTrailingSpaces2 = new UnderlineTrailingSpaces();
            DoNotExpandShiftReturn doNotExpandShiftReturn2 = new DoNotExpandShiftReturn();
            AdjustLineHeightInTable adjustLineHeightInTable2 = new AdjustLineHeightInTable();
            UseFarEastLayout useFarEastLayout2 = new UseFarEastLayout();
            CompatibilitySetting compatibilitySetting6 = new CompatibilitySetting(){ Name = CompatSettingNameValues.CompatibilityMode, Uri = "http://schemas.microsoft.com/office/word", Val = "15" };
            CompatibilitySetting compatibilitySetting7 = new CompatibilitySetting(){ Name = CompatSettingNameValues.OverrideTableStyleFontSizeAndJustification, Uri = "http://schemas.microsoft.com/office/word", Val = "1" };
            CompatibilitySetting compatibilitySetting8 = new CompatibilitySetting(){ Name = CompatSettingNameValues.EnableOpenTypeFeatures, Uri = "http://schemas.microsoft.com/office/word", Val = "1" };
            CompatibilitySetting compatibilitySetting9 = new CompatibilitySetting(){ Name = CompatSettingNameValues.DoNotFlipMirrorIndents, Uri = "http://schemas.microsoft.com/office/word", Val = "1" };
            CompatibilitySetting compatibilitySetting10 = new CompatibilitySetting(){ Name = CompatSettingNameValues.DifferentiateMultirowTableHeaders, Uri = "http://schemas.microsoft.com/office/word", Val = "1" };

            compatibility2.Append(spaceForUnderline2);
            compatibility2.Append(balanceSingleByteDoubleByteWidth2);
            compatibility2.Append(doNotLeaveBackslashAlone2);
            compatibility2.Append(underlineTrailingSpaces2);
            compatibility2.Append(doNotExpandShiftReturn2);
            compatibility2.Append(adjustLineHeightInTable2);
            compatibility2.Append(useFarEastLayout2);
            compatibility2.Append(compatibilitySetting6);
            compatibility2.Append(compatibilitySetting7);
            compatibility2.Append(compatibilitySetting8);
            compatibility2.Append(compatibilitySetting9);
            compatibility2.Append(compatibilitySetting10);

            Rsids rsids2 = new Rsids();
            RsidRoot rsidRoot2 = new RsidRoot(){ Val = "000010BA" };
            Rsid rsid21 = new Rsid(){ Val = "000010BA" };
            Rsid rsid22 = new Rsid(){ Val = "000C1702" };
            Rsid rsid23 = new Rsid(){ Val = "00221A5E" };
            Rsid rsid24 = new Rsid(){ Val = "00535C5E" };
            Rsid rsid25 = new Rsid(){ Val = "005A792B" };
            Rsid rsid26 = new Rsid(){ Val = "006D4DFB" };
            Rsid rsid27 = new Rsid(){ Val = "009651D6" };
            Rsid rsid28 = new Rsid(){ Val = "00A215C1" };
            Rsid rsid29 = new Rsid(){ Val = "00CC7467" };
            Rsid rsid30 = new Rsid(){ Val = "00DC649D" };
            Rsid rsid31 = new Rsid(){ Val = "00E86739" };
            Rsid rsid32 = new Rsid(){ Val = "00E90381" };
            Rsid rsid33 = new Rsid(){ Val = "00E930A2" };

            rsids2.Append(rsidRoot2);
            rsids2.Append(rsid21);
            rsids2.Append(rsid22);
            rsids2.Append(rsid23);
            rsids2.Append(rsid24);
            rsids2.Append(rsid25);
            rsids2.Append(rsid26);
            rsids2.Append(rsid27);
            rsids2.Append(rsid28);
            rsids2.Append(rsid29);
            rsids2.Append(rsid30);
            rsids2.Append(rsid31);
            rsids2.Append(rsid32);
            rsids2.Append(rsid33);

            M.MathProperties mathProperties2 = new M.MathProperties();
            M.MathFont mathFont2 = new M.MathFont(){ Val = "Cambria Math" };
            M.BreakBinary breakBinary2 = new M.BreakBinary(){ Val = M.BreakBinaryOperatorValues.Before };
            M.BreakBinarySubtraction breakBinarySubtraction2 = new M.BreakBinarySubtraction(){ Val = M.BreakBinarySubtractionValues.MinusMinus };
            M.SmallFraction smallFraction2 = new M.SmallFraction(){ Val = M.BooleanValues.Zero };
            M.DisplayDefaults displayDefaults2 = new M.DisplayDefaults();
            M.LeftMargin leftMargin2 = new M.LeftMargin(){ Val = (UInt32Value)0U };
            M.RightMargin rightMargin2 = new M.RightMargin(){ Val = (UInt32Value)0U };
            M.DefaultJustification defaultJustification2 = new M.DefaultJustification(){ Val = M.JustificationValues.CenterGroup };
            M.WrapIndent wrapIndent2 = new M.WrapIndent(){ Val = (UInt32Value)1440U };
            M.IntegralLimitLocation integralLimitLocation2 = new M.IntegralLimitLocation(){ Val = M.LimitLocationValues.SubscriptSuperscript };
            M.NaryLimitLocation naryLimitLocation2 = new M.NaryLimitLocation(){ Val = M.LimitLocationValues.UnderOver };

            mathProperties2.Append(mathFont2);
            mathProperties2.Append(breakBinary2);
            mathProperties2.Append(breakBinarySubtraction2);
            mathProperties2.Append(smallFraction2);
            mathProperties2.Append(displayDefaults2);
            mathProperties2.Append(leftMargin2);
            mathProperties2.Append(rightMargin2);
            mathProperties2.Append(defaultJustification2);
            mathProperties2.Append(wrapIndent2);
            mathProperties2.Append(integralLimitLocation2);
            mathProperties2.Append(naryLimitLocation2);
            ThemeFontLanguages themeFontLanguages2 = new ThemeFontLanguages(){ Val = "en-US", EastAsia = "ja-JP" };
            ColorSchemeMapping colorSchemeMapping2 = new ColorSchemeMapping(){ Background1 = ColorSchemeIndexValues.Light1, Text1 = ColorSchemeIndexValues.Dark1, Background2 = ColorSchemeIndexValues.Light2, Text2 = ColorSchemeIndexValues.Dark2, Accent1 = ColorSchemeIndexValues.Accent1, Accent2 = ColorSchemeIndexValues.Accent2, Accent3 = ColorSchemeIndexValues.Accent3, Accent4 = ColorSchemeIndexValues.Accent4, Accent5 = ColorSchemeIndexValues.Accent5, Accent6 = ColorSchemeIndexValues.Accent6, Hyperlink = ColorSchemeIndexValues.Hyperlink, FollowedHyperlink = ColorSchemeIndexValues.FollowedHyperlink };

            ShapeDefaults shapeDefaults2 = new ShapeDefaults();

            Ovml.ShapeDefaults shapeDefaults3 = new Ovml.ShapeDefaults(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 2049 };
            V.TextBox textBox2 = new V.TextBox(){ Inset = "5.85pt,.7pt,5.85pt,.7pt" };

            shapeDefaults3.Append(textBox2);

            Ovml.ShapeLayout shapeLayout1 = new Ovml.ShapeLayout(){ Extension = V.ExtensionHandlingBehaviorValues.Edit };
            Ovml.ShapeIdMap shapeIdMap1 = new Ovml.ShapeIdMap(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, Data = "1" };

            shapeLayout1.Append(shapeIdMap1);

            shapeDefaults2.Append(shapeDefaults3);
            shapeDefaults2.Append(shapeLayout1);
            DecimalSymbol decimalSymbol2 = new DecimalSymbol(){ Val = "." };
            ListSeparator listSeparator2 = new ListSeparator(){ Val = "," };
            W15.ChartTrackingRefBased chartTrackingRefBased2 = new W15.ChartTrackingRefBased();
            W15.PersistentDocumentId persistentDocumentId1 = new W15.PersistentDocumentId(){ Val = "{855411F9-778F-4476-A693-CE4F6511E7CE}" };

            settings2.Append(zoom1);
            settings2.Append(bordersDoNotSurroundHeader2);
            settings2.Append(bordersDoNotSurroundFooter2);
            settings2.Append(proofState1);
            settings2.Append(defaultTabStop2);
            settings2.Append(displayHorizontalDrawingGrid2);
            settings2.Append(displayVerticalDrawingGrid2);
            settings2.Append(characterSpacingControl2);
            settings2.Append(headerShapeDefaults1);
            settings2.Append(footnoteDocumentWideProperties1);
            settings2.Append(endnoteDocumentWideProperties1);
            settings2.Append(compatibility2);
            settings2.Append(rsids2);
            settings2.Append(mathProperties2);
            settings2.Append(themeFontLanguages2);
            settings2.Append(colorSchemeMapping2);
            settings2.Append(shapeDefaults2);
            settings2.Append(decimalSymbol2);
            settings2.Append(listSeparator2);
            settings2.Append(chartTrackingRefBased2);
            settings2.Append(persistentDocumentId1);

            documentSettingsPart2.Settings = settings2;
        }
        private static Vml.TextBox GetTextBox(IXLDrawingStyle ds)
        {
            var sb = new StringBuilder();
            var a = ds.Alignment;

            if (a.Direction == XLDrawingTextDirection.Context)
                sb.Append("mso-direction-alt:auto;");
            else if (a.Direction == XLDrawingTextDirection.RightToLeft)
                sb.Append("direction:RTL;");

            if (a.Orientation != XLDrawingTextOrientation.LeftToRight)
            {
                sb.Append("layout-flow:vertical;");
                if (a.Orientation == XLDrawingTextOrientation.BottomToTop)
                    sb.Append("mso-layout-flow-alt:bottom-to-top;");
                else if (a.Orientation == XLDrawingTextOrientation.Vertical)
                    sb.Append("mso-layout-flow-alt:top-to-bottom;");
            }
            if (a.AutomaticSize)
                sb.Append("mso-fit-shape-to-text:t;");
            var retVal = new Vml.TextBox {Style = sb.ToString()};
            var dm = ds.Margins;
            if (!dm.Automatic)
                retVal.Inset = String.Format("{0}in,{1}in,{2}in,{3}in",
                    dm.Left.ToString(CultureInfo.InvariantCulture),
                    dm.Top.ToString(CultureInfo.InvariantCulture),
                    dm.Right.ToString(CultureInfo.InvariantCulture),
                    dm.Bottom.ToString(CultureInfo.InvariantCulture));

            return retVal;
        }
        private void TestSimpleAny(SdbSchemaDatas sdbSchemaDatas)
        {
            ValidationContext validationContext = new ValidationContext();
            ValidationResult actual = new ValidationResult();
            validationContext.ValidationErrorEventHandler += actual.OnValidationError;
            OpenXmlElement errorChild;

            TextBox textBox = new TextBox();
            var particleConstraint = sdbSchemaDatas.GetSchemaTypeData(textBox).ParticleConstraint;
            var target = particleConstraint.ParticleValidator as ChoiceParticleValidator;
            validationContext.Element = textBox;
            var expected = textBox;
              //<xsd:complexType name="CT_Textbox">
              //  <xsd:choice>
              //    <xsd:element ref="w:txbxContent" minOccurs="0" />
              //    <xsd:any namespace="##local" processContents="skip" />
              //  </xsd:choice>
              //</xsd:complexType>

            // ***** good case ******

            // empty is ok
            target.Validate(validationContext);
            Assert.True(actual.Valid);

            // any element without namespace is ok
            errorChild = textBox.AppendChild(new OpenXmlUnknownElement("test"));
            Assert.True(string.IsNullOrEmpty(errorChild.NamespaceUri));
            target.Validate(validationContext);
            Assert.True(actual.Valid);
            textBox.RemoveChild(errorChild);

            // ***** error case ******

            // any element with namespace is invlaid
            errorChild = textBox.AppendChild(new TextBox());
            target.Validate(validationContext);
            Assert.False(actual.Valid);
            Assert.Equal(1, actual.Errors.Count);
            Assert.Same(expected, actual.Errors[0].Node);
            Assert.Same(errorChild, actual.Errors[0].RelatedNode);
            Assert.Equal(ValidationErrorType.Schema, actual.Errors[0].ErrorType);
            Assert.Equal("Sch_InvalidElementContentExpectingComplex", actual.Errors[0].Id);
            Assert.True(actual.Errors[0].Description.Contains(":txbxContent"));
            Assert.True(actual.Errors[0].Description.Contains("##local"));
            textBox.RemoveChild(errorChild);

            actual.Clear();
            // any element with namespace is invlaid
            errorChild = textBox.AppendChild(new OpenXmlUnknownElement("", "test", "http://test"));
            target.Validate(validationContext);
            Assert.False(actual.Valid);
            Assert.Equal(1, actual.Errors.Count);
            Assert.Same(expected, actual.Errors[0].Node);
            Assert.Same(errorChild, actual.Errors[0].RelatedNode);
            Assert.Equal(ValidationErrorType.Schema, actual.Errors[0].ErrorType);
            Assert.Equal("Sch_InvalidElementContentExpectingComplex", actual.Errors[0].Id);
            Assert.True(actual.Errors[0].Description.Contains(":txbxContent"));
            Assert.True(actual.Errors[0].Description.Contains("##local"));
            textBox.RemoveChild(errorChild);

            actual.Clear();
            // any element with namespace is invlaid
            errorChild = textBox.AppendChild(new OpenXmlUnknownElement("t", "test", "http://test"));
            target.Validate(validationContext);
            Assert.False(actual.Valid);
            Assert.Equal(1, actual.Errors.Count);
            Assert.Same(expected, actual.Errors[0].Node);
            Assert.Same(errorChild, actual.Errors[0].RelatedNode);
            Assert.Equal(ValidationErrorType.Schema, actual.Errors[0].ErrorType);
            Assert.Equal("Sch_InvalidElementContentExpectingComplex", actual.Errors[0].Id);
            Assert.True(actual.Errors[0].Description.Contains(":txbxContent"));
            Assert.True(actual.Errors[0].Description.Contains("##local"));
            textBox.RemoveChild(errorChild);

            actual.Clear();
            // only one element without namespace is allowed
            textBox.AppendChild(new OpenXmlUnknownElement("test"));
            errorChild = textBox.AppendChild(new OpenXmlUnknownElement("errorElement"));
            target.Validate(validationContext);
            Assert.False(actual.Valid);
            Assert.Equal(1, actual.Errors.Count);
            Assert.Same(expected, actual.Errors[0].Node);
            Assert.Same(errorChild, actual.Errors[0].RelatedNode);
            Assert.Equal(ValidationErrorType.Schema, actual.Errors[0].ErrorType);
            Assert.Equal("Sch_InvalidElementContentExpectingComplex", actual.Errors[0].Id);
            Assert.False(actual.Errors[0].Description.Contains(ValidationErrorStrings.Fmt_ListOfPossibleElements));
            textBox.RemoveAllChildren();

            actual.Clear();
            // only one element without namespace is allowed
            textBox.AppendChild(new OpenXmlUnknownElement("test"));
            errorChild = textBox.AppendChild(new OpenXmlUnknownElement("test"));
            target.Validate(validationContext);
            Assert.False(actual.Valid);
            Assert.Equal(1, actual.Errors.Count);
            Assert.Same(expected, actual.Errors[0].Node);
            Assert.Same(errorChild, actual.Errors[0].RelatedNode);
            Assert.Equal(ValidationErrorType.Schema, actual.Errors[0].ErrorType);
            Assert.Equal("Sch_InvalidElementContentExpectingComplex", actual.Errors[0].Id);
            Assert.False(actual.Errors[0].Description.Contains(ValidationErrorStrings.Fmt_ListOfPossibleElements));
            textBox.RemoveAllChildren();
        }
Exemplo n.º 5
0
        // Generates content of documentSettingsPart1.
        private void GenerateDocumentSettingsPart1Content(DocumentSettingsPart documentSettingsPart1)
        {
            Settings settings1 = new Settings(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "w14 w15" }  };
            settings1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            settings1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            settings1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            settings1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            settings1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            settings1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            settings1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            settings1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            settings1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
            settings1.AddNamespaceDeclaration("sl", "http://schemas.openxmlformats.org/schemaLibrary/2006/main");
            Zoom zoom1 = new Zoom(){ Percent = "120" };
            DoNotDisplayPageBoundaries doNotDisplayPageBoundaries1 = new DoNotDisplayPageBoundaries();
            BordersDoNotSurroundHeader bordersDoNotSurroundHeader1 = new BordersDoNotSurroundHeader();
            BordersDoNotSurroundFooter bordersDoNotSurroundFooter1 = new BordersDoNotSurroundFooter();
            ProofState proofState1 = new ProofState(){ Spelling = ProofingStateValues.Clean, Grammar = ProofingStateValues.Clean };
            DefaultTabStop defaultTabStop1 = new DefaultTabStop(){ Val = 840 };
            DisplayHorizontalDrawingGrid displayHorizontalDrawingGrid1 = new DisplayHorizontalDrawingGrid(){ Val = 0 };
            DisplayVerticalDrawingGrid displayVerticalDrawingGrid1 = new DisplayVerticalDrawingGrid(){ Val = 2 };
            CharacterSpacingControl characterSpacingControl1 = new CharacterSpacingControl(){ Val = CharacterSpacingValues.CompressPunctuation };

            Compatibility compatibility1 = new Compatibility();
            SpaceForUnderline spaceForUnderline1 = new SpaceForUnderline();
            BalanceSingleByteDoubleByteWidth balanceSingleByteDoubleByteWidth1 = new BalanceSingleByteDoubleByteWidth();
            DoNotLeaveBackslashAlone doNotLeaveBackslashAlone1 = new DoNotLeaveBackslashAlone();
            UnderlineTrailingSpaces underlineTrailingSpaces1 = new UnderlineTrailingSpaces();
            DoNotExpandShiftReturn doNotExpandShiftReturn1 = new DoNotExpandShiftReturn();
            AdjustLineHeightInTable adjustLineHeightInTable1 = new AdjustLineHeightInTable();
            UseFarEastLayout useFarEastLayout1 = new UseFarEastLayout();
            CompatibilitySetting compatibilitySetting1 = new CompatibilitySetting(){ Name = CompatSettingNameValues.CompatibilityMode, Uri = "http://schemas.microsoft.com/office/word", Val = "15" };
            CompatibilitySetting compatibilitySetting2 = new CompatibilitySetting(){ Name = CompatSettingNameValues.OverrideTableStyleFontSizeAndJustification, Uri = "http://schemas.microsoft.com/office/word", Val = "1" };
            CompatibilitySetting compatibilitySetting3 = new CompatibilitySetting(){ Name = CompatSettingNameValues.EnableOpenTypeFeatures, Uri = "http://schemas.microsoft.com/office/word", Val = "1" };
            CompatibilitySetting compatibilitySetting4 = new CompatibilitySetting(){ Name = CompatSettingNameValues.DoNotFlipMirrorIndents, Uri = "http://schemas.microsoft.com/office/word", Val = "1" };
            CompatibilitySetting compatibilitySetting5 = new CompatibilitySetting(){ Name = CompatSettingNameValues.DifferentiateMultirowTableHeaders, Uri = "http://schemas.microsoft.com/office/word", Val = "1" };

            compatibility1.Append(spaceForUnderline1);
            compatibility1.Append(balanceSingleByteDoubleByteWidth1);
            compatibility1.Append(doNotLeaveBackslashAlone1);
            compatibility1.Append(underlineTrailingSpaces1);
            compatibility1.Append(doNotExpandShiftReturn1);
            compatibility1.Append(adjustLineHeightInTable1);
            compatibility1.Append(useFarEastLayout1);
            compatibility1.Append(compatibilitySetting1);
            compatibility1.Append(compatibilitySetting2);
            compatibility1.Append(compatibilitySetting3);
            compatibility1.Append(compatibilitySetting4);
            compatibility1.Append(compatibilitySetting5);

            Rsids rsids1 = new Rsids();
            RsidRoot rsidRoot1 = new RsidRoot(){ Val = "009423EF" };
            Rsid rsid1 = new Rsid(){ Val = "0008591D" };
            Rsid rsid2 = new Rsid(){ Val = "000F6BB9" };
            Rsid rsid3 = new Rsid(){ Val = "009423EF" };

            rsids1.Append(rsidRoot1);
            rsids1.Append(rsid1);
            rsids1.Append(rsid2);
            rsids1.Append(rsid3);

            M.MathProperties mathProperties1 = new M.MathProperties();
            M.MathFont mathFont1 = new M.MathFont(){ Val = "Cambria Math" };
            M.BreakBinary breakBinary1 = new M.BreakBinary(){ Val = M.BreakBinaryOperatorValues.Before };
            M.BreakBinarySubtraction breakBinarySubtraction1 = new M.BreakBinarySubtraction(){ Val = M.BreakBinarySubtractionValues.MinusMinus };
            M.SmallFraction smallFraction1 = new M.SmallFraction(){ Val = M.BooleanValues.Zero };
            M.DisplayDefaults displayDefaults1 = new M.DisplayDefaults();
            M.LeftMargin leftMargin1 = new M.LeftMargin(){ Val = (UInt32Value)0U };
            M.RightMargin rightMargin1 = new M.RightMargin(){ Val = (UInt32Value)0U };
            M.DefaultJustification defaultJustification1 = new M.DefaultJustification(){ Val = M.JustificationValues.CenterGroup };
            M.WrapIndent wrapIndent1 = new M.WrapIndent(){ Val = (UInt32Value)1440U };
            M.IntegralLimitLocation integralLimitLocation1 = new M.IntegralLimitLocation(){ Val = M.LimitLocationValues.SubscriptSuperscript };
            M.NaryLimitLocation naryLimitLocation1 = new M.NaryLimitLocation(){ Val = M.LimitLocationValues.UnderOver };

            mathProperties1.Append(mathFont1);
            mathProperties1.Append(breakBinary1);
            mathProperties1.Append(breakBinarySubtraction1);
            mathProperties1.Append(smallFraction1);
            mathProperties1.Append(displayDefaults1);
            mathProperties1.Append(leftMargin1);
            mathProperties1.Append(rightMargin1);
            mathProperties1.Append(defaultJustification1);
            mathProperties1.Append(wrapIndent1);
            mathProperties1.Append(integralLimitLocation1);
            mathProperties1.Append(naryLimitLocation1);
            ThemeFontLanguages themeFontLanguages1 = new ThemeFontLanguages(){ Val = "en-US", EastAsia = "ja-JP" };
            ColorSchemeMapping colorSchemeMapping1 = new ColorSchemeMapping(){ Background1 = ColorSchemeIndexValues.Light1, Text1 = ColorSchemeIndexValues.Dark1, Background2 = ColorSchemeIndexValues.Light2, Text2 = ColorSchemeIndexValues.Dark2, Accent1 = ColorSchemeIndexValues.Accent1, Accent2 = ColorSchemeIndexValues.Accent2, Accent3 = ColorSchemeIndexValues.Accent3, Accent4 = ColorSchemeIndexValues.Accent4, Accent5 = ColorSchemeIndexValues.Accent5, Accent6 = ColorSchemeIndexValues.Accent6, Hyperlink = ColorSchemeIndexValues.Hyperlink, FollowedHyperlink = ColorSchemeIndexValues.FollowedHyperlink };

            ShapeDefaults shapeDefaults1 = new ShapeDefaults();

            Ovml.ShapeDefaults shapeDefaults2 = new Ovml.ShapeDefaults(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 1026 };
            V.TextBox textBox1 = new V.TextBox(){ Inset = "5.85pt,.7pt,5.85pt,.7pt" };

            shapeDefaults2.Append(textBox1);

            Ovml.ShapeLayout shapeLayout1 = new Ovml.ShapeLayout(){ Extension = V.ExtensionHandlingBehaviorValues.Edit };
            Ovml.ShapeIdMap shapeIdMap1 = new Ovml.ShapeIdMap(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, Data = "1" };

            shapeLayout1.Append(shapeIdMap1);

            shapeDefaults1.Append(shapeDefaults2);
            shapeDefaults1.Append(shapeLayout1);
            DecimalSymbol decimalSymbol1 = new DecimalSymbol(){ Val = "." };
            ListSeparator listSeparator1 = new ListSeparator(){ Val = "," };
            W14.DocumentId documentId1 = new W14.DocumentId(){ Val = "5F9C04B8" };
            W15.ChartTrackingRefBased chartTrackingRefBased1 = new W15.ChartTrackingRefBased();
            W15.PersistentDocumentId persistentDocumentId1 = new W15.PersistentDocumentId(){ Val = "{F93C67B3-65D9-4EFC-B3C8-42982111CA48}" };

            settings1.Append(zoom1);
            settings1.Append(doNotDisplayPageBoundaries1);
            settings1.Append(bordersDoNotSurroundHeader1);
            settings1.Append(bordersDoNotSurroundFooter1);
            settings1.Append(proofState1);
            settings1.Append(defaultTabStop1);
            settings1.Append(displayHorizontalDrawingGrid1);
            settings1.Append(displayVerticalDrawingGrid1);
            settings1.Append(characterSpacingControl1);
            settings1.Append(compatibility1);
            settings1.Append(rsids1);
            settings1.Append(mathProperties1);
            settings1.Append(themeFontLanguages1);
            settings1.Append(colorSchemeMapping1);
            settings1.Append(shapeDefaults1);
            settings1.Append(decimalSymbol1);
            settings1.Append(listSeparator1);
            settings1.Append(documentId1);
            settings1.Append(chartTrackingRefBased1);
            settings1.Append(persistentDocumentId1);

            documentSettingsPart1.Settings = settings1;
        }
Exemplo n.º 6
0
        // Generates content of mainDocumentPart1.
        private static void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1, WordprocessingDocument document)
        {
            Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 wp14" } };
            document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            document1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
            document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Body body1 = new Body();

            Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
            Justification justification1 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
            FontSize fontSize1 = new FontSize() { Val = "20" };

            paragraphMarkRunProperties1.Append(fontSize1);

            paragraphProperties1.Append(spacingBetweenLines1);
            paragraphProperties1.Append(justification1);
            paragraphProperties1.Append(paragraphMarkRunProperties1);
            BookmarkStart bookmarkStart1 = new BookmarkStart() { Name = "_GoBack", Id = "0" };
            BookmarkEnd bookmarkEnd1 = new BookmarkEnd() { Id = "0" };

            Run run1 = new Run();

            RunProperties runProperties1 = new RunProperties();
            NoProof noProof1 = new NoProof();
            FontSize fontSize2 = new FontSize() { Val = "20" };
            Languages languages1 = new Languages() { EastAsia = "ru-RU" };

            runProperties1.Append(noProof1);
            runProperties1.Append(fontSize2);
            runProperties1.Append(languages1);

            AlternateContent alternateContent1 = new AlternateContent();

            AlternateContentChoice alternateContentChoice1 = new AlternateContentChoice() { Requires = "wps" };

            Drawing drawing1 = new Drawing();

            Wp.Anchor anchor1 = new Wp.Anchor() { DistanceFromTop = (UInt32Value)0U, DistanceFromBottom = (UInt32Value)0U, DistanceFromLeft = (UInt32Value)114300U, DistanceFromRight = (UInt32Value)114300U, SimplePos = false, RelativeHeight = (UInt32Value)251659264U, BehindDoc = false, Locked = false, LayoutInCell = true, AllowOverlap = true };
            Wp.SimplePosition simplePosition1 = new Wp.SimplePosition() { X = 0L, Y = 0L };

            Wp.HorizontalPosition horizontalPosition1 = new Wp.HorizontalPosition() { RelativeFrom = Wp.HorizontalRelativePositionValues.Column };
            Wp.PositionOffset positionOffset1 = new Wp.PositionOffset();
            positionOffset1.Text = "7559955";

            horizontalPosition1.Append(positionOffset1);

            Wp.VerticalPosition verticalPosition1 = new Wp.VerticalPosition() { RelativeFrom = Wp.VerticalRelativePositionValues.Paragraph };
            Wp.PositionOffset positionOffset2 = new Wp.PositionOffset();
            positionOffset2.Text = "-180045";

            verticalPosition1.Append(positionOffset2);
            Wp.Extent extent1 = new Wp.Extent() { Cx = 2540000L, Cy = 635000L };
            Wp.EffectExtent effectExtent1 = new Wp.EffectExtent() { LeftEdge = 0L, TopEdge = 0L, RightEdge = 0L, BottomEdge = 0L };
            Wp.WrapNone wrapNone1 = new Wp.WrapNone();
            Wp.DocProperties docProperties1 = new Wp.DocProperties() { Id = (UInt32Value)1U, Name = "Надпись 1" };
            Wp.NonVisualGraphicFrameDrawingProperties nonVisualGraphicFrameDrawingProperties1 = new Wp.NonVisualGraphicFrameDrawingProperties();

            A.Graphic graphic1 = new A.Graphic();
            graphic1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");

            A.GraphicData graphicData1 = new A.GraphicData() { Uri = "http://schemas.microsoft.com/office/word/2010/wordprocessingShape" };

            Wps.WordprocessingShape wordprocessingShape1 = new Wps.WordprocessingShape();
            Wps.NonVisualDrawingShapeProperties nonVisualDrawingShapeProperties1 = new Wps.NonVisualDrawingShapeProperties() { TextBox = true };

            Wps.ShapeProperties shapeProperties1 = new Wps.ShapeProperties();

            A.Transform2D transform2D1 = new A.Transform2D();
            A.Offset offset1 = new A.Offset() { X = 0L, Y = 0L };
            A.Extents extents1 = new A.Extents() { Cx = 2540000L, Cy = 635000L };

            transform2D1.Append(offset1);
            transform2D1.Append(extents1);

            A.PresetGeometry presetGeometry1 = new A.PresetGeometry() { Preset = A.ShapeTypeValues.Rectangle };
            A.AdjustValueList adjustValueList1 = new A.AdjustValueList();

            presetGeometry1.Append(adjustValueList1);
            A.NoFill noFill1 = new A.NoFill();

            A.Outline outline1 = new A.Outline() { Width = 6350 };
            A.NoFill noFill2 = new A.NoFill();

            outline1.Append(noFill2);
            A.EffectList effectList1 = new A.EffectList();

            A.ShapePropertiesExtensionList shapePropertiesExtensionList1 = new A.ShapePropertiesExtensionList();

            A.ShapePropertiesExtension shapePropertiesExtension1 = new A.ShapePropertiesExtension() { Uri = "{91240B29-F687-4F45-9708-019B960494DF}" };

            A14.HiddenLineProperties hiddenLineProperties1 = new A14.HiddenLineProperties() { Width = 6350 };
            hiddenLineProperties1.AddNamespaceDeclaration("a14", "http://schemas.microsoft.com/office/drawing/2010/main");

            A.SolidFill solidFill1 = new A.SolidFill();
            A.PresetColor presetColor1 = new A.PresetColor() { Val = A.PresetColorValues.Black };

            solidFill1.Append(presetColor1);

            hiddenLineProperties1.Append(solidFill1);

            shapePropertiesExtension1.Append(hiddenLineProperties1);

            shapePropertiesExtensionList1.Append(shapePropertiesExtension1);

            shapeProperties1.Append(transform2D1);
            shapeProperties1.Append(presetGeometry1);
            shapeProperties1.Append(noFill1);
            shapeProperties1.Append(outline1);
            shapeProperties1.Append(effectList1);
            shapeProperties1.Append(shapePropertiesExtensionList1);

            Wps.ShapeStyle shapeStyle1 = new Wps.ShapeStyle();

            A.LineReference lineReference1 = new A.LineReference() { Index = (UInt32Value)0U };
            A.SchemeColor schemeColor1 = new A.SchemeColor() { Val = A.SchemeColorValues.Accent1 };

            lineReference1.Append(schemeColor1);

            A.FillReference fillReference1 = new A.FillReference() { Index = (UInt32Value)0U };
            A.SchemeColor schemeColor2 = new A.SchemeColor() { Val = A.SchemeColorValues.Accent1 };

            fillReference1.Append(schemeColor2);

            A.EffectReference effectReference1 = new A.EffectReference() { Index = (UInt32Value)0U };
            A.SchemeColor schemeColor3 = new A.SchemeColor() { Val = A.SchemeColorValues.Accent1 };

            effectReference1.Append(schemeColor3);

            A.FontReference fontReference1 = new A.FontReference() { Index = A.FontCollectionIndexValues.Minor };
            A.SchemeColor schemeColor4 = new A.SchemeColor() { Val = A.SchemeColorValues.Dark1 };

            fontReference1.Append(schemeColor4);

            shapeStyle1.Append(lineReference1);
            shapeStyle1.Append(fillReference1);
            shapeStyle1.Append(effectReference1);
            shapeStyle1.Append(fontReference1);

            Wps.TextBoxInfo2 textBoxInfo21 = new Wps.TextBoxInfo2();

            TextBoxContent textBoxContent1 = new TextBoxContent();

            if (Dow == "Понедельник")
            {
                Paragraph paragraph2 = new Paragraph() { RsidParagraphMarkRevision = "00FA5335", RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

                ParagraphProperties paragraphProperties2 = new ParagraphProperties();
                SpacingBetweenLines spacingBetweenLines2 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
                Justification justification2 = new Justification() { Val = JustificationValues.Right };

                ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
                FontSize fontSize3 = new FontSize() { Val = "20" };

                paragraphMarkRunProperties2.Append(fontSize3);

                paragraphProperties2.Append(spacingBetweenLines2);
                paragraphProperties2.Append(justification2);
                paragraphProperties2.Append(paragraphMarkRunProperties2);

                Run run2 = new Run() { RsidRunProperties = "00FA5335" };

                RunProperties runProperties2 = new RunProperties();
                FontSize fontSize4 = new FontSize() { Val = "20" };

                runProperties2.Append(fontSize4);
                Text text1 = new Text();
                text1.Text = "«УТВЕРЖДАЮ»";

                run2.Append(runProperties2);
                run2.Append(text1);

                paragraph2.Append(paragraphProperties2);
                paragraph2.Append(run2);

                Paragraph paragraph3 = new Paragraph() { RsidParagraphMarkRevision = "00FA5335", RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

                ParagraphProperties paragraphProperties3 = new ParagraphProperties();
                SpacingBetweenLines spacingBetweenLines3 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
                Justification justification3 = new Justification() { Val = JustificationValues.Right };

                ParagraphMarkRunProperties paragraphMarkRunProperties3 = new ParagraphMarkRunProperties();
                FontSize fontSize5 = new FontSize() { Val = "20" };

                paragraphMarkRunProperties3.Append(fontSize5);

                paragraphProperties3.Append(spacingBetweenLines3);
                paragraphProperties3.Append(justification3);
                paragraphProperties3.Append(paragraphMarkRunProperties3);

                Run run3 = new Run() { RsidRunProperties = "00FA5335" };

                RunProperties runProperties3 = new RunProperties();
                FontSize fontSize6 = new FontSize() { Val = "20" };

                runProperties3.Append(fontSize6);
                Text text2 = new Text();
                text2.Text = "Проректор по учебной работе";

                run3.Append(runProperties3);
                run3.Append(text2);

                paragraph3.Append(paragraphProperties3);
                paragraph3.Append(run3);

                Paragraph paragraph4 = new Paragraph() { RsidParagraphMarkRevision = "00FA5335", RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

                ParagraphProperties paragraphProperties4 = new ParagraphProperties();
                SpacingBetweenLines spacingBetweenLines4 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
                Justification justification4 = new Justification() { Val = JustificationValues.Right };

                ParagraphMarkRunProperties paragraphMarkRunProperties4 = new ParagraphMarkRunProperties();
                FontSize fontSize7 = new FontSize() { Val = "20" };

                paragraphMarkRunProperties4.Append(fontSize7);

                paragraphProperties4.Append(spacingBetweenLines4);
                paragraphProperties4.Append(justification4);
                paragraphProperties4.Append(paragraphMarkRunProperties4);

                Run run4 = new Run() { RsidRunProperties = "00FA5335" };

                RunProperties runProperties4 = new RunProperties();
                FontSize fontSize8 = new FontSize() { Val = "20" };

                runProperties4.Append(fontSize8);
                Text text3 = new Text() { Space = SpaceProcessingModeValues.Preserve };
                text3.Text = "______________     ";

                run4.Append(runProperties4);
                run4.Append(text3);
                ProofError proofError1 = new ProofError() { Type = ProofingErrorValues.SpellStart };

                Run run5 = new Run() { RsidRunProperties = "00FA5335" };

                RunProperties runProperties5 = new RunProperties();
                FontSize fontSize9 = new FontSize() { Val = "20" };

                runProperties5.Append(fontSize9);
                Text text4 = new Text();
                text4.Text = "А.В.Синицкий";

                run5.Append(runProperties5);
                run5.Append(text4);
                ProofError proofError2 = new ProofError() { Type = ProofingErrorValues.SpellEnd };

                paragraph4.Append(paragraphProperties4);
                paragraph4.Append(run4);
                paragraph4.Append(proofError1);
                paragraph4.Append(run5);
                paragraph4.Append(proofError2);

                textBoxContent1.Append(paragraph2);
                textBoxContent1.Append(paragraph3);
                textBoxContent1.Append(paragraph4);
            }

            textBoxInfo21.Append(textBoxContent1);

            Wps.TextBodyProperties textBodyProperties1 = new Wps.TextBodyProperties() { Rotation = 0, UseParagraphSpacing = false, VerticalOverflow = A.TextVerticalOverflowValues.Overflow, HorizontalOverflow = A.TextHorizontalOverflowValues.Overflow, Vertical = A.TextVerticalValues.Horizontal, Wrap = A.TextWrappingValues.Square, LeftInset = 91440, TopInset = 45720, RightInset = 91440, BottomInset = 45720, ColumnCount = 1, ColumnSpacing = 0, RightToLeftColumns = false, FromWordArt = false, Anchor = A.TextAnchoringTypeValues.Top, AnchorCenter = false, ForceAntiAlias = false, CompatibleLineSpacing = true };

            A.PresetTextWrap presetTextWrap1 = new A.PresetTextWrap() { Preset = A.TextShapeValues.TextNoShape };
            A.AdjustValueList adjustValueList2 = new A.AdjustValueList();

            presetTextWrap1.Append(adjustValueList2);
            A.NoAutoFit noAutoFit1 = new A.NoAutoFit();

            textBodyProperties1.Append(presetTextWrap1);
            textBodyProperties1.Append(noAutoFit1);

            wordprocessingShape1.Append(nonVisualDrawingShapeProperties1);
            wordprocessingShape1.Append(shapeProperties1);
            wordprocessingShape1.Append(shapeStyle1);
            wordprocessingShape1.Append(textBoxInfo21);
            wordprocessingShape1.Append(textBodyProperties1);

            graphicData1.Append(wordprocessingShape1);

            graphic1.Append(graphicData1);

            anchor1.Append(simplePosition1);
            anchor1.Append(horizontalPosition1);
            anchor1.Append(verticalPosition1);
            anchor1.Append(extent1);
            anchor1.Append(effectExtent1);
            anchor1.Append(wrapNone1);
            anchor1.Append(docProperties1);
            anchor1.Append(nonVisualGraphicFrameDrawingProperties1);
            anchor1.Append(graphic1);

            drawing1.Append(anchor1);

            alternateContentChoice1.Append(drawing1);

            AlternateContentFallback alternateContentFallback1 = new AlternateContentFallback();

            Picture picture1 = new Picture();

            V.Shapetype shapetype1 = new V.Shapetype() { Id = "_x0000_t202", CoordinateSize = "21600,21600", OptionalNumber = 202, EdgePath = "m,l,21600r21600,l21600,xe" };
            V.Stroke stroke1 = new V.Stroke() { JoinStyle = V.StrokeJoinStyleValues.Miter };
            V.Path path1 = new V.Path() { AllowGradientShape = true, ConnectionPointType = Ovml.ConnectValues.Rectangle };

            shapetype1.Append(stroke1);
            shapetype1.Append(path1);

            V.Shape shape1 = new V.Shape() { Id = "Надпись 1", Style = "position:absolute;left:0;text-align:left;margin-left:595.25pt;margin-top:-14.2pt;width:200pt;height:50pt;z-index:251659264;visibility:visible;mso-wrap-style:square;mso-wrap-distance-left:9pt;mso-wrap-distance-top:0;mso-wrap-distance-right:9pt;mso-wrap-distance-bottom:0;mso-position-horizontal:absolute;mso-position-horizontal-relative:text;mso-position-vertical:absolute;mso-position-vertical-relative:text;v-text-anchor:top", OptionalString = "_x0000_s1026", Filled = false, Stroked = false, StrokeWeight = ".5pt", Type = "#_x0000_t202", EncodedPackage = "UEsDBBQABgAIAAAAIQC2gziS/gAAAOEBAAATAAAAW0NvbnRlbnRfVHlwZXNdLnhtbJSRQU7DMBBF\n90jcwfIWJU67QAgl6YK0S0CoHGBkTxKLZGx5TGhvj5O2G0SRWNoz/78nu9wcxkFMGNg6quQqL6RA\n0s5Y6ir5vt9lD1JwBDIwOMJKHpHlpr69KfdHjyxSmriSfYz+USnWPY7AufNIadK6MEJMx9ApD/oD\nOlTrorhX2lFEilmcO2RdNtjC5xDF9pCuTyYBB5bi6bQ4syoJ3g9WQ0ymaiLzg5KdCXlKLjvcW893\nSUOqXwnz5DrgnHtJTxOsQfEKIT7DmDSUCaxw7Rqn8787ZsmRM9e2VmPeBN4uqYvTtW7jvijg9N/y\nJsXecLq0q+WD6m8AAAD//wMAUEsDBBQABgAIAAAAIQA4/SH/1gAAAJQBAAALAAAAX3JlbHMvLnJl\nbHOkkMFqwzAMhu+DvYPRfXGawxijTi+j0GvpHsDYimMaW0Yy2fr2M4PBMnrbUb/Q94l/f/hMi1qR\nJVI2sOt6UJgd+ZiDgffL8ekFlFSbvV0oo4EbChzGx4f9GRdb25HMsYhqlCwG5lrLq9biZkxWOiqY\n22YiTra2kYMu1l1tQD30/bPm3wwYN0x18gb45AdQl1tp5j/sFB2T0FQ7R0nTNEV3j6o9feQzro1i\nOWA14Fm+Q8a1a8+Bvu/d/dMb2JY5uiPbhG/ktn4cqGU/er3pcvwCAAD//wMAUEsDBBQABgAIAAAA\nIQBUFACl/wIAAFgGAAAOAAAAZHJzL2Uyb0RvYy54bWysVcFuEzEQvSPxD5bv6e6GTZqsuqnSVkFI\nUVvRop4dr7ex6rWN7SQbEAfu/AL/wIEDN34h/SPG3k2aFg4UkYN3PPM8nnkznhwd15VAS2YsVzLH\nyUGMEZNUFVze5vjd9aQzwMg6IgsilGQ5XjOLj0cvXxytdMa6aq5EwQwCJ9JmK53juXM6iyJL56wi\n9kBpJsFYKlMRB1tzGxWGrMB7JaJuHPejlTKFNooya0F71hjxKPgvS0bdRVla5pDIMcTmwmrCOvNr\nNDoi2a0hes5pGwb5hygqwiVcunN1RhxBC8N/c1VxapRVpTugqopUWXLKQg6QTRI/yeZqTjQLuQA5\nVu9osv/PLT1fXhrEC6gdRpJUUKLN1823zffNz82P+8/3X1DiOVppmwH0SgPY1Seq9vhWb0HpU69L\nU/kvJIXADmyvdwyz2iEKym4vjeGHEQVb/1XPy+AmejitjXWvmaqQF3JsoIKBWLKcWtdAtxB/mVQT\nLgToSSYkWjVOw4GdBZwL6QEs9EPjBna1AzHoIbhQq4/DpJvGJ91hZ9IfHHbSSdrrDA/jQSdOhifD\nfpwO07PJJ+89SbM5Lwomp1yybd8k6d/Vpe3gpuKhcx4FbpXghc/Kx+ZzPRUGLQk08EwQetfytYeK\nHocT6ITstt+QZeQr2FQqSG4tmPcv5FtWQv1DwbwivDy2u5JQyqQLtQ48AtqjSgjvOQdbvD/aVOE5\nh3cnws1Kut3hiktlQrWfhF3cbUMuGzyQsZe3F109q9sOnqliDY1tFDQc9KbVdMKB9ymx7pIYmAeg\nhBnnLmAphYIuU62E0VyZD3/Sezy0A1gxWsF8ybF9vyCGYSTeSHjAwyRNwa0Lm7R32IWN2bfM9i1y\nUZ0q6AB4pBBdED3eia1YGlXdwCgc+1vBRCSFu3PstuKpa6YejFLKxuMAghGkiZvKK029a0+v77fr\n+oYY3T5AB510rraTiGRP3mGD9SelGi+cKnl4pJ7ghtWWeBhfoR/bUevn4/4+oB7+EEa/AAAA//8D\nAFBLAwQUAAYACAAAACEAneNfUOIAAAAMAQAADwAAAGRycy9kb3ducmV2LnhtbEyPwU7DMAyG70i8\nQ2Qkblvaio7SNZ2mShMSgsPGLtzcJmurJU5psq3w9GRc4Pjbn35/LlaT0eysRtdbEhDPI2CKGit7\nagXs3zezDJjzSBK1JSXgSzlYlbc3BebSXmirzjvfslBCLkcBnfdDzrlrOmXQze2gKOwOdjToQxxb\nLke8hHKjeRJFC26wp3Chw0FVnWqOu5MR8FJt3nBbJyb71tXz62E9fO4/UiHu76b1EphXk/+D4aof\n1KEMTrU9kXRMhxw/RWlgBcyS7AHYFUl/R7WAx3gBvCz4/yfKHwAAAP//AwBQSwECLQAUAAYACAAA\nACEAtoM4kv4AAADhAQAAEwAAAAAAAAAAAAAAAAAAAAAAW0NvbnRlbnRfVHlwZXNdLnhtbFBLAQIt\nABQABgAIAAAAIQA4/SH/1gAAAJQBAAALAAAAAAAAAAAAAAAAAC8BAABfcmVscy8ucmVsc1BLAQIt\nABQABgAIAAAAIQBUFACl/wIAAFgGAAAOAAAAAAAAAAAAAAAAAC4CAABkcnMvZTJvRG9jLnhtbFBL\nAQItABQABgAIAAAAIQCd419Q4gAAAAwBAAAPAAAAAAAAAAAAAAAAAFkFAABkcnMvZG93bnJldi54\nbWxQSwUGAAAAAAQABADzAAAAaAYAAAAA\n" };
            V.Fill fill1 = new V.Fill() { DetectMouseClick = true };

            V.TextBox textBox1 = new V.TextBox();

            TextBoxContent textBoxContent2 = new TextBoxContent();

            Paragraph paragraph5 = new Paragraph() { RsidParagraphMarkRevision = "00FA5335", RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

            ParagraphProperties paragraphProperties5 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines5 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
            Justification justification5 = new Justification() { Val = JustificationValues.Right };

            ParagraphMarkRunProperties paragraphMarkRunProperties5 = new ParagraphMarkRunProperties();
            FontSize fontSize10 = new FontSize() { Val = "20" };

            paragraphMarkRunProperties5.Append(fontSize10);

            paragraphProperties5.Append(spacingBetweenLines5);
            paragraphProperties5.Append(justification5);
            paragraphProperties5.Append(paragraphMarkRunProperties5);

            Run run6 = new Run() { RsidRunProperties = "00FA5335" };

            RunProperties runProperties6 = new RunProperties();
            FontSize fontSize11 = new FontSize() { Val = "20" };

            runProperties6.Append(fontSize11);
            Text text5 = new Text();
            text5.Text = "«УТВЕРЖДАЮ»";

            run6.Append(runProperties6);
            run6.Append(text5);

            paragraph5.Append(paragraphProperties5);
            paragraph5.Append(run6);

            Paragraph paragraph6 = new Paragraph() { RsidParagraphMarkRevision = "00FA5335", RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

            ParagraphProperties paragraphProperties6 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines6 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
            Justification justification6 = new Justification() { Val = JustificationValues.Right };

            ParagraphMarkRunProperties paragraphMarkRunProperties6 = new ParagraphMarkRunProperties();
            FontSize fontSize12 = new FontSize() { Val = "20" };

            paragraphMarkRunProperties6.Append(fontSize12);

            paragraphProperties6.Append(spacingBetweenLines6);
            paragraphProperties6.Append(justification6);
            paragraphProperties6.Append(paragraphMarkRunProperties6);

            Run run7 = new Run() { RsidRunProperties = "00FA5335" };

            RunProperties runProperties7 = new RunProperties();
            FontSize fontSize13 = new FontSize() { Val = "20" };

            runProperties7.Append(fontSize13);
            Text text6 = new Text();
            text6.Text = "Проректор по учебной работе";

            run7.Append(runProperties7);
            run7.Append(text6);

            paragraph6.Append(paragraphProperties6);
            paragraph6.Append(run7);

            Paragraph paragraph7 = new Paragraph() { RsidParagraphMarkRevision = "00FA5335", RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

            ParagraphProperties paragraphProperties7 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines7 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
            Justification justification7 = new Justification() { Val = JustificationValues.Right };

            ParagraphMarkRunProperties paragraphMarkRunProperties7 = new ParagraphMarkRunProperties();
            FontSize fontSize14 = new FontSize() { Val = "20" };

            paragraphMarkRunProperties7.Append(fontSize14);

            paragraphProperties7.Append(spacingBetweenLines7);
            paragraphProperties7.Append(justification7);
            paragraphProperties7.Append(paragraphMarkRunProperties7);

            Run run8 = new Run() { RsidRunProperties = "00FA5335" };

            RunProperties runProperties8 = new RunProperties();
            FontSize fontSize15 = new FontSize() { Val = "20" };

            runProperties8.Append(fontSize15);
            Text text7 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text7.Text = "______________     ";

            run8.Append(runProperties8);
            run8.Append(text7);
            ProofError proofError3 = new ProofError() { Type = ProofingErrorValues.SpellStart };

            Run run9 = new Run() { RsidRunProperties = "00FA5335" };

            RunProperties runProperties9 = new RunProperties();
            FontSize fontSize16 = new FontSize() { Val = "20" };

            runProperties9.Append(fontSize16);
            Text text8 = new Text();
            text8.Text = "А.В.Синицкий";

            run9.Append(runProperties9);
            run9.Append(text8);
            ProofError proofError4 = new ProofError() { Type = ProofingErrorValues.SpellEnd };

            paragraph7.Append(paragraphProperties7);
            paragraph7.Append(run8);
            paragraph7.Append(proofError3);
            paragraph7.Append(run9);
            paragraph7.Append(proofError4);

            textBoxContent2.Append(paragraph5);
            textBoxContent2.Append(paragraph6);
            textBoxContent2.Append(paragraph7);

            textBox1.Append(textBoxContent2);

            shape1.Append(fill1);
            shape1.Append(textBox1);

            picture1.Append(shapetype1);
            picture1.Append(shape1);

            alternateContentFallback1.Append(picture1);

            alternateContent1.Append(alternateContentChoice1);
            alternateContent1.Append(alternateContentFallback1);

            run1.Append(runProperties1);
            run1.Append(alternateContent1);

            Run run10 = new Run() { RsidRunProperties = "00FA5335" };

            RunProperties runProperties10 = new RunProperties();
            FontSize fontSize17 = new FontSize() { Val = "20" };

            runProperties10.Append(fontSize17);
            Text text9 = new Text();
            text9.Text = "Расписание";

            run10.Append(runProperties10);
            run10.Append(text9);

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(bookmarkStart1);
            paragraph1.Append(bookmarkEnd1);
            paragraph1.Append(run1);
            paragraph1.Append(run10);

            Paragraph paragraph8 = new Paragraph() { RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

            ParagraphProperties paragraphProperties8 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines8 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
            Justification justification8 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties8 = new ParagraphMarkRunProperties();
            FontSize fontSize18 = new FontSize() { Val = "20" };

            paragraphMarkRunProperties8.Append(fontSize18);

            paragraphProperties8.Append(spacingBetweenLines8);
            paragraphProperties8.Append(justification8);
            paragraphProperties8.Append(paragraphMarkRunProperties8);

            Run run11 = new Run() { RsidRunProperties = "00FA5335" };

            RunProperties runProperties11 = new RunProperties();
            FontSize fontSize19 = new FontSize() { Val = "20" };

            runProperties11.Append(fontSize19);
            Text text10 = new Text();
            text10.Text = "второго семестра 2013 – 2014 учебного года";

            run11.Append(runProperties11);
            run11.Append(text10);

            paragraph8.Append(paragraphProperties8);
            paragraph8.Append(run11);

            Paragraph paragraph9 = new Paragraph() { RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

            ParagraphProperties paragraphProperties9 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines9 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
            Justification justification9 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties9 = new ParagraphMarkRunProperties();
            FontSize fontSize20 = new FontSize() { Val = "20" };

            paragraphMarkRunProperties9.Append(fontSize20);

            paragraphProperties9.Append(spacingBetweenLines9);
            paragraphProperties9.Append(justification9);
            paragraphProperties9.Append(paragraphMarkRunProperties9);

            Run run12 = new Run() { RsidRunProperties = "00FA5335" };

            RunProperties runProperties12 = new RunProperties();
            FontSize fontSize21 = new FontSize() { Val = "20" };

            runProperties12.Append(fontSize21);
            Text text11 = new Text();
            text11.Text = FacultyName;

            run12.Append(runProperties12);
            run12.Append(text11);

            paragraph9.Append(paragraphProperties9);
            paragraph9.Append(run12);

            Paragraph paragraph10 = new Paragraph() { RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

            ParagraphProperties paragraphProperties10 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines10 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
            Justification justification10 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties10 = new ParagraphMarkRunProperties();
            Bold bold1 = new Bold();
            FontSize fontSize22 = new FontSize() { Val = "28" };

            paragraphMarkRunProperties10.Append(bold1);
            paragraphMarkRunProperties10.Append(fontSize22);

            paragraphProperties10.Append(spacingBetweenLines10);
            paragraphProperties10.Append(justification10);
            paragraphProperties10.Append(paragraphMarkRunProperties10);

            Run run13 = new Run() { RsidRunProperties = "00FA5335" };

            RunProperties runProperties13 = new RunProperties();
            Bold bold2 = new Bold();
            FontSize fontSize23 = new FontSize() { Val = "28" };

            runProperties13.Append(bold2);
            runProperties13.Append(fontSize23);
            Text text12 = new Text();
            text12.Text = Dow;

            run13.Append(runProperties13);
            run13.Append(text12);

            paragraph10.Append(paragraphProperties10);
            paragraph10.Append(run13);

            Table table1 = new Table();

            TableProperties tableProperties1 = new TableProperties();
            TableWidth tableWidth1 = new TableWidth() { Width = "15919", Type = TableWidthUnitValues.Dxa };

            TableBorders tableBorders1 = new TableBorders();
            TopBorder topBorder1 = new TopBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
            InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };

            tableBorders1.Append(topBorder1);
            tableBorders1.Append(leftBorder1);
            tableBorders1.Append(bottomBorder1);
            tableBorders1.Append(rightBorder1);
            tableBorders1.Append(insideHorizontalBorder1);
            tableBorders1.Append(insideVerticalBorder1);
            TableLayout tableLayout1 = new TableLayout() { Type = TableLayoutValues.Fixed };
            TableLook tableLook1 = new TableLook() { Val = "0000" };

            tableProperties1.Append(tableWidth1);
            tableProperties1.Append(tableBorders1);
            tableProperties1.Append(tableLayout1);
            tableProperties1.Append(tableLook1);

            TableGrid tableGrid1 = new TableGrid();
            GridColumn gridColumn1 = new GridColumn() { Width = "1383" };

            int colWidth = 14536 / Schedule.Count;
            for (int i = 0; i < Schedule.Count; i++)
            {
                GridColumn gridColumn2 = new GridColumn() { Width = colWidth.ToString() };

                tableGrid1.Append(gridColumn2);
            }

            // Ряд имён групп

            TableRow tableRow1 = new TableRow() { RsidTableRowMarkRevision = "00FA5335", RsidTableRowAddition = "00FA5335", RsidTableRowProperties = "00FA5335" };

            TablePropertyExceptions tablePropertyExceptions1 = new TablePropertyExceptions();

            TableCellMarginDefault tableCellMarginDefault1 = new TableCellMarginDefault();
            TopMargin topMargin1 = new TopMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
            BottomMargin bottomMargin1 = new BottomMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };

            tableCellMarginDefault1.Append(topMargin1);
            tableCellMarginDefault1.Append(bottomMargin1);

            tablePropertyExceptions1.Append(tableCellMarginDefault1);

            Dictionary<int, List<int>> plainGroupsListIds = new Dictionary<int, List<int>>();
            Dictionary<int, List<int>> nGroupsListIds = new Dictionary<int, List<int>>();

            var groupNames = new List<string>();

            foreach (var group in Schedule)
            {
                var groupName = _Repo.GetStudentGroup(group.Key).Name;
                groupNames.Add(groupName.Replace(" (+Н)", ""));

                if (groupName.Contains(" (+Н)"))
                {
                    var plainGroupName = groupName.Replace(" (+Н)", "");
                    var nGroupName = groupName.Replace(" (+", "(");

                    var plainGroupId = _Repo.FindStudentGroup(plainGroupName).StudentGroupId;
                    var plainStudentIds = _Repo.GetAllStudentsInGroups()
                            .Where(sig => sig.StudentGroup.StudentGroupId == plainGroupId)
                            .Select(stig => stig.Student.StudentId)
                            .ToList();
                    plainGroupsListIds.Add(group.Key, _Repo.GetAllStudentsInGroups()
                            .Where(sig => plainStudentIds.Contains(sig.Student.StudentId))
                            .Select(stig => stig.StudentGroup.StudentGroupId)
                            .Distinct()
                            .ToList());

                    var nGroupId = _Repo.FindStudentGroup(nGroupName).StudentGroupId;
                    var nStudentIds = _Repo.GetAllStudentsInGroups()
                            .Where(sig => sig.StudentGroup.StudentGroupId == nGroupId)
                            .Select(stig => stig.Student.StudentId)
                            .ToList();
                    nGroupsListIds.Add(group.Key, _Repo.GetAllStudentsInGroups()
                            .Where(sig => nStudentIds.Contains(sig.Student.StudentId))
                            .Select(stig => stig.StudentGroup.StudentGroupId)
                            .Distinct()
                            .ToList());
                }
            }

            TableCell tableCell1 = new TableCell();

            TableCellProperties tableCellProperties1 = new TableCellProperties();
            TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = "1383", Type = TableWidthUnitValues.Dxa };
            Shading shading1 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto" };

            tableCellProperties1.Append(tableCellWidth1);
            tableCellProperties1.Append(shading1);

            Paragraph paragraph11 = new Paragraph() { RsidParagraphMarkRevision = "00FA5335", RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

            ParagraphProperties paragraphProperties11 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines11 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
            Justification justification11 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties11 = new ParagraphMarkRunProperties();
            FontSize fontSize24 = new FontSize() { Val = "20" };

            paragraphMarkRunProperties11.Append(fontSize24);

            paragraphProperties11.Append(spacingBetweenLines11);
            paragraphProperties11.Append(justification11);
            paragraphProperties11.Append(paragraphMarkRunProperties11);

            Run run14 = new Run() { RsidRunProperties = "00FA5335" };

            RunProperties runProperties14 = new RunProperties();
            FontSize fontSize25 = new FontSize() { Val = "20" };

            runProperties14.Append(fontSize25);
            Text text13 = new Text();
            text13.Text = "Время";

            run14.Append(runProperties14);
            run14.Append(text13);

            paragraph11.Append(paragraphProperties11);
            paragraph11.Append(run14);

            tableCell1.Append(tableCellProperties1);
            tableCell1.Append(paragraph11);

            var HeaderCells = new List<TableCell>();

            for (int i = 0; i < Schedule.Count; i++)
            {
                TableCell tableCell2 = new TableCell();

                TableCellProperties tableCellProperties2 = new TableCellProperties();
                TableCellWidth tableCellWidth2 = new TableCellWidth() { Width = colWidth.ToString(), Type = TableWidthUnitValues.Dxa };
                Shading shading2 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto" };

                tableCellProperties2.Append(tableCellWidth2);
                tableCellProperties2.Append(shading2);

                Paragraph paragraph12 = new Paragraph() { RsidParagraphMarkRevision = "00FA5335", RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

                ParagraphProperties paragraphProperties12 = new ParagraphProperties();
                SpacingBetweenLines spacingBetweenLines12 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
                Justification justification12 = new Justification() { Val = JustificationValues.Center };

                ParagraphMarkRunProperties paragraphMarkRunProperties12 = new ParagraphMarkRunProperties();
                FontSize fontSize26 = new FontSize() { Val = "20" };

                paragraphMarkRunProperties12.Append(fontSize26);

                paragraphProperties12.Append(spacingBetweenLines12);
                paragraphProperties12.Append(justification12);
                paragraphProperties12.Append(paragraphMarkRunProperties12);

                Run run15 = new Run() { RsidRunProperties = "00FA5335" };

                RunProperties runProperties15 = new RunProperties();
                FontSize fontSize27 = new FontSize() { Val = "20" };

                runProperties15.Append(fontSize27);
                Text text14 = new Text();
                text14.Text = groupNames[i];

                run15.Append(runProperties15);
                run15.Append(text14);

                paragraph12.Append(paragraphProperties12);
                paragraph12.Append(run15);

                tableCell2.Append(tableCellProperties2);
                tableCell2.Append(paragraph12);

                HeaderCells.Add(tableCell2);
            }

            tableRow1.Append(tablePropertyExceptions1);
            tableRow1.Append(tableCell1);
            foreach (var tc in HeaderCells)
            {
                tableRow1.Append(tc);
            }
            // FINISH --------- Ряд имён групп

            var timeList = new List<string>();
            foreach (var group in Schedule)
            {
                foreach (var time in group.Value.Keys)
                {
                    if (!timeList.Contains(time))
                    {
                        timeList.Add(time);
                    }
                }
            }

            var ScheduleRows = new List<TableRow>();

            var timeRowIndexList = new List<int>();

            foreach (var time in timeList.OrderBy(t => int.Parse(t.Split(':')[0]) * 60 + int.Parse(t.Split(':')[1])))
            {
                var TimeSchedule = new List<List<string>>();
                for (int i = 0; i < Schedule.Count; i++)
                {
                    TimeSchedule.Add(new List<string>());
                }

                var Hour = int.Parse(time.Substring(0, 2));
                var Minute = int.Parse(time.Substring(3, 2));

                Minute += 80;

                while (Minute >= 60)
                {
                    Hour++;
                    Minute -= 60;
                }

                var timeString = time + " - " + Hour.ToString("D2") + ":" + Minute.ToString("D2");

                var columnGroupIndex = 0;
                foreach (var group in Schedule)
                {
                    if (group.Value.ContainsKey(time))
                    {
                        var eventCount = group.Value[time].Count;

                        var tfdIndex = 0;
                        foreach (var tfdData in group.Value[time].OrderBy(tfd => tfd.Value.Item2.Select(l => _Repo.CalculateWeekNumber(l.Calendar.Date)).Min()))
                        {
                            var cellText = "";
                            cellText += tfdData.Value.Item2[0].TeacherForDiscipline.Discipline.Name;
                            var groupId = tfdData.Value.Item2[0].TeacherForDiscipline.Discipline.StudentGroup.StudentGroupId;

                            if (plainGroupsListIds.ContainsKey(group.Key))
                            {
                                if (plainGroupsListIds[group.Key].Contains(groupId) && nGroupsListIds[group.Key].Contains(groupId))
                                {
                                    cellText += " (+Н)";
                                }
                                if (!plainGroupsListIds[group.Key].Contains(groupId) && nGroupsListIds[group.Key].Contains(groupId))
                                {
                                    cellText += " (Н)";
                                }
                            }
                            cellText += Environment.NewLine;
                            cellText += tfdData.Value.Item2[0].TeacherForDiscipline.Teacher.FIO + Environment.NewLine;
                            cellText += "(" + tfdData.Value.Item1 + ")" + Environment.NewLine;

                            var audWeekList = tfdData.Value.Item2.ToDictionary(l => _Repo.CalculateWeekNumber(l.Calendar.Date), l => l.Auditorium.Name);
                            var grouped = audWeekList.GroupBy(a => a.Value);

                            var enumerable = grouped as List<IGrouping<string, KeyValuePair<int, string>>> ?? grouped.ToList();
                            var gcount = enumerable.Count();
                            if (gcount == 1)
                            {
                                cellText += enumerable.ElementAt(0).Key;
                            }
                            else
                            {
                                for (int j = 0; j < gcount; j++)
                                {
                                    var jItem = enumerable.OrderBy(e => e.Select(ag => ag.Key).ToList().Min()).ElementAt(j);
                                    cellText += ScheduleRepository.CombineWeeks(jItem.Select(ag => ag.Key).ToList()) + " - " + jItem.Key;

                                    if (j != gcount - 1)
                                    {
                                        cellText += Environment.NewLine;
                                    }
                                }
                            }

                            TimeSchedule[columnGroupIndex].Add(cellText);

                            tfdIndex++;

                        }
                    }

                    columnGroupIndex++;
                }

                // ====================================================================================================================================================

                TableRow tableRow2 = new TableRow() { RsidTableRowMarkRevision = "00FA5335", RsidTableRowAddition = "00FA5335", RsidTableRowProperties = "00FA5335" };

                TablePropertyExceptions tablePropertyExceptions2 = new TablePropertyExceptions();

                TableCellMarginDefault tableCellMarginDefault2 = new TableCellMarginDefault();
                TopMargin topMargin2 = new TopMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
                BottomMargin bottomMargin2 = new BottomMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };

                tableCellMarginDefault2.Append(topMargin2);
                tableCellMarginDefault2.Append(bottomMargin2);

                tablePropertyExceptions2.Append(tableCellMarginDefault2);

                TableCell tableCell4 = new TableCell();

                TableCellProperties tableCellProperties4 = new TableCellProperties();
                TableCellWidth tableCellWidth4 = new TableCellWidth() { Width = "1383", Type = TableWidthUnitValues.Dxa };
                Shading shading4 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto" };
                TableCellVerticalAlignment tableCellVerticalAlignment1 = new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center };

                tableCellProperties4.Append(tableCellWidth4);
                tableCellProperties4.Append(shading4);
                tableCellProperties4.Append(tableCellVerticalAlignment1);

                Paragraph paragraph14 = new Paragraph() { RsidParagraphMarkRevision = "00FA5335", RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

                ParagraphProperties paragraphProperties14 = new ParagraphProperties();
                SpacingBetweenLines spacingBetweenLines14 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
                Justification justification14 = new Justification() { Val = JustificationValues.Center };

                ParagraphMarkRunProperties paragraphMarkRunProperties14 = new ParagraphMarkRunProperties();
                FontSize fontSize30 = new FontSize() { Val = "20" };

                paragraphMarkRunProperties14.Append(fontSize30);

                paragraphProperties14.Append(spacingBetweenLines14);
                paragraphProperties14.Append(justification14);
                paragraphProperties14.Append(paragraphMarkRunProperties14);

                Run run17 = new Run() { RsidRunProperties = "00FA5335" };

                RunProperties runProperties17 = new RunProperties();
                FontSize fontSize31 = new FontSize() { Val = "20" };

                runProperties17.Append(fontSize31);
                Text text16 = new Text();
                text16.Text = timeString;

                run17.Append(runProperties17);
                run17.Append(text16);

                paragraph14.Append(paragraphProperties14);
                paragraph14.Append(run17);

                tableCell4.Append(tableCellProperties4);
                tableCell4.Append(paragraph14);

                var TimeScheduleTableCells = new List<TableCell>();

                for (int i = 0; i < TimeSchedule.Count; i++)
                {
                    TableCell tableCell6 = new TableCell();

                    TableCellProperties tableCellProperties6 = new TableCellProperties();
                    TableCellWidth tableCellWidth6 = new TableCellWidth() { Width = colWidth.ToString(), Type = TableWidthUnitValues.Dxa };
                    Shading shading6 = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = "auto" };
                    TableCellVerticalAlignment tableCellVerticalAlignment2 = new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center };

                    tableCellProperties6.Append(tableCellWidth6);
                    tableCellProperties6.Append(shading6);
                    tableCellProperties6.Append(tableCellVerticalAlignment2);

                    if (TimeSchedule[i].Count == 0) // Empty cell
                    {
                        Paragraph paragraph15 = new Paragraph() { RsidParagraphMarkRevision = "00FA5335", RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

                        ParagraphProperties paragraphProperties15 = new ParagraphProperties();
                        SpacingBetweenLines spacingBetweenLines15 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

                        ParagraphMarkRunProperties paragraphMarkRunProperties15 = new ParagraphMarkRunProperties();
                        FontSize fontSize32 = new FontSize() { Val = "20" };

                        paragraphMarkRunProperties15.Append(fontSize32);

                        paragraphProperties15.Append(spacingBetweenLines15);
                        paragraphProperties15.Append(paragraphMarkRunProperties15);

                        paragraph15.Append(paragraphProperties15);

                        tableCell6.Append(tableCellProperties6);
                        tableCell6.Append(paragraph15);
                    }
                    else
                    {
                        Table table2 = new Table();

                        TableProperties tableProperties2 = new TableProperties();
                        TableWidth tableWidth2 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto };
                        TableLayout tableLayout2 = new TableLayout() { Type = TableLayoutValues.Fixed };
                        TableLook tableLook2 = new TableLook() { Val = "0000" };

                        TableBorders tableBorders9 = new TableBorders();
                        TopBorder topBorder9 = new TopBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
                        LeftBorder leftBorder9 = new LeftBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
                        BottomBorder bottomBorder9 = new BottomBorder() { Val = BorderValues.None, Color = "000000", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
                        RightBorder rightBorder9 = new RightBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
                        InsideHorizontalBorder insideHorizontalBorder9 = new InsideHorizontalBorder() { Val = BorderValues.Single, Color = "000000", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
                        InsideVerticalBorder insideVerticalBorder9 = new InsideVerticalBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };

                        tableBorders9.Append(topBorder9);
                        tableBorders9.Append(leftBorder9);
                        tableBorders9.Append(bottomBorder9);
                        tableBorders9.Append(rightBorder9);
                        tableBorders9.Append(insideHorizontalBorder9);
                        tableBorders9.Append(insideVerticalBorder9);

                        tableProperties2.Append(tableWidth2);
                        tableProperties2.Append(tableBorders9);
                        tableProperties2.Append(tableLayout2);
                        tableProperties2.Append(tableLook2);

                        TableGrid tableGrid2 = new TableGrid();
                        GridColumn gridColumn4 = new GridColumn() { Width = "7052" };

                        tableGrid2.Append(gridColumn4);

                        for (int j = 0; j < TimeSchedule[i].Count; j++)
                        {
                            var item = TimeSchedule[i][j];
                            var itemLines = Regex.Split(item, "\r\n");

                            TableRow tableRow3 = new TableRow() { RsidTableRowMarkRevision = "00FA5335", RsidTableRowAddition = "00FA5335", RsidTableRowProperties = "00FA5335" };

                            TablePropertyExceptions tablePropertyExceptions3 = new TablePropertyExceptions();

                            TableCellMarginDefault tableCellMarginDefault3 = new TableCellMarginDefault();
                            TopMargin topMargin3 = new TopMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };
                            BottomMargin bottomMargin3 = new BottomMargin() { Width = "0", Type = TableWidthUnitValues.Dxa };

                            tableCellMarginDefault3.Append(topMargin3);
                            tableCellMarginDefault3.Append(bottomMargin3);

                            tablePropertyExceptions3.Append(tableCellMarginDefault3);

                            TableCell tableCell7 = new TableCell();

                            TableCellProperties tableCellProperties7 = new TableCellProperties();
                            TableCellWidth tableCellWidth7 = new TableCellWidth() { Width = "7052", Type = TableWidthUnitValues.Dxa };
                            TableCellVerticalAlignment tableCellVerticalAlignment3 = new TableCellVerticalAlignment() { Val = TableVerticalAlignmentValues.Center };

                            TableCellBorders tableCellBorders99 = new TableCellBorders();
                            BottomBorder bottomBorder99;
                            if (j != TimeSchedule[i].Count - 1)
                            {
                                bottomBorder99 = new BottomBorder() { Val = BorderValues.Single, Color = "auto", Size = (UInt32Value)4U, Space = (UInt32Value)0U };
                                tableCellBorders99.Append(bottomBorder99);
                            }

                            tableCellProperties7.Append(tableCellWidth7);
                            tableCellProperties7.Append(tableCellBorders99);
                            tableCellProperties7.Append(tableCellVerticalAlignment3);

                            Paragraph paragraph16 = new Paragraph() { RsidParagraphMarkRevision = "00FA5335", RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

                            ParagraphProperties paragraphProperties16 = new ParagraphProperties();
                            SpacingBetweenLines spacingBetweenLines16 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

                            ParagraphMarkRunProperties paragraphMarkRunProperties16 = new ParagraphMarkRunProperties();
                            FontSize fontSize33 = new FontSize() { Val = "20" };

                            paragraphMarkRunProperties16.Append(fontSize33);

                            paragraphProperties16.Append(spacingBetweenLines16);
                            paragraphProperties16.Append(paragraphMarkRunProperties16);

                            Run run18 = new Run() { RsidRunProperties = "00FA5335" };

                            RunProperties runProperties18 = new RunProperties();
                            FontSize fontSize34 = new FontSize() { Val = "20" };

                            runProperties18.Append(fontSize34);
                            Text text17 = new Text();
                            text17.Text = itemLines[0];

                            run18.Append(runProperties18);
                            run18.Append(text17);

                            paragraph16.Append(paragraphProperties16);
                            paragraph16.Append(run18);

                            Paragraph paragraph17 = new Paragraph() { RsidParagraphMarkRevision = "00FA5335", RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

                            ParagraphProperties paragraphProperties17 = new ParagraphProperties();
                            SpacingBetweenLines spacingBetweenLines17 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

                            ParagraphMarkRunProperties paragraphMarkRunProperties17 = new ParagraphMarkRunProperties();
                            FontSize fontSize35 = new FontSize() { Val = "20" };

                            paragraphMarkRunProperties17.Append(fontSize35);

                            paragraphProperties17.Append(spacingBetweenLines17);
                            paragraphProperties17.Append(paragraphMarkRunProperties17);

                            Run run19 = new Run() { RsidRunProperties = "00FA5335" };

                            RunProperties runProperties19 = new RunProperties();
                            FontSize fontSize36 = new FontSize() { Val = "20" };

                            runProperties19.Append(fontSize36);
                            Text text18 = new Text();
                            text18.Text = itemLines[1];

                            run19.Append(runProperties19);
                            run19.Append(text18);

                            paragraph17.Append(paragraphProperties17);
                            paragraph17.Append(run19);

                            Paragraph paragraph18 = new Paragraph() { RsidParagraphMarkRevision = "00FA5335", RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

                            ParagraphProperties paragraphProperties18 = new ParagraphProperties();
                            SpacingBetweenLines spacingBetweenLines18 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

                            ParagraphMarkRunProperties paragraphMarkRunProperties18 = new ParagraphMarkRunProperties();
                            FontSize fontSize37 = new FontSize() { Val = "20" };

                            paragraphMarkRunProperties18.Append(fontSize37);

                            paragraphProperties18.Append(spacingBetweenLines18);
                            paragraphProperties18.Append(paragraphMarkRunProperties18);

                            Run run20 = new Run() { RsidRunProperties = "00FA5335" };

                            RunProperties runProperties20 = new RunProperties();
                            FontSize fontSize38 = new FontSize() { Val = "20" };

                            runProperties20.Append(fontSize38);
                            Text text19 = new Text();
                            text19.Text = itemLines[2];

                            run20.Append(runProperties20);
                            run20.Append(text19);

                            paragraph18.Append(paragraphProperties18);
                            paragraph18.Append(run20);

                            Paragraph paragraph19 = new Paragraph() { RsidParagraphMarkRevision = "00FA5335", RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

                            ParagraphProperties paragraphProperties19 = new ParagraphProperties();
                            SpacingBetweenLines spacingBetweenLines19 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

                            ParagraphMarkRunProperties paragraphMarkRunProperties19 = new ParagraphMarkRunProperties();
                            FontSize fontSize39 = new FontSize() { Val = "20" };

                            paragraphMarkRunProperties19.Append(fontSize39);

                            paragraphProperties19.Append(spacingBetweenLines19);
                            paragraphProperties19.Append(paragraphMarkRunProperties19);

                            Run run21 = new Run() { RsidRunProperties = "00FA5335" };

                            RunProperties runProperties21 = new RunProperties();
                            FontSize fontSize40 = new FontSize() { Val = "20" };

                            runProperties21.Append(fontSize40);
                            Text text20 = new Text();
                            text20.Text = itemLines[3];

                            run21.Append(runProperties21);
                            run21.Append(text20);

                            paragraph19.Append(paragraphProperties19);
                            paragraph19.Append(run21);

                            tableCell7.Append(tableCellProperties7);
                            tableCell7.Append(paragraph16);
                            tableCell7.Append(paragraph17);
                            tableCell7.Append(paragraph18);
                            tableCell7.Append(paragraph19);

                            tableRow3.Append(tablePropertyExceptions3);
                            tableRow3.Append(tableCell7);

                            table2.Append(tableRow3);
                        }

                        table2.Append(tableProperties2);
                        table2.Append(tableGrid2);

                        Paragraph paragraph20 = new Paragraph() { RsidParagraphMarkRevision = "00FA5335", RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

                        ParagraphProperties paragraphProperties20 = new ParagraphProperties();
                        SpacingBetweenLines spacingBetweenLines20 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };

                        ParagraphMarkRunProperties paragraphMarkRunProperties20 = new ParagraphMarkRunProperties();
                        FontSize fontSize41 = new FontSize() { Val = "20" };

                        paragraphMarkRunProperties20.Append(fontSize41);

                        paragraphProperties20.Append(spacingBetweenLines20);
                        paragraphProperties20.Append(paragraphMarkRunProperties20);

                        paragraph20.Append(paragraphProperties20);

                        tableCell6.Append(tableCellProperties6);
                        tableCell6.Append(table2);
                        tableCell6.Append(paragraph20);
                    }

                    TimeScheduleTableCells.Add(tableCell6);
                }

                tableRow2.Append(tablePropertyExceptions2);
                tableRow2.Append(tableCell4);

                foreach (var tc in TimeScheduleTableCells)
                {
                    tableRow2.Append(tc);
                }

                ScheduleRows.Add(tableRow2);
            }

            table1.Append(tableProperties1);
            table1.Append(tableGrid1);
            table1.Append(tableRow1);

            foreach (var tr in ScheduleRows)
            {
                table1.Append(tr);
            }

            Paragraph paragraph61 = new Paragraph() { RsidParagraphMarkRevision = "00FA5335", RsidParagraphAddition = "00FA5335", RsidParagraphProperties = "00FA5335", RsidRunAdditionDefault = "00FA5335" };

            ParagraphProperties paragraphProperties61 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines61 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
            Justification justification19 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties61 = new ParagraphMarkRunProperties();
            Bold bold3 = new Bold();
            FontSize fontSize114 = new FontSize() { Val = "20" };

            paragraphMarkRunProperties61.Append(bold3);
            paragraphMarkRunProperties61.Append(fontSize114);

            paragraphProperties61.Append(spacingBetweenLines61);
            paragraphProperties61.Append(justification19);
            paragraphProperties61.Append(paragraphMarkRunProperties61);

            paragraph61.Append(paragraphProperties61);

            SectionProperties sectionProperties1 = new SectionProperties() { RsidRPr = "00FA5335", RsidR = "00FA5335", RsidSect = "00FA5335" };
            PageSize pageSize1 = new PageSize() { Width = (UInt32Value)16838U, Height = (UInt32Value)11906U, Orient = PageOrientationValues.Landscape };
            PageMargin pageMargin1 = new PageMargin() { Top = 567, Right = (UInt32Value)567U, Bottom = 567, Left = (UInt32Value)567U, Header = (UInt32Value)708U, Footer = (UInt32Value)708U, Gutter = (UInt32Value)0U };
            Columns columns1 = new Columns() { Space = "708" };
            DocGrid docGrid1 = new DocGrid() { LinePitch = 360 };

            sectionProperties1.Append(pageSize1);
            sectionProperties1.Append(pageMargin1);
            sectionProperties1.Append(columns1);
            sectionProperties1.Append(docGrid1);

            body1.Append(paragraph1);
            body1.Append(paragraph8);
            body1.Append(paragraph9);
            body1.Append(paragraph10);
            body1.Append(table1);
            body1.Append(paragraph61);
            body1.Append(sectionProperties1);

            document1.Append(body1);

            mainDocumentPart1.Document = document1;
        }
Exemplo n.º 7
0
        // Generates content of documentSettingsPart1.
        private void GenerateDocumentSettingsPart1Content(DocumentSettingsPart documentSettingsPart1)
        {
            Settings settings1 = new Settings(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "w14 w15" }  };
            settings1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            settings1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            settings1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            settings1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            settings1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            settings1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            settings1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            settings1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            settings1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
            settings1.AddNamespaceDeclaration("sl", "http://schemas.openxmlformats.org/schemaLibrary/2006/main");
            View view1 = new View(){ Val = ViewValues.Normal };
            Zoom zoom1 = new Zoom(){ Percent = "100" };
            DoNotDisplayPageBoundaries doNotDisplayPageBoundaries1 = new DoNotDisplayPageBoundaries();
            BordersDoNotSurroundHeader bordersDoNotSurroundHeader1 = new BordersDoNotSurroundHeader();
            BordersDoNotSurroundFooter bordersDoNotSurroundFooter1 = new BordersDoNotSurroundFooter();
            DefaultTabStop defaultTabStop1 = new DefaultTabStop(){ Val = 720 };
            CharacterSpacingControl characterSpacingControl1 = new CharacterSpacingControl(){ Val = CharacterSpacingValues.DoNotCompress };

            Compatibility compatibility1 = new Compatibility();
            UseFarEastLayout useFarEastLayout1 = new UseFarEastLayout();
            CompatibilitySetting compatibilitySetting1 = new CompatibilitySetting(){ Name = CompatSettingNameValues.CompatibilityMode, Uri = "http://schemas.microsoft.com/office/word", Val = "15" };
            CompatibilitySetting compatibilitySetting2 = new CompatibilitySetting(){ Name = CompatSettingNameValues.OverrideTableStyleFontSizeAndJustification, Uri = "http://schemas.microsoft.com/office/word", Val = "1" };
            CompatibilitySetting compatibilitySetting3 = new CompatibilitySetting(){ Name = CompatSettingNameValues.EnableOpenTypeFeatures, Uri = "http://schemas.microsoft.com/office/word", Val = "1" };
            CompatibilitySetting compatibilitySetting4 = new CompatibilitySetting(){ Name = CompatSettingNameValues.DoNotFlipMirrorIndents, Uri = "http://schemas.microsoft.com/office/word", Val = "1" };
            CompatibilitySetting compatibilitySetting5 = new CompatibilitySetting(){ Name = CompatSettingNameValues.DifferentiateMultirowTableHeaders, Uri = "http://schemas.microsoft.com/office/word", Val = "1" };

            compatibility1.Append(useFarEastLayout1);
            compatibility1.Append(compatibilitySetting1);
            compatibility1.Append(compatibilitySetting2);
            compatibility1.Append(compatibilitySetting3);
            compatibility1.Append(compatibilitySetting4);
            compatibility1.Append(compatibilitySetting5);

            Rsids rsids1 = new Rsids();
            RsidRoot rsidRoot1 = new RsidRoot(){ Val = "00C47703" };
            Rsid rsid1 = new Rsid(){ Val = "0020094C" };
            Rsid rsid2 = new Rsid(){ Val = "00472802" };
            Rsid rsid3 = new Rsid(){ Val = "00C47703" };
            Rsid rsid4 = new Rsid(){ Val = "00FB048F" };

            rsids1.Append(rsidRoot1);
            rsids1.Append(rsid1);
            rsids1.Append(rsid2);
            rsids1.Append(rsid3);
            rsids1.Append(rsid4);

            M.MathProperties mathProperties1 = new M.MathProperties();
            M.MathFont mathFont1 = new M.MathFont(){ Val = "Cambria Math" };
            M.BreakBinary breakBinary1 = new M.BreakBinary(){ Val = M.BreakBinaryOperatorValues.Before };
            M.BreakBinarySubtraction breakBinarySubtraction1 = new M.BreakBinarySubtraction(){ Val = M.BreakBinarySubtractionValues.MinusMinus };
            M.SmallFraction smallFraction1 = new M.SmallFraction(){ Val = M.BooleanValues.Zero };
            M.DisplayDefaults displayDefaults1 = new M.DisplayDefaults();
            M.LeftMargin leftMargin1 = new M.LeftMargin(){ Val = (UInt32Value)0U };
            M.RightMargin rightMargin1 = new M.RightMargin(){ Val = (UInt32Value)0U };
            M.DefaultJustification defaultJustification1 = new M.DefaultJustification(){ Val = M.JustificationValues.CenterGroup };
            M.WrapIndent wrapIndent1 = new M.WrapIndent(){ Val = (UInt32Value)1440U };
            M.IntegralLimitLocation integralLimitLocation1 = new M.IntegralLimitLocation(){ Val = M.LimitLocationValues.SubscriptSuperscript };
            M.NaryLimitLocation naryLimitLocation1 = new M.NaryLimitLocation(){ Val = M.LimitLocationValues.UnderOver };

            mathProperties1.Append(mathFont1);
            mathProperties1.Append(breakBinary1);
            mathProperties1.Append(breakBinarySubtraction1);
            mathProperties1.Append(smallFraction1);
            mathProperties1.Append(displayDefaults1);
            mathProperties1.Append(leftMargin1);
            mathProperties1.Append(rightMargin1);
            mathProperties1.Append(defaultJustification1);
            mathProperties1.Append(wrapIndent1);
            mathProperties1.Append(integralLimitLocation1);
            mathProperties1.Append(naryLimitLocation1);
            ThemeFontLanguages themeFontLanguages1 = new ThemeFontLanguages(){ Val = "en-US", EastAsia = "ja-JP" };
            ColorSchemeMapping colorSchemeMapping1 = new ColorSchemeMapping(){ Background1 = ColorSchemeIndexValues.Light1, Text1 = ColorSchemeIndexValues.Dark1, Background2 = ColorSchemeIndexValues.Light2, Text2 = ColorSchemeIndexValues.Dark2, Accent1 = ColorSchemeIndexValues.Accent1, Accent2 = ColorSchemeIndexValues.Accent2, Accent3 = ColorSchemeIndexValues.Accent3, Accent4 = ColorSchemeIndexValues.Accent4, Accent5 = ColorSchemeIndexValues.Accent5, Accent6 = ColorSchemeIndexValues.Accent6, Hyperlink = ColorSchemeIndexValues.Hyperlink, FollowedHyperlink = ColorSchemeIndexValues.FollowedHyperlink };

            ShapeDefaults shapeDefaults1 = new ShapeDefaults();

            Ovml.ShapeDefaults shapeDefaults2 = new Ovml.ShapeDefaults(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 1026 };
            V.TextBox textBox1 = new V.TextBox(){ Inset = "5.85pt,.7pt,5.85pt,.7pt" };

            shapeDefaults2.Append(textBox1);

            Ovml.ShapeLayout shapeLayout1 = new Ovml.ShapeLayout(){ Extension = V.ExtensionHandlingBehaviorValues.Edit };
            Ovml.ShapeIdMap shapeIdMap1 = new Ovml.ShapeIdMap(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, Data = "1" };

            shapeLayout1.Append(shapeIdMap1);

            shapeDefaults1.Append(shapeDefaults2);
            shapeDefaults1.Append(shapeLayout1);
            DecimalSymbol decimalSymbol1 = new DecimalSymbol(){ Val = "." };
            ListSeparator listSeparator1 = new ListSeparator(){ Val = "," };
            W14.DocumentId documentId1 = new W14.DocumentId(){ Val = "5072543E" };
            W15.ChartTrackingRefBased chartTrackingRefBased1 = new W15.ChartTrackingRefBased();
            W15.PersistentDocumentId persistentDocumentId1 = new W15.PersistentDocumentId(){ Val = "{E3C4D585-C41B-4C9C-91E7-DBB08CFFEEED}" };

            settings1.Append(view1);
            settings1.Append(zoom1);
            settings1.Append(doNotDisplayPageBoundaries1);
            settings1.Append(bordersDoNotSurroundHeader1);
            settings1.Append(bordersDoNotSurroundFooter1);
            settings1.Append(defaultTabStop1);
            settings1.Append(characterSpacingControl1);
            settings1.Append(compatibility1);
            settings1.Append(rsids1);
            settings1.Append(mathProperties1);
            settings1.Append(themeFontLanguages1);
            settings1.Append(colorSchemeMapping1);
            settings1.Append(shapeDefaults1);
            settings1.Append(decimalSymbol1);
            settings1.Append(listSeparator1);
            settings1.Append(documentId1);
            settings1.Append(chartTrackingRefBased1);
            settings1.Append(persistentDocumentId1);

            documentSettingsPart1.Settings = settings1;
        }
Exemplo n.º 8
0
        // Generates content of documentSettingsPart1.
        private void GenerateDocumentSettingsPart1Content(DocumentSettingsPart documentSettingsPart1)
        {
            Settings settings1 = new Settings(){ MCAttributes = new MarkupCompatibilityAttributes(){ Ignorable = "w14 w15" }  };
            settings1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            settings1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            settings1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            settings1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            settings1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            settings1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            settings1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            settings1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            settings1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2010/11/wordml");
            settings1.AddNamespaceDeclaration("sl", "http://schemas.openxmlformats.org/schemaLibrary/2006/main");
            Zoom zoom1 = new Zoom(){ Percent = "120" };
            BordersDoNotSurroundHeader bordersDoNotSurroundHeader1 = new BordersDoNotSurroundHeader();
            BordersDoNotSurroundFooter bordersDoNotSurroundFooter1 = new BordersDoNotSurroundFooter();
            DefaultTabStop defaultTabStop1 = new DefaultTabStop(){ Val = 840 };
            DisplayHorizontalDrawingGrid displayHorizontalDrawingGrid1 = new DisplayHorizontalDrawingGrid(){ Val = 0 };
            DisplayVerticalDrawingGrid displayVerticalDrawingGrid1 = new DisplayVerticalDrawingGrid(){ Val = 2 };
            CharacterSpacingControl characterSpacingControl1 = new CharacterSpacingControl(){ Val = CharacterSpacingValues.CompressPunctuation };

            HeaderShapeDefaults headerShapeDefaults1 = new HeaderShapeDefaults();

            Ovml.ShapeDefaults shapeDefaults1 = new Ovml.ShapeDefaults(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 2049 };
            V.TextBox textBox1 = new V.TextBox(){ Inset = "5.85pt,.7pt,5.85pt,.7pt" };

            shapeDefaults1.Append(textBox1);

            headerShapeDefaults1.Append(shapeDefaults1);

            FootnoteDocumentWideProperties footnoteDocumentWideProperties1 = new FootnoteDocumentWideProperties();
            FootnotePosition footnotePosition2 = new FootnotePosition(){ Val = FootnotePositionValues.BeneathText };
            FootnoteSpecialReference footnoteSpecialReference1 = new FootnoteSpecialReference(){ Id = -1 };
            FootnoteSpecialReference footnoteSpecialReference2 = new FootnoteSpecialReference(){ Id = 0 };

            footnoteDocumentWideProperties1.Append(footnotePosition2);
            footnoteDocumentWideProperties1.Append(footnoteSpecialReference1);
            footnoteDocumentWideProperties1.Append(footnoteSpecialReference2);

            EndnoteDocumentWideProperties endnoteDocumentWideProperties1 = new EndnoteDocumentWideProperties();
            EndnoteSpecialReference endnoteSpecialReference1 = new EndnoteSpecialReference(){ Id = -1 };
            EndnoteSpecialReference endnoteSpecialReference2 = new EndnoteSpecialReference(){ Id = 0 };

            endnoteDocumentWideProperties1.Append(endnoteSpecialReference1);
            endnoteDocumentWideProperties1.Append(endnoteSpecialReference2);

            Compatibility compatibility1 = new Compatibility();
            SpaceForUnderline spaceForUnderline1 = new SpaceForUnderline();
            BalanceSingleByteDoubleByteWidth balanceSingleByteDoubleByteWidth1 = new BalanceSingleByteDoubleByteWidth();
            DoNotLeaveBackslashAlone doNotLeaveBackslashAlone1 = new DoNotLeaveBackslashAlone();
            UnderlineTrailingSpaces underlineTrailingSpaces1 = new UnderlineTrailingSpaces();
            DoNotExpandShiftReturn doNotExpandShiftReturn1 = new DoNotExpandShiftReturn();
            AdjustLineHeightInTable adjustLineHeightInTable1 = new AdjustLineHeightInTable();
            UseFarEastLayout useFarEastLayout1 = new UseFarEastLayout();
            CompatibilitySetting compatibilitySetting1 = new CompatibilitySetting(){ Name = CompatSettingNameValues.CompatibilityMode, Uri = "http://schemas.microsoft.com/office/word", Val = "15" };
            CompatibilitySetting compatibilitySetting2 = new CompatibilitySetting(){ Name = CompatSettingNameValues.OverrideTableStyleFontSizeAndJustification, Uri = "http://schemas.microsoft.com/office/word", Val = "1" };
            CompatibilitySetting compatibilitySetting3 = new CompatibilitySetting(){ Name = CompatSettingNameValues.EnableOpenTypeFeatures, Uri = "http://schemas.microsoft.com/office/word", Val = "1" };
            CompatibilitySetting compatibilitySetting4 = new CompatibilitySetting(){ Name = CompatSettingNameValues.DoNotFlipMirrorIndents, Uri = "http://schemas.microsoft.com/office/word", Val = "1" };
            CompatibilitySetting compatibilitySetting5 = new CompatibilitySetting(){ Name = CompatSettingNameValues.DifferentiateMultirowTableHeaders, Uri = "http://schemas.microsoft.com/office/word", Val = "1" };

            compatibility1.Append(spaceForUnderline1);
            compatibility1.Append(balanceSingleByteDoubleByteWidth1);
            compatibility1.Append(doNotLeaveBackslashAlone1);
            compatibility1.Append(underlineTrailingSpaces1);
            compatibility1.Append(doNotExpandShiftReturn1);
            compatibility1.Append(adjustLineHeightInTable1);
            compatibility1.Append(useFarEastLayout1);
            compatibility1.Append(compatibilitySetting1);
            compatibility1.Append(compatibilitySetting2);
            compatibility1.Append(compatibilitySetting3);
            compatibility1.Append(compatibilitySetting4);
            compatibility1.Append(compatibilitySetting5);

            Rsids rsids1 = new Rsids();
            RsidRoot rsidRoot1 = new RsidRoot(){ Val = "0065051C" };
            Rsid rsid1 = new Rsid(){ Val = "00023006" };
            Rsid rsid2 = new Rsid(){ Val = "000375B4" };
            Rsid rsid3 = new Rsid(){ Val = "000B3CD4" };
            Rsid rsid4 = new Rsid(){ Val = "000D444D" };
            Rsid rsid5 = new Rsid(){ Val = "00155FE4" };
            Rsid rsid6 = new Rsid(){ Val = "00157205" };
            Rsid rsid7 = new Rsid(){ Val = "00184FE2" };
            Rsid rsid8 = new Rsid(){ Val = "0021780B" };
            Rsid rsid9 = new Rsid(){ Val = "00246099" };
            Rsid rsid10 = new Rsid(){ Val = "002630CE" };
            Rsid rsid11 = new Rsid(){ Val = "002822D5" };
            Rsid rsid12 = new Rsid(){ Val = "002B1150" };
            Rsid rsid13 = new Rsid(){ Val = "00312F55" };
            Rsid rsid14 = new Rsid(){ Val = "003164B1" };
            Rsid rsid15 = new Rsid(){ Val = "003E3E28" };
            Rsid rsid16 = new Rsid(){ Val = "003E4104" };
            Rsid rsid17 = new Rsid(){ Val = "003F4155" };
            Rsid rsid18 = new Rsid(){ Val = "00432250" };
            Rsid rsid19 = new Rsid(){ Val = "00442213" };
            Rsid rsid20 = new Rsid(){ Val = "0046772B" };
            Rsid rsid21 = new Rsid(){ Val = "004E1BAE" };
            Rsid rsid22 = new Rsid(){ Val = "005168C8" };
            Rsid rsid23 = new Rsid(){ Val = "00554C36" };
            Rsid rsid24 = new Rsid(){ Val = "0056510B" };
            Rsid rsid25 = new Rsid(){ Val = "005812F7" };
            Rsid rsid26 = new Rsid(){ Val = "00591DB3" };
            Rsid rsid27 = new Rsid(){ Val = "005C5F46" };
            Rsid rsid28 = new Rsid(){ Val = "006150B3" };
            Rsid rsid29 = new Rsid(){ Val = "0065051C" };
            Rsid rsid30 = new Rsid(){ Val = "006529C4" };
            Rsid rsid31 = new Rsid(){ Val = "00654EDD" };
            Rsid rsid32 = new Rsid(){ Val = "006617B0" };
            Rsid rsid33 = new Rsid(){ Val = "00673762" };
            Rsid rsid34 = new Rsid(){ Val = "006811F2" };
            Rsid rsid35 = new Rsid(){ Val = "006905DC" };
            Rsid rsid36 = new Rsid(){ Val = "00717274" };
            Rsid rsid37 = new Rsid(){ Val = "00726D63" };
            Rsid rsid38 = new Rsid(){ Val = "00735B16" };
            Rsid rsid39 = new Rsid(){ Val = "0078395F" };
            Rsid rsid40 = new Rsid(){ Val = "007C5C36" };
            Rsid rsid41 = new Rsid(){ Val = "007E083A" };
            Rsid rsid42 = new Rsid(){ Val = "00802542" };
            Rsid rsid43 = new Rsid(){ Val = "00815205" };
            Rsid rsid44 = new Rsid(){ Val = "008601D0" };
            Rsid rsid45 = new Rsid(){ Val = "008A3AEB" };
            Rsid rsid46 = new Rsid(){ Val = "00A0620B" };
            Rsid rsid47 = new Rsid(){ Val = "00A85C79" };
            Rsid rsid48 = new Rsid(){ Val = "00A97EF2" };
            Rsid rsid49 = new Rsid(){ Val = "00B02BB2" };
            Rsid rsid50 = new Rsid(){ Val = "00B226C3" };
            Rsid rsid51 = new Rsid(){ Val = "00B242C6" };
            Rsid rsid52 = new Rsid(){ Val = "00B65CCF" };
            Rsid rsid53 = new Rsid(){ Val = "00BE0751" };
            Rsid rsid54 = new Rsid(){ Val = "00C746AE" };
            Rsid rsid55 = new Rsid(){ Val = "00CA03FE" };
            Rsid rsid56 = new Rsid(){ Val = "00CA6E11" };
            Rsid rsid57 = new Rsid(){ Val = "00D15121" };
            Rsid rsid58 = new Rsid(){ Val = "00D70034" };
            Rsid rsid59 = new Rsid(){ Val = "00D71FEB" };
            Rsid rsid60 = new Rsid(){ Val = "00DC4725" };
            Rsid rsid61 = new Rsid(){ Val = "00DD0BFF" };
            Rsid rsid62 = new Rsid(){ Val = "00E1398B" };
            Rsid rsid63 = new Rsid(){ Val = "00EC4B3C" };
            Rsid rsid64 = new Rsid(){ Val = "00F35C24" };
            Rsid rsid65 = new Rsid(){ Val = "00F9059B" };
            Rsid rsid66 = new Rsid(){ Val = "00F90D0E" };
            Rsid rsid67 = new Rsid(){ Val = "00FC0551" };
            Rsid rsid68 = new Rsid(){ Val = "00FD7597" };
            Rsid rsid69 = new Rsid(){ Val = "00FE4421" };
            Rsid rsid70 = new Rsid(){ Val = "00FF4163" };

            rsids1.Append(rsidRoot1);
            rsids1.Append(rsid1);
            rsids1.Append(rsid2);
            rsids1.Append(rsid3);
            rsids1.Append(rsid4);
            rsids1.Append(rsid5);
            rsids1.Append(rsid6);
            rsids1.Append(rsid7);
            rsids1.Append(rsid8);
            rsids1.Append(rsid9);
            rsids1.Append(rsid10);
            rsids1.Append(rsid11);
            rsids1.Append(rsid12);
            rsids1.Append(rsid13);
            rsids1.Append(rsid14);
            rsids1.Append(rsid15);
            rsids1.Append(rsid16);
            rsids1.Append(rsid17);
            rsids1.Append(rsid18);
            rsids1.Append(rsid19);
            rsids1.Append(rsid20);
            rsids1.Append(rsid21);
            rsids1.Append(rsid22);
            rsids1.Append(rsid23);
            rsids1.Append(rsid24);
            rsids1.Append(rsid25);
            rsids1.Append(rsid26);
            rsids1.Append(rsid27);
            rsids1.Append(rsid28);
            rsids1.Append(rsid29);
            rsids1.Append(rsid30);
            rsids1.Append(rsid31);
            rsids1.Append(rsid32);
            rsids1.Append(rsid33);
            rsids1.Append(rsid34);
            rsids1.Append(rsid35);
            rsids1.Append(rsid36);
            rsids1.Append(rsid37);
            rsids1.Append(rsid38);
            rsids1.Append(rsid39);
            rsids1.Append(rsid40);
            rsids1.Append(rsid41);
            rsids1.Append(rsid42);
            rsids1.Append(rsid43);
            rsids1.Append(rsid44);
            rsids1.Append(rsid45);
            rsids1.Append(rsid46);
            rsids1.Append(rsid47);
            rsids1.Append(rsid48);
            rsids1.Append(rsid49);
            rsids1.Append(rsid50);
            rsids1.Append(rsid51);
            rsids1.Append(rsid52);
            rsids1.Append(rsid53);
            rsids1.Append(rsid54);
            rsids1.Append(rsid55);
            rsids1.Append(rsid56);
            rsids1.Append(rsid57);
            rsids1.Append(rsid58);
            rsids1.Append(rsid59);
            rsids1.Append(rsid60);
            rsids1.Append(rsid61);
            rsids1.Append(rsid62);
            rsids1.Append(rsid63);
            rsids1.Append(rsid64);
            rsids1.Append(rsid65);
            rsids1.Append(rsid66);
            rsids1.Append(rsid67);
            rsids1.Append(rsid68);
            rsids1.Append(rsid69);
            rsids1.Append(rsid70);

            M.MathProperties mathProperties1 = new M.MathProperties();
            M.MathFont mathFont1 = new M.MathFont(){ Val = "Cambria Math" };
            M.BreakBinary breakBinary1 = new M.BreakBinary(){ Val = M.BreakBinaryOperatorValues.Before };
            M.BreakBinarySubtraction breakBinarySubtraction1 = new M.BreakBinarySubtraction(){ Val = M.BreakBinarySubtractionValues.MinusMinus };
            M.SmallFraction smallFraction1 = new M.SmallFraction(){ Val = M.BooleanValues.Zero };
            M.DisplayDefaults displayDefaults1 = new M.DisplayDefaults();
            M.LeftMargin leftMargin1 = new M.LeftMargin(){ Val = (UInt32Value)0U };
            M.RightMargin rightMargin1 = new M.RightMargin(){ Val = (UInt32Value)0U };
            M.DefaultJustification defaultJustification1 = new M.DefaultJustification(){ Val = M.JustificationValues.CenterGroup };
            M.WrapIndent wrapIndent1 = new M.WrapIndent(){ Val = (UInt32Value)1440U };
            M.IntegralLimitLocation integralLimitLocation1 = new M.IntegralLimitLocation(){ Val = M.LimitLocationValues.SubscriptSuperscript };
            M.NaryLimitLocation naryLimitLocation1 = new M.NaryLimitLocation(){ Val = M.LimitLocationValues.UnderOver };

            mathProperties1.Append(mathFont1);
            mathProperties1.Append(breakBinary1);
            mathProperties1.Append(breakBinarySubtraction1);
            mathProperties1.Append(smallFraction1);
            mathProperties1.Append(displayDefaults1);
            mathProperties1.Append(leftMargin1);
            mathProperties1.Append(rightMargin1);
            mathProperties1.Append(defaultJustification1);
            mathProperties1.Append(wrapIndent1);
            mathProperties1.Append(integralLimitLocation1);
            mathProperties1.Append(naryLimitLocation1);
            ThemeFontLanguages themeFontLanguages1 = new ThemeFontLanguages(){ Val = "en-US", EastAsia = "ja-JP" };
            ColorSchemeMapping colorSchemeMapping1 = new ColorSchemeMapping(){ Background1 = ColorSchemeIndexValues.Light1, Text1 = ColorSchemeIndexValues.Dark1, Background2 = ColorSchemeIndexValues.Light2, Text2 = ColorSchemeIndexValues.Dark2, Accent1 = ColorSchemeIndexValues.Accent1, Accent2 = ColorSchemeIndexValues.Accent2, Accent3 = ColorSchemeIndexValues.Accent3, Accent4 = ColorSchemeIndexValues.Accent4, Accent5 = ColorSchemeIndexValues.Accent5, Accent6 = ColorSchemeIndexValues.Accent6, Hyperlink = ColorSchemeIndexValues.Hyperlink, FollowedHyperlink = ColorSchemeIndexValues.FollowedHyperlink };

            ShapeDefaults shapeDefaults2 = new ShapeDefaults();

            Ovml.ShapeDefaults shapeDefaults3 = new Ovml.ShapeDefaults(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, MaxShapeId = 2049 };
            V.TextBox textBox2 = new V.TextBox(){ Inset = "5.85pt,.7pt,5.85pt,.7pt" };

            shapeDefaults3.Append(textBox2);

            Ovml.ShapeLayout shapeLayout1 = new Ovml.ShapeLayout(){ Extension = V.ExtensionHandlingBehaviorValues.Edit };
            Ovml.ShapeIdMap shapeIdMap1 = new Ovml.ShapeIdMap(){ Extension = V.ExtensionHandlingBehaviorValues.Edit, Data = "1" };

            shapeLayout1.Append(shapeIdMap1);

            shapeDefaults2.Append(shapeDefaults3);
            shapeDefaults2.Append(shapeLayout1);
            DecimalSymbol decimalSymbol1 = new DecimalSymbol(){ Val = "." };
            ListSeparator listSeparator1 = new ListSeparator(){ Val = "," };
            W15.ChartTrackingRefBased chartTrackingRefBased1 = new W15.ChartTrackingRefBased();
            W15.PersistentDocumentId persistentDocumentId1 = new W15.PersistentDocumentId(){ Val = "{57C27CDA-3B4C-42CA-80EF-A200C26DFF13}" };

            settings1.Append(zoom1);
            settings1.Append(bordersDoNotSurroundHeader1);
            settings1.Append(bordersDoNotSurroundFooter1);
            settings1.Append(defaultTabStop1);
            settings1.Append(displayHorizontalDrawingGrid1);
            settings1.Append(displayVerticalDrawingGrid1);
            settings1.Append(characterSpacingControl1);
            settings1.Append(headerShapeDefaults1);
            settings1.Append(footnoteDocumentWideProperties1);
            settings1.Append(endnoteDocumentWideProperties1);
            settings1.Append(compatibility1);
            settings1.Append(rsids1);
            settings1.Append(mathProperties1);
            settings1.Append(themeFontLanguages1);
            settings1.Append(colorSchemeMapping1);
            settings1.Append(shapeDefaults2);
            settings1.Append(decimalSymbol1);
            settings1.Append(listSeparator1);
            settings1.Append(chartTrackingRefBased1);
            settings1.Append(persistentDocumentId1);

            documentSettingsPart1.Settings = settings1;
        }