diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2010-01-27 13:51:16 +0100 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2010-01-27 13:51:16 +0100 |
commit | 6163dce52f006f6f5a390eebd000caeaa1c70854 (patch) | |
tree | d789b8d74ace47cf1dbeecd505c268be107c6864 /reportbuilder/java/com/sun/star/report/pentaho/output/StyleUtilities.java | |
parent | CWS-TOOLING: integrate CWS vcl108 (diff) | |
parent | Automated merge with ssh://hg@hg.services.openoffice.org/cws/dba33b (diff) | |
download | core-6163dce52f006f6f5a390eebd000caeaa1c70854.tar.gz core-6163dce52f006f6f5a390eebd000caeaa1c70854.zip |
CWS-TOOLING: integrate CWS dba33d
Diffstat (limited to 'reportbuilder/java/com/sun/star/report/pentaho/output/StyleUtilities.java')
-rw-r--r-- | reportbuilder/java/com/sun/star/report/pentaho/output/StyleUtilities.java | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/output/StyleUtilities.java b/reportbuilder/java/com/sun/star/report/pentaho/output/StyleUtilities.java index 948e140f76ff..4bccca1e9612 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/output/StyleUtilities.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/output/StyleUtilities.java @@ -55,6 +55,7 @@ import org.apache.commons.logging.LogFactory; */ public class StyleUtilities { + private static final Log LOGGER = LogFactory.getLog(StyleUtilities.class); private static final String STYLE = "style"; @@ -117,8 +118,7 @@ public class StyleUtilities } inheritanceTracker.add(styleName); - if (stylesCollection.containsStyle(styleFamily, styleName) || - commonCollection.getCommonStyles().containsStyle(styleFamily, styleName)) + if (stylesCollection.containsStyle(styleFamily, styleName) || commonCollection.getCommonStyles().containsStyle(styleFamily, styleName)) { // fine, there's already a copy of the stylesheet. return; @@ -193,7 +193,8 @@ public class StyleUtilities LOGGER.warn("Inconsistent styles: " + styleFamily + ":" + styleParent + " does not exist."); } return preStyle; - } catch (CloneNotSupportedException e) + } + catch (CloneNotSupportedException e) { throw new ReportProcessingException("Failed to derive a stylesheet", e); } @@ -248,7 +249,8 @@ public class StyleUtilities currentFonts.addFontFace((FontFaceElement) element.clone()); } } - } catch (CloneNotSupportedException e) + } + catch (CloneNotSupportedException e) { throw new ReportProcessingException("Failed to clone font-face element"); } @@ -264,12 +266,13 @@ public class StyleUtilities { try { - final Section styleMap = (Section) derivedStyle.findFirstChild(OfficeNamespaces.STYLE_NS,"map"); + final Section styleMap = (Section) derivedStyle.findFirstChild(OfficeNamespaces.STYLE_NS, "map"); if (styleMap != null) { performDataStyleProcessing(styleMap, stylesCollection, predefCollection, "apply-style-name"); } - } catch (Exception e) + } + catch (Exception e) { } } @@ -286,8 +289,7 @@ public class StyleUtilities if (attribute != null) { final String styleName = String.valueOf(attribute); - if (!stylesCollection.getAutomaticStyles().containsDataStyle(styleName) && - !stylesCollection.getCommonStyles().containsDataStyle(styleName)) + if (!stylesCollection.getAutomaticStyles().containsDataStyle(styleName) && !stylesCollection.getCommonStyles().containsDataStyle(styleName)) { try { @@ -313,7 +315,8 @@ public class StyleUtilities derivedStyle = null; } } - } catch (CloneNotSupportedException e) + } + catch (CloneNotSupportedException e) { throw new ReportProcessingException("Failed to copy style. This should not have happened."); } @@ -508,7 +511,8 @@ public class StyleUtilities predefCollection); } return autostyle; - } catch (CloneNotSupportedException e) + } + catch (CloneNotSupportedException e) { throw new ReportProcessingException( "Deriving the style failed. Clone error: ", e); |