diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-04-16 09:51:47 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-04-16 09:54:12 +0300 |
commit | e616c346d433dffd52fd483d8cfb3c4e5ec4169e (patch) | |
tree | 2c93b82ae170c7b3b1e8301ced495adaa2ce4a22 /dbaccess | |
parent | f9344940db627b549a9047da6b1bcc62a2d3a6ef (diff) |
WaE: Unreferenced function definition [loplugin:unreffun]
Work around a slight confusion in the Clang plugin when used with Clang
3.2. Put these 'extern "C"' function definitions consistenly outside
namespaces, as they are declared in the header.
Change-Id: Iccee41dfe0776f382e677b109009a95fb806a12c
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/dataaccess/commanddefinition.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/databasedocument.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/core/dataaccess/datasource.cxx | 7 | ||||
-rw-r--r-- | dbaccess/source/core/inc/services.hxx | 16 | ||||
-rw-r--r-- | dbaccess/source/filter/xml/dbloader2.cxx | 5 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 12 |
6 files changed, 32 insertions, 22 deletions
diff --git a/dbaccess/source/core/dataaccess/commanddefinition.cxx b/dbaccess/source/core/dataaccess/commanddefinition.cxx index 8efc22290fb0..14a527eb518e 100644 --- a/dbaccess/source/core/dataaccess/commanddefinition.cxx +++ b/dbaccess/source/core/dataaccess/commanddefinition.cxx @@ -38,15 +38,14 @@ using namespace ::osl; using namespace ::comphelper; using namespace ::cppu; -namespace dbaccess -{ - // OCommandDefinition extern "C" void SAL_CALL createRegistryInfo_OCommandDefinition() { - static ::dba::OAutoRegistration< OCommandDefinition > aAutoRegistration; + static ::dba::OAutoRegistration< ::dbaccess::OCommandDefinition > aAutoRegistration; } +namespace dbaccess +{ void OCommandDefinition::registerProperties() { diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx index 9270176061c6..6a181bb4234f 100644 --- a/dbaccess/source/core/dataaccess/databasedocument.cxx +++ b/dbaccess/source/core/dataaccess/databasedocument.cxx @@ -146,13 +146,18 @@ bool ViewMonitor::onSetCurrentController( const Reference< XController >& _rxCon return bLoadFinished; } +} // namespace dbaccess + // ODatabaseDocument extern "C" void SAL_CALL createRegistryInfo_ODatabaseDocument() { - static ::dba::OAutoRegistration< ODatabaseDocument > aAutoRegistration; + static ::dba::OAutoRegistration< ::dbaccess::ODatabaseDocument > aAutoRegistration; } +namespace dbaccess +{ + ODatabaseDocument::ODatabaseDocument(const ::rtl::Reference<ODatabaseModelImpl>& _pImpl ) :ModelDependentComponent( _pImpl ) ,ODatabaseDocument_OfficeDocument( getMutex() ) diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx index 3d653631ddb4..c1b5ba58aba8 100644 --- a/dbaccess/source/core/dataaccess/datasource.cxx +++ b/dbaccess/source/core/dataaccess/datasource.cxx @@ -475,13 +475,18 @@ namespace }; } +} // namespace dbaccess + // ODatabaseContext extern "C" void SAL_CALL createRegistryInfo_ODatabaseSource() { - static ::dba::OAutoRegistration< ODatabaseSource > aAutoRegistration; + static ::dba::OAutoRegistration< ::dbaccess::ODatabaseSource > aAutoRegistration; } +namespace dbaccess +{ + ODatabaseSource::ODatabaseSource(const ::rtl::Reference<ODatabaseModelImpl>& _pImpl) :ModelDependentComponent( _pImpl ) ,ODatabaseSource_Base( getMutex() ) diff --git a/dbaccess/source/core/inc/services.hxx b/dbaccess/source/core/inc/services.hxx index 41fcee709022..46673bdbd39e 100644 --- a/dbaccess/source/core/inc/services.hxx +++ b/dbaccess/source/core/inc/services.hxx @@ -24,16 +24,12 @@ #include <sal/types.h> -extern "C" { - -void SAL_CALL createRegistryInfo_DataAccessDescriptorFactory(); -void SAL_CALL createRegistryInfo_OCommandDefinition(); -void SAL_CALL createRegistryInfo_OComponentDefinition(); -void SAL_CALL createRegistryInfo_ODatabaseDocument(); -void SAL_CALL createRegistryInfo_ODatabaseSource(); -void SAL_CALL createRegistryInfo_ORowSet(); - -} +extern "C" void SAL_CALL createRegistryInfo_DataAccessDescriptorFactory(); +extern "C" void SAL_CALL createRegistryInfo_OCommandDefinition(); +extern "C" void SAL_CALL createRegistryInfo_OComponentDefinition(); +extern "C" void SAL_CALL createRegistryInfo_ODatabaseDocument(); +extern "C" void SAL_CALL createRegistryInfo_ODatabaseSource(); +extern "C" void SAL_CALL createRegistryInfo_ORowSet(); #endif diff --git a/dbaccess/source/filter/xml/dbloader2.cxx b/dbaccess/source/filter/xml/dbloader2.cxx index d91b392ce0a6..9d1b95b8178c 100644 --- a/dbaccess/source/filter/xml/dbloader2.cxx +++ b/dbaccess/source/filter/xml/dbloader2.cxx @@ -213,11 +213,16 @@ Sequence< OUString > DBTypeDetection::getSupportedServiceNames_Static(void) thro return aSNS; } +} // namespace dbaxml + extern "C" void SAL_CALL createRegistryInfo_DBTypeDetection() { static ::dbaxml::OMultiInstanceAutoRegistration< ::dbaxml::DBTypeDetection > aAutoRegistration; } +namespace dbaxml +{ + class DBContentLoader : public ::cppu::WeakImplHelper2< XFrameLoader, XServiceInfo> { private: diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index a6887b7ca4c6..9103d70f28ca 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -154,18 +154,18 @@ using namespace ::dbtools; using namespace ::comphelper; using namespace ::svx; +// SbaTableQueryBrowser +extern "C" void SAL_CALL createRegistryInfo_OBrowser() +{ + static ::dbaui::OMultiInstanceAutoRegistration< ::dbaui::SbaTableQueryBrowser > aAutoRegistration; +} + namespace dbaui { namespace DatabaseObject = ::com::sun::star::sdb::application::DatabaseObject; namespace DatabaseObjectContainer = ::com::sun::star::sdb::application::DatabaseObjectContainer; -// SbaTableQueryBrowser -extern "C" void SAL_CALL createRegistryInfo_OBrowser() -{ - static OMultiInstanceAutoRegistration< SbaTableQueryBrowser > aAutoRegistration; -} - void SafeAddPropertyListener(const Reference< XPropertySet > & xSet, const OUString& rPropName, XPropertyChangeListener* pListener) { Reference< XPropertySetInfo > xInfo = xSet->getPropertySetInfo(); |