diff options
author | Michael Stahl <mst@apache.org> | 2011-09-17 21:41:49 +0000 |
---|---|---|
committer | Michael Stahl <mst@apache.org> | 2011-09-17 21:41:49 +0000 |
commit | efdf35dcf991532f5ca70e89cd9716296beb7258 (patch) | |
tree | e4427466375c2de511f2cdee7f55a1254fa08276 /reportbuilder | |
parent | 0e146fc26f44e44bcbc427016c47e4e23605a391 (diff) |
fs34c: check if description can be read and return ccorrect name for shapetype
# HG changeset patch
# User Ocke Janssen [oj] <Ocke.Janssen@oracle.com>
# Date 1301915955 -7200
# Node ID 7ca68dbff4eb90f462d9df381a7549fc996de714
# Parent 378c6468385944b3807ebca646aaeba95a9a7896
Diffstat (limited to 'reportbuilder')
-rw-r--r-- | reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java | 17 | ||||
-rw-r--r-- | reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java | 18 |
2 files changed, 32 insertions, 3 deletions
diff --git a/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java b/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java index 7825a2b34c4a..e6148ca8695e 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java @@ -69,6 +69,13 @@ public final class StarFunctionCategory extends WeakBase catch (MissingResourceException e) { locale = Locale.ENGLISH; + try + { + category.getDisplayName(locale); + } + catch (MissingResourceException e2) + { + } } this.defaultLocale = locale; @@ -147,7 +154,15 @@ public final class StarFunctionCategory extends WeakBase public String getName() { - return category.getDisplayName(defaultLocale); + try + { + return category.getDisplayName(defaultLocale); + } + catch(Exception ex) + { + + } + return "Missing category for number " + m_Number; } public com.sun.star.report.meta.XFunctionDescription getFunction(int position) throws com.sun.star.lang.IndexOutOfBoundsException, com.sun.star.lang.WrappedTargetException diff --git a/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java b/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java index f0debc672118..cd05de5766d2 100644 --- a/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java +++ b/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java @@ -120,12 +120,26 @@ public final class StarFunctionDescription extends WeakBase public String getName() { - return functionDescription.getDisplayName(defaultLocale); + try + { + return functionDescription.getDisplayName(defaultLocale); + } + catch (Exception ex) + { + } + return "Missing function name for " + this.getClass().getName(); } public String getDescription() { - return functionDescription.getDescription(defaultLocale); + try + { + return functionDescription.getDescription(defaultLocale); + } + catch (Exception ex) + { + } + return "Missing function description for " + this.getClass().getName(); } public String getSignature() |