1. mst
  2. ooo340

Commits

Ocke Janssen [oj]  committed 7ca68db

fs34c: check if description can be read and return ccorrect name for shapetype

  • Participants
  • Parent commits 378c646
  • Branches default

Comments (0)

Files changed (8)

File reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java

View file
  • Ignore whitespace
         catch (MissingResourceException e)
         {
             locale = Locale.ENGLISH;
+            try
+            {
+                category.getDisplayName(locale);
+            }
+            catch (MissingResourceException e2)
+            {
+            }
         }
         this.defaultLocale = locale;
 
 
     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

File reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java

View file
  • Ignore whitespace
 
     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()

File reportdesign/source/core/api/FixedLine.cxx

View file
  • Ignore whitespace
 // 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) 

File reportdesign/source/core/api/FixedText.cxx

View file
  • Ignore whitespace
 // 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"));
 }
 // -----------------------------------------------------------------------------
 // -----------------------------------------------------------------------------

File reportdesign/source/core/api/FormattedField.cxx

View file
  • Ignore whitespace
 // 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"));
 }
 // -----------------------------------------------------------------------------
 // =============================================================================

File reportdesign/source/core/api/ImageControl.cxx

View file
  • Ignore whitespace
 // 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)

File reportdesign/source/core/api/ReportDefinition.cxx

View file
  • Ignore whitespace
 // 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,

File reportdesign/source/core/api/Shape.cxx

View file
  • Ignore whitespace
 // 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)