w2x: Use zero body margin for the file containing the cover image in EPUB export

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@133 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2012-02-24 10:36:20 +00:00
parent cc68f96a2c
commit 90d1b47551
3 changed files with 10 additions and 1 deletions

View file

@ -2,6 +2,8 @@ Changelog for Writer2LaTeX version 1.0 -> 1.2
---------- version 1.1.9 ----------
[w2x] The file containing the cover image in EPUB export is now created with a body margin of zero
[w2l] The StarMath converter now leaves out the \text command if the argument is a plain number
[w2l] Properly detect and ignore empty formulas (avoiding any occurrences of $ $ in the document)

View file

@ -26,7 +26,6 @@
package writer2latex.latex;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import writer2latex.util.*;

View file

@ -242,6 +242,14 @@ public class DrawConverter extends ConverterHelper {
bCollectFullscreenFrames = false;
handleDrawElement(cover,currentNode,null,FULL_SCREEN);
bCollectFullscreenFrames = true;
// Add margin:0 to body
Element head = Misc.getChildByTagName(hnode.getOwnerDocument().getDocumentElement(),"head");
if (head!=null) {
Element style = converter.createElement("style");
head.appendChild(style);
style.setAttribute("type", "text/css");
style.appendChild(converter.createTextNode("body { margin:0 }"));
}
currentNode = getTextCv().doMaybeSplit(hnode, 0);
}
}