예제 #1
0
        internal void FormatCellFinite(TableParaClient tableParaClient, IntPtr pfsbrkcellIn, IntPtr pfsFtnRejector, int fEmptyOK, uint fswdirTable, int dvrAvailable, out PTS.FSFMTR pfmtr, out IntPtr ppfscell, out IntPtr pfsbrkcellOut, out int dvrUsed)
        {
            CellParaClient cellParaClient = new CellParaClient(this, tableParaClient);
            Size           subpageSize    = new Size(cellParaClient.CalculateCellWidth(tableParaClient), Math.Max(TextDpi.FromTextDpi(dvrAvailable), 0.0));

            cellParaClient.FormatCellFinite(subpageSize, pfsbrkcellIn, PTS.ToBoolean(fEmptyOK), fswdirTable, PTS.FSKSUPPRESSHARDBREAKBEFOREFIRSTPARA.fsksuppresshardbreakbeforefirstparaNone, out pfmtr, out dvrUsed, out pfsbrkcellOut);
            ppfscell = cellParaClient.Handle;
            if (pfmtr.kstop == PTS.FSFMTRKSTOP.fmtrNoProgressOutOfSpace)
            {
                cellParaClient.Dispose();
                ppfscell = IntPtr.Zero;
                dvrUsed  = 0;
            }
            if (dvrAvailable < dvrUsed)
            {
                if (PTS.ToBoolean(fEmptyOK))
                {
                    if (cellParaClient != null)
                    {
                        cellParaClient.Dispose();
                    }
                    if (pfsbrkcellOut != IntPtr.Zero)
                    {
                        PTS.Validate(PTS.FsDestroySubpageBreakRecord(cellParaClient.PtsContext.Context, pfsbrkcellOut), cellParaClient.PtsContext);
                        pfsbrkcellOut = IntPtr.Zero;
                    }
                    ppfscell    = IntPtr.Zero;
                    pfmtr.kstop = PTS.FSFMTRKSTOP.fmtrNoProgressOutOfSpace;
                    dvrUsed     = 0;
                    return;
                }
                pfmtr.fForcedProgress = 1;
            }
        }
예제 #2
0
        // Token: 0x06006765 RID: 26469 RVA: 0x001CE804 File Offset: 0x001CCA04
        internal void FormatCellBottomless(TableParaClient tableParaClient, uint fswdirTable, out PTS.FSFMTRBL fmtrbl, out IntPtr ppfscell, out int dvrUsed)
        {
            CellParaClient cellParaClient = new CellParaClient(this, tableParaClient);

            cellParaClient.FormatCellBottomless(fswdirTable, cellParaClient.CalculateCellWidth(tableParaClient), out fmtrbl, out dvrUsed);
            ppfscell = cellParaClient.Handle;
        }
예제 #3
0
 /// <summary>
 /// SetCellHeight
 /// </summary>
 /// <param name="cellParaClient">Cell para client</param>
 /// <param name="tableParaClient">Table para client</param>
 /// <param name="subpageBreakRecord">Break record if cell is broken</param>
 /// <param name="fBrokenHere">Cell broken on this page/column</param>
 /// <param name="fswdirTable">Flow direction</param>
 /// <param name="dvrActual">Actual height</param>
 internal void SetCellHeight(
     CellParaClient cellParaClient,          // IN: cell object
     TableParaClient tableParaClient,        // table's para client
     IntPtr subpageBreakRecord,              // not NULL if cell broken from previous page/column
     int fBrokenHere,                        // TRUE if cell broken on this page/column: no reformatting
     uint fswdirTable,
     int dvrActual)
 {
     cellParaClient.ArrangeHeight = TextDpi.FromTextDpi(dvrActual);
 }
 // Token: 0x06006777 RID: 26487 RVA: 0x001CEE94 File Offset: 0x001CD094
 internal CellInfo(TableParaClient tpc, CellParaClient cpc)
 {
     this._rectTable    = new Rect(TextDpi.FromTextDpi(tpc.Rect.u), TextDpi.FromTextDpi(tpc.Rect.v), TextDpi.FromTextDpi(tpc.Rect.du), TextDpi.FromTextDpi(tpc.Rect.dv));
     this._rectCell     = new Rect(TextDpi.FromTextDpi(cpc.Rect.u), TextDpi.FromTextDpi(cpc.Rect.v), TextDpi.FromTextDpi(cpc.Rect.du), TextDpi.FromTextDpi(cpc.Rect.dv));
     this._autofitWidth = tpc.AutofitWidth;
     this._columnWidths = new double[tpc.CalculatedColumns.Length];
     for (int i = 0; i < tpc.CalculatedColumns.Length; i++)
     {
         this._columnWidths[i] = tpc.CalculatedColumns[i].DurWidth;
     }
     this._cell = cpc.Cell;
 }
예제 #5
0
        /// <summary>
        /// UpdateBottomlessCell
        /// </summary>
        /// <param name="cellParaClient">Current cell para client</param>
        /// <param name="tableParaClient">Table para cleint</param>
        /// <param name="fswdirTable">Flow direction</param>
        /// <param name="fmtrbl">Formatting result</param>
        /// <param name="dvrUsed">Height consumed</param>
        internal void UpdateBottomlessCell(
            CellParaClient cellParaClient,          // IN:
            TableParaClient tableParaClient,        // IN:
            uint fswdirTable,                       // IN:
            out PTS.FSFMTRBL fmtrbl,                // OUT:
            out int dvrUsed)                        // OUT: height -- min height required
        {
            Debug.Assert(Cell.Index != -1 && Cell.ColumnIndex != -1,
                         "Cell is not in a table");

            Debug.Assert(Cell.Table != null);

            cellParaClient.UpdateBottomlessCell(fswdirTable, cellParaClient.CalculateCellWidth(tableParaClient), out fmtrbl, out dvrUsed);
        }
 internal unsafe void CalcHorizontalBBoxOfRow(int cCells, IntPtr *rgnmCell, IntPtr *rgpfsCell, out int urBBox, out int durBBox)
 {
     urBBox  = 0;
     durBBox = 0;
     for (int i = 0; i < cCells; i++)
     {
         if (rgpfsCell[(IntPtr)i * (IntPtr)sizeof(IntPtr) / (IntPtr)sizeof(IntPtr)] != IntPtr.Zero)
         {
             CellParaClient cellParaClient = base.PtsContext.HandleToObject(rgpfsCell[(IntPtr)i * (IntPtr)sizeof(IntPtr) / (IntPtr)sizeof(IntPtr)]) as CellParaClient;
             PTS.ValidateHandle(cellParaClient);
             durBBox = TextDpi.ToTextDpi(cellParaClient.TableParaClient.TableDesiredWidth);
             return;
         }
     }
 }
예제 #7
0
        /// <summary>
        /// FormatCellBottomless
        /// </summary>
        /// <param name="tableParaClient">Table para client</param>
        /// <param name="fswdirTable">Flow direction</param>
        /// <param name="fmtrbl">Formatting result</param>
        /// <param name="ppfscell">Cell para client</param>
        /// <param name="dvrUsed">Height consumed</param>
        internal void FormatCellBottomless(
            TableParaClient tableParaClient,    // IN:
            uint fswdirTable,                   // IN:
            out PTS.FSFMTRBL fmtrbl,            // OUT:
            out IntPtr ppfscell,                // OUT: cell object
            out int dvrUsed)                    // OUT: height -- min height
                                                //      required
        {
            Debug.Assert(Cell.Index != -1 && Cell.ColumnIndex != -1,
                         "Cell is not in a table");

            Debug.Assert(Cell.Table != null);

            CellParaClient cellParaClient = new CellParaClient(this, tableParaClient);

            cellParaClient.FormatCellBottomless(fswdirTable, cellParaClient.CalculateCellWidth(tableParaClient), out fmtrbl, out dvrUsed);


            //  initialize output parameters
            ppfscell = cellParaClient.Handle;
        }
        /// <summary>
        /// C'tor - Just needs the table and cell para clients.
        /// </summary>
        /// <param name="tpc">Table para client.</param>
        /// <param name="cpc">Cell Para client.</param>
        internal CellInfo(TableParaClient tpc, CellParaClient cpc)
        {
            _rectTable = new Rect(TextDpi.FromTextDpi(tpc.Rect.u),
                                  TextDpi.FromTextDpi(tpc.Rect.v),
                                  TextDpi.FromTextDpi(tpc.Rect.du),
                                  TextDpi.FromTextDpi(tpc.Rect.dv));

            _rectCell = new Rect(TextDpi.FromTextDpi(cpc.Rect.u),
                                 TextDpi.FromTextDpi(cpc.Rect.v),
                                 TextDpi.FromTextDpi(cpc.Rect.du),
                                 TextDpi.FromTextDpi(cpc.Rect.dv));

            _autofitWidth = tpc.AutofitWidth;

            _columnWidths = new double[tpc.CalculatedColumns.Length];

            for (int index = 0; index < tpc.CalculatedColumns.Length; index++)
            {
                _columnWidths[index] = tpc.CalculatedColumns[index].DurWidth;
            }

            _cell = cpc.Cell;
        }
예제 #9
0
        internal unsafe void CalcHorizontalBBoxOfRow(
            int cCells,
            IntPtr *rgnmCell,
            IntPtr *rgpfsCell,
            out int urBBox,
            out int durBBox)
        {
            Debug.Assert(cCells == Row.FormatCellCount);

            urBBox  = 0;
            durBBox = 0;

            for (int index = 0; index < cCells; index++)
            {
                if (rgpfsCell[index] != IntPtr.Zero)
                {
                    CellParaClient cellParaClient = PtsContext.HandleToObject(rgpfsCell[index]) as CellParaClient;
                    PTS.ValidateHandle(cellParaClient);

                    durBBox = TextDpi.ToTextDpi(cellParaClient.TableParaClient.TableDesiredWidth);
                    break;
                }
            }
        }
예제 #10
0
        internal void FormatCellFinite( 
            TableParaClient tableParaClient,        // IN:
            IntPtr pfsbrkcellIn,                    // IN:  not NULL if cell broken from previous page/column
            IntPtr pfsFtnRejector,                  // IN:
            int fEmptyOK,                           // IN: 
            uint fswdirTable,                       // IN:
            int dvrAvailable,                       // IN: 
            out PTS.FSFMTR pfmtr,                   // OUT: 
            out IntPtr ppfscell,                    // OUT: cell object
            out IntPtr pfsbrkcellOut,               // OUT: break if cell does not fit in dvrAvailable 
            out int dvrUsed)                        // OUT: height -- min height required

        {
            Debug.Assert(Cell.Index != -1 && Cell.ColumnIndex != -1, 
                "Cell is not in a table");
 
            CellParaClient cellParaClient; 
            Size subpageSize;
 
            Debug.Assert(Cell.Table != null);

            cellParaClient = new CellParaClient(this, tableParaClient);
 
            subpageSize = new Size(
                cellParaClient.CalculateCellWidth(tableParaClient), 
                Math.Max(TextDpi.FromTextDpi(dvrAvailable), 0)); 

 
            cellParaClient.FormatCellFinite(subpageSize,
                                            pfsbrkcellIn,
                                            PTS.ToBoolean(fEmptyOK),
                                            fswdirTable, 
                                            PTS.FSKSUPPRESSHARDBREAKBEFOREFIRSTPARA.fsksuppresshardbreakbeforefirstparaNone,
                                            out pfmtr, 
                                            out dvrUsed, 
                                            out pfsbrkcellOut);
 
            //  initialize output parameters
            ppfscell = cellParaClient.Handle;

            if(pfmtr.kstop == PTS.FSFMTRKSTOP.fmtrNoProgressOutOfSpace) 
            {
                cellParaClient.Dispose(); 
                ppfscell = IntPtr.Zero; 
                dvrUsed = 0;
            } 

            if (dvrAvailable < dvrUsed)
            {
                if (PTS.ToBoolean(fEmptyOK)) 
                {
                    if (cellParaClient != null)     { cellParaClient.Dispose(); } 
                    if (pfsbrkcellOut != IntPtr.Zero) 
                    {
                        PTS.Validate(PTS.FsDestroySubpageBreakRecord(cellParaClient.PtsContext.Context, pfsbrkcellOut), cellParaClient.PtsContext); 
                        pfsbrkcellOut = IntPtr.Zero;
                    }

                    ppfscell = IntPtr.Zero; 
                    pfmtr.kstop = PTS.FSFMTRKSTOP.fmtrNoProgressOutOfSpace;
                    dvrUsed = 0; 
                } 
                else
                { 
                    pfmtr.fForcedProgress = PTS.True;
                }
            }
        } 
예제 #11
0
        /// <summary>
        /// C'tor - Just needs the table and cell para clients.
        /// </summary>
        /// <param name="tpc">Table para client.</param>
        /// <param name="cpc">Cell Para client.</param>
        internal CellInfo(TableParaClient tpc, CellParaClient cpc)
        {
            _rectTable = new Rect(TextDpi.FromTextDpi(tpc.Rect.u),
                                 TextDpi.FromTextDpi(tpc.Rect.v),
                                 TextDpi.FromTextDpi(tpc.Rect.du),
                                 TextDpi.FromTextDpi(tpc.Rect.dv));

            _rectCell = new Rect(TextDpi.FromTextDpi(cpc.Rect.u),
                                 TextDpi.FromTextDpi(cpc.Rect.v),
                                 TextDpi.FromTextDpi(cpc.Rect.du),
                                 TextDpi.FromTextDpi(cpc.Rect.dv));

            _autofitWidth = tpc.AutofitWidth;

            _columnWidths = new double[tpc.CalculatedColumns.Length];

            for(int index = 0; index < tpc.CalculatedColumns.Length; index++)
            {
                _columnWidths[index] = tpc.CalculatedColumns[index].DurWidth;
            }

            _cell = cpc.Cell;
        }
예제 #12
0
        internal void FormatCellFinite(
            TableParaClient tableParaClient,        // IN:
            IntPtr pfsbrkcellIn,                    // IN:  not NULL if cell broken from previous page/column
            IntPtr pfsFtnRejector,                  // IN:
            int fEmptyOK,                           // IN:
            uint fswdirTable,                       // IN:
            int dvrAvailable,                       // IN:
            out PTS.FSFMTR pfmtr,                   // OUT:
            out IntPtr ppfscell,                    // OUT: cell object
            out IntPtr pfsbrkcellOut,               // OUT: break if cell does not fit in dvrAvailable
            out int dvrUsed)                        // OUT: height -- min height required

        {
            Debug.Assert(Cell.Index != -1 && Cell.ColumnIndex != -1,
                         "Cell is not in a table");

            CellParaClient cellParaClient;
            Size           subpageSize;

            Debug.Assert(Cell.Table != null);

            cellParaClient = new CellParaClient(this, tableParaClient);

            subpageSize = new Size(
                cellParaClient.CalculateCellWidth(tableParaClient),
                Math.Max(TextDpi.FromTextDpi(dvrAvailable), 0));


            cellParaClient.FormatCellFinite(subpageSize,
                                            pfsbrkcellIn,
                                            PTS.ToBoolean(fEmptyOK),
                                            fswdirTable,
                                            PTS.FSKSUPPRESSHARDBREAKBEFOREFIRSTPARA.fsksuppresshardbreakbeforefirstparaNone,
                                            out pfmtr,
                                            out dvrUsed,
                                            out pfsbrkcellOut);

            //  initialize output parameters
            ppfscell = cellParaClient.Handle;

            if (pfmtr.kstop == PTS.FSFMTRKSTOP.fmtrNoProgressOutOfSpace)
            {
                cellParaClient.Dispose();
                ppfscell = IntPtr.Zero;
                dvrUsed  = 0;
            }

            if (dvrAvailable < dvrUsed)
            {
                if (PTS.ToBoolean(fEmptyOK))
                {
                    if (cellParaClient != null)
                    {
                        cellParaClient.Dispose();
                    }
                    if (pfsbrkcellOut != IntPtr.Zero)
                    {
                        PTS.Validate(PTS.FsDestroySubpageBreakRecord(cellParaClient.PtsContext.Context, pfsbrkcellOut), cellParaClient.PtsContext);
                        pfsbrkcellOut = IntPtr.Zero;
                    }

                    ppfscell    = IntPtr.Zero;
                    pfmtr.kstop = PTS.FSFMTRKSTOP.fmtrNoProgressOutOfSpace;
                    dvrUsed     = 0;
                }
                else
                {
                    pfmtr.fForcedProgress = PTS.True;
                }
            }
        }
예제 #13
0
 // Token: 0x06006766 RID: 26470 RVA: 0x001CE833 File Offset: 0x001CCA33
 internal void UpdateBottomlessCell(CellParaClient cellParaClient, TableParaClient tableParaClient, uint fswdirTable, out PTS.FSFMTRBL fmtrbl, out int dvrUsed)
 {
     cellParaClient.UpdateBottomlessCell(fswdirTable, cellParaClient.CalculateCellWidth(tableParaClient), out fmtrbl, out dvrUsed);
 }
예제 #14
0
 // Token: 0x06006767 RID: 26471 RVA: 0x001CE847 File Offset: 0x001CCA47
 internal void SetCellHeight(CellParaClient cellParaClient, TableParaClient tableParaClient, IntPtr subpageBreakRecord, int fBrokenHere, uint fswdirTable, int dvrActual)
 {
     cellParaClient.ArrangeHeight = TextDpi.FromTextDpi(dvrActual);
 }
예제 #15
0
        /// <summary> 
        /// FormatCellBottomless 
        /// </summary>
        /// <param name="tableParaClient">Table para client</param> 
        /// <param name="fswdirTable">Flow direction</param>
        /// <param name="fmtrbl">Formatting result</param>
        /// <param name="ppfscell">Cell para client</param>
        /// <param name="dvrUsed">Height consumed</param> 
        internal void FormatCellBottomless(
            TableParaClient tableParaClient,    // IN: 
            uint fswdirTable,                   // IN: 
            out PTS.FSFMTRBL fmtrbl,            // OUT:
            out IntPtr ppfscell,                // OUT: cell object 
            out int dvrUsed)                    // OUT: height -- min height
                                                //      required
        {
            Debug.Assert(Cell.Index != -1 && Cell.ColumnIndex != -1, 
                "Cell is not in a table");
 
            Debug.Assert(Cell.Table != null); 

            CellParaClient cellParaClient = new CellParaClient(this, tableParaClient); 

            cellParaClient.FormatCellBottomless(fswdirTable, cellParaClient.CalculateCellWidth(tableParaClient), out fmtrbl, out dvrUsed);

 
            //  initialize output parameters
            ppfscell = cellParaClient.Handle; 
        } 
예제 #16
0
 /// <summary>
 /// SetCellHeight 
 /// </summary> 
 /// <param name="cellParaClient">Cell para client</param>
 /// <param name="tableParaClient">Table para client</param> 
 /// <param name="subpageBreakRecord">Break record if cell is broken</param>
 /// <param name="fBrokenHere">Cell broken on this page/column</param>
 /// <param name="fswdirTable">Flow direction</param>
 /// <param name="dvrActual">Actual height</param> 
 internal void SetCellHeight(
     CellParaClient cellParaClient,          // IN: cell object 
     TableParaClient tableParaClient,        // table's para client 
     IntPtr subpageBreakRecord,              // not NULL if cell broken from previous page/column
     int fBrokenHere,                        // TRUE if cell broken on this page/column: no reformatting 
     uint fswdirTable,
     int dvrActual)
 {
     cellParaClient.ArrangeHeight = TextDpi.FromTextDpi(dvrActual); 
 }
예제 #17
0
        /// <summary> 
        /// UpdateBottomlessCell
        /// </summary>
        /// <param name="cellParaClient">Current cell para client</param>
        /// <param name="tableParaClient">Table para cleint</param> 
        /// <param name="fswdirTable">Flow direction</param>
        /// <param name="fmtrbl">Formatting result</param> 
        /// <param name="dvrUsed">Height consumed</param> 
        internal void UpdateBottomlessCell(
            CellParaClient cellParaClient,          // IN: 
            TableParaClient tableParaClient,        // IN:
            uint fswdirTable,                       // IN:
            out PTS.FSFMTRBL fmtrbl,                // OUT:
            out int dvrUsed)                        // OUT: height -- min height required 
        {
            Debug.Assert(Cell.Index != -1 && Cell.ColumnIndex != -1, 
                "Cell is not in a table"); 

            Debug.Assert(Cell.Table != null); 

            cellParaClient.UpdateBottomlessCell(fswdirTable, cellParaClient.CalculateCellWidth(tableParaClient), out fmtrbl, out dvrUsed);
        }