Free Support Forum - aspose.com

deepClone issue

Hi support,

Please check the following code :

Document doc = new Document(“c:\TemplExample.dot”);
Body body = doc.getSections().get(0).getBody();
if((body != null) && (body.getChildNodes() != null))
{
Node[] nodes = body.getChildNodes().toArray();

for(Node node : nodes)
{
if(node.isComposite())
{
CompositeNode compositeNode = (CompositeNode) node;
if(compositeNode != null)
{
Node[] childNodes = compositeNode.getChildNodes().toArray();
for(Node node1 : childNodes)
{
Run run = (Run) node1;
if(run != null)
{
System.out.println(run.getText());
}
System.out.println("original font name = " + run.getFont().getName());
Run runClone = (Run) run.deepClone(true);
System.out.println("clone font name = " + runClone.getFont().getName());
}
}
}
}
}

Note that the font name is not preserved in the clone.
The template is made in Word 2007. If I make the same thing with Word 2003, everything is as expected.

If the font size is 11 in the template, the clone shall have the size equal with 10.

Please advice,
Milan

Hi

<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

Thanks for your inquiry. I managed to reproduce the problem on my side and created new issue #9201 in our defect database. I will notify you as soon as it is fixed.

The issue also occurs in .NET version of Aspose.Words, so the issue will be first fixed in .NET version and then ported to Java.

Best regards.

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


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