Skip to content

Commit

Permalink
Adds the MO Table style to the missing locations
Browse files Browse the repository at this point in the history
  • Loading branch information
CesarCoelho committed Oct 29, 2024
1 parent ac03135 commit 6082128
Showing 1 changed file with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ public void addCellNullability(int index, int[] widths,
if (types.get(i).isField()) {
nullable = types.get(i).getFieldRef().isCanBeNull();
}
buf.append("<w:r><w:t>");
buf.append("<w:pPr><w:pStyle w:val=\"MOTable\"/></w:pPr><w:r><w:t>");
buf.append(nullable ? "Yes" : "No");
buf.append("</w:t></w:r>");

Expand All @@ -206,7 +206,8 @@ public void addCellNullability(int index, int[] widths,

public void addCell(int index, int[] widths, String text, String shade,
boolean centered, int span, boolean vMerge, boolean vRestart) throws IOException {
actualAddCell(index, widths, "<w:r><w:t>" + escape(text) + "</w:t></w:r>", shade, centered, span, vMerge, vRestart);
String txt = "<w:pPr><w:pStyle w:val=\"MOTable\"/></w:pPr><w:r><w:t>" + escape(text) + "</w:t></w:r>";
actualAddCell(index, widths, txt, shade, centered, span, vMerge, vRestart);
}

protected void actualAddCell(int index, int[] widths, String text, String shade,
Expand Down Expand Up @@ -297,7 +298,7 @@ public void addNumberedComment(List<String> strings) throws IOException {
addNumberedComment(instance, 0, strings.iterator());
}
*/
*/
}
}

Expand Down Expand Up @@ -430,7 +431,7 @@ public String createHyperLink(String prefix, String typeName, String postfix,
String linkTo, boolean withHyperlink) throws IOException {
boolean isObjectRef = GeneratorBase.isObjectRef(typeName);
StringBuilder buf = new StringBuilder();
buf.append("<w:r><w:t>");
buf.append("<w:pPr><w:pStyle w:val=\"MOTable\"/></w:pPr><w:r><w:t>");
buf.append(escape(prefix));

if (isObjectRef) {
Expand All @@ -443,9 +444,11 @@ public String createHyperLink(String prefix, String typeName, String postfix,
buf.append("</w:t></w:r>");

if (withHyperlink) {
buf.append("<w:r><w:fldChar w:fldCharType=\"begin\"/></w:r><w:r><w:instrText xml:space=\"preserve\"> HYPERLINK \\l \"_");
buf.append("<w:r><w:fldChar w:fldCharType=\"begin\"/></w:r>");
buf.append("<w:r><w:instrText xml:space=\"preserve\"> HYPERLINK \\l \"_");
buf.append(isObjectRef ? escape(objectRefRemoved) : escape(linkTo));
buf.append("\" </w:instrText></w:r><w:r><w:fldChar w:fldCharType=\"separate\"/></w:r>");
buf.append("\" </w:instrText></w:r>");
buf.append("<w:r><w:fldChar w:fldCharType=\"separate\"/></w:r>");
}

buf.append("<w:r>");
Expand Down

0 comments on commit 6082128

Please sign in to comment.