diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-12-14 08:45:02 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-12-14 13:03:06 +0100 |
commit | 6f4f5677acff2711b4cfdae6ba1a0892e62b179a (patch) | |
tree | ba97fc99b67b9b139bdf6807ceedcb168fa68fd2 /filter | |
parent | Access2Base - FIX getString() on LONGVARCHAR fields (diff) | |
download | core-6f4f5677acff2711b4cfdae6ba1a0892e62b179a.tar.gz core-6f4f5677acff2711b4cfdae6ba1a0892e62b179a.zip |
No need to keep these whitelisted functions decorated with SAL_CALL
The only effect SAL_CALL effectively has on LO-internal code is to change non-
static member functions from __thiscall to __cdecl in MSVC (where all other
functions are __cdecl by default, anyway). (For 3rd-party code, it could be
argued that SAL_CALL is useful on function declarations in the URE stable
interface other than non-static member functions, too, in case 3rd-party code
uses a compiler switch to change the default calling convention to something
other than __cdecl. But loplugin:salcall exempts the URE stable interface,
anyway.)
One could argue that SAL_CALL, even if today it effectively only affects non-
static member functions in MSVC, could be extended in the future to affect more
functions on more platforms. However, the current code would already not
support that. For example, 3af500580b1c82eabd60335c9ebc458a3f68850c
"loplugin:salcall fix functions" changed FrameControl_createInstance in
UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even
though its address (in ctl_component_getFacrory, in the same file) is passed to
cppuhelper::createSingleFactory as an argument of type
cppu::ComponentInstantiation, which is a pointer to SAL_CALL function.
Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6
Reviewed-on: https://gerrit.libreoffice.org/46436
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/config/cache/contenthandlerfactory.cxx | 2 | ||||
-rw-r--r-- | filter/source/config/cache/contenthandlerfactory.hxx | 2 | ||||
-rw-r--r-- | filter/source/config/cache/filterfactory.cxx | 2 | ||||
-rw-r--r-- | filter/source/config/cache/filterfactory.hxx | 2 | ||||
-rw-r--r-- | filter/source/config/cache/frameloaderfactory.cxx | 2 | ||||
-rw-r--r-- | filter/source/config/cache/frameloaderfactory.hxx | 2 | ||||
-rw-r--r-- | filter/source/config/cache/typedetection.cxx | 2 | ||||
-rw-r--r-- | filter/source/config/cache/typedetection.hxx | 2 |
8 files changed, 8 insertions, 8 deletions
diff --git a/filter/source/config/cache/contenthandlerfactory.cxx b/filter/source/config/cache/contenthandlerfactory.cxx index f43129405f55..56b9252cafbb 100644 --- a/filter/source/config/cache/contenthandlerfactory.cxx +++ b/filter/source/config/cache/contenthandlerfactory.cxx @@ -144,7 +144,7 @@ css::uno::Sequence< OUString > ContentHandlerFactory::impl_getSupportedServiceNa } -css::uno::Reference< css::uno::XInterface > SAL_CALL ContentHandlerFactory::impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR) +css::uno::Reference< css::uno::XInterface > ContentHandlerFactory::impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR) { ContentHandlerFactory* pNew = new ContentHandlerFactory( comphelper::getComponentContext(xSMGR) ); return css::uno::Reference< css::uno::XInterface >(static_cast< css::lang::XMultiServiceFactory* >(pNew), css::uno::UNO_QUERY); diff --git a/filter/source/config/cache/contenthandlerfactory.hxx b/filter/source/config/cache/contenthandlerfactory.hxx index 82bf415810cc..f684b4048667 100644 --- a/filter/source/config/cache/contenthandlerfactory.hxx +++ b/filter/source/config/cache/contenthandlerfactory.hxx @@ -113,7 +113,7 @@ class ContentHandlerFactory : public ::cppu::ImplInheritanceHelper< BaseContaine @return The new instance of this service as an uno reference. */ - static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR); + static css::uno::Reference< css::uno::XInterface > impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR); // Overrides to resolve ambiguity diff --git a/filter/source/config/cache/filterfactory.cxx b/filter/source/config/cache/filterfactory.cxx index ea743e08f865..2e425c27ed63 100644 --- a/filter/source/config/cache/filterfactory.cxx +++ b/filter/source/config/cache/filterfactory.cxx @@ -563,7 +563,7 @@ css::uno::Sequence< OUString > FilterFactory::impl_getSupportedServiceNames() } -css::uno::Reference< css::uno::XInterface > SAL_CALL FilterFactory::impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR) +css::uno::Reference< css::uno::XInterface > FilterFactory::impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR) { FilterFactory* pNew = new FilterFactory( comphelper::getComponentContext(xSMGR) ); return css::uno::Reference< css::uno::XInterface >(static_cast< css::lang::XMultiServiceFactory* >(pNew), css::uno::UNO_QUERY); diff --git a/filter/source/config/cache/filterfactory.hxx b/filter/source/config/cache/filterfactory.hxx index bf211ac102d9..c0e9a34d5aa3 100644 --- a/filter/source/config/cache/filterfactory.hxx +++ b/filter/source/config/cache/filterfactory.hxx @@ -171,7 +171,7 @@ class FilterFactory : public ::cppu::ImplInheritanceHelper< BaseContainer @return The new instance of this service as an uno reference. */ - static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR); + static css::uno::Reference< css::uno::XInterface > impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR); }; } // namespace config diff --git a/filter/source/config/cache/frameloaderfactory.cxx b/filter/source/config/cache/frameloaderfactory.cxx index 3d1d5bb84d55..cbb727aebd79 100644 --- a/filter/source/config/cache/frameloaderfactory.cxx +++ b/filter/source/config/cache/frameloaderfactory.cxx @@ -141,7 +141,7 @@ css::uno::Sequence< OUString > FrameLoaderFactory::impl_getSupportedServiceNames } -css::uno::Reference< css::uno::XInterface > SAL_CALL FrameLoaderFactory::impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR) +css::uno::Reference< css::uno::XInterface > FrameLoaderFactory::impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR) { FrameLoaderFactory* pNew = new FrameLoaderFactory( comphelper::getComponentContext(xSMGR) ); return css::uno::Reference< css::uno::XInterface >(static_cast< css::lang::XMultiServiceFactory* >(pNew), css::uno::UNO_QUERY); diff --git a/filter/source/config/cache/frameloaderfactory.hxx b/filter/source/config/cache/frameloaderfactory.hxx index bf05fc920af3..7dab5e02b0d9 100644 --- a/filter/source/config/cache/frameloaderfactory.hxx +++ b/filter/source/config/cache/frameloaderfactory.hxx @@ -113,7 +113,7 @@ class FrameLoaderFactory : public ::cppu::ImplInheritanceHelper< BaseContainer @return The new instance of this service as an uno reference. */ - static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR); + static css::uno::Reference< css::uno::XInterface > impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR); // Overrides to resolve ambiguity virtual css::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName ) override diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx index 7b867177412c..fee03066ed83 100644 --- a/filter/source/config/cache/typedetection.cxx +++ b/filter/source/config/cache/typedetection.cxx @@ -1231,7 +1231,7 @@ css::uno::Sequence< OUString > TypeDetection::impl_getSupportedServiceNames() } -css::uno::Reference< css::uno::XInterface > SAL_CALL TypeDetection::impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR) +css::uno::Reference< css::uno::XInterface > TypeDetection::impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR) { TypeDetection* pNew = new TypeDetection( comphelper::getComponentContext(xSMGR) ); return css::uno::Reference< css::uno::XInterface >(static_cast< css::document::XTypeDetection* >(pNew), css::uno::UNO_QUERY); diff --git a/filter/source/config/cache/typedetection.hxx b/filter/source/config/cache/typedetection.hxx index 78f8964e66ea..830badc54f63 100644 --- a/filter/source/config/cache/typedetection.hxx +++ b/filter/source/config/cache/typedetection.hxx @@ -368,7 +368,7 @@ public: @return The new instance of this service as an uno reference. */ - static css::uno::Reference< css::uno::XInterface > SAL_CALL impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR); + static css::uno::Reference< css::uno::XInterface > impl_createInstance(const css::uno::Reference< css::lang::XMultiServiceFactory >& xSMGR); }; class TerminateDetection : public cppu::WeakComponentImplHelper<css::frame::XTerminateListener> |