diff --git a/lib/openxliff.jar b/lib/openxliff.jar index 3c556986..bf80d938 100644 Binary files a/lib/openxliff.jar and b/lib/openxliff.jar differ diff --git a/src/com/maxprograms/converters/Constants.java b/src/com/maxprograms/converters/Constants.java index 96d23b98..5658a4ad 100644 --- a/src/com/maxprograms/converters/Constants.java +++ b/src/com/maxprograms/converters/Constants.java @@ -19,8 +19,8 @@ private Constants() { public static final String TOOLID = "OpenXLIFF"; public static final String TOOLNAME = "OpenXLIFF Filters"; - public static final String VERSION = "1.15.1"; - public static final String BUILD = "20211111_1843"; + public static final String VERSION = "1.15.2"; + public static final String BUILD = "20211113_0650"; public static final String SUCCESS = "0"; public static final String ERROR = "1"; diff --git a/src/com/maxprograms/converters/msoffice/MSOffice2Xliff.java b/src/com/maxprograms/converters/msoffice/MSOffice2Xliff.java index a9bc16fd..f32f7b0c 100644 --- a/src/com/maxprograms/converters/msoffice/MSOffice2Xliff.java +++ b/src/com/maxprograms/converters/msoffice/MSOffice2Xliff.java @@ -166,9 +166,11 @@ private static void writeSegment(String sourceText) throws IOException, SAXExcep if (checkPairs(test)) { start = first.getText(); end = last.getText(); - content.remove(content.size() - 1); - content.remove(0); - source.setContent(content); + List newContent = new ArrayList<>(); + for (int i = 1; i < content.size() - 1; i++) { + newContent.add(content.get(i)); + } + source.setContent(newContent); } } diff --git a/src/com/maxprograms/converters/office/Office2Xliff.java b/src/com/maxprograms/converters/office/Office2Xliff.java index 654dac4a..c3c3b000 100644 --- a/src/com/maxprograms/converters/office/Office2Xliff.java +++ b/src/com/maxprograms/converters/office/Office2Xliff.java @@ -72,7 +72,6 @@ public static List run(Map params) { String catalog = params.get("catalog"); try { - Document merged = new Document(null, "xliff", null, null); mergedRoot = merged.getRootElement(); mergedRoot.setAttribute("version", "1.2");