java - Changing the order of paragraphs not working -


i trying manipulate order of paragraphs in worddocument using docx4j.

p1 p2 t1

should this

p2 t1 p1

the following code nothing

in clipboard paragraphs, should moved are. first delete them document. index index of first paragraph.

for ( p p: clipboard ) {   this.c.wordmlpackage.getmaindocumentpart().getcontent().remove( p); } 

then try reinsert them

for ( p p : clipboard ) {   system.out.println("adding to+"+ index+" " + child.getp());   this.c.wordmlpackage.getmaindocumentpart().getcontent().add( index-1, p ); } 


Comments

Popular posts from this blog

java - Incorrect order of records in M-M relationship in hibernate -

command line - Use qwinsta in PowerShell ISE -

php - I want to create a website for polls/survey like this http://www.poll-maker.com/ -