Bugzilla – Attachment 78432 Details for
Bug 58371
REPORTBUILDER: abort (unexpected exception thrown) in dbgutil builds when opening report of attachment fdo#48056
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
paper over the problem patch
0001-work-around-fdo-58371.patch (text/plain), 7.27 KB, created by
Lionel Elie Mamane
on 2013-04-24 17:23:09 UTC
(
hide
)
Description:
paper over the problem patch
Filename:
MIME Type:
Creator:
Lionel Elie Mamane
Created:
2013-04-24 17:23:09 UTC
Size:
7.27 KB
patch
obsolete
>From 087f231860e347ac5b56db145162dd55c17dd654 Mon Sep 17 00:00:00 2001 >From: Lionel Elie Mamane <lionel@mamane.lu> >Date: Wed, 24 Apr 2013 19:19:51 +0200 >Subject: [PATCH] work around fdo#58371 > >Change-Id: I4c7b3bcd9f380531a41b0ebf9bd6e158e2042f33 >--- > reportdesign/source/core/api/Shape.cxx | 57 ++++++++++++++++++++++---------- > reportdesign/source/core/inc/Shape.hxx | 2 ++ > 2 files changed, 41 insertions(+), 18 deletions(-) > >diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx >index d57fb95..054433d 100644 >--- a/reportdesign/source/core/api/Shape.cxx >+++ b/reportdesign/source/core/api/Shape.cxx >@@ -22,6 +22,7 @@ > #include <com/sun/star/beans/PropertyAttribute.hpp> > #include <com/sun/star/beans/XPropertyState.hpp> > #include <com/sun/star/text/ParagraphVertAlign.hpp> >+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp> > #include <comphelper/property.hxx> > #include <comphelper/sequence.hxx> > #include <tools/debug.hxx> >@@ -412,6 +413,18 @@ void SAL_CALL OShape::setSize( const awt::Size& aSize ) throw (beans::PropertyVe > // ----------------------------------------------------------------------------- > > // XShapeDescriptor >+// ----------------------------------------------------------------------------- >+template< typename T, const comphelper::string::ConstAsciiString &propertyName > T OShape::impl_getComponentProperty(T &m) >+{ >+ ::osl::MutexGuard aGuard(m_aMutex); >+ >+ if ( m_aProps.aComponent.m_xProperty->getPropertySetInfo()->hasPropertyByName( propertyName ) ) >+ m_aProps.aComponent.m_xProperty->getPropertyValue( propertyName ) >>= m; >+ else >+ m = T(); >+ >+ return m; >+} > ::rtl::OUString SAL_CALL OShape::getShapeType( ) throw (uno::RuntimeException) > { > return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CustomShape")); >@@ -419,9 +432,7 @@ void SAL_CALL OShape::setSize( const awt::Size& aSize ) throw (beans::PropertyVe > // ----------------------------------------------------------------------------- > ::sal_Int32 SAL_CALL OShape::getZOrder() throw (uno::RuntimeException) > { >- ::osl::MutexGuard aGuard(m_aMutex); >- m_aProps.aComponent.m_xProperty->getPropertyValue(PROPERTY_ZORDER) >>= m_nZOrder; >- return m_nZOrder; >+ return impl_getComponentProperty<sal_Int32, PROPERTY_CUSTOMSHAPEENGINE>(m_nZOrder); > } > // ----------------------------------------------------------------------------- > void SAL_CALL OShape::setZOrder( ::sal_Int32 _zorder ) throw (uno::RuntimeException) >@@ -445,9 +456,7 @@ void SAL_CALL OShape::setOpaque( ::sal_Bool _opaque ) throw (::com::sun::star::u > // ----------------------------------------------------------------------------- > drawing::HomogenMatrix3 SAL_CALL OShape::getTransformation() throw (uno::RuntimeException) > { >- ::osl::MutexGuard aGuard(m_aMutex); >- m_aProps.aComponent.m_xProperty->getPropertyValue(PROPERTY_TRANSFORMATION) >>= m_Transformation; >- return m_Transformation; >+ return impl_getComponentProperty<drawing::HomogenMatrix3, PROPERTY_TRANSFORMATION>(m_Transformation); > } > // ----------------------------------------------------------------------------- > void SAL_CALL OShape::setTransformation( const drawing::HomogenMatrix3& _transformation ) throw (uno::RuntimeException) >@@ -458,23 +467,37 @@ void SAL_CALL OShape::setTransformation( const drawing::HomogenMatrix3& _transfo > // ----------------------------------------------------------------------------- > ::rtl::OUString SAL_CALL OShape::getCustomShapeEngine() throw (uno::RuntimeException) > { >- ::osl::MutexGuard aGuard(m_aMutex); >- m_aProps.aComponent.m_xProperty->getPropertyValue(PROPERTY_CUSTOMSHAPEENGINE) >>= m_CustomShapeEngine; >- >- return m_CustomShapeEngine; >+ return impl_getComponentProperty<OUString, PROPERTY_CUSTOMSHAPEENGINE>(m_CustomShapeEngine); > } > // ----------------------------------------------------------------------------- > void SAL_CALL OShape::setCustomShapeEngine( const ::rtl::OUString& _customshapeengine ) throw (uno::RuntimeException) > { >- m_aProps.aComponent.m_xProperty->setPropertyValue(PROPERTY_CUSTOMSHAPEENGINE,uno::makeAny(_customshapeengine)); >- set(PROPERTY_CUSTOMSHAPEENGINE,_customshapeengine,m_CustomShapeEngine); >+ if ( m_aProps.aComponent.m_xProperty->getPropertySetInfo()->hasPropertyByName(PROPERTY_CUSTOMSHAPEENGINE) ) >+ { >+ try >+ { >+ m_aProps.aComponent.m_xProperty->setPropertyValue(PROPERTY_CUSTOMSHAPEENGINE,uno::makeAny(_customshapeengine)); >+ set(PROPERTY_CUSTOMSHAPEENGINE,_customshapeengine,m_CustomShapeEngine); >+ } >+ catch(const beans::UnknownPropertyException &e) >+ { >+ OSL_FAIL("promised me CustomShapeEngine property but did not deliver"); >+ throw lang::WrappedTargetRuntimeException(OUString("No CustomShapeEngine property"), *this, makeAny(e)); >+ } >+ catch(const lang::WrappedTargetException &e) >+ { >+ throw lang::WrappedTargetRuntimeException(OUString(), *this, makeAny(e)); >+ } >+ } >+ else >+ { >+ throw uno::RuntimeException(OUString("No CustomShapeEngine property"), *this); >+ } > } > // ----------------------------------------------------------------------------- > ::rtl::OUString SAL_CALL OShape::getCustomShapeData() throw (uno::RuntimeException) > { >- ::osl::MutexGuard aGuard(m_aMutex); >- m_aProps.aComponent.m_xProperty->getPropertyValue(PROPERTY_CUSTOMSHAPEDATA) >>= m_CustomShapeData; >- return m_CustomShapeData; >+ return impl_getComponentProperty<OUString, PROPERTY_CUSTOMSHAPEDATA>(m_CustomShapeData); > } > // ----------------------------------------------------------------------------- > void SAL_CALL OShape::setCustomShapeData( const ::rtl::OUString& _customshapedata ) throw (uno::RuntimeException) >@@ -485,9 +508,7 @@ void SAL_CALL OShape::setCustomShapeData( const ::rtl::OUString& _customshapedat > // ----------------------------------------------------------------------------- > uno::Sequence< beans::PropertyValue > SAL_CALL OShape::getCustomShapeGeometry() throw (uno::RuntimeException) > { >- ::osl::MutexGuard aGuard(m_aMutex); >- m_aProps.aComponent.m_xProperty->getPropertyValue(PROPERTY_CUSTOMSHAPEGEOMETRY) >>= m_CustomShapeGeometry; >- return m_CustomShapeGeometry; >+ return impl_getComponentProperty<uno::Sequence< beans::PropertyValue >, PROPERTY_CUSTOMSHAPEGEOMETRY>(m_CustomShapeGeometry); > } > // ----------------------------------------------------------------------------- > void SAL_CALL OShape::setCustomShapeGeometry( const uno::Sequence< beans::PropertyValue >& _customshapegeometry ) throw (uno::RuntimeException) >diff --git a/reportdesign/source/core/inc/Shape.hxx b/reportdesign/source/core/inc/Shape.hxx >index 314c838..7d6e47b 100644 >--- a/reportdesign/source/core/inc/Shape.hxx >+++ b/reportdesign/source/core/inc/Shape.hxx >@@ -19,6 +19,7 @@ > #ifndef RPT_SHAPE_HXX > #define RPT_SHAPE_HXX > >+#include <comphelper/string.hxx> > #include <cppuhelper/propertysetmixin.hxx> > #include <com/sun/star/report/XShape.hpp> > #include "ReportControlModel.hxx" >@@ -74,6 +75,7 @@ namespace reportdesign > } > void checkIndex(sal_Int32 _nIndex); > cppu::IPropertyArrayHelper& getInfoHelper(); >+ template< typename T, const comphelper::string::ConstAsciiString &propertyName > T impl_getComponentProperty( T& ); > protected: > virtual ~OShape(); > public: >-- >1.7.10.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 58371
:
71592
|
71593
|
72748
| 78432 |
78830