diff options
| author | Michael Williamson <mike@zwobble.org> | 2016-02-13 19:10:17 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2016-02-13 19:10:17 +0000 |
| commit | 9415477ff50a54d51ed45968dd49fd524144ce42 (patch) | |
| tree | 5639d0679d811a61afdf0c0d94f54bbcb6b6401c /src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java | |
| parent | f857963e6dc2675099e793472b8c1401cc3836a1 (diff) | |
Read underlined runs
Diffstat (limited to 'src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java')
| -rw-r--r-- | src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java b/src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java index a369ebc..1cc7a34 100644 --- a/src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java +++ b/src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java @@ -52,6 +52,7 @@ public class BodyXmlReader { (style, children) -> new Run( isBold(properties), isItalic(properties), + isUnderline(properties), style, children)); } @@ -64,6 +65,10 @@ public class BodyXmlReader { return properties.hasChild("w:i"); } + private boolean isUnderline(XmlElementLike properties) { + return properties.hasChild("w:u"); + } + private Result<Optional<Style>> readRunStyle(XmlElementLike properties) { return readStyle(properties, "w:rStyle", "Run", styles::findCharacterStyleById); } |
