예제 #1
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;
        }
 /// <summary>
 /// Loads the DOM from the DiagramLayoutDefinitionPart.
 /// </summary>
 /// <param name="openXmlPart">Specifies the part to be loaded.</param>
 public void Load(DiagramLayoutDefinitionPart openXmlPart)
 {
     LoadFromPart(openXmlPart);
 }
 /// <summary>
 /// LayoutDefinition constructor.
 /// </summary>
 /// <param name="ownerPart">The owner part of the LayoutDefinition.</param>
 internal LayoutDefinition(DiagramLayoutDefinitionPart ownerPart) : base (ownerPart )
 {
 }
 /// <summary>
 /// Saves the DOM into the DiagramLayoutDefinitionPart.
 /// </summary>
 /// <param name="openXmlPart">Specifies the part to save to.</param>
 public void Save(DiagramLayoutDefinitionPart openXmlPart)
 {
     base.SaveToPart(openXmlPart);
 }
        internal void FeedDataDiagramLayoutDefinitionPart(DiagramLayoutDefinitionPart NewPart, DiagramLayoutDefinitionPart ExistingPart)
        {
            using (StreamReader sr = new StreamReader(ExistingPart.GetStream()))
            {
                using (StreamWriter sw = new StreamWriter(NewPart.GetStream(FileMode.Create)))
                {
                    sw.Write(sr.ReadToEnd());
                }
            }

            ImagePart imgpNew;
            foreach (ImagePart imgp in ExistingPart.ImageParts)
            {
                imgpNew = NewPart.AddImagePart(imgp.ContentType, ExistingPart.GetIdOfPart(imgp));
                this.FeedDataImagePart(imgpNew, imgp);
            }
        }
        // Generates content of diagramLayoutDefinitionPart1.
        private void GenerateDiagramLayoutDefinitionPart1Content(DiagramLayoutDefinitionPart diagramLayoutDefinitionPart1)
        {
            Dgm.LayoutDefinition layoutDefinition1 = new Dgm.LayoutDefinition() { UniqueId = "urn:microsoft.com/office/officeart/2005/8/layout/default" };
            layoutDefinition1.AddNamespaceDeclaration("dgm", "http://schemas.openxmlformats.org/drawingml/2006/diagram");
            layoutDefinition1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");
            Dgm.Title title1 = new Dgm.Title() { Val = "" };
            Dgm.Description description1 = new Dgm.Description() { Val = "" };

            Dgm.CategoryList categoryList1 = new Dgm.CategoryList();
            Dgm.Category category1 = new Dgm.Category() { Type = "list", Priority = (UInt32Value)400U };

            categoryList1.Append(category1);

            Dgm.SampleData sampleData1 = new Dgm.SampleData();

            Dgm.DataModel dataModel1 = new Dgm.DataModel();

            Dgm.PointList pointList1 = new Dgm.PointList();
            Dgm.Point point1 = new Dgm.Point() { ModelId = "0", Type = Dgm.PointValues.Document };

            Dgm.Point point2 = new Dgm.Point() { ModelId = "1" };
            Dgm.PropertySet propertySet1 = new Dgm.PropertySet() { Placeholder = true };

            point2.Append(propertySet1);

            Dgm.Point point3 = new Dgm.Point() { ModelId = "2" };
            Dgm.PropertySet propertySet2 = new Dgm.PropertySet() { Placeholder = true };

            point3.Append(propertySet2);

            Dgm.Point point4 = new Dgm.Point() { ModelId = "3" };
            Dgm.PropertySet propertySet3 = new Dgm.PropertySet() { Placeholder = true };

            point4.Append(propertySet3);

            Dgm.Point point5 = new Dgm.Point() { ModelId = "4" };
            Dgm.PropertySet propertySet4 = new Dgm.PropertySet() { Placeholder = true };

            point5.Append(propertySet4);

            Dgm.Point point6 = new Dgm.Point() { ModelId = "5" };
            Dgm.PropertySet propertySet5 = new Dgm.PropertySet() { Placeholder = true };

            point6.Append(propertySet5);

            pointList1.Append(point1);
            pointList1.Append(point2);
            pointList1.Append(point3);
            pointList1.Append(point4);
            pointList1.Append(point5);
            pointList1.Append(point6);

            Dgm.ConnectionList connectionList1 = new Dgm.ConnectionList();
            Dgm.Connection connection1 = new Dgm.Connection() { ModelId = "6", SourceId = "0", DestinationId = "1", SourcePosition = (UInt32Value)0U, DestinationPosition = (UInt32Value)0U };
            Dgm.Connection connection2 = new Dgm.Connection() { ModelId = "7", SourceId = "0", DestinationId = "2", SourcePosition = (UInt32Value)1U, DestinationPosition = (UInt32Value)0U };
            Dgm.Connection connection3 = new Dgm.Connection() { ModelId = "8", SourceId = "0", DestinationId = "3", SourcePosition = (UInt32Value)2U, DestinationPosition = (UInt32Value)0U };
            Dgm.Connection connection4 = new Dgm.Connection() { ModelId = "9", SourceId = "0", DestinationId = "4", SourcePosition = (UInt32Value)3U, DestinationPosition = (UInt32Value)0U };
            Dgm.Connection connection5 = new Dgm.Connection() { ModelId = "10", SourceId = "0", DestinationId = "5", SourcePosition = (UInt32Value)4U, DestinationPosition = (UInt32Value)0U };

            connectionList1.Append(connection1);
            connectionList1.Append(connection2);
            connectionList1.Append(connection3);
            connectionList1.Append(connection4);
            connectionList1.Append(connection5);
            Dgm.Background background1 = new Dgm.Background();
            Dgm.Whole whole1 = new Dgm.Whole();

            dataModel1.Append(pointList1);
            dataModel1.Append(connectionList1);
            dataModel1.Append(background1);
            dataModel1.Append(whole1);

            sampleData1.Append(dataModel1);

            Dgm.StyleData styleData1 = new Dgm.StyleData();

            Dgm.DataModel dataModel2 = new Dgm.DataModel();

            Dgm.PointList pointList2 = new Dgm.PointList();
            Dgm.Point point7 = new Dgm.Point() { ModelId = "0", Type = Dgm.PointValues.Document };
            Dgm.Point point8 = new Dgm.Point() { ModelId = "1" };
            Dgm.Point point9 = new Dgm.Point() { ModelId = "2" };

            pointList2.Append(point7);
            pointList2.Append(point8);
            pointList2.Append(point9);

            Dgm.ConnectionList connectionList2 = new Dgm.ConnectionList();
            Dgm.Connection connection6 = new Dgm.Connection() { ModelId = "3", SourceId = "0", DestinationId = "1", SourcePosition = (UInt32Value)0U, DestinationPosition = (UInt32Value)0U };
            Dgm.Connection connection7 = new Dgm.Connection() { ModelId = "4", SourceId = "0", DestinationId = "2", SourcePosition = (UInt32Value)1U, DestinationPosition = (UInt32Value)0U };

            connectionList2.Append(connection6);
            connectionList2.Append(connection7);
            Dgm.Background background2 = new Dgm.Background();
            Dgm.Whole whole2 = new Dgm.Whole();

            dataModel2.Append(pointList2);
            dataModel2.Append(connectionList2);
            dataModel2.Append(background2);
            dataModel2.Append(whole2);

            styleData1.Append(dataModel2);

            Dgm.ColorData colorData1 = new Dgm.ColorData();

            Dgm.DataModel dataModel3 = new Dgm.DataModel();

            Dgm.PointList pointList3 = new Dgm.PointList();
            Dgm.Point point10 = new Dgm.Point() { ModelId = "0", Type = Dgm.PointValues.Document };
            Dgm.Point point11 = new Dgm.Point() { ModelId = "1" };
            Dgm.Point point12 = new Dgm.Point() { ModelId = "2" };
            Dgm.Point point13 = new Dgm.Point() { ModelId = "3" };
            Dgm.Point point14 = new Dgm.Point() { ModelId = "4" };
            Dgm.Point point15 = new Dgm.Point() { ModelId = "5" };
            Dgm.Point point16 = new Dgm.Point() { ModelId = "6" };

            pointList3.Append(point10);
            pointList3.Append(point11);
            pointList3.Append(point12);
            pointList3.Append(point13);
            pointList3.Append(point14);
            pointList3.Append(point15);
            pointList3.Append(point16);

            Dgm.ConnectionList connectionList3 = new Dgm.ConnectionList();
            Dgm.Connection connection8 = new Dgm.Connection() { ModelId = "7", SourceId = "0", DestinationId = "1", SourcePosition = (UInt32Value)0U, DestinationPosition = (UInt32Value)0U };
            Dgm.Connection connection9 = new Dgm.Connection() { ModelId = "8", SourceId = "0", DestinationId = "2", SourcePosition = (UInt32Value)1U, DestinationPosition = (UInt32Value)0U };
            Dgm.Connection connection10 = new Dgm.Connection() { ModelId = "9", SourceId = "0", DestinationId = "3", SourcePosition = (UInt32Value)2U, DestinationPosition = (UInt32Value)0U };
            Dgm.Connection connection11 = new Dgm.Connection() { ModelId = "10", SourceId = "0", DestinationId = "4", SourcePosition = (UInt32Value)3U, DestinationPosition = (UInt32Value)0U };
            Dgm.Connection connection12 = new Dgm.Connection() { ModelId = "11", SourceId = "0", DestinationId = "5", SourcePosition = (UInt32Value)4U, DestinationPosition = (UInt32Value)0U };
            Dgm.Connection connection13 = new Dgm.Connection() { ModelId = "12", SourceId = "0", DestinationId = "6", SourcePosition = (UInt32Value)5U, DestinationPosition = (UInt32Value)0U };

            connectionList3.Append(connection8);
            connectionList3.Append(connection9);
            connectionList3.Append(connection10);
            connectionList3.Append(connection11);
            connectionList3.Append(connection12);
            connectionList3.Append(connection13);
            Dgm.Background background3 = new Dgm.Background();
            Dgm.Whole whole3 = new Dgm.Whole();

            dataModel3.Append(pointList3);
            dataModel3.Append(connectionList3);
            dataModel3.Append(background3);
            dataModel3.Append(whole3);

            colorData1.Append(dataModel3);

            Dgm.LayoutNode layoutNode1 = new Dgm.LayoutNode() { Name = "diagram" };

            Dgm.VariableList variableList1 = new Dgm.VariableList();
            Dgm.Direction direction1 = new Dgm.Direction();
            Dgm.ResizeHandles resizeHandles1 = new Dgm.ResizeHandles() { Val = Dgm.ResizeHandlesStringValues.Exact };

            variableList1.Append(direction1);
            variableList1.Append(resizeHandles1);

            Dgm.Choose choose1 = new Dgm.Choose() { Name = "Name0" };

            Dgm.DiagramChooseIf diagramChooseIf1 = new Dgm.DiagramChooseIf() { Name = "Name1", Function = Dgm.FunctionValues.Variable, Argument = "dir", Operator = Dgm.FunctionOperatorValues.Equal, Val = "norm" };

            Dgm.Algorithm algorithm1 = new Dgm.Algorithm() { Type = Dgm.AlgorithmValues.Snake };
            Dgm.Parameter parameter1 = new Dgm.Parameter() { Type = Dgm.ParameterIdValues.GrowDirection, Val = "tL" };
            Dgm.Parameter parameter2 = new Dgm.Parameter() { Type = Dgm.ParameterIdValues.FlowDirection, Val = "row" };
            Dgm.Parameter parameter3 = new Dgm.Parameter() { Type = Dgm.ParameterIdValues.ContinueDirection, Val = "sameDir" };
            Dgm.Parameter parameter4 = new Dgm.Parameter() { Type = Dgm.ParameterIdValues.Offset, Val = "ctr" };

            algorithm1.Append(parameter1);
            algorithm1.Append(parameter2);
            algorithm1.Append(parameter3);
            algorithm1.Append(parameter4);

            diagramChooseIf1.Append(algorithm1);

            Dgm.DiagramChooseElse diagramChooseElse1 = new Dgm.DiagramChooseElse() { Name = "Name2" };

            Dgm.Algorithm algorithm2 = new Dgm.Algorithm() { Type = Dgm.AlgorithmValues.Snake };
            Dgm.Parameter parameter5 = new Dgm.Parameter() { Type = Dgm.ParameterIdValues.GrowDirection, Val = "tR" };
            Dgm.Parameter parameter6 = new Dgm.Parameter() { Type = Dgm.ParameterIdValues.FlowDirection, Val = "row" };
            Dgm.Parameter parameter7 = new Dgm.Parameter() { Type = Dgm.ParameterIdValues.ContinueDirection, Val = "sameDir" };
            Dgm.Parameter parameter8 = new Dgm.Parameter() { Type = Dgm.ParameterIdValues.Offset, Val = "ctr" };

            algorithm2.Append(parameter5);
            algorithm2.Append(parameter6);
            algorithm2.Append(parameter7);
            algorithm2.Append(parameter8);

            diagramChooseElse1.Append(algorithm2);

            choose1.Append(diagramChooseIf1);
            choose1.Append(diagramChooseElse1);

            Dgm.Shape shape3 = new Dgm.Shape() { Blip = "" };
            shape3.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            Dgm.AdjustList adjustList1 = new Dgm.AdjustList();

            shape3.Append(adjustList1);
            Dgm.PresentationOf presentationOf1 = new Dgm.PresentationOf();

            Dgm.Constraints constraints1 = new Dgm.Constraints();
            Dgm.Constraint constraint1 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.Width, For = Dgm.ConstraintRelationshipValues.Child, ForName = "node", ReferenceType = Dgm.ConstraintValues.Width };
            Dgm.Constraint constraint2 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.Height, For = Dgm.ConstraintRelationshipValues.Child, ForName = "node", ReferenceType = Dgm.ConstraintValues.Width, ReferenceFor = Dgm.ConstraintRelationshipValues.Child, ReferenceForName = "node", Fact = 0.6D };
            Dgm.Constraint constraint3 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.Width, For = Dgm.ConstraintRelationshipValues.Child, ForName = "sibTrans", ReferenceType = Dgm.ConstraintValues.Width, ReferenceFor = Dgm.ConstraintRelationshipValues.Child, ReferenceForName = "node", Fact = 0.1D };
            Dgm.Constraint constraint4 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.Spacing, ReferenceType = Dgm.ConstraintValues.Width, ReferenceFor = Dgm.ConstraintRelationshipValues.Child, ReferenceForName = "sibTrans" };
            Dgm.Constraint constraint5 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.PrimaryFontSize, For = Dgm.ConstraintRelationshipValues.Child, ForName = "node", Operator = Dgm.BoolOperatorValues.Equal, Val = 65D };

            constraints1.Append(constraint1);
            constraints1.Append(constraint2);
            constraints1.Append(constraint3);
            constraints1.Append(constraint4);
            constraints1.Append(constraint5);
            Dgm.RuleList ruleList1 = new Dgm.RuleList();

            Dgm.ForEach forEach1 = new Dgm.ForEach() { Name = "Name3", Axis = new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AxisValues>> { InnerText = "ch" }, PointType = new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>> { InnerText = "node" } };

            Dgm.LayoutNode layoutNode2 = new Dgm.LayoutNode() { Name = "node" };

            Dgm.VariableList variableList2 = new Dgm.VariableList();
            Dgm.BulletEnabled bulletEnabled1 = new Dgm.BulletEnabled() { Val = true };

            variableList2.Append(bulletEnabled1);
            Dgm.Algorithm algorithm3 = new Dgm.Algorithm() { Type = Dgm.AlgorithmValues.Text };

            Dgm.Shape shape4 = new Dgm.Shape() { Type = "rect", Blip = "" };
            shape4.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            Dgm.AdjustList adjustList2 = new Dgm.AdjustList();

            shape4.Append(adjustList2);
            Dgm.PresentationOf presentationOf2 = new Dgm.PresentationOf() { Axis = new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AxisValues>> { InnerText = "desOrSelf" }, PointType = new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>> { InnerText = "node" } };

            Dgm.Constraints constraints2 = new Dgm.Constraints();
            Dgm.Constraint constraint6 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.LeftMargin, ReferenceType = Dgm.ConstraintValues.PrimaryFontSize, Fact = 0.3D };
            Dgm.Constraint constraint7 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.RightMargin, ReferenceType = Dgm.ConstraintValues.PrimaryFontSize, Fact = 0.3D };
            Dgm.Constraint constraint8 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.TopMargin, ReferenceType = Dgm.ConstraintValues.PrimaryFontSize, Fact = 0.3D };
            Dgm.Constraint constraint9 = new Dgm.Constraint() { Type = Dgm.ConstraintValues.BottomMargin, ReferenceType = Dgm.ConstraintValues.PrimaryFontSize, Fact = 0.3D };

            constraints2.Append(constraint6);
            constraints2.Append(constraint7);
            constraints2.Append(constraint8);
            constraints2.Append(constraint9);

            Dgm.RuleList ruleList2 = new Dgm.RuleList();
            Dgm.Rule rule1 = new Dgm.Rule() { Type = Dgm.ConstraintValues.PrimaryFontSize, Val = 5D, Fact = new DoubleValue() { InnerText = "NaN" }, Max = new DoubleValue() { InnerText = "NaN" } };

            ruleList2.Append(rule1);

            layoutNode2.Append(variableList2);
            layoutNode2.Append(algorithm3);
            layoutNode2.Append(shape4);
            layoutNode2.Append(presentationOf2);
            layoutNode2.Append(constraints2);
            layoutNode2.Append(ruleList2);

            Dgm.ForEach forEach2 = new Dgm.ForEach() { Name = "Name4", Axis = new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.AxisValues>> { InnerText = "followSib" }, PointType = new ListValue<EnumValue<DocumentFormat.OpenXml.Drawing.Diagrams.ElementValues>> { InnerText = "sibTrans" }, Count = new ListValue<UInt32Value>() { InnerText = "1" } };

            Dgm.LayoutNode layoutNode3 = new Dgm.LayoutNode() { Name = "sibTrans" };
            Dgm.Algorithm algorithm4 = new Dgm.Algorithm() { Type = Dgm.AlgorithmValues.Space };

            Dgm.Shape shape5 = new Dgm.Shape() { Blip = "" };
            shape5.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
            Dgm.AdjustList adjustList3 = new Dgm.AdjustList();

            shape5.Append(adjustList3);
            Dgm.PresentationOf presentationOf3 = new Dgm.PresentationOf();
            Dgm.Constraints constraints3 = new Dgm.Constraints();
            Dgm.RuleList ruleList3 = new Dgm.RuleList();

            layoutNode3.Append(algorithm4);
            layoutNode3.Append(shape5);
            layoutNode3.Append(presentationOf3);
            layoutNode3.Append(constraints3);
            layoutNode3.Append(ruleList3);

            forEach2.Append(layoutNode3);

            forEach1.Append(layoutNode2);
            forEach1.Append(forEach2);

            layoutNode1.Append(variableList1);
            layoutNode1.Append(choose1);
            layoutNode1.Append(shape3);
            layoutNode1.Append(presentationOf1);
            layoutNode1.Append(constraints1);
            layoutNode1.Append(ruleList1);
            layoutNode1.Append(forEach1);

            layoutDefinition1.Append(title1);
            layoutDefinition1.Append(description1);
            layoutDefinition1.Append(categoryList1);
            layoutDefinition1.Append(sampleData1);
            layoutDefinition1.Append(styleData1);
            layoutDefinition1.Append(colorData1);
            layoutDefinition1.Append(layoutNode1);

            diagramLayoutDefinitionPart1.LayoutDefinition = layoutDefinition1;
        }