summaryrefslogtreecommitdiff
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
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)
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java16
-rw-r--r--reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java18
-rw-r--r--reportdesign/source/core/api/FixedLine.cxx5
-rw-r--r--reportdesign/source/core/api/FixedText.cxx5
-rw-r--r--reportdesign/source/core/api/FormattedField.cxx5
-rw-r--r--reportdesign/source/core/api/ImageControl.cxx5
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx6
-rw-r--r--reportdesign/source/core/api/Shape.cxx5
8 files changed, 37 insertions, 28 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()
diff --git a/reportdesign/source/core/api/FixedLine.cxx b/reportdesign/source/core/api/FixedLine.cxx
index 6db745085f61..f1d6798e7e15 100644
--- a/reportdesign/source/core/api/FixedLine.cxx
+++ b/reportdesign/source/core/api/FixedLine.cxx
@@ -532,10 +532,7 @@ void SAL_CALL OFixedLine::setSize( const awt::Size& aSize ) throw (beans::Proper
// XShapeDescriptor
::rtl::OUString SAL_CALL OFixedLine::getShapeType( ) throw (uno::RuntimeException)
{
- ::osl::MutexGuard aGuard(m_aMutex);
- if ( m_aProps.aComponent.m_xShape.is() )
- return m_aProps.aComponent.m_xShape->getShapeType();
- return ::rtl::OUString();
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape"));
}
// -----------------------------------------------------------------------------
::rtl::OUString SAL_CALL OFixedLine::getHyperLinkURL() throw (uno::RuntimeException, beans::UnknownPropertyException)
diff --git a/reportdesign/source/core/api/FixedText.cxx b/reportdesign/source/core/api/FixedText.cxx
index 7225803034d5..8327c5e5d688 100644
--- a/reportdesign/source/core/api/FixedText.cxx
+++ b/reportdesign/source/core/api/FixedText.cxx
@@ -329,10 +329,7 @@ void SAL_CALL OFixedText::setSize( const awt::Size& aSize ) throw (beans::Proper
// XShapeDescriptor
::rtl::OUString SAL_CALL OFixedText::getShapeType( ) throw (uno::RuntimeException)
{
- ::osl::MutexGuard aGuard(m_aMutex);
- if ( m_aProps.aComponent.m_xShape.is() )
- return m_aProps.aComponent.m_xShape->getShapeType();
- return ::rtl::OUString();
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape"));
}
// -----------------------------------------------------------------------------
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/core/api/FormattedField.cxx b/reportdesign/source/core/api/FormattedField.cxx
index 237822575de6..d9b9c98a472f 100644
--- a/reportdesign/source/core/api/FormattedField.cxx
+++ b/reportdesign/source/core/api/FormattedField.cxx
@@ -372,10 +372,7 @@ void SAL_CALL OFormattedField::setSize( const awt::Size& aSize ) throw (beans::P
// XShapeDescriptor
::rtl::OUString SAL_CALL OFormattedField::getShapeType( ) throw (uno::RuntimeException)
{
- ::osl::MutexGuard aGuard(m_aMutex);
- if ( m_aProps.aComponent.m_xShape.is() )
- return m_aProps.aComponent.m_xShape->getShapeType();
- return ::rtl::OUString();
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape"));
}
// -----------------------------------------------------------------------------
// =============================================================================
diff --git a/reportdesign/source/core/api/ImageControl.cxx b/reportdesign/source/core/api/ImageControl.cxx
index f1b18970bd22..6b9bf51b6190 100644
--- a/reportdesign/source/core/api/ImageControl.cxx
+++ b/reportdesign/source/core/api/ImageControl.cxx
@@ -466,10 +466,7 @@ void SAL_CALL OImageControl::setSize( const awt::Size& aSize ) throw (beans::Pro
// XShapeDescriptor
::rtl::OUString SAL_CALL OImageControl::getShapeType( ) throw (uno::RuntimeException)
{
- ::osl::MutexGuard aGuard(m_aMutex);
- if ( m_aProps.aComponent.m_xShape.is() )
- return m_aProps.aComponent.m_xShape->getShapeType();
- return ::rtl::OUString();
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.ControlShape"));
}
// -----------------------------------------------------------------------------
::sal_Int16 SAL_CALL OImageControl::getScaleMode() throw (uno::RuntimeException)
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index c01bab77ecb4..536efe304d84 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -2453,11 +2453,7 @@ void SAL_CALL OReportDefinition::setSize( const awt::Size& aSize ) throw (beans:
// XShapeDescriptor
::rtl::OUString SAL_CALL OReportDefinition::getShapeType( ) throw (uno::RuntimeException)
{
- ::osl::MutexGuard aGuard(m_aMutex);
- ::connectivity::checkDisposed(ReportDefinitionBase::rBHelper.bDisposed);
- if ( m_aProps->m_xShape.is() )
- return m_aProps->m_xShape->getShapeType();
- return ::rtl::OUString();
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape"));
}
// -----------------------------------------------------------------------------
typedef ::cppu::WeakImplHelper2< container::XNameContainer,
diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx
index 2fa28cd0f81d..04742bb88ad8 100644
--- a/reportdesign/source/core/api/Shape.cxx
+++ b/reportdesign/source/core/api/Shape.cxx
@@ -424,10 +424,7 @@ void SAL_CALL OShape::setSize( const awt::Size& aSize ) throw (beans::PropertyVe
// XShapeDescriptor
::rtl::OUString SAL_CALL OShape::getShapeType( ) throw (uno::RuntimeException)
{
- ::osl::MutexGuard aGuard(m_aMutex);
- if ( m_aProps.aComponent.m_xShape.is() )
- return m_aProps.aComponent.m_xShape->getShapeType();
- return ::rtl::OUString();
+ return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CustomShape"));
}
// -----------------------------------------------------------------------------
::sal_Int32 SAL_CALL OShape::getZOrder() throw (uno::RuntimeException)