本文整理汇总了C#中ParagraphProperties.Append方法的典型用法代码示例。如果您正苦于以下问题:C# ParagraphProperties.Append方法的具体用法?C# ParagraphProperties.Append怎么用?C# ParagraphProperties.Append使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParagraphProperties
的用法示例。
在下文中一共展示了ParagraphProperties.Append方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetParagraphProperties
private static ParagraphProperties GetParagraphProperties(Model.Paragraph paragraph)
{
ParagraphProperties paraProps = new ParagraphProperties();
SpacingBetweenLines paraSpacing = new SpacingBetweenLines()
{
Before = Utilities.GetDxaFromPoints(paragraph.SpacingBefore),
After = Utilities.GetDxaFromPoints(paragraph.SpacingAfter),
LineRule = LineSpacingRuleValues.Auto,
//If the value of the lineRule attribute is auto, then the value of the line attribute shall be interpreted as 240ths of a line
Line = (paragraph.Leading * 240).ToString()
};
Justification justification = new Justification();
switch (paragraph.Justification)
{
case DocGen.ObjectModel.Justification.Left:
justification.Val = JustificationValues.Left;
break;
case DocGen.ObjectModel.Justification.Center:
justification.Val = JustificationValues.Center;
break;
case DocGen.ObjectModel.Justification.Right:
justification.Val = JustificationValues.Right;
break;
case DocGen.ObjectModel.Justification.Justified:
justification.Val = JustificationValues.Both;
break;
}
paraProps.Append(justification);
paraProps.Append(paraSpacing);
return paraProps;
}
示例2: ToOpenXmlElements
public override IEnumerable<OpenXmlElement> ToOpenXmlElements(DocumentFormat.OpenXml.Packaging.MainDocumentPart mainDocumentPart)
{
var result = new DocumentFormat.OpenXml.Wordprocessing.Paragraph();
var paragraphProperties = new ParagraphProperties();
var numberingProperties = new NumberingProperties();
var numberingLevelReference = new NumberingLevelReference() { Val = 0 };
NumberingId numberingId;
ParagraphStyleId paragraphStyleId;
if (Parent is OrderedListFormattedElement)
{
paragraphStyleId = new ParagraphStyleId() { Val = "NumberedList" };
numberingId = new NumberingId() { Val = ((OrderedListFormattedElement)Parent).NumberingInstanceId };
var indentation = new Indentation() { Left = "1440", Hanging = "720" };
paragraphProperties.Append(indentation);
}
else
{
paragraphStyleId = new ParagraphStyleId() { Val = "UnorderedListStyle" };
numberingId = new NumberingId() { Val = 3 };
}
numberingProperties.Append(numberingLevelReference);
numberingProperties.Append(numberingId);
var spacingBetweenLines= new SpacingBetweenLines() { After = "100", AfterAutoSpacing = true };
paragraphProperties.Append(paragraphStyleId);
paragraphProperties.Append(numberingProperties);
paragraphProperties.Append(spacingBetweenLines);
result.Append(paragraphProperties);
ForEachChild(x =>
{
if (x is TextFormattedElement)
{
result.Append(
new DocumentFormat.OpenXml.Wordprocessing.Run(x.ToOpenXmlElements(mainDocumentPart))
);
}
else
{
result.Append(x.ToOpenXmlElements(mainDocumentPart));
}
});
return new List<OpenXmlElement> { result };
}
示例3: SetListProperties
private void SetListProperties(NumberFormatValues numberFormat, ParagraphProperties paragraphProperties)
{
ParagraphStyleId paragraphStyleId = new ParagraphStyleId() { Val = "ListParagraph" };
NumberingProperties numberingProperties = new NumberingProperties();
NumberingLevelReference numberingLevelReference = new NumberingLevelReference() { Val = 0 };
NumberingId numberingId = new NumberingId() { Val = ((Int32)numberFormat) + 1 };
numberingProperties.Append(numberingLevelReference);
numberingProperties.Append(numberingId);
paragraphProperties.Append(paragraphStyleId);
paragraphProperties.Append(numberingProperties);
}
示例4: ApplyFooter
private void ApplyFooter(FooterPart footerPart)
{
var footer1 = new Footer();
footer1.AddNamespaceDeclaration("ve", "http://schemas.openxmlformats.org/markup-compatibility/2006");
footer1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
footer1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
footer1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
footer1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
footer1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
footer1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
footer1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
footer1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
var paragraph1 = new Paragraph { RsidParagraphAddition = "005641D2", RsidRunAdditionDefault = "005641D2" };
var paragraphProperties1 = new ParagraphProperties();
var paragraphStyleId1 = new ParagraphStyleId { Val = "Footer" };
paragraphProperties1.Append(paragraphStyleId1);
var run1 = new Run();
var text1 = new Text();
text1.Text = "Generated with Pickles " + Assembly.GetExecutingAssembly().GetName().Version;
run1.Append(text1);
paragraph1.Append(paragraphProperties1);
paragraph1.Append(run1);
footer1.Append(paragraph1);
footerPart.Footer = footer1;
}
示例5: GenerateParagraph
public static void GenerateParagraph(this Body body, string text, string styleId)
{
var paragraph = new Paragraph
{
RsidParagraphAddition = "00CC1B7A",
RsidParagraphProperties = "0016335E",
RsidRunAdditionDefault = "0016335E"
};
var paragraphProperties = new ParagraphProperties();
var paragraphStyleId = new ParagraphStyleId {Val = styleId};
paragraphProperties.Append(paragraphStyleId);
var run1 = new Run();
var text1 = new Text();
text1.Text = text;
run1.Append(text1);
paragraph.Append(paragraphProperties);
paragraph.Append(run1);
body.Append(paragraph);
}
示例6: GetListItem
/// <summary>
/// Returns a OpenXMl paragraph representing formatted listItem.
/// </summary>
/// <param name="item">listItem object</param>
/// <param name="numStyleId">style id to use</param>
/// <returns></returns>
private static Paragraph GetListItem(Model.ListItem item, int numStyleId)
{
Paragraph listItemPara = new Paragraph();
ParagraphProperties paraProps = new ParagraphProperties();
NumberingProperties numberingProps = new NumberingProperties();
NumberingLevelReference numberingLevelReference = new NumberingLevelReference() { Val = 0 };
NumberingId numberingId = new NumberingId() { Val = numStyleId };
numberingProps.Append(numberingLevelReference);
numberingProps.Append(numberingId);
paraProps.Append(numberingProps);
Run listRun = new Run();
Text listItemText = new Text()
{
Text = item.Body
};
listRun.Append(listItemText);
listItemPara.Append(paraProps);
listItemPara.Append(listRun);
return listItemPara;
}
示例7: AddAlphaRow
public Paragraph AddAlphaRow()
{
var paragraph1 = new Paragraph {RsidParagraphMarkRevision = "005205ED", RsidParagraphAddition = "00A01149", RsidParagraphProperties = "005205ED", RsidRunAdditionDefault = "00E7001C"};
var paragraphProperties1 = new ParagraphProperties();
var spacingBetweenLines1 = new SpacingBetweenLines {After = "60", Line = "240", LineRule = LineSpacingRuleValues.Auto};
var justification1 = new Justification {Val = JustificationValues.Center};
var paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
var runFonts1 = new RunFonts {ComplexScriptTheme = ThemeFontValues.MinorHighAnsi};
var bold1 = new Bold();
var fontSize1 = new FontSize {Val = "32"};
var fontSizeComplexScript1 = new FontSizeComplexScript {Val = "32"};
paragraphMarkRunProperties1.Append(runFonts1);
paragraphMarkRunProperties1.Append(bold1);
paragraphMarkRunProperties1.Append(fontSize1);
paragraphMarkRunProperties1.Append(fontSizeComplexScript1);
paragraphProperties1.Append(new KeepNext());
paragraphProperties1.Append(spacingBetweenLines1);
paragraphProperties1.Append(justification1);
paragraphProperties1.Append(paragraphMarkRunProperties1);
var run1 = new Run {RsidRunProperties = "005205ED"};
var runProperties1 = new RunProperties();
var runFonts2 = new RunFonts {ComplexScriptTheme = ThemeFontValues.MinorHighAnsi};
var bold2 = new Bold();
var fontSize2 = new FontSize {Val = "32"};
var fontSizeComplexScript2 = new FontSizeComplexScript {Val = "32"};
runProperties1.Append(runFonts2);
runProperties1.Append(bold2);
runProperties1.Append(fontSize2);
runProperties1.Append(fontSizeComplexScript2);
var text1 = new Text();
text1.Text = FamilyName.Substring(0, 1);
run1.Append(runProperties1);
run1.Append(text1);
paragraph1.Append(paragraphProperties1);
paragraph1.Append(run1);
return paragraph1;
}
示例8: AddHeaderRow
private static void AddHeaderRow(DataTable table, Table wordTable, TableStyle tableStyle)
{
// Create a row.
TableRow tRow = new TableRow();
foreach (DataColumn iColumn in table.Columns) {
// Create a cell.
TableCell tCell = new TableCell();
TableCellProperties tCellProperties = new TableCellProperties();
// Set Cell Color
Shading tCellColor = new Shading() { Val = ShadingPatternValues.Clear, Color = "auto", Fill = System.Drawing.ColorTranslator.ToHtml(tableStyle.HeaderBackgroundColor) };
tCellProperties.Append(tCellColor);
// Append properties to the cell
tCell.Append(tCellProperties);
ParagraphProperties paragProperties = new ParagraphProperties();
Justification justification1 = new Justification() { Val = JustificationValues.Center };
SpacingBetweenLines spacingBetweenLines1 = new SpacingBetweenLines() { After = "0" };
paragProperties.Append(spacingBetweenLines1);
paragProperties.Append(justification1);
var parag = new Paragraph();
parag.Append(paragProperties);
var run = new Run(new Text(iColumn.ColumnName));
ApplyFontProperties(tableStyle, RowIdentification.Header, run);
parag.Append(run);
// Specify the table cell content.
tCell.Append(parag);
// Append the table cell to the table row.
tRow.Append(tCell);
}
// Append the table row to the table.
wordTable.Append(tRow);
}
示例9: CreateTopicText
private static IEnumerable<OpenXmlElement> CreateTopicText(DocumentFormat.OpenXml.Packaging.MainDocumentPart mainDocumentPart, FormattedContent formattedContent)
{
var formattedContentParagraphs = formattedContent.ToOpenXmlElements(mainDocumentPart);
foreach (var para in formattedContentParagraphs)
{
if (para is Paragraph)
{
if (((Paragraph)para).ParagraphProperties == null)
{
ParagraphProperties paragraphProperties22 = new ParagraphProperties();
ParagraphStyleId paragraphStyleId22 = new ParagraphStyleId() { Val = "StyleAfter0pt" };
SpacingBetweenLines spacingBetweenLines16 = new SpacingBetweenLines() { After = "360" };
paragraphProperties22.Append(paragraphStyleId22);
paragraphProperties22.Append(spacingBetweenLines16);
para.InsertAt(paragraphProperties22, 0);
}
}
}
return formattedContentParagraphs;
}
示例10: CreateCodeParagraph
private Paragraph CreateCodeParagraph(CodeVM code)
{
Paragraph paragraph1 = new Paragraph();
ParagraphProperties paragraphProperties1 = new ParagraphProperties();
Indentation indentation1 = new Indentation(){ FirstLine = "210", FirstLineChars = 100 };
paragraphProperties1.Append(indentation1);
Run run1 = new Run();
RunProperties runProperties1 = new RunProperties();
RunFonts runFonts1 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };
runProperties1.Append(runFonts1);
Text text1 = new Text();
text1.Text = code.Value;
run1.Append(runProperties1);
run1.Append(text1);
Run run2 = new Run();
RunProperties runProperties2 = new RunProperties();
RunFonts runFonts2 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };
runProperties2.Append(runFonts2);
TabChar tabChar1 = new TabChar();
run2.Append(runProperties2);
run2.Append(tabChar1);
Run run3 = new Run();
RunProperties runProperties3 = new RunProperties();
RunFonts runFonts3 = new RunFonts(){ Hint = FontTypeHintValues.EastAsia };
runProperties3.Append(runFonts3);
Text text2 = new Text();
text2.Text = code.Label;
run3.Append(runProperties3);
run3.Append(text2);
paragraph1.Append(paragraphProperties1);
paragraph1.Append(run1);
paragraph1.Append(run2);
paragraph1.Append(run3);
return paragraph1;
}
示例11: ProcessBorder
private void ProcessBorder(DocxNode node, ParagraphProperties properties)
{
ParagraphBorders paragraphBorders = new ParagraphBorders();
DocxBorder.ApplyBorders(paragraphBorders,
node.ExtractStyleValue(DocxBorder.borderName),
node.ExtractStyleValue(DocxBorder.leftBorderName),
node.ExtractStyleValue(DocxBorder.topBorderName),
node.ExtractStyleValue(DocxBorder.rightBorderName),
node.ExtractStyleValue(DocxBorder.bottomBorderName),
false);
if (paragraphBorders.HasChildren)
{
properties.Append(paragraphBorders);
}
}
示例12: AddSpacerCell
// Creates an TableCell instance and adds its children.
public static void AddSpacerCell(this TableRow row, string width = "173")
{
TableCell tableCell1 = new TableCell();
TableCellProperties tableCellProperties1 = new TableCellProperties();
TableCellWidth tableCellWidth1 = new TableCellWidth() { Width = width, Type = TableWidthUnitValues.Dxa };
tableCellProperties1.Append(tableCellWidth1);
Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "005A43FA", RsidParagraphProperties = "005A43FA", RsidRunAdditionDefault = "005A43FA" };
ParagraphProperties paragraphProperties1 = new ParagraphProperties();
Indentation indentation1 = new Indentation() { Left = "95", Right = "95" };
paragraphProperties1.Append(indentation1);
paragraph1.Append(paragraphProperties1);
tableCell1.Append(tableCellProperties1);
tableCell1.Append(paragraph1);
row.Append(tableCell1);
}
示例13: GenerateHeaderPartContent
public static void GenerateHeaderPartContent(HeaderPart part)
{
Header header1 = new Header() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } };
header1.AddNamespaceDeclaration("wpc", "http://schemas.microsoft.com/office/word/2010/wordprocessingCanvas");
header1.AddNamespaceDeclaration("mc", "http://schemas.openxmlformats.org/markup-compatibility/2006");
header1.AddNamespaceDeclaration("o", "urn:schemas-microsoft-com:office:office");
header1.AddNamespaceDeclaration("r", "http://schemas.openxmlformats.org/officeDocument/2006/relationships");
header1.AddNamespaceDeclaration("m", "http://schemas.openxmlformats.org/officeDocument/2006/math");
header1.AddNamespaceDeclaration("v", "urn:schemas-microsoft-com:vml");
header1.AddNamespaceDeclaration("wp14", "http://schemas.microsoft.com/office/word/2010/wordprocessingDrawing");
header1.AddNamespaceDeclaration("wp", "http://schemas.openxmlformats.org/drawingml/2006/wordprocessingDrawing");
header1.AddNamespaceDeclaration("w10", "urn:schemas-microsoft-com:office:word");
header1.AddNamespaceDeclaration("w", "http://schemas.openxmlformats.org/wordprocessingml/2006/main");
header1.AddNamespaceDeclaration("w14", "http://schemas.microsoft.com/office/word/2010/wordml");
header1.AddNamespaceDeclaration("wpg", "http://schemas.microsoft.com/office/word/2010/wordprocessingGroup");
header1.AddNamespaceDeclaration("wpi", "http://schemas.microsoft.com/office/word/2010/wordprocessingInk");
header1.AddNamespaceDeclaration("wne", "http://schemas.microsoft.com/office/word/2006/wordml");
header1.AddNamespaceDeclaration("wps", "http://schemas.microsoft.com/office/word/2010/wordprocessingShape");
Paragraph paragraph1 = new Paragraph() { RsidParagraphAddition = "00164C17", RsidRunAdditionDefault = "00164C17" };
ParagraphProperties paragraphProperties1 = new ParagraphProperties();
ParagraphStyleId paragraphStyleId1 = new ParagraphStyleId() { Val = "Header" };
paragraphProperties1.Append(paragraphStyleId1);
Run run1 = new Run();
Text text1 = new Text();
text1.Text = "Header";
run1.Append(text1);
paragraph1.Append(paragraphProperties1);
paragraph1.Append(run1);
header1.Append(paragraph1);
part.Header = header1;
}
示例14: GenerateFooterPartContent
private static void GenerateFooterPartContent(FooterPart part)
{
var footer1 = new Footer() { MCAttributes = new MarkupCompatibilityAttributes() { Ignorable = "w14 wp14" } };
var paragraph1 = new Paragraph() { RsidParagraphAddition = "00164C17", RsidRunAdditionDefault = "00164C17" };
var paragraphProperties1 = new ParagraphProperties();
var paragraphStyleId1 = new ParagraphStyleId() { Val = "Footer" };
paragraphProperties1.Append(paragraphStyleId1);
var run1 = new Run();
var text1 = new Text { Text = "Footer" };
run1.Append(text1);
paragraph1.Append(paragraphProperties1);
paragraph1.Append(run1);
footer1.Append(paragraph1);
part.Footer = footer1;
}
示例15: GenerateMainDocumentPart1Content
// Generates content of mainDocumentPart1.
private void GenerateMainDocumentPart1Content(MainDocumentPart mainDocumentPart1)
{
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");
Body body1 = new Body();
Table table1 = new Table();
TableProperties tableProperties1 = new TableProperties();
TableStyle tableStyle1 = new TableStyle() { Val = "TableGrid" };
TableWidth tableWidth1 = new TableWidth() { Width = "0", Type = TableWidthUnitValues.Auto };
TableBorders tableBorders1 = new TableBorders();
TopBorder topBorder1 = new TopBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
LeftBorder leftBorder1 = new LeftBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
BottomBorder bottomBorder1 = new BottomBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
RightBorder rightBorder1 = new RightBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
InsideHorizontalBorder insideHorizontalBorder1 = new InsideHorizontalBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
InsideVerticalBorder insideVerticalBorder1 = new InsideVerticalBorder() { Val = BorderValues.None, Color = "auto", Size = (UInt32Value)0U, Space = (UInt32Value)0U };
tableBorders1.Append(topBorder1);
tableBorders1.Append(leftBorder1);
tableBorders1.Append(bottomBorder1);
tableBorders1.Append(rightBorder1);
tableBorders1.Append(insideHorizontalBorder1);
tableBorders1.Append(insideVerticalBorder1);
TableLayout tableLayout1 = new TableLayout() { Type = TableLayoutValues.Fixed };
TableCellMarginDefault tableCellMarginDefault1 = new TableCellMarginDefault();
TableCellLeftMargin tableCellLeftMargin1 = new TableCellLeftMargin() { Width = 15, Type = TableWidthValues.Dxa };
TableCellRightMargin tableCellRightMargin1 = new TableCellRightMargin() { Width = 15, Type = TableWidthValues.Dxa };
tableCellMarginDefault1.Append(tableCellLeftMargin1);
tableCellMarginDefault1.Append(tableCellRightMargin1);
TableLook tableLook1 = new TableLook() { Val = "0000", FirstRow = false, LastRow = false, FirstColumn = false, LastColumn = false, NoHorizontalBand = false, NoVerticalBand = false };
tableProperties1.Append(tableStyle1);
tableProperties1.Append(tableWidth1);
tableProperties1.Append(tableBorders1);
tableProperties1.Append(tableLayout1);
tableProperties1.Append(tableCellMarginDefault1);
tableProperties1.Append(tableLook1);
TableGrid tableGrid1 = new TableGrid();
GridColumn gridColumn1 = new GridColumn() { Width = "3787" };
GridColumn gridColumn2 = new GridColumn() { Width = "173" };
GridColumn gridColumn3 = new GridColumn() { Width = "3787" };
GridColumn gridColumn4 = new GridColumn() { Width = "173" };
GridColumn gridColumn5 = new GridColumn() { Width = "3787" };
tableGrid1.Append(gridColumn1);
tableGrid1.Append(gridColumn2);
tableGrid1.Append(gridColumn3);
tableGrid1.Append(gridColumn4);
tableGrid1.Append(gridColumn5);
table1.Append(tableProperties1);
table1.Append(tableGrid1);
var n = 0;
TableRow row = null;
foreach(var p in q)
{
if (n % 3 == 0)
{
if (row != null)
table1.Append(row);
row = EmployerAddressRow.AddPersonsRow();
}
row.AddPersonCell(p, addEmployer);
if (n % 3 < 2)
row.AddSpacerCell();
n++;
}
if (n % 3 != 0 && row != null)
table1.Append(row);
Paragraph paragraph54 = new Paragraph() { RsidParagraphMarkRevision = "005A43FA", RsidParagraphAddition = "005A43FA", RsidParagraphProperties = "005A43FA", RsidRunAdditionDefault = "005A43FA" };
ParagraphProperties paragraphProperties54 = new ParagraphProperties();
Indentation indentation54 = new Indentation() { Left = "95", Right = "95" };
ParagraphMarkRunProperties paragraphMarkRunProperties1 = new ParagraphMarkRunProperties();
Vanish vanish1 = new Vanish();
//.........这里部分代码省略.........