XWPFPicture: support for reading picture description

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1083780 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Maxim Valyanskiy 2011-03-21 13:39:44 +00:00
parent 8d72b9137a
commit db05d9158a
2 changed files with 10 additions and 4 deletions

View File

@ -31,15 +31,17 @@ public class XWPFPicture {
protected XWPFParagraph paragraph;
private CTPicture ctPic;
public XWPFParagraph getParagraph(){
private String description;
public XWPFParagraph getParagraph(){
return paragraph;
}
public XWPFPicture(CTPicture ctPic, XWPFParagraph paragraph){
this.paragraph = paragraph;
this.ctPic = ctPic;
}
description = ctPic.getNvPicPr().getCNvPr().getDescr();
}
/**
* Link Picture with PictureData
@ -71,5 +73,8 @@ public class XWPFPicture {
}
return null;
}
public String getDescription() {
return description;
}
}

View File

@ -343,6 +343,7 @@ public class TestXWPFRun extends TestCase {
for (XWPFPicture pic : pictures) {
assertNotNull(pic.getPictureData());
assertEquals("DOZOR", pic.getDescription());
}
count+= pictures.size();