Skip to content

Commit

Permalink
Handle additional R.* content and Drawing types
Browse files Browse the repository at this point in the history
Added cases to handle R.AnnotationRef, R.CommentReference, and Drawing types in the content processing logic. This ensures these types will not cause unhandled object type errors during execution.
  • Loading branch information
caring-coder committed Sep 21, 2024
1 parent 53e54b5 commit 6586969
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ public static CharSequence getText(Object content) {
if (content instanceof R.NoBreakHyphen) return "‑";
if (content instanceof R.SoftHyphen) return "\u00AD";
if (content instanceof R.LastRenderedPageBreak) return "";
if (content instanceof R.AnnotationRef) return "";
if (content instanceof R.CommentReference) return "";
if (content instanceof Drawing) return "";
if (content instanceof R.Sym sym) return "<sym(" + sym.getFont() + ", " + sym.getChar() + ")>";

log.debug("Unhandled object type: {}", content.getClass());
Expand Down

0 comments on commit 6586969

Please sign in to comment.