Bugfixing configuration UI
git-svn-id: svn://svn.code.sf.net/p/writer2latex/code/trunk@139 f0f2a975-2e09-46c8-9428-3b39399b9f3c
This commit is contained in:
parent
bf0c99a95c
commit
8140cf28f0
8 changed files with 41 additions and 24 deletions
|
@ -16,11 +16,11 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* Copyright: 2002-2010 by Henrik Just
|
||||
* Copyright: 2002-2012 by Henrik Just
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.2 (2010-05-05)
|
||||
* Version 1.2 (2012-03-07)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -64,7 +64,9 @@ public class ListStyleConverter extends StyleConverterHelper {
|
|||
else {
|
||||
String sDisplayName = style.getDisplayName();
|
||||
if (styleMap.contains(sDisplayName)) {
|
||||
info.sTagName = styleMap.getElement(sDisplayName);
|
||||
if (styleMap.getElement(sDisplayName).length()>0) {
|
||||
info.sTagName = styleMap.getElement(sDisplayName);
|
||||
}
|
||||
if (!"(none)".equals(styleMap.getCss(sDisplayName))) {
|
||||
info.sClass = styleMap.getCss(sDisplayName);
|
||||
}
|
||||
|
|
|
@ -16,11 +16,11 @@
|
|||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
||||
* MA 02111-1307 USA
|
||||
*
|
||||
* Copyright: 2002-2010 by Henrik Just
|
||||
* Copyright: 2002-2012 by Henrik Just
|
||||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.2 (2010-03-03)
|
||||
* Version 1.2 (2012-03-07)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -73,7 +73,9 @@ public abstract class StyleWithPropertiesConverterHelper
|
|||
String sDisplayName = style.getDisplayName();
|
||||
if (styleMap.contains(sDisplayName)) {
|
||||
// Apply attributes as specified in style map from user
|
||||
info.sTagName = styleMap.getElement(sDisplayName);
|
||||
if (styleMap.getElement(sDisplayName).length()>0) {
|
||||
info.sTagName = styleMap.getElement(sDisplayName);
|
||||
}
|
||||
if (!"(none)".equals(styleMap.getCss(sDisplayName))) {
|
||||
info.sClass = styleMap.getCss(sDisplayName);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
*
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Version 1.2 (2012-03-05)
|
||||
* Version 1.2 (2012-03-07)
|
||||
*
|
||||
*/
|
||||
|
||||
|
@ -2076,15 +2076,18 @@ public class TextConverter extends ConverterHelper {
|
|||
|
||||
/* apply hard formatting attribute style maps */
|
||||
private Element applyAttribute(Element node, String sAttr, boolean bApply) {
|
||||
if (!bApply) { return node; }
|
||||
XhtmlStyleMap xattr = config.getXAttrStyleMap();
|
||||
if (!xattr.contains(sAttr)) { return node; }
|
||||
Element attr = converter.createElement(xattr.getElement(sAttr));
|
||||
if (!"(none)".equals(xattr.getCss(sAttr))) {
|
||||
attr.setAttribute("class",xattr.getCss(sAttr));
|
||||
}
|
||||
node.appendChild(attr);
|
||||
return attr;
|
||||
if (bApply) {
|
||||
XhtmlStyleMap xattr = config.getXAttrStyleMap();
|
||||
if (xattr.contains(sAttr) && xattr.getElement(sAttr).length()>0) {
|
||||
Element attr = converter.createElement(xattr.getElement(sAttr));
|
||||
if (!"(none)".equals(xattr.getCss(sAttr))) {
|
||||
attr.setAttribute("class",xattr.getCss(sAttr));
|
||||
}
|
||||
node.appendChild(attr);
|
||||
return attr;
|
||||
}
|
||||
}
|
||||
return node;
|
||||
}
|
||||
|
||||
/* Create a styled paragraph node */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue