[Libreoffice-commits] core.git: Branch 'libreoffice-3-6' - reportdesign/source
Lionel Elie Mamane
lionel at mamane.lu
Thu May 16 00:45:25 PDT 2013
reportdesign/source/core/api/FixedLine.cxx | 5 ++++-
reportdesign/source/core/api/FixedText.cxx | 5 ++++-
reportdesign/source/core/api/FormattedField.cxx | 3 +++
reportdesign/source/core/api/ImageControl.cxx | 5 ++++-
reportdesign/source/core/api/ReportDefinition.cxx | 4 ++++
reportdesign/source/core/api/Shape.cxx | 5 ++++-
6 files changed, 23 insertions(+), 4 deletions(-)
New commits:
commit 777661cedbccf69876794eb7152367401d25d4ed
Author: Lionel Elie Mamane <lionel at mamane.lu>
Date: Fri May 3 17:47:24 2013 +0200
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
Reviewed-on: https://gerrit.libreoffice.org/3769
Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
Tested-by: Miklos Vajna <vmiklos at suse.cz>
diff --git a/reportdesign/source/core/api/FixedLine.cxx b/reportdesign/source/core/api/FixedLine.cxx
index dee328a..9c52a5f 100644
--- a/reportdesign/source/core/api/FixedLine.cxx
+++ b/reportdesign/source/core/api/FixedLine.cxx
@@ -531,7 +531,10 @@ void SAL_CALL OFixedLine::setSize( const awt::Size& aSize ) throw (beans::Proper
// XShapeDescriptor
::rtl::OUString SAL_CALL OFixedLine::getShapeType( ) throw (uno::RuntimeException)
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("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 ::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 aff7ff7..02336fd 100644
--- a/reportdesign/source/core/api/FixedText.cxx
+++ b/reportdesign/source/core/api/FixedText.cxx
@@ -330,7 +330,10 @@ void SAL_CALL OFixedText::setSize( const awt::Size& aSize ) throw (beans::Proper
// XShapeDescriptor
::rtl::OUString SAL_CALL OFixedText::getShapeType( ) throw (uno::RuntimeException)
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("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 ::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 95a2243..979fd2a 100644
--- a/reportdesign/source/core/api/FormattedField.cxx
+++ b/reportdesign/source/core/api/FormattedField.cxx
@@ -373,6 +373,9 @@ 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(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 71d2a22..6d0c375 100644
--- a/reportdesign/source/core/api/ImageControl.cxx
+++ b/reportdesign/source/core/api/ImageControl.cxx
@@ -467,7 +467,10 @@ void SAL_CALL OImageControl::setSize( const awt::Size& aSize ) throw (beans::Pro
// XShapeDescriptor
::rtl::OUString SAL_CALL OImageControl::getShapeType( ) throw (uno::RuntimeException)
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("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 ::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 c5189dc..4da53df 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -2445,6 +2445,10 @@ 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(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.OLE2Shape"));
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx
index 2685b12..0d35bd1 100644
--- a/reportdesign/source/core/api/Shape.cxx
+++ b/reportdesign/source/core/api/Shape.cxx
@@ -423,7 +423,10 @@ void SAL_CALL OShape::setSize( const awt::Size& aSize ) throw (beans::PropertyVe
// XShapeDescriptor
::rtl::OUString SAL_CALL OShape::getShapeType( ) throw (uno::RuntimeException)
{
- return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("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 rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.CustomShape"));
}
// -----------------------------------------------------------------------------
::sal_Int32 SAL_CALL OShape::getZOrder() throw (uno::RuntimeException)
More information about the Libreoffice-commits
mailing list