From 267c3abff81a5fc906e347e161c8c0bf4e5b7bf1 Mon Sep 17 00:00:00 2001 From: pablo rodriguez <58742538+1-pablo-rodriguez@users.noreply.github.com> Date: Thu, 9 May 2024 14:50:42 +0200 Subject: [PATCH] MAJ V4.5.0 --- src/fenetres/create.java | 5 ++++- src/list/listeDesNodesContenantSaut.java | 26 ++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 src/list/listeDesNodesContenantSaut.java 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; + } + } + +}