Example #1
0
 public FormattingRun(XF xf, ushort startOffset)
 {
     _xfId        = xf.Id;
     _startOffset = startOffset;
 }
Example #2
0
        internal bool Equals(XF that)
        {
            if (_horizontalAlignment != that._horizontalAlignment)
            {
                return(false);
            }
            if (_textWrapRight != that._textWrapRight)
            {
                return(false);
            }
            if (_verticalAlignment != that._verticalAlignment)
            {
                return(false);
            }
            if (_rotation != that._rotation)
            {
                return(false);
            }
            if (_indentLevel != that._indentLevel)
            {
                return(false);
            }
            if (_shrinkToCell != that._shrinkToCell)
            {
                return(false);
            }
            if (_textDirection != that._textDirection)
            {
                return(false);
            }
            if (_cellLocked != that._cellLocked)
            {
                return(false);
            }
            if (_formulaHidden != that._formulaHidden)
            {
                return(false);
            }
            if (_isStyleXF != that._isStyleXF)
            {
                return(false);
            }
            if (_useNumber != that._useNumber)
            {
                return(false);
            }
            if (_useFont != that._useFont)
            {
                return(false);
            }
            if (_useMisc != that._useMisc)
            {
                return(false);
            }
            if (_useBorder != that._useBorder)
            {
                return(false);
            }
            if (_useBackground != that._useBackground)
            {
                return(false);
            }
            if (_useProtection != that._useProtection)
            {
                return(false);
            }
            if (_leftLineStyle != that._leftLineStyle)
            {
                return(false);
            }
            if (_rightLineStyle != that._rightLineStyle)
            {
                return(false);
            }
            if (_topLineStyle != that._topLineStyle)
            {
                return(false);
            }
            if (_bottomLineStyle != that._bottomLineStyle)
            {
                return(false);
            }
            if (!_leftLineColor.Equals(that._leftLineColor))
            {
                return(false);
            }
            if (!_rightLineColor.Equals(that._rightLineColor))
            {
                return(false);
            }
            if (_diagonalDescending != that._diagonalDescending)
            {
                return(false);
            }
            if (_diagonalAscending != that._diagonalAscending)
            {
                return(false);
            }
            if (!_topLineColor.Equals(that._topLineColor))
            {
                return(false);
            }
            if (!_bottomLineColor.Equals(that._bottomLineColor))
            {
                return(false);
            }
            if (!_diagonalLineColor.Equals(that._diagonalLineColor))
            {
                return(false);
            }
            if (_diagonalLineStyle != that._diagonalLineStyle)
            {
                return(false);
            }
            if (_pattern != that._pattern)
            {
                return(false);
            }
            if (!_patternColor.Equals(that._patternColor))
            {
                return(false);
            }
            if (!_patternBackgroundColor.Equals(that._patternBackgroundColor))
            {
                return(false);
            }

            if (!Font.Equals(that.Font))
            {
                return(false);
            }
            if (!Format.Equals(that.Format))
            {
                return(false);
            }
            if (!Style.Equals(that.Style))
            {
                return(false);
            }

            //if (_targetObject != that._targetObject) return false;

            return(true);
        }
Example #3
0
 public Cell AddValueCellXF(ushort cellRow, ushort cellColumn, object cellValue, XF xf)
 {
     return(Add(cellRow, cellColumn, cellValue, xf));
 }
Example #4
0
 /// <summary>
 /// Adds a new Cell to the Cells collection with the given Row, Column, Value
 /// and XF (style).  If a Cell already exists with the given row and column,
 /// it is overwritten.
 /// </summary>
 /// <param name="cellRow">1-based Row of new Cell.</param>
 /// <param name="cellColumn">1-based Column of new Cell.</param>
 /// <param name="cellValue">Value of new Cell.</param>
 /// <param name="xf">An Xf object describing the style of the cell.</param>
 /// <returns>The newly added Cell with the given Row, Column, Value and Style.</returns>
 public Cell Add(int cellRow, int cellColumn, object cellValue, XF xf)
 {
     Util.ValidateUShort(cellRow, "cellRow");
     Util.ValidateUShort(cellColumn, "cellColumn");
     return(Add((ushort)cellRow, (ushort)cellColumn, cellValue, xf));
 }
Example #5
0
 internal Font(XlsDocument doc, XF xf) : this(doc)
 {
     _target = xf;
 }
Example #6
0
 ///<summary>
 /// (For internal use only) - Updates this Cell's XF id from the provided XF.
 ///</summary>
 ///<param name="fromXF">The XF from which to calculate this Cell's XF id.</param>
 public void UpdateId(XF fromXF)
 {
     _xfIdx = fromXF.Id;
 }