Homologacao 25052021

parent f4d8eb7f
/META-INF/
/content/
/mprj/
......@@ -103,8 +103,8 @@ public class CadernoUtil {
textoHtml = textoHtml.replace("&ndash10;","-");
textoHtml = textoHtml.replace("&ndash11;","-");
textoHtml = textoHtml.replace("&ndash12;","-");
textoHtml = textoHtml.replace("&ndash13;","");
textoHtml = textoHtml.replace("&ndash14;","");
textoHtml = textoHtml.replace("&ndash13;","'");
textoHtml = textoHtml.replace("&ndash14;","'");
//"<p>&nbsp;</p>"
......@@ -297,6 +297,18 @@ public class CadernoUtil {
conteudoHtml = conteudoHtml.replaceAll("</sup>", "");
conteudoHtml = conteudoHtml.replaceAll("<sup>", "");
i=0;
}else if (tag.equals("ol")){
if(strAcumulado.contains("alpha")) {
conteudoHtml = conteudoHtml.replace(strAcumulado, "<o1>");
i=0;
}else {
conteudoHtml = conteudoHtml.replace(strAcumulado, tagFechada);
}
}else if (tag.equals("a")){
if(acao.equals("excluirTags")){
......@@ -700,6 +712,7 @@ public static String tratarLista(String conteudoHtml){
List<Integer> listaOls = new ArrayList<Integer>();
int indiceListaAtual=-1;
Boolean tagOl=false;
Boolean tagO1=false;
int margem=0;
int item=0;
int tamanhoTag = 0;
......@@ -707,6 +720,7 @@ public static String tratarLista(String conteudoHtml){
String newTagP="";
String dezEspacos=" ";
String noveEspacos=" ";
char alpha='a';
tamanhoTag = 4;
......@@ -724,18 +738,27 @@ public static String tratarLista(String conteudoHtml){
}
if (tagP.equals("<ol>")|| tagP.equals("<ul>") ) {
if (tagP.equals("<ol>")|| tagP.equals("<ul>") || tagP.equals("<o1>")) {
if (tagP.equals("<ol>")) {
tagOl=true;
tagO1=false;
item=1;
indiceListaAtual++;
listaOls.add(item);
}else {
}
if (tagP.equals("<o1>")) {
tagOl=false;
tagO1=true;
}
if (tagP.equals("<ul>")) {
tagOl=false;
tagO1=false;
}
}
......@@ -761,10 +784,21 @@ public static String tratarLista(String conteudoHtml){
listaOls.set(indiceListaAtual, item);
conteudoHtml = conteudoHtml.substring(0,i ) + marcador + conteudoHtml.substring(i + tamanhoTag,conteudoHtml.length());
len = conteudoHtml.length();
}else {
}
marcador = "\u2022 ";
conteudoHtml = conteudoHtml.substring(0,i+tamanhoTag ) + marcador + conteudoHtml.substring(i + tamanhoTag,conteudoHtml.length());
if (tagO1==true) {
newTagP = "<p style='margin-left:0px'>";
marcador = newTagP+alpha + ". ";
conteudoHtml = conteudoHtml.substring(0,i) + marcador + conteudoHtml.substring(i + tamanhoTag,conteudoHtml.length());
alpha++;
len = conteudoHtml.length();
}
if (tagOl==false && tagO1==false) {
newTagP = "<p style='margin-left:0px'>";
marcador = newTagP+"\u2022 ";
conteudoHtml = conteudoHtml.substring(0,i ) + marcador + conteudoHtml.substring(i + tamanhoTag,conteudoHtml.length());
len = conteudoHtml.length();
}
//posicaoItemOl=QTD_LISTAS;
......@@ -784,6 +818,7 @@ public static String tratarLista(String conteudoHtml){
}
conteudoHtml = conteudoHtml.replaceAll("<ol>", "<p>");
conteudoHtml = conteudoHtml.replaceAll("<o1>", "<p>");
conteudoHtml = conteudoHtml.replaceAll("<ul>", "<p>");
conteudoHtml = conteudoHtml.replaceAll("<li>", "<p>");
conteudoHtml = conteudoHtml.replaceAll("</li>", "</p>");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment