本文整理汇总了C#中DocumentFormat.OpenXml.Drawing.Paragraph类的典型用法代码示例。如果您正苦于以下问题:C# Paragraph类的具体用法?C# Paragraph怎么用?C# Paragraph使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Paragraph类属于DocumentFormat.OpenXml.Drawing命名空间,在下文中一共展示了Paragraph类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GenerateDocument
public static Document GenerateDocument()
{
Document document1 = new Document() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } };
document1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
document1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
document1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
document1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
document1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
document1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
document1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
document1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
document1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
document1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
document1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
document1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
document1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
document1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
document1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
DocumentBackground documentBackground1 = new DocumentBackground() { Color = "FF0000" };
V.Background background1 = new V.Background() { Id = "_x0000_s1025", BlackWhiteMode = Ovml.BlackAndWhiteModeValues.GrayScale, TargetScreenSize = Ovml.ScreenSizeValues.Sz1024x768 };
V.Fill fill1 = new V.Fill() { Type = V.FillTypeValues.Frame, Title = "Wedding_EnclosureCards", Recolor = true, Color = "FF0000" };
background1.Append(fill1);
documentBackground1.Append(background1);
Body body1 = new Body();
Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "005F6C39", RsidRunAdditionDefault = "005F6C39" };
BookmarkStart bookmarkStart1 = new BookmarkStart() { Name = "_GoBack", Id = "0" };
BookmarkEnd bookmarkEnd1 = new BookmarkEnd() { Id = "0" };
paragraph1.Append(bookmarkStart1);
paragraph1.Append(bookmarkEnd1);
SectionProperties sectionProperties1 = new SectionProperties() { RsidR = "005F6C39" };
PageSize pageSize1 = new PageSize() { Width = (UInt32Value)12240U, Height = (UInt32Value)15840U };
PageMargin pageMargin1 = new PageMargin() { Top = 1440, Right = (UInt32Value)1440U, Bottom = 1440, Left = (UInt32Value)1440U, Header = (UInt32Value)720U, Footer = (UInt32Value)720U, Gutter = (UInt32Value)0U };
Columns columns1 = new Columns() { Space = "720" };
DocGrid docGrid1 = new DocGrid() { LinePitch = 360 };
sectionProperties1.Append(pageSize1);
sectionProperties1.Append(pageMargin1);
sectionProperties1.Append(columns1);
sectionProperties1.Append(docGrid1);
body1.Append(paragraph1);
body1.Append(sectionProperties1);
document1.Append(documentBackground1);
document1.Append(body1);
return document1;
}
开发者ID:haizhixing126,项目名称:PYSConsole,代码行数:55,代码来源:WordGenerator.cs
示例2: AddImageToBody
private void AddImageToBody(string relationshipId, string name, ImageSize imageSize, HorizontalAlignmentType alignment)
{
Body body = this._package.MainDocumentPart.Document.Body;
var element = CreateDrawingElement(relationshipId, name, imageSize);
var pictureParagraph = new Paragraph(new Run(element));
// If the paragraph has no ParagraphProperties object, create one.
WordHelper.CreateParagraphPropertiesIfNonExists(pictureParagraph);
// Set paragraph alignment
WordHelper.SetParagraphAlignment(pictureParagraph, alignment);
// Append the reference to body, the element should be in a Run.
body.AppendChild(pictureParagraph);
}
开发者ID:FerHenrique,项目名称:Owl,代码行数:17,代码来源:ImageCreator.cs
示例3: ProcessTableCaption
private void ProcessTableCaption(HtmlEnumerator en)
{
if (!tables.HasContext) return;
string att = en.StyleAttributes["text-align"];
if (att == null) att = en.Attributes["align"];
ProcessHtmlChunks(en, "</caption>");
var runStyleId = htmlStyles.GetStyle("Subtle Reference", true);
var legend = new Paragraph(
new ParagraphProperties(
new ParagraphStyleId() { Val = htmlStyles.GetStyle("caption", false) },
new ParagraphMarkRunProperties(
new RunStyle() { Val = runStyleId })),
new Run(
new RunProperties(
new RunStyle() { Val = runStyleId }),
new FieldChar() { FieldCharType = FieldCharValues.Begin }),
new Run(
new RunProperties(
new RunStyle() { Val = runStyleId }),
new FieldCode(" SEQ Tableau \\* ARABIC ") { Space = SpaceProcessingModeValues.Preserve }),
new Run(
new RunProperties(
new RunStyle() { Val = runStyleId }),
new FieldChar() { FieldCharType = FieldCharValues.End })
);
legend.Append(elements);
elements.Clear();
if (att != null)
{
JustificationValues? align = ConverterUtility.FormatParagraphAlign(att);
if (align.HasValue)
{
legend.InsertInProperties(new Justification { Val = align });
}
}
else
{
// If no particular alignement has been specified for the legend, we will align the legend
// relative to the owning table
TableProperties props = tables.CurrentTable.GetFirstChild<TableProperties>();
if (props != null)
{
TableJustification justif = props.GetFirstChild<TableJustification>();
if (justif != null) legend.InsertInProperties(new Justification { Val = justif.Val.Value.ToJustification() });
}
}
if (this.TableCaptionPosition == CaptionPositionValues.Above)
{
this.paragraphs.Insert(this.paragraphs.Count - 1, legend);
}
else
{
this.paragraphs.Add(legend);
}
EnsureCaptionStyle();
}
开发者ID:TimNFL,项目名称:PEACReportsDemo,代码行数:62,代码来源:HtmlConverter.ProcessTag.cs
示例4: ToValueAxis
internal C.ValueAxis ToValueAxis(bool IsStylish = false)
{
C.ValueAxis va = new C.ValueAxis();
va.AxisId = new C.AxisId() { Val = this.AxisId };
va.Scaling = new C.Scaling();
va.Scaling.Orientation = new C.Orientation() { Val = this.Orientation };
if (this.LogBase != null) va.Scaling.LogBase = new C.LogBase() { Val = this.LogBase.Value };
if (this.MaxAxisValue != null) va.Scaling.MaxAxisValue = new C.MaxAxisValue() { Val = this.MaxAxisValue.Value };
if (this.MinAxisValue != null) va.Scaling.MinAxisValue = new C.MinAxisValue() { Val = this.MinAxisValue.Value };
va.Delete = new C.Delete() { Val = this.Delete };
C.AxisPositionValues axpos = this.AxisPosition;
if (!this.ForceAxisPosition)
{
if (this.OtherAxisIsInReverseOrder) axpos = SLChartTool.GetOppositePosition(axpos);
if (this.OtherAxisCrossedAtMaximum) axpos = SLChartTool.GetOppositePosition(axpos);
}
va.AxisPosition = new C.AxisPosition() { Val = axpos };
if (this.ShowMajorGridlines)
{
va.MajorGridlines = this.MajorGridlines.ToMajorGridlines(IsStylish);
}
if (this.ShowMinorGridlines)
{
va.MinorGridlines = this.MinorGridlines.ToMinorGridlines(IsStylish);
}
if (this.ShowTitle)
{
va.Title = this.Title.ToTitle(IsStylish);
}
if (this.HasNumberingFormat)
{
va.NumberingFormat = new C.NumberingFormat()
{
FormatCode = this.FormatCode,
SourceLinked = this.SourceLinked
};
}
va.MajorTickMark = new C.MajorTickMark() { Val = this.MajorTickMark };
va.MinorTickMark = new C.MinorTickMark() { Val = this.MinorTickMark };
va.TickLabelPosition = new C.TickLabelPosition() { Val = this.TickLabelPosition };
if (this.ShapeProperties.HasShapeProperties) va.ChartShapeProperties = this.ShapeProperties.ToChartShapeProperties(IsStylish);
if (this.Rotation != null || this.Vertical != null || this.Anchor != null || this.AnchorCenter != null)
{
va.TextProperties = new C.TextProperties();
va.TextProperties.BodyProperties = new A.BodyProperties();
if (this.Rotation != null) va.TextProperties.BodyProperties.Rotation = (int)(this.Rotation.Value * SLConstants.DegreeToAngleRepresentation);
if (this.Vertical != null) va.TextProperties.BodyProperties.Vertical = this.Vertical.Value;
if (this.Anchor != null) va.TextProperties.BodyProperties.Anchor = this.Anchor.Value;
if (this.AnchorCenter != null) va.TextProperties.BodyProperties.AnchorCenter = this.AnchorCenter.Value;
va.TextProperties.ListStyle = new A.ListStyle();
A.Paragraph para = new A.Paragraph();
para.ParagraphProperties = new A.ParagraphProperties();
para.ParagraphProperties.Append(new A.DefaultRunProperties());
va.TextProperties.Append(para);
}
else if (IsStylish)
{
va.TextProperties = new C.TextProperties();
va.TextProperties.BodyProperties = new A.BodyProperties()
{
Rotation = -60000000,
UseParagraphSpacing = true,
VerticalOverflow = A.TextVerticalOverflowValues.Ellipsis,
Vertical = A.TextVerticalValues.Horizontal,
Wrap = A.TextWrappingValues.Square,
Anchor = A.TextAnchoringTypeValues.Center,
AnchorCenter = true
};
va.TextProperties.ListStyle = new A.ListStyle();
A.Paragraph para = new A.Paragraph();
para.ParagraphProperties = new A.ParagraphProperties();
A.DefaultRunProperties defrunprops = new A.DefaultRunProperties();
defrunprops.FontSize = 900;
defrunprops.Bold = false;
defrunprops.Italic = false;
defrunprops.Underline = A.TextUnderlineValues.None;
defrunprops.Strike = A.TextStrikeValues.NoStrike;
defrunprops.Kerning = 1200;
defrunprops.Baseline = 0;
A.SchemeColor schclr = new A.SchemeColor() { Val = A.SchemeColorValues.Text1 };
schclr.Append(new A.LuminanceModulation() { Val = 65000 });
schclr.Append(new A.LuminanceOffset() { Val = 35000 });
defrunprops.Append(new A.SolidFill()
{
SchemeColor = schclr
//.........这里部分代码省略.........
开发者ID:rahmatsyaparudin,项目名称:KP_Raport,代码行数:101,代码来源:SLTextAxis.cs
示例5: Parse
/// <summary>
/// Start the parse processing.
/// </summary>
/// <returns>Returns a list of parsed paragraph.</returns>
public IList<OpenXmlCompositeElement> Parse(String html)
{
if (String.IsNullOrEmpty(html))
return new Paragraph[0];
// Reset:
elements = new List<OpenXmlElement>();
paragraphs = new List<OpenXmlCompositeElement>();
tables = new TableContext();
htmlStyles.Runs.Reset();
currentParagraph = null;
// Start a new processing
paragraphs.Add(currentParagraph = htmlStyles.Paragraph.NewParagraph());
if (htmlStyles.DefaultParagraphStyle != null)
{
currentParagraph.Append(new ParagraphProperties(
new ParagraphStyleId { Val = htmlStyles.DefaultParagraphStyle }
));
}
HtmlEnumerator en = new HtmlEnumerator(html);
ProcessHtmlChunks(en, null);
if (elements.Count > 0)
this.currentParagraph.Append(elements);
// As the Parse method is public, to avoid changing the type of the return value, I use this proxy
// that will allow me to call the recursive method RemoveEmptyParagraphs with no major changes, impacting the client.
RemoveEmptyParagraphs();
return paragraphs;
}
开发者ID:TimNFL,项目名称:PEACReportsDemo,代码行数:37,代码来源:HtmlConverter.cs
示例6: ProcessHeading
private void ProcessHeading(HtmlEnumerator en)
{
char level = en.Current[2];
string clsName = "heading " + level;
// ensure style exists or the heading will be displayed as a normal text
if (!htmlStyles.DoesStyleExists(clsName))
{
String normalStyleName = htmlStyles.GetStyle("Normal", StyleValues.Paragraph);
htmlStyles.AddStyle(clsName, new Style(
new StyleName() { Val = clsName },
new BasedOn() { Val = normalStyleName },
new NextParagraphStyle() { Val = normalStyleName },
new UnhideWhenUsed(),
new PrimaryStyle(),
new StyleParagraphProperties()
{
KeepNext = new KeepNext(),
KeepLines = new KeepLines(),
SpacingBetweenLines = new SpacingBetweenLines() { Before = "200", After = "0" },
OutlineLevel = new OutlineLevel() { Val = (int)Char.GetNumericValue(level) - 1 /* outline starts at 0 */ }
},
new StyleRunProperties(PredefinedStyles.ResourceManager.GetString(clsName))
) { Type = StyleValues.Paragraph, StyleId = clsName });
}
// support also style attributes for heading (in case of theme override)
List<OpenXmlElement> styleAttributes = new List<OpenXmlElement>();
htmlStyles.Paragraph.ProcessCommonAttributes(en, styleAttributes);
AlternateProcessHtmlChunks(en, "</h" + level + ">");
Paragraph p = new Paragraph(elements);
p.InsertInProperties(prop =>
prop.ParagraphStyleId = new ParagraphStyleId() { Val = htmlStyles.GetStyle(clsName, StyleValues.Paragraph) });
htmlStyles.Paragraph.ApplyTags(p);
htmlStyles.Paragraph.EndTag("<h" + level + ">");
this.elements.Clear();
AddParagraph(p);
AddParagraph(currentParagraph = htmlStyles.Paragraph.NewParagraph());
}
开发者ID:rexyanglucky,项目名称:uba,代码行数:42,代码来源:HtmlConverter.ProcessTag.cs
示例7: Process
internal override void Process(DocxNode node, ref Paragraph paragraph)
{
if (IsHidden(node))
{
return;
}
string src = node.ExtractAttributeValue("src");
if (!string.IsNullOrEmpty(src))
{
try
{
Drawing drawing = PrepareImage(src);
if (drawing != null)
{
if (paragraph == null)
{
paragraph = node.Parent.AppendChild(new Paragraph());
OnParagraphCreated(node, paragraph);
}
Run run = paragraph.AppendChild(new Run(drawing));
RunCreated(node, run);
}
}
catch
{
return;//fails silently?
}
}
}
开发者ID:kannan-ar,项目名称:MariGold.OpenXHTML,代码行数:33,代码来源:DocxImage.cs
示例8: ReplaceText
void ReplaceText(Paragraph paragraph)
{
var parent = paragraph.Parent; //get parent element - to be used when removing placeholder
var dataParam = new PowerPointParameter();
if (ContainsParam(paragraph, ref dataParam)) //check if paragraph is on our parameter list
{
var param = CloneParaGraphWithStyles(paragraph, dataParam.Name, dataParam.Text); // create new param - preserve styles
parent.InsertBefore(param, paragraph);//insert new element
paragraph.Remove();//delete placeholder
saveFile = true;
}
}
开发者ID:RapidCircle,项目名称:O365-PowerPointProperties,代码行数:14,代码来源:RemoteEventReceiverManager.cs
示例9: GenerateSlideLayoutPart4Content
// Generates content of slideLayoutPart4.
private void GenerateSlideLayoutPart4Content(SlideLayoutPart slideLayoutPart4)
{
SlideLayout slideLayout4 = new SlideLayout(){ Type = SlideLayoutValues.Blank, Preserve = true };
slideLayout4.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");
slideLayout4.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
slideLayout4.AddNamespaceDeclaration("p", "http://schemas.openxmlformats.org/presentationml/2006/main");
CommonSlideData commonSlideData7 = new CommonSlideData(){ Name = "Blank" };
ShapeTree shapeTree7 = new ShapeTree();
NonVisualGroupShapeProperties nonVisualGroupShapeProperties7 = new NonVisualGroupShapeProperties();
NonVisualDrawingProperties nonVisualDrawingProperties34 = new NonVisualDrawingProperties(){ Id = (UInt32Value)1U, Name = "" };
NonVisualGroupShapeDrawingProperties nonVisualGroupShapeDrawingProperties7 = new NonVisualGroupShapeDrawingProperties();
ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties34 = new ApplicationNonVisualDrawingProperties();
nonVisualGroupShapeProperties7.Append(nonVisualDrawingProperties34);
nonVisualGroupShapeProperties7.Append(nonVisualGroupShapeDrawingProperties7);
nonVisualGroupShapeProperties7.Append(applicationNonVisualDrawingProperties34);
GroupShapeProperties groupShapeProperties7 = new GroupShapeProperties();
A.TransformGroup transformGroup7 = new A.TransformGroup();
A.Offset offset25 = new A.Offset(){ X = 0L, Y = 0L };
A.Extents extents25 = 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(offset25);
transformGroup7.Append(extents25);
transformGroup7.Append(childOffset7);
transformGroup7.Append(childExtents7);
groupShapeProperties7.Append(transformGroup7);
Shape shape28 = new Shape();
NonVisualShapeProperties nonVisualShapeProperties28 = new NonVisualShapeProperties();
NonVisualDrawingProperties nonVisualDrawingProperties35 = new NonVisualDrawingProperties(){ Id = (UInt32Value)2U, Name = "Date Placeholder 1" };
NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties28 = new NonVisualShapeDrawingProperties();
A.ShapeLocks shapeLocks27 = new A.ShapeLocks(){ NoGrouping = true };
nonVisualShapeDrawingProperties28.Append(shapeLocks27);
ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties35 = new ApplicationNonVisualDrawingProperties();
PlaceholderShape placeholderShape27 = new PlaceholderShape(){ Type = PlaceholderValues.DateAndTime, Size = PlaceholderSizeValues.Half, Index = (UInt32Value)10U };
applicationNonVisualDrawingProperties35.Append(placeholderShape27);
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 paragraph49 = new A.Paragraph();
A.Field field10 = new A.Field(){ Id = "{1A15D4F1-1D33-4170-8C9F-182CDE6BA6D1}", Type = "datetimeFigureOut" };
A.RunProperties runProperties43 = new A.RunProperties(){ Language = "en-US" };
runProperties43.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0"));
A.Text text43 = new A.Text();
text43.Text = "10/3/2012";
field10.Append(runProperties43);
field10.Append(text43);
A.EndParagraphRunProperties endParagraphRunProperties27 = new A.EndParagraphRunProperties(){ Language = "en-US" };
paragraph49.Append(field10);
paragraph49.Append(endParagraphRunProperties27);
textBody28.Append(bodyProperties28);
textBody28.Append(listStyle28);
textBody28.Append(paragraph49);
shape28.Append(nonVisualShapeProperties28);
shape28.Append(shapeProperties28);
shape28.Append(textBody28);
Shape shape29 = new Shape();
NonVisualShapeProperties nonVisualShapeProperties29 = new NonVisualShapeProperties();
NonVisualDrawingProperties nonVisualDrawingProperties36 = new NonVisualDrawingProperties(){ Id = (UInt32Value)3U, Name = "Footer Placeholder 2" };
NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties29 = new NonVisualShapeDrawingProperties();
A.ShapeLocks shapeLocks28 = new A.ShapeLocks(){ NoGrouping = true };
nonVisualShapeDrawingProperties29.Append(shapeLocks28);
ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties36 = new ApplicationNonVisualDrawingProperties();
PlaceholderShape placeholderShape28 = new PlaceholderShape(){ Type = PlaceholderValues.Footer, Size = PlaceholderSizeValues.Quarter, Index = (UInt32Value)11U };
applicationNonVisualDrawingProperties36.Append(placeholderShape28);
nonVisualShapeProperties29.Append(nonVisualDrawingProperties36);
//.........这里部分代码省略.........
开发者ID:eriawan,项目名称:Open-XML-SDK,代码行数:101,代码来源:GeneratedDocument.cs
示例10: GenerateNotesMasterPart1Content
// Generates content of notesMasterPart1.
private void GenerateNotesMasterPart1Content(NotesMasterPart notesMasterPart1)
{
NotesMaster notesMaster1 = new NotesMaster();
notesMaster1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");
notesMaster1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
notesMaster1.AddNamespaceDeclaration("p", "http://schemas.openxmlformats.org/presentationml/2006/main");
CommonSlideData commonSlideData1 = new CommonSlideData();
Background background1 = new Background();
BackgroundStyleReference backgroundStyleReference1 = new BackgroundStyleReference(){ Index = (UInt32Value)1002U };
A.SchemeColor schemeColor10 = new A.SchemeColor(){ Val = A.SchemeColorValues.Background2 };
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" };
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 = 0L };
A.Extents extents2 = new A.Extents(){ Cx = 3962400L, Cy = 342900L };
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.Run run1 = new A.Run();
A.RunProperties runProperties1 = new A.RunProperties(){ Language = "en-US", Dirty = false };
runProperties1.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0"));
A.Text text1 = new A.Text();
//.........这里部分代码省略.........
开发者ID:eriawan,项目名称:Open-XML-SDK,代码行数:101,代码来源:GeneratedDocument.cs
示例11: GenerateSlideLayoutPart3Content
// Generates content of slideLayoutPart3.
private void GenerateSlideLayoutPart3Content(SlideLayoutPart slideLayoutPart3)
{
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 commonSlideData6 = new CommonSlideData(){ Name = "Section Header" };
ShapeTree shapeTree6 = new ShapeTree();
NonVisualGroupShapeProperties nonVisualGroupShapeProperties6 = new NonVisualGroupShapeProperties();
NonVisualDrawingProperties nonVisualDrawingProperties28 = new NonVisualDrawingProperties(){ Id = (UInt32Value)1U, Name = "" };
NonVisualGroupShapeDrawingProperties nonVisualGroupShapeDrawingProperties6 = new NonVisualGroupShapeDrawingProperties();
ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties28 = new ApplicationNonVisualDrawingProperties();
nonVisualGroupShapeProperties6.Append(nonVisualDrawingProperties28);
nonVisualGroupShapeProperties6.Append(nonVisualGroupShapeDrawingProperties6);
nonVisualGroupShapeProperties6.Append(applicationNonVisualDrawingProperties28);
GroupShapeProperties groupShapeProperties6 = new GroupShapeProperties();
A.TransformGroup transformGroup6 = 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 childOffset6 = new A.ChildOffset(){ X = 0L, Y = 0L };
A.ChildExtents childExtents6 = new A.ChildExtents(){ Cx = 0L, Cy = 0L };
transformGroup6.Append(offset22);
transformGroup6.Append(extents22);
transformGroup6.Append(childOffset6);
transformGroup6.Append(childExtents6);
groupShapeProperties6.Append(transformGroup6);
Shape shape23 = new Shape();
NonVisualShapeProperties nonVisualShapeProperties23 = new NonVisualShapeProperties();
NonVisualDrawingProperties nonVisualDrawingProperties29 = new NonVisualDrawingProperties(){ Id = (UInt32Value)2U, Name = "Title 1" };
NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties23 = new NonVisualShapeDrawingProperties();
A.ShapeLocks shapeLocks22 = new A.ShapeLocks(){ NoGrouping = true };
nonVisualShapeDrawingProperties23.Append(shapeLocks22);
ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties29 = new ApplicationNonVisualDrawingProperties();
PlaceholderShape placeholderShape22 = new PlaceholderShape(){ Type = PlaceholderValues.Title };
applicationNonVisualDrawingProperties29.Append(placeholderShape22);
nonVisualShapeProperties23.Append(nonVisualDrawingProperties29);
nonVisualShapeProperties23.Append(nonVisualShapeDrawingProperties23);
nonVisualShapeProperties23.Append(applicationNonVisualDrawingProperties29);
ShapeProperties shapeProperties23 = new ShapeProperties();
A.Transform2D transform2D17 = new A.Transform2D();
A.Offset offset23 = new A.Offset(){ X = 722313L, Y = 4406900L };
A.Extents extents23 = new A.Extents(){ Cx = 7772400L, Cy = 1362075L };
transform2D17.Append(offset23);
transform2D17.Append(extents23);
shapeProperties23.Append(transform2D17);
TextBody textBody23 = new TextBody();
A.BodyProperties bodyProperties23 = new A.BodyProperties(){ Anchor = A.TextAnchoringTypeValues.Top };
A.ListStyle listStyle23 = new A.ListStyle();
A.Level1ParagraphProperties level1ParagraphProperties16 = new A.Level1ParagraphProperties(){ Alignment = A.TextAlignmentTypeValues.Left };
A.DefaultRunProperties defaultRunProperties74 = new A.DefaultRunProperties(){ FontSize = 4000, Bold = true, Capital = A.TextCapsValues.All };
level1ParagraphProperties16.Append(defaultRunProperties74);
listStyle23.Append(level1ParagraphProperties16);
A.Paragraph paragraph44 = new A.Paragraph();
A.Run run32 = new A.Run();
A.RunProperties runProperties39 = new A.RunProperties(){ Language = "en-US" };
runProperties39.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0"));
A.Text text39 = new A.Text();
text39.Text = "Click to edit Master title style";
run32.Append(runProperties39);
run32.Append(text39);
A.EndParagraphRunProperties endParagraphRunProperties23 = new A.EndParagraphRunProperties(){ Language = "en-US" };
paragraph44.Append(run32);
paragraph44.Append(endParagraphRunProperties23);
textBody23.Append(bodyProperties23);
textBody23.Append(listStyle23);
textBody23.Append(paragraph44);
shape23.Append(nonVisualShapeProperties23);
shape23.Append(shapeProperties23);
//.........这里部分代码省略.........
开发者ID:eriawan,项目名称:Open-XML-SDK,代码行数:101,代码来源:GeneratedDocument.cs
示例12: GenerateSlideLayoutPart2Content
// Generates content of slideLayoutPart2.
private void GenerateSlideLayoutPart2Content(SlideLayoutPart slideLayoutPart2)
{
SlideLayout slideLayout2 = new SlideLayout(){ Type = SlideLayoutValues.ObjectText, Preserve = true };
slideLayout2.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");
slideLayout2.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
slideLayout2.AddNamespaceDeclaration("p", "http://schemas.openxmlformats.org/presentationml/2006/main");
CommonSlideData commonSlideData5 = new CommonSlideData(){ Name = "Content with Caption" };
ShapeTree shapeTree5 = new ShapeTree();
NonVisualGroupShapeProperties nonVisualGroupShapeProperties5 = new NonVisualGroupShapeProperties();
NonVisualDrawingProperties nonVisualDrawingProperties21 = new NonVisualDrawingProperties(){ Id = (UInt32Value)1U, Name = "" };
NonVisualGroupShapeDrawingProperties nonVisualGroupShapeDrawingProperties5 = new NonVisualGroupShapeDrawingProperties();
ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties21 = new ApplicationNonVisualDrawingProperties();
nonVisualGroupShapeProperties5.Append(nonVisualDrawingProperties21);
nonVisualGroupShapeProperties5.Append(nonVisualGroupShapeDrawingProperties5);
nonVisualGroupShapeProperties5.Append(applicationNonVisualDrawingProperties21);
GroupShapeProperties groupShapeProperties5 = new GroupShapeProperties();
A.TransformGroup transformGroup5 = new A.TransformGroup();
A.Offset offset18 = new A.Offset(){ X = 0L, Y = 0L };
A.Extents extents18 = 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(offset18);
transformGroup5.Append(extents18);
transformGroup5.Append(childOffset5);
transformGroup5.Append(childExtents5);
groupShapeProperties5.Append(transformGroup5);
Shape shape17 = new Shape();
NonVisualShapeProperties nonVisualShapeProperties17 = new NonVisualShapeProperties();
NonVisualDrawingProperties nonVisualDrawingProperties22 = new NonVisualDrawingProperties(){ Id = (UInt32Value)2U, Name = "Title 1" };
NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties17 = new NonVisualShapeDrawingProperties();
A.ShapeLocks shapeLocks16 = new A.ShapeLocks(){ NoGrouping = true };
nonVisualShapeDrawingProperties17.Append(shapeLocks16);
ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties22 = new ApplicationNonVisualDrawingProperties();
PlaceholderShape placeholderShape16 = new PlaceholderShape(){ Type = PlaceholderValues.Title };
applicationNonVisualDrawingProperties22.Append(placeholderShape16);
nonVisualShapeProperties17.Append(nonVisualDrawingProperties22);
nonVisualShapeProperties17.Append(nonVisualShapeDrawingProperties17);
nonVisualShapeProperties17.Append(applicationNonVisualDrawingProperties22);
ShapeProperties shapeProperties17 = new ShapeProperties();
A.Transform2D transform2D14 = new A.Transform2D();
A.Offset offset19 = new A.Offset(){ X = 457201L, Y = 273050L };
A.Extents extents19 = new A.Extents(){ Cx = 3008313L, Cy = 1162050L };
transform2D14.Append(offset19);
transform2D14.Append(extents19);
shapeProperties17.Append(transform2D14);
TextBody textBody17 = new TextBody();
A.BodyProperties bodyProperties17 = new A.BodyProperties(){ Anchor = A.TextAnchoringTypeValues.Bottom };
A.ListStyle listStyle17 = new A.ListStyle();
A.Level1ParagraphProperties level1ParagraphProperties13 = new A.Level1ParagraphProperties(){ Alignment = A.TextAlignmentTypeValues.Left };
A.DefaultRunProperties defaultRunProperties55 = new A.DefaultRunProperties(){ FontSize = 2000, Bold = true };
level1ParagraphProperties13.Append(defaultRunProperties55);
listStyle17.Append(level1ParagraphProperties13);
A.Paragraph paragraph34 = new A.Paragraph();
A.Run run25 = new A.Run();
A.RunProperties runProperties30 = new A.RunProperties(){ Language = "en-US" };
runProperties30.SetAttribute(new OpenXmlAttribute("", "smtClean", "", "0"));
A.Text text30 = new A.Text();
text30.Text = "Click to edit Master title style";
run25.Append(runProperties30);
run25.Append(text30);
A.EndParagraphRunProperties endParagraphRunProperties18 = new A.EndParagraphRunProperties(){ Language = "en-US" };
paragraph34.Append(run25);
paragraph34.Append(endParagraphRunProperties18);
textBody17.Append(bodyProperties17);
textBody17.Append(listStyle17);
textBody17.Append(paragraph34);
shape17.Append(nonVisualShapeProperties17);
shape17.Append(shapeProperties17);
//.........这里部分代码省略.........
开发者ID:eriawan,项目名称:Open-XML-SDK,代码行数:101,代码来源:GeneratedDocument.cs
示例13: GenerateSlideMasterPart1Content
// Generates content of slideMasterPart1.
private void GenerateSlideMasterPart1Content(SlideMasterPart slideMasterPart1)
{
SlideMaster slideMaster1 = new SlideMaster();
slideMaster1.AddNamespaceDeclaration("a", "http://schemas.openxmlformats.org/drawingml/2006/main");
slideMaster1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
slideMaster1.AddNamespaceDeclaration("p", "http://schemas.openxmlformats.org/presentationml/2006/main");
CommonSlideData commonSlideData4 = new CommonSlideData();
Background background2 = new Background();
BackgroundStyleReference backgroundStyleReference2 = new BackgroundStyleReference(){ Index = (UInt32Value)1001U };
A.SchemeColor schemeColor45 = new A.SchemeColor(){ Val = A.SchemeColorValues.Background1 };
backgroundStyleReference2.Append(schemeColor45);
background2.Append(backgroundStyleReference2);
ShapeTree shapeTree4 = new ShapeTree();
NonVisualGroupShapeProperties nonVisualGroupShapeProperties4 = new NonVisualGroupShapeProperties();
NonVisualDrawingProperties nonVisualDrawingProperties15 = new NonVisualDrawingProperties(){ Id = (UInt32Value)1U, Name = "" };
NonVisualGroupShapeDrawingProperties nonVisualGroupShapeDrawingProperties4 = new NonVisualGroupShapeDrawingProperties();
ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties15 = new ApplicationNonVisualDrawingProperties();
nonVisualGroupShapeProperties4.Append(nonVisualDrawingProperties15);
nonVisualGroupShapeProperties4.Append(nonVisualGroupShapeDrawingProperties4);
nonVisualGroupShapeProperties4.Append(applicationNonVisualDrawingProperties15);
GroupShapeProperties groupShapeProperties4 = new GroupShapeProperties();
A.TransformGroup transformGroup4 = new A.TransformGroup();
A.Offset offset12 = new A.Offset(){ X = 0L, Y = 0L };
A.Extents extents12 = 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(offset12);
transformGroup4.Append(extents12);
transformGroup4.Append(childOffset4);
transformGroup4.Append(childExtents4);
groupShapeProperties4.Append(transformGroup4);
Shape shape12 = new Shape();
NonVisualShapeProperties nonVisualShapeProperties12 = new NonVisualShapeProperties();
NonVisualDrawingProperties nonVisualDrawingProperties16 = new NonVisualDrawingProperties(){ Id = (UInt32Value)2U, Name = "Title Placeholder 1" };
NonVisualShapeDrawingProperties nonVisualShapeDrawingProperties12 = new NonVisualShapeDrawingProperties();
A.ShapeLocks shapeLocks11 = new A.ShapeLocks(){ NoGrouping = true };
nonVisualShapeDrawingProperties12.Append(shapeLocks11);
ApplicationNonVisualDrawingProperties applicationNonVisualDrawingProperties16 = new ApplicationNonVisualDrawingProperties();
PlaceholderShape placeholderShape11 = new PlaceholderShape(){ Type = PlaceholderValues.Title };
applicationNonVisualDrawingProperties16.Append(placeholderShape11);
nonVisualShapeProperties12.Append(nonVisualDrawingProperties16);
nonVisualShapeProperties12.Append(nonVisualShapeDrawingProperties12);
nonVisualShapeProperties12.Append(applicationNonVisualDrawingProperties16);
ShapeProperties shapeProperties12 = new ShapeProperties();
A.Transform2D transform2D9 = new A.Transform2D();
A.Offset offset13 = new A.Offset(){ X = 457200L, Y = 274638L };
A.Extents extents13 = new A.Extents(){ Cx = 8229600L, Cy = 1143000L };
transform2D9.Append(offset13);
transform2D9.Append(extents13);
A.PresetGeometry presetGeometry7 = new A.PresetGeometry(){ Preset = A.ShapeTypeValues.Rectangle };
A.AdjustValueList adjustValueList7 = new A.AdjustValueList();
presetGeometry7.Append(adjustValueList7);
shapeProperties12.Append(transform2D9);
shapeProperties12.Append(presetGeometry7);
TextBody textBody12 = new TextBody();
A.BodyProperties bodyProperties12 = new A.BodyProperties(){ Vertical = A.TextVerticalValues.Horizontal, LeftInset = 91440, TopInset = 45720, R
|
请发表评论