Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix warnings #455

Merged
merged 1 commit into from
Aug 23, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions ClosedXML/Excel/Columns/XLColumn.cs
Original file line number Diff line number Diff line change
Expand Up @@ -774,25 +774,25 @@ public XLColumn ColumnRight(Int32 step)

#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;

return base.IsEmpty(includeFormats);
}

public Boolean IsEntireRow()
public override Boolean IsEntireRow()
{
return false;
}

public Boolean IsEntireColumn()
public override Boolean IsEntireColumn()
{
return true;
}
Expand Down
8 changes: 4 additions & 4 deletions ClosedXML/Excel/Ranges/XLRangeBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -506,24 +506,24 @@ public Boolean IsMerged()
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<XLCell>().Any() ||
CellsUsed(includeFormats).Cast<XLCell>().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;
Expand Down
8 changes: 4 additions & 4 deletions ClosedXML/Excel/Rows/XLRow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -709,25 +709,25 @@ public XLRow RowBelow(Int32 step)

#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;

return base.IsEmpty(includeFormats);
}

public Boolean IsEntireRow()
public override Boolean IsEntireRow()
{
return true;
}

public Boolean IsEntireColumn()
public override Boolean IsEntireColumn()
{
return false;
}
Expand Down
4 changes: 2 additions & 2 deletions ClosedXML/Excel/XLWorksheet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1581,12 +1581,12 @@ public IXLPicture AddPicture(string imageFile, string name)
{
return Pictures.Add(imageFile, name);
}
public Boolean IsEntireRow()
public override Boolean IsEntireRow()
{
return true;
}

public Boolean IsEntireColumn()
public override Boolean IsEntireColumn()
{
return true;
}
Expand Down