V4.4.3 bug correction robustesse de l'analyse de la structuration

This commit is contained in:
pablo rodriguez 2023-03-13 18:44:59 +01:00
parent 8233c15455
commit a41345ea8b
3 changed files with 13 additions and 11 deletions

Binary file not shown.

Binary file not shown.

View File

@ -795,17 +795,19 @@ public class meptl {
} }
} }
if(usage2=="2") { if(usage2=="2") {
if(nodpage.get(j-1).getNodes().get(0)!=null) { if(nodpage.get(j-1).getNodes().size()>0) {
if(nodpage.get(j).getNodes().size()>0) { if(nodpage.get(j-1).getNodes().get(0)!=null) {
if(nodpage.get(j).getNodes().get(0).getAttributs().get("text:style-name")!=null) { if(nodpage.get(j).getNodes().size()>0) {
String styleParagraphe = nodpage.get(j).getNodes().get(0).getAttributs().get("text:style-name"); if(nodpage.get(j).getNodes().get(0).getAttributs().get("text:style-name")!=null) {
node nod6 = a.retourneFirstNodeByNameAttributValue(nodstyleparagraphe, "style:style", "style:name", styleParagraphe); String styleParagraphe = nodpage.get(j).getNodes().get(0).getAttributs().get("text:style-name");
if(nod6!=null) { node nod6 = a.retourneFirstNodeByNameAttributValue(nodstyleparagraphe, "style:style", "style:name", styleParagraphe);
node nod7 = nod6.retourneFirstEnfantsByName("style:paragraph-properties"); if(nod6!=null) {
if(nod7.getAttributs().get("style:page-number")!=null) { node nod7 = nod6.retourneFirstEnfantsByName("style:paragraph-properties");
if(!nod7.getAttributs().get("style:page-number").equals("auto")) { if(nod7.getAttributs().get("style:page-number")!=null) {
int numeroPage = Integer.valueOf(nod7.getAttributs().get("style:page-number")); if(!nod7.getAttributs().get("style:page-number").equals("auto")) {
if(numeroPage%2==0) {usage2="left";}else{usage2="right";} int numeroPage = Integer.valueOf(nod7.getAttributs().get("style:page-number"));
if(numeroPage%2==0) {usage2="left";}else{usage2="right";}
}
} }
} }
} }