diff --git a/.classpath b/.classpath index 4b5675b..148593c 100644 --- a/.classpath +++ b/.classpath @@ -12,6 +12,6 @@ - + diff --git a/analyseWriter.exe b/analyseWriter.exe index 7913fea..ac74fc0 100644 Binary files a/analyseWriter.exe and b/analyseWriter.exe differ diff --git a/analyseWriter.jar b/analyseWriter.jar index 0ad7e53..0b30a60 100644 Binary files a/analyseWriter.jar and b/analyseWriter.jar differ diff --git a/bin/MEPTL/meptl.class b/bin/MEPTL/meptl.class index 61884a3..dc67fe9 100644 Binary files a/bin/MEPTL/meptl.class and b/bin/MEPTL/meptl.class differ diff --git a/bin/evaluer/evaluation.class b/bin/evaluer/evaluation.class index df91024..4ab352b 100644 Binary files a/bin/evaluer/evaluation.class and b/bin/evaluer/evaluation.class differ diff --git a/bin/evaluer/evaluationAttribut.class b/bin/evaluer/evaluationAttribut.class index 3efc052..d0a0633 100644 Binary files a/bin/evaluer/evaluationAttribut.class and b/bin/evaluer/evaluationAttribut.class differ diff --git a/src/MEPTL/meptl.java b/src/MEPTL/meptl.java index 720757f..24e0a96 100644 --- a/src/MEPTL/meptl.java +++ b/src/MEPTL/meptl.java @@ -2659,17 +2659,31 @@ public class meptl { return targetString; } - + /** + * Ajoute les valeurs par défaut du style de paragraphe par défaut.
+ * @param ensembleDesParagraphes + * @return + */ public static node ajouteValeurParDefautAuStyleParagraph(node ensembleDesParagraphes ) { - node LesStyleDefaut = null; + node LeStyleDefaut = null; if(ensembleDesParagraphes.retourneEnfantsByNameExist("style:default-style")) { - LesStyleDefaut = ensembleDesParagraphes.retourneFirstNodeByNameAndAttributValue("style:default-style","style:family","paragraph"); - if(LesStyleDefaut==null) return ensembleDesParagraphes; + LeStyleDefaut = ensembleDesParagraphes.retourneFirstNodeByNameAndAttributValue("style:default-style","style:family","paragraph"); + if(LeStyleDefaut==null) return ensembleDesParagraphes; + if(LeStyleDefaut!=null) { + node styleparagraphproperties = LeStyleDefaut.retourneFirstEnfantsByName("style:paragraph-properties"); + if(styleparagraphproperties!=null) { + if(styleparagraphproperties.getAttributs().get("fo:margin-bottom")==null) LeStyleDefaut.getAttributs().put("fo:margin-bottom", "0"); + if(styleparagraphproperties.getAttributs().get("fo:margin-left")==null) LeStyleDefaut.getAttributs().put("fo:margin-left", "0"); + if(styleparagraphproperties.getAttributs().get("fo:margin-right")==null) LeStyleDefaut.getAttributs().put("fo:margin-right", "0"); + if(styleparagraphproperties.getAttributs().get("fo:margin-right")==null) LeStyleDefaut.getAttributs().put("fo:margin-right", "0"); + if(styleparagraphproperties.getAttributs().get("fo:margin-top")==null) LeStyleDefaut.getAttributs().put("fo:margin-top", "0"); + if(styleparagraphproperties.getAttributs().get("fo:text-indent")==null) LeStyleDefaut.getAttributs().put("fo:text-indent", "0"); + + } + } } - - for(int i =0 ; i < ensembleDesParagraphes.getNodes().size(); i++) { node nodStyle = ensembleDesParagraphes.getNodes().get(i); @@ -2679,8 +2693,8 @@ public class meptl { continue; } - //le paragarph properties - node nodeStyleParDefautParagraphProperties = LesStyleDefaut.retourneFirstEnfantsByName("style:paragraph-properties"); + //le paragraphe properties + node nodeStyleParDefautParagraphProperties = LeStyleDefaut.retourneFirstEnfantsByName("style:paragraph-properties"); node LesNodesStyleParagraph = nodStyle.retourneFirstEnfantsByName("style:paragraph-properties"); Enumeration K = nodeStyleParDefautParagraphProperties.getAttributs().keys(); while(K.hasMoreElements()){ @@ -2699,7 +2713,7 @@ public class meptl { } //le text properties - node nodeStyleParDefautTextProperties = LesStyleDefaut.retourneFirstEnfantsByName("style:text-properties"); + node nodeStyleParDefautTextProperties = LeStyleDefaut.retourneFirstEnfantsByName("style:text-properties"); node LesNodesStyleText = nodStyle.retourneFirstEnfantsByName("style:text-properties"); K = nodeStyleParDefautTextProperties.getAttributs().keys(); while(K.hasMoreElements()){ diff --git a/src/evaluer/evaluation.java b/src/evaluer/evaluation.java index c8ec8ac..dbe6773 100644 --- a/src/evaluer/evaluation.java +++ b/src/evaluer/evaluation.java @@ -186,7 +186,7 @@ public class evaluation { //intervalle valeur simple pas de bordure, pas de couleur, et pas d'autres fonctions - if(Sujet.contains("→") && A!=null && !Sujet.contains("#") && !Sujet.contains("¦") && !Sujet.contains("↕") && !Sujet.contains("↑") && !Sujet.contains("¢")) { + if(Sujet.contains("→") && !Sujet.contains("#") && !Sujet.contains("¦") && !Sujet.contains("↕") && !Sujet.contains("↑") && !Sujet.contains("¢")) { if (TraitementIntervalle(A,Sujet).equals("Correct : ")) { IncrementPointClass(pointEnJeu); return "Correct : +" + pointString; @@ -350,6 +350,7 @@ public class evaluation { * @return */ private static String TraitementIntervalle(String A, String B) { + if(A==null) return "Erreur : "; if(A.isEmpty()) return "Erreur : "; String Text[] = B.split("→"); @@ -445,7 +446,7 @@ public class evaluation { /** * Traitement des bordures * Avec ou sans intervalle sur l'épaisseur des traits - * Avec 3 styles de tarits solid, dashed, double + * Avec 3 styles de traits solid, dashed, double * Avec traitement de la couleur * @param Sujet * @param B diff --git a/src/evaluer/evaluationAttribut.java b/src/evaluer/evaluationAttribut.java index 9daeae9..020da43 100644 --- a/src/evaluer/evaluationAttribut.java +++ b/src/evaluer/evaluationAttribut.java @@ -648,6 +648,14 @@ public class evaluationAttribut { if(nodeStudent!=null) { int calcul = 0; node nodeSujetfrereAvant = sujet.retourneLeNodeFrereAvant(); + node nodParentSujet = sujet.getParent(); + if(nodParentSujet!=null)if(sujet.getParent().getNomElt().equals("OU")) { + nodeSujetfrereAvant = nodParentSujet.retourneLeNodeFrereAvant(); + } + if(nodeSujetfrereAvant!=null)if(nodeSujetfrereAvant.getNomElt().equals("OU")) { + nodeSujetfrereAvant = nodeSujetfrereAvant.getNodes().get(0); + } + node nodeStudentfereAvant = nodeStudent.retourneLeNodeFrereAvant(); if(nodeSujetfrereAvant==null) nodeSujetfrereAvant = new node(); if(nodeStudentfereAvant==null) nodeStudentfereAvant = new node(); @@ -659,7 +667,7 @@ public class evaluationAttribut { if(calcul==1) { retour = evaluationPlacement(retour,B, A , sujet.getAttributs().get("evalPlacement"),"Placement"); }else { - retour = evaluationPlacement(retour,null, A , sujet.getAttributs().get("evalPlacement"),"Placement"); + retour = evaluationPlacement(retour,B, A , sujet.getAttributs().get("evalPlacement"),"Placement"); } }else { node nodeSujetAvant = sujet.retourneLeNodeFrereAvant();