Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Framework / MS / Internal / IO / Packaging / fixedPageContentExtractor.cs / 1 / fixedPageContentExtractor.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: // Given a DOM node for a fixed page, enumerates its text content. // // History: // 05/11/2004: [....]: Initial implementation //--------------------------------------------------------------------------- using System; using System.Xml; namespace MS.Internal.IO.Packaging { ////// Implements a sequence of (textContent, precedingDelimiter) pairs for /// a fixed page node. /// internal class FixedPageContentExtractor { //----------------------------------------------------- // // Constructors // //----------------------------------------------------- #region Constructors ////// Initialize a FixedPageContentExtractor from a DOM node. /// internal FixedPageContentExtractor(XmlNode fixedPage) { _fixedPageInfo = new XmlFixedPageInfo(fixedPage); _nextGlyphRun = 0; } #endregion Constructors //------------------------------------------------------ // // Internal Methods // //----------------------------------------------------- #region Internal Methods ////// Return the content of the next glyph run, with a boolean indication /// whether it is separated by a space form the preceding glyph run. /// internal string NextGlyphContent(out bool inline, out uint lcid) { // Right now, we use the simplest possible heuristic for // spacing glyph runs: All pairs of adjacent glyph runs are assumed // to be separated by a word break. inline = false; lcid = 0; // End of page? if (_nextGlyphRun >= _fixedPageInfo.GlyphRunCount) { return null; } // Retrieve inline, lcid and return value from the next glyph run info. GlyphRunInfo glyphRunInfo = _fixedPageInfo.GlyphRunAtPosition(_nextGlyphRun); lcid = glyphRunInfo.LanguageID; // Point to the next glyph run for the next call and return. ++_nextGlyphRun; return glyphRunInfo.UnicodeString; } #endregion Internal Methods //------------------------------------------------------ // // Internal Properties // //------------------------------------------------------ #region Internal Properties ////// Indicates whether no more content can be returned. /// internal bool AtEndOfPage { get { return _nextGlyphRun >= _fixedPageInfo.GlyphRunCount; } } #endregion Internal Properties //----------------------------------------------------- // // Private Fields // //------------------------------------------------------ #region Private Fields private XmlFixedPageInfo _fixedPageInfo; private int _nextGlyphRun; #endregion Private Fields } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- BasicCellRelation.cs
- BlurEffect.cs
- WebCategoryAttribute.cs
- ThicknessConverter.cs
- ResourceReferenceExpression.cs
- DictionarySectionHandler.cs
- SimpleApplicationHost.cs
- safelink.cs
- IndentTextWriter.cs
- QueryAccessibilityHelpEvent.cs
- RichTextBoxConstants.cs
- TypeConverter.cs
- SpecularMaterial.cs
- CursorConverter.cs
- Library.cs
- RepeaterItem.cs
- DataColumnMappingCollection.cs
- JapaneseCalendar.cs
- XmlWriterDelegator.cs
- HuffModule.cs
- RegexEditorDialog.cs
- HtmlTitle.cs
- ContextBase.cs
- VariableAction.cs
- AsyncStreamReader.cs
- PagePropertiesChangingEventArgs.cs
- CorrelationHandle.cs
- MessageLoggingElement.cs
- GenericsInstances.cs
- ConnectivityStatus.cs
- XPathNodeIterator.cs
- QuestionEventArgs.cs
- HtmlInputPassword.cs
- DesignerSerializationOptionsAttribute.cs
- PasswordTextNavigator.cs
- NavigationHelper.cs
- LinqDataSourceUpdateEventArgs.cs
- InvalidCommandTreeException.cs
- PersistenceException.cs
- RewritingProcessor.cs
- QueryReaderSettings.cs
- BlurEffect.cs
- HttpServerProtocol.cs
- keycontainerpermission.cs
- QuotedPrintableStream.cs
- RegexCompiler.cs
- SendMessageChannelCache.cs
- FontFamilyConverter.cs
- PersistenceContext.cs
- OrderByQueryOptionExpression.cs
- COM2ExtendedUITypeEditor.cs
- XmlSchemaRedefine.cs
- URIFormatException.cs
- Parser.cs
- WorkflowValidationFailedException.cs
- ContentElementCollection.cs
- ValidationRuleCollection.cs
- UnmanagedMemoryStreamWrapper.cs
- ExeContext.cs
- ProgressPage.cs
- SqlBulkCopyColumnMappingCollection.cs
- TypeUtil.cs
- MeshGeometry3D.cs
- RuleRef.cs
- TabPageDesigner.cs
- XamlInt32CollectionSerializer.cs
- PathSegmentCollection.cs
- UnmanagedMemoryStreamWrapper.cs
- SystemIcons.cs
- Annotation.cs
- Schedule.cs
- DataBoundLiteralControl.cs
- RoutedEventValueSerializer.cs
- BeginStoryboard.cs
- AnnotationService.cs
- COM2ColorConverter.cs
- MachineKey.cs
- DataSourceListEditor.cs
- XmlILModule.cs
- MemberDomainMap.cs
- FormattedText.cs
- NamespaceList.cs
- XmlSchemaAny.cs
- FileSecurity.cs
- ComUdtElement.cs
- ScrollBar.cs
- Message.cs
- SynchronizationContext.cs
- cookiecontainer.cs
- SortFieldComparer.cs
- ObjectDataSourceStatusEventArgs.cs
- WebBrowserDocumentCompletedEventHandler.cs
- StyleXamlParser.cs
- VisualCollection.cs
- Helpers.cs
- Vector3DCollection.cs
- DesignTimeTemplateParser.cs
- MediaScriptCommandRoutedEventArgs.cs
- XmlNullResolver.cs
- DataGridViewCellValidatingEventArgs.cs