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

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -