diff options
author | Noel Grandin <noel@peralex.com> | 2014-12-08 14:38:16 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-12-09 12:55:37 +0200 |
commit | 13b6c147e5a07439fb52044e4dfd4e58af858ec9 (patch) | |
tree | d5de1fbbd433173d282b81f4cf682d1bc240691e /chart2/source/inc | |
parent | 3380e2acdfbb1e83f718369f5a2c5e4a63bc406d (diff) |
inline UNO helper macro APPHELPER_SERVICE_FACTORY_HELPER
Change-Id: Ib416efb59ae166bb8d55dd7f3c84b7e5f72864e8
Diffstat (limited to 'chart2/source/inc')
-rw-r--r-- | chart2/source/inc/CachedDataSequence.hxx | 6 | ||||
-rw-r--r-- | chart2/source/inc/ConfigColorScheme.hxx | 6 | ||||
-rw-r--r-- | chart2/source/inc/DataSource.hxx | 6 | ||||
-rw-r--r-- | chart2/source/inc/ErrorBar.hxx | 6 | ||||
-rw-r--r-- | chart2/source/inc/InternalDataProvider.hxx | 6 | ||||
-rw-r--r-- | chart2/source/inc/LabeledDataSequence.hxx | 6 | ||||
-rw-r--r-- | chart2/source/inc/Scaling.hxx | 24 | ||||
-rw-r--r-- | chart2/source/inc/ServiceMacros.hxx | 13 |
8 files changed, 50 insertions, 23 deletions
diff --git a/chart2/source/inc/CachedDataSequence.hxx b/chart2/source/inc/CachedDataSequence.hxx index 243eea5d12bc..3a98acd17a54 100644 --- a/chart2/source/inc/CachedDataSequence.hxx +++ b/chart2/source/inc/CachedDataSequence.hxx @@ -85,7 +85,11 @@ public: virtual ~CachedDataSequence(); /// establish methods for factory instatiation - APPHELPER_SERVICE_FACTORY_HELPER( CachedDataSequence ) + static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext) + throw(css::uno::Exception) + { + return (::cppu::OWeakObject *)new CachedDataSequence( xContext ); + } /// declare XServiceInfo methods APPHELPER_XSERVICEINFO_DECL() diff --git a/chart2/source/inc/ConfigColorScheme.hxx b/chart2/source/inc/ConfigColorScheme.hxx index 1a737428ff9e..b70b8244f7fb 100644 --- a/chart2/source/inc/ConfigColorScheme.hxx +++ b/chart2/source/inc/ConfigColorScheme.hxx @@ -55,7 +55,11 @@ public: SAL_DLLPRIVATE virtual ~ConfigColorScheme(); /// establish methods for factory instatiation - APPHELPER_SERVICE_FACTORY_HELPER( ConfigColorScheme ) + static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext) + throw(css::uno::Exception) + { + return (::cppu::OWeakObject *)new ConfigColorScheme( xContext ); + } /// declare XServiceInfo methods APPHELPER_XSERVICEINFO_DECL() diff --git a/chart2/source/inc/DataSource.hxx b/chart2/source/inc/DataSource.hxx index 84d2c3781e74..539fedad96a4 100644 --- a/chart2/source/inc/DataSource.hxx +++ b/chart2/source/inc/DataSource.hxx @@ -48,7 +48,11 @@ public: virtual ~DataSource(); /// establish methods for factory instatiation - APPHELPER_SERVICE_FACTORY_HELPER( DataSource ) + static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext) + throw(css::uno::Exception) + { + return (::cppu::OWeakObject *)new DataSource( xContext ); + } /// declare XServiceInfo methods APPHELPER_XSERVICEINFO_DECL() diff --git a/chart2/source/inc/ErrorBar.hxx b/chart2/source/inc/ErrorBar.hxx index 55f57acee3a7..2dace4f88ea6 100644 --- a/chart2/source/inc/ErrorBar.hxx +++ b/chart2/source/inc/ErrorBar.hxx @@ -82,7 +82,11 @@ public: /// XServiceInfo declarations APPHELPER_XSERVICEINFO_DECL() /// establish methods for factory instatiation - APPHELPER_SERVICE_FACTORY_HELPER( ErrorBar ) + static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext) + throw(css::uno::Exception) + { + return (::cppu::OWeakObject *)new ErrorBar( xContext ); + } // XPropertySet diff --git a/chart2/source/inc/InternalDataProvider.hxx b/chart2/source/inc/InternalDataProvider.hxx index 459ffb8adb85..045e948adc06 100644 --- a/chart2/source/inc/InternalDataProvider.hxx +++ b/chart2/source/inc/InternalDataProvider.hxx @@ -84,7 +84,11 @@ public: /// declare XServiceInfo methods APPHELPER_XSERVICEINFO_DECL() - APPHELPER_SERVICE_FACTORY_HELPER(InternalDataProvider) + static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext) + throw(css::uno::Exception) + { + return (::cppu::OWeakObject *)new InternalDataProvider( xContext ); + } // ____ XInternalDataProvider ____ virtual sal_Bool SAL_CALL hasDataByRangeRepresentation( const OUString& aRange ) diff --git a/chart2/source/inc/LabeledDataSequence.hxx b/chart2/source/inc/LabeledDataSequence.hxx index c3166e69219d..78688028e393 100644 --- a/chart2/source/inc/LabeledDataSequence.hxx +++ b/chart2/source/inc/LabeledDataSequence.hxx @@ -60,7 +60,11 @@ public: virtual ~LabeledDataSequence(); /// establish methods for factory instatiation - APPHELPER_SERVICE_FACTORY_HELPER( LabeledDataSequence ) + static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext) + throw(css::uno::Exception) + { + return (::cppu::OWeakObject *)new LabeledDataSequence( xContext ); + } /// declare XServiceInfo methods APPHELPER_XSERVICEINFO_DECL() diff --git a/chart2/source/inc/Scaling.hxx b/chart2/source/inc/Scaling.hxx index f978b57bf002..fd968092c55b 100644 --- a/chart2/source/inc/Scaling.hxx +++ b/chart2/source/inc/Scaling.hxx @@ -47,7 +47,11 @@ public: virtual ~LogarithmicScaling(); /// establish methods for factory instatiation - APPHELPER_SERVICE_FACTORY_HELPER( LogarithmicScaling ) + static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext) + throw(css::uno::Exception) + { + return (::cppu::OWeakObject *)new LogarithmicScaling( xContext ); + } /// declare XServiceInfo methods APPHELPER_XSERVICEINFO_DECL() @@ -86,7 +90,11 @@ public: virtual ~ExponentialScaling(); /// establish methods for factory instatiation - APPHELPER_SERVICE_FACTORY_HELPER( ExponentialScaling ) + static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext) + throw(css::uno::Exception) + { + return (::cppu::OWeakObject *)new ExponentialScaling( xContext ); + } /// declare XServiceInfo methods APPHELPER_XSERVICEINFO_DECL() @@ -125,7 +133,11 @@ public: virtual ~LinearScaling(); /// establish methods for factory instatiation - APPHELPER_SERVICE_FACTORY_HELPER( LinearScaling ) + static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext) + throw(css::uno::Exception) + { + return (::cppu::OWeakObject *)new LinearScaling( xContext ); + } /// declare XServiceInfo methods APPHELPER_XSERVICEINFO_DECL() @@ -163,7 +175,11 @@ public: virtual ~PowerScaling(); /// establish methods for factory instatiation - APPHELPER_SERVICE_FACTORY_HELPER( PowerScaling ) + static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext) + throw(css::uno::Exception) + { + return (::cppu::OWeakObject *)new PowerScaling( xContext ); + } /// declare XServiceInfo methods APPHELPER_XSERVICEINFO_DECL() diff --git a/chart2/source/inc/ServiceMacros.hxx b/chart2/source/inc/ServiceMacros.hxx index 7097eb66d7be..2fe5f9658272 100644 --- a/chart2/source/inc/ServiceMacros.hxx +++ b/chart2/source/inc/ServiceMacros.hxx @@ -71,19 +71,6 @@ css::uno::Sequence< OUString > SAL_CALL Class::getSupportedServiceNames() \ return getSupportedServiceNames_Static(); \ } -// Service factory helper decl+impl - -//to use this macro you need to provide a constructor: -//class( Reference< XComponentContext > const & xContext ) -//and implement OWeakObject - -#define APPHELPER_SERVICE_FACTORY_HELPER(Class) \ -static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext) \ - throw(css::uno::Exception) \ -{ \ - return (::cppu::OWeakObject *)new Class( xContext ); \ -} - }//end namespace apphelper #endif |