From 3b306d59bb9abcbb061735d4ae0cc40522c2ce0c Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 13 Feb 2016 19:03:49 +0000 Subject: Read bold runs --- src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java') diff --git a/src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java b/src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java index e9fca9c..2982916 100644 --- a/src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java +++ b/src/main/java/org/zwobble/mammoth/docx/BodyXmlReader.java @@ -49,7 +49,14 @@ public class BodyXmlReader { return ReadResult.map( readRunStyle(properties), readElements(element.children()), - (style, children) -> new Run(false, style, children)); + (style, children) -> new Run( + isBold(properties), + style, + children)); + } + + private boolean isBold(XmlElementLike properties) { + return properties.hasChild("w:b"); } private Result> readRunStyle(XmlElementLike properties) { -- cgit v1.2.3