Three minor W2X bugfixes

git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@97 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
henrikjust 2011-03-09 21:22:29 +00:00
parent bf235469bb
commit 7df46da38c
5 changed files with 18 additions and 13 deletions

View file

@ -3,6 +3,12 @@ Changelog for Writer2LaTeX version 1.0 -> 1.2
---------- version 1.1.7 ---------- ---------- version 1.1.7 ----------
[w2x] Bugfix: Do not add space to empty labels (e.g. heading numbering)
[w2x] Export line breaks as spaces in annotations and EPUB table of content
[w2x] Bugfix: Do not export cell widths for tables with relative width
[w2x] Export suffix and prefix on footnotes and endnotes [w2x] Export suffix and prefix on footnotes and endnotes
[w2x] Export footnotes as endnotes (if text:footnotes-position="document"). A new option footnotes_heading is added: [w2x] Export footnotes as endnotes (if text:footnotes-position="document"). A new option footnotes_heading is added:

View file

@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA * MA 02111-1307 USA
* *
* Copyright: 2002-2010 by Henrik Just * Copyright: 2002-2011 by Henrik Just
* *
* All Rights Reserved. * All Rights Reserved.
* *
* Version 1.2 (2010-05-13) * Version 1.2 (2011-03-09)
* *
*/ */
@ -124,7 +124,7 @@ public class ListCounter {
// TODO: Lettersync // TODO: Lettersync
sLabel+=formatNumber(nCounter[nLevel],sNumFormat[nLevel],true); sLabel+=formatNumber(nCounter[nLevel],sNumFormat[nLevel],true);
if (sSuffix!=null) { sLabel+=sSuffix; } if (sSuffix!=null) { sLabel+=sSuffix; }
if (sSpace!=null) { sLabel+=sSpace; } if (sLabel.length()>0 && sSpace!=null) { sLabel+=sSpace; }
return sLabel; return sLabel;
} }
else if (style.isBullet(nLevel)) { else if (style.isBullet(nLevel)) {

View file

@ -20,7 +20,7 @@
* *
* All Rights Reserved. * All Rights Reserved.
* *
* Version 1.2 (2011-03-08) * Version 1.2 (2011-03-09)
* *
*/ */
@ -472,7 +472,7 @@ public class Converter extends ConverterBase {
if (sName.equals(XMLString.TEXT_S)) { if (sName.equals(XMLString.TEXT_S)) {
buf.append(" "); buf.append(" ");
} }
else if (sName.equals(XMLString.TEXT_TAB_STOP) || sName.equals(XMLString.TEXT_TAB)) { // text:tab in oasis else if (sName.equals(XMLString.TEXT_LINE_BREAK) || sName.equals(XMLString.TEXT_TAB_STOP) || sName.equals(XMLString.TEXT_TAB)) { // text:tab in oasis
buf.append(" "); buf.append(" ");
} }
else if (OfficeReader.isNoteElement(child)) { else if (OfficeReader.isNoteElement(child)) {

View file

@ -16,11 +16,11 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA * MA 02111-1307 USA
* *
* Copyright: 2002-2008 by Henrik Just * Copyright: 2002-2011 by Henrik Just
* *
* All Rights Reserved. * All Rights Reserved.
* *
* Version 1.0 (2008-12-15) * Version 1.2 (2011-03-09)
* *
*/ */
@ -285,7 +285,7 @@ public class TableConverter extends ConverterHelper {
String sValueType = ofr.isOpenDocument() ? String sValueType = ofr.isOpenDocument() ?
Misc.getAttribute(cell,XMLString.OFFICE_VALUE_TYPE) : Misc.getAttribute(cell,XMLString.OFFICE_VALUE_TYPE) :
Misc.getAttribute(cell,XMLString.TABLE_VALUE_TYPE); Misc.getAttribute(cell,XMLString.TABLE_VALUE_TYPE);
applyCellStyle(view.getCellStyleName(nRow,nCol), sTotalWidth, sValueType, td, subTable!=null); applyCellStyle(view.getCellStyleName(nRow,nCol), view.getRelTableWidth()!=null, sTotalWidth, sValueType, td, subTable!=null);
} }
else if (XMLString.TABLE_COVERED_TABLE_CELL.equals(cell.getNodeName())) { else if (XMLString.TABLE_COVERED_TABLE_CELL.equals(cell.getNodeName())) {
// covered table cells are not part of xhtml table model // covered table cells are not part of xhtml table model
@ -367,13 +367,13 @@ public class TableConverter extends ConverterHelper {
applyStyle(info,row); applyStyle(info,row);
} }
private void applyCellStyle(String sStyleName, String sTotalWidth, String sValueType, Element cell, boolean bIsSubTable) { private void applyCellStyle(String sStyleName, boolean bIsRelative, String sTotalWidth, String sValueType, Element cell, boolean bIsSubTable) {
StyleInfo info = new StyleInfo(); StyleInfo info = new StyleInfo();
getCellSc().applyStyle(sStyleName,info); getCellSc().applyStyle(sStyleName,info);
StyleWithProperties style = ofr.getCellStyle(sStyleName); StyleWithProperties style = ofr.getCellStyle(sStyleName);
if (style!=null) { if (style!=null) {
if (!config.xhtmlIgnoreTableDimensions()) { if (!config.xhtmlIgnoreTableDimensions() && !bIsRelative) {
String sEdge = "0"; String sEdge = "0";
// Set the cell width. This is calculated as // Set the cell width. This is calculated as

View file

@ -1,6 +1,5 @@
/************************************************************************ /************************************************************************
* *
* TextConverter.java
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -20,7 +19,7 @@
* *
* All Rights Reserved. * All Rights Reserved.
* *
* Version 1.2 (2011-03-08) * Version 1.2 (2011-03-09)
* *
*/ */
@ -691,7 +690,7 @@ public class TextConverter extends ConverterHelper {
// Add in external content. For single file output we include all level 1 headings + their target // Add in external content. For single file output we include all level 1 headings + their target
// Targets are added only when the toc level is deeper than the split level // Targets are added only when the toc level is deeper than the split level
if (nLevel<=nExternalTocDepth) { if (nLevel<=nExternalTocDepth) {
converter.addContentEntry(sLabel+(sLabel.length()>0 ? " " : "")+converter.getPlainInlineText(onode), nLevel, converter.addContentEntry(sLabel+converter.getPlainInlineText(onode), nLevel,
nLevel>nSplit ? sTarget : null); nLevel>nSplit ? sTarget : null);
} }