Skip to content

Commit

Permalink
Fix DOCX calculation of margin and padding (#1979)
Browse files Browse the repository at this point in the history
  • Loading branch information
speckyspooky authored Nov 16, 2024
1 parent 6608af6 commit b95fb42
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -479,7 +479,7 @@ public static int convertToPt(String size) {
} else if (size.endsWith("cm")) {
return (int) (s / 2.54 * 72);
} else if (size.endsWith("mm")) {
return (int) (s * 10 / 2.54 * 72);
return (int) (s / 10 / 2.54 * 72);
} else if (size.endsWith("pc")) {
return s;
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -414,7 +414,7 @@ public static int convertToPt(String size) {
} else if (size.endsWith("cm")) {
return (int) (s / 2.54 * 72);
} else if (size.endsWith("mm")) {
return (int) (s * 10 / 2.54 * 72);
return (int) (s / 10 / 2.54 * 72);
} else if (size.endsWith("pc")) {
return s;
} else {
Expand Down

0 comments on commit b95fb42

Please sign in to comment.