summaryrefslogtreecommitdiff
path: root/reportbuilder
diff options
context:
space:
mode:
authormst <mst@openoffice.org>2011-09-17 22:41:49 +0000
committerThorsten Behrens <tbehrens@suse.com>2011-11-29 17:57:30 +0100
commite2ba9814858156af6a2b39f885b3a6387ca29da2 (patch)
treed23088225d9aaa9229301086e2e390ec539aa631 /reportbuilder
parent1b056c65f6d612a00eefe8824c854e4577e4f4be (diff)
fs34c: check if description can be read and return ccorrect name for shapetype
* found as LGPLv3-only fix at svn rev 1172124 (http://svn.apache.org/viewvc?view=revision&revision=1172124)
Diffstat (limited to 'reportbuilder')
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java16
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java18
2 files changed, 31 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..ec4c101d06e1 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,14 @@ 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()