Exemple #1
0
        internal void FormatCellBottomless(uint fswdir, double width, out PTS.FSFMTRBL fmtrbl, out int dvrUsed)
        {
            if (this.CellParagraph.StructuralCache.DtrList != null)
            {
                this.CellParagraph.InvalidateStructure(TextContainerHelper.GetCPFromElement(this.CellParagraph.StructuralCache.TextContainer, this.CellParagraph.Element, ElementEdge.BeforeStart));
            }
            PTS.FSPAP fspap = default(PTS.FSPAP);
            this.CellParagraph.GetParaProperties(ref fspap);
            IntPtr value;

            PTS.FSBBOX fsbbox;
            IntPtr     zero;

            PTS.FSKCLEAR fskclear;
            int          num;
            int          num2;

            this.CellParagraph.FormatParaBottomless(this, PTS.FromBoolean(false), fswdir, 0, TextDpi.ToTextDpi(width), 0, null, PTS.FSKCLEAR.fskclearNone, PTS.FromBoolean(true), out fmtrbl, out value, out dvrUsed, out fsbbox, out zero, out fskclear, out num, out num2);
            if (zero != IntPtr.Zero)
            {
                MarginCollapsingState marginCollapsingState = base.PtsContext.HandleToObject(zero) as MarginCollapsingState;
                PTS.ValidateHandle(marginCollapsingState);
                dvrUsed += marginCollapsingState.Margin;
                marginCollapsingState.Dispose();
                zero = IntPtr.Zero;
            }
            this._paraHandle.Value = value;
        }
 // Token: 0x06006AC9 RID: 27337 RVA: 0x001E90E6 File Offset: 0x001E72E6
 internal override void GetParaProperties(ref PTS.FSPAP fspap)
 {
     fspap.idobj              = PtsHost.TableParagraphId;
     fspap.fKeepWithNext      = 0;
     fspap.fBreakPageBefore   = 0;
     fspap.fBreakColumnBefore = 0;
 }
Exemple #3
0
        internal void FormatCellFinite(Size subpageSize, IntPtr breakRecordIn, bool isEmptyOk, uint fswdir, PTS.FSKSUPPRESSHARDBREAKBEFOREFIRSTPARA fsksuppresshardbreakbeforefirstparaIn, out PTS.FSFMTR fsfmtr, out int dvrUsed, out IntPtr breakRecordOut)
        {
            if (this.CellParagraph.StructuralCache.DtrList != null)
            {
                this.CellParagraph.InvalidateStructure(TextContainerHelper.GetCPFromElement(this.CellParagraph.StructuralCache.TextContainer, this.CellParagraph.Element, ElementEdge.BeforeStart));
            }
            PTS.FSPAP fspap = default(PTS.FSPAP);
            this.CellParagraph.GetParaProperties(ref fspap);
            PTS.FSRECT fsrect = default(PTS.FSRECT);
            fsrect.u  = (fsrect.v = 0);
            fsrect.du = TextDpi.ToTextDpi(subpageSize.Width);
            fsrect.dv = TextDpi.ToTextDpi(subpageSize.Height);
            bool   condition = breakRecordIn != IntPtr.Zero;
            IntPtr value;

            PTS.FSBBOX fsbbox;
            IntPtr     zero;

            PTS.FSKCLEAR fskclear;
            int          num;

            this.CellParagraph.FormatParaFinite(this, breakRecordIn, PTS.FromBoolean(true), IntPtr.Zero, PTS.FromBoolean(isEmptyOk), PTS.FromBoolean(condition), fswdir, ref fsrect, null, PTS.FSKCLEAR.fskclearNone, fsksuppresshardbreakbeforefirstparaIn, out fsfmtr, out value, out breakRecordOut, out dvrUsed, out fsbbox, out zero, out fskclear, out num);
            if (zero != IntPtr.Zero)
            {
                MarginCollapsingState marginCollapsingState = base.PtsContext.HandleToObject(zero) as MarginCollapsingState;
                PTS.ValidateHandle(marginCollapsingState);
                dvrUsed += marginCollapsingState.Margin;
                marginCollapsingState.Dispose();
                zero = IntPtr.Zero;
            }
            this._paraHandle.Value = value;
        }
Exemple #4
0
 // Token: 0x06006B20 RID: 27424 RVA: 0x001EEC2C File Offset: 0x001ECE2C
 internal override void GetParaProperties(ref PTS.FSPAP fspap)
 {
     fspap.fKeepWithNext      = 0;
     fspap.fBreakPageBefore   = 0;
     fspap.fBreakColumnBefore = 0;
     base.GetParaProperties(ref fspap, true);
     fspap.idobj = -1;
 }
 // Token: 0x0600674C RID: 26444 RVA: 0x001CDE1C File Offset: 0x001CC01C
 protected void GetParaProperties(ref PTS.FSPAP fspap, bool ignoreElementProps)
 {
     if (!ignoreElementProps)
     {
         fspap.fKeepWithNext      = PTS.FromBoolean(DynamicPropertyReader.GetKeepWithNext(this._element));
         fspap.fBreakPageBefore   = ((this._element is Block) ? PTS.FromBoolean(this.StructuralCache.CurrentFormatContext.FinitePage && ((Block)this._element).BreakPageBefore) : PTS.FromBoolean(false));
         fspap.fBreakColumnBefore = ((this._element is Block) ? PTS.FromBoolean(((Block)this._element).BreakColumnBefore) : PTS.FromBoolean(false));
     }
 }
 // Token: 0x06006A91 RID: 27281 RVA: 0x001E5813 File Offset: 0x001E3A13
 internal override void GetParaProperties(ref PTS.FSPAP fspap)
 {
     base.GetParaProperties(ref fspap, false);
     fspap.idobj = PtsHost.SubpageParagraphId;
     if (this._mainTextSegment == null)
     {
         this._mainTextSegment = new ContainerParagraph(this._element, this._structuralCache);
     }
 }
Exemple #7
0
        /// <summary>
        /// GetParaProperties.
        /// </summary>
        /// <param name="fspap">paragraph properties</param>
        internal override void GetParaProperties(
            ref PTS.FSPAP fspap)                // OUT: paragraph properties
        {
            fspap.idobj = PtsHost.TableParagraphId;
            //

            fspap.fKeepWithNext      = PTS.False;
            fspap.fBreakPageBefore   = PTS.False;
            fspap.fBreakColumnBefore = PTS.False;
        }
Exemple #8
0
 /// <summary>
 /// GetParaProperties.
 /// </summary>
 /// <param name="fspap">paragraph properties</param>
 internal override void GetParaProperties(
     ref PTS.FSPAP fspap)                // OUT: paragraph properties
 {
     fspap.idobj = PtsHost.TableParagraphId;
     // should think about setting page break controlling bits here.
     // (Previously this was not needed, because of double para structure we had)
     fspap.fKeepWithNext      = PTS.False;
     fspap.fBreakPageBefore   = PTS.False;
     fspap.fBreakColumnBefore = PTS.False;
 }
Exemple #9
0
        //-------------------------------------------------------------------
        //
        //  PTS callbacks
        //
        //-------------------------------------------------------------------

        #region PTS callbacks

        //-------------------------------------------------------------------
        // GetParaProperties
        //-------------------------------------------------------------------
        internal override void GetParaProperties(
            ref PTS.FSPAP fspap)                // OUT: paragraph properties
        {
            GetParaProperties(ref fspap, false);
            fspap.idobj = PtsHost.SubpageParagraphId;
            // Create the main text segment
            if (_mainTextSegment == null)
            {
                _mainTextSegment = new ContainerParagraph(_element, _structuralCache);
            }
        }
Exemple #10
0
        //-------------------------------------------------------------------
        //
        //  Protected Methods
        //
        //-------------------------------------------------------------------

        #region Protected Methods

        /// <summary>
        /// Retrieve PTS paragraph properties.
        /// </summary>
        /// <param name="fspap">
        /// Paragraph properties to initialize.
        /// </param>
        /// <param name="ignoreElementProps">
        /// Ignore element properties?
        /// </param>
        protected void GetParaProperties(ref PTS.FSPAP fspap, bool ignoreElementProps)
        {
            if (!ignoreElementProps)
            {
                fspap.fKeepWithNext = PTS.FromBoolean(DynamicPropertyReader.GetKeepWithNext(_element));
                // Can be broken only if Block.BreakPageBefore is set
                fspap.fBreakPageBefore = _element is Block?PTS.FromBoolean(StructuralCache.CurrentFormatContext.FinitePage && ((Block)_element).BreakPageBefore) : PTS.FromBoolean(false);

                // Can be broken only if Block.BreakColumnBefore is set
                fspap.fBreakColumnBefore = _element is Block?PTS.FromBoolean(((Block)_element).BreakColumnBefore) : PTS.FromBoolean(false);
            }
        }
        /// <summary>
        /// FormatCellBottomless
        /// </summary>
        /// <param name="fswdir">Text Direction</param>
        /// <param name="width">Width of cell (height is specified by row props)</param>
        /// <param name="fmtrbl">bottomless format result</param>
        /// <param name="dvrUsed">dvr Used</param>
        internal void FormatCellBottomless(uint fswdir, double width, out PTS.FSFMTRBL fmtrbl, out int dvrUsed)
        {
            IntPtr pfspara;

            PTS.FSBBOX fsbbox;
            IntPtr     pmcsclientOut;

            PTS.FSKCLEAR fskclearOut;
            int          dvrTopSpace;
            int          fPageBecomesUninterruptable;

            PTS.FSPAP fspap;


            if (CellParagraph.StructuralCache.DtrList != null)
            {
                CellParagraph.InvalidateStructure(TextContainerHelper.GetCPFromElement(CellParagraph.StructuralCache.TextContainer, CellParagraph.Element, ElementEdge.BeforeStart));
            }

            fspap = new PTS.FSPAP();
            CellParagraph.GetParaProperties(ref fspap);

            CellParagraph.FormatParaBottomless(this, PTS.FromBoolean(false),
                                               fswdir, 0, TextDpi.ToTextDpi(width),
                                               0, null, PTS.FSKCLEAR.fskclearNone,
                                               PTS.FromBoolean(true),
                                               out fmtrbl,
                                               out pfspara,
                                               out dvrUsed,
                                               out fsbbox,
                                               out pmcsclientOut,
                                               out fskclearOut,
                                               out dvrTopSpace,
                                               out fPageBecomesUninterruptable);

            if (pmcsclientOut != IntPtr.Zero)
            {
                MarginCollapsingState mcs = PtsContext.HandleToObject(pmcsclientOut) as MarginCollapsingState;
                PTS.ValidateHandle(mcs);
                dvrUsed += mcs.Margin;
                mcs.Dispose();
                pmcsclientOut = IntPtr.Zero;
            }

            _paraHandle.Value = pfspara;
        }
Exemple #12
0
        internal void UpdateBottomlessCell(uint fswdir, double width, out PTS.FSFMTRBL fmtrbl, out int dvrUsed)
        {
            PTS.FSPAP fspap = default(PTS.FSPAP);
            this.CellParagraph.GetParaProperties(ref fspap);
            PTS.FSBBOX fsbbox;
            IntPtr     zero;

            PTS.FSKCLEAR fskclear;
            int          num;
            int          num2;

            this.CellParagraph.UpdateBottomlessPara(this._paraHandle.Value, this, PTS.FromBoolean(false), fswdir, 0, TextDpi.ToTextDpi(width), 0, null, PTS.FSKCLEAR.fskclearNone, PTS.FromBoolean(true), out fmtrbl, out dvrUsed, out fsbbox, out zero, out fskclear, out num, out num2);
            if (zero != IntPtr.Zero)
            {
                MarginCollapsingState marginCollapsingState = base.PtsContext.HandleToObject(zero) as MarginCollapsingState;
                PTS.ValidateHandle(marginCollapsingState);
                dvrUsed += marginCollapsingState.Margin;
                marginCollapsingState.Dispose();
                zero = IntPtr.Zero;
            }
        }
        /// <summary>
        /// UpdateBottomlessCell
        /// </summary>
        /// <param name="fswdir">Text Direction</param>
        /// <param name="width">Width of cell (height is specified by row props)</param>
        /// <param name="fmtrbl">bottomless format result</param>
        /// <param name="dvrUsed">dvr Used</param>
        internal void UpdateBottomlessCell(uint fswdir, double width, out PTS.FSFMTRBL fmtrbl, out int dvrUsed)
        {
            IntPtr pmcsclientOut;

            PTS.FSKCLEAR fskclearOut;
            PTS.FSBBOX   fsbbox;
            int          dvrTopSpace;
            int          fPageBecomesUninterruptable;

            PTS.FSPAP fspap;

            fspap = new PTS.FSPAP();
            CellParagraph.GetParaProperties(ref fspap);

            CellParagraph.UpdateBottomlessPara(_paraHandle.Value, this,
                                               PTS.FromBoolean(false),
                                               fswdir, 0,
                                               TextDpi.ToTextDpi(width),
                                               0, null,
                                               PTS.FSKCLEAR.fskclearNone,
                                               PTS.FromBoolean(true),
                                               out fmtrbl,
                                               out dvrUsed,
                                               out fsbbox,
                                               out pmcsclientOut,
                                               out fskclearOut,
                                               out dvrTopSpace,
                                               out fPageBecomesUninterruptable);
            if (pmcsclientOut != IntPtr.Zero)
            {
                MarginCollapsingState mcs = PtsContext.HandleToObject(pmcsclientOut) as MarginCollapsingState;
                PTS.ValidateHandle(mcs);
                dvrUsed += mcs.Margin;
                mcs.Dispose();
                pmcsclientOut = IntPtr.Zero;
            }
        }
Exemple #14
0
        //------------------------------------------------------
        //
        //  Internal Methods
        //
        //------------------------------------------------------

        #region Internal Methods

        //-------------------------------------------------------------------
        // GetParaProperties
        //-------------------------------------------------------------------
        internal override void GetParaProperties(
            ref PTS.FSPAP fspap)     // OUT: paragraph properties
        {
            Invariant.Assert(false); // No para properties for row.
        }
 // Token: 0x06006745 RID: 26437
 internal abstract void GetParaProperties(ref PTS.FSPAP fspap);
 //-------------------------------------------------------------------
 // GetParaProperties
 //-------------------------------------------------------------------
 internal override void GetParaProperties(
     ref PTS.FSPAP fspap)        // OUT: paragraph properties
 {
     GetParaProperties(ref fspap, false);
     fspap.idobj = PtsHost.FloaterParagraphId;
 }
 // Token: 0x0600679B RID: 26523 RVA: 0x001CFE43 File Offset: 0x001CE043
 internal override void GetParaProperties(ref PTS.FSPAP fspap)
 {
     base.GetParaProperties(ref fspap, false);
     fspap.idobj = PtsHost.ContainerParagraphId;
 }
        //-------------------------------------------------------------------
        //
        //  PTS callbacks
        //
        //-------------------------------------------------------------------

        #region PTS callbacks

        //-------------------------------------------------------------------
        // GetParaProperties
        //-------------------------------------------------------------------
        internal override void GetParaProperties(
            ref PTS.FSPAP fspap)                // OUT: paragraph properties
        {
            GetParaProperties(ref fspap, false);
            fspap.idobj = PTS.fsidobjFigure;
        }
 // Token: 0x060067E9 RID: 26601 RVA: 0x001D2E6C File Offset: 0x001D106C
 internal override void GetParaProperties(ref PTS.FSPAP fspap)
 {
     base.GetParaProperties(ref fspap, false);
     fspap.idobj = -2;
 }
 // Token: 0x06006A1D RID: 27165 RVA: 0x0012B65E File Offset: 0x0012985E
 internal override void GetParaProperties(ref PTS.FSPAP fspap)
 {
     Invariant.Assert(false);
 }
        /// <summary>
        /// FormatCellFinite - Calls same apis that PTS does for formatting
        /// </summary>
        /// <param name="subpageSize">Subpage size.</param>
        /// <param name="breakRecordIn">Subpage break record.</param>
        /// <param name="isEmptyOk">Is an empty cell ok?</param>
        /// <param name="fswdir">Text Direction</param>
        /// <param name="fsksuppresshardbreakbeforefirstparaIn">Suppress hard break before first para</param>
        /// <param name="fsfmtr">Format result</param>
        /// <param name="dvrUsed">dvr Used</param>
        /// <param name="breakRecordOut">Resultant break record for end of page</param>
        internal void FormatCellFinite(Size subpageSize, IntPtr breakRecordIn, bool isEmptyOk, uint fswdir,
                                       PTS.FSKSUPPRESSHARDBREAKBEFOREFIRSTPARA fsksuppresshardbreakbeforefirstparaIn,
                                       out PTS.FSFMTR fsfmtr, out int dvrUsed, out IntPtr breakRecordOut)
        {
            IntPtr pfspara;

            PTS.FSBBOX fsbbox;
            IntPtr     pmcsclientOut;

            PTS.FSKCLEAR fskclearOut;
            int          dvrTopSpace;

            PTS.FSPAP fspap;

            if (CellParagraph.StructuralCache.DtrList != null && breakRecordIn != IntPtr.Zero)
            {
                CellParagraph.InvalidateStructure(TextContainerHelper.GetCPFromElement(CellParagraph.StructuralCache.TextContainer, CellParagraph.Element, ElementEdge.BeforeStart));
            }

            // Ensures segment is created for paragraph
            fspap = new PTS.FSPAP();
            CellParagraph.GetParaProperties(ref fspap);

            PTS.FSRECT rectCell;

            rectCell = new PTS.FSRECT();

            rectCell.u = rectCell.v = 0;

            rectCell.du = TextDpi.ToTextDpi(subpageSize.Width);
            rectCell.dv = TextDpi.ToTextDpi(subpageSize.Height);

            // Suppress top space if cell is broken, but not otherwise
            bool suppressTopSpace = (breakRecordIn != IntPtr.Zero) ? true : false;

            CellParagraph.FormatParaFinite(this, breakRecordIn,
                                           PTS.FromBoolean(true),
                                           IntPtr.Zero,
                                           PTS.FromBoolean(isEmptyOk),
                                           PTS.FromBoolean(suppressTopSpace),
                                           fswdir,
                                           ref rectCell,
                                           null,
                                           PTS.FSKCLEAR.fskclearNone,
                                           fsksuppresshardbreakbeforefirstparaIn,
                                           out fsfmtr,
                                           out pfspara,
                                           out breakRecordOut,
                                           out dvrUsed,
                                           out fsbbox,
                                           out pmcsclientOut,
                                           out fskclearOut,
                                           out dvrTopSpace);

            if (pmcsclientOut != IntPtr.Zero)
            {
                MarginCollapsingState mcs = PtsContext.HandleToObject(pmcsclientOut) as MarginCollapsingState;
                PTS.ValidateHandle(mcs);
                dvrUsed += mcs.Margin;
                mcs.Dispose();
                pmcsclientOut = IntPtr.Zero;
            }
            _paraHandle.Value = pfspara;
        }