summaryrefslogtreecommitdiff
path: root/reportdesign
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-11-09 03:45:33 +0100
committerLionel Elie Mamane <lionel@mamane.lu>2013-11-09 06:35:19 +0100
commit1812d606b7c9c16d4123fc8b911fe3f790a31b2b (patch)
tree1863048c6d8aed4152160b7cdd478ae18ee309fa /reportdesign
parente9fdc84698a19e0ff2be9d676c84cc214cbc4f3d (diff)
rptui::OShape make getSupportedServiceNames and supportsService
at the cost of inconsistency between getSupportedServiceNames and getSupportedServiceNames_Static Change-Id: I940b23c35a6c4080eb6575adff1de0b08cdb3698
Diffstat (limited to 'reportdesign')
-rw-r--r--reportdesign/source/core/api/Shape.cxx27
1 files changed, 19 insertions, 8 deletions
diff --git a/reportdesign/source/core/api/Shape.cxx b/reportdesign/source/core/api/Shape.cxx
index d22ed658bad5..9b3a436ab920 100644
--- a/reportdesign/source/core/api/Shape.cxx
+++ b/reportdesign/source/core/api/Shape.cxx
@@ -117,6 +117,12 @@ void SAL_CALL OShape::dispose() throw(uno::RuntimeException)
ShapePropertySet::dispose();
cppu::WeakComponentImplHelperBase::dispose();
}
+//------------------------------------------------------------------------------
+uno::Reference< uno::XInterface > OShape::create(uno::Reference< uno::XComponentContext > const & xContext)
+{
+ return *(new OShape(xContext));
+}
+
// -----------------------------------------------------------------------------
OUString OShape::getImplementationName_Static( ) throw(uno::RuntimeException)
{
@@ -136,22 +142,27 @@ uno::Sequence< OUString > OShape::getSupportedServiceNames_Static( ) throw(uno:
return aServices;
}
-//------------------------------------------------------------------------------
-uno::Reference< uno::XInterface > OShape::create(uno::Reference< uno::XComponentContext > const & xContext)
-{
- return *(new OShape(xContext));
-}
-
//--------------------------------------------------------------------------
uno::Sequence< OUString > SAL_CALL OShape::getSupportedServiceNames( ) throw(uno::RuntimeException)
{
- return getSupportedServiceNames_Static();
+ if(m_sServiceName.isEmpty())
+ {
+ return getSupportedServiceNames_Static();
+ }
+ else
+ {
+ uno::Sequence< OUString > aServices(2);
+ aServices.getArray()[0] = SERVICE_SHAPE;
+ aServices.getArray()[1] = m_sServiceName;
+
+ return aServices;
+ }
}
//------------------------------------------------------------------------------
sal_Bool SAL_CALL OShape::supportsService(const OUString& ServiceName) throw( uno::RuntimeException )
{
- return m_sServiceName == ServiceName || cppu::supportsService(this, ServiceName);
+ return cppu::supportsService(this, ServiceName);
}
// -----------------------------------------------------------------------------
// XReportComponent