dispose xml cursor when iteration over it is done (more)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1035947 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
88e8b056fc
commit
e350093be6
@ -44,6 +44,8 @@ public class DrawingParagraph {
|
||||
text.append('\n');
|
||||
}
|
||||
}
|
||||
|
||||
c.dispose();
|
||||
|
||||
return text;
|
||||
}
|
||||
|
@ -69,6 +69,8 @@ public class XSLFCommonSlideData {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
c.dispose();
|
||||
}
|
||||
|
||||
return out;
|
||||
|
@ -1098,6 +1098,7 @@ public class XWPFDocument extends POIXMLDocument implements Document, IBody {
|
||||
CTRow row = (CTRow)o;
|
||||
cursor.toParent();
|
||||
o = cursor.getObject();
|
||||
cursor.dispose();
|
||||
if(! (o instanceof CTTbl)){
|
||||
return null;
|
||||
}
|
||||
|
@ -66,6 +66,7 @@ public class XWPFFooter extends XWPFHeaderFooter {
|
||||
bodyElements.add(t);
|
||||
}
|
||||
}
|
||||
cursor.dispose();
|
||||
getAllPictures();
|
||||
}
|
||||
|
||||
@ -125,6 +126,7 @@ public class XWPFFooter extends XWPFHeaderFooter {
|
||||
bodyElements.add(t);
|
||||
}
|
||||
}
|
||||
cursor.dispose();
|
||||
getAllPictures();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
|
@ -67,6 +67,7 @@ public class XWPFHeader extends XWPFHeaderFooter {
|
||||
tables.add(t);
|
||||
}
|
||||
}
|
||||
cursor.dispose();
|
||||
getAllPictures();
|
||||
}
|
||||
|
||||
@ -131,6 +132,7 @@ public class XWPFHeader extends XWPFHeaderFooter {
|
||||
bodyElements.add(t);
|
||||
}
|
||||
}
|
||||
cursor.dispose();
|
||||
getAllPictures();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
|
@ -504,6 +504,7 @@ public abstract class XWPFHeaderFooter extends POIXMLDocumentPart implements IBo
|
||||
bodyElements.add(t);
|
||||
}
|
||||
}
|
||||
cursor.dispose();
|
||||
getAllPictures();
|
||||
}
|
||||
|
||||
@ -521,6 +522,7 @@ public abstract class XWPFHeaderFooter extends POIXMLDocumentPart implements IBo
|
||||
CTRow row = (CTRow)o;
|
||||
cursor.toParent();
|
||||
o = cursor.getObject();
|
||||
cursor.dispose();
|
||||
if(! (o instanceof CTTbl)){
|
||||
return null;
|
||||
}
|
||||
|
@ -107,6 +107,8 @@ public class XWPFParagraph implements IBodyElement{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
c.dispose();
|
||||
|
||||
// Look for bits associated with the runs
|
||||
for(XWPFRun run : runs) {
|
||||
@ -1159,6 +1161,8 @@ public class XWPFParagraph implements IBodyElement{
|
||||
else
|
||||
candCharPos=0;
|
||||
}
|
||||
|
||||
c.dispose();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
@ -628,6 +628,8 @@ public class XWPFRun {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
c.dispose();
|
||||
|
||||
// Any picture text?
|
||||
if(pictureText != null && pictureText.length() > 0) {
|
||||
|
@ -65,6 +65,7 @@ public class XWPFTableCell implements IBody {
|
||||
bodyElements.add(t);
|
||||
}
|
||||
}
|
||||
cursor.dispose();
|
||||
}
|
||||
|
||||
|
||||
@ -336,6 +337,7 @@ public class XWPFTableCell implements IBody {
|
||||
CTRow row = (CTRow)o;
|
||||
cursor.toParent();
|
||||
o = cursor.getObject();
|
||||
cursor.dispose();
|
||||
if(! (o instanceof CTTbl)){
|
||||
return null;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user