C# Class Novacode.Container

Inheritance: DocXElement
显示文件 Open project: WordDocX/DocX

Public Properties

Property Type Description
ParentContainer ContainerType

Public Methods

Method Description
FindAll ( string str ) : List
FindAll ( string str, RegexOptions options ) : List
FindUniqueByPattern ( string pattern, RegexOptions options ) : List

Find all unique instances of the given Regex Pattern, returning the list of the unique strings found

InsertAtBookmark ( string toInsert, string bookmarkName ) : void
InsertBookmark ( String bookmarkName ) : Paragraph
InsertEquation ( string equation ) : Paragraph
InsertList ( Novacode.List list ) : Novacode.List
InsertList ( Novacode.List list, Font fontFamily, double fontSize ) : Novacode.List
InsertList ( Novacode.List list, double fontSize ) : Novacode.List
InsertList ( int index, Novacode.List list ) : Novacode.List
InsertParagraph ( ) : Paragraph
InsertParagraph ( Paragraph p ) : Paragraph
InsertParagraph ( int index, Paragraph p ) : Paragraph
InsertParagraph ( int index, string text, bool trackChanges ) : Paragraph
InsertParagraph ( int index, string text, bool trackChanges, Formatting formatting ) : Paragraph
InsertParagraph ( string text ) : Paragraph
InsertParagraph ( string text, bool trackChanges ) : Paragraph
InsertParagraph ( string text, bool trackChanges, Formatting formatting ) : Paragraph
InsertSection ( ) : void
InsertSection ( bool trackChanges ) : void
InsertSectionPageBreak ( bool trackChanges = false ) : void
InsertTable ( Table t ) : Table
InsertTable ( int index, Table t ) : Table
InsertTable ( int rowCount, int columnCount ) : Table
InsertTable ( int index, int rowCount, int columnCount ) : Table
RemoveParagraph ( Paragraph p ) : bool

Removes paragraph

RemoveParagraphAt ( int index ) : bool

Removes paragraph at specified position

RemoveTextInGivenFormat ( Formatting matchFormatting, MatchFormattingOptions fo = MatchFormattingOptions.SubsetMatch ) : int

Removes all items with required formatting

ReplaceText ( string searchValue, string>.Func regexMatchHandler, bool trackChanges = false, RegexOptions options = RegexOptions.None, Formatting newFormatting = null, Formatting matchFormatting = null, MatchFormattingOptions formattingOptions = MatchFormattingOptions.SubsetMatch ) : void

ReplaceText ( string searchValue, string newValue, bool trackChanges = false, RegexOptions options = RegexOptions.None, Formatting newFormatting = null, Formatting matchFormatting = null, MatchFormattingOptions formattingOptions = MatchFormattingOptions.SubsetMatch, bool escapeRegEx = true, bool useRegExSubstitutions = false ) : void
SetDirection ( Direction direction ) : void

Sets the Direction of content.

ValidateBookmarks ( ) : string[]

Private Methods

Method Description
Container ( DocX document, System.Xml.Linq.XElement xml ) : System
GetAttribute ( System.Xml.Linq.XElement e, string localName, string attributeName ) : string
GetContents ( bool deepSearch = false ) : List
GetListItemType ( string styleName ) : ListItemType
GetListItemType ( Paragraph p ) : void
GetParagraphs ( bool deepSearch = false ) : List
GetParagraphsRecursive ( System.Xml.Linq.XElement Xml, int &index, List &paragraphs, bool deepSearch = false ) : void
GetParent ( Paragraph newParagraph ) : void
GetParentFromXmlName ( string xmlName ) : ContainerType
RemoveTextWithFormatRecursive ( System.Xml.Linq.XElement element, Formatting matchFormatting, MatchFormattingOptions fo ) : int

Method Details

FindAll() public method

public FindAll ( string str ) : List
str string
return List

FindAll() public method

public FindAll ( string str, RegexOptions options ) : List
str string
options RegexOptions
return List

FindUniqueByPattern() public method

Find all unique instances of the given Regex Pattern, returning the list of the unique strings found
public FindUniqueByPattern ( string pattern, RegexOptions options ) : List
pattern string
options RegexOptions
return List

InsertAtBookmark() public method

public InsertAtBookmark ( string toInsert, string bookmarkName ) : void
toInsert string
bookmarkName string
return void

InsertBookmark() public method

public InsertBookmark ( String bookmarkName ) : Paragraph
bookmarkName String
return Paragraph

InsertEquation() public method

public InsertEquation ( string equation ) : Paragraph
equation string
return Paragraph

InsertList() public method

public InsertList ( Novacode.List list ) : Novacode.List
list Novacode.List
return Novacode.List

InsertList() public method

public InsertList ( Novacode.List list, Font fontFamily, double fontSize ) : Novacode.List
list Novacode.List
fontFamily Font
fontSize double
return Novacode.List

InsertList() public method

public InsertList ( Novacode.List list, double fontSize ) : Novacode.List
list Novacode.List
fontSize double
return Novacode.List

InsertList() public method

public InsertList ( int index, Novacode.List list ) : Novacode.List
index int
list Novacode.List
return Novacode.List

InsertParagraph() public method

public InsertParagraph ( ) : Paragraph
return Paragraph

InsertParagraph() public method

public InsertParagraph ( Paragraph p ) : Paragraph
p Paragraph
return Paragraph

InsertParagraph() public method

public InsertParagraph ( int index, Paragraph p ) : Paragraph
index int
p Paragraph
return Paragraph

InsertParagraph() public method

public InsertParagraph ( int index, string text, bool trackChanges ) : Paragraph
index int
text string
trackChanges bool
return Paragraph

InsertParagraph() public method

public InsertParagraph ( int index, string text, bool trackChanges, Formatting formatting ) : Paragraph
index int
text string
trackChanges bool
formatting Formatting
return Paragraph

InsertParagraph() public method

public InsertParagraph ( string text ) : Paragraph
text string
return Paragraph

InsertParagraph() public method

public InsertParagraph ( string text, bool trackChanges ) : Paragraph
text string
trackChanges bool
return Paragraph

InsertParagraph() public method

public InsertParagraph ( string text, bool trackChanges, Formatting formatting ) : Paragraph
text string
trackChanges bool
formatting Formatting
return Paragraph

InsertSection() public method

public InsertSection ( ) : void
return void

InsertSection() public method

public InsertSection ( bool trackChanges ) : void
trackChanges bool
return void

InsertSectionPageBreak() public method

public InsertSectionPageBreak ( bool trackChanges = false ) : void
trackChanges bool
return void

InsertTable() public method

public InsertTable ( Table t ) : Table
t Table
return Table

InsertTable() public method

public InsertTable ( int index, Table t ) : Table
index int
t Table
return Table

InsertTable() public method

public InsertTable ( int rowCount, int columnCount ) : Table
rowCount int
columnCount int
return Table

InsertTable() public method

public InsertTable ( int index, int rowCount, int columnCount ) : Table
index int
rowCount int
columnCount int
return Table

RemoveParagraph() public method

Removes paragraph
public RemoveParagraph ( Paragraph p ) : bool
p Paragraph Paragraph to remove
return bool

RemoveParagraphAt() public method

Removes paragraph at specified position
public RemoveParagraphAt ( int index ) : bool
index int Index of paragraph to remove
return bool

RemoveTextInGivenFormat() public method

Removes all items with required formatting
public RemoveTextInGivenFormat ( Formatting matchFormatting, MatchFormattingOptions fo = MatchFormattingOptions.SubsetMatch ) : int
matchFormatting Formatting
fo MatchFormattingOptions
return int

ReplaceText() public method

public ReplaceText ( string searchValue, string>.Func regexMatchHandler, bool trackChanges = false, RegexOptions options = RegexOptions.None, Formatting newFormatting = null, Formatting matchFormatting = null, MatchFormattingOptions formattingOptions = MatchFormattingOptions.SubsetMatch ) : void
searchValue string Value to find
regexMatchHandler string>.Func A Func that accepts the matching regex search group value and passes it to this to return the replacement string
trackChanges bool Enable trackchanges
options RegexOptions Regex options
newFormatting Formatting
matchFormatting Formatting
formattingOptions MatchFormattingOptions
return void

ReplaceText() public method

public ReplaceText ( string searchValue, string newValue, bool trackChanges = false, RegexOptions options = RegexOptions.None, Formatting newFormatting = null, Formatting matchFormatting = null, MatchFormattingOptions formattingOptions = MatchFormattingOptions.SubsetMatch, bool escapeRegEx = true, bool useRegExSubstitutions = false ) : void
searchValue string
newValue string
trackChanges bool
options RegexOptions
newFormatting Formatting
matchFormatting Formatting
formattingOptions MatchFormattingOptions
escapeRegEx bool
useRegExSubstitutions bool
return void

SetDirection() public method

Sets the Direction of content.
public SetDirection ( Direction direction ) : void
direction Direction Direction either LeftToRight or RightToLeft
return void

ValidateBookmarks() public method

public ValidateBookmarks ( ) : string[]
return string[]

Property Details

ParentContainer public_oe property

public ContainerType ParentContainer
return ContainerType