incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r1172124 - in /incubator/ooo/trunk/main: reportbuilder/java/com/sun/star/report/pentaho/ reportdesign/source/core/api/
Date Sat, 17 Sep 2011 22:41:49 GMT
Author: mst
Date: Sat Sep 17 22:41:49 2011
New Revision: 1172124

URL: http://svn.apache.org/viewvc?rev=1172124&view=rev
Log:
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

Modified:
    incubator/ooo/trunk/main/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java
    incubator/ooo/trunk/main/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java
    incubator/ooo/trunk/main/reportdesign/source/core/api/FixedLine.cxx
    incubator/ooo/trunk/main/reportdesign/source/core/api/FixedText.cxx
    incubator/ooo/trunk/main/reportdesign/source/core/api/FormattedField.cxx
    incubator/ooo/trunk/main/reportdesign/source/core/api/ImageControl.cxx
    incubator/ooo/trunk/main/reportdesign/source/core/api/ReportDefinition.cxx
    incubator/ooo/trunk/main/reportdesign/source/core/api/Shape.cxx

Modified: incubator/ooo/trunk/main/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java?rev=1172124&r1=1172123&r2=1172124&view=diff
==============================================================================
--- incubator/ooo/trunk/main/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java
(original)
+++ incubator/ooo/trunk/main/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionCategory.java
Sat Sep 17 22:41:49 2011
@@ -69,6 +69,13 @@ public final class StarFunctionCategory 
         catch (MissingResourceException e)
         {
             locale = Locale.ENGLISH;
+            try
+            {
+                category.getDisplayName(locale);
+            }
+            catch (MissingResourceException e2)
+            {
+            }
         }
         this.defaultLocale = locale;
 
@@ -147,7 +154,15 @@ public final class StarFunctionCategory 
 
     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

Modified: incubator/ooo/trunk/main/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java?rev=1172124&r1=1172123&r2=1172124&view=diff
==============================================================================
--- incubator/ooo/trunk/main/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java
(original)
+++ incubator/ooo/trunk/main/reportbuilder/java/com/sun/star/report/pentaho/StarFunctionDescription.java
Sat Sep 17 22:41:49 2011
@@ -120,12 +120,26 @@ public final class StarFunctionDescripti
 
     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()

Modified: incubator/ooo/trunk/main/reportdesign/source/core/api/FixedLine.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/reportdesign/source/core/api/FixedLine.cxx?rev=1172124&r1=1172123&r2=1172124&view=diff
==============================================================================
--- incubator/ooo/trunk/main/reportdesign/source/core/api/FixedLine.cxx (original)
+++ incubator/ooo/trunk/main/reportdesign/source/core/api/FixedLine.cxx Sat Sep 17 22:41:49
2011
@@ -536,10 +536,7 @@ void SAL_CALL OFixedLine::setSize( const
 // 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)


Modified: incubator/ooo/trunk/main/reportdesign/source/core/api/FixedText.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/reportdesign/source/core/api/FixedText.cxx?rev=1172124&r1=1172123&r2=1172124&view=diff
==============================================================================
--- incubator/ooo/trunk/main/reportdesign/source/core/api/FixedText.cxx (original)
+++ incubator/ooo/trunk/main/reportdesign/source/core/api/FixedText.cxx Sat Sep 17 22:41:49
2011
@@ -334,10 +334,7 @@ void SAL_CALL OFixedText::setSize( const
 // 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"));
 }
 // -----------------------------------------------------------------------------
 // -----------------------------------------------------------------------------

Modified: incubator/ooo/trunk/main/reportdesign/source/core/api/FormattedField.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/reportdesign/source/core/api/FormattedField.cxx?rev=1172124&r1=1172123&r2=1172124&view=diff
==============================================================================
--- incubator/ooo/trunk/main/reportdesign/source/core/api/FormattedField.cxx (original)
+++ incubator/ooo/trunk/main/reportdesign/source/core/api/FormattedField.cxx Sat Sep 17 22:41:49
2011
@@ -376,10 +376,7 @@ void SAL_CALL OFormattedField::setSize( 
 // 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"));
 }
 // -----------------------------------------------------------------------------
 // =============================================================================

Modified: incubator/ooo/trunk/main/reportdesign/source/core/api/ImageControl.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/reportdesign/source/core/api/ImageControl.cxx?rev=1172124&r1=1172123&r2=1172124&view=diff
==============================================================================
--- incubator/ooo/trunk/main/reportdesign/source/core/api/ImageControl.cxx (original)
+++ incubator/ooo/trunk/main/reportdesign/source/core/api/ImageControl.cxx Sat Sep 17 22:41:49
2011
@@ -470,10 +470,7 @@ void SAL_CALL OImageControl::setSize( co
 // 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)

Modified: incubator/ooo/trunk/main/reportdesign/source/core/api/ReportDefinition.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/reportdesign/source/core/api/ReportDefinition.cxx?rev=1172124&r1=1172123&r2=1172124&view=diff
==============================================================================
--- incubator/ooo/trunk/main/reportdesign/source/core/api/ReportDefinition.cxx (original)
+++ incubator/ooo/trunk/main/reportdesign/source/core/api/ReportDefinition.cxx Sat Sep 17
22:41:49 2011
@@ -2501,11 +2501,7 @@ void SAL_CALL OReportDefinition::setSize
 // 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,

Modified: incubator/ooo/trunk/main/reportdesign/source/core/api/Shape.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/reportdesign/source/core/api/Shape.cxx?rev=1172124&r1=1172123&r2=1172124&view=diff
==============================================================================
--- incubator/ooo/trunk/main/reportdesign/source/core/api/Shape.cxx (original)
+++ incubator/ooo/trunk/main/reportdesign/source/core/api/Shape.cxx Sat Sep 17 22:41:49 2011
@@ -430,10 +430,7 @@ void SAL_CALL OShape::setSize( const awt
 // 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)



Mime
View raw message