Different behavior with DrawingML/shape

Hi,

The issue I face is the following:

If a DrawingML shape contains no text (document DrawingML Shape NO text.docx), it is loaded as a DrawingML object.

But if the same DrawingML shape now contains some text (document DrawingML Shape WITH text.docx), it is loaded as a “classic” Shape object.
Also, the round-tripping is not working in this case (document DrawingML Shape WITH text SAVED by AW.docx) since, when the document is opened in MS Word 2013, it behaves like an “old shape”.

Here is the code to reproduce:

Document shapeNOtextDoc = new Document(@"d:\Tests\DrawingML Shape NO text.docx");

DrawingML drawingML = (DrawingML) shapeNOtextDoc.GetChild(NodeType.DrawingML, 0, true);

drawingML.GetShapeRenderer().Save(@"d:\Tests\drawingML.png", new ImageSaveOptions(SaveFormat.Png));

Document shapeWITHtextDoc = new Document(@"d:\Tests\DrawingML Shape WITH text.docx");

Shape shape = (Shape) shapeWITHtextDoc.GetChild(NodeType.Shape, 0, true);

shape.GetShapeRenderer().Save(@"d:\Tests\shape.png", new ImageSaveOptions(SaveFormat.Png));

shapeWITHtextDoc.Save(@"d:\Tests\DrawingML Shape WITH text SAVED by AW.docx");


Actually, for this issue:
<a href="https://forum.aspose.com/t/60396
the same thing occured since the shapes in the attached document of this issue FloatingShapes.docx where also loaded as Shape objects and not as DrawingML objects.

This behavior is really interesting for us as we would like to be able to edit shapes, whether they are DrawingML or “regular” ones.

Is this actually a feature not yet documented? Or this behavior is caused by some kind of bugs that make Aspose Words use the fallback VML shapes?

Thank you very much.

Best regards,

Hi Calvo,

Thanks for reporting this problem to us. I tested the scenario and have managed to reproduce the same problem on my side. For the sake of correction, I have logged this problem in our issue tracking system as WORDSNET-10068. Our development team will further look into the details of this problem and we will keep you updated on the status of correction. We apologize for your inconvenience.

Best regards,

The issues you have found earlier (filed as WORDSNET-10068) have been fixed in this .NET update and this Java update.


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