Deprecated methods of RowFormat class in Aspose.Words for Java

Hi,

we found all of the get*Padding in RowFormat as deprecated. Unfortunately the docs don't tell which methods we should use instead.

What's the desired way to retreive those paddings?

Best regards
Klemens Schrage

Hi Klemens,

Thanks for your query. Please read following documentation link for CellFormat and use the Padding method of CellFormat class. Hope, This answers your query. Let us know, If you have any more queries.

Hi,

thanks for your link. Unfortunately the deprecated methods and their replacements are not explained (even on the RowFormats page).

Best regards
Klemens

Hi Klemens,


Thanks for your inquiry.

Yes unfortunately for the time being those sort of small details are lost during upload from our API reference in plain XML format to the online docs. These details are actually present in the XML. We will look into fixing this as soon as possible.

To answer your question, you should now use the Table.XXXPading properties instead.

Thanks,

Hi,

I think that gives me the padding of the table in general but not on a per row basis. Is that correct? If there aren’t any row specific properties as one might think, I’m fine.

Best regards
Klemens Schrage

Hi Klemens,


Thanks for the additional information.

Yes that is correct, a Microsoft Word table only has padding properties for the entire table and optionally for each cell. There is no padding for individual rows.

Thanks,

Hi Adam,

Just to be clear, instead of using
docBuilder.getRowFormat().getTopPadding();
change to
docBuilder.getCellFormat().getTopPadding();

Is this even required since you mentioned that there is no padding for rows?

I see the following methods/class are deprecated too.
RowFormat.setCellSpacing
RowFormat.setAlignment
RowFormat.setLeftIndent
HeaderFooter.toTxt()
RowAlignment

Please let me know the replacement APIs for these.

Thanks,
Kumar

Hi Klemens,

Thanks for your inquiry. Please check the following highlighted the new methods. I suggest you please read following documentation links for your kind reference. Hope this answers your query. Please let us know if you have any more queries.

Table.setCellSpacing

RowFormat.setAlignment

Table.setAlignment

RowFormat.setLeftIndent

Table.setLeftIndent

HeaderFooter.toTxt()

HeaderFooter.ToString(SaveFormat.TEXT)

RowAlignment

TableAlignment