private void GetShapeVisualProperties(SlidePart slidePart, Picture picture) { base.VisualShapeProp = new PPTVisualPPTShapeProp(); if (picture.ShapeProperties.Transform2D != null) { base.VisualShapeProp.Extents = picture.ShapeProperties.Transform2D.Extents; base.VisualShapeProp.Offset = picture.ShapeProperties.Transform2D.Offset; string rId = picture.BlipFill.Blip.Embed.Value; ImagePart imagePart = (ImagePart)slidePart.GetPartById(rId); FileExtension = imagePart.Uri.OriginalString.Substring(imagePart.Uri.OriginalString.LastIndexOf(".") + 1).ToLower(); } else { ShapeTree shapeTree = slidePart.SlideLayoutPart.SlideLayout.CommonSlideData.ShapeTree; if (shapeTree != null) { var layoutShape = shapeTree.GetFirstChild <Picture>(); if (layoutShape.ShapeProperties.Transform2D != null) { VisualShapeProp.Extents = layoutShape.ShapeProperties.Transform2D.Extents; VisualShapeProp.Offset = layoutShape.ShapeProperties.Transform2D.Offset; } } //base.SetSlideLayoutVisualShapeProperties(slidePart,picture); } DocumentFormat.OpenXml.Drawing.EffectList effectList = picture.ShapeProperties.GetFirstChild <DocumentFormat.OpenXml.Drawing.EffectList>(); if (effectList != null) { recalculatePropertiesWithEffect(effectList); } }
static void Main(string[] args) { IDictionary <string, string> toReplace = new Dictionary <string, string>(); toReplace.Add("Sample2", "Sample - Text!"); toReplace.Add("Sample3", "Sample 3 - Text!"); using (PresentationDocument presentationDocument = PresentationDocument.Open("C:\\Users\\beggers\\Desktop\\Test.pptx", true)) { // Get the presentation part of the presentation document. PresentationPart presentationPart = presentationDocument.PresentationPart; // Verify that the presentation part and presentation exist. if (presentationPart != null && presentationPart.Presentation != null) { // Get the Presentation object from the presentation part. Presentation presentation = presentationPart.Presentation; // Verify that the slide ID list exists. if (presentation.SlideIdList != null) { int slideNo = 1; foreach (var slideId in presentation.SlideIdList.Elements <SlideId>()) { Console.WriteLine("Slide number: {0}", slideNo); SlidePart slidePart = presentationPart.GetPartById(slideId.RelationshipId) as SlidePart; ShapeTree tree = slidePart.Slide.CommonSlideData.ShapeTree; foreach (DocumentFormat.OpenXml.Presentation.Shape shape in tree.Elements <DocumentFormat.OpenXml.Presentation.Shape>()) { // Run through all the paragraphs in the document foreach (Paragraph paragraph in shape.Descendants().OfType <Paragraph>()) { foreach (DocumentFormat.OpenXml.Drawing.Run run in paragraph.Elements <Run>()) { foreach (var kvp in toReplace) { if (run.Text.InnerText.Contains(kvp.Key)) { run.Text = new DocumentFormat.OpenXml.Drawing.Text(kvp.Value); } } } } } slideNo++; } } } } Console.ReadLine(); }
public uint AddImageContents(ShapeTree shapeTree, uint ObjectID) { foreach (var imageContent in SlideContent.Images) { if (ImageIDMap.ContainsKey(imageContent.ImageFilePath)) { AddImageContent(shapeTree, ObjectID++, imageContent); } } return(ObjectID); }
private static void InsertNameAndDate(string pptxPath, string insertName, string insertDate) { using (PresentationDocument ppt = PresentationDocument.Open(pptxPath, true)) { if (ppt == null) { throw new ArgumentNullException("presentationDocument"); } PresentationPart part = ppt.PresentationPart; OpenXmlElementList slideIds = part.Presentation.SlideIdList.ChildElements; for (int index = 0; index < slideIds.Count(); index++) { // スライドを取得する string relId = (slideIds[index] as SlideId).RelationshipId; SlidePart slide = (SlidePart)part.GetPartById(relId); if (slide != null) { ShapeTree tree = slide.Slide.CommonSlideData.ShapeTree; //1番目の<s:sp>を取得する Shape shape = tree.GetFirstChild <Shape>(); if (shape != null) { TextBody textBody = shape.TextBody; IEnumerable <Drawing2.Paragraph> paragraphs = textBody.Descendants <Drawing2.Paragraph>(); foreach (Drawing2.Paragraph paragraph in paragraphs) { foreach (var text in paragraph.Descendants <Drawing2.Text>()) { if (text.Text.Contains("様邸")) { text.Text = insertName + text.Text; } else if (text.Text.Contains("年月日")) { text.Text = text.Text.Replace("年月日", insertDate); } } } } slide.Slide.Save(); } } } return; }
public void AddContent(ShapeTree shapeTree1, uint ObjectID, PPTXTable Content, Dictionary <string, string> HyperLinkIDMap) { GraphicFrame graphicFrame1 = new GraphicFrame(); AddTableCommonProperty(graphicFrame1, ObjectID); Transform transform1 = SlideWriterHelper.CreateTransform(Content.Transform); A.Graphic graphic1 = new A.Graphic(); A.GraphicData graphicData1 = new A.GraphicData() { Uri = "http://schemas.openxmlformats.org/drawingml/2006/table" }; A.Table table1 = new A.Table(); A.TableProperties tableProperties1 = new A.TableProperties() { FirstRow = true, BandRow = true }; A.TableStyleId tableStyleId1 = new A.TableStyleId(); tableStyleId1.Text = "{5C22544A-7EE6-4342-B048-85BDC9FD1C3A}"; tableProperties1.Append(tableStyleId1); table1.Append(tableProperties1); A.TableGrid tableGrid1 = new A.TableGrid(); foreach (var tableColumn in Content.Columns) { tableGrid1.Append(CreateColumn(tableColumn.Width)); } table1.Append(tableGrid1); foreach (var _tableRow in Content.Rows) { table1.Append(CreateRow(Content.Columns, _tableRow, HyperLinkIDMap)); } graphicData1.Append(table1); graphic1.Append(graphicData1); graphicFrame1.Append(transform1); graphicFrame1.Append(graphic1); shapeTree1.Append(graphicFrame1); }
protected void SetSlideLayoutVisualShapeProperties(SlidePart slidePart, Shape shape) { VisualShapeProp = new PPTVisualPPTShapeProp(); ShapeTree shapeTree = slidePart.SlideLayoutPart.SlideLayout.CommonSlideData.ShapeTree; if (shapeTree != null) { // var layoutShape = shapeTree.GetFirstChild<Shape>(); GetShapesPropFromMasterPartLayout(slidePart, shape, 1); fillPropertiesFromMasterShape(shape, false, false); } }
public void TestDrawLine() { var bytes = new byte[1024 * 4]; var format = Cairo.Format.ARGB32; var image = new Cairo.ImageSurface (bytes, format, 32, 32, 32 * 4); var shape = new LineShape (0.0, 0.0, 32.0, 32.0); var look = new Look (SolidBrush.Red, SolidPen.Black); var op = new ShapeTree (look, shape); using (var context = new Cairo.Context (image)) { op.Draw (context); } image.WriteToPng ("testimages/line.png"); image.Dispose (); }
public void AddImage_NegativeHeight_Throws() { PresentationDocument pres = PowerpointHelper.CreatePresentationWithOneEmptySlide("./testFileI3.pptx"); ShapeTree shapeTree = PowerpointHelper.GetShapeTreeOfFirstSlide(pres); GroupShape groupShape = PowerpointHelper.CreateGroupShape(50, 50, 50, 50); PowerpointHelper.AddElement(shapeTree, groupShape); Bitmap logo = Resx.klee; using (MemoryStream ms = new MemoryStream()) { logo.Save(ms, System.Drawing.Imaging.ImageFormat.Png); PowerpointHelper.AddImage(groupShape, ms, 50, 50, 50, -50); } }
public void TestBranchIteration() { var a = new EllipseShape (); var b = new RectangleShape (); var c = new LineShape (0.0, 0.0, 32.0, 32.0); var look = new Look (SolidBrush.Red, SolidPen.Black); var op = new ShapeTree (look, a); op.AddChild (look, b).AddChild (look, c); // Iterate through each member of the branch. var list = new List<ShapeBase> (); foreach (var item in op) { list.Add (item); } Assert.True (list[0] == b); Assert.True (list[1] == c); }
public void AddImage_Valid() { PresentationDocument pres = PowerpointHelper.CreatePresentationWithOneEmptySlide("./testFileI.pptx"); ShapeTree shapeTree = PowerpointHelper.GetShapeTreeOfFirstSlide(pres); GroupShape groupShape = PowerpointHelper.CreateGroupShape(50, 50, 50, 50); PowerpointHelper.AddElement(shapeTree, groupShape); Bitmap logo = Resx.klee; int oldNbPicture = groupShape.Descendants <Picture>().Count(); using (MemoryStream ms = new MemoryStream()) { logo.Save(ms, System.Drawing.Imaging.ImageFormat.Png); PowerpointHelper.AddImage(groupShape, ms, 50, 50, 50, 50); } Assert.IsTrue(groupShape.Descendants <Picture>().Count() - oldNbPicture == 1); }
public void AddElement_Valid() { PresentationDocument pres = PowerpointHelper.CreatePresentationWithOneEmptySlide("./testFile3.pptx"); ShapeTree shapeTree = PowerpointHelper.GetShapeTreeOfFirstSlide(pres); List <int[]> list = new List <int[]>(); list.Add(new int[] { 1, 2 }); list.Add(new int[] { 3, 4 }); list.Add(new int[] { 5, 6 }); Shape polygon = PowerpointHelper.CreatePolygon(list); PowerpointHelper.AddElement(shapeTree, polygon); var errors = validator.Validate(pres); Assert.IsTrue(errors.Count() == 0); Assert.IsTrue(shapeTree.Count() > 0); }
public void TestDrawEllipse() { var bytes = new byte[1024 * 4]; var format = Cairo.Format.ARGB32; var image = new Cairo.ImageSurface (bytes, format, 32, 32, 32 * 4); var shape = new EllipseShape (); shape.Rectangle = new Rectangle () { X = 10.0, Y = 4.0, Width = 12.0, Height = 18.0 }; var look = new Look (SolidBrush.Red, SolidPen.Black); var op = new ShapeTree (look, shape); using (var context = new Cairo.Context (image)) { op.Draw (context); } image.WriteToPng ("testimages/ellipse.png"); image.Dispose (); }
/// <summary> /// Change the fill color of a shape, docName must have a filled shape as the first shape on the first slide. /// </summary> /// <param name="docName">path to the file</param> public static void SetPPTShapeColor(string docName) { using (PresentationDocument ppt = PresentationDocument.Open(docName, true)) { // Get the relationship ID of the first slide. PresentationPart part = ppt.PresentationPart; OpenXmlElementList slideIds = part.Presentation.SlideIdList.ChildElements; string relId = (slideIds[0] as SlideId).RelationshipId; // Get the slide part from the relationship ID. SlidePart slide = (SlidePart)part.GetPartById(relId); if (slide != null) { // Get the shape tree that contains the shape to change. ShapeTree tree = slide.Slide.CommonSlideData.ShapeTree; // Get the first shape in the shape tree. PShape shape = tree.GetFirstChild <PShape>(); if (shape != null) { // Get the style of the shape. ShapeStyle style = shape.ShapeStyle; // Get the fill reference. FillReference fillRef = style.FillReference; // Set the fill color to SchemeColor Accent 6; fillRef.SchemeColor = new SchemeColor { Val = SchemeColorValues.Accent6 }; // Save the modified slide. slide.Slide.Save(); } } } }
public static UInt32Value GetMaxId(ShapeTree tree) { var maxid = (uint)tree.ChildElements.Count; if (tree.ChildElements.Count > 0) { foreach (var child in tree.ChildElements) { if (child is Shape shape) { if (shape?.NonVisualShapeProperties?.NonVisualDrawingProperties?.Id != null) { var id = UInt32Value.ToUInt32(shape?.NonVisualShapeProperties?.NonVisualDrawingProperties?.Id); if (id > maxid) { maxid = id; } } } } } return(maxid); }
private void SetConnectionShapeVisualProperties(SlidePart slidePart, ConnectionShape connectionShape) { base.VisualShapeProp = new PPTVisualPPTShapeProp(); if (connectionShape.ShapeProperties.Transform2D != null) { base.VisualShapeProp.Extents = connectionShape.ShapeProperties.Transform2D.Extents; base.VisualShapeProp.Offset = connectionShape.ShapeProperties.Transform2D.Offset; } else { ShapeTree shapeTree = slidePart.SlideLayoutPart.SlideLayout.CommonSlideData.ShapeTree; ConnectionShape layoutShape; if (shapeTree != null) { layoutShape = shapeTree.GetFirstChild <ConnectionShape>(); if (layoutShape.ShapeProperties.Transform2D != null) { base.VisualShapeProp.Extents = layoutShape.ShapeProperties.Transform2D.Extents; base.VisualShapeProp.Offset = layoutShape.ShapeProperties.Transform2D.Offset; } } } }
public override SlideLayoutPart CreateSlideLayoutPart(OpenXmlPartContainer containerPart) { SlideLayoutPart slideLayoutPart = containerPart.AddNewPart <SlideLayoutPart>(LayoutSetting.ID); SlideLayout slideLayout7 = new SlideLayout() { Type = SlideLayoutValues.VerticalTitleAndText, Preserve = true }; slideLayout7.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); slideLayout7.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); slideLayout7.AddNamespaceDeclaration("p", "http://schemas.openxmlformats.org/presentationml/2006/main"); CommonSlideData commonSlideData9 = new CommonSlideData() { Name = LayoutSetting.Name }; ShapeTree shapeTree9 = new ShapeTree(); NonVisualGroupShapeProperties nonVisualGroupShapeProperties9 = new NonVisualGroupShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties44 = new NonVisualDrawingProperties() { Id = (UInt32Value)1U, Name = "" }; NonVisualGroupShapeDrawingProperties nonVisualGroupShapeDrawingProperties9 = new NonVisualGroupShapeDrawingProperties(); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties44 = new ApplicationNonVisualDrawingProperties(); nonVisualGroupShapeProperties9.Append(nonVisualDrawingProperties44); nonVisualGroupShapeProperties9.Append(nonVisualGroupShapeDrawingProperties9); nonVisualGroupShapeProperties9.Append(applicationNonVisualDrawingProperties44); GroupShapeProperties groupShapeProperties9 = new GroupShapeProperties(); A.TransformGroup transformGroup9 = new A.TransformGroup(); A.Offset offset21 = new A.Offset() { X = 0L, Y = 0L }; A.Extents extents21 = new A.Extents() { Cx = 0L, Cy = 0L }; A.ChildOffset childOffset9 = new A.ChildOffset() { X = 0L, Y = 0L }; A.ChildExtents childExtents9 = new A.ChildExtents() { Cx = 0L, Cy = 0L }; transformGroup9.Append(offset21); transformGroup9.Append(extents21); transformGroup9.Append(childOffset9); transformGroup9.Append(childExtents9); groupShapeProperties9.Append(transformGroup9); Shape shape36 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties36 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties45 = new NonVisualDrawingProperties() { Id = (UInt32Value)2U, Name = "Vertical Title 1" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties36 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks36 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties36.Append(shapeLocks36); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties45 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape36 = new PlaceholderShape() { Type = PlaceholderValues.Title, Orientation = DirectionValues.Vertical }; applicationNonVisualDrawingProperties45.Append(placeholderShape36); nonVisualShapeProperties36.Append(nonVisualDrawingProperties45); nonVisualShapeProperties36.Append(nonVisualShapeDrawingProperties36); nonVisualShapeProperties36.Append(applicationNonVisualDrawingProperties45); ShapeProperties shapeProperties36 = new ShapeProperties(); A.Transform2D transform2D13 = new A.Transform2D(); A.Offset offset22 = new A.Offset() { X = 6543675L, Y = 365125L }; A.Extents extents22 = new A.Extents() { Cx = 1971675L, Cy = 5811838L }; transform2D13.Append(offset22); transform2D13.Append(extents22); shapeProperties36.Append(transform2D13); TextBody textBody36 = new TextBody(); A.BodyProperties bodyProperties36 = new A.BodyProperties() { Vertical = A.TextVerticalValues.EastAsianVetical }; A.ListStyle listStyle36 = new A.ListStyle(); A.Paragraph paragraph48 = new A.Paragraph(); A.Run run51 = new A.Run(); A.RunProperties runProperties65 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text65 = new A.Text(); text65.Text = "マスター タイトルの書式設定"; run51.Append(runProperties65); run51.Append(text65); A.EndParagraphRunProperties endParagraphRunProperties32 = new A.EndParagraphRunProperties() { Language = "en-US", Dirty = false }; paragraph48.Append(run51); paragraph48.Append(endParagraphRunProperties32); textBody36.Append(bodyProperties36); textBody36.Append(listStyle36); textBody36.Append(paragraph48); shape36.Append(nonVisualShapeProperties36); shape36.Append(shapeProperties36); shape36.Append(textBody36); Shape shape37 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties37 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties46 = new NonVisualDrawingProperties() { Id = (UInt32Value)3U, Name = "Vertical Text Placeholder 2" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties37 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks37 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties37.Append(shapeLocks37); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties46 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape37 = new PlaceholderShape() { Type = PlaceholderValues.Body, Orientation = DirectionValues.Vertical, Index = (UInt32Value)1U }; applicationNonVisualDrawingProperties46.Append(placeholderShape37); nonVisualShapeProperties37.Append(nonVisualDrawingProperties46); nonVisualShapeProperties37.Append(nonVisualShapeDrawingProperties37); nonVisualShapeProperties37.Append(applicationNonVisualDrawingProperties46); ShapeProperties shapeProperties37 = new ShapeProperties(); A.Transform2D transform2D14 = new A.Transform2D(); A.Offset offset23 = new A.Offset() { X = 628650L, Y = 365125L }; A.Extents extents23 = new A.Extents() { Cx = 5800725L, Cy = 5811838L }; transform2D14.Append(offset23); transform2D14.Append(extents23); shapeProperties37.Append(transform2D14); TextBody textBody37 = new TextBody(); A.BodyProperties bodyProperties37 = new A.BodyProperties() { Vertical = A.TextVerticalValues.EastAsianVetical }; A.ListStyle listStyle37 = new A.ListStyle(); A.Paragraph paragraph49 = new A.Paragraph(); A.ParagraphProperties paragraphProperties18 = new A.ParagraphProperties() { Level = 0 }; A.Run run52 = new A.Run(); A.RunProperties runProperties66 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text66 = new A.Text(); text66.Text = "マスター テキストの書式設定"; run52.Append(runProperties66); run52.Append(text66); paragraph49.Append(paragraphProperties18); paragraph49.Append(run52); A.Paragraph paragraph50 = new A.Paragraph(); A.ParagraphProperties paragraphProperties19 = new A.ParagraphProperties() { Level = 1 }; A.Run run53 = new A.Run(); A.RunProperties runProperties67 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text67 = new A.Text(); text67.Text = "第 "; run53.Append(runProperties67); run53.Append(text67); A.Run run54 = new A.Run(); A.RunProperties runProperties68 = new A.RunProperties() { Language = "en-US", AlternativeLanguage = "ja-JP" }; A.Text text68 = new A.Text(); text68.Text = "2 "; run54.Append(runProperties68); run54.Append(text68); A.Run run55 = new A.Run(); A.RunProperties runProperties69 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text69 = new A.Text(); text69.Text = "レベル"; run55.Append(runProperties69); run55.Append(text69); paragraph50.Append(paragraphProperties19); paragraph50.Append(run53); paragraph50.Append(run54); paragraph50.Append(run55); A.Paragraph paragraph51 = new A.Paragraph(); A.ParagraphProperties paragraphProperties20 = new A.ParagraphProperties() { Level = 2 }; A.Run run56 = new A.Run(); A.RunProperties runProperties70 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text70 = new A.Text(); text70.Text = "第 "; run56.Append(runProperties70); run56.Append(text70); A.Run run57 = new A.Run(); A.RunProperties runProperties71 = new A.RunProperties() { Language = "en-US", AlternativeLanguage = "ja-JP" }; A.Text text71 = new A.Text(); text71.Text = "3 "; run57.Append(runProperties71); run57.Append(text71); A.Run run58 = new A.Run(); A.RunProperties runProperties72 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text72 = new A.Text(); text72.Text = "レベル"; run58.Append(runProperties72); run58.Append(text72); paragraph51.Append(paragraphProperties20); paragraph51.Append(run56); paragraph51.Append(run57); paragraph51.Append(run58); A.Paragraph paragraph52 = new A.Paragraph(); A.ParagraphProperties paragraphProperties21 = new A.ParagraphProperties() { Level = 3 }; A.Run run59 = new A.Run(); A.RunProperties runProperties73 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text73 = new A.Text(); text73.Text = "第 "; run59.Append(runProperties73); run59.Append(text73); A.Run run60 = new A.Run(); A.RunProperties runProperties74 = new A.RunProperties() { Language = "en-US", AlternativeLanguage = "ja-JP" }; A.Text text74 = new A.Text(); text74.Text = "4 "; run60.Append(runProperties74); run60.Append(text74); A.Run run61 = new A.Run(); A.RunProperties runProperties75 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text75 = new A.Text(); text75.Text = "レベル"; run61.Append(runProperties75); run61.Append(text75); paragraph52.Append(paragraphProperties21); paragraph52.Append(run59); paragraph52.Append(run60); paragraph52.Append(run61); A.Paragraph paragraph53 = new A.Paragraph(); A.ParagraphProperties paragraphProperties22 = new A.ParagraphProperties() { Level = 4 }; A.Run run62 = new A.Run(); A.RunProperties runProperties76 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text76 = new A.Text(); text76.Text = "第 "; run62.Append(runProperties76); run62.Append(text76); A.Run run63 = new A.Run(); A.RunProperties runProperties77 = new A.RunProperties() { Language = "en-US", AlternativeLanguage = "ja-JP" }; A.Text text77 = new A.Text(); text77.Text = "5 "; run63.Append(runProperties77); run63.Append(text77); A.Run run64 = new A.Run(); A.RunProperties runProperties78 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text78 = new A.Text(); text78.Text = "レベル"; run64.Append(runProperties78); run64.Append(text78); A.EndParagraphRunProperties endParagraphRunProperties33 = new A.EndParagraphRunProperties() { Language = "en-US", Dirty = false }; paragraph53.Append(paragraphProperties22); paragraph53.Append(run62); paragraph53.Append(run63); paragraph53.Append(run64); paragraph53.Append(endParagraphRunProperties33); textBody37.Append(bodyProperties37); textBody37.Append(listStyle37); textBody37.Append(paragraph49); textBody37.Append(paragraph50); textBody37.Append(paragraph51); textBody37.Append(paragraph52); textBody37.Append(paragraph53); shape37.Append(nonVisualShapeProperties37); shape37.Append(shapeProperties37); shape37.Append(textBody37); Shape shape38 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties38 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties47 = new NonVisualDrawingProperties() { Id = (UInt32Value)4U, Name = "Date Placeholder 3" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties38 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks38 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties38.Append(shapeLocks38); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties47 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape38 = new PlaceholderShape() { Type = PlaceholderValues.DateAndTime, Size = PlaceholderSizeValues.Half, Index = (UInt32Value)10U }; applicationNonVisualDrawingProperties47.Append(placeholderShape38); nonVisualShapeProperties38.Append(nonVisualDrawingProperties47); nonVisualShapeProperties38.Append(nonVisualShapeDrawingProperties38); nonVisualShapeProperties38.Append(applicationNonVisualDrawingProperties47); ShapeProperties shapeProperties38 = new ShapeProperties(); TextBody textBody38 = new TextBody(); A.BodyProperties bodyProperties38 = new A.BodyProperties(); A.ListStyle listStyle38 = new A.ListStyle(); A.Paragraph paragraph54 = new A.Paragraph(); A.Field field15 = new A.Field() { Id = "{BFFF7C5F-97F4-4B42-9C39-61661A529470}", Type = "datetimeFigureOut" }; A.RunProperties runProperties79 = new A.RunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; runProperties79.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.Text text79 = new A.Text(); text79.Text = "2018/5/3"; field15.Append(runProperties79); field15.Append(text79); A.EndParagraphRunProperties endParagraphRunProperties34 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph54.Append(field15); paragraph54.Append(endParagraphRunProperties34); textBody38.Append(bodyProperties38); textBody38.Append(listStyle38); textBody38.Append(paragraph54); shape38.Append(nonVisualShapeProperties38); shape38.Append(shapeProperties38); shape38.Append(textBody38); Shape shape39 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties39 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties48 = new NonVisualDrawingProperties() { Id = (UInt32Value)5U, Name = "Footer Placeholder 4" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties39 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks39 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties39.Append(shapeLocks39); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties48 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape39 = new PlaceholderShape() { Type = PlaceholderValues.Footer, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)11U }; applicationNonVisualDrawingProperties48.Append(placeholderShape39); nonVisualShapeProperties39.Append(nonVisualDrawingProperties48); nonVisualShapeProperties39.Append(nonVisualShapeDrawingProperties39); nonVisualShapeProperties39.Append(applicationNonVisualDrawingProperties48); ShapeProperties shapeProperties39 = new ShapeProperties(); TextBody textBody39 = new TextBody(); A.BodyProperties bodyProperties39 = new A.BodyProperties(); A.ListStyle listStyle39 = new A.ListStyle(); A.Paragraph paragraph55 = new A.Paragraph(); A.EndParagraphRunProperties endParagraphRunProperties35 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph55.Append(endParagraphRunProperties35); textBody39.Append(bodyProperties39); textBody39.Append(listStyle39); textBody39.Append(paragraph55); shape39.Append(nonVisualShapeProperties39); shape39.Append(shapeProperties39); shape39.Append(textBody39); Shape shape40 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties40 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties49 = new NonVisualDrawingProperties() { Id = (UInt32Value)6U, Name = "Slide Number Placeholder 5" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties40 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks40 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties40.Append(shapeLocks40); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties49 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape40 = new PlaceholderShape() { Type = PlaceholderValues.SlideNumber, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)12U }; applicationNonVisualDrawingProperties49.Append(placeholderShape40); nonVisualShapeProperties40.Append(nonVisualDrawingProperties49); nonVisualShapeProperties40.Append(nonVisualShapeDrawingProperties40); nonVisualShapeProperties40.Append(applicationNonVisualDrawingProperties49); ShapeProperties shapeProperties40 = new ShapeProperties(); TextBody textBody40 = new TextBody(); A.BodyProperties bodyProperties40 = new A.BodyProperties(); A.ListStyle listStyle40 = new A.ListStyle(); A.Paragraph paragraph56 = new A.Paragraph(); A.Field field16 = new A.Field() { Id = "{10647DAF-1A54-42E0-9176-57F2D0EA6A3B}", Type = "slidenum" }; A.RunProperties runProperties80 = new A.RunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; runProperties80.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.Text text80 = new A.Text(); text80.Text = "‹#›"; field16.Append(runProperties80); field16.Append(text80); A.EndParagraphRunProperties endParagraphRunProperties36 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph56.Append(field16); paragraph56.Append(endParagraphRunProperties36); textBody40.Append(bodyProperties40); textBody40.Append(listStyle40); textBody40.Append(paragraph56); shape40.Append(nonVisualShapeProperties40); shape40.Append(shapeProperties40); shape40.Append(textBody40); shapeTree9.Append(nonVisualGroupShapeProperties9); shapeTree9.Append(groupShapeProperties9); shapeTree9.Append(shape36); shapeTree9.Append(shape37); shapeTree9.Append(shape38); shapeTree9.Append(shape39); shapeTree9.Append(shape40); CommonSlideDataExtensionList commonSlideDataExtensionList9 = new CommonSlideDataExtensionList(); CommonSlideDataExtension commonSlideDataExtension9 = new CommonSlideDataExtension() { Uri = "{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}" }; P14.CreationId creationId9 = new P14.CreationId() { Val = (UInt32Value)3329082938U }; creationId9.AddNamespaceDeclaration("p14", "http://schemas.microsoft.com/office/powerpoint/2010/main"); commonSlideDataExtension9.Append(creationId9); commonSlideDataExtensionList9.Append(commonSlideDataExtension9); commonSlideData9.Append(shapeTree9); commonSlideData9.Append(commonSlideDataExtensionList9); ColorMapOverride colorMapOverride8 = new ColorMapOverride(); A.MasterColorMapping masterColorMapping8 = new A.MasterColorMapping(); colorMapOverride8.Append(masterColorMapping8); slideLayout7.Append(commonSlideData9); slideLayout7.Append(colorMapOverride8); slideLayoutPart.SlideLayout = slideLayout7; return(slideLayoutPart); }
public void AddVideo(SlidePart slidepart, string videoFilePath, string videoCoverPath, D.Transform2D transform) { Slide slide = slidepart.Slide; ShapeTree shapeTree1 = slidepart.Slide.CommonSlideData.ShapeTree; var ptrlid = Doc.PresentationPart.GetIdOfPart(slidepart); var picID = AnalysisHelper.GetMaxId(shapeTree1); string imgEmbedId = string.Format("imgId{0}{1}{2}", ptrlid, picID, 1); string videoEmbedId = string.Format("vidId{0}{1}{2}", ptrlid, picID, 2); string mediaEmbedId = string.Format("medId{0}{1}{2}", ptrlid, picID, 3); Picture picture1 = new Picture(); NonVisualPictureProperties nonVisualPictureProperties1 = new NonVisualPictureProperties(); NonVisualDrawingProperties nonVisualDrawingProperties2 = new NonVisualDrawingProperties() { Id = (UInt32Value)3U, Name = videoEmbedId + "" }; D.HyperlinkOnClick hyperlinkOnClick1 = new D.HyperlinkOnClick() { Id = "", Action = "ppaction://media" }; nonVisualDrawingProperties2.Append(hyperlinkOnClick1); NonVisualPictureDrawingProperties nonVisualPictureDrawingProperties1 = new NonVisualPictureDrawingProperties(); D.PictureLocks pictureLocks1 = new D.PictureLocks() { NoChangeAspect = true }; nonVisualPictureDrawingProperties1.Append(pictureLocks1); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties2 = new ApplicationNonVisualDrawingProperties(); D.VideoFromFile videoFromFile1 = new D.VideoFromFile() { Link = videoEmbedId }; ApplicationNonVisualDrawingPropertiesExtensionList applicationNonVisualDrawingPropertiesExtensionList1 = new ApplicationNonVisualDrawingPropertiesExtensionList(); ApplicationNonVisualDrawingPropertiesExtension applicationNonVisualDrawingPropertiesExtension1 = new ApplicationNonVisualDrawingPropertiesExtension() { Uri = "{DAA4B4D4-6D71-4841-9C94-3DE7FCFB9230}" }; P14.Media media1 = new P14.Media() { Embed = mediaEmbedId }; media1.AddNamespaceDeclaration("p14", "http://schemas.microsoft.com/office/powerpoint/2010/main"); applicationNonVisualDrawingPropertiesExtension1.Append(media1); applicationNonVisualDrawingPropertiesExtensionList1.Append(applicationNonVisualDrawingPropertiesExtension1); applicationNonVisualDrawingProperties2.Append(videoFromFile1); applicationNonVisualDrawingProperties2.Append(applicationNonVisualDrawingPropertiesExtensionList1); nonVisualPictureProperties1.Append(nonVisualDrawingProperties2); nonVisualPictureProperties1.Append(nonVisualPictureDrawingProperties1); nonVisualPictureProperties1.Append(applicationNonVisualDrawingProperties2); BlipFill blipFill1 = new BlipFill(); D.Blip blip1 = new D.Blip() { Embed = imgEmbedId }; D.Stretch stretch1 = new D.Stretch(); D.FillRectangle fillRectangle1 = new D.FillRectangle(); stretch1.Append(fillRectangle1); blipFill1.Append(blip1); blipFill1.Append(stretch1); ShapeProperties shapeProperties1 = new ShapeProperties(); D.PresetGeometry presetGeometry1 = new D.PresetGeometry() { Preset = D.ShapeTypeValues.Rectangle }; D.AdjustValueList adjustValueList1 = new D.AdjustValueList(); presetGeometry1.Append(adjustValueList1); shapeProperties1.Append(transform); shapeProperties1.Append(presetGeometry1); picture1.Append(nonVisualPictureProperties1); picture1.Append(blipFill1); picture1.Append(shapeProperties1); shapeTree1.Append(picture1); if (!(slide.Timing?.ChildElements?.Count > 0)) { AnalysisHelper.InitTiming(slide); } ImagePart imagePart = slidepart.AddImagePart(AnalysisHelper.GetImagePartType(videoCoverPath), imgEmbedId); using (var data = File.OpenRead(videoCoverPath)) { imagePart.FeedData(data); }; Doc.PartExtensionProvider.AddPartExtension("video/mp4", ".mp4"); MediaDataPart mediaDataPart1 = Doc.CreateMediaDataPart("video/mp4", ".mp4"); using (System.IO.Stream mediaDataPart1Stream = File.OpenRead(videoFilePath)) { mediaDataPart1.FeedData(mediaDataPart1Stream); } slidepart.AddVideoReferenceRelationship(mediaDataPart1, videoEmbedId); slidepart.AddMediaReferenceRelationship(mediaDataPart1, mediaEmbedId); slide.Save(); }
/// <summary> /// 添加文本 /// </summary> private Shape AddText(ShapeTree tree, string text, PPTTextStyle textStyle, D.Transform2D transform) { //Picture Shape textShape = tree.AppendChild(new Shape()); uint maxid = AnalysisHelper.GetMaxId(tree); textShape.NonVisualShapeProperties = new P.NonVisualShapeProperties ( new P.NonVisualDrawingProperties() { Id = maxid + 1, Name = $"TEXT{maxid + 1}" }, new P.NonVisualShapeDrawingProperties ( new D.ShapeLocks() { NoGrouping = true } ), new ApplicationNonVisualDrawingProperties ( new PlaceholderShape() { Type = PlaceholderValues.Body } ) ); //位置 textShape.ShapeProperties = new ShapeProperties() { Transform2D = transform }; textShape.TextBody = new TextBody( new D.BodyProperties(), new D.ListStyle(), new D.Paragraph(new D.Run() { Text = new D.Text() { Text = text }, RunProperties = new D.RunProperties ( new D.SolidFill() { RgbColorModelHex = new D.RgbColorModelHex() { Val = HexBinaryValue.FromString(textStyle.Color.Replace("#", "")) } } ) { FontSize = (int)(textStyle.FontSize * 100), //20*100 字号20 Underline = textStyle.IsUnderline ? D.TextUnderlineValues.Single : D.TextUnderlineValues.None, Italic = textStyle.IsItalic, Bold = textStyle.IsBold, AlternativeLanguage = "zh-CN", Language = "en-US", Kumimoji = true, Dirty = false, SpellingError = false }, }, new D.EndParagraphRunProperties( new D.SolidFill() { RgbColorModelHex = new D.RgbColorModelHex() { Val = HexBinaryValue.FromString(textStyle.Color.Replace("#", "")) } } ) { FontSize = (int)(textStyle.FontSize * 100), //20*100 字号20 Underline = textStyle.IsUnderline ? D.TextUnderlineValues.Single : D.TextUnderlineValues.None, Italic = textStyle.IsItalic, Bold = textStyle.IsBold, AlternativeLanguage = "zh-CN", Language = "en-US", Kumimoji = true, Dirty = false, SpellingError = false } )); return(textShape); }
public override SlideLayoutPart CreateSlideLayoutPart(OpenXmlPartContainer containerPart) { SlideLayoutPart slideLayoutPart1 = containerPart.AddNewPart <SlideLayoutPart>(LayoutSetting.ID); SlideLayout slideLayout1 = new SlideLayout() { Type = SlideLayoutValues.Title, Preserve = true }; slideLayout1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); slideLayout1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); slideLayout1.AddNamespaceDeclaration("p", "http://schemas.openxmlformats.org/presentationml/2006/main"); CommonSlideData commonSlideData2 = new CommonSlideData() { Name = LayoutSetting.Name }; ShapeTree shapeTree2 = new ShapeTree(); NonVisualGroupShapeProperties nonVisualGroupShapeProperties2 = new NonVisualGroupShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties4 = new NonVisualDrawingProperties() { Id = (UInt32Value)1U, Name = "" }; NonVisualGroupShapeDrawingProperties nonVisualGroupShapeDrawingProperties2 = new NonVisualGroupShapeDrawingProperties(); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties4 = new ApplicationNonVisualDrawingProperties(); nonVisualGroupShapeProperties2.Append(nonVisualDrawingProperties4); nonVisualGroupShapeProperties2.Append(nonVisualGroupShapeDrawingProperties2); nonVisualGroupShapeProperties2.Append(applicationNonVisualDrawingProperties4); GroupShapeProperties groupShapeProperties2 = new GroupShapeProperties(); A.TransformGroup transformGroup2 = new A.TransformGroup(); A.Offset offset2 = new A.Offset() { X = 0L, Y = 0L }; A.Extents extents2 = new A.Extents() { Cx = 0L, Cy = 0L }; A.ChildOffset childOffset2 = new A.ChildOffset() { X = 0L, Y = 0L }; A.ChildExtents childExtents2 = new A.ChildExtents() { Cx = 0L, Cy = 0L }; transformGroup2.Append(offset2); transformGroup2.Append(extents2); transformGroup2.Append(childOffset2); transformGroup2.Append(childExtents2); groupShapeProperties2.Append(transformGroup2); Shape shape3 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties3 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties5 = new NonVisualDrawingProperties() { Id = (UInt32Value)2U, Name = "Title 1" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties3 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks3 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties3.Append(shapeLocks3); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties5 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape3 = new PlaceholderShape() { Type = PlaceholderValues.CenteredTitle }; applicationNonVisualDrawingProperties5.Append(placeholderShape3); nonVisualShapeProperties3.Append(nonVisualDrawingProperties5); nonVisualShapeProperties3.Append(nonVisualShapeDrawingProperties3); nonVisualShapeProperties3.Append(applicationNonVisualDrawingProperties5); ShapeProperties shapeProperties3 = new ShapeProperties(); A.Transform2D transform2D1 = new A.Transform2D(); A.Offset offset3 = new A.Offset() { X = 685800L, Y = 1122363L }; A.Extents extents3 = new A.Extents() { Cx = 7772400L, Cy = 2387600L }; transform2D1.Append(offset3); transform2D1.Append(extents3); shapeProperties3.Append(transform2D1); TextBody textBody3 = new TextBody(); A.BodyProperties bodyProperties3 = new A.BodyProperties() { Anchor = A.TextAnchoringTypeValues.Bottom }; A.ListStyle listStyle3 = new A.ListStyle(); A.Level1ParagraphProperties level1ParagraphProperties1 = new A.Level1ParagraphProperties() { Alignment = A.TextAlignmentTypeValues.Center }; A.DefaultRunProperties defaultRunProperties1 = new A.DefaultRunProperties() { FontSize = 6000 }; level1ParagraphProperties1.Append(defaultRunProperties1); listStyle3.Append(level1ParagraphProperties1); A.Paragraph paragraph3 = new A.Paragraph(); A.Run run3 = new A.Run(); A.RunProperties runProperties3 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text3 = new A.Text(); text3.Text = "マスター タイトルの書式設定"; run3.Append(runProperties3); run3.Append(text3); A.EndParagraphRunProperties endParagraphRunProperties1 = new A.EndParagraphRunProperties() { Language = "en-US", Dirty = false }; paragraph3.Append(run3); paragraph3.Append(endParagraphRunProperties1); textBody3.Append(bodyProperties3); textBody3.Append(listStyle3); textBody3.Append(paragraph3); shape3.Append(nonVisualShapeProperties3); shape3.Append(shapeProperties3); shape3.Append(textBody3); Shape shape4 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties4 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties6 = new NonVisualDrawingProperties() { Id = (UInt32Value)3U, Name = "Subtitle 2" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties4 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks4 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties4.Append(shapeLocks4); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties6 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape4 = new PlaceholderShape() { Type = PlaceholderValues.SubTitle, Index = (UInt32Value)1U }; applicationNonVisualDrawingProperties6.Append(placeholderShape4); nonVisualShapeProperties4.Append(nonVisualDrawingProperties6); nonVisualShapeProperties4.Append(nonVisualShapeDrawingProperties4); nonVisualShapeProperties4.Append(applicationNonVisualDrawingProperties6); ShapeProperties shapeProperties4 = new ShapeProperties(); A.Transform2D transform2D2 = new A.Transform2D(); A.Offset offset4 = new A.Offset() { X = 1143000L, Y = 3602038L }; A.Extents extents4 = new A.Extents() { Cx = 6858000L, Cy = 1655762L }; transform2D2.Append(offset4); transform2D2.Append(extents4); shapeProperties4.Append(transform2D2); TextBody textBody4 = new TextBody(); A.BodyProperties bodyProperties4 = new A.BodyProperties(); A.ListStyle listStyle4 = new A.ListStyle(); A.Level1ParagraphProperties level1ParagraphProperties2 = new A.Level1ParagraphProperties() { LeftMargin = 0, Indent = 0, Alignment = A.TextAlignmentTypeValues.Center }; A.NoBullet noBullet1 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties2 = new A.DefaultRunProperties() { FontSize = 2400 }; level1ParagraphProperties2.Append(noBullet1); level1ParagraphProperties2.Append(defaultRunProperties2); A.Level2ParagraphProperties level2ParagraphProperties1 = new A.Level2ParagraphProperties() { LeftMargin = 457200, Indent = 0, Alignment = A.TextAlignmentTypeValues.Center }; A.NoBullet noBullet2 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties3 = new A.DefaultRunProperties() { FontSize = 2000 }; level2ParagraphProperties1.Append(noBullet2); level2ParagraphProperties1.Append(defaultRunProperties3); A.Level3ParagraphProperties level3ParagraphProperties1 = new A.Level3ParagraphProperties() { LeftMargin = 914400, Indent = 0, Alignment = A.TextAlignmentTypeValues.Center }; A.NoBullet noBullet3 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties4 = new A.DefaultRunProperties() { FontSize = 1800 }; level3ParagraphProperties1.Append(noBullet3); level3ParagraphProperties1.Append(defaultRunProperties4); A.Level4ParagraphProperties level4ParagraphProperties1 = new A.Level4ParagraphProperties() { LeftMargin = 1371600, Indent = 0, Alignment = A.TextAlignmentTypeValues.Center }; A.NoBullet noBullet4 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties5 = new A.DefaultRunProperties() { FontSize = 1600 }; level4ParagraphProperties1.Append(noBullet4); level4ParagraphProperties1.Append(defaultRunProperties5); A.Level5ParagraphProperties level5ParagraphProperties1 = new A.Level5ParagraphProperties() { LeftMargin = 1828800, Indent = 0, Alignment = A.TextAlignmentTypeValues.Center }; A.NoBullet noBullet5 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties6 = new A.DefaultRunProperties() { FontSize = 1600 }; level5ParagraphProperties1.Append(noBullet5); level5ParagraphProperties1.Append(defaultRunProperties6); A.Level6ParagraphProperties level6ParagraphProperties1 = new A.Level6ParagraphProperties() { LeftMargin = 2286000, Indent = 0, Alignment = A.TextAlignmentTypeValues.Center }; A.NoBullet noBullet6 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties7 = new A.DefaultRunProperties() { FontSize = 1600 }; level6ParagraphProperties1.Append(noBullet6); level6ParagraphProperties1.Append(defaultRunProperties7); A.Level7ParagraphProperties level7ParagraphProperties1 = new A.Level7ParagraphProperties() { LeftMargin = 2743200, Indent = 0, Alignment = A.TextAlignmentTypeValues.Center }; A.NoBullet noBullet7 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties8 = new A.DefaultRunProperties() { FontSize = 1600 }; level7ParagraphProperties1.Append(noBullet7); level7ParagraphProperties1.Append(defaultRunProperties8); A.Level8ParagraphProperties level8ParagraphProperties1 = new A.Level8ParagraphProperties() { LeftMargin = 3200400, Indent = 0, Alignment = A.TextAlignmentTypeValues.Center }; A.NoBullet noBullet8 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties9 = new A.DefaultRunProperties() { FontSize = 1600 }; level8ParagraphProperties1.Append(noBullet8); level8ParagraphProperties1.Append(defaultRunProperties9); A.Level9ParagraphProperties level9ParagraphProperties1 = new A.Level9ParagraphProperties() { LeftMargin = 3657600, Indent = 0, Alignment = A.TextAlignmentTypeValues.Center }; A.NoBullet noBullet9 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties10 = new A.DefaultRunProperties() { FontSize = 1600 }; level9ParagraphProperties1.Append(noBullet9); level9ParagraphProperties1.Append(defaultRunProperties10); listStyle4.Append(level1ParagraphProperties2); listStyle4.Append(level2ParagraphProperties1); listStyle4.Append(level3ParagraphProperties1); listStyle4.Append(level4ParagraphProperties1); listStyle4.Append(level5ParagraphProperties1); listStyle4.Append(level6ParagraphProperties1); listStyle4.Append(level7ParagraphProperties1); listStyle4.Append(level8ParagraphProperties1); listStyle4.Append(level9ParagraphProperties1); A.Paragraph paragraph4 = new A.Paragraph(); A.Run run4 = new A.Run(); A.RunProperties runProperties4 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text4 = new A.Text(); text4.Text = "マスター サブタイトルの書式設定"; run4.Append(runProperties4); run4.Append(text4); A.EndParagraphRunProperties endParagraphRunProperties2 = new A.EndParagraphRunProperties() { Language = "en-US", Dirty = false }; paragraph4.Append(run4); paragraph4.Append(endParagraphRunProperties2); textBody4.Append(bodyProperties4); textBody4.Append(listStyle4); textBody4.Append(paragraph4); shape4.Append(nonVisualShapeProperties4); shape4.Append(shapeProperties4); shape4.Append(textBody4); Shape shape5 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties5 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties7 = new NonVisualDrawingProperties() { Id = (UInt32Value)4U, Name = "Date Placeholder 3" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties5 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks5 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties5.Append(shapeLocks5); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties7 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape5 = new PlaceholderShape() { Type = PlaceholderValues.DateAndTime, Size = PlaceholderSizeValues.Half, Index = (UInt32Value)10U }; applicationNonVisualDrawingProperties7.Append(placeholderShape5); nonVisualShapeProperties5.Append(nonVisualDrawingProperties7); nonVisualShapeProperties5.Append(nonVisualShapeDrawingProperties5); nonVisualShapeProperties5.Append(applicationNonVisualDrawingProperties7); ShapeProperties shapeProperties5 = new ShapeProperties(); TextBody textBody5 = new TextBody(); A.BodyProperties bodyProperties5 = new A.BodyProperties(); A.ListStyle listStyle5 = new A.ListStyle(); A.Paragraph paragraph5 = new A.Paragraph(); A.Field field1 = new A.Field() { Id = "{BFFF7C5F-97F4-4B42-9C39-61661A529470}", Type = "datetimeFigureOut" }; A.RunProperties runProperties5 = new A.RunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; runProperties5.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.Text text5 = new A.Text(); text5.Text = "2018/5/3"; field1.Append(runProperties5); field1.Append(text5); A.EndParagraphRunProperties endParagraphRunProperties3 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph5.Append(field1); paragraph5.Append(endParagraphRunProperties3); textBody5.Append(bodyProperties5); textBody5.Append(listStyle5); textBody5.Append(paragraph5); shape5.Append(nonVisualShapeProperties5); shape5.Append(shapeProperties5); shape5.Append(textBody5); Shape shape6 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties6 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties8 = new NonVisualDrawingProperties() { Id = (UInt32Value)5U, Name = "Footer Placeholder 4" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties6 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks6 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties6.Append(shapeLocks6); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties8 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape6 = new PlaceholderShape() { Type = PlaceholderValues.Footer, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)11U }; applicationNonVisualDrawingProperties8.Append(placeholderShape6); nonVisualShapeProperties6.Append(nonVisualDrawingProperties8); nonVisualShapeProperties6.Append(nonVisualShapeDrawingProperties6); nonVisualShapeProperties6.Append(applicationNonVisualDrawingProperties8); ShapeProperties shapeProperties6 = new ShapeProperties(); TextBody textBody6 = new TextBody(); A.BodyProperties bodyProperties6 = new A.BodyProperties(); A.ListStyle listStyle6 = new A.ListStyle(); A.Paragraph paragraph6 = new A.Paragraph(); A.EndParagraphRunProperties endParagraphRunProperties4 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph6.Append(endParagraphRunProperties4); textBody6.Append(bodyProperties6); textBody6.Append(listStyle6); textBody6.Append(paragraph6); shape6.Append(nonVisualShapeProperties6); shape6.Append(shapeProperties6); shape6.Append(textBody6); Shape shape7 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties7 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties9 = new NonVisualDrawingProperties() { Id = (UInt32Value)6U, Name = "Slide Number Placeholder 5" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties7 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks7 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties7.Append(shapeLocks7); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties9 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape7 = new PlaceholderShape() { Type = PlaceholderValues.SlideNumber, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)12U }; applicationNonVisualDrawingProperties9.Append(placeholderShape7); nonVisualShapeProperties7.Append(nonVisualDrawingProperties9); nonVisualShapeProperties7.Append(nonVisualShapeDrawingProperties7); nonVisualShapeProperties7.Append(applicationNonVisualDrawingProperties9); ShapeProperties shapeProperties7 = new ShapeProperties(); TextBody textBody7 = new TextBody(); A.BodyProperties bodyProperties7 = new A.BodyProperties(); A.ListStyle listStyle7 = new A.ListStyle(); A.Paragraph paragraph7 = new A.Paragraph(); A.Field field2 = new A.Field() { Id = "{10647DAF-1A54-42E0-9176-57F2D0EA6A3B}", Type = "slidenum" }; A.RunProperties runProperties6 = new A.RunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; runProperties6.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.Text text6 = new A.Text(); text6.Text = "‹#›"; field2.Append(runProperties6); field2.Append(text6); A.EndParagraphRunProperties endParagraphRunProperties5 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph7.Append(field2); paragraph7.Append(endParagraphRunProperties5); textBody7.Append(bodyProperties7); textBody7.Append(listStyle7); textBody7.Append(paragraph7); shape7.Append(nonVisualShapeProperties7); shape7.Append(shapeProperties7); shape7.Append(textBody7); shapeTree2.Append(nonVisualGroupShapeProperties2); shapeTree2.Append(groupShapeProperties2); shapeTree2.Append(shape3); shapeTree2.Append(shape4); shapeTree2.Append(shape5); shapeTree2.Append(shape6); shapeTree2.Append(shape7); CommonSlideDataExtensionList commonSlideDataExtensionList2 = new CommonSlideDataExtensionList(); CommonSlideDataExtension commonSlideDataExtension2 = new CommonSlideDataExtension() { Uri = "{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}" }; P14.CreationId creationId2 = new P14.CreationId() { Val = (UInt32Value)1819264479U }; creationId2.AddNamespaceDeclaration("p14", "http://schemas.microsoft.com/office/powerpoint/2010/main"); commonSlideDataExtension2.Append(creationId2); commonSlideDataExtensionList2.Append(commonSlideDataExtension2); commonSlideData2.Append(shapeTree2); commonSlideData2.Append(commonSlideDataExtensionList2); ColorMapOverride colorMapOverride2 = new ColorMapOverride(); A.MasterColorMapping masterColorMapping2 = new A.MasterColorMapping(); colorMapOverride2.Append(masterColorMapping2); slideLayout1.Append(commonSlideData2); slideLayout1.Append(colorMapOverride2); slideLayoutPart1.SlideLayout = slideLayout1; return(slideLayoutPart1); }
private void AddTableContent(ShapeTree shapeTree1, uint ObjectID, PPTXTable Content) { TableSlideWriter helper = new TableSlideWriter(); helper.AddContent(shapeTree1, ObjectID, Content, HyperLinkIDMap); }
public override SlideLayoutPart CreateSlideLayoutPart(OpenXmlPartContainer containerPart) { SlideLayoutPart slideLayoutPart = containerPart.AddNewPart <SlideLayoutPart>(LayoutSetting.ID); SlideLayout slideLayout6 = new SlideLayout() { Type = SlideLayoutValues.TitleOnly, Preserve = true }; slideLayout6.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); slideLayout6.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); slideLayout6.AddNamespaceDeclaration("p", "http://schemas.openxmlformats.org/presentationml/2006/main"); CommonSlideData commonSlideData8 = new CommonSlideData() { Name = LayoutSetting.Name }; ShapeTree shapeTree8 = new ShapeTree(); NonVisualGroupShapeProperties nonVisualGroupShapeProperties8 = new NonVisualGroupShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties39 = new NonVisualDrawingProperties() { Id = (UInt32Value)1U, Name = "" }; NonVisualGroupShapeDrawingProperties nonVisualGroupShapeDrawingProperties8 = new NonVisualGroupShapeDrawingProperties(); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties39 = new ApplicationNonVisualDrawingProperties(); nonVisualGroupShapeProperties8.Append(nonVisualDrawingProperties39); nonVisualGroupShapeProperties8.Append(nonVisualGroupShapeDrawingProperties8); nonVisualGroupShapeProperties8.Append(applicationNonVisualDrawingProperties39); GroupShapeProperties groupShapeProperties8 = new GroupShapeProperties(); A.TransformGroup transformGroup8 = new A.TransformGroup(); A.Offset offset20 = new A.Offset() { X = 0L, Y = 0L }; A.Extents extents20 = new A.Extents() { Cx = 0L, Cy = 0L }; A.ChildOffset childOffset8 = new A.ChildOffset() { X = 0L, Y = 0L }; A.ChildExtents childExtents8 = new A.ChildExtents() { Cx = 0L, Cy = 0L }; transformGroup8.Append(offset20); transformGroup8.Append(extents20); transformGroup8.Append(childOffset8); transformGroup8.Append(childExtents8); groupShapeProperties8.Append(transformGroup8); Shape shape32 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties32 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties40 = new NonVisualDrawingProperties() { Id = (UInt32Value)2U, Name = "Title 1" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties32 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks32 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties32.Append(shapeLocks32); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties40 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape32 = new PlaceholderShape() { Type = PlaceholderValues.Title }; applicationNonVisualDrawingProperties40.Append(placeholderShape32); nonVisualShapeProperties32.Append(nonVisualDrawingProperties40); nonVisualShapeProperties32.Append(nonVisualShapeDrawingProperties32); nonVisualShapeProperties32.Append(applicationNonVisualDrawingProperties40); ShapeProperties shapeProperties32 = new ShapeProperties(); TextBody textBody32 = new TextBody(); A.BodyProperties bodyProperties32 = new A.BodyProperties(); A.ListStyle listStyle32 = new A.ListStyle(); A.Paragraph paragraph44 = new A.Paragraph(); A.Run run50 = new A.Run(); A.RunProperties runProperties62 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text62 = new A.Text(); text62.Text = "マスター タイトルの書式設定"; run50.Append(runProperties62); run50.Append(text62); A.EndParagraphRunProperties endParagraphRunProperties28 = new A.EndParagraphRunProperties() { Language = "en-US", Dirty = false }; paragraph44.Append(run50); paragraph44.Append(endParagraphRunProperties28); textBody32.Append(bodyProperties32); textBody32.Append(listStyle32); textBody32.Append(paragraph44); shape32.Append(nonVisualShapeProperties32); shape32.Append(shapeProperties32); shape32.Append(textBody32); Shape shape33 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties33 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties41 = new NonVisualDrawingProperties() { Id = (UInt32Value)3U, Name = "Date Placeholder 2" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties33 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks33 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties33.Append(shapeLocks33); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties41 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape33 = new PlaceholderShape() { Type = PlaceholderValues.DateAndTime, Size = PlaceholderSizeValues.Half, Index = (UInt32Value)10U }; applicationNonVisualDrawingProperties41.Append(placeholderShape33); nonVisualShapeProperties33.Append(nonVisualDrawingProperties41); nonVisualShapeProperties33.Append(nonVisualShapeDrawingProperties33); nonVisualShapeProperties33.Append(applicationNonVisualDrawingProperties41); ShapeProperties shapeProperties33 = new ShapeProperties(); TextBody textBody33 = new TextBody(); A.BodyProperties bodyProperties33 = new A.BodyProperties(); A.ListStyle listStyle33 = new A.ListStyle(); A.Paragraph paragraph45 = new A.Paragraph(); A.Field field13 = new A.Field() { Id = "{BFFF7C5F-97F4-4B42-9C39-61661A529470}", Type = "datetimeFigureOut" }; A.RunProperties runProperties63 = new A.RunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; runProperties63.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.Text text63 = new A.Text(); text63.Text = "2018/5/3"; field13.Append(runProperties63); field13.Append(text63); A.EndParagraphRunProperties endParagraphRunProperties29 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph45.Append(field13); paragraph45.Append(endParagraphRunProperties29); textBody33.Append(bodyProperties33); textBody33.Append(listStyle33); textBody33.Append(paragraph45); shape33.Append(nonVisualShapeProperties33); shape33.Append(shapeProperties33); shape33.Append(textBody33); Shape shape34 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties34 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties42 = new NonVisualDrawingProperties() { Id = (UInt32Value)4U, Name = "Footer Placeholder 3" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties34 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks34 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties34.Append(shapeLocks34); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties42 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape34 = new PlaceholderShape() { Type = PlaceholderValues.Footer, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)11U }; applicationNonVisualDrawingProperties42.Append(placeholderShape34); nonVisualShapeProperties34.Append(nonVisualDrawingProperties42); nonVisualShapeProperties34.Append(nonVisualShapeDrawingProperties34); nonVisualShapeProperties34.Append(applicationNonVisualDrawingProperties42); ShapeProperties shapeProperties34 = new ShapeProperties(); TextBody textBody34 = new TextBody(); A.BodyProperties bodyProperties34 = new A.BodyProperties(); A.ListStyle listStyle34 = new A.ListStyle(); A.Paragraph paragraph46 = new A.Paragraph(); A.EndParagraphRunProperties endParagraphRunProperties30 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph46.Append(endParagraphRunProperties30); textBody34.Append(bodyProperties34); textBody34.Append(listStyle34); textBody34.Append(paragraph46); shape34.Append(nonVisualShapeProperties34); shape34.Append(shapeProperties34); shape34.Append(textBody34); Shape shape35 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties35 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties43 = new NonVisualDrawingProperties() { Id = (UInt32Value)5U, Name = "Slide Number Placeholder 4" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties35 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks35 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties35.Append(shapeLocks35); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties43 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape35 = new PlaceholderShape() { Type = PlaceholderValues.SlideNumber, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)12U }; applicationNonVisualDrawingProperties43.Append(placeholderShape35); nonVisualShapeProperties35.Append(nonVisualDrawingProperties43); nonVisualShapeProperties35.Append(nonVisualShapeDrawingProperties35); nonVisualShapeProperties35.Append(applicationNonVisualDrawingProperties43); ShapeProperties shapeProperties35 = new ShapeProperties(); TextBody textBody35 = new TextBody(); A.BodyProperties bodyProperties35 = new A.BodyProperties(); A.ListStyle listStyle35 = new A.ListStyle(); A.Paragraph paragraph47 = new A.Paragraph(); A.Field field14 = new A.Field() { Id = "{10647DAF-1A54-42E0-9176-57F2D0EA6A3B}", Type = "slidenum" }; A.RunProperties runProperties64 = new A.RunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; runProperties64.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.Text text64 = new A.Text(); text64.Text = "‹#›"; field14.Append(runProperties64); field14.Append(text64); A.EndParagraphRunProperties endParagraphRunProperties31 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph47.Append(field14); paragraph47.Append(endParagraphRunProperties31); textBody35.Append(bodyProperties35); textBody35.Append(listStyle35); textBody35.Append(paragraph47); shape35.Append(nonVisualShapeProperties35); shape35.Append(shapeProperties35); shape35.Append(textBody35); shapeTree8.Append(nonVisualGroupShapeProperties8); shapeTree8.Append(groupShapeProperties8); shapeTree8.Append(shape32); shapeTree8.Append(shape33); shapeTree8.Append(shape34); shapeTree8.Append(shape35); CommonSlideDataExtensionList commonSlideDataExtensionList8 = new CommonSlideDataExtensionList(); CommonSlideDataExtension commonSlideDataExtension8 = new CommonSlideDataExtension() { Uri = "{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}" }; P14.CreationId creationId8 = new P14.CreationId() { Val = (UInt32Value)164729701U }; creationId8.AddNamespaceDeclaration("p14", "http://schemas.microsoft.com/office/powerpoint/2010/main"); commonSlideDataExtension8.Append(creationId8); commonSlideDataExtensionList8.Append(commonSlideDataExtension8); commonSlideData8.Append(shapeTree8); commonSlideData8.Append(commonSlideDataExtensionList8); ColorMapOverride colorMapOverride7 = new ColorMapOverride(); A.MasterColorMapping masterColorMapping7 = new A.MasterColorMapping(); colorMapOverride7.Append(masterColorMapping7); slideLayout6.Append(commonSlideData8); slideLayout6.Append(colorMapOverride7); slideLayoutPart.SlideLayout = slideLayout6; return(slideLayoutPart); }
public override SlideLayoutPart CreateSlideLayoutPart(OpenXmlPartContainer containerPart) { SlideLayoutPart slideLayoutPart = containerPart.AddNewPart <SlideLayoutPart>(LayoutSetting.ID); SlideLayout slideLayout9 = new SlideLayout() { Type = SlideLayoutValues.VerticalText, Preserve = true }; slideLayout9.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); slideLayout9.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); slideLayout9.AddNamespaceDeclaration("p", "http://schemas.openxmlformats.org/presentationml/2006/main"); CommonSlideData commonSlideData11 = new CommonSlideData() { Name = LayoutSetting.Name }; ShapeTree shapeTree11 = new ShapeTree(); NonVisualGroupShapeProperties nonVisualGroupShapeProperties11 = new NonVisualGroupShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties59 = new NonVisualDrawingProperties() { Id = (UInt32Value)1U, Name = "" }; NonVisualGroupShapeDrawingProperties nonVisualGroupShapeDrawingProperties11 = new NonVisualGroupShapeDrawingProperties(); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties59 = new ApplicationNonVisualDrawingProperties(); nonVisualGroupShapeProperties11.Append(nonVisualDrawingProperties59); nonVisualGroupShapeProperties11.Append(nonVisualGroupShapeDrawingProperties11); nonVisualGroupShapeProperties11.Append(applicationNonVisualDrawingProperties59); GroupShapeProperties groupShapeProperties11 = new GroupShapeProperties(); A.TransformGroup transformGroup11 = new A.TransformGroup(); A.Offset offset30 = new A.Offset() { X = 0L, Y = 0L }; A.Extents extents30 = new A.Extents() { Cx = 0L, Cy = 0L }; A.ChildOffset childOffset11 = new A.ChildOffset() { X = 0L, Y = 0L }; A.ChildExtents childExtents11 = new A.ChildExtents() { Cx = 0L, Cy = 0L }; transformGroup11.Append(offset30); transformGroup11.Append(extents30); transformGroup11.Append(childOffset11); transformGroup11.Append(childExtents11); groupShapeProperties11.Append(transformGroup11); Shape shape49 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties49 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties60 = new NonVisualDrawingProperties() { Id = (UInt32Value)2U, Name = "Title 1" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties49 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks49 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties49.Append(shapeLocks49); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties60 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape49 = new PlaceholderShape() { Type = PlaceholderValues.Title }; applicationNonVisualDrawingProperties60.Append(placeholderShape49); nonVisualShapeProperties49.Append(nonVisualDrawingProperties60); nonVisualShapeProperties49.Append(nonVisualShapeDrawingProperties49); nonVisualShapeProperties49.Append(applicationNonVisualDrawingProperties60); ShapeProperties shapeProperties49 = new ShapeProperties(); TextBody textBody49 = new TextBody(); A.BodyProperties bodyProperties49 = new A.BodyProperties(); A.ListStyle listStyle49 = new A.ListStyle(); A.Paragraph paragraph73 = new A.Paragraph(); A.Run run94 = new A.Run(); A.RunProperties runProperties112 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text112 = new A.Text(); text112.Text = "マスター タイトルの書式設定"; run94.Append(runProperties112); run94.Append(text112); A.EndParagraphRunProperties endParagraphRunProperties43 = new A.EndParagraphRunProperties() { Language = "en-US", Dirty = false }; paragraph73.Append(run94); paragraph73.Append(endParagraphRunProperties43); textBody49.Append(bodyProperties49); textBody49.Append(listStyle49); textBody49.Append(paragraph73); shape49.Append(nonVisualShapeProperties49); shape49.Append(shapeProperties49); shape49.Append(textBody49); Shape shape50 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties50 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties61 = new NonVisualDrawingProperties() { Id = (UInt32Value)3U, Name = "Vertical Text Placeholder 2" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties50 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks50 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties50.Append(shapeLocks50); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties61 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape50 = new PlaceholderShape() { Type = PlaceholderValues.Body, Orientation = DirectionValues.Vertical, Index = (UInt32Value)1U }; applicationNonVisualDrawingProperties61.Append(placeholderShape50); nonVisualShapeProperties50.Append(nonVisualDrawingProperties61); nonVisualShapeProperties50.Append(nonVisualShapeDrawingProperties50); nonVisualShapeProperties50.Append(applicationNonVisualDrawingProperties61); ShapeProperties shapeProperties50 = new ShapeProperties(); TextBody textBody50 = new TextBody(); A.BodyProperties bodyProperties50 = new A.BodyProperties() { Vertical = A.TextVerticalValues.EastAsianVetical }; A.ListStyle listStyle50 = new A.ListStyle(); A.Paragraph paragraph74 = new A.Paragraph(); A.ParagraphProperties paragraphProperties35 = new A.ParagraphProperties() { Level = 0 }; A.Run run95 = new A.Run(); A.RunProperties runProperties113 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text113 = new A.Text(); text113.Text = "マスター テキストの書式設定"; run95.Append(runProperties113); run95.Append(text113); paragraph74.Append(paragraphProperties35); paragraph74.Append(run95); A.Paragraph paragraph75 = new A.Paragraph(); A.ParagraphProperties paragraphProperties36 = new A.ParagraphProperties() { Level = 1 }; A.Run run96 = new A.Run(); A.RunProperties runProperties114 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text114 = new A.Text(); text114.Text = "第 "; run96.Append(runProperties114); run96.Append(text114); A.Run run97 = new A.Run(); A.RunProperties runProperties115 = new A.RunProperties() { Language = "en-US", AlternativeLanguage = "ja-JP" }; A.Text text115 = new A.Text(); text115.Text = "2 "; run97.Append(runProperties115); run97.Append(text115); A.Run run98 = new A.Run(); A.RunProperties runProperties116 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text116 = new A.Text(); text116.Text = "レベル"; run98.Append(runProperties116); run98.Append(text116); paragraph75.Append(paragraphProperties36); paragraph75.Append(run96); paragraph75.Append(run97); paragraph75.Append(run98); A.Paragraph paragraph76 = new A.Paragraph(); A.ParagraphProperties paragraphProperties37 = new A.ParagraphProperties() { Level = 2 }; A.Run run99 = new A.Run(); A.RunProperties runProperties117 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text117 = new A.Text(); text117.Text = "第 "; run99.Append(runProperties117); run99.Append(text117); A.Run run100 = new A.Run(); A.RunProperties runProperties118 = new A.RunProperties() { Language = "en-US", AlternativeLanguage = "ja-JP" }; A.Text text118 = new A.Text(); text118.Text = "3 "; run100.Append(runProperties118); run100.Append(text118); A.Run run101 = new A.Run(); A.RunProperties runProperties119 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text119 = new A.Text(); text119.Text = "レベル"; run101.Append(runProperties119); run101.Append(text119); paragraph76.Append(paragraphProperties37); paragraph76.Append(run99); paragraph76.Append(run100); paragraph76.Append(run101); A.Paragraph paragraph77 = new A.Paragraph(); A.ParagraphProperties paragraphProperties38 = new A.ParagraphProperties() { Level = 3 }; A.Run run102 = new A.Run(); A.RunProperties runProperties120 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text120 = new A.Text(); text120.Text = "第 "; run102.Append(runProperties120); run102.Append(text120); A.Run run103 = new A.Run(); A.RunProperties runProperties121 = new A.RunProperties() { Language = "en-US", AlternativeLanguage = "ja-JP" }; A.Text text121 = new A.Text(); text121.Text = "4 "; run103.Append(runProperties121); run103.Append(text121); A.Run run104 = new A.Run(); A.RunProperties runProperties122 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text122 = new A.Text(); text122.Text = "レベル"; run104.Append(runProperties122); run104.Append(text122); paragraph77.Append(paragraphProperties38); paragraph77.Append(run102); paragraph77.Append(run103); paragraph77.Append(run104); A.Paragraph paragraph78 = new A.Paragraph(); A.ParagraphProperties paragraphProperties39 = new A.ParagraphProperties() { Level = 4 }; A.Run run105 = new A.Run(); A.RunProperties runProperties123 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text123 = new A.Text(); text123.Text = "第 "; run105.Append(runProperties123); run105.Append(text123); A.Run run106 = new A.Run(); A.RunProperties runProperties124 = new A.RunProperties() { Language = "en-US", AlternativeLanguage = "ja-JP" }; A.Text text124 = new A.Text(); text124.Text = "5 "; run106.Append(runProperties124); run106.Append(text124); A.Run run107 = new A.Run(); A.RunProperties runProperties125 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text125 = new A.Text(); text125.Text = "レベル"; run107.Append(runProperties125); run107.Append(text125); A.EndParagraphRunProperties endParagraphRunProperties44 = new A.EndParagraphRunProperties() { Language = "en-US", Dirty = false }; paragraph78.Append(paragraphProperties39); paragraph78.Append(run105); paragraph78.Append(run106); paragraph78.Append(run107); paragraph78.Append(endParagraphRunProperties44); textBody50.Append(bodyProperties50); textBody50.Append(listStyle50); textBody50.Append(paragraph74); textBody50.Append(paragraph75); textBody50.Append(paragraph76); textBody50.Append(paragraph77); textBody50.Append(paragraph78); shape50.Append(nonVisualShapeProperties50); shape50.Append(shapeProperties50); shape50.Append(textBody50); Shape shape51 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties51 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties62 = new NonVisualDrawingProperties() { Id = (UInt32Value)4U, Name = "Date Placeholder 3" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties51 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks51 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties51.Append(shapeLocks51); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties62 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape51 = new PlaceholderShape() { Type = PlaceholderValues.DateAndTime, Size = PlaceholderSizeValues.Half, Index = (UInt32Value)10U }; applicationNonVisualDrawingProperties62.Append(placeholderShape51); nonVisualShapeProperties51.Append(nonVisualDrawingProperties62); nonVisualShapeProperties51.Append(nonVisualShapeDrawingProperties51); nonVisualShapeProperties51.Append(applicationNonVisualDrawingProperties62); ShapeProperties shapeProperties51 = new ShapeProperties(); TextBody textBody51 = new TextBody(); A.BodyProperties bodyProperties51 = new A.BodyProperties(); A.ListStyle listStyle51 = new A.ListStyle(); A.Paragraph paragraph79 = new A.Paragraph(); A.Field field19 = new A.Field() { Id = "{BFFF7C5F-97F4-4B42-9C39-61661A529470}", Type = "datetimeFigureOut" }; A.RunProperties runProperties126 = new A.RunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; runProperties126.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.Text text126 = new A.Text(); text126.Text = "2018/5/3"; field19.Append(runProperties126); field19.Append(text126); A.EndParagraphRunProperties endParagraphRunProperties45 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph79.Append(field19); paragraph79.Append(endParagraphRunProperties45); textBody51.Append(bodyProperties51); textBody51.Append(listStyle51); textBody51.Append(paragraph79); shape51.Append(nonVisualShapeProperties51); shape51.Append(shapeProperties51); shape51.Append(textBody51); Shape shape52 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties52 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties63 = new NonVisualDrawingProperties() { Id = (UInt32Value)5U, Name = "Footer Placeholder 4" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties52 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks52 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties52.Append(shapeLocks52); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties63 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape52 = new PlaceholderShape() { Type = PlaceholderValues.Footer, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)11U }; applicationNonVisualDrawingProperties63.Append(placeholderShape52); nonVisualShapeProperties52.Append(nonVisualDrawingProperties63); nonVisualShapeProperties52.Append(nonVisualShapeDrawingProperties52); nonVisualShapeProperties52.Append(applicationNonVisualDrawingProperties63); ShapeProperties shapeProperties52 = new ShapeProperties(); TextBody textBody52 = new TextBody(); A.BodyProperties bodyProperties52 = new A.BodyProperties(); A.ListStyle listStyle52 = new A.ListStyle(); A.Paragraph paragraph80 = new A.Paragraph(); A.EndParagraphRunProperties endParagraphRunProperties46 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph80.Append(endParagraphRunProperties46); textBody52.Append(bodyProperties52); textBody52.Append(listStyle52); textBody52.Append(paragraph80); shape52.Append(nonVisualShapeProperties52); shape52.Append(shapeProperties52); shape52.Append(textBody52); Shape shape53 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties53 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties64 = new NonVisualDrawingProperties() { Id = (UInt32Value)6U, Name = "Slide Number Placeholder 5" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties53 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks53 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties53.Append(shapeLocks53); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties64 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape53 = new PlaceholderShape() { Type = PlaceholderValues.SlideNumber, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)12U }; applicationNonVisualDrawingProperties64.Append(placeholderShape53); nonVisualShapeProperties53.Append(nonVisualDrawingProperties64); nonVisualShapeProperties53.Append(nonVisualShapeDrawingProperties53); nonVisualShapeProperties53.Append(applicationNonVisualDrawingProperties64); ShapeProperties shapeProperties53 = new ShapeProperties(); TextBody textBody53 = new TextBody(); A.BodyProperties bodyProperties53 = new A.BodyProperties(); A.ListStyle listStyle53 = new A.ListStyle(); A.Paragraph paragraph81 = new A.Paragraph(); A.Field field20 = new A.Field() { Id = "{10647DAF-1A54-42E0-9176-57F2D0EA6A3B}", Type = "slidenum" }; A.RunProperties runProperties127 = new A.RunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; runProperties127.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.Text text127 = new A.Text(); text127.Text = "‹#›"; field20.Append(runProperties127); field20.Append(text127); A.EndParagraphRunProperties endParagraphRunProperties47 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph81.Append(field20); paragraph81.Append(endParagraphRunProperties47); textBody53.Append(bodyProperties53); textBody53.Append(listStyle53); textBody53.Append(paragraph81); shape53.Append(nonVisualShapeProperties53); shape53.Append(shapeProperties53); shape53.Append(textBody53); shapeTree11.Append(nonVisualGroupShapeProperties11); shapeTree11.Append(groupShapeProperties11); shapeTree11.Append(shape49); shapeTree11.Append(shape50); shapeTree11.Append(shape51); shapeTree11.Append(shape52); shapeTree11.Append(shape53); CommonSlideDataExtensionList commonSlideDataExtensionList11 = new CommonSlideDataExtensionList(); CommonSlideDataExtension commonSlideDataExtension11 = new CommonSlideDataExtension() { Uri = "{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}" }; P14.CreationId creationId11 = new P14.CreationId() { Val = (UInt32Value)1336250982U }; creationId11.AddNamespaceDeclaration("p14", "http://schemas.microsoft.com/office/powerpoint/2010/main"); commonSlideDataExtension11.Append(creationId11); commonSlideDataExtensionList11.Append(commonSlideDataExtension11); commonSlideData11.Append(shapeTree11); commonSlideData11.Append(commonSlideDataExtensionList11); ColorMapOverride colorMapOverride10 = new ColorMapOverride(); A.MasterColorMapping masterColorMapping10 = new A.MasterColorMapping(); colorMapOverride10.Append(masterColorMapping10); slideLayout9.Append(commonSlideData11); slideLayout9.Append(colorMapOverride10); slideLayoutPart.SlideLayout = slideLayout9; return(slideLayoutPart); }
public override SlideLayoutPart CreateSlideLayoutPart(OpenXmlPartContainer containerPart) { SlideLayoutPart slideLayoutPart = containerPart.AddNewPart <SlideLayoutPart>(LayoutSetting.ID); SlideLayout slideLayout11 = new SlideLayout() { Type = SlideLayoutValues.PictureText, Preserve = true }; slideLayout11.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); slideLayout11.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); slideLayout11.AddNamespaceDeclaration("p", "http://schemas.openxmlformats.org/presentationml/2006/main"); CommonSlideData commonSlideData13 = new CommonSlideData() { Name = LayoutSetting.Name }; ShapeTree shapeTree13 = new ShapeTree(); NonVisualGroupShapeProperties nonVisualGroupShapeProperties13 = new NonVisualGroupShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties72 = new NonVisualDrawingProperties() { Id = (UInt32Value)1U, Name = "" }; NonVisualGroupShapeDrawingProperties nonVisualGroupShapeDrawingProperties13 = new NonVisualGroupShapeDrawingProperties(); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties72 = new ApplicationNonVisualDrawingProperties(); nonVisualGroupShapeProperties13.Append(nonVisualDrawingProperties72); nonVisualGroupShapeProperties13.Append(nonVisualGroupShapeDrawingProperties13); nonVisualGroupShapeProperties13.Append(applicationNonVisualDrawingProperties72); GroupShapeProperties groupShapeProperties13 = new GroupShapeProperties(); A.TransformGroup transformGroup13 = new A.TransformGroup(); A.Offset offset34 = new A.Offset() { X = 0L, Y = 0L }; A.Extents extents34 = new A.Extents() { Cx = 0L, Cy = 0L }; A.ChildOffset childOffset13 = new A.ChildOffset() { X = 0L, Y = 0L }; A.ChildExtents childExtents13 = new A.ChildExtents() { Cx = 0L, Cy = 0L }; transformGroup13.Append(offset34); transformGroup13.Append(extents34); transformGroup13.Append(childOffset13); transformGroup13.Append(childExtents13); groupShapeProperties13.Append(transformGroup13); Shape shape60 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties60 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties73 = new NonVisualDrawingProperties() { Id = (UInt32Value)2U, Name = "Title 1" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties60 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks60 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties60.Append(shapeLocks60); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties73 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape60 = new PlaceholderShape() { Type = PlaceholderValues.Title }; applicationNonVisualDrawingProperties73.Append(placeholderShape60); nonVisualShapeProperties60.Append(nonVisualDrawingProperties73); nonVisualShapeProperties60.Append(nonVisualShapeDrawingProperties60); nonVisualShapeProperties60.Append(applicationNonVisualDrawingProperties73); ShapeProperties shapeProperties60 = new ShapeProperties(); A.Transform2D transform2D22 = new A.Transform2D(); A.Offset offset35 = new A.Offset() { X = 629841L, Y = 457200L }; A.Extents extents35 = new A.Extents() { Cx = 2949178L, Cy = 1600200L }; transform2D22.Append(offset35); transform2D22.Append(extents35); shapeProperties60.Append(transform2D22); TextBody textBody60 = new TextBody(); A.BodyProperties bodyProperties60 = new A.BodyProperties() { Anchor = A.TextAnchoringTypeValues.Bottom }; A.ListStyle listStyle60 = new A.ListStyle(); A.Level1ParagraphProperties level1ParagraphProperties16 = new A.Level1ParagraphProperties(); A.DefaultRunProperties defaultRunProperties81 = new A.DefaultRunProperties() { FontSize = 3200 }; level1ParagraphProperties16.Append(defaultRunProperties81); listStyle60.Append(level1ParagraphProperties16); A.Paragraph paragraph96 = new A.Paragraph(); A.Run run135 = new A.Run(); A.RunProperties runProperties157 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text157 = new A.Text(); text157.Text = "マスター タイトルの書式設定"; run135.Append(runProperties157); run135.Append(text157); A.EndParagraphRunProperties endParagraphRunProperties54 = new A.EndParagraphRunProperties() { Language = "en-US", Dirty = false }; paragraph96.Append(run135); paragraph96.Append(endParagraphRunProperties54); textBody60.Append(bodyProperties60); textBody60.Append(listStyle60); textBody60.Append(paragraph96); shape60.Append(nonVisualShapeProperties60); shape60.Append(shapeProperties60); shape60.Append(textBody60); Shape shape61 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties61 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties74 = new NonVisualDrawingProperties() { Id = (UInt32Value)3U, Name = "Picture Placeholder 2" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties61 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks61 = new A.ShapeLocks() { NoGrouping = true, NoChangeAspect = true }; nonVisualShapeDrawingProperties61.Append(shapeLocks61); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties74 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape61 = new PlaceholderShape() { Type = PlaceholderValues.Picture, Index = (UInt32Value)1U }; applicationNonVisualDrawingProperties74.Append(placeholderShape61); nonVisualShapeProperties61.Append(nonVisualDrawingProperties74); nonVisualShapeProperties61.Append(nonVisualShapeDrawingProperties61); nonVisualShapeProperties61.Append(applicationNonVisualDrawingProperties74); ShapeProperties shapeProperties61 = new ShapeProperties(); A.Transform2D transform2D23 = new A.Transform2D(); A.Offset offset36 = new A.Offset() { X = 3887391L, Y = 987426L }; A.Extents extents36 = new A.Extents() { Cx = 4629150L, Cy = 4873625L }; transform2D23.Append(offset36); transform2D23.Append(extents36); shapeProperties61.Append(transform2D23); TextBody textBody61 = new TextBody(); A.BodyProperties bodyProperties61 = new A.BodyProperties() { Anchor = A.TextAnchoringTypeValues.Top }; A.ListStyle listStyle61 = new A.ListStyle(); A.Level1ParagraphProperties level1ParagraphProperties17 = new A.Level1ParagraphProperties() { LeftMargin = 0, Indent = 0 }; A.NoBullet noBullet47 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties82 = new A.DefaultRunProperties() { FontSize = 3200 }; level1ParagraphProperties17.Append(noBullet47); level1ParagraphProperties17.Append(defaultRunProperties82); A.Level2ParagraphProperties level2ParagraphProperties9 = new A.Level2ParagraphProperties() { LeftMargin = 457200, Indent = 0 }; A.NoBullet noBullet48 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties83 = new A.DefaultRunProperties() { FontSize = 2800 }; level2ParagraphProperties9.Append(noBullet48); level2ParagraphProperties9.Append(defaultRunProperties83); A.Level3ParagraphProperties level3ParagraphProperties9 = new A.Level3ParagraphProperties() { LeftMargin = 914400, Indent = 0 }; A.NoBullet noBullet49 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties84 = new A.DefaultRunProperties() { FontSize = 2400 }; level3ParagraphProperties9.Append(noBullet49); level3ParagraphProperties9.Append(defaultRunProperties84); A.Level4ParagraphProperties level4ParagraphProperties9 = new A.Level4ParagraphProperties() { LeftMargin = 1371600, Indent = 0 }; A.NoBullet noBullet50 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties85 = new A.DefaultRunProperties() { FontSize = 2000 }; level4ParagraphProperties9.Append(noBullet50); level4ParagraphProperties9.Append(defaultRunProperties85); A.Level5ParagraphProperties level5ParagraphProperties9 = new A.Level5ParagraphProperties() { LeftMargin = 1828800, Indent = 0 }; A.NoBullet noBullet51 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties86 = new A.DefaultRunProperties() { FontSize = 2000 }; level5ParagraphProperties9.Append(noBullet51); level5ParagraphProperties9.Append(defaultRunProperties86); A.Level6ParagraphProperties level6ParagraphProperties9 = new A.Level6ParagraphProperties() { LeftMargin = 2286000, Indent = 0 }; A.NoBullet noBullet52 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties87 = new A.DefaultRunProperties() { FontSize = 2000 }; level6ParagraphProperties9.Append(noBullet52); level6ParagraphProperties9.Append(defaultRunProperties87); A.Level7ParagraphProperties level7ParagraphProperties9 = new A.Level7ParagraphProperties() { LeftMargin = 2743200, Indent = 0 }; A.NoBullet noBullet53 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties88 = new A.DefaultRunProperties() { FontSize = 2000 }; level7ParagraphProperties9.Append(noBullet53); level7ParagraphProperties9.Append(defaultRunProperties88); A.Level8ParagraphProperties level8ParagraphProperties9 = new A.Level8ParagraphProperties() { LeftMargin = 3200400, Indent = 0 }; A.NoBullet noBullet54 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties89 = new A.DefaultRunProperties() { FontSize = 2000 }; level8ParagraphProperties9.Append(noBullet54); level8ParagraphProperties9.Append(defaultRunProperties89); A.Level9ParagraphProperties level9ParagraphProperties9 = new A.Level9ParagraphProperties() { LeftMargin = 3657600, Indent = 0 }; A.NoBullet noBullet55 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties90 = new A.DefaultRunProperties() { FontSize = 2000 }; level9ParagraphProperties9.Append(noBullet55); level9ParagraphProperties9.Append(defaultRunProperties90); listStyle61.Append(level1ParagraphProperties17); listStyle61.Append(level2ParagraphProperties9); listStyle61.Append(level3ParagraphProperties9); listStyle61.Append(level4ParagraphProperties9); listStyle61.Append(level5ParagraphProperties9); listStyle61.Append(level6ParagraphProperties9); listStyle61.Append(level7ParagraphProperties9); listStyle61.Append(level8ParagraphProperties9); listStyle61.Append(level9ParagraphProperties9); A.Paragraph paragraph97 = new A.Paragraph(); A.Run run136 = new A.Run(); A.RunProperties runProperties158 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text158 = new A.Text(); text158.Text = "アイコンをクリックして図を追加"; run136.Append(runProperties158); run136.Append(text158); A.EndParagraphRunProperties endParagraphRunProperties55 = new A.EndParagraphRunProperties() { Language = "en-US", Dirty = false }; paragraph97.Append(run136); paragraph97.Append(endParagraphRunProperties55); textBody61.Append(bodyProperties61); textBody61.Append(listStyle61); textBody61.Append(paragraph97); shape61.Append(nonVisualShapeProperties61); shape61.Append(shapeProperties61); shape61.Append(textBody61); Shape shape62 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties62 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties75 = new NonVisualDrawingProperties() { Id = (UInt32Value)4U, Name = "Text Placeholder 3" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties62 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks62 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties62.Append(shapeLocks62); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties75 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape62 = new PlaceholderShape() { Type = PlaceholderValues.Body, Size = PlaceholderSizeValues.Half, Index = (UInt32Value)2U }; applicationNonVisualDrawingProperties75.Append(placeholderShape62); nonVisualShapeProperties62.Append(nonVisualDrawingProperties75); nonVisualShapeProperties62.Append(nonVisualShapeDrawingProperties62); nonVisualShapeProperties62.Append(applicationNonVisualDrawingProperties75); ShapeProperties shapeProperties62 = new ShapeProperties(); A.Transform2D transform2D24 = new A.Transform2D(); A.Offset offset37 = new A.Offset() { X = 629841L, Y = 2057400L }; A.Extents extents37 = new A.Extents() { Cx = 2949178L, Cy = 3811588L }; transform2D24.Append(offset37); transform2D24.Append(extents37); shapeProperties62.Append(transform2D24); TextBody textBody62 = new TextBody(); A.BodyProperties bodyProperties62 = new A.BodyProperties(); A.ListStyle listStyle62 = new A.ListStyle(); A.Level1ParagraphProperties level1ParagraphProperties18 = new A.Level1ParagraphProperties() { LeftMargin = 0, Indent = 0 }; A.NoBullet noBullet56 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties91 = new A.DefaultRunProperties() { FontSize = 1600 }; level1ParagraphProperties18.Append(noBullet56); level1ParagraphProperties18.Append(defaultRunProperties91); A.Level2ParagraphProperties level2ParagraphProperties10 = new A.Level2ParagraphProperties() { LeftMargin = 457200, Indent = 0 }; A.NoBullet noBullet57 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties92 = new A.DefaultRunProperties() { FontSize = 1400 }; level2ParagraphProperties10.Append(noBullet57); level2ParagraphProperties10.Append(defaultRunProperties92); A.Level3ParagraphProperties level3ParagraphProperties10 = new A.Level3ParagraphProperties() { LeftMargin = 914400, Indent = 0 }; A.NoBullet noBullet58 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties93 = new A.DefaultRunProperties() { FontSize = 1200 }; level3ParagraphProperties10.Append(noBullet58); level3ParagraphProperties10.Append(defaultRunProperties93); A.Level4ParagraphProperties level4ParagraphProperties10 = new A.Level4ParagraphProperties() { LeftMargin = 1371600, Indent = 0 }; A.NoBullet noBullet59 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties94 = new A.DefaultRunProperties() { FontSize = 1000 }; level4ParagraphProperties10.Append(noBullet59); level4ParagraphProperties10.Append(defaultRunProperties94); A.Level5ParagraphProperties level5ParagraphProperties10 = new A.Level5ParagraphProperties() { LeftMargin = 1828800, Indent = 0 }; A.NoBullet noBullet60 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties95 = new A.DefaultRunProperties() { FontSize = 1000 }; level5ParagraphProperties10.Append(noBullet60); level5ParagraphProperties10.Append(defaultRunProperties95); A.Level6ParagraphProperties level6ParagraphProperties10 = new A.Level6ParagraphProperties() { LeftMargin = 2286000, Indent = 0 }; A.NoBullet noBullet61 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties96 = new A.DefaultRunProperties() { FontSize = 1000 }; level6ParagraphProperties10.Append(noBullet61); level6ParagraphProperties10.Append(defaultRunProperties96); A.Level7ParagraphProperties level7ParagraphProperties10 = new A.Level7ParagraphProperties() { LeftMargin = 2743200, Indent = 0 }; A.NoBullet noBullet62 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties97 = new A.DefaultRunProperties() { FontSize = 1000 }; level7ParagraphProperties10.Append(noBullet62); level7ParagraphProperties10.Append(defaultRunProperties97); A.Level8ParagraphProperties level8ParagraphProperties10 = new A.Level8ParagraphProperties() { LeftMargin = 3200400, Indent = 0 }; A.NoBullet noBullet63 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties98 = new A.DefaultRunProperties() { FontSize = 1000 }; level8ParagraphProperties10.Append(noBullet63); level8ParagraphProperties10.Append(defaultRunProperties98); A.Level9ParagraphProperties level9ParagraphProperties10 = new A.Level9ParagraphProperties() { LeftMargin = 3657600, Indent = 0 }; A.NoBullet noBullet64 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties99 = new A.DefaultRunProperties() { FontSize = 1000 }; level9ParagraphProperties10.Append(noBullet64); level9ParagraphProperties10.Append(defaultRunProperties99); listStyle62.Append(level1ParagraphProperties18); listStyle62.Append(level2ParagraphProperties10); listStyle62.Append(level3ParagraphProperties10); listStyle62.Append(level4ParagraphProperties10); listStyle62.Append(level5ParagraphProperties10); listStyle62.Append(level6ParagraphProperties10); listStyle62.Append(level7ParagraphProperties10); listStyle62.Append(level8ParagraphProperties10); listStyle62.Append(level9ParagraphProperties10); A.Paragraph paragraph98 = new A.Paragraph(); A.ParagraphProperties paragraphProperties50 = new A.ParagraphProperties() { Level = 0 }; A.Run run137 = new A.Run(); A.RunProperties runProperties159 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text159 = new A.Text(); text159.Text = "マスター テキストの書式設定"; run137.Append(runProperties159); run137.Append(text159); paragraph98.Append(paragraphProperties50); paragraph98.Append(run137); textBody62.Append(bodyProperties62); textBody62.Append(listStyle62); textBody62.Append(paragraph98); shape62.Append(nonVisualShapeProperties62); shape62.Append(shapeProperties62); shape62.Append(textBody62); Shape shape63 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties63 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties76 = new NonVisualDrawingProperties() { Id = (UInt32Value)5U, Name = "Date Placeholder 4" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties63 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks63 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties63.Append(shapeLocks63); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties76 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape63 = new PlaceholderShape() { Type = PlaceholderValues.DateAndTime, Size = PlaceholderSizeValues.Half, Index = (UInt32Value)10U }; applicationNonVisualDrawingProperties76.Append(placeholderShape63); nonVisualShapeProperties63.Append(nonVisualDrawingProperties76); nonVisualShapeProperties63.Append(nonVisualShapeDrawingProperties63); nonVisualShapeProperties63.Append(applicationNonVisualDrawingProperties76); ShapeProperties shapeProperties63 = new ShapeProperties(); TextBody textBody63 = new TextBody(); A.BodyProperties bodyProperties63 = new A.BodyProperties(); A.ListStyle listStyle63 = new A.ListStyle(); A.Paragraph paragraph99 = new A.Paragraph(); A.Field field23 = new A.Field() { Id = "{BFFF7C5F-97F4-4B42-9C39-61661A529470}", Type = "datetimeFigureOut" }; A.RunProperties runProperties160 = new A.RunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; runProperties160.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.Text text160 = new A.Text(); text160.Text = "2018/5/3"; field23.Append(runProperties160); field23.Append(text160); A.EndParagraphRunProperties endParagraphRunProperties56 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph99.Append(field23); paragraph99.Append(endParagraphRunProperties56); textBody63.Append(bodyProperties63); textBody63.Append(listStyle63); textBody63.Append(paragraph99); shape63.Append(nonVisualShapeProperties63); shape63.Append(shapeProperties63); shape63.Append(textBody63); Shape shape64 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties64 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties77 = new NonVisualDrawingProperties() { Id = (UInt32Value)6U, Name = "Footer Placeholder 5" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties64 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks64 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties64.Append(shapeLocks64); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties77 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape64 = new PlaceholderShape() { Type = PlaceholderValues.Footer, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)11U }; applicationNonVisualDrawingProperties77.Append(placeholderShape64); nonVisualShapeProperties64.Append(nonVisualDrawingProperties77); nonVisualShapeProperties64.Append(nonVisualShapeDrawingProperties64); nonVisualShapeProperties64.Append(applicationNonVisualDrawingProperties77); ShapeProperties shapeProperties64 = new ShapeProperties(); TextBody textBody64 = new TextBody(); A.BodyProperties bodyProperties64 = new A.BodyProperties(); A.ListStyle listStyle64 = new A.ListStyle(); A.Paragraph paragraph100 = new A.Paragraph(); A.EndParagraphRunProperties endParagraphRunProperties57 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph100.Append(endParagraphRunProperties57); textBody64.Append(bodyProperties64); textBody64.Append(listStyle64); textBody64.Append(paragraph100); shape64.Append(nonVisualShapeProperties64); shape64.Append(shapeProperties64); shape64.Append(textBody64); Shape shape65 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties65 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties78 = new NonVisualDrawingProperties() { Id = (UInt32Value)7U, Name = "Slide Number Placeholder 6" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties65 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks65 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties65.Append(shapeLocks65); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties78 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape65 = new PlaceholderShape() { Type = PlaceholderValues.SlideNumber, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)12U }; applicationNonVisualDrawingProperties78.Append(placeholderShape65); nonVisualShapeProperties65.Append(nonVisualDrawingProperties78); nonVisualShapeProperties65.Append(nonVisualShapeDrawingProperties65); nonVisualShapeProperties65.Append(applicationNonVisualDrawingProperties78); ShapeProperties shapeProperties65 = new ShapeProperties(); TextBody textBody65 = new TextBody(); A.BodyProperties bodyProperties65 = new A.BodyProperties(); A.ListStyle listStyle65 = new A.ListStyle(); A.Paragraph paragraph101 = new A.Paragraph(); A.Field field24 = new A.Field() { Id = "{10647DAF-1A54-42E0-9176-57F2D0EA6A3B}", Type = "slidenum" }; A.RunProperties runProperties161 = new A.RunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; runProperties161.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.Text text161 = new A.Text(); text161.Text = "‹#›"; field24.Append(runProperties161); field24.Append(text161); A.EndParagraphRunProperties endParagraphRunProperties58 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph101.Append(field24); paragraph101.Append(endParagraphRunProperties58); textBody65.Append(bodyProperties65); textBody65.Append(listStyle65); textBody65.Append(paragraph101); shape65.Append(nonVisualShapeProperties65); shape65.Append(shapeProperties65); shape65.Append(textBody65); shapeTree13.Append(nonVisualGroupShapeProperties13); shapeTree13.Append(groupShapeProperties13); shapeTree13.Append(shape60); shapeTree13.Append(shape61); shapeTree13.Append(shape62); shapeTree13.Append(shape63); shapeTree13.Append(shape64); shapeTree13.Append(shape65); CommonSlideDataExtensionList commonSlideDataExtensionList13 = new CommonSlideDataExtensionList(); CommonSlideDataExtension commonSlideDataExtension13 = new CommonSlideDataExtension() { Uri = "{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}" }; P14.CreationId creationId13 = new P14.CreationId() { Val = (UInt32Value)1096028932U }; creationId13.AddNamespaceDeclaration("p14", "http://schemas.microsoft.com/office/powerpoint/2010/main"); commonSlideDataExtension13.Append(creationId13); commonSlideDataExtensionList13.Append(commonSlideDataExtension13); commonSlideData13.Append(shapeTree13); commonSlideData13.Append(commonSlideDataExtensionList13); ColorMapOverride colorMapOverride12 = new ColorMapOverride(); A.MasterColorMapping masterColorMapping12 = new A.MasterColorMapping(); colorMapOverride12.Append(masterColorMapping12); slideLayout11.Append(commonSlideData13); slideLayout11.Append(colorMapOverride12); slideLayoutPart.SlideLayout = slideLayout11; return(slideLayoutPart); }
public void SetPPTShapeText(string[] arrayParameters, int numSlide) { using (PresentationDocument ppt = PresentationDocument.Open(HttpContext.Current.Server.MapPath(folder), true)) { numSlide--; IEnumerable <Shape> elementSlide; PresentationPart part = ppt.PresentationPart; OpenXmlElementList slideIds = part.Presentation.SlideIdList.ChildElements; string relId = (slideIds[numSlide] as SlideId).RelationshipId; SlidePart slide = (SlidePart)part.GetPartById(relId); if (slide != null) { ShapeTree tree = slide.Slide.CommonSlideData.ShapeTree; elementSlide = tree.Elements <Shape>(); foreach (Shape shape1 in elementSlide) { string valueStr = shape1.NonVisualShapeProperties.NonVisualDrawingProperties.Name.Value; switch (valueStr) { case "Заголовок 1": Drawing.Paragraph paragraph1 = shape1.TextBody.ChildElements.OfType <Drawing.Paragraph>().ElementAt(0); Drawing.Run run1 = paragraph1.ChildElements.OfType <Drawing.Run>().ElementAt(0); run1.Text.Text = arrayParameters[0]; slide.Slide.Save(); break; case "Прямоугольник 4": paragraph1 = shape1.TextBody.ChildElements.OfType <Drawing.Paragraph>().ElementAt(0); run1 = paragraph1.ChildElements.OfType <Drawing.Run>().ElementAt(0); run1.Text.Text = arrayParameters[1]; slide.Slide.Save(); break; case "Прямоугольник 6": paragraph1 = shape1.TextBody.ChildElements.OfType <Drawing.Paragraph>().ElementAt(0); run1 = paragraph1.ChildElements.OfType <Drawing.Run>().ElementAt(0); run1.Text.Text = arrayParameters[2]; slide.Slide.Save(); break; case "Прямоугольник 9": paragraph1 = shape1.TextBody.ChildElements.OfType <Drawing.Paragraph>().ElementAt(0); run1 = paragraph1.ChildElements.OfType <Drawing.Run>().ElementAt(0); run1.Text.Text = arrayParameters[3]; slide.Slide.Save(); break; case "Прямоугольник 11": paragraph1 = shape1.TextBody.ChildElements.OfType <Drawing.Paragraph>().ElementAt(0); run1 = paragraph1.ChildElements.OfType <Drawing.Run>().ElementAt(0); run1.Text.Text = arrayParameters[4]; slide.Slide.Save(); break; case "Прямоугольник 13": paragraph1 = shape1.TextBody.ChildElements.OfType <Drawing.Paragraph>().ElementAt(0); run1 = paragraph1.ChildElements.OfType <Drawing.Run>().ElementAt(0); run1.Text.Text = arrayParameters[5]; slide.Slide.Save(); break; case "Прямоугольник 18": paragraph1 = shape1.TextBody.ChildElements.OfType <Drawing.Paragraph>().ElementAt(0); run1 = paragraph1.ChildElements.OfType <Drawing.Run>().ElementAt(0); run1.Text.Text = arrayParameters[6]; slide.Slide.Save(); break; case "Прямоугольник 20": paragraph1 = shape1.TextBody.ChildElements.OfType <Drawing.Paragraph>().ElementAt(0); run1 = paragraph1.ChildElements.OfType <Drawing.Run>().ElementAt(0); run1.Text.Text = arrayParameters[7]; slide.Slide.Save(); break; } } } ppt.Close(); } }
private ShapeTree InitCommonProperty(Slide slide1) { CommonSlideData commonSlideData1 = new CommonSlideData(); ShapeTree shapeTree1 = new ShapeTree(); NonVisualGroupShapeProperties nonVisualGroupShapeProperties1 = new NonVisualGroupShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties1 = new NonVisualDrawingProperties() { Id = (UInt32Value)1U, Name = "" }; NonVisualGroupShapeDrawingProperties nonVisualGroupShapeDrawingProperties1 = new NonVisualGroupShapeDrawingProperties(); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties1 = new ApplicationNonVisualDrawingProperties(); nonVisualGroupShapeProperties1.Append(nonVisualDrawingProperties1); nonVisualGroupShapeProperties1.Append(nonVisualGroupShapeDrawingProperties1); nonVisualGroupShapeProperties1.Append(applicationNonVisualDrawingProperties1); GroupShapeProperties groupShapeProperties1 = new GroupShapeProperties(); A.TransformGroup transformGroup1 = new A.TransformGroup(); A.Offset offset1 = new A.Offset() { X = 0L, Y = 0L }; A.Extents extents1 = new A.Extents() { Cx = 0L, Cy = 0L }; A.ChildOffset childOffset1 = new A.ChildOffset() { X = 0L, Y = 0L }; A.ChildExtents childExtents1 = new A.ChildExtents() { Cx = 0L, Cy = 0L }; transformGroup1.Append(offset1); transformGroup1.Append(extents1); transformGroup1.Append(childOffset1); transformGroup1.Append(childExtents1); groupShapeProperties1.Append(transformGroup1); shapeTree1.Append(nonVisualGroupShapeProperties1); shapeTree1.Append(groupShapeProperties1); CommonSlideDataExtensionList commonSlideDataExtensionList1 = new CommonSlideDataExtensionList(); CommonSlideDataExtension commonSlideDataExtension1 = new CommonSlideDataExtension() { Uri = "{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}" }; P14.CreationId creationId1 = new P14.CreationId() { Val = (UInt32Value)4221661300U }; creationId1.AddNamespaceDeclaration("p14", "http://schemas.microsoft.com/office/powerpoint/2010/main"); commonSlideDataExtension1.Append(creationId1); commonSlideDataExtensionList1.Append(commonSlideDataExtension1); commonSlideData1.Append(shapeTree1); commonSlideData1.Append(commonSlideDataExtensionList1); ColorMapOverride colorMapOverride1 = new ColorMapOverride(); A.MasterColorMapping masterColorMapping1 = new A.MasterColorMapping(); colorMapOverride1.Append(masterColorMapping1); slide1.Append(commonSlideData1); slide1.Append(colorMapOverride1); return(shapeTree1); }
public override SlideLayoutPart CreateSlideLayoutPart(OpenXmlPartContainer containerPart) { SlideLayoutPart slideLayoutPart = containerPart.AddNewPart <SlideLayoutPart>(LayoutSetting.ID); SlideLayout slideLayout5 = new SlideLayout() { Type = SlideLayoutValues.Object, Preserve = true }; slideLayout5.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); slideLayout5.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); slideLayout5.AddNamespaceDeclaration("p", "http://schemas.openxmlformats.org/presentationml/2006/main"); CommonSlideData commonSlideData7 = new CommonSlideData() { Name = LayoutSetting.Name }; ShapeTree shapeTree7 = new ShapeTree(); NonVisualGroupShapeProperties nonVisualGroupShapeProperties7 = new NonVisualGroupShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties33 = new NonVisualDrawingProperties() { Id = (UInt32Value)1U, Name = "" }; NonVisualGroupShapeDrawingProperties nonVisualGroupShapeDrawingProperties7 = new NonVisualGroupShapeDrawingProperties(); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties33 = new ApplicationNonVisualDrawingProperties(); nonVisualGroupShapeProperties7.Append(nonVisualDrawingProperties33); nonVisualGroupShapeProperties7.Append(nonVisualGroupShapeDrawingProperties7); nonVisualGroupShapeProperties7.Append(applicationNonVisualDrawingProperties33); GroupShapeProperties groupShapeProperties7 = new GroupShapeProperties(); A.TransformGroup transformGroup7 = new A.TransformGroup(); A.Offset offset19 = new A.Offset() { X = 0L, Y = 0L }; A.Extents extents19 = new A.Extents() { Cx = 0L, Cy = 0L }; A.ChildOffset childOffset7 = new A.ChildOffset() { X = 0L, Y = 0L }; A.ChildExtents childExtents7 = new A.ChildExtents() { Cx = 0L, Cy = 0L }; transformGroup7.Append(offset19); transformGroup7.Append(extents19); transformGroup7.Append(childOffset7); transformGroup7.Append(childExtents7); groupShapeProperties7.Append(transformGroup7); Shape shape27 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties27 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties34 = new NonVisualDrawingProperties() { Id = (UInt32Value)2U, Name = "Title 1" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties27 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks27 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties27.Append(shapeLocks27); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties34 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape27 = new PlaceholderShape() { Type = PlaceholderValues.Title }; applicationNonVisualDrawingProperties34.Append(placeholderShape27); nonVisualShapeProperties27.Append(nonVisualDrawingProperties34); nonVisualShapeProperties27.Append(nonVisualShapeDrawingProperties27); nonVisualShapeProperties27.Append(applicationNonVisualDrawingProperties34); ShapeProperties shapeProperties27 = new ShapeProperties(); TextBody textBody27 = new TextBody(); A.BodyProperties bodyProperties27 = new A.BodyProperties(); A.ListStyle listStyle27 = new A.ListStyle(); A.Paragraph paragraph35 = new A.Paragraph(); A.Run run36 = new A.Run(); A.RunProperties runProperties46 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text46 = new A.Text(); text46.Text = "マスター タイトルの書式設定"; run36.Append(runProperties46); run36.Append(text46); A.EndParagraphRunProperties endParagraphRunProperties23 = new A.EndParagraphRunProperties() { Language = "en-US", Dirty = false }; paragraph35.Append(run36); paragraph35.Append(endParagraphRunProperties23); textBody27.Append(bodyProperties27); textBody27.Append(listStyle27); textBody27.Append(paragraph35); shape27.Append(nonVisualShapeProperties27); shape27.Append(shapeProperties27); shape27.Append(textBody27); Shape shape28 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties28 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties35 = new NonVisualDrawingProperties() { Id = (UInt32Value)3U, Name = "Content Placeholder 2" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties28 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks28 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties28.Append(shapeLocks28); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties35 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape28 = new PlaceholderShape() { Index = (UInt32Value)1U }; applicationNonVisualDrawingProperties35.Append(placeholderShape28); nonVisualShapeProperties28.Append(nonVisualDrawingProperties35); nonVisualShapeProperties28.Append(nonVisualShapeDrawingProperties28); nonVisualShapeProperties28.Append(applicationNonVisualDrawingProperties35); ShapeProperties shapeProperties28 = new ShapeProperties(); TextBody textBody28 = new TextBody(); A.BodyProperties bodyProperties28 = new A.BodyProperties(); A.ListStyle listStyle28 = new A.ListStyle(); A.Paragraph paragraph36 = new A.Paragraph(); A.ParagraphProperties paragraphProperties13 = new A.ParagraphProperties() { Level = 0 }; A.Run run37 = new A.Run(); A.RunProperties runProperties47 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text47 = new A.Text(); text47.Text = "マスター テキストの書式設定"; run37.Append(runProperties47); run37.Append(text47); paragraph36.Append(paragraphProperties13); paragraph36.Append(run37); A.Paragraph paragraph37 = new A.Paragraph(); A.ParagraphProperties paragraphProperties14 = new A.ParagraphProperties() { Level = 1 }; A.Run run38 = new A.Run(); A.RunProperties runProperties48 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text48 = new A.Text(); text48.Text = "第 "; run38.Append(runProperties48); run38.Append(text48); A.Run run39 = new A.Run(); A.RunProperties runProperties49 = new A.RunProperties() { Language = "en-US", AlternativeLanguage = "ja-JP" }; A.Text text49 = new A.Text(); text49.Text = "2 "; run39.Append(runProperties49); run39.Append(text49); A.Run run40 = new A.Run(); A.RunProperties runProperties50 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text50 = new A.Text(); text50.Text = "レベル"; run40.Append(runProperties50); run40.Append(text50); paragraph37.Append(paragraphProperties14); paragraph37.Append(run38); paragraph37.Append(run39); paragraph37.Append(run40); A.Paragraph paragraph38 = new A.Paragraph(); A.ParagraphProperties paragraphProperties15 = new A.ParagraphProperties() { Level = 2 }; A.Run run41 = new A.Run(); A.RunProperties runProperties51 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text51 = new A.Text(); text51.Text = "第 "; run41.Append(runProperties51); run41.Append(text51); A.Run run42 = new A.Run(); A.RunProperties runProperties52 = new A.RunProperties() { Language = "en-US", AlternativeLanguage = "ja-JP" }; A.Text text52 = new A.Text(); text52.Text = "3 "; run42.Append(runProperties52); run42.Append(text52); A.Run run43 = new A.Run(); A.RunProperties runProperties53 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text53 = new A.Text(); text53.Text = "レベル"; run43.Append(runProperties53); run43.Append(text53); paragraph38.Append(paragraphProperties15); paragraph38.Append(run41); paragraph38.Append(run42); paragraph38.Append(run43); A.Paragraph paragraph39 = new A.Paragraph(); A.ParagraphProperties paragraphProperties16 = new A.ParagraphProperties() { Level = 3 }; A.Run run44 = new A.Run(); A.RunProperties runProperties54 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text54 = new A.Text(); text54.Text = "第 "; run44.Append(runProperties54); run44.Append(text54); A.Run run45 = new A.Run(); A.RunProperties runProperties55 = new A.RunProperties() { Language = "en-US", AlternativeLanguage = "ja-JP" }; A.Text text55 = new A.Text(); text55.Text = "4 "; run45.Append(runProperties55); run45.Append(text55); A.Run run46 = new A.Run(); A.RunProperties runProperties56 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text56 = new A.Text(); text56.Text = "レベル"; run46.Append(runProperties56); run46.Append(text56); paragraph39.Append(paragraphProperties16); paragraph39.Append(run44); paragraph39.Append(run45); paragraph39.Append(run46); A.Paragraph paragraph40 = new A.Paragraph(); A.ParagraphProperties paragraphProperties17 = new A.ParagraphProperties() { Level = 4 }; A.Run run47 = new A.Run(); A.RunProperties runProperties57 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text57 = new A.Text(); text57.Text = "第 "; run47.Append(runProperties57); run47.Append(text57); A.Run run48 = new A.Run(); A.RunProperties runProperties58 = new A.RunProperties() { Language = "en-US", AlternativeLanguage = "ja-JP" }; A.Text text58 = new A.Text(); text58.Text = "5 "; run48.Append(runProperties58); run48.Append(text58); A.Run run49 = new A.Run(); A.RunProperties runProperties59 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text59 = new A.Text(); text59.Text = "レベル"; run49.Append(runProperties59); run49.Append(text59); A.EndParagraphRunProperties endParagraphRunProperties24 = new A.EndParagraphRunProperties() { Language = "en-US", Dirty = false }; paragraph40.Append(paragraphProperties17); paragraph40.Append(run47); paragraph40.Append(run48); paragraph40.Append(run49); paragraph40.Append(endParagraphRunProperties24); textBody28.Append(bodyProperties28); textBody28.Append(listStyle28); textBody28.Append(paragraph36); textBody28.Append(paragraph37); textBody28.Append(paragraph38); textBody28.Append(paragraph39); textBody28.Append(paragraph40); shape28.Append(nonVisualShapeProperties28); shape28.Append(shapeProperties28); shape28.Append(textBody28); Shape shape29 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties29 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties36 = new NonVisualDrawingProperties() { Id = (UInt32Value)4U, Name = "Date Placeholder 3" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties29 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks29 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties29.Append(shapeLocks29); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties36 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape29 = new PlaceholderShape() { Type = PlaceholderValues.DateAndTime, Size = PlaceholderSizeValues.Half, Index = (UInt32Value)10U }; applicationNonVisualDrawingProperties36.Append(placeholderShape29); nonVisualShapeProperties29.Append(nonVisualDrawingProperties36); nonVisualShapeProperties29.Append(nonVisualShapeDrawingProperties29); nonVisualShapeProperties29.Append(applicationNonVisualDrawingProperties36); ShapeProperties shapeProperties29 = new ShapeProperties(); TextBody textBody29 = new TextBody(); A.BodyProperties bodyProperties29 = new A.BodyProperties(); A.ListStyle listStyle29 = new A.ListStyle(); A.Paragraph paragraph41 = new A.Paragraph(); A.Field field11 = new A.Field() { Id = "{BFFF7C5F-97F4-4B42-9C39-61661A529470}", Type = "datetimeFigureOut" }; A.RunProperties runProperties60 = new A.RunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; runProperties60.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.Text text60 = new A.Text(); text60.Text = "2018/5/3"; field11.Append(runProperties60); field11.Append(text60); A.EndParagraphRunProperties endParagraphRunProperties25 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph41.Append(field11); paragraph41.Append(endParagraphRunProperties25); textBody29.Append(bodyProperties29); textBody29.Append(listStyle29); textBody29.Append(paragraph41); shape29.Append(nonVisualShapeProperties29); shape29.Append(shapeProperties29); shape29.Append(textBody29); Shape shape30 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties30 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties37 = new NonVisualDrawingProperties() { Id = (UInt32Value)5U, Name = "Footer Placeholder 4" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties30 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks30 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties30.Append(shapeLocks30); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties37 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape30 = new PlaceholderShape() { Type = PlaceholderValues.Footer, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)11U }; applicationNonVisualDrawingProperties37.Append(placeholderShape30); nonVisualShapeProperties30.Append(nonVisualDrawingProperties37); nonVisualShapeProperties30.Append(nonVisualShapeDrawingProperties30); nonVisualShapeProperties30.Append(applicationNonVisualDrawingProperties37); ShapeProperties shapeProperties30 = new ShapeProperties(); TextBody textBody30 = new TextBody(); A.BodyProperties bodyProperties30 = new A.BodyProperties(); A.ListStyle listStyle30 = new A.ListStyle(); A.Paragraph paragraph42 = new A.Paragraph(); A.EndParagraphRunProperties endParagraphRunProperties26 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph42.Append(endParagraphRunProperties26); textBody30.Append(bodyProperties30); textBody30.Append(listStyle30); textBody30.Append(paragraph42); shape30.Append(nonVisualShapeProperties30); shape30.Append(shapeProperties30); shape30.Append(textBody30); Shape shape31 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties31 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties38 = new NonVisualDrawingProperties() { Id = (UInt32Value)6U, Name = "Slide Number Placeholder 5" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties31 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks31 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties31.Append(shapeLocks31); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties38 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape31 = new PlaceholderShape() { Type = PlaceholderValues.SlideNumber, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)12U }; applicationNonVisualDrawingProperties38.Append(placeholderShape31); nonVisualShapeProperties31.Append(nonVisualDrawingProperties38); nonVisualShapeProperties31.Append(nonVisualShapeDrawingProperties31); nonVisualShapeProperties31.Append(applicationNonVisualDrawingProperties38); ShapeProperties shapeProperties31 = new ShapeProperties(); TextBody textBody31 = new TextBody(); A.BodyProperties bodyProperties31 = new A.BodyProperties(); A.ListStyle listStyle31 = new A.ListStyle(); A.Paragraph paragraph43 = new A.Paragraph(); A.Field field12 = new A.Field() { Id = "{10647DAF-1A54-42E0-9176-57F2D0EA6A3B}", Type = "slidenum" }; A.RunProperties runProperties61 = new A.RunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; runProperties61.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.Text text61 = new A.Text(); text61.Text = "‹#›"; field12.Append(runProperties61); field12.Append(text61); A.EndParagraphRunProperties endParagraphRunProperties27 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph43.Append(field12); paragraph43.Append(endParagraphRunProperties27); textBody31.Append(bodyProperties31); textBody31.Append(listStyle31); textBody31.Append(paragraph43); shape31.Append(nonVisualShapeProperties31); shape31.Append(shapeProperties31); shape31.Append(textBody31); shapeTree7.Append(nonVisualGroupShapeProperties7); shapeTree7.Append(groupShapeProperties7); shapeTree7.Append(shape27); shapeTree7.Append(shape28); shapeTree7.Append(shape29); shapeTree7.Append(shape30); shapeTree7.Append(shape31); CommonSlideDataExtensionList commonSlideDataExtensionList7 = new CommonSlideDataExtensionList(); CommonSlideDataExtension commonSlideDataExtension7 = new CommonSlideDataExtension() { Uri = "{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}" }; P14.CreationId creationId7 = new P14.CreationId() { Val = (UInt32Value)86824656U }; creationId7.AddNamespaceDeclaration("p14", "http://schemas.microsoft.com/office/powerpoint/2010/main"); commonSlideDataExtension7.Append(creationId7); commonSlideDataExtensionList7.Append(commonSlideDataExtension7); commonSlideData7.Append(shapeTree7); commonSlideData7.Append(commonSlideDataExtensionList7); ColorMapOverride colorMapOverride6 = new ColorMapOverride(); A.MasterColorMapping masterColorMapping6 = new A.MasterColorMapping(); colorMapOverride6.Append(masterColorMapping6); slideLayout5.Append(commonSlideData7); slideLayout5.Append(colorMapOverride6); slideLayoutPart.SlideLayout = slideLayout5; return(slideLayoutPart); }
public override SlideLayoutPart CreateSlideLayoutPart(OpenXmlPartContainer containerPart) { SlideLayoutPart slideLayoutPart = containerPart.AddNewPart <SlideLayoutPart>(LayoutSetting.ID); SlideLayout slideLayout3 = new SlideLayout() { Type = SlideLayoutValues.SectionHeader, Preserve = true }; slideLayout3.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); slideLayout3.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); slideLayout3.AddNamespaceDeclaration("p", "http://schemas.openxmlformats.org/presentationml/2006/main"); CommonSlideData commonSlideData5 = new CommonSlideData() { Name = LayoutSetting.Name }; ShapeTree shapeTree5 = new ShapeTree(); NonVisualGroupShapeProperties nonVisualGroupShapeProperties5 = new NonVisualGroupShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties23 = new NonVisualDrawingProperties() { Id = (UInt32Value)1U, Name = "" }; NonVisualGroupShapeDrawingProperties nonVisualGroupShapeDrawingProperties5 = new NonVisualGroupShapeDrawingProperties(); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties23 = new ApplicationNonVisualDrawingProperties(); nonVisualGroupShapeProperties5.Append(nonVisualDrawingProperties23); nonVisualGroupShapeProperties5.Append(nonVisualGroupShapeDrawingProperties5); nonVisualGroupShapeProperties5.Append(applicationNonVisualDrawingProperties23); GroupShapeProperties groupShapeProperties5 = new GroupShapeProperties(); A.TransformGroup transformGroup5 = new A.TransformGroup(); A.Offset offset15 = new A.Offset() { X = 0L, Y = 0L }; A.Extents extents15 = new A.Extents() { Cx = 0L, Cy = 0L }; A.ChildOffset childOffset5 = new A.ChildOffset() { X = 0L, Y = 0L }; A.ChildExtents childExtents5 = new A.ChildExtents() { Cx = 0L, Cy = 0L }; transformGroup5.Append(offset15); transformGroup5.Append(extents15); transformGroup5.Append(childOffset5); transformGroup5.Append(childExtents5); groupShapeProperties5.Append(transformGroup5); Shape shape19 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties19 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties24 = new NonVisualDrawingProperties() { Id = (UInt32Value)2U, Name = "Title 1" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties19 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks19 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties19.Append(shapeLocks19); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties24 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape19 = new PlaceholderShape() { Type = PlaceholderValues.Title }; applicationNonVisualDrawingProperties24.Append(placeholderShape19); nonVisualShapeProperties19.Append(nonVisualDrawingProperties24); nonVisualShapeProperties19.Append(nonVisualShapeDrawingProperties19); nonVisualShapeProperties19.Append(applicationNonVisualDrawingProperties24); ShapeProperties shapeProperties19 = new ShapeProperties(); A.Transform2D transform2D11 = new A.Transform2D(); A.Offset offset16 = new A.Offset() { X = 623888L, Y = 1709739L }; A.Extents extents16 = new A.Extents() { Cx = 7886700L, Cy = 2852737L }; transform2D11.Append(offset16); transform2D11.Append(extents16); shapeProperties19.Append(transform2D11); TextBody textBody19 = new TextBody(); A.BodyProperties bodyProperties19 = new A.BodyProperties() { Anchor = A.TextAnchoringTypeValues.Bottom }; A.ListStyle listStyle19 = new A.ListStyle(); A.Level1ParagraphProperties level1ParagraphProperties12 = new A.Level1ParagraphProperties(); A.DefaultRunProperties defaultRunProperties53 = new A.DefaultRunProperties() { FontSize = 6000 }; level1ParagraphProperties12.Append(defaultRunProperties53); listStyle19.Append(level1ParagraphProperties12); A.Paragraph paragraph27 = new A.Paragraph(); A.Run run34 = new A.Run(); A.RunProperties runProperties40 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text40 = new A.Text(); text40.Text = "マスター タイトルの書式設定"; run34.Append(runProperties40); run34.Append(text40); A.EndParagraphRunProperties endParagraphRunProperties16 = new A.EndParagraphRunProperties() { Language = "en-US", Dirty = false }; paragraph27.Append(run34); paragraph27.Append(endParagraphRunProperties16); textBody19.Append(bodyProperties19); textBody19.Append(listStyle19); textBody19.Append(paragraph27); shape19.Append(nonVisualShapeProperties19); shape19.Append(shapeProperties19); shape19.Append(textBody19); Shape shape20 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties20 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties25 = new NonVisualDrawingProperties() { Id = (UInt32Value)3U, Name = "Text Placeholder 2" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties20 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks20 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties20.Append(shapeLocks20); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties25 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape20 = new PlaceholderShape() { Type = PlaceholderValues.Body, Index = (UInt32Value)1U }; applicationNonVisualDrawingProperties25.Append(placeholderShape20); nonVisualShapeProperties20.Append(nonVisualDrawingProperties25); nonVisualShapeProperties20.Append(nonVisualShapeDrawingProperties20); nonVisualShapeProperties20.Append(applicationNonVisualDrawingProperties25); ShapeProperties shapeProperties20 = new ShapeProperties(); A.Transform2D transform2D12 = new A.Transform2D(); A.Offset offset17 = new A.Offset() { X = 623888L, Y = 4589464L }; A.Extents extents17 = new A.Extents() { Cx = 7886700L, Cy = 1500187L }; transform2D12.Append(offset17); transform2D12.Append(extents17); shapeProperties20.Append(transform2D12); TextBody textBody20 = new TextBody(); A.BodyProperties bodyProperties20 = new A.BodyProperties(); A.ListStyle listStyle20 = new A.ListStyle(); A.Level1ParagraphProperties level1ParagraphProperties13 = new A.Level1ParagraphProperties() { LeftMargin = 0, Indent = 0 }; A.NoBullet noBullet20 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties54 = new A.DefaultRunProperties() { FontSize = 2400 }; A.SolidFill solidFill23 = new A.SolidFill(); A.SchemeColor schemeColor24 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; solidFill23.Append(schemeColor24); defaultRunProperties54.Append(solidFill23); level1ParagraphProperties13.Append(noBullet20); level1ParagraphProperties13.Append(defaultRunProperties54); A.Level2ParagraphProperties level2ParagraphProperties6 = new A.Level2ParagraphProperties() { LeftMargin = 457200, Indent = 0 }; A.NoBullet noBullet21 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties55 = new A.DefaultRunProperties() { FontSize = 2000 }; A.SolidFill solidFill24 = new A.SolidFill(); A.SchemeColor schemeColor25 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; A.Tint tint4 = new A.Tint() { Val = 75000 }; schemeColor25.Append(tint4); solidFill24.Append(schemeColor25); defaultRunProperties55.Append(solidFill24); level2ParagraphProperties6.Append(noBullet21); level2ParagraphProperties6.Append(defaultRunProperties55); A.Level3ParagraphProperties level3ParagraphProperties6 = new A.Level3ParagraphProperties() { LeftMargin = 914400, Indent = 0 }; A.NoBullet noBullet22 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties56 = new A.DefaultRunProperties() { FontSize = 1800 }; A.SolidFill solidFill25 = new A.SolidFill(); A.SchemeColor schemeColor26 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; A.Tint tint5 = new A.Tint() { Val = 75000 }; schemeColor26.Append(tint5); solidFill25.Append(schemeColor26); defaultRunProperties56.Append(solidFill25); level3ParagraphProperties6.Append(noBullet22); level3ParagraphProperties6.Append(defaultRunProperties56); A.Level4ParagraphProperties level4ParagraphProperties6 = new A.Level4ParagraphProperties() { LeftMargin = 1371600, Indent = 0 }; A.NoBullet noBullet23 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties57 = new A.DefaultRunProperties() { FontSize = 1600 }; A.SolidFill solidFill26 = new A.SolidFill(); A.SchemeColor schemeColor27 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; A.Tint tint6 = new A.Tint() { Val = 75000 }; schemeColor27.Append(tint6); solidFill26.Append(schemeColor27); defaultRunProperties57.Append(solidFill26); level4ParagraphProperties6.Append(noBullet23); level4ParagraphProperties6.Append(defaultRunProperties57); A.Level5ParagraphProperties level5ParagraphProperties6 = new A.Level5ParagraphProperties() { LeftMargin = 1828800, Indent = 0 }; A.NoBullet noBullet24 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties58 = new A.DefaultRunProperties() { FontSize = 1600 }; A.SolidFill solidFill27 = new A.SolidFill(); A.SchemeColor schemeColor28 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; A.Tint tint7 = new A.Tint() { Val = 75000 }; schemeColor28.Append(tint7); solidFill27.Append(schemeColor28); defaultRunProperties58.Append(solidFill27); level5ParagraphProperties6.Append(noBullet24); level5ParagraphProperties6.Append(defaultRunProperties58); A.Level6ParagraphProperties level6ParagraphProperties6 = new A.Level6ParagraphProperties() { LeftMargin = 2286000, Indent = 0 }; A.NoBullet noBullet25 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties59 = new A.DefaultRunProperties() { FontSize = 1600 }; A.SolidFill solidFill28 = new A.SolidFill(); A.SchemeColor schemeColor29 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; A.Tint tint8 = new A.Tint() { Val = 75000 }; schemeColor29.Append(tint8); solidFill28.Append(schemeColor29); defaultRunProperties59.Append(solidFill28); level6ParagraphProperties6.Append(noBullet25); level6ParagraphProperties6.Append(defaultRunProperties59); A.Level7ParagraphProperties level7ParagraphProperties6 = new A.Level7ParagraphProperties() { LeftMargin = 2743200, Indent = 0 }; A.NoBullet noBullet26 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties60 = new A.DefaultRunProperties() { FontSize = 1600 }; A.SolidFill solidFill29 = new A.SolidFill(); A.SchemeColor schemeColor30 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; A.Tint tint9 = new A.Tint() { Val = 75000 }; schemeColor30.Append(tint9); solidFill29.Append(schemeColor30); defaultRunProperties60.Append(solidFill29); level7ParagraphProperties6.Append(noBullet26); level7ParagraphProperties6.Append(defaultRunProperties60); A.Level8ParagraphProperties level8ParagraphProperties6 = new A.Level8ParagraphProperties() { LeftMargin = 3200400, Indent = 0 }; A.NoBullet noBullet27 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties61 = new A.DefaultRunProperties() { FontSize = 1600 }; A.SolidFill solidFill30 = new A.SolidFill(); A.SchemeColor schemeColor31 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; A.Tint tint10 = new A.Tint() { Val = 75000 }; schemeColor31.Append(tint10); solidFill30.Append(schemeColor31); defaultRunProperties61.Append(solidFill30); level8ParagraphProperties6.Append(noBullet27); level8ParagraphProperties6.Append(defaultRunProperties61); A.Level9ParagraphProperties level9ParagraphProperties6 = new A.Level9ParagraphProperties() { LeftMargin = 3657600, Indent = 0 }; A.NoBullet noBullet28 = new A.NoBullet(); A.DefaultRunProperties defaultRunProperties62 = new A.DefaultRunProperties() { FontSize = 1600 }; A.SolidFill solidFill31 = new A.SolidFill(); A.SchemeColor schemeColor32 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; A.Tint tint11 = new A.Tint() { Val = 75000 }; schemeColor32.Append(tint11); solidFill31.Append(schemeColor32); defaultRunProperties62.Append(solidFill31); level9ParagraphProperties6.Append(noBullet28); level9ParagraphProperties6.Append(defaultRunProperties62); listStyle20.Append(level1ParagraphProperties13); listStyle20.Append(level2ParagraphProperties6); listStyle20.Append(level3ParagraphProperties6); listStyle20.Append(level4ParagraphProperties6); listStyle20.Append(level5ParagraphProperties6); listStyle20.Append(level6ParagraphProperties6); listStyle20.Append(level7ParagraphProperties6); listStyle20.Append(level8ParagraphProperties6); listStyle20.Append(level9ParagraphProperties6); A.Paragraph paragraph28 = new A.Paragraph(); A.ParagraphProperties paragraphProperties12 = new A.ParagraphProperties() { Level = 0 }; A.Run run35 = new A.Run(); A.RunProperties runProperties41 = new A.RunProperties() { Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text41 = new A.Text(); text41.Text = "マスター テキストの書式設定"; run35.Append(runProperties41); run35.Append(text41); paragraph28.Append(paragraphProperties12); paragraph28.Append(run35); textBody20.Append(bodyProperties20); textBody20.Append(listStyle20); textBody20.Append(paragraph28); shape20.Append(nonVisualShapeProperties20); shape20.Append(shapeProperties20); shape20.Append(textBody20); Shape shape21 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties21 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties26 = new NonVisualDrawingProperties() { Id = (UInt32Value)4U, Name = "Date Placeholder 3" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties21 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks21 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties21.Append(shapeLocks21); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties26 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape21 = new PlaceholderShape() { Type = PlaceholderValues.DateAndTime, Size = PlaceholderSizeValues.Half, Index = (UInt32Value)10U }; applicationNonVisualDrawingProperties26.Append(placeholderShape21); nonVisualShapeProperties21.Append(nonVisualDrawingProperties26); nonVisualShapeProperties21.Append(nonVisualShapeDrawingProperties21); nonVisualShapeProperties21.Append(applicationNonVisualDrawingProperties26); ShapeProperties shapeProperties21 = new ShapeProperties(); TextBody textBody21 = new TextBody(); A.BodyProperties bodyProperties21 = new A.BodyProperties(); A.ListStyle listStyle21 = new A.ListStyle(); A.Paragraph paragraph29 = new A.Paragraph(); A.Field field7 = new A.Field() { Id = "{BFFF7C5F-97F4-4B42-9C39-61661A529470}", Type = "datetimeFigureOut" }; A.RunProperties runProperties42 = new A.RunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; runProperties42.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.Text text42 = new A.Text(); text42.Text = "2018/5/3"; field7.Append(runProperties42); field7.Append(text42); A.EndParagraphRunProperties endParagraphRunProperties17 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph29.Append(field7); paragraph29.Append(endParagraphRunProperties17); textBody21.Append(bodyProperties21); textBody21.Append(listStyle21); textBody21.Append(paragraph29); shape21.Append(nonVisualShapeProperties21); shape21.Append(shapeProperties21); shape21.Append(textBody21); Shape shape22 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties22 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties27 = new NonVisualDrawingProperties() { Id = (UInt32Value)5U, Name = "Footer Placeholder 4" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties22 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks22 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties22.Append(shapeLocks22); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties27 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape22 = new PlaceholderShape() { Type = PlaceholderValues.Footer, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)11U }; applicationNonVisualDrawingProperties27.Append(placeholderShape22); nonVisualShapeProperties22.Append(nonVisualDrawingProperties27); nonVisualShapeProperties22.Append(nonVisualShapeDrawingProperties22); nonVisualShapeProperties22.Append(applicationNonVisualDrawingProperties27); ShapeProperties shapeProperties22 = new ShapeProperties(); TextBody textBody22 = new TextBody(); A.BodyProperties bodyProperties22 = new A.BodyProperties(); A.ListStyle listStyle22 = new A.ListStyle(); A.Paragraph paragraph30 = new A.Paragraph(); A.EndParagraphRunProperties endParagraphRunProperties18 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph30.Append(endParagraphRunProperties18); textBody22.Append(bodyProperties22); textBody22.Append(listStyle22); textBody22.Append(paragraph30); shape22.Append(nonVisualShapeProperties22); shape22.Append(shapeProperties22); shape22.Append(textBody22); Shape shape23 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties23 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties28 = new NonVisualDrawingProperties() { Id = (UInt32Value)6U, Name = "Slide Number Placeholder 5" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties23 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks23 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties23.Append(shapeLocks23); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties28 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape23 = new PlaceholderShape() { Type = PlaceholderValues.SlideNumber, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)12U }; applicationNonVisualDrawingProperties28.Append(placeholderShape23); nonVisualShapeProperties23.Append(nonVisualDrawingProperties28); nonVisualShapeProperties23.Append(nonVisualShapeDrawingProperties23); nonVisualShapeProperties23.Append(applicationNonVisualDrawingProperties28); ShapeProperties shapeProperties23 = new ShapeProperties(); TextBody textBody23 = new TextBody(); A.BodyProperties bodyProperties23 = new A.BodyProperties(); A.ListStyle listStyle23 = new A.ListStyle(); A.Paragraph paragraph31 = new A.Paragraph(); A.Field field8 = new A.Field() { Id = "{10647DAF-1A54-42E0-9176-57F2D0EA6A3B}", Type = "slidenum" }; A.RunProperties runProperties43 = new A.RunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; runProperties43.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.Text text43 = new A.Text(); text43.Text = "‹#›"; field8.Append(runProperties43); field8.Append(text43); A.EndParagraphRunProperties endParagraphRunProperties19 = new A.EndParagraphRunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; paragraph31.Append(field8); paragraph31.Append(endParagraphRunProperties19); textBody23.Append(bodyProperties23); textBody23.Append(listStyle23); textBody23.Append(paragraph31); shape23.Append(nonVisualShapeProperties23); shape23.Append(shapeProperties23); shape23.Append(textBody23); shapeTree5.Append(nonVisualGroupShapeProperties5); shapeTree5.Append(groupShapeProperties5); shapeTree5.Append(shape19); shapeTree5.Append(shape20); shapeTree5.Append(shape21); shapeTree5.Append(shape22); shapeTree5.Append(shape23); CommonSlideDataExtensionList commonSlideDataExtensionList5 = new CommonSlideDataExtensionList(); CommonSlideDataExtension commonSlideDataExtension5 = new CommonSlideDataExtension() { Uri = "{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}" }; P14.CreationId creationId5 = new P14.CreationId() { Val = (UInt32Value)2018258302U }; creationId5.AddNamespaceDeclaration("p14", "http://schemas.microsoft.com/office/powerpoint/2010/main"); commonSlideDataExtension5.Append(creationId5); commonSlideDataExtensionList5.Append(commonSlideDataExtension5); commonSlideData5.Append(shapeTree5); commonSlideData5.Append(commonSlideDataExtensionList5); ColorMapOverride colorMapOverride4 = new ColorMapOverride(); A.MasterColorMapping masterColorMapping4 = new A.MasterColorMapping(); colorMapOverride4.Append(masterColorMapping4); slideLayout3.Append(commonSlideData5); slideLayout3.Append(colorMapOverride4); slideLayoutPart.SlideLayout = slideLayout3; return(slideLayoutPart); }
public void GetShapeTreeOfFirstSlide_Valid() { PresentationDocument pres = PowerpointHelper.CreatePresentationWithOneEmptySlide("./testFile2.pptx"); ShapeTree shapeTree = PowerpointHelper.GetShapeTreeOfFirstSlide(pres); }
public static void GenerateHandoutMasterPart1Content(HandoutMasterPart handoutMasterPart1) { HandoutMaster handoutMaster1 = new HandoutMaster(); handoutMaster1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); handoutMaster1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); handoutMaster1.AddNamespaceDeclaration("p", "http://schemas.openxmlformats.org/presentationml/2006/main"); CommonSlideData commonSlideData1 = new CommonSlideData(); Background background1 = new Background(); BackgroundStyleReference backgroundStyleReference1 = new BackgroundStyleReference() { Index = (UInt32Value)1001U }; A.SchemeColor schemeColor10 = new A.SchemeColor() { Val = A.SchemeColorValues.Background1 }; backgroundStyleReference1.Append(schemeColor10); background1.Append(backgroundStyleReference1); ShapeTree shapeTree1 = new ShapeTree(); NonVisualGroupShapeProperties nonVisualGroupShapeProperties1 = new NonVisualGroupShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties1 = new NonVisualDrawingProperties() { Id = (UInt32Value)1U, Name = "" }; NonVisualGroupShapeDrawingProperties nonVisualGroupShapeDrawingProperties1 = new NonVisualGroupShapeDrawingProperties(); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties1 = new ApplicationNonVisualDrawingProperties(); nonVisualGroupShapeProperties1.Append(nonVisualDrawingProperties1); nonVisualGroupShapeProperties1.Append(nonVisualGroupShapeDrawingProperties1); nonVisualGroupShapeProperties1.Append(applicationNonVisualDrawingProperties1); GroupShapeProperties groupShapeProperties1 = new GroupShapeProperties(); A.TransformGroup transformGroup1 = new A.TransformGroup(); A.Offset offset1 = new A.Offset() { X = 0L, Y = 0L }; A.Extents extents1 = new A.Extents() { Cx = 0L, Cy = 0L }; A.ChildOffset childOffset1 = new A.ChildOffset() { X = 0L, Y = 0L }; A.ChildExtents childExtents1 = new A.ChildExtents() { Cx = 0L, Cy = 0L }; transformGroup1.Append(offset1); transformGroup1.Append(extents1); transformGroup1.Append(childOffset1); transformGroup1.Append(childExtents1); groupShapeProperties1.Append(transformGroup1); Shape shape1 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties1 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties2 = new NonVisualDrawingProperties() { Id = (UInt32Value)2U, Name = "Header Placeholder 1" }; A.NonVisualDrawingPropertiesExtensionList nonVisualDrawingPropertiesExtensionList1 = new A.NonVisualDrawingPropertiesExtensionList(); A.NonVisualDrawingPropertiesExtension nonVisualDrawingPropertiesExtension1 = new A.NonVisualDrawingPropertiesExtension() { Uri = "{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}" }; OpenXmlUnknownElement openXmlUnknownElement1 = OpenXmlUnknownElement.CreateOpenXmlUnknownElement("<a16:creationId xmlns:a16=\"http://schemas.microsoft.com/office/drawing/2014/main\" id=\"{6F844995-19E8-4464-BD76-40D129E09750}\" />"); nonVisualDrawingPropertiesExtension1.Append(openXmlUnknownElement1); nonVisualDrawingPropertiesExtensionList1.Append(nonVisualDrawingPropertiesExtension1); nonVisualDrawingProperties2.Append(nonVisualDrawingPropertiesExtensionList1); NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties1 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks1 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties1.Append(shapeLocks1); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties2 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape1 = new PlaceholderShape() { Type = PlaceholderValues.Header, Size = PlaceholderSizeValues.Quarter }; applicationNonVisualDrawingProperties2.Append(placeholderShape1); nonVisualShapeProperties1.Append(nonVisualDrawingProperties2); nonVisualShapeProperties1.Append(nonVisualShapeDrawingProperties1); nonVisualShapeProperties1.Append(applicationNonVisualDrawingProperties2); ShapeProperties shapeProperties1 = new ShapeProperties(); A.Transform2D transform2D1 = new A.Transform2D(); A.Offset offset2 = new A.Offset() { X = 0L, Y = 1L }; A.Extents extents2 = new A.Extents() { Cx = 2946400L, Cy = 495300L }; transform2D1.Append(offset2); transform2D1.Append(extents2); A.PresetGeometry presetGeometry1 = new A.PresetGeometry() { Preset = A.ShapeTypeValues.Rectangle }; A.AdjustValueList adjustValueList1 = new A.AdjustValueList(); presetGeometry1.Append(adjustValueList1); shapeProperties1.Append(transform2D1); shapeProperties1.Append(presetGeometry1); TextBody textBody1 = new TextBody(); A.BodyProperties bodyProperties1 = new A.BodyProperties() { Vertical = A.TextVerticalValues.Horizontal, LeftInset = 91440, TopInset = 45720, RightInset = 91440, BottomInset = 45720, RightToLeftColumns = false }; A.ListStyle listStyle1 = new A.ListStyle(); A.Level1ParagraphProperties level1ParagraphProperties2 = new A.Level1ParagraphProperties() { Alignment = A.TextAlignmentTypeValues.Left }; A.DefaultRunProperties defaultRunProperties11 = new A.DefaultRunProperties() { FontSize = 1200 }; level1ParagraphProperties2.Append(defaultRunProperties11); listStyle1.Append(level1ParagraphProperties2); A.Paragraph paragraph1 = new A.Paragraph(); A.EndParagraphRunProperties endParagraphRunProperties1 = new A.EndParagraphRunProperties() { Language = "en-GB" }; paragraph1.Append(endParagraphRunProperties1); textBody1.Append(bodyProperties1); textBody1.Append(listStyle1); textBody1.Append(paragraph1); shape1.Append(nonVisualShapeProperties1); shape1.Append(shapeProperties1); shape1.Append(textBody1); Shape shape2 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties2 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties3 = new NonVisualDrawingProperties() { Id = (UInt32Value)3U, Name = "Date Placeholder 2" }; A.NonVisualDrawingPropertiesExtensionList nonVisualDrawingPropertiesExtensionList2 = new A.NonVisualDrawingPropertiesExtensionList(); A.NonVisualDrawingPropertiesExtension nonVisualDrawingPropertiesExtension2 = new A.NonVisualDrawingPropertiesExtension() { Uri = "{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}" }; OpenXmlUnknownElement openXmlUnknownElement2 = OpenXmlUnknownElement.CreateOpenXmlUnknownElement("<a16:creationId xmlns:a16=\"http://schemas.microsoft.com/office/drawing/2014/main\" id=\"{DAB3772C-5103-431C-B581-8408B3A89922}\" />"); nonVisualDrawingPropertiesExtension2.Append(openXmlUnknownElement2); nonVisualDrawingPropertiesExtensionList2.Append(nonVisualDrawingPropertiesExtension2); nonVisualDrawingProperties3.Append(nonVisualDrawingPropertiesExtensionList2); NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties2 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks2 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties2.Append(shapeLocks2); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties3 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape2 = new PlaceholderShape() { Type = PlaceholderValues.DateAndTime, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)1U }; applicationNonVisualDrawingProperties3.Append(placeholderShape2); nonVisualShapeProperties2.Append(nonVisualDrawingProperties3); nonVisualShapeProperties2.Append(nonVisualShapeDrawingProperties2); nonVisualShapeProperties2.Append(applicationNonVisualDrawingProperties3); ShapeProperties shapeProperties2 = new ShapeProperties(); A.Transform2D transform2D2 = new A.Transform2D(); A.Offset offset3 = new A.Offset() { X = 3849688L, Y = 1L }; A.Extents extents3 = new A.Extents() { Cx = 2946400L, Cy = 495300L }; transform2D2.Append(offset3); transform2D2.Append(extents3); A.PresetGeometry presetGeometry2 = new A.PresetGeometry() { Preset = A.ShapeTypeValues.Rectangle }; A.AdjustValueList adjustValueList2 = new A.AdjustValueList(); presetGeometry2.Append(adjustValueList2); shapeProperties2.Append(transform2D2); shapeProperties2.Append(presetGeometry2); TextBody textBody2 = new TextBody(); A.BodyProperties bodyProperties2 = new A.BodyProperties() { Vertical = A.TextVerticalValues.Horizontal, LeftInset = 91440, TopInset = 45720, RightInset = 91440, BottomInset = 45720, RightToLeftColumns = false }; A.ListStyle listStyle2 = new A.ListStyle(); A.Level1ParagraphProperties level1ParagraphProperties3 = new A.Level1ParagraphProperties() { Alignment = A.TextAlignmentTypeValues.Right }; A.DefaultRunProperties defaultRunProperties12 = new A.DefaultRunProperties() { FontSize = 1200 }; level1ParagraphProperties3.Append(defaultRunProperties12); listStyle2.Append(level1ParagraphProperties3); A.Paragraph paragraph2 = new A.Paragraph(); A.Field field1 = new A.Field() { Id = "{2193C790-BB76-448B-9064-927E80682452}", Type = "datetimeFigureOut" }; A.RunProperties runProperties1 = new A.RunProperties() { Language = "en-GB" }; runProperties1.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.Text text1 = new A.Text(); text1.Text = $"{DateTime.Now.Day}.{DateTime.Now.Month}.{DateTime.Now.Year}"; field1.Append(runProperties1); field1.Append(text1); A.EndParagraphRunProperties endParagraphRunProperties2 = new A.EndParagraphRunProperties() { Language = "en-GB" }; paragraph2.Append(field1); paragraph2.Append(endParagraphRunProperties2); textBody2.Append(bodyProperties2); textBody2.Append(listStyle2); textBody2.Append(paragraph2); shape2.Append(nonVisualShapeProperties2); shape2.Append(shapeProperties2); shape2.Append(textBody2); Shape shape3 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties3 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties4 = new NonVisualDrawingProperties() { Id = (UInt32Value)4U, Name = "Footer Placeholder 3" }; A.NonVisualDrawingPropertiesExtensionList nonVisualDrawingPropertiesExtensionList3 = new A.NonVisualDrawingPropertiesExtensionList(); A.NonVisualDrawingPropertiesExtension nonVisualDrawingPropertiesExtension3 = new A.NonVisualDrawingPropertiesExtension() { Uri = "{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}" }; OpenXmlUnknownElement openXmlUnknownElement3 = OpenXmlUnknownElement.CreateOpenXmlUnknownElement("<a16:creationId xmlns:a16=\"http://schemas.microsoft.com/office/drawing/2014/main\" id=\"{8F527AE1-483F-4AAE-B350-632A657A43A5}\" />"); nonVisualDrawingPropertiesExtension3.Append(openXmlUnknownElement3); nonVisualDrawingPropertiesExtensionList3.Append(nonVisualDrawingPropertiesExtension3); nonVisualDrawingProperties4.Append(nonVisualDrawingPropertiesExtensionList3); NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties3 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks3 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties3.Append(shapeLocks3); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties4 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape3 = new PlaceholderShape() { Type = PlaceholderValues.Footer, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)2U }; applicationNonVisualDrawingProperties4.Append(placeholderShape3); nonVisualShapeProperties3.Append(nonVisualDrawingProperties4); nonVisualShapeProperties3.Append(nonVisualShapeDrawingProperties3); nonVisualShapeProperties3.Append(applicationNonVisualDrawingProperties4); ShapeProperties shapeProperties3 = new ShapeProperties(); A.Transform2D transform2D3 = new A.Transform2D(); A.Offset offset4 = new A.Offset() { X = 0L, Y = 9378950L }; A.Extents extents4 = new A.Extents() { Cx = 2946400L, Cy = 495300L }; transform2D3.Append(offset4); transform2D3.Append(extents4); A.PresetGeometry presetGeometry3 = new A.PresetGeometry() { Preset = A.ShapeTypeValues.Rectangle }; A.AdjustValueList adjustValueList3 = new A.AdjustValueList(); presetGeometry3.Append(adjustValueList3); shapeProperties3.Append(transform2D3); shapeProperties3.Append(presetGeometry3); TextBody textBody3 = new TextBody(); A.BodyProperties bodyProperties3 = new A.BodyProperties() { Vertical = A.TextVerticalValues.Horizontal, LeftInset = 91440, TopInset = 45720, RightInset = 91440, BottomInset = 45720, RightToLeftColumns = false, Anchor = A.TextAnchoringTypeValues.Bottom }; A.ListStyle listStyle3 = new A.ListStyle(); A.Level1ParagraphProperties level1ParagraphProperties4 = new A.Level1ParagraphProperties() { Alignment = A.TextAlignmentTypeValues.Left }; A.DefaultRunProperties defaultRunProperties13 = new A.DefaultRunProperties() { FontSize = 1200 }; level1ParagraphProperties4.Append(defaultRunProperties13); listStyle3.Append(level1ParagraphProperties4); A.Paragraph paragraph3 = new A.Paragraph(); A.EndParagraphRunProperties endParagraphRunProperties3 = new A.EndParagraphRunProperties() { Language = "en-GB" }; paragraph3.Append(endParagraphRunProperties3); textBody3.Append(bodyProperties3); textBody3.Append(listStyle3); textBody3.Append(paragraph3); shape3.Append(nonVisualShapeProperties3); shape3.Append(shapeProperties3); shape3.Append(textBody3); Shape shape4 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties4 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties5 = new NonVisualDrawingProperties() { Id = (UInt32Value)5U, Name = "Slide Number Placeholder 4" }; A.NonVisualDrawingPropertiesExtensionList nonVisualDrawingPropertiesExtensionList4 = new A.NonVisualDrawingPropertiesExtensionList(); A.NonVisualDrawingPropertiesExtension nonVisualDrawingPropertiesExtension4 = new A.NonVisualDrawingPropertiesExtension() { Uri = "{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}" }; OpenXmlUnknownElement openXmlUnknownElement4 = OpenXmlUnknownElement.CreateOpenXmlUnknownElement("<a16:creationId xmlns:a16=\"http://schemas.microsoft.com/office/drawing/2014/main\" id=\"{B30BB125-185A-4706-BD59-793EEE2C8B8C}\" />"); nonVisualDrawingPropertiesExtension4.Append(openXmlUnknownElement4); nonVisualDrawingPropertiesExtensionList4.Append(nonVisualDrawingPropertiesExtension4); nonVisualDrawingProperties5.Append(nonVisualDrawingPropertiesExtensionList4); NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties4 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks4 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties4.Append(shapeLocks4); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties5 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape4 = new PlaceholderShape() { Type = PlaceholderValues.SlideNumber, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)3U }; applicationNonVisualDrawingProperties5.Append(placeholderShape4); nonVisualShapeProperties4.Append(nonVisualDrawingProperties5); nonVisualShapeProperties4.Append(nonVisualShapeDrawingProperties4); nonVisualShapeProperties4.Append(applicationNonVisualDrawingProperties5); ShapeProperties shapeProperties4 = new ShapeProperties(); A.Transform2D transform2D4 = new A.Transform2D(); A.Offset offset5 = new A.Offset() { X = 3849688L, Y = 9378950L }; A.Extents extents5 = new A.Extents() { Cx = 2946400L, Cy = 495300L }; transform2D4.Append(offset5); transform2D4.Append(extents5); A.PresetGeometry presetGeometry4 = new A.PresetGeometry() { Preset = A.ShapeTypeValues.Rectangle }; A.AdjustValueList adjustValueList4 = new A.AdjustValueList(); presetGeometry4.Append(adjustValueList4); shapeProperties4.Append(transform2D4); shapeProperties4.Append(presetGeometry4); TextBody textBody4 = new TextBody(); A.BodyProperties bodyProperties4 = new A.BodyProperties() { Vertical = A.TextVerticalValues.Horizontal, LeftInset = 91440, TopInset = 45720, RightInset = 91440, BottomInset = 45720, RightToLeftColumns = false, Anchor = A.TextAnchoringTypeValues.Bottom }; A.ListStyle listStyle4 = new A.ListStyle(); A.Level1ParagraphProperties level1ParagraphProperties5 = new A.Level1ParagraphProperties() { Alignment = A.TextAlignmentTypeValues.Right }; A.DefaultRunProperties defaultRunProperties14 = new A.DefaultRunProperties() { FontSize = 1200 }; level1ParagraphProperties5.Append(defaultRunProperties14); listStyle4.Append(level1ParagraphProperties5); A.Paragraph paragraph4 = new A.Paragraph(); A.Field field2 = new A.Field() { Id = "{409988AC-3923-45CB-9D2C-0BEBFEE96CD9}", Type = "slidenum" }; A.RunProperties runProperties2 = new A.RunProperties() { Language = "en-GB" }; runProperties2.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.Text text2 = new A.Text(); text2.Text = "‹#›"; field2.Append(runProperties2); field2.Append(text2); A.EndParagraphRunProperties endParagraphRunProperties4 = new A.EndParagraphRunProperties() { Language = "en-GB" }; paragraph4.Append(field2); paragraph4.Append(endParagraphRunProperties4); textBody4.Append(bodyProperties4); textBody4.Append(listStyle4); textBody4.Append(paragraph4); shape4.Append(nonVisualShapeProperties4); shape4.Append(shapeProperties4); shape4.Append(textBody4); shapeTree1.Append(nonVisualGroupShapeProperties1); shapeTree1.Append(groupShapeProperties1); shapeTree1.Append(shape1); shapeTree1.Append(shape2); shapeTree1.Append(shape3); shapeTree1.Append(shape4); CommonSlideDataExtensionList commonSlideDataExtensionList1 = new CommonSlideDataExtensionList(); CommonSlideDataExtension commonSlideDataExtension1 = new CommonSlideDataExtension() { Uri = "{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}" }; P14.CreationId creationId1 = new P14.CreationId() { Val = (UInt32Value)1485009629U }; creationId1.AddNamespaceDeclaration("p14", "http://schemas.microsoft.com/office/powerpoint/2010/main"); commonSlideDataExtension1.Append(creationId1); commonSlideDataExtensionList1.Append(commonSlideDataExtension1); commonSlideData1.Append(background1); commonSlideData1.Append(shapeTree1); commonSlideData1.Append(commonSlideDataExtensionList1); ColorMap colorMap1 = new ColorMap() { Background1 = A.ColorSchemeIndexValues.Light1, Text1 = A.ColorSchemeIndexValues.Dark1, Background2 = A.ColorSchemeIndexValues.Light2, Text2 = A.ColorSchemeIndexValues.Dark2, Accent1 = A.ColorSchemeIndexValues.Accent1, Accent2 = A.ColorSchemeIndexValues.Accent2, Accent3 = A.ColorSchemeIndexValues.Accent3, Accent4 = A.ColorSchemeIndexValues.Accent4, Accent5 = A.ColorSchemeIndexValues.Accent5, Accent6 = A.ColorSchemeIndexValues.Accent6, Hyperlink = A.ColorSchemeIndexValues.Hyperlink, FollowedHyperlink = A.ColorSchemeIndexValues.FollowedHyperlink }; handoutMaster1.Append(commonSlideData1); handoutMaster1.Append(colorMap1); handoutMasterPart1.HandoutMaster = handoutMaster1; }
private static void GenerateSlidePart1Content(SlidePart slidePart1, string Title, string SubTitle) { Slide slide1 = new Slide(); slide1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); slide1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); slide1.AddNamespaceDeclaration("p", "http://schemas.openxmlformats.org/presentationml/2006/main"); CommonSlideData commonSlideData1 = new CommonSlideData(); ShapeTree shapeTree1 = new ShapeTree(); NonVisualGroupShapeProperties nonVisualGroupShapeProperties1 = new NonVisualGroupShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties1 = new NonVisualDrawingProperties() { Id = (UInt32Value)1U, Name = "" }; NonVisualGroupShapeDrawingProperties nonVisualGroupShapeDrawingProperties1 = new NonVisualGroupShapeDrawingProperties(); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties1 = new ApplicationNonVisualDrawingProperties(); nonVisualGroupShapeProperties1.Append(nonVisualDrawingProperties1); nonVisualGroupShapeProperties1.Append(nonVisualGroupShapeDrawingProperties1); nonVisualGroupShapeProperties1.Append(applicationNonVisualDrawingProperties1); GroupShapeProperties groupShapeProperties1 = new GroupShapeProperties(); A.TransformGroup transformGroup1 = new A.TransformGroup(); A.Offset offset1 = new A.Offset() { X = 0L, Y = 0L }; A.Extents extents1 = new A.Extents() { Cx = 0L, Cy = 0L }; A.ChildOffset childOffset1 = new A.ChildOffset() { X = 0L, Y = 0L }; A.ChildExtents childExtents1 = new A.ChildExtents() { Cx = 0L, Cy = 0L }; transformGroup1.Append(offset1); transformGroup1.Append(extents1); transformGroup1.Append(childOffset1); transformGroup1.Append(childExtents1); groupShapeProperties1.Append(transformGroup1); Shape shape1 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties1 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties2 = new NonVisualDrawingProperties() { Id = (UInt32Value)4U, Name = "タイトル 3" }; A.NonVisualDrawingPropertiesExtensionList nonVisualDrawingPropertiesExtensionList1 = new A.NonVisualDrawingPropertiesExtensionList(); A.NonVisualDrawingPropertiesExtension nonVisualDrawingPropertiesExtension1 = new A.NonVisualDrawingPropertiesExtension() { Uri = "{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}" }; OpenXmlUnknownElement openXmlUnknownElement1 = OpenXmlUnknownElement.CreateOpenXmlUnknownElement("<a16:creationId xmlns:a16=\"http://schemas.microsoft.com/office/drawing/2014/main\" id=\"{D363C360-A613-482D-ABFE-96D29918ABD2}\" />"); nonVisualDrawingPropertiesExtension1.Append(openXmlUnknownElement1); nonVisualDrawingPropertiesExtensionList1.Append(nonVisualDrawingPropertiesExtension1); nonVisualDrawingProperties2.Append(nonVisualDrawingPropertiesExtensionList1); NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties1 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks1 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties1.Append(shapeLocks1); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties2 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape1 = new PlaceholderShape() { Type = PlaceholderValues.CenteredTitle }; applicationNonVisualDrawingProperties2.Append(placeholderShape1); nonVisualShapeProperties1.Append(nonVisualDrawingProperties2); nonVisualShapeProperties1.Append(nonVisualShapeDrawingProperties1); nonVisualShapeProperties1.Append(applicationNonVisualDrawingProperties2); ShapeProperties shapeProperties1 = new ShapeProperties(); TextBody textBody1 = new TextBody(); A.BodyProperties bodyProperties1 = new A.BodyProperties(); A.ListStyle listStyle1 = new A.ListStyle(); A.Paragraph paragraph1 = new A.Paragraph(); A.Run run1 = new A.Run(); A.RunProperties runProperties1 = new A.RunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US", Dirty = false }; A.Text text1 = new A.Text(); text1.Text = Title; run1.Append(runProperties1); run1.Append(text1); paragraph1.Append(run1); textBody1.Append(bodyProperties1); textBody1.Append(listStyle1); textBody1.Append(paragraph1); shape1.Append(nonVisualShapeProperties1); shape1.Append(shapeProperties1); shape1.Append(textBody1); Shape shape2 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties2 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties3 = new NonVisualDrawingProperties() { Id = (UInt32Value)5U, Name = "字幕 4" }; A.NonVisualDrawingPropertiesExtensionList nonVisualDrawingPropertiesExtensionList2 = new A.NonVisualDrawingPropertiesExtensionList(); A.NonVisualDrawingPropertiesExtension nonVisualDrawingPropertiesExtension2 = new A.NonVisualDrawingPropertiesExtension() { Uri = "{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}" }; OpenXmlUnknownElement openXmlUnknownElement2 = OpenXmlUnknownElement.CreateOpenXmlUnknownElement("<a16:creationId xmlns:a16=\"http://schemas.microsoft.com/office/drawing/2014/main\" id=\"{6CE3DF81-72AF-4DA1-B4EE-02B2D45D0AF8}\" />"); nonVisualDrawingPropertiesExtension2.Append(openXmlUnknownElement2); nonVisualDrawingPropertiesExtensionList2.Append(nonVisualDrawingPropertiesExtension2); nonVisualDrawingProperties3.Append(nonVisualDrawingPropertiesExtensionList2); NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties2 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks2 = new A.ShapeLocks() { NoGrouping = true }; nonVisualShapeDrawingProperties2.Append(shapeLocks2); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties3 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape2 = new PlaceholderShape() { Type = PlaceholderValues.SubTitle, Index = (UInt32Value)1U }; applicationNonVisualDrawingProperties3.Append(placeholderShape2); nonVisualShapeProperties2.Append(nonVisualDrawingProperties3); nonVisualShapeProperties2.Append(nonVisualShapeDrawingProperties2); nonVisualShapeProperties2.Append(applicationNonVisualDrawingProperties3); ShapeProperties shapeProperties2 = new ShapeProperties(); TextBody textBody2 = new TextBody(); A.BodyProperties bodyProperties2 = new A.BodyProperties(); A.ListStyle listStyle2 = new A.ListStyle(); A.Paragraph paragraph2 = new A.Paragraph(); A.Run run2 = new A.Run(); A.RunProperties runProperties2 = new A.RunProperties() { Kumimoji = true, Language = "ja-JP", AlternativeLanguage = "en-US" }; A.Text text2 = new A.Text(); text2.Text = SubTitle; run2.Append(runProperties2); run2.Append(text2); paragraph2.Append(run2); textBody2.Append(bodyProperties2); textBody2.Append(listStyle2); textBody2.Append(paragraph2); shape2.Append(nonVisualShapeProperties2); shape2.Append(shapeProperties2); shape2.Append(textBody2); shapeTree1.Append(nonVisualGroupShapeProperties1); shapeTree1.Append(groupShapeProperties1); shapeTree1.Append(shape1); shapeTree1.Append(shape2); CommonSlideDataExtensionList commonSlideDataExtensionList1 = new CommonSlideDataExtensionList(); CommonSlideDataExtension commonSlideDataExtension1 = new CommonSlideDataExtension() { Uri = "{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}" }; P14.CreationId creationId1 = new P14.CreationId() { Val = (UInt32Value)958156500U }; creationId1.AddNamespaceDeclaration("p14", "http://schemas.microsoft.com/office/powerpoint/2010/main"); commonSlideDataExtension1.Append(creationId1); commonSlideDataExtensionList1.Append(commonSlideDataExtension1); commonSlideData1.Append(shapeTree1); commonSlideData1.Append(commonSlideDataExtensionList1); ColorMapOverride colorMapOverride1 = new ColorMapOverride(); A.MasterColorMapping masterColorMapping1 = new A.MasterColorMapping(); colorMapOverride1.Append(masterColorMapping1); slide1.Append(commonSlideData1); slide1.Append(colorMapOverride1); slidePart1.Slide = slide1; }
//private void AddContent(ShapeTree shapeTree1, uint ObjectID, PPTXTextArea Content, PlaceholderValues PlaceHolderType, uint PlaceHolderIndex = uint.MaxValue) //{ // Shape shape1 = new Shape(); // NonVisualShapeProperties nonVisualShapeProperties1 = new NonVisualShapeProperties(); // NonVisualDrawingProperties nonVisualDrawingProperties2 = new NonVisualDrawingProperties() { Id = ObjectID, Name = $"Content{ObjectID}" }; // NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties1 = new NonVisualShapeDrawingProperties() { TextBox = true}; // A.ShapeLocks shapeLocks1 = new A.ShapeLocks() { NoGrouping = true }; // nonVisualShapeDrawingProperties1.Append(shapeLocks1); // ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties2 = new ApplicationNonVisualDrawingProperties(); // PlaceholderShape placeholderShape1 = new PlaceholderShape();// { Type = PlaceHolderType }; // if (PlaceHolderIndex != uint.MaxValue) // { // placeholderShape1.Index = PlaceHolderIndex; // } // applicationNonVisualDrawingProperties2.Append(placeholderShape1); // nonVisualShapeProperties1.Append(nonVisualDrawingProperties2); // nonVisualShapeProperties1.Append(nonVisualShapeDrawingProperties1); // nonVisualShapeProperties1.Append(applicationNonVisualDrawingProperties2); // ShapeProperties shapeProperties1 = new ShapeProperties(); // A.SolidFill solidFill1 = new A.SolidFill(); // A.SchemeColor schemeColor1 = new A.SchemeColor() { Val = A.SchemeColorValues.Accent1 }; // A.LuminanceModulation luminanceModulation1 = new A.LuminanceModulation() { Val = 20000 }; // A.LuminanceOffset luminanceOffset1 = new A.LuminanceOffset() { Val = 80000 }; // schemeColor1.Append(luminanceModulation1); // schemeColor1.Append(luminanceOffset1); // solidFill1.Append(schemeColor1); // shapeProperties1.Append(solidFill1); // TextBody textBody1 = new TextBody(); // A.BodyProperties bodyProperties1 = new A.BodyProperties(); // A.ListStyle listStyle1 = new A.ListStyle(); // textBody1.Append(bodyProperties1); // textBody1.Append(listStyle1); // A.Transform2D transform2D25 = SlideWriterHelper.CreateTransform2D(Content.Transform); // if (transform2D25 != null) // { // shapeProperties1.Append(transform2D25); // } // shape1.Append(nonVisualShapeProperties1); // shape1.Append(shapeProperties1); // shape1.Append(textBody1); // foreach (var _textLine in Content.Texts) // { // var paragraph = new A.Paragraph(SlideWriterHelper.CrateParagraphProperties(_textLine)); // foreach(var _textRun in _textLine.Texts) // { // paragraph.Append(new A.Run() // { // RunProperties = SlideWriterHelper.CreateRunProperties(_textRun, HyperLinkIDMap), // Text = new A.Text(_textRun.Text) // }); // } // shape1.TextBody.Append(paragraph); // } // shapeTree1.Append(shape1); //} private void AddTextBox(ShapeTree shapeTree1, uint ObjectID, PPTXTextArea Content) { Shape shape1 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties1 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties2 = new NonVisualDrawingProperties() { Id = ObjectID, Name = $"Content{ObjectID}" }; A.NonVisualDrawingPropertiesExtensionList nonVisualDrawingPropertiesExtensionList1 = new A.NonVisualDrawingPropertiesExtensionList(); A.NonVisualDrawingPropertiesExtension nonVisualDrawingPropertiesExtension1 = new A.NonVisualDrawingPropertiesExtension() { Uri = "{FF2B5EF4-FFF2-40B4-BE49-F238E27FC236}" }; OpenXmlUnknownElement openXmlUnknownElement1 = OpenXmlUnknownElement.CreateOpenXmlUnknownElement("<a16:creationId xmlns:a16=\"http://schemas.microsoft.com/office/drawing/2014/main\" id=\"{5FE2CA47-E73A-450F-9AE0-DF438874E2FB}\" />"); nonVisualDrawingPropertiesExtension1.Append(openXmlUnknownElement1); nonVisualDrawingPropertiesExtensionList1.Append(nonVisualDrawingPropertiesExtension1); nonVisualDrawingProperties2.Append(nonVisualDrawingPropertiesExtensionList1); NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties1 = new NonVisualShapeDrawingProperties() { TextBox = true }; ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties2 = new ApplicationNonVisualDrawingProperties(); nonVisualShapeProperties1.Append(nonVisualDrawingProperties2); nonVisualShapeProperties1.Append(nonVisualShapeDrawingProperties1); nonVisualShapeProperties1.Append(applicationNonVisualDrawingProperties2); ShapeProperties shapeProperties1 = new ShapeProperties(); A.PresetGeometry presetGeometry1 = new A.PresetGeometry() { Preset = A.ShapeTypeValues.Rectangle }; A.AdjustValueList adjustValueList1 = new A.AdjustValueList(); presetGeometry1.Append(adjustValueList1); TextBody textBody1 = new TextBody(); A.BodyProperties bodyProperties1 = new A.BodyProperties(); A.ListStyle listStyle1 = new A.ListStyle(); textBody1.Append(bodyProperties1); textBody1.Append(listStyle1); A.Transform2D transform2D25 = SlideWriterHelper.CreateTransform2D(Content.Transform); if (transform2D25 != null) { shapeProperties1.Append(transform2D25); } shapeProperties1.Append(presetGeometry1); if (Content.BackgroundColor.IsTransparent == false) { A.SolidFill solidFill1 = new A.SolidFill(); solidFill1.Append(SlideWriterHelper.CreateRGBColorModeHex(Content.BackgroundColor)); shapeProperties1.Append(solidFill1); } shape1.Append(nonVisualShapeProperties1); shape1.Append(shapeProperties1); shape1.Append(textBody1); foreach (var _textLine in Content.Texts) { var paragraph = new A.Paragraph(SlideWriterHelper.CrateParagraphProperties(_textLine)); foreach (var _textRun in _textLine.Texts) { paragraph.Append(new A.Run() { RunProperties = SlideWriterHelper.CreateRunProperties(_textRun, HyperLinkIDMap), Text = new A.Text(_textRun.Text) }); } shape1.TextBody.Append(paragraph); } shapeTree1.Append(shape1); }
private void setStringValues(SlidePart sectionSlidePart) { foreach (var item in sectionSlidePart.Slide.Descendants()) { if (item.GetType() == typeof(DocumentFormat.OpenXml.Presentation.Shape)) { foreach (Paragraph paragraph in item.Descendants().OfType <Paragraph>()) { setRunData(paragraph); } } if (item.GetType() == typeof(ShapeTree)) { foreach (DocumentFormat.OpenXml.Presentation.Shape shape in item.Elements <DocumentFormat.OpenXml.Presentation.Shape>()) { foreach (Paragraph paragraph in shape.Descendants().OfType <Paragraph>()) { setRunData(paragraph); } } } if (item.GetType() == typeof(CommonSlideData)) { CommonSlideData sldData1 = (CommonSlideData)item; ShapeTree tree = sldData1.ShapeTree; foreach (DocumentFormat.OpenXml.Presentation.Shape shape in tree.Elements <DocumentFormat.OpenXml.Presentation.Shape>()) { foreach (Paragraph paragraph in shape.Descendants().OfType <Paragraph>()) { setRunData(paragraph); } } foreach (DocumentFormat.OpenXml.Presentation.GroupShape groupShape in tree.Elements <DocumentFormat.OpenXml.Presentation.GroupShape>()) { foreach (DocumentFormat.OpenXml.Presentation.Shape shapeinner in groupShape.Elements <DocumentFormat.OpenXml.Presentation.Shape>()) { foreach (Paragraph paragraph in shapeinner.Descendants().OfType <Paragraph>()) { setRunData(paragraph); } } foreach (Paragraph paragraph in groupShape.Descendants().OfType <Paragraph>()) { setRunData(paragraph); } } foreach (DocumentFormat.OpenXml.Presentation.GraphicFrame shape in tree.Elements <DocumentFormat.OpenXml.Presentation.GraphicFrame>()) { foreach (Paragraph paragraph in shape.Descendants().OfType <Paragraph>()) { setRunData(paragraph); } } foreach (DocumentFormat.OpenXml.Presentation.ConnectionShape shape in tree.Elements <DocumentFormat.OpenXml.Presentation.ConnectionShape>()) { foreach (Paragraph paragraph in shape.Descendants().OfType <Paragraph>()) { setRunData(paragraph); } } sectionSlidePart.Slide.Save(); } } }
public static void GenerateNotesSlidePart1Content(NotesSlidePart notesSlidePart1) { NotesSlide notesSlide1 = new NotesSlide(); notesSlide1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main"); notesSlide1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships"); notesSlide1.AddNamespaceDeclaration("p", "http://schemas.openxmlformats.org/presentationml/2006/main"); CommonSlideData commonSlideData4 = new CommonSlideData(); ShapeTree shapeTree4 = new ShapeTree(); NonVisualGroupShapeProperties nonVisualGroupShapeProperties4 = new NonVisualGroupShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties20 = new NonVisualDrawingProperties() { Id = (UInt32Value)1U, Name = "" }; NonVisualGroupShapeDrawingProperties nonVisualGroupShapeDrawingProperties4 = new NonVisualGroupShapeDrawingProperties(); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties20 = new ApplicationNonVisualDrawingProperties(); nonVisualGroupShapeProperties4.Append(nonVisualDrawingProperties20); nonVisualGroupShapeProperties4.Append(nonVisualGroupShapeDrawingProperties4); nonVisualGroupShapeProperties4.Append(applicationNonVisualDrawingProperties20); GroupShapeProperties groupShapeProperties4 = new GroupShapeProperties(); A.TransformGroup transformGroup4 = new A.TransformGroup(); A.Offset offset22 = new A.Offset() { X = 0L, Y = 0L }; A.Extents extents22 = new A.Extents() { Cx = 0L, Cy = 0L }; A.ChildOffset childOffset4 = new A.ChildOffset() { X = 0L, Y = 0L }; A.ChildExtents childExtents4 = new A.ChildExtents() { Cx = 0L, Cy = 0L }; transformGroup4.Append(offset22); transformGroup4.Append(extents22); transformGroup4.Append(childOffset4); transformGroup4.Append(childExtents4); groupShapeProperties4.Append(transformGroup4); Shape shape16 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties16 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties21 = new NonVisualDrawingProperties() { Id = (UInt32Value)19458U, Name = "Rectangle 7" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties16 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks16 = new A.ShapeLocks() { NoGrouping = true, NoChangeArrowheads = true }; nonVisualShapeDrawingProperties16.Append(shapeLocks16); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties21 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape11 = new PlaceholderShape() { Type = PlaceholderValues.SlideNumber, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)5U }; applicationNonVisualDrawingProperties21.Append(placeholderShape11); nonVisualShapeProperties16.Append(nonVisualDrawingProperties21); nonVisualShapeProperties16.Append(nonVisualShapeDrawingProperties16); nonVisualShapeProperties16.Append(applicationNonVisualDrawingProperties21); ShapeProperties shapeProperties19 = new ShapeProperties(); A.NoFill noFill19 = new A.NoFill(); A.Outline outline33 = new A.Outline(); A.ShapePropertiesExtensionList shapePropertiesExtensionList7 = new A.ShapePropertiesExtensionList(); A.ShapePropertiesExtension shapePropertiesExtension7 = new A.ShapePropertiesExtension() { Uri = "{909E8E84-426E-40DD-AFC4-6F175D3DCCD1}" }; A14.HiddenFillProperties hiddenFillProperties2 = new A14.HiddenFillProperties(); hiddenFillProperties2.AddNamespaceDeclaration("a14", "http://schemas.microsoft.com/office/drawing/2010/main"); A.SolidFill solidFill158 = new A.SolidFill(); A.RgbColorModelHex rgbColorModelHex239 = new A.RgbColorModelHex() { Val = "FFFFFF" }; solidFill158.Append(rgbColorModelHex239); hiddenFillProperties2.Append(solidFill158); shapePropertiesExtension7.Append(hiddenFillProperties2); A.ShapePropertiesExtension shapePropertiesExtension8 = new A.ShapePropertiesExtension() { Uri = "{91240B29-F687-4F45-9708-019B960494DF}" }; A14.HiddenLineProperties hiddenLineProperties6 = new A14.HiddenLineProperties() { Width = 9525 }; hiddenLineProperties6.AddNamespaceDeclaration("a14", "http://schemas.microsoft.com/office/drawing/2010/main"); A.SolidFill solidFill159 = new A.SolidFill(); A.RgbColorModelHex rgbColorModelHex240 = new A.RgbColorModelHex() { Val = "000000" }; solidFill159.Append(rgbColorModelHex240); A.Miter miter15 = new A.Miter() { Limit = 800000 }; A.HeadEnd headEnd14 = new A.HeadEnd(); A.TailEnd tailEnd14 = new A.TailEnd(); hiddenLineProperties6.Append(solidFill159); hiddenLineProperties6.Append(miter15); hiddenLineProperties6.Append(headEnd14); hiddenLineProperties6.Append(tailEnd14); shapePropertiesExtension8.Append(hiddenLineProperties6); shapePropertiesExtensionList7.Append(shapePropertiesExtension7); shapePropertiesExtensionList7.Append(shapePropertiesExtension8); shapeProperties19.Append(noFill19); shapeProperties19.Append(outline33); shapeProperties19.Append(shapePropertiesExtensionList7); TextBody textBody15 = new TextBody(); A.BodyProperties bodyProperties17 = new A.BodyProperties(); A.ListStyle listStyle17 = new A.ListStyle(); A.Level1ParagraphProperties level1ParagraphProperties16 = new A.Level1ParagraphProperties(); A.SpaceBefore spaceBefore74 = new A.SpaceBefore(); A.SpacingPercent spacingPercent95 = new A.SpacingPercent() { Val = 30000 }; spaceBefore74.Append(spacingPercent95); A.DefaultRunProperties defaultRunProperties95 = new A.DefaultRunProperties() { FontSize = 1200 }; A.SolidFill solidFill160 = new A.SolidFill(); A.SchemeColor schemeColor221 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; solidFill160.Append(schemeColor221); A.LatinFont latinFont112 = new A.LatinFont() { Typeface = "Arial", Panose = "020B0604020202020204", PitchFamily = 34, CharacterSet = 0 }; A.EastAsianFont eastAsianFont75 = new A.EastAsianFont() { Typeface = "MS PGothic", Panose = "020B0600070205080204", PitchFamily = 34, CharacterSet = -128 }; defaultRunProperties95.Append(solidFill160); defaultRunProperties95.Append(latinFont112); defaultRunProperties95.Append(eastAsianFont75); level1ParagraphProperties16.Append(spaceBefore74); level1ParagraphProperties16.Append(defaultRunProperties95); A.Level2ParagraphProperties level2ParagraphProperties8 = new A.Level2ParagraphProperties() { LeftMargin = 735013, Indent = -280988 }; A.SpaceBefore spaceBefore75 = new A.SpaceBefore(); A.SpacingPercent spacingPercent96 = new A.SpacingPercent() { Val = 30000 }; spaceBefore75.Append(spacingPercent96); A.DefaultRunProperties defaultRunProperties96 = new A.DefaultRunProperties() { FontSize = 1200 }; A.SolidFill solidFill161 = new A.SolidFill(); A.SchemeColor schemeColor222 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; solidFill161.Append(schemeColor222); A.LatinFont latinFont113 = new A.LatinFont() { Typeface = "Arial", Panose = "020B0604020202020204", PitchFamily = 34, CharacterSet = 0 }; A.EastAsianFont eastAsianFont76 = new A.EastAsianFont() { Typeface = "MS PGothic", Panose = "020B0600070205080204", PitchFamily = 34, CharacterSet = -128 }; defaultRunProperties96.Append(solidFill161); defaultRunProperties96.Append(latinFont113); defaultRunProperties96.Append(eastAsianFont76); level2ParagraphProperties8.Append(spaceBefore75); level2ParagraphProperties8.Append(defaultRunProperties96); A.Level3ParagraphProperties level3ParagraphProperties8 = new A.Level3ParagraphProperties() { LeftMargin = 1131888, Indent = -225425 }; A.SpaceBefore spaceBefore76 = new A.SpaceBefore(); A.SpacingPercent spacingPercent97 = new A.SpacingPercent() { Val = 30000 }; spaceBefore76.Append(spacingPercent97); A.DefaultRunProperties defaultRunProperties97 = new A.DefaultRunProperties() { FontSize = 1200 }; A.SolidFill solidFill162 = new A.SolidFill(); A.SchemeColor schemeColor223 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; solidFill162.Append(schemeColor223); A.LatinFont latinFont114 = new A.LatinFont() { Typeface = "Arial", Panose = "020B0604020202020204", PitchFamily = 34, CharacterSet = 0 }; A.EastAsianFont eastAsianFont77 = new A.EastAsianFont() { Typeface = "MS PGothic", Panose = "020B0600070205080204", PitchFamily = 34, CharacterSet = -128 }; defaultRunProperties97.Append(solidFill162); defaultRunProperties97.Append(latinFont114); defaultRunProperties97.Append(eastAsianFont77); level3ParagraphProperties8.Append(spaceBefore76); level3ParagraphProperties8.Append(defaultRunProperties97); A.Level4ParagraphProperties level4ParagraphProperties8 = new A.Level4ParagraphProperties() { LeftMargin = 1585913, Indent = -225425 }; A.SpaceBefore spaceBefore77 = new A.SpaceBefore(); A.SpacingPercent spacingPercent98 = new A.SpacingPercent() { Val = 30000 }; spaceBefore77.Append(spacingPercent98); A.DefaultRunProperties defaultRunProperties98 = new A.DefaultRunProperties() { FontSize = 1200 }; A.SolidFill solidFill163 = new A.SolidFill(); A.SchemeColor schemeColor224 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; solidFill163.Append(schemeColor224); A.LatinFont latinFont115 = new A.LatinFont() { Typeface = "Arial", Panose = "020B0604020202020204", PitchFamily = 34, CharacterSet = 0 }; A.EastAsianFont eastAsianFont78 = new A.EastAsianFont() { Typeface = "MS PGothic", Panose = "020B0600070205080204", PitchFamily = 34, CharacterSet = -128 }; defaultRunProperties98.Append(solidFill163); defaultRunProperties98.Append(latinFont115); defaultRunProperties98.Append(eastAsianFont78); level4ParagraphProperties8.Append(spaceBefore77); level4ParagraphProperties8.Append(defaultRunProperties98); A.Level5ParagraphProperties level5ParagraphProperties8 = new A.Level5ParagraphProperties() { LeftMargin = 2038350, Indent = -225425 }; A.SpaceBefore spaceBefore78 = new A.SpaceBefore(); A.SpacingPercent spacingPercent99 = new A.SpacingPercent() { Val = 30000 }; spaceBefore78.Append(spacingPercent99); A.DefaultRunProperties defaultRunProperties99 = new A.DefaultRunProperties() { FontSize = 1200 }; A.SolidFill solidFill164 = new A.SolidFill(); A.SchemeColor schemeColor225 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; solidFill164.Append(schemeColor225); A.LatinFont latinFont116 = new A.LatinFont() { Typeface = "Arial", Panose = "020B0604020202020204", PitchFamily = 34, CharacterSet = 0 }; A.EastAsianFont eastAsianFont79 = new A.EastAsianFont() { Typeface = "MS PGothic", Panose = "020B0600070205080204", PitchFamily = 34, CharacterSet = -128 }; defaultRunProperties99.Append(solidFill164); defaultRunProperties99.Append(latinFont116); defaultRunProperties99.Append(eastAsianFont79); level5ParagraphProperties8.Append(spaceBefore78); level5ParagraphProperties8.Append(defaultRunProperties99); A.Level6ParagraphProperties level6ParagraphProperties8 = new A.Level6ParagraphProperties() { LeftMargin = 2495550, Indent = -225425, EastAsianLineBreak = false, FontAlignment = A.TextFontAlignmentValues.Baseline, Height = false }; A.SpaceBefore spaceBefore79 = new A.SpaceBefore(); A.SpacingPercent spacingPercent100 = new A.SpacingPercent() { Val = 30000 }; spaceBefore79.Append(spacingPercent100); A.SpaceAfter spaceAfter59 = new A.SpaceAfter(); A.SpacingPercent spacingPercent101 = new A.SpacingPercent() { Val = 0 }; spaceAfter59.Append(spacingPercent101); A.DefaultRunProperties defaultRunProperties100 = new A.DefaultRunProperties() { FontSize = 1200 }; A.SolidFill solidFill165 = new A.SolidFill(); A.SchemeColor schemeColor226 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; solidFill165.Append(schemeColor226); A.LatinFont latinFont117 = new A.LatinFont() { Typeface = "Arial", Panose = "020B0604020202020204", PitchFamily = 34, CharacterSet = 0 }; A.EastAsianFont eastAsianFont80 = new A.EastAsianFont() { Typeface = "MS PGothic", Panose = "020B0600070205080204", PitchFamily = 34, CharacterSet = -128 }; defaultRunProperties100.Append(solidFill165); defaultRunProperties100.Append(latinFont117); defaultRunProperties100.Append(eastAsianFont80); level6ParagraphProperties8.Append(spaceBefore79); level6ParagraphProperties8.Append(spaceAfter59); level6ParagraphProperties8.Append(defaultRunProperties100); A.Level7ParagraphProperties level7ParagraphProperties8 = new A.Level7ParagraphProperties() { LeftMargin = 2952750, Indent = -225425, EastAsianLineBreak = false, FontAlignment = A.TextFontAlignmentValues.Baseline, Height = false }; A.SpaceBefore spaceBefore80 = new A.SpaceBefore(); A.SpacingPercent spacingPercent102 = new A.SpacingPercent() { Val = 30000 }; spaceBefore80.Append(spacingPercent102); A.SpaceAfter spaceAfter60 = new A.SpaceAfter(); A.SpacingPercent spacingPercent103 = new A.SpacingPercent() { Val = 0 }; spaceAfter60.Append(spacingPercent103); A.DefaultRunProperties defaultRunProperties101 = new A.DefaultRunProperties() { FontSize = 1200 }; A.SolidFill solidFill166 = new A.SolidFill(); A.SchemeColor schemeColor227 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; solidFill166.Append(schemeColor227); A.LatinFont latinFont118 = new A.LatinFont() { Typeface = "Arial", Panose = "020B0604020202020204", PitchFamily = 34, CharacterSet = 0 }; A.EastAsianFont eastAsianFont81 = new A.EastAsianFont() { Typeface = "MS PGothic", Panose = "020B0600070205080204", PitchFamily = 34, CharacterSet = -128 }; defaultRunProperties101.Append(solidFill166); defaultRunProperties101.Append(latinFont118); defaultRunProperties101.Append(eastAsianFont81); level7ParagraphProperties8.Append(spaceBefore80); level7ParagraphProperties8.Append(spaceAfter60); level7ParagraphProperties8.Append(defaultRunProperties101); A.Level8ParagraphProperties level8ParagraphProperties8 = new A.Level8ParagraphProperties() { LeftMargin = 3409950, Indent = -225425, EastAsianLineBreak = false, FontAlignment = A.TextFontAlignmentValues.Baseline, Height = false }; A.SpaceBefore spaceBefore81 = new A.SpaceBefore(); A.SpacingPercent spacingPercent104 = new A.SpacingPercent() { Val = 30000 }; spaceBefore81.Append(spacingPercent104); A.SpaceAfter spaceAfter61 = new A.SpaceAfter(); A.SpacingPercent spacingPercent105 = new A.SpacingPercent() { Val = 0 }; spaceAfter61.Append(spacingPercent105); A.DefaultRunProperties defaultRunProperties102 = new A.DefaultRunProperties() { FontSize = 1200 }; A.SolidFill solidFill167 = new A.SolidFill(); A.SchemeColor schemeColor228 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; solidFill167.Append(schemeColor228); A.LatinFont latinFont119 = new A.LatinFont() { Typeface = "Arial", Panose = "020B0604020202020204", PitchFamily = 34, CharacterSet = 0 }; A.EastAsianFont eastAsianFont82 = new A.EastAsianFont() { Typeface = "MS PGothic", Panose = "020B0600070205080204", PitchFamily = 34, CharacterSet = -128 }; defaultRunProperties102.Append(solidFill167); defaultRunProperties102.Append(latinFont119); defaultRunProperties102.Append(eastAsianFont82); level8ParagraphProperties8.Append(spaceBefore81); level8ParagraphProperties8.Append(spaceAfter61); level8ParagraphProperties8.Append(defaultRunProperties102); A.Level9ParagraphProperties level9ParagraphProperties8 = new A.Level9ParagraphProperties() { LeftMargin = 3867150, Indent = -225425, EastAsianLineBreak = false, FontAlignment = A.TextFontAlignmentValues.Baseline, Height = false }; A.SpaceBefore spaceBefore82 = new A.SpaceBefore(); A.SpacingPercent spacingPercent106 = new A.SpacingPercent() { Val = 30000 }; spaceBefore82.Append(spacingPercent106); A.SpaceAfter spaceAfter62 = new A.SpaceAfter(); A.SpacingPercent spacingPercent107 = new A.SpacingPercent() { Val = 0 }; spaceAfter62.Append(spacingPercent107); A.DefaultRunProperties defaultRunProperties103 = new A.DefaultRunProperties() { FontSize = 1200 }; A.SolidFill solidFill168 = new A.SolidFill(); A.SchemeColor schemeColor229 = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 }; solidFill168.Append(schemeColor229); A.LatinFont latinFont120 = new A.LatinFont() { Typeface = "Arial", Panose = "020B0604020202020204", PitchFamily = 34, CharacterSet = 0 }; A.EastAsianFont eastAsianFont83 = new A.EastAsianFont() { Typeface = "MS PGothic", Panose = "020B0600070205080204", PitchFamily = 34, CharacterSet = -128 }; defaultRunProperties103.Append(solidFill168); defaultRunProperties103.Append(latinFont120); defaultRunProperties103.Append(eastAsianFont83); level9ParagraphProperties8.Append(spaceBefore82); level9ParagraphProperties8.Append(spaceAfter62); level9ParagraphProperties8.Append(defaultRunProperties103); listStyle17.Append(level1ParagraphProperties16); listStyle17.Append(level2ParagraphProperties8); listStyle17.Append(level3ParagraphProperties8); listStyle17.Append(level4ParagraphProperties8); listStyle17.Append(level5ParagraphProperties8); listStyle17.Append(level6ParagraphProperties8); listStyle17.Append(level7ParagraphProperties8); listStyle17.Append(level8ParagraphProperties8); listStyle17.Append(level9ParagraphProperties8); A.Paragraph paragraph40 = new A.Paragraph(); A.ParagraphProperties paragraphProperties37 = new A.ParagraphProperties(); A.SpaceBefore spaceBefore83 = new A.SpaceBefore(); A.SpacingPercent spacingPercent108 = new A.SpacingPercent() { Val = 0 }; spaceBefore83.Append(spacingPercent108); paragraphProperties37.Append(spaceBefore83); A.Field field4 = new A.Field() { Id = "{99BBE751-775A-442D-AED5-C8FC60817C7D}", Type = "slidenum" }; A.RunProperties runProperties41 = new A.RunProperties() { Language = "en-US", AlternativeLanguage = "et-EE" }; runProperties41.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0")); A.ComplexScriptFont complexScriptFont61 = new A.ComplexScriptFont() { Typeface = "Arial", Panose = "020B0604020202020204", PitchFamily = 34, CharacterSet = 0 }; runProperties41.Append(complexScriptFont61); A.ParagraphProperties paragraphProperties38 = new A.ParagraphProperties(); A.SpaceBefore spaceBefore84 = new A.SpaceBefore(); A.SpacingPercent spacingPercent109 = new A.SpacingPercent() { Val = 0 }; spaceBefore84.Append(spacingPercent109); paragraphProperties38.Append(spaceBefore84); A.Text text41 = new A.Text(); text41.Text = "1"; field4.Append(runProperties41); field4.Append(paragraphProperties38); field4.Append(text41); A.EndParagraphRunProperties endParagraphRunProperties21 = new A.EndParagraphRunProperties() { Language = "en-US", AlternativeLanguage = "et-EE" }; A.ComplexScriptFont complexScriptFont62 = new A.ComplexScriptFont() { Typeface = "Arial", Panose = "020B0604020202020204", PitchFamily = 34, CharacterSet = 0 }; endParagraphRunProperties21.Append(complexScriptFont62); paragraph40.Append(paragraphProperties37); paragraph40.Append(field4); paragraph40.Append(endParagraphRunProperties21); textBody15.Append(bodyProperties17); textBody15.Append(listStyle17); textBody15.Append(paragraph40); shape16.Append(nonVisualShapeProperties16); shape16.Append(shapeProperties19); shape16.Append(textBody15); Shape shape17 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties17 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties22 = new NonVisualDrawingProperties() { Id = (UInt32Value)19459U, Name = "Rectangle 2" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties17 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks17 = new A.ShapeLocks() { NoGrouping = true, NoRotation = true, NoChangeAspect = true, NoChangeArrowheads = true, NoTextEdit = true }; nonVisualShapeDrawingProperties17.Append(shapeLocks17); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties22 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape12 = new PlaceholderShape() { Type = PlaceholderValues.SlideImage }; applicationNonVisualDrawingProperties22.Append(placeholderShape12); nonVisualShapeProperties17.Append(nonVisualDrawingProperties22); nonVisualShapeProperties17.Append(nonVisualShapeDrawingProperties17); nonVisualShapeProperties17.Append(applicationNonVisualDrawingProperties22); ShapeProperties shapeProperties20 = new ShapeProperties(); A.Outline outline34 = new A.Outline(); shapeProperties20.Append(outline34); shape17.Append(nonVisualShapeProperties17); shape17.Append(shapeProperties20); Shape shape18 = new Shape(); NonVisualShapeProperties nonVisualShapeProperties18 = new NonVisualShapeProperties(); NonVisualDrawingProperties nonVisualDrawingProperties23 = new NonVisualDrawingProperties() { Id = (UInt32Value)19460U, Name = "Rectangle 3" }; NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties18 = new NonVisualShapeDrawingProperties(); A.ShapeLocks shapeLocks18 = new A.ShapeLocks() { NoGrouping = true, NoChangeArrowheads = true }; nonVisualShapeDrawingProperties18.Append(shapeLocks18); ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties23 = new ApplicationNonVisualDrawingProperties(); PlaceholderShape placeholderShape13 = new PlaceholderShape() { Type = PlaceholderValues.Body, Index = (UInt32Value)1U }; applicationNonVisualDrawingProperties23.Append(placeholderShape13); nonVisualShapeProperties18.Append(nonVisualDrawingProperties23); nonVisualShapeProperties18.Append(nonVisualShapeDrawingProperties18); nonVisualShapeProperties18.Append(applicationNonVisualDrawingProperties23); ShapeProperties shapeProperties21 = new ShapeProperties(); A.NoFill noFill20 = new A.NoFill(); A.Outline outline35 = new A.Outline(); A.ShapePropertiesExtensionList shapePropertiesExtensionList8 = new A.ShapePropertiesExtensionList(); A.ShapePropertiesExtension shapePropertiesExtension9 = new A.ShapePropertiesExtension() { Uri = "{909E8E84-426E-40DD-AFC4-6F175D3DCCD1}" }; A14.HiddenFillProperties hiddenFillProperties3 = new A14.HiddenFillProperties(); hiddenFillProperties3.AddNamespaceDeclaration("a14", "http://schemas.microsoft.com/office/drawing/2010/main"); A.SolidFill solidFill169 = new A.SolidFill(); A.RgbColorModelHex rgbColorModelHex241 = new A.RgbColorModelHex() { Val = "FFFFFF" }; solidFill169.Append(rgbColorModelHex241); hiddenFillProperties3.Append(solidFill169); shapePropertiesExtension9.Append(hiddenFillProperties3); A.ShapePropertiesExtension shapePropertiesExtension10 = new A.ShapePropertiesExtension() { Uri = "{91240B29-F687-4F45-9708-019B960494DF}" }; A14.HiddenLineProperties hiddenLineProperties7 = new A14.HiddenLineProperties() { Width = 9525 }; hiddenLineProperties7.AddNamespaceDeclaration("a14", "http://schemas.microsoft.com/office/drawing/2010/main"); A.SolidFill solidFill170 = new A.SolidFill(); A.RgbColorModelHex rgbColorModelHex242 = new A.RgbColorModelHex() { Val = "000000" }; solidFill170.Append(rgbColorModelHex242); A.Miter miter16 = new A.Miter() { Limit = 800000 }; A.HeadEnd headEnd15 = new A.HeadEnd(); A.TailEnd tailEnd15 = new A.TailEnd(); hiddenLineProperties7.Append(solidFill170); hiddenLineProperties7.Append(miter16); hiddenLineProperties7.Append(headEnd15); hiddenLineProperties7.Append(tailEnd15); shapePropertiesExtension10.Append(hiddenLineProperties7); shapePropertiesExtensionList8.Append(shapePropertiesExtension9); shapePropertiesExtensionList8.Append(shapePropertiesExtension10); shapeProperties21.Append(noFill20); shapeProperties21.Append(outline35); shapeProperties21.Append(shapePropertiesExtensionList8); TextBody textBody16 = new TextBody(); A.BodyProperties bodyProperties18 = new A.BodyProperties(); A.ListStyle listStyle18 = new A.ListStyle(); A.Paragraph paragraph41 = new A.Paragraph(); A.ParagraphProperties paragraphProperties39 = new A.ParagraphProperties() { EastAsianLineBreak = true, Height = true }; A.EndParagraphRunProperties endParagraphRunProperties22 = new A.EndParagraphRunProperties() { Language = "lv-LV", AlternativeLanguage = "et-EE" }; A.LatinFont latinFont121 = new A.LatinFont() { Typeface = "Arial", Panose = "020B0604020202020204", PitchFamily = 34, CharacterSet = 0 }; endParagraphRunProperties22.Append(latinFont121); paragraph41.Append(paragraphProperties39); paragraph41.Append(endParagraphRunProperties22); textBody16.Append(bodyProperties18); textBody16.Append(listStyle18); textBody16.Append(paragraph41); shape18.Append(nonVisualShapeProperties18); shape18.Append(shapeProperties21); shape18.Append(textBody16); shapeTree4.Append(nonVisualGroupShapeProperties4); shapeTree4.Append(groupShapeProperties4); shapeTree4.Append(shape16); shapeTree4.Append(shape17); shapeTree4.Append(shape18); CommonSlideDataExtensionList commonSlideDataExtensionList4 = new CommonSlideDataExtensionList(); CommonSlideDataExtension commonSlideDataExtension4 = new CommonSlideDataExtension() { Uri = "{BB962C8B-B14F-4D97-AF65-F5344CB8AC3E}" }; P14.CreationId creationId4 = new P14.CreationId() { Val = (UInt32Value)4141007346U }; creationId4.AddNamespaceDeclaration("p14", "http://schemas.microsoft.com/office/powerpoint/2010/main"); commonSlideDataExtension4.Append(creationId4); commonSlideDataExtensionList4.Append(commonSlideDataExtension4); commonSlideData4.Append(shapeTree4); commonSlideData4.Append(commonSlideDataExtensionList4); ColorMapOverride colorMapOverride2 = new ColorMapOverride(); A.MasterColorMapping masterColorMapping2 = new A.MasterColorMapping(); colorMapOverride2.Append(masterColorMapping2); notesSlide1.Append(commonSlideData4); notesSlide1.Append(colorMapOverride2); notesSlidePart1.NotesSlide = notesSlide1; }