diff options
author | Noel Grandin <noel@peralex.com> | 2014-12-09 08:30:11 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-12-09 12:55:38 +0200 |
commit | c227d963d8ea84445ef9617d30ac24092d33b92f (patch) | |
tree | 51482b0291486f526876c297271c78bc1ea1b41e /chart2/source/inc | |
parent | 13b6c147e5a07439fb52044e4dfd4e58af858ec9 (diff) |
inline UNO helper macros
Change-Id: Ia401dd2f51108d2f3b08cd3d6d433a12ac17ee74
Diffstat (limited to 'chart2/source/inc')
-rw-r--r-- | chart2/source/inc/CachedDataSequence.hxx | 11 | ||||
-rw-r--r-- | chart2/source/inc/ConfigColorScheme.hxx | 11 | ||||
-rw-r--r-- | chart2/source/inc/DataSource.hxx | 11 | ||||
-rw-r--r-- | chart2/source/inc/ErrorBar.hxx | 12 | ||||
-rw-r--r-- | chart2/source/inc/ExplicitCategoriesProvider.hxx | 1 | ||||
-rw-r--r-- | chart2/source/inc/InternalDataProvider.hxx | 11 | ||||
-rw-r--r-- | chart2/source/inc/LabeledDataSequence.hxx | 12 | ||||
-rw-r--r-- | chart2/source/inc/Scaling.hxx | 42 | ||||
-rw-r--r-- | chart2/source/inc/ServiceMacros.hxx | 77 | ||||
-rw-r--r-- | chart2/source/inc/UncachedDataSequence.hxx | 11 |
10 files changed, 102 insertions, 97 deletions
diff --git a/chart2/source/inc/CachedDataSequence.hxx b/chart2/source/inc/CachedDataSequence.hxx index 3a98acd17a54..8119695628da 100644 --- a/chart2/source/inc/CachedDataSequence.hxx +++ b/chart2/source/inc/CachedDataSequence.hxx @@ -25,7 +25,6 @@ #include <comphelper/broadcasthelper.hxx> #include <comphelper/propertycontainer.hxx> #include <comphelper/proparrhlp.hxx> -#include "ServiceMacros.hxx" // interfaces and types #include <com/sun/star/lang/XServiceInfo.hpp> @@ -91,7 +90,15 @@ public: return (::cppu::OWeakObject *)new CachedDataSequence( xContext ); } /// declare XServiceInfo methods - APPHELPER_XSERVICEINFO_DECL() + virtual OUString SAL_CALL getImplementationName() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + static OUString getImplementationName_Static(); + static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); /// merge XInterface implementations DECLARE_XINTERFACE() diff --git a/chart2/source/inc/ConfigColorScheme.hxx b/chart2/source/inc/ConfigColorScheme.hxx index b70b8244f7fb..993f7af35073 100644 --- a/chart2/source/inc/ConfigColorScheme.hxx +++ b/chart2/source/inc/ConfigColorScheme.hxx @@ -19,7 +19,6 @@ #ifndef INCLUDED_CHART2_SOURCE_INC_CONFIGCOLORSCHEME_HXX #define INCLUDED_CHART2_SOURCE_INC_CONFIGCOLORSCHEME_HXX -#include "ServiceMacros.hxx" #include "ConfigItemListener.hxx" #include "charttoolsdllapi.hxx" #include <cppuhelper/implbase2.hxx> @@ -61,7 +60,15 @@ public: return (::cppu::OWeakObject *)new ConfigColorScheme( xContext ); } /// declare XServiceInfo methods - APPHELPER_XSERVICEINFO_DECL() + virtual OUString SAL_CALL getImplementationName() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + static OUString getImplementationName_Static(); + static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); protected: // ____ XColorScheme ____ diff --git a/chart2/source/inc/DataSource.hxx b/chart2/source/inc/DataSource.hxx index 539fedad96a4..6f55fec23dea 100644 --- a/chart2/source/inc/DataSource.hxx +++ b/chart2/source/inc/DataSource.hxx @@ -25,7 +25,6 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/implbase3.hxx> #include <comphelper/uno3.hxx> -#include "ServiceMacros.hxx" namespace chart { @@ -54,7 +53,15 @@ public: return (::cppu::OWeakObject *)new DataSource( xContext ); } /// declare XServiceInfo methods - APPHELPER_XSERVICEINFO_DECL() + virtual OUString SAL_CALL getImplementationName() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + static OUString getImplementationName_Static(); + static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); protected: // ____ XDataSource ____ diff --git a/chart2/source/inc/ErrorBar.hxx b/chart2/source/inc/ErrorBar.hxx index 2dace4f88ea6..c5ff30df1390 100644 --- a/chart2/source/inc/ErrorBar.hxx +++ b/chart2/source/inc/ErrorBar.hxx @@ -20,7 +20,6 @@ #define INCLUDED_CHART2_SOURCE_INC_ERRORBAR_HXX #include "MutexContainer.hxx" -#include "ServiceMacros.hxx" #include "ModifyListenerHelper.hxx" #include "charttoolsdllapi.hxx" #include "LineProperties.hxx" @@ -80,7 +79,16 @@ public: virtual ~ErrorBar(); /// XServiceInfo declarations - APPHELPER_XSERVICEINFO_DECL() + virtual OUString SAL_CALL getImplementationName() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + static OUString getImplementationName_Static(); + static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); + /// establish methods for factory instatiation static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext) throw(css::uno::Exception) diff --git a/chart2/source/inc/ExplicitCategoriesProvider.hxx b/chart2/source/inc/ExplicitCategoriesProvider.hxx index de8c7518eca6..38c922b0e67b 100644 --- a/chart2/source/inc/ExplicitCategoriesProvider.hxx +++ b/chart2/source/inc/ExplicitCategoriesProvider.hxx @@ -19,7 +19,6 @@ #ifndef INCLUDED_CHART2_SOURCE_INC_EXPLICITCATEGORIESPROVIDER_HXX #define INCLUDED_CHART2_SOURCE_INC_EXPLICITCATEGORIESPROVIDER_HXX -#include "ServiceMacros.hxx" #include <cppuhelper/implbase1.hxx> #include <cppuhelper/weakref.hxx> #include <com/sun/star/chart2/XCoordinateSystem.hpp> diff --git a/chart2/source/inc/InternalDataProvider.hxx b/chart2/source/inc/InternalDataProvider.hxx index 045e948adc06..3c6477c34b25 100644 --- a/chart2/source/inc/InternalDataProvider.hxx +++ b/chart2/source/inc/InternalDataProvider.hxx @@ -32,7 +32,6 @@ #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/util/XCloneable.hpp> #include <cppuhelper/implbase7.hxx> -#include "ServiceMacros.hxx" #include "CachedDataSequence.hxx" @@ -83,7 +82,15 @@ public: void createDefaultData(); /// declare XServiceInfo methods - APPHELPER_XSERVICEINFO_DECL() + virtual OUString SAL_CALL getImplementationName() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + static OUString getImplementationName_Static(); + static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); static css::uno::Reference< css::uno::XInterface > SAL_CALL create( css::uno::Reference< css::uno::XComponentContext > const & xContext) throw(css::uno::Exception) { diff --git a/chart2/source/inc/LabeledDataSequence.hxx b/chart2/source/inc/LabeledDataSequence.hxx index 78688028e393..1e3f22e6563b 100644 --- a/chart2/source/inc/LabeledDataSequence.hxx +++ b/chart2/source/inc/LabeledDataSequence.hxx @@ -18,7 +18,7 @@ */ #ifndef INCLUDED_CHART2_SOURCE_INC_LABELEDDATASEQUENCE_HXX #define INCLUDED_CHART2_SOURCE_INC_LABELEDDATASEQUENCE_HXX -#include "ServiceMacros.hxx" + #include "MutexContainer.hxx" #include <comphelper/uno3.hxx> #include <cppuhelper/implbase2.hxx> @@ -66,7 +66,15 @@ public: return (::cppu::OWeakObject *)new LabeledDataSequence( xContext ); } /// declare XServiceInfo methods - APPHELPER_XSERVICEINFO_DECL() + virtual OUString SAL_CALL getImplementationName() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + static OUString getImplementationName_Static(); + static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); protected: // ____ XLabeledDataSequence ____ diff --git a/chart2/source/inc/Scaling.hxx b/chart2/source/inc/Scaling.hxx index fd968092c55b..96a1e2aa4df0 100644 --- a/chart2/source/inc/Scaling.hxx +++ b/chart2/source/inc/Scaling.hxx @@ -18,7 +18,7 @@ */ #ifndef INCLUDED_CHART2_SOURCE_INC_SCALING_HXX #define INCLUDED_CHART2_SOURCE_INC_SCALING_HXX -#include "ServiceMacros.hxx" + #include <com/sun/star/chart2/XScaling.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XServiceName.hpp> @@ -53,7 +53,15 @@ public: return (::cppu::OWeakObject *)new LogarithmicScaling( xContext ); } /// declare XServiceInfo methods - APPHELPER_XSERVICEINFO_DECL() + virtual OUString SAL_CALL getImplementationName() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + static OUString getImplementationName_Static(); + static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); // ____ XScaling ____ virtual double SAL_CALL doScaling( double value ) @@ -96,7 +104,15 @@ public: return (::cppu::OWeakObject *)new ExponentialScaling( xContext ); } /// declare XServiceInfo methods - APPHELPER_XSERVICEINFO_DECL() + virtual OUString SAL_CALL getImplementationName() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + static OUString getImplementationName_Static(); + static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); // ____ XScaling ____ virtual double SAL_CALL @@ -139,7 +155,15 @@ public: return (::cppu::OWeakObject *)new LinearScaling( xContext ); } /// declare XServiceInfo methods - APPHELPER_XSERVICEINFO_DECL() + virtual OUString SAL_CALL getImplementationName() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + static OUString getImplementationName_Static(); + static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); // ____ XScaling ____ virtual double SAL_CALL doScaling( double value ) @@ -181,7 +205,15 @@ public: return (::cppu::OWeakObject *)new PowerScaling( xContext ); } /// declare XServiceInfo methods - APPHELPER_XSERVICEINFO_DECL() + virtual OUString SAL_CALL getImplementationName() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + static OUString getImplementationName_Static(); + static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); // ____ XScaling ____ virtual double SAL_CALL diff --git a/chart2/source/inc/ServiceMacros.hxx b/chart2/source/inc/ServiceMacros.hxx deleted file mode 100644 index 2fe5f9658272..000000000000 --- a/chart2/source/inc/ServiceMacros.hxx +++ /dev/null @@ -1,77 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ -#ifndef INCLUDED_CHART2_SOURCE_INC_SERVICEMACROS_HXX -#define INCLUDED_CHART2_SOURCE_INC_SERVICEMACROS_HXX - -#include <cppuhelper/supportsservice.hxx> - -/* -to use these macros the supported services and the implementation name needs to be static -especially you need to implement (declaration is contained in macro already): - -static com::sun::star::uno::Sequence< OUString > - Class::getSupportedServiceNames_Static(); -*/ - -// XServiceInfo decl - -namespace apphelper -{ - -#define APPHELPER_XSERVICEINFO_DECL() \ - virtual OUString SAL_CALL getImplementationName() \ - throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; \ - virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) \ - throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; \ - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()\ - throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; \ - \ - static OUString getImplementationName_Static(); \ - static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); - -// XServiceInfo impl - -#define APPHELPER_XSERVICEINFO_IMPL( Class, ImplName ) \ -OUString SAL_CALL Class::getImplementationName() \ - throw( css::uno::RuntimeException, std::exception ) \ -{ \ - return getImplementationName_Static(); \ -} \ - \ -OUString Class::getImplementationName_Static() \ -{ \ - return ImplName; \ -} \ - \ -sal_Bool SAL_CALL Class::supportsService( const OUString& rServiceName ) \ - throw( css::uno::RuntimeException, std::exception ) \ -{ \ - return cppu::supportsService(this, rServiceName); \ -} \ - \ -css::uno::Sequence< OUString > SAL_CALL Class::getSupportedServiceNames() \ - throw( css::uno::RuntimeException, std::exception ) \ -{ \ - return getSupportedServiceNames_Static(); \ -} - -}//end namespace apphelper -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/inc/UncachedDataSequence.hxx b/chart2/source/inc/UncachedDataSequence.hxx index a87b798ceed0..f4ca955a352c 100644 --- a/chart2/source/inc/UncachedDataSequence.hxx +++ b/chart2/source/inc/UncachedDataSequence.hxx @@ -25,7 +25,6 @@ #include <comphelper/broadcasthelper.hxx> #include <comphelper/propertycontainer.hxx> #include <comphelper/proparrhlp.hxx> -#include "ServiceMacros.hxx" #include "charttoolsdllapi.hxx" // interfaces and types @@ -94,7 +93,15 @@ public: virtual ~UncachedDataSequence(); /// declare XServiceInfo methods - APPHELPER_XSERVICEINFO_DECL() + virtual OUString SAL_CALL getImplementationName() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() + throw( css::uno::RuntimeException, std::exception ) SAL_OVERRIDE; + + static OUString getImplementationName_Static(); + static css::uno::Sequence< OUString > getSupportedServiceNames_Static(); /// merge XInterface implementations DECLARE_XINTERFACE() |