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
- UIPropertyMetadata.cs
- D3DImage.cs
- Converter.cs
- EntityViewGenerationAttribute.cs
- ScriptResourceInfo.cs
- ComplexPropertyEntry.cs
- odbcmetadatacollectionnames.cs
- storepermissionattribute.cs
- DetailsViewDeleteEventArgs.cs
- ObjectViewQueryResultData.cs
- IDispatchConstantAttribute.cs
- DbConnectionFactory.cs
- Misc.cs
- BeginStoryboard.cs
- WindowsGraphics2.cs
- AsyncPostBackErrorEventArgs.cs
- SafeBuffer.cs
- TextChange.cs
- OptionalMessageQuery.cs
- MetafileHeaderWmf.cs
- XmlQueryContext.cs
- ProgressChangedEventArgs.cs
- JoinSymbol.cs
- KeyTimeConverter.cs
- EnvelopedSignatureTransform.cs
- WindowsTokenRoleProvider.cs
- SystemIPInterfaceStatistics.cs
- NewExpression.cs
- DebugTrace.cs
- OLEDB_Util.cs
- SqlDataSourceView.cs
- IChannel.cs
- XsdDateTime.cs
- ThreadLocal.cs
- CounterSample.cs
- AccessDataSourceView.cs
- TraceContextRecord.cs
- CodeTypeDeclarationCollection.cs
- GeneralTransform.cs
- IncrementalReadDecoders.cs
- HierarchicalDataSourceIDConverter.cs
- basevalidator.cs
- Int32Rect.cs
- KeyProperty.cs
- ClockController.cs
- HybridObjectCache.cs
- ResourceSet.cs
- WriteableBitmap.cs
- ExpressionBuilder.cs
- TableLayoutColumnStyleCollection.cs
- XmlSchemaObjectCollection.cs
- _TransmitFileOverlappedAsyncResult.cs
- C14NUtil.cs
- SQLMoneyStorage.cs
- VirtualDirectoryMappingCollection.cs
- TemplateBamlTreeBuilder.cs
- ImageAnimator.cs
- AuthenticationConfig.cs
- UnsafeNativeMethods.cs
- HtmlSelect.cs
- InstancePersistenceEvent.cs
- ServiceBusyException.cs
- ObjectCloneHelper.cs
- IndentedTextWriter.cs
- Animatable.cs
- XmlRootAttribute.cs
- AttributeQuery.cs
- EventNotify.cs
- SafeLocalMemHandle.cs
- ArrayTypeMismatchException.cs
- XmlNullResolver.cs
- StructuralCache.cs
- SQLDouble.cs
- CharEnumerator.cs
- UnsafeNativeMethodsPenimc.cs
- ImportCatalogPart.cs
- XmlSecureResolver.cs
- NotifyParentPropertyAttribute.cs
- SyndicationPerson.cs
- MessageBuilder.cs
- SQLResource.cs
- ObjectStateEntry.cs
- LinkClickEvent.cs
- Drawing.cs
- XmlArrayItemAttributes.cs
- DrawingImage.cs
- ImplicitInputBrush.cs
- ToolBarButton.cs
- CaseStatement.cs
- GridViewCancelEditEventArgs.cs
- NavigationFailedEventArgs.cs
- SecurityDescriptor.cs
- XhtmlBasicPageAdapter.cs
- BamlTreeNode.cs
- EntryPointNotFoundException.cs
- DataReaderContainer.cs
- DragDeltaEventArgs.cs
- DynamicILGenerator.cs
- ImmutableCollection.cs
- WorkflowLayouts.cs