diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-05-03 17:47:24 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-05-03 19:17:47 +0200 |
commit | ed4c0da91205e95cc9c907add0f62d7cdce807d4 (patch) | |
tree | 41c6e3df06ed9d3e9ff3297dcefa32f7fe32c59d /reportdesign | |
parent | 49a52d7631b2f29678ac0b20384525da5ad23938 (diff) |
fdo#48056 revert part of return "correct name for shapetype"
Keep hardcoded values as *fallback* only, but trust m_aProps.aComponent.m_xShape->getShapeType when present.
Change-Id: I5a024a9bc5f87d226ab3c857817dfe91ad975acb
Diffstat (limited to 'reportdesign')
-rw-r--r-- | reportdesign/source/core/api/FixedLine.cxx | 5 | ||||
-rw-r--r-- | reportdesign/source/core/api/FixedText.cxx | 5 | ||||
-rw-r--r-- | reportdesign/source/core/api/FormattedField.cxx | 3 | ||||
-rw-r--r-- | reportdesign/source/core/api/ImageControl.cxx | 5 | ||||
-rw-r--r-- | reportdesign/source/core/api/ReportDefinition.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/core/api/Shape.cxx | 5 |
6 files changed, 23 insertions, 4 deletions
diff --git a/reportdesign/source/core/api/FixedLine.cxx b/reportdesign/source/core/api/FixedLine.cxx index 09a55b8f78a9..edfb3b84361f 100644 --- a/reportdesign/source/core/api/FixedLine.cxx +++ b/reportdesign/source/core/api/FixedLine.cxx @@ -526,7 +526,10 @@ void SAL_CALL OFixedLine::setSize( const awt::Size& aSize ) throw (beans::Proper // XShapeDescriptor OUString SAL_CALL OFixedLine::getShapeType( ) throw (uno::RuntimeException) { - return OUString("com.sun.star.drawing.ControlShape"); + ::osl::MutexGuard aGuard(m_aMutex); + if ( m_aProps.aComponent.m_xShape.is() ) + return m_aProps.aComponent.m_xShape->getShapeType(); + return OUString("com.sun.star.drawing.ControlShape"); } // ----------------------------------------------------------------------------- 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 02f038e15ad1..7ea6f56ee0d3 100644 --- a/reportdesign/source/core/api/FixedText.cxx +++ b/reportdesign/source/core/api/FixedText.cxx @@ -321,7 +321,10 @@ void SAL_CALL OFixedText::setSize( const awt::Size& aSize ) throw (beans::Proper // XShapeDescriptor OUString SAL_CALL OFixedText::getShapeType( ) throw (uno::RuntimeException) { - return OUString("com.sun.star.drawing.ControlShape"); + ::osl::MutexGuard aGuard(m_aMutex); + if ( m_aProps.aComponent.m_xShape.is() ) + return m_aProps.aComponent.m_xShape->getShapeType(); + return OUString("com.sun.star.drawing.ControlShape"); } // ----------------------------------------------------------------------------- // ----------------------------------------------------------------------------- diff --git a/reportdesign/source/core/api/FormattedField.cxx b/reportdesign/source/core/api/FormattedField.cxx index 0b2ba8cd8038..9aa5090f07f6 100644 --- a/reportdesign/source/core/api/FormattedField.cxx +++ b/reportdesign/source/core/api/FormattedField.cxx @@ -364,6 +364,9 @@ void SAL_CALL OFormattedField::setSize( const awt::Size& aSize ) throw (beans::P // XShapeDescriptor 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 OUString("com.sun.star.drawing.ControlShape"); } // ----------------------------------------------------------------------------- diff --git a/reportdesign/source/core/api/ImageControl.cxx b/reportdesign/source/core/api/ImageControl.cxx index 972b8d70bdf5..5971aeb0d216 100644 --- a/reportdesign/source/core/api/ImageControl.cxx +++ b/reportdesign/source/core/api/ImageControl.cxx @@ -458,7 +458,10 @@ void SAL_CALL OImageControl::setSize( const awt::Size& aSize ) throw (beans::Pro // XShapeDescriptor OUString SAL_CALL OImageControl::getShapeType( ) throw (uno::RuntimeException) { - return OUString("com.sun.star.drawing.ControlShape"); + ::osl::MutexGuard aGuard(m_aMutex); + if ( m_aProps.aComponent.m_xShape.is() ) + return m_aProps.aComponent.m_xShape->getShapeType(); + return OUString("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 72fe9a64f73a..85940c1605fc 100644 --- a/reportdesign/source/core/api/ReportDefinition.cxx +++ b/reportdesign/source/core/api/ReportDefinition.cxx @@ -2415,6 +2415,10 @@ void SAL_CALL OReportDefinition::setSize( const awt::Size& aSize ) throw (beans: // XShapeDescriptor 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 OUString("com.sun.star.drawing.OLE2Shape"); } // ----------------------------------------------------------------------------- diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx index f801c36493e3..262c623f2340 100644 --- a/reportdesign/source/core/api/Shape.cxx +++ b/reportdesign/source/core/api/Shape.cxx @@ -414,7 +414,10 @@ void SAL_CALL OShape::setSize( const awt::Size& aSize ) throw (beans::PropertyVe // XShapeDescriptor OUString SAL_CALL OShape::getShapeType( ) throw (uno::RuntimeException) { - return OUString("com.sun.star.drawing.CustomShape"); + ::osl::MutexGuard aGuard(m_aMutex); + if ( m_aProps.aComponent.m_xShape.is() ) + return m_aProps.aComponent.m_xShape->getShapeType(); + return OUString("com.sun.star.drawing.CustomShape"); } // ----------------------------------------------------------------------------- ::sal_Int32 SAL_CALL OShape::getZOrder() throw (uno::RuntimeException) |