Aspose.Word for java supports getting CellFormat, ParagraphFormat, ListFormat as DocumentBuilder methods.
But how can I set those formats? I’m thinking of something like:
CellFormat cellFormat = docBuilder.getCellFormat(); //this exists
//some code that modifies current cell format
//now I want to undo last modifications
docBuilder.setCellFormat( cellFormat); //this does not exist
Thanks for your inquiry. There is no way directly se CellFormat. You can set CellFormat’s properties. For example
Yes I knew about this workaround, but I was hoping to avoid parsing an entire saved format structure just to set a single modified property.
Can you estimate please when these setters shall be supported by aspose.word?
Thanks for your inquiry. I don’t think that this is needed. I think this issue will be resolved since Aspose.Words will support table styles. Then you will be able to set style of table. This is issue #5262
Issue #5262 – Support table styles.
But currently I can’t provide you any estimate.
Just a little add, to make myself more clearly over this:
I used CellFormat in my entry just for example, because the issue is for all other types of format objects. Let's suppose that I have to set the bold and the italic property at a specific time when running the code. I set these by using document builder methods, and I could set these to a Font object too. Later at run-time, if I know that I have to set again those properties, I have to set each one of them, instead of setting the Font that I saved earlier. Same scenario can be considered for CellFormat, ParagraphFormat, ListFormat.
Thanks for your inquiry. I think that you can try using Styles. See the following link for more information.