Exemple #1
0
        private static PresentationDocument BuildPresentationScaffold(PresentationDocument presentationDocument)
        {
            presentationDocument.DeletePartsRecursivelyOfType <PresentationPart>();
            presentationDocument.DeletePartsRecursivelyOfType <CoreFilePropertiesPart>();
            presentationDocument.DeletePartsRecursivelyOfType <ExtendedFilePropertiesPart>();

            presentationDocument.ChangeIdOfPart(presentationDocument.AddPresentationPart(), "rId1");
            PresentationBuilder.MakeValidPresentationPart(presentationDocument.PresentationPart);

            presentationDocument.ChangeIdOfPart(presentationDocument.AddCoreFilePropertiesPart(), "rId2");
            PresentationBuilder.MakeValidCoreFilePropertiesPart(presentationDocument.CoreFilePropertiesPart);

            presentationDocument.ChangeIdOfPart(presentationDocument.AddExtendedFilePropertiesPart(), "rId3");
            PresentationBuilder.MakeValidExtendedFilePropertiesPart(presentationDocument.ExtendedFilePropertiesPart);

            return(presentationDocument);
        }