Skip to content

Commit

Permalink
Fixed segmentation of Word files
Browse files Browse the repository at this point in the history
  • Loading branch information
rmraya committed Nov 13, 2021
1 parent d7138aa commit fcbc5d3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
Binary file modified lib/openxliff.jar
Binary file not shown.
4 changes: 2 additions & 2 deletions src/com/maxprograms/converters/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
8 changes: 5 additions & 3 deletions src/com/maxprograms/converters/msoffice/MSOffice2Xliff.java
Original file line number Diff line number Diff line change
Expand Up @@ -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<XMLNode> newContent = new ArrayList<>();
for (int i = 1; i < content.size() - 1; i++) {
newContent.add(content.get(i));
}
source.setContent(newContent);
}
}

Expand Down
1 change: 0 additions & 1 deletion src/com/maxprograms/converters/office/Office2Xliff.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ public static List<String> run(Map<String, String> params) {
String catalog = params.get("catalog");

try {

Document merged = new Document(null, "xliff", null, null);
mergedRoot = merged.getRootElement();
mergedRoot.setAttribute("version", "1.2");
Expand Down

0 comments on commit fcbc5d3

Please sign in to comment.