Free Support Forum - aspose.com

Textbox Characters not working correctly

Howdy,

I have discovered a problem when using the Textbox.characters method working on Java. Originally, I noticed when I was editting each character font format, there was a problem that after two carriage returns in a row, formatting wasn’t being applied. I wrote a test report to try and demonstrate it but wasn’t successful as I noticed another bug but might be connected. If you use the code below, you’ll notice that the “Plain Text 1” has been removed.

Workbook wb = new Workbook();
Worksheet ws = wb.getWorksheets().get(0);

int tID = ws.getTextBoxes().add(1, 1, 500, 1000);

TextBox t = ws.getTextBoxes().get(tID);

t.setText(“Red text 1. Plain text 1. Red text 2. Plain text 2.”);

t.characters(0, 10).getFont().setColor(Color.getRed());
t.characters(26, 10).getFont().setColor(Color.getDarkRed());

If you alternate the two character font color sets to:

t.characters(26, 10).getFont().setColor(Color.getDarkRed());
t.characters(0, 10).getFont().setColor(Color.getRed());

You’ll notice that the string gets duplicated oddly.

Hi,

Thanks for your posting and using Aspose.Cells for Java.

After initial investigation, we were able to replicate your issues. I have attached the screenshot for a reference.

We have logged this issue in our database. We will look into this issue and fix it. Once the issue is resolved or we have some other update for you, we will let you know asap.

This issue has been logged as CELLSJAVA-40462.

The issues you have found earlier (filed as CELLSJAVA-40462) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.