Example #1
0
        //--------------------------------------------------------------------
        //
        // Private Methods
        //
        //---------------------------------------------------------------------

        #region Private Methods
        private void _EnsureBlockLoaded()
        {
            if (_HasStatus(BlockStatus.UnloadedBlock))
            {
                _ClearStatus(BlockStatus.UnloadedBlock);

                DocumentsTrace.FixedDocumentSequence.TextOM.Trace("Loading TextContainer " + _docRef.ToString());
                // Load the TextContainer
                IDocumentPaginatorSource idp = _docRef.GetDocument(false /*forceReload*/);
                IServiceProvider         isp = idp as IServiceProvider;
                if (isp != null)
                {
                    ITextContainer tc = isp.GetService(typeof(ITextContainer)) as ITextContainer;
                    if (tc != null)
                    {
                        _container = tc;
                        DocumentsTrace.FixedDocumentSequence.TextOM.Trace("Got ITextContainer");
                    }
                }

                if (_container == null)
                {
                    _container = new NullTextContainer();
                }
            }
        }
 //------------------------------------------------------
 //
 //  Constructors
 //
 //------------------------------------------------------
 #region Constructors
 // Ctor always set mutable flag to false
 internal NullTextPointer(NullTextContainer container, LogicalDirection gravity)
 {
     _container = container;
     _gravity = gravity;
 }
        //--------------------------------------------------------------------
        //
        // Private Methods
        //
        //---------------------------------------------------------------------

        #region Private Methods
        private void _EnsureBlockLoaded()
        {
            if (_HasStatus(BlockStatus.UnloadedBlock))
            {
                _ClearStatus(BlockStatus.UnloadedBlock);

                DocumentsTrace.FixedDocumentSequence.TextOM.Trace("Loading TextContainer " + _docRef.ToString());
                // Load the TextContainer
                IDocumentPaginatorSource idp = _docRef.GetDocument(false /*forceReload*/);
                IServiceProvider isp = idp as IServiceProvider;
                if (isp != null)
                {
                    ITextContainer tc = isp.GetService(typeof(ITextContainer)) as ITextContainer;
                    if (tc != null)
                    {
                        _container = tc;
                        DocumentsTrace.FixedDocumentSequence.TextOM.Trace("Got ITextContainer");
                    }
                }

                if (_container == null)
                {
                    _container = new NullTextContainer();
                }
            }
        }
Example #4
0
 // Token: 0x06003207 RID: 12807 RVA: 0x000DC220 File Offset: 0x000DA420
 internal NullTextPointer(NullTextContainer container, LogicalDirection gravity)
 {
     this._container = container;
     this._gravity   = gravity;
 }