Ejemplo n.º 1
0
        private void ApplyHeader(HeaderPart headerPart)
        {
            var header1 = new Header();
            header1.AddNamespaceDeclaration("ve", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            header1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            header1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            header1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            header1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            header1.AddNamespaceDeclaration("wp",
                                            "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            header1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            header1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            header1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");

            var paragraph1 = new Paragraph {RsidParagraphAddition = "005641D2", RsidRunAdditionDefault = "005641D2"};

            var paragraphProperties1 = new ParagraphProperties();
            var paragraphStyleId1 = new ParagraphStyleId {Val = "Header"};

            paragraphProperties1.Append(paragraphStyleId1);

            var run1 = new Run();
            var text1 = new Text();

            if (!string.IsNullOrEmpty(this.configuration.SystemUnderTestName) &&
                !string.IsNullOrEmpty(this.configuration.SystemUnderTestVersion))
            {
                text1.Text = string.Format("{0}, version {1}", this.configuration.SystemUnderTestName,
                                           this.configuration.SystemUnderTestVersion);
            }
            else if (!string.IsNullOrEmpty(this.configuration.SystemUnderTestName))
            {
                text1.Text = this.configuration.SystemUnderTestName;
            }
            else if (!string.IsNullOrEmpty(this.configuration.SystemUnderTestVersion))
            {
                text1.Text = string.Format("Features for version {0}", this.configuration.SystemUnderTestVersion);
            }

            run1.Append(text1);

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(run1);

            var paragraph2 = new Paragraph {RsidParagraphAddition = "005641D2", RsidRunAdditionDefault = "005641D2"};

            var paragraphProperties2 = new ParagraphProperties();
            var paragraphStyleId2 = new ParagraphStyleId {Val = "Header"};

            paragraphProperties2.Append(paragraphStyleId2);

            paragraph2.Append(paragraphProperties2);

            header1.Append(paragraph1);
            header1.Append(paragraph2);

            headerPart.Header = header1;
        }
Ejemplo n.º 2
0
        public void AddHeaderFromTo(string filepathFrom, string filepathTo)
        {
            // Replace header in target document with header of source document.
            using (WordprocessingDocument
                   wdDoc = WordprocessingDocument.Open(filepathTo, true))
            {
                MainDocumentPart mainPart = wdDoc.MainDocumentPart;

                // Delete the existing header part.
                mainPart.DeleteParts(mainPart.HeaderParts);

                // Create a new header part.
                DocumentFormat.OpenXml.Packaging.HeaderPart headerPart =
                    mainPart.AddNewPart <HeaderPart>();

                // Get Id of the headerPart.
                string rId = mainPart.GetIdOfPart(headerPart);

                // Feed target headerPart with source headerPart.
                using (WordprocessingDocument wdDocSource =
                           WordprocessingDocument.Open(filepathFrom, true))
                {
                    DocumentFormat.OpenXml.Packaging.HeaderPart firstHeader =
                        wdDocSource.MainDocumentPart.HeaderParts.FirstOrDefault();

                    wdDocSource.MainDocumentPart.HeaderParts.FirstOrDefault();

                    if (firstHeader != null)
                    {
                        headerPart.FeedData(firstHeader.GetStream());
                    }
                }



                // Get SectionProperties and Replace HeaderReference with new Id.
                IEnumerable <SectionProperties> sectPrs = mainPart.Document.Body.Elements <SectionProperties>();
                foreach (var sectPr in sectPrs)
                {
                    // Delete existing references to headers.
                    sectPr.RemoveAllChildren <HeaderReference>();

                    // Create the new header reference node.
                    sectPr.PrependChild <HeaderReference>(new HeaderReference()
                    {
                        Id = rId
                    });
                }
            }
        }
Ejemplo n.º 3
0
        public static void GenerateHeaderPartContent(HeaderPart part)
        {
            Header header1 = new Header() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } };
            header1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            header1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            header1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            header1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            header1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            header1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            header1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            header1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            header1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            header1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            header1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            header1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            header1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            header1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            header1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "00164C17", RsidRunAdditionDefault = "00164C17" };

            ParagraphProperties paragraphProperties1 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId() { Val = "Header" };

            paragraphProperties1.Append(paragraphStyleId1);

            Run run1 = new Run();
            Text text1 = new Text();
            text1.Text = "Header";

            run1.Append(text1);

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(run1);

            header1.Append(paragraph1);

            part.Header = header1;
        }
Ejemplo n.º 4
0
 private static void CopyHeaderImages(HeaderPart oldHeader, HeaderPart newHeader, List<ImageData> images)
 {
     foreach (XElement imageReference in newHeader.GetXDocument().Descendants(ns_a + "blip"))
     {
         string relId = imageReference.Attribute(ns_r + "embed").Value;
         ImagePart oldPart = (ImagePart)oldHeader.GetPartById(relId);
         ImageData temp = ManageImageCopy(oldPart, images);
         if (temp.ResourceID == null)
         {
             ImagePart newPart = newHeader.AddImagePart(oldPart.ContentType);
             temp.ResourceID = newHeader.GetIdOfPart(newPart);
             temp.WriteImage(newPart);
         }
         imageReference.Attribute(ns_r + "embed").Value = temp.ResourceID;
     }
 }
Ejemplo n.º 5
0
 private static void CopyHeaderEmbeddedObjects(HeaderPart oldHeader, HeaderPart newHeader)
 {
     foreach (XElement oleReference in newHeader.GetXDocument().Descendants(ns_o + "OLEObject"))
     {
         string relId = oleReference.Attribute(ns_r + "id").Value;
         EmbeddedObjectPart oldPart = (EmbeddedObjectPart)oldHeader.GetPartById(relId);
         EmbeddedObjectPart newPart = newHeader.AddEmbeddedObjectPart(oldPart.ContentType);
         using (Stream oldObject = oldPart.GetStream(FileMode.Open, FileAccess.Read))
         using (Stream newObject = newPart.GetStream(FileMode.Create, FileAccess.ReadWrite))
         {
             int byteCount;
             byte[] buffer = new byte[65536];
             while ((byteCount = oldObject.Read(buffer, 0, 65536)) != 0)
                 newObject.Write(buffer, 0, byteCount);
         }
         oleReference.Attribute(ns_r + "id").Value = newHeader.GetIdOfPart(newPart);
     }
 }
Ejemplo n.º 6
0
        /// <summary>
        /// Create an instance of OpenXmlPart according to the given relationship type.
        /// </summary>
        /// <param name="openXmlPackage">The container OpenXmlPackage.</param>
        /// <param name="relationshipType">The relationship type of the target part.</param>
        /// <param name="openXmlPart">The created instance of OpenXmlPart.</param>
        /// <remarks>This partial method will be generated by code generaotr.</remarks>
        static partial void CreatePartCore(OpenXmlPackage openXmlPackage, string relationshipType, ref OpenXmlPart openXmlPart)
        {
            if (openXmlPackage == null)
            {
				throw new ArgumentNullException("openXmlPackage");
            }
            if (relationshipType == null)
            {
                throw new ArgumentNullException("relationshipType");
            }
            
            if (openXmlPackage is WordprocessingDocument)
            {
                switch (relationshipType)
                {
					case MainDocumentPart.RelationshipTypeConstant:
	openXmlPart = new MainDocumentPart();
	return;
case CustomXmlPart.RelationshipTypeConstant:
	openXmlPart = new CustomXmlPart();
	return;
case CustomXmlPropertiesPart.RelationshipTypeConstant:
	openXmlPart = new CustomXmlPropertiesPart();
	return;
case GlossaryDocumentPart.RelationshipTypeConstant:
	openXmlPart = new GlossaryDocumentPart();
	return;
case WordprocessingCommentsPart.RelationshipTypeConstant:
	openXmlPart = new WordprocessingCommentsPart();
	return;
case AlternativeFormatImportPart.RelationshipTypeConstant:
	openXmlPart = new AlternativeFormatImportPart();
	return;
case ChartPart.RelationshipTypeConstant:
	openXmlPart = new ChartPart();
	return;
case ChartDrawingPart.RelationshipTypeConstant:
	openXmlPart = new ChartDrawingPart();
	return;
case ImagePart.RelationshipTypeConstant:
	openXmlPart = new ImagePart();
	return;
case EmbeddedPackagePart.RelationshipTypeConstant:
	openXmlPart = new EmbeddedPackagePart();
	return;
case ThemeOverridePart.RelationshipTypeConstant:
	openXmlPart = new ThemeOverridePart();
	return;
case ChartStylePart.RelationshipTypeConstant:
	openXmlPart = new ChartStylePart();
	return;
case ChartColorStylePart.RelationshipTypeConstant:
	openXmlPart = new ChartColorStylePart();
	return;
case DiagramColorsPart.RelationshipTypeConstant:
	openXmlPart = new DiagramColorsPart();
	return;
case DiagramDataPart.RelationshipTypeConstant:
	openXmlPart = new DiagramDataPart();
	return;
case SlidePart.RelationshipTypeConstant:
	openXmlPart = new SlidePart();
	return;
case DiagramPersistLayoutPart.RelationshipTypeConstant:
	openXmlPart = new DiagramPersistLayoutPart();
	return;
case DiagramLayoutDefinitionPart.RelationshipTypeConstant:
	openXmlPart = new DiagramLayoutDefinitionPart();
	return;
case DiagramStylePart.RelationshipTypeConstant:
	openXmlPart = new DiagramStylePart();
	return;
case EmbeddedObjectPart.RelationshipTypeConstant:
	openXmlPart = new EmbeddedObjectPart();
	return;
case VmlDrawingPart.RelationshipTypeConstant:
	openXmlPart = new VmlDrawingPart();
	return;
case LegacyDiagramTextPart.RelationshipTypeConstant:
	openXmlPart = new LegacyDiagramTextPart();
	return;
case EmbeddedControlPersistenceBinaryDataPart.RelationshipTypeConstant:
	openXmlPart = new EmbeddedControlPersistenceBinaryDataPart();
	return;
case NotesSlidePart.RelationshipTypeConstant:
	openXmlPart = new NotesSlidePart();
	return;
case NotesMasterPart.RelationshipTypeConstant:
	openXmlPart = new NotesMasterPart();
	return;
case ThemePart.RelationshipTypeConstant:
	openXmlPart = new ThemePart();
	return;
case UserDefinedTagsPart.RelationshipTypeConstant:
	openXmlPart = new UserDefinedTagsPart();
	return;
case SlideLayoutPart.RelationshipTypeConstant:
	openXmlPart = new SlideLayoutPart();
	return;
case SlideMasterPart.RelationshipTypeConstant:
	openXmlPart = new SlideMasterPart();
	return;
case EmbeddedControlPersistencePart.RelationshipTypeConstant:
	openXmlPart = new EmbeddedControlPersistencePart();
	return;
case SlideSyncDataPart.RelationshipTypeConstant:
	openXmlPart = new SlideSyncDataPart();
	return;
case WorksheetPart.RelationshipTypeConstant:
	openXmlPart = new WorksheetPart();
	return;
case DrawingsPart.RelationshipTypeConstant:
	openXmlPart = new DrawingsPart();
	return;
case WebExtensionPart.RelationshipTypeConstant:
	openXmlPart = new WebExtensionPart();
	return;
case PivotTablePart.RelationshipTypeConstant:
	openXmlPart = new PivotTablePart();
	return;
case PivotTableCacheDefinitionPart.RelationshipTypeConstant:
	openXmlPart = new PivotTableCacheDefinitionPart();
	return;
case PivotTableCacheRecordsPart.RelationshipTypeConstant:
	openXmlPart = new PivotTableCacheRecordsPart();
	return;
case SingleCellTablePart.RelationshipTypeConstant:
	openXmlPart = new SingleCellTablePart();
	return;
case TableDefinitionPart.RelationshipTypeConstant:
	openXmlPart = new TableDefinitionPart();
	return;
case QueryTablePart.RelationshipTypeConstant:
	openXmlPart = new QueryTablePart();
	return;
case ControlPropertiesPart.RelationshipTypeConstant:
	openXmlPart = new ControlPropertiesPart();
	return;
case CustomPropertyPart.RelationshipTypeConstant:
	openXmlPart = new CustomPropertyPart();
	return;
case WorksheetSortMapPart.RelationshipTypeConstant:
	openXmlPart = new WorksheetSortMapPart();
	return;
case SlicersPart.RelationshipTypeConstant:
	openXmlPart = new SlicersPart();
	return;
case TimeLinePart.RelationshipTypeConstant:
	openXmlPart = new TimeLinePart();
	return;
case DocumentSettingsPart.RelationshipTypeConstant:
	openXmlPart = new DocumentSettingsPart();
	return;
case MailMergeRecipientDataPart.RelationshipTypeConstant:
	openXmlPart = new MailMergeRecipientDataPart();
	return;
case EndnotesPart.RelationshipTypeConstant:
	openXmlPart = new EndnotesPart();
	return;
case FontTablePart.RelationshipTypeConstant:
	openXmlPart = new FontTablePart();
	return;
case FontPart.RelationshipTypeConstant:
	openXmlPart = new FontPart();
	return;
case FootnotesPart.RelationshipTypeConstant:
	openXmlPart = new FootnotesPart();
	return;
case NumberingDefinitionsPart.RelationshipTypeConstant:
	openXmlPart = new NumberingDefinitionsPart();
	return;
case StyleDefinitionsPart.RelationshipTypeConstant:
	openXmlPart = new StyleDefinitionsPart();
	return;
case StylesWithEffectsPart.RelationshipTypeConstant:
	openXmlPart = new StylesWithEffectsPart();
	return;
case WebSettingsPart.RelationshipTypeConstant:
	openXmlPart = new WebSettingsPart();
	return;
case FooterPart.RelationshipTypeConstant:
	openXmlPart = new FooterPart();
	return;
case HeaderPart.RelationshipTypeConstant:
	openXmlPart = new HeaderPart();
	return;
case WordprocessingPrinterSettingsPart.RelationshipTypeConstant:
	openXmlPart = new WordprocessingPrinterSettingsPart();
	return;
case CustomizationPart.RelationshipTypeConstant:
	openXmlPart = new CustomizationPart();
	return;
case WordAttachedToolbarsPart.RelationshipTypeConstant:
	openXmlPart = new WordAttachedToolbarsPart();
	return;
case VbaProjectPart.RelationshipTypeConstant:
	openXmlPart = new VbaProjectPart();
	return;
case VbaDataPart.RelationshipTypeConstant:
	openXmlPart = new VbaDataPart();
	return;
case WordprocessingCommentsExPart.RelationshipTypeConstant:
	openXmlPart = new WordprocessingCommentsExPart();
	return;
case WordprocessingPeoplePart.RelationshipTypeConstant:
	openXmlPart = new WordprocessingPeoplePart();
	return;
case ThumbnailPart.RelationshipTypeConstant:
	openXmlPart = new ThumbnailPart();
	return;
case CoreFilePropertiesPart.RelationshipTypeConstant:
	openXmlPart = new CoreFilePropertiesPart();
	return;
case ExtendedFilePropertiesPart.RelationshipTypeConstant:
	openXmlPart = new ExtendedFilePropertiesPart();
	return;
case CustomFilePropertiesPart.RelationshipTypeConstant:
	openXmlPart = new CustomFilePropertiesPart();
	return;
case DigitalSignatureOriginPart.RelationshipTypeConstant:
	openXmlPart = new DigitalSignatureOriginPart();
	return;
case XmlSignaturePart.RelationshipTypeConstant:
	openXmlPart = new XmlSignaturePart();
	return;
case QuickAccessToolbarCustomizationsPart.RelationshipTypeConstant:
	openXmlPart = new QuickAccessToolbarCustomizationsPart();
	return;
case RibbonExtensibilityPart.RelationshipTypeConstant:
	openXmlPart = new RibbonExtensibilityPart();
	return;
case RibbonAndBackstageCustomizationsPart.RelationshipTypeConstant:
	openXmlPart = new RibbonAndBackstageCustomizationsPart();
	return;
case WebExTaskpanesPart.RelationshipTypeConstant:
	openXmlPart = new WebExTaskpanesPart();
	return;

				}
            }
            else if (openXmlPackage is SpreadsheetDocument)
            {
                switch (relationshipType)
                {
					case WorkbookPart.RelationshipTypeConstant:
	openXmlPart = new WorkbookPart();
	return;
case CustomXmlPart.RelationshipTypeConstant:
	openXmlPart = new CustomXmlPart();
	return;
case CustomXmlPropertiesPart.RelationshipTypeConstant:
	openXmlPart = new CustomXmlPropertiesPart();
	return;
case CalculationChainPart.RelationshipTypeConstant:
	openXmlPart = new CalculationChainPart();
	return;
case CellMetadataPart.RelationshipTypeConstant:
	openXmlPart = new CellMetadataPart();
	return;
case ConnectionsPart.RelationshipTypeConstant:
	openXmlPart = new ConnectionsPart();
	return;
case CustomXmlMappingsPart.RelationshipTypeConstant:
	openXmlPart = new CustomXmlMappingsPart();
	return;
case SharedStringTablePart.RelationshipTypeConstant:
	openXmlPart = new SharedStringTablePart();
	return;
case WorkbookRevisionHeaderPart.RelationshipTypeConstant:
	openXmlPart = new WorkbookRevisionHeaderPart();
	return;
case WorkbookRevisionLogPart.RelationshipTypeConstant:
	openXmlPart = new WorkbookRevisionLogPart();
	return;
case WorkbookUserDataPart.RelationshipTypeConstant:
	openXmlPart = new WorkbookUserDataPart();
	return;
case WorkbookStylesPart.RelationshipTypeConstant:
	openXmlPart = new WorkbookStylesPart();
	return;
case ThemePart.RelationshipTypeConstant:
	openXmlPart = new ThemePart();
	return;
case ImagePart.RelationshipTypeConstant:
	openXmlPart = new ImagePart();
	return;
case ThumbnailPart.RelationshipTypeConstant:
	openXmlPart = new ThumbnailPart();
	return;
case VolatileDependenciesPart.RelationshipTypeConstant:
	openXmlPart = new VolatileDependenciesPart();
	return;
case ChartsheetPart.RelationshipTypeConstant:
	openXmlPart = new ChartsheetPart();
	return;
case SpreadsheetPrinterSettingsPart.RelationshipTypeConstant:
	openXmlPart = new SpreadsheetPrinterSettingsPart();
	return;
case DrawingsPart.RelationshipTypeConstant:
	openXmlPart = new DrawingsPart();
	return;
case ChartPart.RelationshipTypeConstant:
	openXmlPart = new ChartPart();
	return;
case ChartDrawingPart.RelationshipTypeConstant:
	openXmlPart = new ChartDrawingPart();
	return;
case EmbeddedPackagePart.RelationshipTypeConstant:
	openXmlPart = new EmbeddedPackagePart();
	return;
case ThemeOverridePart.RelationshipTypeConstant:
	openXmlPart = new ThemeOverridePart();
	return;
case ChartStylePart.RelationshipTypeConstant:
	openXmlPart = new ChartStylePart();
	return;
case ChartColorStylePart.RelationshipTypeConstant:
	openXmlPart = new ChartColorStylePart();
	return;
case DiagramColorsPart.RelationshipTypeConstant:
	openXmlPart = new DiagramColorsPart();
	return;
case DiagramDataPart.RelationshipTypeConstant:
	openXmlPart = new DiagramDataPart();
	return;
case SlidePart.RelationshipTypeConstant:
	openXmlPart = new SlidePart();
	return;
case DiagramPersistLayoutPart.RelationshipTypeConstant:
	openXmlPart = new DiagramPersistLayoutPart();
	return;
case DiagramLayoutDefinitionPart.RelationshipTypeConstant:
	openXmlPart = new DiagramLayoutDefinitionPart();
	return;
case DiagramStylePart.RelationshipTypeConstant:
	openXmlPart = new DiagramStylePart();
	return;
case EmbeddedObjectPart.RelationshipTypeConstant:
	openXmlPart = new EmbeddedObjectPart();
	return;
case VmlDrawingPart.RelationshipTypeConstant:
	openXmlPart = new VmlDrawingPart();
	return;
case LegacyDiagramTextPart.RelationshipTypeConstant:
	openXmlPart = new LegacyDiagramTextPart();
	return;
case EmbeddedControlPersistenceBinaryDataPart.RelationshipTypeConstant:
	openXmlPart = new EmbeddedControlPersistenceBinaryDataPart();
	return;
case NotesSlidePart.RelationshipTypeConstant:
	openXmlPart = new NotesSlidePart();
	return;
case NotesMasterPart.RelationshipTypeConstant:
	openXmlPart = new NotesMasterPart();
	return;
case UserDefinedTagsPart.RelationshipTypeConstant:
	openXmlPart = new UserDefinedTagsPart();
	return;
case SlideLayoutPart.RelationshipTypeConstant:
	openXmlPart = new SlideLayoutPart();
	return;
case SlideMasterPart.RelationshipTypeConstant:
	openXmlPart = new SlideMasterPart();
	return;
case EmbeddedControlPersistencePart.RelationshipTypeConstant:
	openXmlPart = new EmbeddedControlPersistencePart();
	return;
case SlideSyncDataPart.RelationshipTypeConstant:
	openXmlPart = new SlideSyncDataPart();
	return;
case WorksheetPart.RelationshipTypeConstant:
	openXmlPart = new WorksheetPart();
	return;
case WorksheetCommentsPart.RelationshipTypeConstant:
	openXmlPart = new WorksheetCommentsPart();
	return;
case PivotTablePart.RelationshipTypeConstant:
	openXmlPart = new PivotTablePart();
	return;
case PivotTableCacheDefinitionPart.RelationshipTypeConstant:
	openXmlPart = new PivotTableCacheDefinitionPart();
	return;
case PivotTableCacheRecordsPart.RelationshipTypeConstant:
	openXmlPart = new PivotTableCacheRecordsPart();
	return;
case SingleCellTablePart.RelationshipTypeConstant:
	openXmlPart = new SingleCellTablePart();
	return;
case TableDefinitionPart.RelationshipTypeConstant:
	openXmlPart = new TableDefinitionPart();
	return;
case QueryTablePart.RelationshipTypeConstant:
	openXmlPart = new QueryTablePart();
	return;
case ControlPropertiesPart.RelationshipTypeConstant:
	openXmlPart = new ControlPropertiesPart();
	return;
case CustomPropertyPart.RelationshipTypeConstant:
	openXmlPart = new CustomPropertyPart();
	return;
case WorksheetSortMapPart.RelationshipTypeConstant:
	openXmlPart = new WorksheetSortMapPart();
	return;
case SlicersPart.RelationshipTypeConstant:
	openXmlPart = new SlicersPart();
	return;
case TimeLinePart.RelationshipTypeConstant:
	openXmlPart = new TimeLinePart();
	return;
case WebExtensionPart.RelationshipTypeConstant:
	openXmlPart = new WebExtensionPart();
	return;
case DialogsheetPart.RelationshipTypeConstant:
	openXmlPart = new DialogsheetPart();
	return;
case ExternalWorkbookPart.RelationshipTypeConstant:
	openXmlPart = new ExternalWorkbookPart();
	return;
case ExcelAttachedToolbarsPart.RelationshipTypeConstant:
	openXmlPart = new ExcelAttachedToolbarsPart();
	return;
case VbaProjectPart.RelationshipTypeConstant:
	openXmlPart = new VbaProjectPart();
	return;
case VbaDataPart.RelationshipTypeConstant:
	openXmlPart = new VbaDataPart();
	return;
case MacroSheetPart.RelationshipTypeConstant:
	openXmlPart = new MacroSheetPart();
	return;
case InternationalMacroSheetPart.RelationshipTypeConstant:
	openXmlPart = new InternationalMacroSheetPart();
	return;
case CustomDataPropertiesPart.RelationshipTypeConstant:
	openXmlPart = new CustomDataPropertiesPart();
	return;
case CustomDataPart.RelationshipTypeConstant:
	openXmlPart = new CustomDataPart();
	return;
case SlicerCachePart.RelationshipTypeConstant:
	openXmlPart = new SlicerCachePart();
	return;
case TimeLineCachePart.RelationshipTypeConstant:
	openXmlPart = new TimeLineCachePart();
	return;
case CoreFilePropertiesPart.RelationshipTypeConstant:
	openXmlPart = new CoreFilePropertiesPart();
	return;
case ExtendedFilePropertiesPart.RelationshipTypeConstant:
	openXmlPart = new ExtendedFilePropertiesPart();
	return;
case CustomFilePropertiesPart.RelationshipTypeConstant:
	openXmlPart = new CustomFilePropertiesPart();
	return;
case DigitalSignatureOriginPart.RelationshipTypeConstant:
	openXmlPart = new DigitalSignatureOriginPart();
	return;
case XmlSignaturePart.RelationshipTypeConstant:
	openXmlPart = new XmlSignaturePart();
	return;
case QuickAccessToolbarCustomizationsPart.RelationshipTypeConstant:
	openXmlPart = new QuickAccessToolbarCustomizationsPart();
	return;
case RibbonExtensibilityPart.RelationshipTypeConstant:
	openXmlPart = new RibbonExtensibilityPart();
	return;
case RibbonAndBackstageCustomizationsPart.RelationshipTypeConstant:
	openXmlPart = new RibbonAndBackstageCustomizationsPart();
	return;
case WebExTaskpanesPart.RelationshipTypeConstant:
	openXmlPart = new WebExTaskpanesPart();
	return;

                }
            }
            else if (openXmlPackage is PresentationDocument)
            {
                switch (relationshipType)
                {
					case PresentationPart.RelationshipTypeConstant:
	openXmlPart = new PresentationPart();
	return;
case CustomXmlPart.RelationshipTypeConstant:
	openXmlPart = new CustomXmlPart();
	return;
case CustomXmlPropertiesPart.RelationshipTypeConstant:
	openXmlPart = new CustomXmlPropertiesPart();
	return;
case FontPart.RelationshipTypeConstant:
	openXmlPart = new FontPart();
	return;
case PresentationPropertiesPart.RelationshipTypeConstant:
	openXmlPart = new PresentationPropertiesPart();
	return;
case TableStylesPart.RelationshipTypeConstant:
	openXmlPart = new TableStylesPart();
	return;
case ThemePart.RelationshipTypeConstant:
	openXmlPart = new ThemePart();
	return;
case ImagePart.RelationshipTypeConstant:
	openXmlPart = new ImagePart();
	return;
case ViewPropertiesPart.RelationshipTypeConstant:
	openXmlPart = new ViewPropertiesPart();
	return;
case SlidePart.RelationshipTypeConstant:
	openXmlPart = new SlidePart();
	return;
case ChartPart.RelationshipTypeConstant:
	openXmlPart = new ChartPart();
	return;
case ChartDrawingPart.RelationshipTypeConstant:
	openXmlPart = new ChartDrawingPart();
	return;
case EmbeddedPackagePart.RelationshipTypeConstant:
	openXmlPart = new EmbeddedPackagePart();
	return;
case ThemeOverridePart.RelationshipTypeConstant:
	openXmlPart = new ThemeOverridePart();
	return;
case ChartStylePart.RelationshipTypeConstant:
	openXmlPart = new ChartStylePart();
	return;
case ChartColorStylePart.RelationshipTypeConstant:
	openXmlPart = new ChartColorStylePart();
	return;
case DiagramColorsPart.RelationshipTypeConstant:
	openXmlPart = new DiagramColorsPart();
	return;
case DiagramDataPart.RelationshipTypeConstant:
	openXmlPart = new DiagramDataPart();
	return;
case WorksheetPart.RelationshipTypeConstant:
	openXmlPart = new WorksheetPart();
	return;
case DrawingsPart.RelationshipTypeConstant:
	openXmlPart = new DrawingsPart();
	return;
case DiagramPersistLayoutPart.RelationshipTypeConstant:
	openXmlPart = new DiagramPersistLayoutPart();
	return;
case DiagramLayoutDefinitionPart.RelationshipTypeConstant:
	openXmlPart = new DiagramLayoutDefinitionPart();
	return;
case DiagramStylePart.RelationshipTypeConstant:
	openXmlPart = new DiagramStylePart();
	return;
case WebExtensionPart.RelationshipTypeConstant:
	openXmlPart = new WebExtensionPart();
	return;
case VmlDrawingPart.RelationshipTypeConstant:
	openXmlPart = new VmlDrawingPart();
	return;
case LegacyDiagramTextPart.RelationshipTypeConstant:
	openXmlPart = new LegacyDiagramTextPart();
	return;
case PivotTablePart.RelationshipTypeConstant:
	openXmlPart = new PivotTablePart();
	return;
case PivotTableCacheDefinitionPart.RelationshipTypeConstant:
	openXmlPart = new PivotTableCacheDefinitionPart();
	return;
case PivotTableCacheRecordsPart.RelationshipTypeConstant:
	openXmlPart = new PivotTableCacheRecordsPart();
	return;
case SingleCellTablePart.RelationshipTypeConstant:
	openXmlPart = new SingleCellTablePart();
	return;
case TableDefinitionPart.RelationshipTypeConstant:
	openXmlPart = new TableDefinitionPart();
	return;
case QueryTablePart.RelationshipTypeConstant:
	openXmlPart = new QueryTablePart();
	return;
case EmbeddedControlPersistencePart.RelationshipTypeConstant:
	openXmlPart = new EmbeddedControlPersistencePart();
	return;
case EmbeddedControlPersistenceBinaryDataPart.RelationshipTypeConstant:
	openXmlPart = new EmbeddedControlPersistenceBinaryDataPart();
	return;
case ControlPropertiesPart.RelationshipTypeConstant:
	openXmlPart = new ControlPropertiesPart();
	return;
case EmbeddedObjectPart.RelationshipTypeConstant:
	openXmlPart = new EmbeddedObjectPart();
	return;
case CustomPropertyPart.RelationshipTypeConstant:
	openXmlPart = new CustomPropertyPart();
	return;
case WorksheetSortMapPart.RelationshipTypeConstant:
	openXmlPart = new WorksheetSortMapPart();
	return;
case SlicersPart.RelationshipTypeConstant:
	openXmlPart = new SlicersPart();
	return;
case TimeLinePart.RelationshipTypeConstant:
	openXmlPart = new TimeLinePart();
	return;
case SlideCommentsPart.RelationshipTypeConstant:
	openXmlPart = new SlideCommentsPart();
	return;
case NotesSlidePart.RelationshipTypeConstant:
	openXmlPart = new NotesSlidePart();
	return;
case NotesMasterPart.RelationshipTypeConstant:
	openXmlPart = new NotesMasterPart();
	return;
case UserDefinedTagsPart.RelationshipTypeConstant:
	openXmlPart = new UserDefinedTagsPart();
	return;
case SlideLayoutPart.RelationshipTypeConstant:
	openXmlPart = new SlideLayoutPart();
	return;
case SlideMasterPart.RelationshipTypeConstant:
	openXmlPart = new SlideMasterPart();
	return;
case SlideSyncDataPart.RelationshipTypeConstant:
	openXmlPart = new SlideSyncDataPart();
	return;
case CommentAuthorsPart.RelationshipTypeConstant:
	openXmlPart = new CommentAuthorsPart();
	return;
case HandoutMasterPart.RelationshipTypeConstant:
	openXmlPart = new HandoutMasterPart();
	return;
case LegacyDiagramTextInfoPart.RelationshipTypeConstant:
	openXmlPart = new LegacyDiagramTextInfoPart();
	return;
case VbaProjectPart.RelationshipTypeConstant:
	openXmlPart = new VbaProjectPart();
	return;
case VbaDataPart.RelationshipTypeConstant:
	openXmlPart = new VbaDataPart();
	return;
case CoreFilePropertiesPart.RelationshipTypeConstant:
	openXmlPart = new CoreFilePropertiesPart();
	return;
case ExtendedFilePropertiesPart.RelationshipTypeConstant:
	openXmlPart = new ExtendedFilePropertiesPart();
	return;
case CustomFilePropertiesPart.RelationshipTypeConstant:
	openXmlPart = new CustomFilePropertiesPart();
	return;
case ThumbnailPart.RelationshipTypeConstant:
	openXmlPart = new ThumbnailPart();
	return;
case DigitalSignatureOriginPart.RelationshipTypeConstant:
	openXmlPart = new DigitalSignatureOriginPart();
	return;
case XmlSignaturePart.RelationshipTypeConstant:
	openXmlPart = new XmlSignaturePart();
	return;
case QuickAccessToolbarCustomizationsPart.RelationshipTypeConstant:
	openXmlPart = new QuickAccessToolbarCustomizationsPart();
	return;
case RibbonExtensibilityPart.RelationshipTypeConstant:
	openXmlPart = new RibbonExtensibilityPart();
	return;
case RibbonAndBackstageCustomizationsPart.RelationshipTypeConstant:
	openXmlPart = new RibbonAndBackstageCustomizationsPart();
	return;
case WebExTaskpanesPart.RelationshipTypeConstant:
	openXmlPart = new WebExTaskpanesPart();
	return;

                }
            }
            else
            {
                System.Diagnostics.Debug.Assert(false);				
            }
            return;
        }
Ejemplo n.º 7
0
        // Generates content of headerPart1.
        private void GenerateHeaderPart1Content(HeaderPart headerPart1)
        {
            Header header1 = new Header() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } };
            header1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            header1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            header1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            header1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            header1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            header1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            header1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            header1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            header1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            header1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            header1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            header1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            header1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            header1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            header1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Paragraph paragraph52 = new Paragraph() { RsidParagraphAddition = "004F7F90", RsidRunAdditionDefault = "00900A10" };

            ParagraphProperties paragraphProperties50 = new ParagraphProperties();
            WidowControl widowControl50 = new WidowControl() { Val = false };
            AutoSpaceDE autoSpaceDE50 = new AutoSpaceDE() { Val = false };
            AutoSpaceDN autoSpaceDN50 = new AutoSpaceDN() { Val = false };
            AdjustRightIndent adjustRightIndent50 = new AdjustRightIndent() { Val = false };
            SpacingBetweenLines spacingBetweenLines36 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
            Justification justification11 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties50 = new ParagraphMarkRunProperties();
            RunFonts runFonts105 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" };
            FontSize fontSize105 = new FontSize() { Val = "16" };
            FontSizeComplexScript fontSizeComplexScript105 = new FontSizeComplexScript() { Val = "16" };

            paragraphMarkRunProperties50.Append(runFonts105);
            paragraphMarkRunProperties50.Append(fontSize105);
            paragraphMarkRunProperties50.Append(fontSizeComplexScript105);

            paragraphProperties50.Append(widowControl50);
            paragraphProperties50.Append(autoSpaceDE50);
            paragraphProperties50.Append(autoSpaceDN50);
            paragraphProperties50.Append(adjustRightIndent50);
            paragraphProperties50.Append(spacingBetweenLines36);
            paragraphProperties50.Append(justification11);
            paragraphProperties50.Append(paragraphMarkRunProperties50);

            Run run56 = new Run();

            RunProperties runProperties56 = new RunProperties();
            RunFonts runFonts106 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" };
            Bold bold19 = new Bold();
            BoldComplexScript boldComplexScript19 = new BoldComplexScript();
            FontSize fontSize106 = new FontSize() { Val = "16" };
            FontSizeComplexScript fontSizeComplexScript106 = new FontSizeComplexScript() { Val = "16" };

            runProperties56.Append(runFonts106);
            runProperties56.Append(bold19);
            runProperties56.Append(boldComplexScript19);
            runProperties56.Append(fontSize106);
            runProperties56.Append(fontSizeComplexScript106);
            Text text48 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text48.Text = "Смоленская государственная медицинская академия ";

            run56.Append(runProperties56);
            run56.Append(text48);

            paragraph52.Append(paragraphProperties50);
            paragraph52.Append(run56);

            Paragraph paragraph53 = new Paragraph() { RsidParagraphAddition = "004F7F90", RsidRunAdditionDefault = "00900A10" };

            ParagraphProperties paragraphProperties51 = new ParagraphProperties();
            WidowControl widowControl51 = new WidowControl() { Val = false };
            AutoSpaceDE autoSpaceDE51 = new AutoSpaceDE() { Val = false };
            AutoSpaceDN autoSpaceDN51 = new AutoSpaceDN() { Val = false };
            AdjustRightIndent adjustRightIndent51 = new AdjustRightIndent() { Val = false };
            SpacingBetweenLines spacingBetweenLines37 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
            Justification justification12 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties51 = new ParagraphMarkRunProperties();
            RunFonts runFonts107 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" };
            FontSize fontSize107 = new FontSize() { Val = "16" };
            FontSizeComplexScript fontSizeComplexScript107 = new FontSizeComplexScript() { Val = "16" };

            paragraphMarkRunProperties51.Append(runFonts107);
            paragraphMarkRunProperties51.Append(fontSize107);
            paragraphMarkRunProperties51.Append(fontSizeComplexScript107);

            paragraphProperties51.Append(widowControl51);
            paragraphProperties51.Append(autoSpaceDE51);
            paragraphProperties51.Append(autoSpaceDN51);
            paragraphProperties51.Append(adjustRightIndent51);
            paragraphProperties51.Append(spacingBetweenLines37);
            paragraphProperties51.Append(justification12);
            paragraphProperties51.Append(paragraphMarkRunProperties51);

            Run run57 = new Run();

            RunProperties runProperties57 = new RunProperties();
            RunFonts runFonts108 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" };
            Bold bold20 = new Bold();
            BoldComplexScript boldComplexScript20 = new BoldComplexScript();
            FontSize fontSize108 = new FontSize() { Val = "16" };
            FontSizeComplexScript fontSizeComplexScript108 = new FontSizeComplexScript() { Val = "16" };

            runProperties57.Append(runFonts108);
            runProperties57.Append(bold20);
            runProperties57.Append(boldComplexScript20);
            runProperties57.Append(fontSize108);
            runProperties57.Append(fontSizeComplexScript108);
            Text text49 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text49.Text = "Научно-исследовательский институт антимикробной химиотерапии ";

            run57.Append(runProperties57);
            run57.Append(text49);

            paragraph53.Append(paragraphProperties51);
            paragraph53.Append(run57);

            Paragraph paragraph54 = new Paragraph() { RsidParagraphAddition = "004F7F90", RsidRunAdditionDefault = "00900A10" };

            ParagraphProperties paragraphProperties52 = new ParagraphProperties();
            WidowControl widowControl52 = new WidowControl() { Val = false };
            AutoSpaceDE autoSpaceDE52 = new AutoSpaceDE() { Val = false };
            AutoSpaceDN autoSpaceDN52 = new AutoSpaceDN() { Val = false };
            AdjustRightIndent adjustRightIndent52 = new AdjustRightIndent() { Val = false };
            SpacingBetweenLines spacingBetweenLines38 = new SpacingBetweenLines() { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto };
            Justification justification13 = new Justification() { Val = JustificationValues.Center };

            ParagraphMarkRunProperties paragraphMarkRunProperties52 = new ParagraphMarkRunProperties();
            RunFonts runFonts109 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" };
            FontSize fontSize109 = new FontSize() { Val = "16" };
            FontSizeComplexScript fontSizeComplexScript109 = new FontSizeComplexScript() { Val = "16" };

            paragraphMarkRunProperties52.Append(runFonts109);
            paragraphMarkRunProperties52.Append(fontSize109);
            paragraphMarkRunProperties52.Append(fontSizeComplexScript109);

            paragraphProperties52.Append(widowControl52);
            paragraphProperties52.Append(autoSpaceDE52);
            paragraphProperties52.Append(autoSpaceDN52);
            paragraphProperties52.Append(adjustRightIndent52);
            paragraphProperties52.Append(spacingBetweenLines38);
            paragraphProperties52.Append(justification13);
            paragraphProperties52.Append(paragraphMarkRunProperties52);

            Run run58 = new Run();

            RunProperties runProperties58 = new RunProperties();
            RunFonts runFonts110 = new RunFonts() { Ascii = "Verdana", HighAnsi = "Verdana", EastAsia = "New Roman", ComplexScript = "Verdana" };
            Bold bold21 = new Bold();
            BoldComplexScript boldComplexScript21 = new BoldComplexScript();
            FontSize fontSize110 = new FontSize() { Val = "16" };
            FontSizeComplexScript fontSizeComplexScript110 = new FontSizeComplexScript() { Val = "16" };

            runProperties58.Append(runFonts110);
            runProperties58.Append(bold21);
            runProperties58.Append(boldComplexScript21);
            runProperties58.Append(fontSize110);
            runProperties58.Append(fontSizeComplexScript110);
            Text text50 = new Text() { Space = SpaceProcessingModeValues.Preserve };
            text50.Text = "Клинико-диагностическая лаборатория, тел. 45-06-13 ";

            run58.Append(runProperties58);
            run58.Append(text50);

            paragraph54.Append(paragraphProperties52);
            paragraph54.Append(run58);

            header1.Append(paragraph52);
            header1.Append(paragraph53);
            header1.Append(paragraph54);

            headerPart1.Header = header1;
        }
        // Generates content of headerPart2.
        private void GenerateHeaderPart2Content(HeaderPart headerPart2)
        {
            Header header2 = new Header();

            Paragraph paragraph51 = new Paragraph() { RsidParagraphAddition = "00C913B8", RsidParagraphProperties = "00C913B8", RsidRunAdditionDefault = "00740A1C" };

            ParagraphProperties paragraphProperties46 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId44 = new ParagraphStyleId() { Val = "En-tte" };

            ParagraphBorders paragraphBorders14 = new ParagraphBorders();
            BottomBorder bottomBorder13 = new BottomBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };

            paragraphBorders14.Append(bottomBorder13);
            SpacingBetweenLines spacingBetweenLines51 = new SpacingBetweenLines() { After = "60" };

            ParagraphMarkRunProperties paragraphMarkRunProperties17 = new ParagraphMarkRunProperties();
            RunStyle runStyle10 = new RunStyle() { Val = "DateCar" };
            RunFonts runFonts52 = new RunFonts() { EastAsia = "MS Mincho" };
            FontSize fontSize49 = new FontSize() { Val = "20" };
            FontSizeComplexScript fontSizeComplexScript50 = new FontSizeComplexScript() { Val = "20" };

            paragraphMarkRunProperties17.Append(runStyle10);
            paragraphMarkRunProperties17.Append(runFonts52);
            paragraphMarkRunProperties17.Append(fontSize49);
            paragraphMarkRunProperties17.Append(fontSizeComplexScript50);

            paragraphProperties46.Append(paragraphStyleId44);
            paragraphProperties46.Append(paragraphBorders14);
            paragraphProperties46.Append(spacingBetweenLines51);
            paragraphProperties46.Append(paragraphMarkRunProperties17);

            Run run54 = new Run();

            RunProperties runProperties28 = new RunProperties();
            NoProof noProof15 = new NoProof();
            Languages languages34 = new Languages() { Val = "fr-CA", EastAsia = "fr-CA" };

            runProperties28.Append(noProof15);
            runProperties28.Append(languages34);

            Drawing drawing15 = new Drawing();

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

            Wp.HorizontalPosition horizontalPosition4 = new Wp.HorizontalPosition() { RelativeFrom = Wp.HorizontalRelativePositionValues.Column };
            Wp.PositionOffset positionOffset7 = new Wp.PositionOffset();
            positionOffset7.Text = "8890";

            horizontalPosition4.Append(positionOffset7);

            Wp.VerticalPosition verticalPosition4 = new Wp.VerticalPosition() { RelativeFrom = Wp.VerticalRelativePositionValues.Paragraph };
            Wp.PositionOffset positionOffset8 = new Wp.PositionOffset();
            positionOffset8.Text = "8890";

            verticalPosition4.Append(positionOffset8);
            Wp.Extent extent15 = new Wp.Extent() { Cx = 6848475L, Cy = 438150L };
            Wp.EffectExtent effectExtent15 = new Wp.EffectExtent() { LeftEdge = 19050L, TopEdge = 0L, RightEdge = 9525L, BottomEdge = 0L };
            Wp.WrapNone wrapNone4 = new Wp.WrapNone();
            Wp.DocProperties docProperties15 = new Wp.DocProperties() { Id = (UInt32Value)65U, Name = "Image 65", Description = "RADAR_Opinion_Page2_BNR" };

            Wp.NonVisualGraphicFrameDrawingProperties nonVisualGraphicFrameDrawingProperties15 = new Wp.NonVisualGraphicFrameDrawingProperties();
            A.GraphicFrameLocks graphicFrameLocks15 = new A.GraphicFrameLocks() { NoChangeAspect = true };

            nonVisualGraphicFrameDrawingProperties15.Append(graphicFrameLocks15);

            A.Graphic graphic15 = new A.Graphic();

            A.GraphicData graphicData15 = new A.GraphicData() { Uri = "http://schemas.openxmlformats.org/drawingml/2006/picture" };

            Pic.Picture picture15 = new Pic.Picture();

            Pic.NonVisualPictureProperties nonVisualPictureProperties15 = new Pic.NonVisualPictureProperties();
            Pic.NonVisualDrawingProperties nonVisualDrawingProperties15 = new Pic.NonVisualDrawingProperties() { Id = (UInt32Value)0U, Name = "Picture 65", Description = "RADAR_Opinion_Page2_BNR" };

            Pic.NonVisualPictureDrawingProperties nonVisualPictureDrawingProperties15 = new Pic.NonVisualPictureDrawingProperties();
            A.PictureLocks pictureLocks15 = new A.PictureLocks() { NoChangeAspect = true, NoChangeArrowheads = true };

            nonVisualPictureDrawingProperties15.Append(pictureLocks15);

            nonVisualPictureProperties15.Append(nonVisualDrawingProperties15);
            nonVisualPictureProperties15.Append(nonVisualPictureDrawingProperties15);

            Pic.BlipFill blipFill15 = new Pic.BlipFill();
            A.Blip blip15 = new A.Blip() { Embed = "rId1" };
            A.SourceRectangle sourceRectangle15 = new A.SourceRectangle();

            A.Stretch stretch15 = new A.Stretch();
            A.FillRectangle fillRectangle15 = new A.FillRectangle();

            stretch15.Append(fillRectangle15);

            blipFill15.Append(blip15);
            blipFill15.Append(sourceRectangle15);
            blipFill15.Append(stretch15);

            Pic.ShapeProperties shapeProperties15 = new Pic.ShapeProperties() { BlackWhiteMode = A.BlackWhiteModeValues.Auto };

            A.Transform2D transform2D15 = new A.Transform2D();
            A.Offset offset15 = new A.Offset() { X = 0L, Y = 0L };
            A.Extents extents15 = new A.Extents() { Cx = 6848475L, Cy = 438150L };

            transform2D15.Append(offset15);
            transform2D15.Append(extents15);

            A.PresetGeometry presetGeometry15 = new A.PresetGeometry() { Preset = A.ShapeTypeValues.Rectangle };
            A.AdjustValueList adjustValueList15 = new A.AdjustValueList();

            presetGeometry15.Append(adjustValueList15);
            A.NoFill noFill26 = new A.NoFill();

            shapeProperties15.Append(transform2D15);
            shapeProperties15.Append(presetGeometry15);
            shapeProperties15.Append(noFill26);

            picture15.Append(nonVisualPictureProperties15);
            picture15.Append(blipFill15);
            picture15.Append(shapeProperties15);

            graphicData15.Append(picture15);

            graphic15.Append(graphicData15);

            anchor4.Append(simplePosition4);
            anchor4.Append(horizontalPosition4);
            anchor4.Append(verticalPosition4);
            anchor4.Append(extent15);
            anchor4.Append(effectExtent15);
            anchor4.Append(wrapNone4);
            anchor4.Append(docProperties15);
            anchor4.Append(nonVisualGraphicFrameDrawingProperties15);
            anchor4.Append(graphic15);

            drawing15.Append(anchor4);

            run54.Append(runProperties28);
            run54.Append(drawing15);

            paragraph51.Append(paragraphProperties46);
            paragraph51.Append(run54);

            CustomXmlBlock customXmlBlock23 = new CustomXmlBlock() { Uri = "http://hubblereports.com/namespace", Element = "reportdoc" };

            CustomXmlBlock customXmlBlock24 = new CustomXmlBlock() { Uri = "http://hubblereports.com/namespace", Element = "header" };

            CustomXmlBlock customXmlBlock25 = new CustomXmlBlock() { Uri = "http://hubblereports.com/namespace", Element = "ReportDate" };

            Paragraph paragraph52 = new Paragraph() { RsidParagraphMarkRevision = "006B1D99", RsidParagraphAddition = "003907B3", RsidParagraphProperties = "003907B3", RsidRunAdditionDefault = "003907B3" };

            ParagraphProperties paragraphProperties47 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId45 = new ParagraphStyleId() { Val = "En-tte" };

            ParagraphBorders paragraphBorders15 = new ParagraphBorders();
            BottomBorder bottomBorder14 = new BottomBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };

            paragraphBorders15.Append(bottomBorder14);
            SpacingBetweenLines spacingBetweenLines52 = new SpacingBetweenLines() { After = "60" };

            ParagraphMarkRunProperties paragraphMarkRunProperties18 = new ParagraphMarkRunProperties();
            RunStyle runStyle11 = new RunStyle() { Val = "DateCar" };
            RunFonts runFonts53 = new RunFonts() { EastAsia = "MS Mincho" };
            FontSize fontSize50 = new FontSize() { Val = "20" };
            FontSizeComplexScript fontSizeComplexScript51 = new FontSizeComplexScript() { Val = "20" };

            paragraphMarkRunProperties18.Append(runStyle11);
            paragraphMarkRunProperties18.Append(runFonts53);
            paragraphMarkRunProperties18.Append(fontSize50);
            paragraphMarkRunProperties18.Append(fontSizeComplexScript51);

            paragraphProperties47.Append(paragraphStyleId45);
            paragraphProperties47.Append(paragraphBorders15);
            paragraphProperties47.Append(spacingBetweenLines52);
            paragraphProperties47.Append(paragraphMarkRunProperties18);

            Run run55 = new Run() { RsidRunProperties = "006B1D99" };

            RunProperties runProperties29 = new RunProperties();
            RunStyle runStyle12 = new RunStyle() { Val = "DateCar" };
            RunFonts runFonts54 = new RunFonts() { EastAsia = "MS Mincho" };
            FontSize fontSize51 = new FontSize() { Val = "20" };
            FontSizeComplexScript fontSizeComplexScript52 = new FontSizeComplexScript() { Val = "20" };

            runProperties29.Append(runStyle12);
            runProperties29.Append(runFonts54);
            runProperties29.Append(fontSize51);
            runProperties29.Append(fontSizeComplexScript52);
            Text text33 = new Text();
            text33.Text = "NOVEMBER 30, 2005";

            run55.Append(runProperties29);
            run55.Append(text33);

            paragraph52.Append(paragraphProperties47);
            paragraph52.Append(run55);

            customXmlBlock25.Append(paragraph52);

            Paragraph paragraph53 = new Paragraph() { RsidParagraphMarkRevision = "00F34666", RsidParagraphAddition = "002E7D22", RsidParagraphProperties = "00C913B8", RsidRunAdditionDefault = "00740A1C" };

            ParagraphProperties paragraphProperties48 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId46 = new ParagraphStyleId() { Val = "Titre1" };

            paragraphProperties48.Append(paragraphStyleId46);

            Run run56 = new Run();
            Text text34 = new Text();
            text34.Text = "MORGAN STANLEY INVESTMENT MANAGEMENT, INC";

            run56.Append(text34);
            CustomXmlRun customXmlRun10 = new CustomXmlRun() { Uri = "errors@http://hubblereports.com/namespace", Element = "ContentTypeDesc" };
            CustomXmlRun customXmlRun11 = new CustomXmlRun() { Uri = "http://hubblereports.com/namespace", Element = "ManagerName" };

            paragraph53.Append(paragraphProperties48);
            paragraph53.Append(run56);
            paragraph53.Append(customXmlRun10);
            paragraph53.Append(customXmlRun11);

            customXmlBlock24.Append(customXmlBlock25);
            customXmlBlock24.Append(paragraph53);

            customXmlBlock23.Append(customXmlBlock24);

            header2.Append(paragraph51);
            header2.Append(customXmlBlock23);

            headerPart2.Header = header2;
        }
Ejemplo n.º 9
0
        // Generates content of headerPart1.
        private void GenerateHeaderPart1Content(HeaderPart headerPart1)
        {
            Header header1 = new Header() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 w15 w16se wp14" } };
            header1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            header1.AddNamespaceDeclaration("cx", "http://schemas.microsoft.com/office/drawing/2014/chartex");
            header1.AddNamespaceDeclaration("cx1", "http://schemas.microsoft.com/office/drawing/2015/9/8/chartex");
            header1.AddNamespaceDeclaration("cx2", "http://schemas.microsoft.com/office/drawing/2015/10/21/chartex");
            header1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            header1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            header1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            header1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            header1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            header1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            header1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            header1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            header1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            header1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            header1.AddNamespaceDeclaration("w15", "http://schemas.microsoft.com/office/word/2012/wordml");
            header1.AddNamespaceDeclaration("w16se", "http://schemas.microsoft.com/office/word/2015/wordml/symex");
            header1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            header1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            header1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            header1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Paragraph paragraph371 = new Paragraph() { RsidParagraphAddition = "0094109A", RsidParagraphProperties = "00624202", RsidRunAdditionDefault = "0094109A", ParagraphId = "0AAC1AD1", TextId = "295351A7" };

            ParagraphProperties paragraphProperties368 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId28 = new ParagraphStyleId() { Val = "Footer" };
            WidowControl widowControl1 = new WidowControl() { Val = false };
            Indentation indentation25 = new Indentation() { End = "360" };

            paragraphProperties368.Append(paragraphStyleId28);
            paragraphProperties368.Append(widowControl1);
            paragraphProperties368.Append(indentation25);

            Run run755 = new Run();

            RunProperties runProperties797 = new RunProperties();
            NoProof noProof4 = new NoProof();

            runProperties797.Append(noProof4);

            Drawing drawing2 = new Drawing();

            Wp.Inline inline1 = new Wp.Inline() { DistanceFromTop = (UInt32Value)0U, DistanceFromBottom = (UInt32Value)0U, DistanceFromLeft = (UInt32Value)0U, DistanceFromRight = (UInt32Value)0U, AnchorId = "0AAC1AD5", EditId = "0AAC1AD6" };
            Wp.Extent extent2 = new Wp.Extent() { Cx = 1238250L, Cy = 190500L };
            Wp.EffectExtent effectExtent2 = new Wp.EffectExtent() { LeftEdge = 0L, TopEdge = 0L, RightEdge = 0L, BottomEdge = 0L };
            Wp.DocProperties docProperties2 = new Wp.DocProperties() { Id = (UInt32Value)1U, Name = "Picture 1" };

            Wp.NonVisualGraphicFrameDrawingProperties nonVisualGraphicFrameDrawingProperties2 = new Wp.NonVisualGraphicFrameDrawingProperties();

            A.GraphicFrameLocks graphicFrameLocks2 = new A.GraphicFrameLocks() { NoChangeAspect = true };
            graphicFrameLocks2.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");

            nonVisualGraphicFrameDrawingProperties2.Append(graphicFrameLocks2);

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

            A.GraphicData graphicData2 = new A.GraphicData() { Uri = "http://schemas.openxmlformats.org/drawingml/2006/picture" };

            Pic.Picture picture2 = new Pic.Picture();
            picture2.AddNamespaceDeclaration("pic", "http://schemas.openxmlformats.org/drawingml/2006/picture");

            Pic.NonVisualPictureProperties nonVisualPictureProperties2 = new Pic.NonVisualPictureProperties();
            Pic.NonVisualDrawingProperties nonVisualDrawingProperties2 = new Pic.NonVisualDrawingProperties() { Id = (UInt32Value)0U, Name = "Picture 1" };

            Pic.NonVisualPictureDrawingProperties nonVisualPictureDrawingProperties2 = new Pic.NonVisualPictureDrawingProperties();
            A.PictureLocks pictureLocks2 = new A.PictureLocks() { NoChangeAspect = true, NoChangeArrowheads = true };

            nonVisualPictureDrawingProperties2.Append(pictureLocks2);

            nonVisualPictureProperties2.Append(nonVisualDrawingProperties2);
            nonVisualPictureProperties2.Append(nonVisualPictureDrawingProperties2);

            Pic.BlipFill blipFill2 = new Pic.BlipFill();

            A.Blip blip2 = new A.Blip() { Embed = "rId1" };

            A.BlipExtensionList blipExtensionList2 = new A.BlipExtensionList();

            A.BlipExtension blipExtension2 = new A.BlipExtension() { Uri = "{28A0092B-C50C-407E-A947-70E740481C1C}" };

            A14.UseLocalDpi useLocalDpi2 = new A14.UseLocalDpi() { Val = false };
            useLocalDpi2.AddNamespaceDeclaration("a14", "http://schemas.microsoft.com/office/drawing/2010/main");

            blipExtension2.Append(useLocalDpi2);

            blipExtensionList2.Append(blipExtension2);

            blip2.Append(blipExtensionList2);
            A.SourceRectangle sourceRectangle2 = new A.SourceRectangle();

            A.Stretch stretch2 = new A.Stretch();
            A.FillRectangle fillRectangle2 = new A.FillRectangle();

            stretch2.Append(fillRectangle2);

            blipFill2.Append(blip2);
            blipFill2.Append(sourceRectangle2);
            blipFill2.Append(stretch2);

            Pic.ShapeProperties shapeProperties2 = new Pic.ShapeProperties() { BlackWhiteMode = A.BlackWhiteModeValues.Auto };

            A.Transform2D transform2D2 = new A.Transform2D();
            A.Offset offset2 = new A.Offset() { X = 0L, Y = 0L };
            A.Extents extents2 = new A.Extents() { Cx = 1238250L, Cy = 190500L };

            transform2D2.Append(offset2);
            transform2D2.Append(extents2);

            A.PresetGeometry presetGeometry2 = new A.PresetGeometry() { Preset = A.ShapeTypeValues.Rectangle };
            A.AdjustValueList adjustValueList2 = new A.AdjustValueList();

            presetGeometry2.Append(adjustValueList2);
            A.NoFill noFill1 = new A.NoFill();

            A.Outline outline2 = new A.Outline();
            A.NoFill noFill2 = new A.NoFill();

            outline2.Append(noFill2);

            shapeProperties2.Append(transform2D2);
            shapeProperties2.Append(presetGeometry2);
            shapeProperties2.Append(noFill1);
            shapeProperties2.Append(outline2);

            picture2.Append(nonVisualPictureProperties2);
            picture2.Append(blipFill2);
            picture2.Append(shapeProperties2);

            graphicData2.Append(picture2);

            graphic2.Append(graphicData2);

            inline1.Append(extent2);
            inline1.Append(effectExtent2);
            inline1.Append(docProperties2);
            inline1.Append(nonVisualGraphicFrameDrawingProperties2);
            inline1.Append(graphic2);

            drawing2.Append(inline1);

            run755.Append(runProperties797);
            run755.Append(drawing2);

            Run run756 = new Run();
            TabChar tabChar46 = new TabChar();

            run756.Append(tabChar46);

            Run run757 = new Run();
            TabChar tabChar47 = new TabChar();

            run757.Append(tabChar47);

            Run run758 = new Run();
            TabChar tabChar48 = new TabChar();

            run758.Append(tabChar48);

            Run run759 = new Run();
            TabChar tabChar49 = new TabChar();

            run759.Append(tabChar49);

            Run run760 = new Run() { RsidRunProperties = "00C84D4C" };

            RunProperties runProperties798 = new RunProperties();
            RunFonts runFonts1038 = new RunFonts() { Ascii = "Arial", HighAnsi = "Arial", ComplexScript = "Arial" };
            FontSize fontSize1055 = new FontSize() { Val = "14" };
            FontSizeComplexScript fontSizeComplexScript1041 = new FontSizeComplexScript() { Val = "14" };

            runProperties798.Append(runFonts1038);
            runProperties798.Append(fontSize1055);
            runProperties798.Append(fontSizeComplexScript1041);
            Text text708 = new Text();
            text708.Text = "Protected Information Internal Use Only";

            run760.Append(runProperties798);
            run760.Append(text708);

            paragraph371.Append(paragraphProperties368);
            paragraph371.Append(run755);
            paragraph371.Append(run756);
            paragraph371.Append(run757);
            paragraph371.Append(run758);
            paragraph371.Append(run759);
            paragraph371.Append(run760);

            header1.Append(paragraph371);

            headerPart1.Header = header1;
        }
        // Generates content of headerPart1.
        private void GenerateHeaderPart1Content(HeaderPart headerPart1)
        {
            Header header1 = new Header();

            Paragraph paragraph35 = new Paragraph() { RsidParagraphAddition = "00AB4921", RsidParagraphProperties = "002A7539", RsidRunAdditionDefault = "00740A1C" };

            ParagraphProperties paragraphProperties34 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId33 = new ParagraphStyleId() { Val = "En-tte" };

            ParagraphBorders paragraphBorders3 = new ParagraphBorders();
            BottomBorder bottomBorder4 = new BottomBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };

            paragraphBorders3.Append(bottomBorder4);
            SpacingBetweenLines spacingBetweenLines20 = new SpacingBetweenLines() { After = "60" };

            ParagraphMarkRunProperties paragraphMarkRunProperties15 = new ParagraphMarkRunProperties();
            RunStyle runStyle7 = new RunStyle() { Val = "DateCar" };
            FontSize fontSize10 = new FontSize() { Val = "20" };
            FontSizeComplexScript fontSizeComplexScript19 = new FontSizeComplexScript() { Val = "20" };

            paragraphMarkRunProperties15.Append(runStyle7);
            paragraphMarkRunProperties15.Append(fontSize10);
            paragraphMarkRunProperties15.Append(fontSizeComplexScript19);

            paragraphProperties34.Append(paragraphStyleId33);
            paragraphProperties34.Append(paragraphBorders3);
            paragraphProperties34.Append(spacingBetweenLines20);
            paragraphProperties34.Append(paragraphMarkRunProperties15);

            Run run43 = new Run();

            RunProperties runProperties24 = new RunProperties();
            NoProof noProof12 = new NoProof();
            Languages languages12 = new Languages() { Val = "fr-CA", EastAsia = "fr-CA" };

            runProperties24.Append(noProof12);
            runProperties24.Append(languages12);

            Drawing drawing12 = new Drawing();

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

            Wp.HorizontalPosition horizontalPosition2 = new Wp.HorizontalPosition() { RelativeFrom = Wp.HorizontalRelativePositionValues.Column };
            Wp.PositionOffset positionOffset3 = new Wp.PositionOffset();
            positionOffset3.Text = "0";

            horizontalPosition2.Append(positionOffset3);

            Wp.VerticalPosition verticalPosition2 = new Wp.VerticalPosition() { RelativeFrom = Wp.VerticalRelativePositionValues.Paragraph };
            Wp.PositionOffset positionOffset4 = new Wp.PositionOffset();
            positionOffset4.Text = "0";

            verticalPosition2.Append(positionOffset4);
            Wp.Extent extent12 = new Wp.Extent() { Cx = 6858000L, Cy = 714375L };
            Wp.EffectExtent effectExtent12 = new Wp.EffectExtent() { LeftEdge = 19050L, TopEdge = 0L, RightEdge = 0L, BottomEdge = 0L };
            Wp.WrapNone wrapNone2 = new Wp.WrapNone();
            Wp.DocProperties docProperties12 = new Wp.DocProperties() { Id = (UInt32Value)54U, Name = "Image 54", Description = "RADAR_Opinion_BNR" };

            Wp.NonVisualGraphicFrameDrawingProperties nonVisualGraphicFrameDrawingProperties12 = new Wp.NonVisualGraphicFrameDrawingProperties();
            A.GraphicFrameLocks graphicFrameLocks12 = new A.GraphicFrameLocks() { NoChangeAspect = true };

            nonVisualGraphicFrameDrawingProperties12.Append(graphicFrameLocks12);

            A.Graphic graphic12 = new A.Graphic();

            A.GraphicData graphicData12 = new A.GraphicData() { Uri = "http://schemas.openxmlformats.org/drawingml/2006/picture" };

            Pic.Picture picture12 = new Pic.Picture();

            Pic.NonVisualPictureProperties nonVisualPictureProperties12 = new Pic.NonVisualPictureProperties();
            Pic.NonVisualDrawingProperties nonVisualDrawingProperties12 = new Pic.NonVisualDrawingProperties() { Id = (UInt32Value)0U, Name = "Picture 54", Description = "RADAR_Opinion_BNR" };

            Pic.NonVisualPictureDrawingProperties nonVisualPictureDrawingProperties12 = new Pic.NonVisualPictureDrawingProperties();
            A.PictureLocks pictureLocks12 = new A.PictureLocks() { NoChangeAspect = true, NoChangeArrowheads = true };

            nonVisualPictureDrawingProperties12.Append(pictureLocks12);

            nonVisualPictureProperties12.Append(nonVisualDrawingProperties12);
            nonVisualPictureProperties12.Append(nonVisualPictureDrawingProperties12);

            Pic.BlipFill blipFill12 = new Pic.BlipFill();
            A.Blip blip12 = new A.Blip() { Embed = "rId1" };
            A.SourceRectangle sourceRectangle12 = new A.SourceRectangle();

            A.Stretch stretch12 = new A.Stretch();
            A.FillRectangle fillRectangle12 = new A.FillRectangle();

            stretch12.Append(fillRectangle12);

            blipFill12.Append(blip12);
            blipFill12.Append(sourceRectangle12);
            blipFill12.Append(stretch12);

            Pic.ShapeProperties shapeProperties12 = new Pic.ShapeProperties() { BlackWhiteMode = A.BlackWhiteModeValues.Auto };

            A.Transform2D transform2D12 = new A.Transform2D();
            A.Offset offset12 = new A.Offset() { X = 0L, Y = 0L };
            A.Extents extents12 = new A.Extents() { Cx = 6858000L, Cy = 714375L };

            transform2D12.Append(offset12);
            transform2D12.Append(extents12);

            A.PresetGeometry presetGeometry12 = new A.PresetGeometry() { Preset = A.ShapeTypeValues.Rectangle };
            A.AdjustValueList adjustValueList12 = new A.AdjustValueList();

            presetGeometry12.Append(adjustValueList12);
            A.NoFill noFill22 = new A.NoFill();

            shapeProperties12.Append(transform2D12);
            shapeProperties12.Append(presetGeometry12);
            shapeProperties12.Append(noFill22);

            picture12.Append(nonVisualPictureProperties12);
            picture12.Append(blipFill12);
            picture12.Append(shapeProperties12);

            graphicData12.Append(picture12);

            graphic12.Append(graphicData12);

            anchor2.Append(simplePosition2);
            anchor2.Append(horizontalPosition2);
            anchor2.Append(verticalPosition2);
            anchor2.Append(extent12);
            anchor2.Append(effectExtent12);
            anchor2.Append(wrapNone2);
            anchor2.Append(docProperties12);
            anchor2.Append(nonVisualGraphicFrameDrawingProperties12);
            anchor2.Append(graphic12);

            drawing12.Append(anchor2);

            run43.Append(runProperties24);
            run43.Append(drawing12);

            paragraph35.Append(paragraphProperties34);
            paragraph35.Append(run43);

            CustomXmlBlock customXmlBlock16 = new CustomXmlBlock() { Uri = "http://hubblereports.com/namespace", Element = "reportdoc" };

            CustomXmlBlock customXmlBlock17 = new CustomXmlBlock() { Uri = "http://hubblereports.com/namespace", Element = "header" };

            CustomXmlBlock customXmlBlock18 = new CustomXmlBlock() { Uri = "http://hubblereports.com/namespace", Element = "ReportDate" };

            Paragraph paragraph36 = new Paragraph() { RsidParagraphMarkRevision = "006B1D99", RsidParagraphAddition = "00AB4921", RsidParagraphProperties = "002A7539", RsidRunAdditionDefault = "00AB4921" };

            ParagraphProperties paragraphProperties35 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId34 = new ParagraphStyleId() { Val = "En-tte" };

            ParagraphBorders paragraphBorders4 = new ParagraphBorders();
            BottomBorder bottomBorder5 = new BottomBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };

            paragraphBorders4.Append(bottomBorder5);
            SpacingBetweenLines spacingBetweenLines21 = new SpacingBetweenLines() { Before = "240", After = "60" };

            ParagraphMarkRunProperties paragraphMarkRunProperties16 = new ParagraphMarkRunProperties();
            RunStyle runStyle8 = new RunStyle() { Val = "DateCar" };
            RunFonts runFonts4 = new RunFonts() { EastAsia = "MS Mincho" };
            FontSize fontSize11 = new FontSize() { Val = "20" };
            FontSizeComplexScript fontSizeComplexScript20 = new FontSizeComplexScript() { Val = "20" };

            paragraphMarkRunProperties16.Append(runStyle8);
            paragraphMarkRunProperties16.Append(runFonts4);
            paragraphMarkRunProperties16.Append(fontSize11);
            paragraphMarkRunProperties16.Append(fontSizeComplexScript20);

            paragraphProperties35.Append(paragraphStyleId34);
            paragraphProperties35.Append(paragraphBorders4);
            paragraphProperties35.Append(spacingBetweenLines21);
            paragraphProperties35.Append(paragraphMarkRunProperties16);

            Run run44 = new Run() { RsidRunProperties = "006B1D99" };

            RunProperties runProperties25 = new RunProperties();
            RunStyle runStyle9 = new RunStyle() { Val = "DateCar" };
            RunFonts runFonts5 = new RunFonts() { EastAsia = "MS Mincho" };
            FontSize fontSize12 = new FontSize() { Val = "20" };
            FontSizeComplexScript fontSizeComplexScript21 = new FontSizeComplexScript() { Val = "20" };

            runProperties25.Append(runStyle9);
            runProperties25.Append(runFonts5);
            runProperties25.Append(fontSize12);
            runProperties25.Append(fontSizeComplexScript21);
            Text text30 = new Text();
            text30.Text = DateTime.Today.ToString("MMMM dd, yyyy", CultureInfo.CreateSpecificCulture("en-US")).ToUpperInvariant();

            run44.Append(runProperties25);
            run44.Append(text30);

            paragraph36.Append(paragraphProperties35);
            paragraph36.Append(run44);

            customXmlBlock18.Append(paragraph36);

            Paragraph paragraph37 = new Paragraph() { RsidParagraphMarkRevision = "00A445CA", RsidParagraphAddition = "00AB4921", RsidParagraphProperties = "00E340CC", RsidRunAdditionDefault = "00957E57" };

            ParagraphProperties paragraphProperties36 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId35 = new ParagraphStyleId() { Val = "Titre" };
            Justification justification2 = new Justification() { Val = JustificationValues.Left };

            paragraphProperties36.Append(paragraphStyleId35);
            paragraphProperties36.Append(justification2);
            CustomXmlRun customXmlRun9 = new CustomXmlRun() { Uri = "errors@http://hubblereports.com/namespace", Element = "ContentTypeDesc" };

            paragraph37.Append(paragraphProperties36);
            paragraph37.Append(customXmlRun9);

            CustomXmlBlock customXmlBlock19 = new CustomXmlBlock() { Uri = "http://hubblereports.com/namespace", Element = "ManagerName" };

            Paragraph paragraph38 = new Paragraph() { RsidParagraphAddition = "00AB4921", RsidParagraphProperties = "000C4F36", RsidRunAdditionDefault = "005546F4" };

            ParagraphProperties paragraphProperties37 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId36 = new ParagraphStyleId() { Val = "ManagerName" };
            SpacingBetweenLines spacingBetweenLines22 = new SpacingBetweenLines() { After = "0" };

            paragraphProperties37.Append(paragraphStyleId36);
            paragraphProperties37.Append(spacingBetweenLines22);

            Run run45 = new Run();
            Text text31 = new Text();
            text31.Text = "Morgan Stanley Investment Management, Inc.";

            run45.Append(text31);

            paragraph38.Append(paragraphProperties37);
            paragraph38.Append(run45);

            customXmlBlock19.Append(paragraph38);

            customXmlBlock17.Append(customXmlBlock18);
            customXmlBlock17.Append(paragraph37);
            customXmlBlock17.Append(customXmlBlock19);

            customXmlBlock16.Append(customXmlBlock17);

            Paragraph paragraph39 = new Paragraph() { RsidParagraphAddition = "002E7D22", RsidParagraphProperties = "00545261", RsidRunAdditionDefault = "002E7D22" };

            ParagraphProperties paragraphProperties38 = new ParagraphProperties();
            SpacingBetweenLines spacingBetweenLines23 = new SpacingBetweenLines() { After = "0", Line = "40", LineRule = LineSpacingRuleValues.Exact };

            paragraphProperties38.Append(spacingBetweenLines23);

            paragraph39.Append(paragraphProperties38);

            header1.Append(paragraph35);
            header1.Append(customXmlBlock16);
            header1.Append(paragraph39);

            headerPart1.Header = header1;
        }
Ejemplo n.º 11
0
        // Generates content of headerPart2.
        private void GenerateHeaderPart2Content(HeaderPart headerPart2)
        {
            Header header2 = new Header() {MCAttributes = new MarkupCompatibilityAttributes() {Ignorable = "w14 wp14"}};
            header2.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            header2.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            header2.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            header2.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            header2.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            header2.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            header2.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            header2.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            header2.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            header2.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            header2.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            header2.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            header2.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            header2.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            header2.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Paragraph paragraph30 = new Paragraph() {RsidParagraphAddition = "0005059E", RsidRunAdditionDefault = "0005059E"};

            ParagraphProperties paragraphProperties11 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId5 = new ParagraphStyleId() {Val = "Header"};

            paragraphProperties11.Append(paragraphStyleId5);

            paragraph30.Append(paragraphProperties11);

            Paragraph paragraph31 = new Paragraph() {RsidParagraphAddition = "0005059E", RsidRunAdditionDefault = "0005059E"};

            ParagraphProperties paragraphProperties12 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId6 = new ParagraphStyleId() {Val = "Header"};

            paragraphProperties12.Append(paragraphStyleId6);

            paragraph31.Append(paragraphProperties12);

            header2.Append(paragraph30);
            header2.Append(paragraph31);

            headerPart2.Header = header2;
        }
Ejemplo n.º 12
0
        // Generates content of headerPart1.
        private void GenerateHeaderPart1Content(HeaderPart headerPart1)
        {
            Header header1 = new Header() {MCAttributes = new MarkupCompatibilityAttributes() {Ignorable = "w14 wp14"}};
            header1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            header1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            header1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            header1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            header1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            header1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            header1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            header1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            header1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            header1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            header1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            header1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            header1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            header1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            header1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Paragraph paragraph27 = new Paragraph()
                                    {
                                        RsidParagraphMarkRevision = "00442AD3",
                                        RsidParagraphAddition = "0005059E",
                                        RsidParagraphProperties = "00442AD3",
                                        RsidRunAdditionDefault = "0005059E"
                                    };

            ParagraphProperties paragraphProperties8 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId2 = new ParagraphStyleId() {Val = "Title"};

            ParagraphMarkRunProperties paragraphMarkRunProperties2 = new ParagraphMarkRunProperties();
            RunStyle runStyle1 = new RunStyle() {Val = "Strong"};

            paragraphMarkRunProperties2.Append(runStyle1);

            paragraphProperties8.Append(paragraphStyleId2);
            paragraphProperties8.Append(paragraphMarkRunProperties2);

            Run run43 = new Run();
            Text text28 = new Text();
            text28.Text = "Class name here";

            run43.Append(text28);

            paragraph27.Append(paragraphProperties8);
            paragraph27.Append(run43);

            header1.Append(paragraph27);

            headerPart1.Header = header1;
        }
        private static void GenerateHeaderPartContent(HeaderPart part)
        {
            var header1 = new Header() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } };

            var paragraph1 = new Paragraph() { RsidParagraphAddition = "00164C17", RsidRunAdditionDefault = "00164C17" };

            var paragraphProperties1 = new ParagraphProperties();
            var paragraphStyleId1 = new ParagraphStyleId() { Val = "Header" };

            paragraphProperties1.Append(paragraphStyleId1);

            var run1 = new Run();
            var text1 = new Text { Text = "Header" };

            run1.Append(text1);

            paragraph1.Append(paragraphProperties1);
            paragraph1.Append(run1);

            header1.Append(paragraph1);

            part.Header = header1;
        }
        // Generates content of headerPart1.
        private void GenerateHeaderPart1Content(HeaderPart headerPart1)
        {
            Header header1 = new Header() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } };
            header1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
            header1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
            header1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
            header1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            header1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
            header1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
            header1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
            header1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
            header1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
            header1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
            header1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
            header1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
            header1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
            header1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
            header1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");

            Paragraph paragraph113 = new Paragraph() { RsidParagraphAddition = "00963B42", RsidRunAdditionDefault = "00963B42" };

            ParagraphProperties paragraphProperties65 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId() { Val = "Header" };
            Justification justification10 = new Justification() { Val = JustificationValues.Right };

            paragraphProperties65.Append(paragraphStyleId1);
            paragraphProperties65.Append(justification10);

            paragraph113.Append(paragraphProperties65);

            Paragraph paragraph114 = new Paragraph() { RsidParagraphAddition = "00963B42", RsidRunAdditionDefault = "00963B42" };

            ParagraphProperties paragraphProperties66 = new ParagraphProperties();
            ParagraphStyleId paragraphStyleId2 = new ParagraphStyleId() { Val = "Header" };

            paragraphProperties66.Append(paragraphStyleId2);

            paragraph114.Append(paragraphProperties66);

            header1.Append(paragraph113);
            header1.Append(paragraph114);

            headerPart1.Header = header1;
        }