diff --git a/analyseWriter.exe b/analyseWriter.exe
index f0a7648..71ad2fe 100644
Binary files a/analyseWriter.exe and b/analyseWriter.exe differ
diff --git a/analyseWriter.jar b/analyseWriter.jar
index cf38b6c..717a3a0 100644
Binary files a/analyseWriter.jar and b/analyseWriter.jar differ
diff --git a/bin/.gitignore b/bin/.gitignore
index 7c1844e..8bee47b 100644
--- a/bin/.gitignore
+++ b/bin/.gitignore
@@ -7,3 +7,7 @@
/menucontextuel/
/sousmenuEvaluation/
/sousmenuRepresentation/
+/resources/
+/legacystyleparentpresent.svg
+/menulegacystyleparentpresent.png
+/menulegacystyleparentpresentmini.png
diff --git a/bin/MEPTL/meptl.class b/bin/MEPTL/meptl.class
index 3fb0d11..29eb2f3 100644
Binary files a/bin/MEPTL/meptl.class and b/bin/MEPTL/meptl.class differ
diff --git a/bin/calcul/calculNombrePointEvaluation.class b/bin/calcul/calculNombrePointEvaluation.class
index 81dbcab..31ba0c4 100644
Binary files a/bin/calcul/calculNombrePointEvaluation.class and b/bin/calcul/calculNombrePointEvaluation.class differ
diff --git a/bin/evaluer/evaluationAttribut.class b/bin/evaluer/evaluationAttribut.class
index 8f1bfae..03b46fa 100644
Binary files a/bin/evaluer/evaluationAttribut.class and b/bin/evaluer/evaluationAttribut.class differ
diff --git a/bin/fenetres/afficheText.class b/bin/fenetres/afficheText.class
index 1c514cd..25704ef 100644
Binary files a/bin/fenetres/afficheText.class and b/bin/fenetres/afficheText.class differ
diff --git a/bin/list/listeAttributsAnalyseWriter.class b/bin/list/listeAttributsAnalyseWriter.class
index 913ab11..19ec1d1 100644
Binary files a/bin/list/listeAttributsAnalyseWriter.class and b/bin/list/listeAttributsAnalyseWriter.class differ
diff --git a/icons/legacystyleparentpresent.svg b/icons/legacystyleparentpresent.svg
new file mode 100644
index 0000000..958081c
--- /dev/null
+++ b/icons/legacystyleparentpresent.svg
@@ -0,0 +1,118 @@
+
+
+
+
diff --git a/icons/menulegacystyleparentpresent.png b/icons/menulegacystyleparentpresent.png
new file mode 100644
index 0000000..77d3c98
Binary files /dev/null and b/icons/menulegacystyleparentpresent.png differ
diff --git a/icons/menulegacystyleparentpresentmini.png b/icons/menulegacystyleparentpresentmini.png
new file mode 100644
index 0000000..ed99813
Binary files /dev/null and b/icons/menulegacystyleparentpresentmini.png differ
diff --git a/src/MEPTL/meptl.java b/src/MEPTL/meptl.java
index 2c1110e..597ef29 100644
--- a/src/MEPTL/meptl.java
+++ b/src/MEPTL/meptl.java
@@ -2716,6 +2716,7 @@ public class meptl {
LeStyleDefaut = ensembleDesParagraphes.retourneFirstNodeByNameAndAttributValue("style:default-style","style:family","paragraph");
if(LeStyleDefaut==null) return ensembleDesParagraphes;
if(LeStyleDefaut!=null) {
+ if(LeStyleDefaut.getAttributs().get("style:master-page-name")==null)LeStyleDefaut.getAttributs().put("style:master-page-name","none");
node styleparagraphproperties = LeStyleDefaut.retourneFirstEnfantsByName("style:paragraph-properties");
if(styleparagraphproperties!=null) {
if(styleparagraphproperties.getAttributs().get("fo:margin-bottom")==null) styleparagraphproperties.getAttributs().put("fo:margin-bottom", "0");
@@ -2723,7 +2724,19 @@ public class meptl {
if(styleparagraphproperties.getAttributs().get("fo:margin-right")==null) styleparagraphproperties.getAttributs().put("fo:margin-right", "0");
if(styleparagraphproperties.getAttributs().get("fo:margin-top")==null) styleparagraphproperties.getAttributs().put("fo:margin-top", "0");
if(styleparagraphproperties.getAttributs().get("fo:text-indent")==null) styleparagraphproperties.getAttributs().put("fo:text-indent", "0");
-
+ if(styleparagraphproperties.getAttributs().get("fo:line-height")==null) styleparagraphproperties.getAttributs().put("fo:line-height", "100%");
+ if(styleparagraphproperties.getAttributs().get("fo:orphans")==null) styleparagraphproperties.getAttributs().put("fo:orphans", "2");
+ if(styleparagraphproperties.getAttributs().get("fo:widows")==null) styleparagraphproperties.getAttributs().put("fo:widows", "2");
+ if(styleparagraphproperties.getAttributs().get("fo:border-bottom")==null) styleparagraphproperties.getAttributs().put("fo:border-bottom", "none");
+ if(styleparagraphproperties.getAttributs().get("fo:border-left")==null) styleparagraphproperties.getAttributs().put("fo:border-left", "none");
+ if(styleparagraphproperties.getAttributs().get("fo:border-right")==null) styleparagraphproperties.getAttributs().put("fo:border-right", "none");
+ if(styleparagraphproperties.getAttributs().get("fo:border-top")==null) styleparagraphproperties.getAttributs().put("fo:border-top", "none");
+ if(styleparagraphproperties.getAttributs().get("fo:keep-together")==null) styleparagraphproperties.getAttributs().put("fo:keep-together", "none");
+ if(styleparagraphproperties.getAttributs().get("fo:keep-with-next")==null) styleparagraphproperties.getAttributs().put("fo:keep-with-next", "none");
+ if(styleparagraphproperties.getAttributs().get("fo:break-after")==null) styleparagraphproperties.getAttributs().put("fo:break-after", "none");
+ if(styleparagraphproperties.getAttributs().get("fo:break-before")==null) styleparagraphproperties.getAttributs().put("fo:break-before", "none");
+ if(styleparagraphproperties.getAttributs().get("fo:text-align")==null) styleparagraphproperties.getAttributs().put("fo:text-align", "start");
+
}
}
}
diff --git a/src/action/mnEvaluerATraversAnalyseStyleFalse.java b/src/action/actEvaluerATraversAnalyseStyleFalse.java
similarity index 92%
rename from src/action/mnEvaluerATraversAnalyseStyleFalse.java
rename to src/action/actEvaluerATraversAnalyseStyleFalse.java
index 7b76ce5..80c5e47 100644
--- a/src/action/mnEvaluerATraversAnalyseStyleFalse.java
+++ b/src/action/actEvaluerATraversAnalyseStyleFalse.java
@@ -11,7 +11,7 @@ import javax.swing.tree.TreePath;
import cXML.node;
import fenetres.create;
-public class mnEvaluerATraversAnalyseStyleFalse extends AbstractAction{
+public class actEvaluerATraversAnalyseStyleFalse extends AbstractAction{
{
putValue( Action.NAME, "N'évaluer pas le style dans la structure." );
putValue( Action.SHORT_DESCRIPTION, "N'évaluer pas le style:name de ce node dans la struture du fichier de l'étudiant" );
diff --git a/src/action/mnEvaluerATraversAnalyseStyleTrue.java b/src/action/actEvaluerATraversAnalyseStyleTrue.java
similarity index 92%
rename from src/action/mnEvaluerATraversAnalyseStyleTrue.java
rename to src/action/actEvaluerATraversAnalyseStyleTrue.java
index 2c48223..c9fac83 100644
--- a/src/action/mnEvaluerATraversAnalyseStyleTrue.java
+++ b/src/action/actEvaluerATraversAnalyseStyleTrue.java
@@ -12,7 +12,7 @@ import javax.swing.tree.TreePath;
import cXML.node;
import fenetres.create;
-public class mnEvaluerATraversAnalyseStyleTrue extends AbstractAction{
+public class actEvaluerATraversAnalyseStyleTrue extends AbstractAction{
{
putValue( Action.NAME, "Evaluer le style dans la structure." );
putValue( Action.SHORT_DESCRIPTION, "Evaluer le style:name de ce node dans la struture du fichier de l'étudiant");
diff --git a/src/action/actEvaluerLegacyStyleParentFalse.java b/src/action/actEvaluerLegacyStyleParentFalse.java
new file mode 100644
index 0000000..b47b7fd
--- /dev/null
+++ b/src/action/actEvaluerLegacyStyleParentFalse.java
@@ -0,0 +1,27 @@
+package action;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.ImageIcon;
+
+import cXML.node;
+import fenetres.create;
+
+public class actEvaluerLegacyStyleParentFalse extends AbstractAction{
+ {
+ putValue( Action.NAME, "Supprime l'évaluation de la présence ou absence du style Parent." );
+ putValue( Action.SHORT_DESCRIPTION, "Supprime l'évaluation de la présence ou absence du style Parent." );
+ putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/falsemini.png")) );
+ }
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ node nod = (node) fenetres.create.getSelectNode().getUserObject();
+ nod.supprimeAttribut("evalLegacyStyleParentPresent");
+ fenetres.create.getTextNodeSelect().refreshAffichage(nod);
+ }
+
+}
diff --git a/src/action/actEvaluerLegacyStyleParentTrue.java b/src/action/actEvaluerLegacyStyleParentTrue.java
new file mode 100644
index 0000000..b0e3f04
--- /dev/null
+++ b/src/action/actEvaluerLegacyStyleParentTrue.java
@@ -0,0 +1,51 @@
+package action;
+
+import java.awt.event.ActionEvent;
+
+import javax.swing.AbstractAction;
+import javax.swing.Action;
+import javax.swing.ImageIcon;
+import javax.swing.JOptionPane;
+
+import cXML.node;
+import fenetres.baliseStyle;
+import fenetres.create;
+
+public class actEvaluerLegacyStyleParentTrue extends AbstractAction{
+ {
+ putValue( Action.NAME, "Oui, combien de point?" );
+ putValue( Action.SHORT_DESCRIPTION, "Evaluer la présence ou l'absence du style Parent.");
+ putValue( Action.SMALL_ICON, new ImageIcon(create.class.getResource("/resources/truemini.png")));
+ }
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void actionPerformed(ActionEvent e) {
+ node nod = (node) fenetres.create.getSelectNode().getUserObject();
+ int point = 0;
+ if(nod.getAttributs().get("evalLegacyStyleParentPresent")!=null) {
+ point = Integer.valueOf(nod.getAttributs().get("evalLegacyStyleParentPresent"));
+ }
+
+ String a = JOptionPane.showInputDialog(null,"Quel est le nombre de point?",point);
+
+ if(a!=null) if(!a.isEmpty()) {
+ try {
+ point = Integer.valueOf(a);
+ if(point<=0) {
+ nod.getAttributs().put("evalLegacyStyleParentPresent", String.valueOf(0));
+ fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
+ fenetres.create.getTextNodeSelect().setText("
Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro.
Cependant,la valeur a été modifiée.
evalNameLegacyStyle=0.
");
+ }else {
+ nod.getAttributs().put("evalLegacyStyleParentPresent", String.valueOf(point));
+ }
+ } catch (Exception e2) {
+ fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
+ fenetres.create.getTextNodeSelect().setText("Erreur la valeur doit être un nombre entier.
L'attribut n'a pas été modifiée.
");
+ }
+ }
+ fenetres.create.getTextNodeSelect().refreshAffichage(nod);
+
+ }
+
+}
diff --git a/src/action/actEvaluerNomDuStyleHeriteTrue.java b/src/action/actEvaluerNomDuStyleHeriteTrue.java
index 8313077..9e9b5d3 100644
--- a/src/action/actEvaluerNomDuStyleHeriteTrue.java
+++ b/src/action/actEvaluerNomDuStyleHeriteTrue.java
@@ -37,7 +37,7 @@ public class actEvaluerNomDuStyleHeriteTrue extends AbstractAction{
try {
point = Integer.valueOf(a);
if(point<=0) {
- nod.getAttributs().put("evalNameNode", String.valueOf(0));
+ nod.getAttributs().put("evalNameLegacyStyle", String.valueOf(0));
fenetres.create.getTextNodeSelect().setText(baliseStyle.balise());
fenetres.create.getTextNodeSelect().setText("Erreur la valeur doit être un nombre entier POSITIF supérieur à zéro.
Cependant,la valeur a été modifiée.
evalNameLegacyStyle=0.
");
}else {
diff --git a/src/calcul/calculNombrePointEvaluation.java b/src/calcul/calculNombrePointEvaluation.java
index e90358f..b57df4e 100644
--- a/src/calcul/calculNombrePointEvaluation.java
+++ b/src/calcul/calculNombrePointEvaluation.java
@@ -174,6 +174,14 @@ public class calculNombrePointEvaluation {
}
}
+ if(nod.getAttributs().get("evalLegacyStyleParentPresent")!=null) {
+ try {
+ point = point + Integer.valueOf(nod.getAttributs().get("evalLegacyStyleParentPresent"));
+ } catch (Exception e) {
+ JOptionPane.showInternalMessageDialog(null, "Erreur dans la valeur de l'attribut evalLegacyStyleParentPresent");
+ }
+ }
+
if(nod.getAttributs().get("evalNombreDePageMaxi")!=null) {
try {
String valeur = nod.getAttributs().get("evalNombreDePageMaxi");
diff --git a/src/evaluer/evaluationAttribut.java b/src/evaluer/evaluationAttribut.java
index e168efe..2b58f1d 100644
--- a/src/evaluer/evaluationAttribut.java
+++ b/src/evaluer/evaluationAttribut.java
@@ -418,6 +418,11 @@ public class evaluationAttribut {
retour = evalNombreDePageMini(sujet,nodeStudent,retour,nameElt);
}
+ //evaluation de la présence ou de l'absence du style Parent
+ if(k.equals("evalLegacyStyleParentPresent") && sujet.getNomElt().equals("style:style")) {
+ retour = evalPresenceStyleParent(sujet,nodeStudent,retour,nameElt);
+ }
+
}
}
@@ -891,7 +896,33 @@ public class evaluationAttribut {
return retour;
}
+ private static node evalPresenceStyleParent(node sujet,node nodeStudent, node retour, String nameElt) {
+ boolean presentSujet = false;
+ boolean presentStudent = false;
+ int point = 0;
+
+
+ if(sujet.getAttributs().get("evalLegacyStyleParentPresent")!=null) {
+ String valeur = sujet.getAttributs().get("evalLegacyStyleParentPresent");
+ point = Integer.valueOf(valeur);
+ }
+ if(sujet.getAttributs().get("style:parent-style-name")!=null) {
+ presentSujet=true;
+ }
+
+
+ if(nodeStudent!=null) {
+ if(nodeStudent.getAttributs().get("style:parent-style-name")!=null) {
+ presentStudent=true;
+ }
+ retour = evaluationLegacyStyleParentPresent(retour,String.valueOf(presentStudent), String.valueOf(presentSujet), String.valueOf(point),"Présence style Parent");
+ }else {
+ retour = evaluationLegacyStyleParentPresent(retour,"null", String.valueOf(presentSujet), String.valueOf(point),"Présence style Parent");
+ }
+
+ return retour;
+ }
/**
* Méthode evalPasParagrapheVide.
@@ -1374,6 +1405,27 @@ public class evaluationAttribut {
return retour;
}
+ /**
+ *
+ * @param retour
+ * @param reponseStudent
+ * @param reponseSujet
+ * @param point
+ * @param nameElt
+ * @return
+ */
+ private static node evaluationLegacyStyleParentPresent(node retour, String reponseStudent, String reponseSujet, String point, String nameElt) {
+ node item = null;
+ if(reponseStudent!=null) {
+ //compare la même valeur "contenuParagraph" pour obtenir les points mais si un voisinage du contenu.
+ item = retourneNoteAvecResultatsAnalyse("Présence Style Parent","", reponseStudent , reponseSujet + "‽" +point, nameElt );
+ }else {
+ evaluation.IncrementPointTotal(Integer.valueOf(point));
+ item = new node("Présence Style Parent", "Erreur : -"+ point, "" , "null", reponseSujet , 2, evaluation.getPointEnJeu(),nameElt);
+ }
+ retour.getNodes().add(item);
+ return retour;
+ }
/**
diff --git a/src/fenetres/afficheText.java b/src/fenetres/afficheText.java
index b297540..55ae5dc 100644
--- a/src/fenetres/afficheText.java
+++ b/src/fenetres/afficheText.java
@@ -80,6 +80,7 @@ public class afficheText extends JEditorPane {
String imageEvalPasParagrapheVide= "";
String imageEvalNombreDePageMaxi= "";
String imageEvalNombreDePageMini= "";
+ String imageEvalLegacyStyleParentPresent= "";
StringBuilder sb = new StringBuilder();
@@ -267,6 +268,9 @@ public class afficheText extends JEditorPane {
if(Lesattributsdunode.get(i).equals("evalNombreDePageMini") && !nod.getAttributs().get(Lesattributsdunode.get(i)).isEmpty()) {
sb.append(""+imageEvalNombreDePageMini+ " " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"");
}
+ if(Lesattributsdunode.get(i).equals("evalLegacyStyleParentPresent") && !nod.getAttributs().get(Lesattributsdunode.get(i)).equals("0")) {
+ sb.append(""+imageEvalLegacyStyleParentPresent+ " " + Lesattributsdunode.get(i) + " = \"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"");
+ }
// sb.append("" + Lesattributsdunode.get(i) + "=\"" + nod.getAttributs().get(Lesattributsdunode.get(i))+"\"");
}
diff --git a/src/list/listeAttributsAnalyseWriter.java b/src/list/listeAttributsAnalyseWriter.java
index afed813..5e6b273 100644
--- a/src/list/listeAttributsAnalyseWriter.java
+++ b/src/list/listeAttributsAnalyseWriter.java
@@ -59,6 +59,7 @@ public class listeAttributsAnalyseWriter {
case "evalPasParagrapheVide": return true;
case "evalNombreDePageMaxi": return true;
case "evalNombreDePageMini": return true;
+ case "evalLegacyStyleParentPresent": return true;
case "analysis_filename": return true;
case "auteur": return true;
diff --git a/src/menucontextuel/MnGroupeMethodeEvaluer.java b/src/menucontextuel/MnGroupeMethodeEvaluer.java
index c01d7e1..b9c8ae0 100644
--- a/src/menucontextuel/MnGroupeMethodeEvaluer.java
+++ b/src/menucontextuel/MnGroupeMethodeEvaluer.java
@@ -22,6 +22,7 @@ import sousmenuEvaluation.mnEvalAncrageNumeroAbsoluPage;
import sousmenuEvaluation.mnEvalEnteteActive;
import sousmenuEvaluation.mnEvalEntetePasActive;
import sousmenuEvaluation.mnEvalFormatageDirect;
+import sousmenuEvaluation.mnEvalLegacyStyleParentPresent;
import sousmenuEvaluation.mnEvalNameLegacyStyle;
import sousmenuEvaluation.mnEvalNameNode;
import sousmenuEvaluation.mnEvalNamePage;
@@ -133,6 +134,8 @@ public class MnGroupeMethodeEvaluer {
if(nod.getNomElt().equals("style:style")) {
mnGroupeMethodeEvaluer.addSeparator();
mnGroupeMethodeEvaluer.add(mnEvaluerATraversAnalyseStyle.menu());
+ mnGroupeMethodeEvaluer.addSeparator();
+ mnGroupeMethodeEvaluer.add(mnEvalLegacyStyleParentPresent.menu());
}
if(nod.getNomElt().equals("meta:initial-creator")) {
diff --git a/src/resources/menulegacystyleparentpresent.png b/src/resources/menulegacystyleparentpresent.png
new file mode 100644
index 0000000..77d3c98
Binary files /dev/null and b/src/resources/menulegacystyleparentpresent.png differ
diff --git a/src/resources/menulegacystyleparentpresentmini.png b/src/resources/menulegacystyleparentpresentmini.png
new file mode 100644
index 0000000..ed99813
Binary files /dev/null and b/src/resources/menulegacystyleparentpresentmini.png differ
diff --git a/src/sousmenuEvaluation/mnEvalLegacyStyleParentPresent.java b/src/sousmenuEvaluation/mnEvalLegacyStyleParentPresent.java
new file mode 100644
index 0000000..c34c681
--- /dev/null
+++ b/src/sousmenuEvaluation/mnEvalLegacyStyleParentPresent.java
@@ -0,0 +1,18 @@
+package sousmenuEvaluation;
+
+import javax.swing.ImageIcon;
+import javax.swing.JMenu;
+
+import action.actEvaluerLegacyStyleParentFalse;
+import action.actEvaluerLegacyStyleParentTrue;
+import fenetres.create;
+
+public class mnEvalLegacyStyleParentPresent {
+ public static JMenu menu(){
+ JMenu mnEvaluerATraversAnalyseStyle = new JMenu("Evaluer la présence ou l'absence du style Parent");
+ mnEvaluerATraversAnalyseStyle.setIcon(new ImageIcon(create.class.getResource("/resources/menulegacystyleparentpresentmini.png")));
+ mnEvaluerATraversAnalyseStyle.add(new actEvaluerLegacyStyleParentTrue());
+ mnEvaluerATraversAnalyseStyle.add( new actEvaluerLegacyStyleParentFalse());
+ return mnEvaluerATraversAnalyseStyle;
+ }
+}
diff --git a/src/sousmenuEvaluation/mnEvaluerATraversAnalyseStyle.java b/src/sousmenuEvaluation/mnEvaluerATraversAnalyseStyle.java
index ee41274..1fd95b9 100644
--- a/src/sousmenuEvaluation/mnEvaluerATraversAnalyseStyle.java
+++ b/src/sousmenuEvaluation/mnEvaluerATraversAnalyseStyle.java
@@ -3,8 +3,8 @@ package sousmenuEvaluation;
import javax.swing.ImageIcon;
import javax.swing.JMenu;
-import action.mnEvaluerATraversAnalyseStyleFalse;
-import action.mnEvaluerATraversAnalyseStyleTrue;
+import action.actEvaluerATraversAnalyseStyleFalse;
+import action.actEvaluerATraversAnalyseStyleTrue;
import fenetres.create;
/**
@@ -17,8 +17,8 @@ public class mnEvaluerATraversAnalyseStyle{
public static JMenu menu(){
JMenu mnEvaluerATraversAnalyseStyle = new JMenu("Evaluer le style dans la structure");
mnEvaluerATraversAnalyseStyle.setIcon(new ImageIcon(create.class.getResource("/resources/atraversanalysestylemini.png")));
- mnEvaluerATraversAnalyseStyle.add(new mnEvaluerATraversAnalyseStyleTrue());
- mnEvaluerATraversAnalyseStyle.add( new mnEvaluerATraversAnalyseStyleFalse());
+ mnEvaluerATraversAnalyseStyle.add(new actEvaluerATraversAnalyseStyleTrue());
+ mnEvaluerATraversAnalyseStyle.add( new actEvaluerATraversAnalyseStyleFalse());
return mnEvaluerATraversAnalyseStyle;
}