Пример #1
0
 public void SetFreezePanes(int row, int col)
 {
     if (_headWriter.CurrentSection > StreamsheetParser.StreamSheetSection.SheetViews)
     {
         throw new FatalException();
     }
     if (_stagedSheetView == null)
     {
         _stagedSheetView = new CT_SheetView();
     }
     _stagedSheetView.Pane                  = new CT_Pane();
     _stagedSheetView.Pane                  = new CT_Pane();
     _stagedSheetView.Pane.State_Attr       = ST_PaneState.frozen;
     _stagedSheetView.Pane.XSplit_Attr      = col;
     _stagedSheetView.Pane.YSplit_Attr      = row;
     _stagedSheetView.Pane.TopLeftCell_Attr = CellPair.Name(row, col);
 }
Пример #2
0
 public ICellModel getCell(int col)
 {
     if (col >= 0 && col <= 16383)
     {
         ICellModel cellModel = default(ICellModel);
         if (this.CellsMap.TryGetValue(col, out cellModel))
         {
             return(cellModel);
         }
         CT_Cell cT_Cell = new CT_Cell();
         cT_Cell.R_Attr = CellPair.Name(this.RowNumber, col);
         cellModel      = new XMLCellModel(this._worksheetModel, this._manager, cT_Cell);
         this.CellsMap.Add(col, cellModel);
         return(cellModel);
     }
     throw new FatalException();
 }
Пример #3
0
        public ICellModel getCell(int col)
        {
            if (col < 0 || col > 16383)
            {
                throw new FatalException();
            }
            if (CellsMap.TryGetValue(col, out ICellModel value))
            {
                return(value);
            }
            CT_Cell cT_Cell = new CT_Cell();

            cT_Cell.R_Attr = CellPair.Name(RowNumber, col);
            value          = new XMLCellModel(_worksheetModel, _manager, cT_Cell);
            CellsMap.Add(col, value);
            return(value);
        }
Пример #4
0
        public void MergeCells(int firstRow, int firstCol, int rowCount, int colCount)
        {
            AdvanceStreamsheetTo(StreamsheetParser.StreamSheetSection.MergeCells, head: false);
            CT_MergeCell cT_MergeCell = new CT_MergeCell();

            cT_MergeCell._ref_Attr = string.Format(CultureInfo.InvariantCulture, "{0}:{1}", CellPair.Name(firstRow, firstCol), CellPair.Name(firstRow + rowCount - 1, firstCol + colCount - 1));
            _tailWriter.WriteMergedCell(cT_MergeCell);
        }