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
- TypeLoadException.cs
- ControllableStoryboardAction.cs
- DataGridViewSortCompareEventArgs.cs
- TypeGeneratedEventArgs.cs
- TypedReference.cs
- CodeIdentifier.cs
- CodeAttributeDeclarationCollection.cs
- CallbackWrapper.cs
- Freezable.cs
- SessionStateSection.cs
- NamespaceMapping.cs
- SqlComparer.cs
- DataListItemCollection.cs
- DataServiceRequestOfT.cs
- WindowsFormsSectionHandler.cs
- DesignerVerb.cs
- QilReference.cs
- Random.cs
- UnescapedXmlDiagnosticData.cs
- CodeEventReferenceExpression.cs
- SoapEnumAttribute.cs
- BoolExpression.cs
- DataColumnPropertyDescriptor.cs
- EventLogPermissionEntry.cs
- HandleScope.cs
- XmlNamespaceDeclarationsAttribute.cs
- DateTimeOffset.cs
- DispatcherObject.cs
- DesignerDataSourceView.cs
- FilterException.cs
- HwndSourceKeyboardInputSite.cs
- LinearKeyFrames.cs
- Crc32Helper.cs
- Bold.cs
- SqlTriggerAttribute.cs
- Light.cs
- MenuItemCollection.cs
- KeysConverter.cs
- HwndSourceKeyboardInputSite.cs
- Odbc32.cs
- X509SecurityTokenProvider.cs
- Oci.cs
- MemoryStream.cs
- ItemMap.cs
- WebPartConnectionsConnectVerb.cs
- Parallel.cs
- WindowsListViewItemCheckBox.cs
- UpdatePanelControlTrigger.cs
- CultureInfoConverter.cs
- DataGridItemCollection.cs
- QilStrConcatenator.cs
- PointF.cs
- CodeTypeParameter.cs
- PathStreamGeometryContext.cs
- ParserStreamGeometryContext.cs
- ColorConvertedBitmapExtension.cs
- WebSysDisplayNameAttribute.cs
- DBSqlParserTable.cs
- FixedElement.cs
- WebPartRestoreVerb.cs
- MDIWindowDialog.cs
- RegularExpressionValidator.cs
- _NetworkingPerfCounters.cs
- FormViewInsertEventArgs.cs
- NegatedConstant.cs
- XamlFilter.cs
- StateMachineWorkflowInstance.cs
- PropertyPathWorker.cs
- DataGridTextColumn.cs
- Debug.cs
- PaintEvent.cs
- ClientSettingsSection.cs
- ListViewItem.cs
- DataGridViewCellValidatingEventArgs.cs
- Thumb.cs
- ToolStripAdornerWindowService.cs
- TextBlock.cs
- sqlinternaltransaction.cs
- ThumbButtonInfoCollection.cs
- BufferBuilder.cs
- _NetworkingPerfCounters.cs
- ColumnPropertiesGroup.cs
- CriticalHandle.cs
- CollectionViewGroupRoot.cs
- SystemIPv4InterfaceProperties.cs
- SyntaxCheck.cs
- CodeExpressionCollection.cs
- RadioButtonPopupAdapter.cs
- CatalogZoneBase.cs
- NullableIntSumAggregationOperator.cs
- RangeValidator.cs
- WebPart.cs
- LineBreak.cs
- WSSecurityOneDotOneSendSecurityHeader.cs
- FontInfo.cs
- SmtpDateTime.cs
- ControlAdapter.cs
- AuthenticationService.cs
- JsonReaderDelegator.cs
- TabItemAutomationPeer.cs