Alternate of RowFormat deprecated methods using Java

Hey Support,

is there any documentation on what are the replacement for the methods depreacted in Aspose 11?

docBuilder.getRowFormat().getTopPadding();
docBuilder.getRowFormat().setLeftIndent();

etc

Thanks,
Dragos

Hi Dragos,

Thanks for your query. I regret to share with you that there is no replacement documentation for deprecated method. Please read following documentation link for your kind reference to set/get paddings of cells.

builder.getCellFormat().getTopPadding();
builder.getCellFormat().setLeftPadding(10.0);

I found the replacements but it would be nice to have the replacements documented too.

But there are a couple of questions:

1. docBuilder.getRowFormat().getXyzPadding() returns different values compared to new Table().getTopPadding(); Why is that and how can I get the default values for the table padding?

2. why the docBuilder.getRowFormat().getXyzPadding() have been deprecated when similar methods for paragraphs and other nodes still exist. Also, having to define these properties on Table instances that have at least 1 cell complicate the code using Aspose. Is it possible to provide some static methods or at least methods that do not require a cell in the table?

Regards,
Dragos

Hey Tahir,

I think you meant RowFormat | Aspose.Words for Java

What about my other questions/requests? The new API is more cumbersome to use than the old one and introduces non-negligible overhead in the client code.

Regards,
Dragos

Hi Dragos,

Please accept my apology for late response. You can get the default padding values by calling getXXXPading() method before setting padding values. You can also check some default values of Table in Aspose.Words from following documentation link.

I have asked question from our development team regarding deprecated methods. As soon as, any information is shared by them I will be more then happy to share that with you.

Hi Dragos,

Thanks for your inquiry.

All changes to the the tables API are documented here:Aspose.Words for Java|Documentation. It is also documented in the Aspose.Words 10.5 release notes and blog post. I notice the link to the new member is lost in the API description by our tool which converts XML to online confluence docs. We will look into fixing this as soon as possible.

Regarding your queries.

  1. Could you please attach a document which demonstrates the issue with RowFormat and Table top padding returning different values?

  2. The reason why these properties were moved to table is because they are more “Table-wide” instead of Row specific and the Aspose.Words API reflects this. Microsoft Word allows padding to be table wide or cell specific. In the old API it was a bit confusing to have set the padding for every row in the table individually when the setting applies for the whole table.

We understand that it’s a bit annoying to have to add a row first before setting these properties. We will work on a way to allow setting such properties without any rows in the table. I have linked your request to the appropriate issue. We will inform you as soon as there are any developments.

Thanks,

Hi Dragos,

I have received response from our development team about the deprecated method of row padding. We deprecated these methods because in MS Word table there is no way to specify padding per row and it needs to be specified on the Table’s Cell.

Hi Dragos,


Regarding WORDSNET-6181, our product team has completed the work on your issue and has come to a conclusion that they won’t be able to implement the fix to your issue. Your issue (WORDSNET-6181) is now closed with ‘Won’t Fix’ resolution. We apologize for any inconvenience.

Best regards,

Hi,

Table table = builder.StartTable();
What is your suggestion to replace this line → builder.getRowFormat().setHeadingFormat(true)?

@johnAxe You can apply RowFormat.HeadingFormat property to the rows in the table after building it.