Height calculation of TableEx and RowEx not working

Putting a lot of text into a TableEx Cell doesn’t change its cell height or table height:


final PresentationEx pres2 = new PresentationEx();
final SlideEx slide2 = pres2.getSlides().get(0);

final double[] columnWidths = new double[] { 400 };
final double[] rowHeights = new double[] { 10, 10 };
final int tableIdx = slide2.getShapes().addTable(50, 50, columnWidths, rowHeights);
final TableEx table2 = (TableEx) slide2.getShapes().get(tableIdx);

final double heightBefore = table2.get(0, 1).getOffsetY();
final double tableHeightBefore = table2.getHeight();
final double cellBefore = table2.get(0, 0).getHeight();

TextFrameEx textframe = table2.get(0, 0).getTextFrame();
textframe.setText(“LONG HEADLINE LONG HEADLINE LONG HEADLINE LONG HEADLINE LONG HEADLINE LONG HEADLINE LONG HEADLINE LONG HEADLINE LONG HEADLINE”);

final double heightAfter = table2.get(0, 1).getOffsetY();
final double tableHeightAfter = table2.getHeight();
final double cellAfter = table2.get(0, 0).getHeight();

System.out.println("offset: " + heightBefore + ", " + heightAfter); //offset: 10.0, 10.0
System.out.println("table height: " + tableHeightBefore + ", " + tableHeightAfter); //table height: 20.0, 20.0
System.out.println("cell height: " + cellBefore + ", " + cellAfter); //cell height: 10.0, 10.0

pres2.write(“D:\temp\_pptx\test_height.pptx”);


All heights (table height, cell height and offset) are still the same after adding the text.
How can i measure the actual height of the cell with the impact the text has on it?
Is there any workaround?

(using Aspose Slides for Java v2.7.0)

Thx, Christiane

Hi Klaus,

Please accept my apology for late response.
An issue with ID SLIDESJAVA-22122 already
exists in
our issue tracking system to resolve this problem. This thread has also
been linked with the same issue, so that you may be automatically
notified, once the issue is resolved.

We are sorry for your inconvenience.

Hi!

That’s very unfortunate indeed. There HAS TO BE some workaround to measure the height of a table cell with its text… Does anyone have an idea on that?

With regards,
Christiane

Hi Christiane,

I am looking for a workaround for this issue and have also asked for the workaround from our development team. I will let you know soon, If there is any workaround.

for all those out there, who are becoming very desperate because of this:

the solution here
https://forum.aspose.com/t/89412
helped me a lot and seems to work fine in most cases.

but nevertheless, the intended functionality of the aspose classes is not provided, so the issue remains.

Hi Klaus,


Thanks for sharing the updates with all. I like to share that we are working over the issue and are very hopeful to resolve this issue.

Many Thanks,

Hello!



Please could we have an update/estimation when this bug will be fixed.
We will not be able to deploy on production systems until this issue is
solved!



Regards,



Jörg

Hi
Jörg,


I regret to share that I have verified from our issue tracking system and issue is still unresolved. I have already shared the reasoning for the issues status in thread shared earlier with you.

Many Thanks,

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


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