User: kz Date: 2008-03-05 17:35:35+0000 Modified: dba/reportdesign/java/com/sun/star/report/pentaho/output/StyleUtilities.java
Log: INTEGRATION: CWS rptchart01_DEV300 (1.3.62); FILE MERGED 2008/02/21 09:57:24 oj 1.3.62.3: #i85225# fixes found with PMD 2008/02/19 09:22:19 oj 1.3.62.2: RESYNC: (1.3-1.4); FILE MERGED 2008/02/13 07:04:22 oj 1.3.62.1: #i85225# impl chart readhandler and oleproducer File Changes: Directory: /dba/reportdesign/java/com/sun/star/report/pentaho/output/ ===================================================================== File [changed]: StyleUtilities.java Url: http://dba.openoffice.org/source/browse/dba/reportdesign/java/com/sun/star/report/pentaho/output/StyleUtilities.java?r1=1.4&r2=1.5 Delta lines: +5 -23 -------------------- --- StyleUtilities.java 2008-02-12 13:10:27+0000 1.4 +++ StyleUtilities.java 2008-03-05 17:35:33+0000 1.5 @@ -48,7 +48,6 @@ import com.sun.star.report.pentaho.model.OfficeStylesCollection; import org.jfree.report.ReportProcessingException; import org.jfree.report.structure.Element; -import org.jfree.report.structure.Node; import org.jfree.report.util.AttributeNameGenerator; import org.jfree.util.Log; @@ -60,6 +59,7 @@ */ public class StyleUtilities { + private static final String STYLE = "style"; private StyleUtilities() { @@ -156,7 +156,7 @@ // messed up the fileformat. Lets create a new empty style for this. final OfficeStyle autostyle = new OfficeStyle(); autostyle.setNamespace(OfficeNamespaces.STYLE_NS); - autostyle.setType("style"); + autostyle.setType(STYLE); autostyle.setStyleFamily(styleFamily); autostyle.setStyleName(styleName); @@ -305,24 +305,6 @@ if (autoDataStyle != null) { final DataStyle derivedStyle = (DataStyle) autoDataStyle.clone(); - Node[] nodes = autoDataStyle.getNodeArray(); - for (int i = 0; i < nodes.length; i++) { - Node node = nodes[i]; - if (node instanceof DataStyle) { - DataStyle element = (DataStyle) node; - final Object apply = element.getAttribute(OfficeNamespaces.STYLE_NS, "apply-style-name"); - if (apply != null) { - final String applyStyleName = String.valueOf(apply); - if (!stylesCollection.getAutomaticStyles().containsDataStyle(applyStyleName)) { - final DataStyle autoApplyDataStyle = automaticStyles.getDataStyle(applyStyleName); - if (autoApplyDataStyle != null) { - stylesCollection.getAutomaticStyles().addDataStyle((DataStyle) autoApplyDataStyle.clone()); - } - } - break; - } - } - } stylesCollection.getAutomaticStyles().addDataStyle(derivedStyle); return; } @@ -455,7 +437,7 @@ // No such style. Create a new one .. final OfficeStyle autostyle = new OfficeStyle(); autostyle.setNamespace(OfficeNamespaces.STYLE_NS); - autostyle.setType("style"); + autostyle.setType(STYLE); autostyle.setStyleFamily(styleFamily); if (styleName != null) { @@ -481,7 +463,7 @@ { final OfficeStyle autostyle = new OfficeStyle(); autostyle.setNamespace(OfficeNamespaces.STYLE_NS); - autostyle.setType("style"); + autostyle.setType(STYLE); autostyle.setStyleFamily(styleFamily); autostyle.setStyleName(nameGenerator.generateName("derived_" + styleName)); autostyle.setStyleParent(styleName); @@ -509,7 +491,7 @@ { final OfficeStyle autostyle = (OfficeStyle) commonStyle.clone(); autostyle.setNamespace(OfficeNamespaces.STYLE_NS); - autostyle.setType("style"); + autostyle.setType(STYLE); autostyle.setStyleFamily(styleFamily); autostyle.setStyleName (nameGenerator.generateName("derived_auto_" + styleName)); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
