DocumentBuilder.EndTable sets DocumentBuilder properties unexpectedly (Font, ParagraphFormat, etc)

The tests below demonstrates the issues. I believe these are bugs.

    [Fact]
    public void EndTable_should_not_set_Bold_to_true()
    {
        var builder = new DocumentBuilder();
        builder.StartTable();
        builder.Font.Bold = true;
        builder.InsertCell();
        builder.EndRow();
        builder.Font.Bold = false;
        Assert.False(builder.Font.Bold); // pass
        builder.EndTable();
        Assert.False(builder.Font.Bold); // fail
    }

    [Fact]
    public void EndTable_should_not_set_Color_to_Blue()
    {
        var builder = new DocumentBuilder();
        builder.StartTable();
        builder.Font.Color = Color.Blue;
        builder.InsertCell();
        builder.EndRow();
        builder.Font.Color = Color.Empty;
        AssertEqual(Color.Empty, builder.Font.Color); // pass
        builder.EndTable();
        AssertEqual(Color.Empty, builder.Font.Color); // fail
    }

    // https://docs.microsoft.com/en-us/dotnet/api/system.drawing.color.equals
    private static void AssertEqual(Color expected, Color actual) =>
        Assert.Equal(expected, actual, new ColorEqualityComparer());

    private class ColorEqualityComparer : IEqualityComparer<Color>
    {
        public bool Equals(Color x, Color y) =>
            x.ToArgb() == y.ToArgb();

        public int GetHashCode(Color obj) =>
            throw new NotImplementedException();
    }

Aspose.Words 17.7.0
.NET Framework 4.5.2

@gojanpaolo,

We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-18449. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

Thanks @awais.hafeez

@awais.hafeez Same issue with DocumentBuilder.Font.Color. I have updated the post to demonstrate this.

@gojanpaolo,

While using the latest version of Aspose.Words i.e. 19.4, we managed to reproduce this issue on our end. We have logged this issue in our bug tracking system. The ID of this issue is WORDSNET-18451. Your thread has also been linked to the appropriate issue and you will be notified as soon as it is resolved. Sorry for the inconvenience.

Same thing happens for DocumentBuilder.ParagraphFormat.KeepWithNext

[Fact]
public void EndTable_should_not_set_KeepWithNext_to_true()
{
    var builder = new DocumentBuilder();
    builder.StartTable();
    builder.ParagraphFormat.KeepWithNext = true;
    builder.InsertCell();
    builder.EndRow();
    builder.ParagraphFormat.KeepWithNext = false;
    Assert.False(builder.ParagraphFormat.KeepWithNext); // pass
    builder.EndTable();
    Assert.False(builder.ParagraphFormat.KeepWithNext); // fail
}

@gojanpaolo,

We have logged this problem in our issue tracking system. Your ticket number is WORDSNET-18620. We will further look into the details of this problem and will keep you updated on the status of the linked issue.