public GetAttributeRun ( int offset, int &startOffset, int &endOffset, bool includeDefaults ) : string>.IDictionary |
||
offset | int | |
startOffset | int | |
endOffset | int | |
includeDefaults | bool | |
리턴 | string>.IDictionary |
public void ExpandToEnclosingUnit(TextUnit unit) { int newStartOffset, newEndOffset; int dummy; switch (unit) { case TextUnit.Format: text.GetAttributeRun(startOffset, out newStartOffset, out newEndOffset, false); break; case TextUnit.Word: WordNormalize(); return; case TextUnit.Paragraph: ParagraphNormalize(); return; case TextUnit.Page: // Not currently supported; treat as Document case TextUnit.Document: StartOffset = 0; EndOffset = text.CharacterCount; return; default: text.GetTextAtOffset(startOffset, GetAtkBoundaryType(unit, false), out newStartOffset, out dummy); text.GetTextAtOffset(endOffset - 1, GetAtkBoundaryType(unit, false), out dummy, out newEndOffset); break; } if (newStartOffset < startOffset) { StartOffset = newStartOffset; } if (newEndOffset > endOffset) { EndOffset = newEndOffset; } }