From d5d691a5c27b63e65db39f37d47e863843cacd14 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Mon, 20 Jun 2016 19:52:39 +0100 Subject: Update java-mammoth to 0.0.3 --- Mammoth/Couscous/mammoth/internal/util/Lists.cs | 2 +- Mammoth/generated.cs | 7 ++++++- java-mammoth | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Mammoth/Couscous/mammoth/internal/util/Lists.cs b/Mammoth/Couscous/mammoth/internal/util/Lists.cs index 18c14f3..9df31b7 100644 --- a/Mammoth/Couscous/mammoth/internal/util/Lists.cs +++ b/Mammoth/Couscous/mammoth/internal/util/Lists.cs @@ -20,7 +20,7 @@ namespace Mammoth.Couscous.org.zwobble.mammoth.@internal.util { return ToJava.ListToList(result); } - internal static List eagerMap(Iterable iterable, BiFunction function) { + internal static List eagerMapWithIndex(Iterable iterable, BiFunction function) { var result = FromJava.IterableToEnumerable(iterable) .Select((value, index) => function.apply(index, value)) .ToList(); diff --git a/Mammoth/generated.cs b/Mammoth/generated.cs index c2a0bd3..ac12bb1 100644 --- a/Mammoth/generated.cs +++ b/Mammoth/generated.cs @@ -1370,6 +1370,8 @@ namespace Mammoth.Couscous.org.zwobble.mammoth.@internal.docx { return this.readInline(element); } else if (_couscous_tmp_1.Equals("wp:anchor")) { return this.readInline(element); + } else if (_couscous_tmp_1.Equals("w:sdt")) { + return this.readSdt(element); } else if (_couscous_tmp_1.Equals("w:ins")) { return this.readElements(element.getChildren()); } else if (_couscous_tmp_1.Equals("w:smartTag")) { @@ -1521,7 +1523,7 @@ namespace Mammoth.Couscous.org.zwobble.mammoth.@internal.docx { } rowIndex = rowIndex + 1; } - return Mammoth.Couscous.org.zwobble.mammoth.@internal.docx.ReadResult.success(Mammoth.Couscous.org.zwobble.mammoth.@internal.util.Lists.eagerMap(rows, new Mammoth.Couscous.org.zwobble.mammoth.@internal.docx.BodyXmlReader_Anonymous_42(merged, rowspans))); + return Mammoth.Couscous.org.zwobble.mammoth.@internal.docx.ReadResult.success(Mammoth.Couscous.org.zwobble.mammoth.@internal.util.Lists.eagerMapWithIndex(rows, new Mammoth.Couscous.org.zwobble.mammoth.@internal.docx.BodyXmlReader_Anonymous_42(merged, rowspans))); } public Mammoth.Couscous.java.util.Optional checkTableRows(Mammoth.Couscous.java.util.List rows) { Mammoth.Couscous.java.util.Iterator _couscous_tmp_3 = rows.iterator(); @@ -1615,6 +1617,9 @@ namespace Mammoth.Couscous.org.zwobble.mammoth.@internal.docx { return Mammoth.Couscous.org.zwobble.mammoth.@internal.docx.ReadResult.withWarning(image, ("Image of type " + contentTypeString) + " is unlikely to display in web browsers"); } } + public Mammoth.Couscous.org.zwobble.mammoth.@internal.docx.ReadResult readSdt(Mammoth.Couscous.org.zwobble.mammoth.@internal.xml.XmlElement element) { + return this.readElements((element.findChildOrEmpty("w:sdtContent")).getChildren()); + } public string relationshipIdToDocxPath(string relationshipId) { Mammoth.Couscous.org.zwobble.mammoth.@internal.docx.Relationship relationship = (this._relationships).findRelationshipById(relationshipId); return "word/" + Mammoth.Couscous.org.zwobble.mammoth.@internal.util.Strings.trimLeft(relationship.getTarget(), 47); diff --git a/java-mammoth b/java-mammoth index 1d72460..537c967 160000 --- a/java-mammoth +++ b/java-mammoth @@ -1 +1 @@ -Subproject commit 1d724603e22e8941b0813b89bcdf106d95862ec4 +Subproject commit 537c967a33eff35ebdad8268e607831530ed5e45 -- cgit v1.2.3