diff --git a/src/fenetres/create.java b/src/fenetres/create.java index 32a683b..76b17c4 100644 --- a/src/fenetres/create.java +++ b/src/fenetres/create.java @@ -99,6 +99,7 @@ import cXML.node; import list.listeDesNodesAllContent; import list.listeDesNodesAnalyseStyle; import list.listeDesNodesAncrable; +import list.listeDesNodesContenantSaut; import list.listeDesNodesEvalPlacement; import list.listeDesNodesFormatageDirect; import list.listeDesNodesPourEvaluationEntetePage; @@ -532,9 +533,11 @@ public final class create extends JFrame { } if(listeDesNodesFormatageDirect.isFormatageDirect(nod)) { btnevalNameLegacyStyleTrue.setEnabled(true); - btnevalSautPageColonnetrue.setEnabled(true); btnevalFormatageDirecttrue.setEnabled(true); } + if(listeDesNodesContenantSaut.isNodesContenantSaut(nod)) { + btnevalSautPageColonnetrue.setEnabled(true); + } if(listeDesNodesAnalyseStyle.isAnalyseStyle(nod)) { btnanalyseStyletrue.setEnabled(true); } diff --git a/src/list/listeDesNodesContenantSaut.java b/src/list/listeDesNodesContenantSaut.java new file mode 100644 index 0000000..c0ba502 --- /dev/null +++ b/src/list/listeDesNodesContenantSaut.java @@ -0,0 +1,26 @@ +package list; + +import cXML.node; + +public class listeDesNodesContenantSaut { + + + public static boolean isNodesContenantSaut(node nod) { + + String nameNode = nod.getNomElt(); + + switch (nameNode) { + case "text:p":{ + if(nod.chemin().contains("structurepage")) return true; + return false; + } + case "text:h":{ + if(nod.chemin().contains("structurepage")) return true; + return false; + } + default: + return false; + } + } + +}