diff --git a/ClosedXML/Excel/Columns/XLColumn.cs b/ClosedXML/Excel/Columns/XLColumn.cs index f106457..ff70d31 100644 --- a/ClosedXML/Excel/Columns/XLColumn.cs +++ b/ClosedXML/Excel/Columns/XLColumn.cs @@ -774,12 +774,12 @@ #endregion - public new Boolean IsEmpty() + public override Boolean IsEmpty() { return IsEmpty(false); } - public new Boolean IsEmpty(Boolean includeFormats) + public override Boolean IsEmpty(Boolean includeFormats) { if (includeFormats && !Style.Equals(Worksheet.Style)) return false; @@ -787,12 +787,12 @@ return base.IsEmpty(includeFormats); } - public Boolean IsEntireRow() + public override Boolean IsEntireRow() { return false; } - public Boolean IsEntireColumn() + public override Boolean IsEntireColumn() { return true; } diff --git a/ClosedXML/Excel/Ranges/XLRangeBase.cs b/ClosedXML/Excel/Ranges/XLRangeBase.cs index b08cda8..0534107 100644 --- a/ClosedXML/Excel/Ranges/XLRangeBase.cs +++ b/ClosedXML/Excel/Ranges/XLRangeBase.cs @@ -506,24 +506,24 @@ return Cells().Any(c => c.IsMerged()); } - public Boolean IsEmpty() + public virtual Boolean IsEmpty() { return !CellsUsed().Any() || CellsUsed().Any(c => c.IsEmpty()); } - public Boolean IsEmpty(Boolean includeFormats) + public virtual Boolean IsEmpty(Boolean includeFormats) { return !CellsUsed(includeFormats).Cast().Any() || CellsUsed(includeFormats).Cast().Any(c => c.IsEmpty(includeFormats)); } - public Boolean IsEntireRow() + public virtual Boolean IsEntireRow() { return RangeAddress.FirstAddress.ColumnNumber == 1 && RangeAddress.LastAddress.ColumnNumber == XLHelper.MaxColumnNumber; } - public Boolean IsEntireColumn() + public virtual Boolean IsEntireColumn() { return RangeAddress.FirstAddress.RowNumber == 1 && RangeAddress.LastAddress.RowNumber == XLHelper.MaxRowNumber; diff --git a/ClosedXML/Excel/Rows/XLRow.cs b/ClosedXML/Excel/Rows/XLRow.cs index 721e29e..a847178 100644 --- a/ClosedXML/Excel/Rows/XLRow.cs +++ b/ClosedXML/Excel/Rows/XLRow.cs @@ -709,12 +709,12 @@ #endregion XLRow Below - public new Boolean IsEmpty() + public override Boolean IsEmpty() { return IsEmpty(false); } - public new Boolean IsEmpty(Boolean includeFormats) + public override Boolean IsEmpty(Boolean includeFormats) { if (includeFormats && !Style.Equals(Worksheet.Style)) return false; @@ -722,12 +722,12 @@ return base.IsEmpty(includeFormats); } - public Boolean IsEntireRow() + public override Boolean IsEntireRow() { return true; } - public Boolean IsEntireColumn() + public override Boolean IsEntireColumn() { return false; } diff --git a/ClosedXML/Excel/XLWorksheet.cs b/ClosedXML/Excel/XLWorksheet.cs index d0b30b0..d2e4bc0 100644 --- a/ClosedXML/Excel/XLWorksheet.cs +++ b/ClosedXML/Excel/XLWorksheet.cs @@ -1581,12 +1581,12 @@ { return Pictures.Add(imageFile, name); } - public Boolean IsEntireRow() + public override Boolean IsEntireRow() { return true; } - public Boolean IsEntireColumn() + public override Boolean IsEntireColumn() { return true; }