summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-03-14 13:27:56 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-03-14 13:32:02 +0100
commit6e67c03dc0225fc66343546b14e902b9d238b1a3 (patch)
tree6e078783d65e280a721b4e46f0ae0ca6b950f121 /connectivity
parentfe4be5047988782f3143a1af505c5eecb3f2af5a (diff)
Enable -Wnon-virtual-dtor for GCC 4.6
...which has the necessary features to support it. Change a lot of classes to either contain a protected non-virtual dtor (which is backwards compatible, so even works for cppumaker-generated UNO headers) or a public virtual one. cppuhelper/propertysetmixin.hxx still needs to disable the warning, as the relevant class has a non-virtual dtor but friends, which would still cause GCC to warn. Includes a patch for libcmis, intended to be upstreamed.
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/inc/connectivity/IParseContext.hxx3
-rw-r--r--connectivity/inc/connectivity/SQLStatementHelper.hxx3
-rw-r--r--connectivity/inc/connectivity/sdbcx/IRefreshable.hxx9
-rw-r--r--connectivity/inc/connectivity/sdbcx/VCollection.hxx1
-rw-r--r--connectivity/inc/connectivity/virtualdbtools.hxx18
-rw-r--r--connectivity/inc/connectivity/warningscontainer.hxx3
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx2
-rw-r--r--connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx3
-rw-r--r--connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx3
-rwxr-xr-xconnectivity/source/drivers/mozab/post_include_mozilla.h4
-rwxr-xr-xconnectivity/source/drivers/mozab/pre_include_mozilla.h5
-rw-r--r--connectivity/source/inc/TResultSetHelper.hxx3
-rw-r--r--connectivity/source/inc/hsqldb/HConnection.hxx3
-rw-r--r--connectivity/source/sdbcx/VCollection.cxx3
14 files changed, 58 insertions, 5 deletions
diff --git a/connectivity/inc/connectivity/IParseContext.hxx b/connectivity/inc/connectivity/IParseContext.hxx
index 16bae3465820..1724b7310bbc 100644
--- a/connectivity/inc/connectivity/IParseContext.hxx
+++ b/connectivity/inc/connectivity/IParseContext.hxx
@@ -102,6 +102,9 @@ namespace connectivity
<p>if this is not overridden by derived classes, it returns the static default locale.</p>
*/
virtual ::com::sun::star::lang::Locale getPreferredLocale( ) const = 0;
+
+ protected:
+ ~IParseContext() {}
};
}
diff --git a/connectivity/inc/connectivity/SQLStatementHelper.hxx b/connectivity/inc/connectivity/SQLStatementHelper.hxx
index c64268debfd9..daf1ddc7308e 100644
--- a/connectivity/inc/connectivity/SQLStatementHelper.hxx
+++ b/connectivity/inc/connectivity/SQLStatementHelper.hxx
@@ -42,6 +42,9 @@ namespace dbtools
{
public:
virtual void addComment(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor,::rtl::OUStringBuffer& _rOut) = 0;
+
+ protected:
+ ~ISQLStatementHelper() {}
};
//.........................................................................
diff --git a/connectivity/inc/connectivity/sdbcx/IRefreshable.hxx b/connectivity/inc/connectivity/sdbcx/IRefreshable.hxx
index 769ed2107536..318f006d1216 100644
--- a/connectivity/inc/connectivity/sdbcx/IRefreshable.hxx
+++ b/connectivity/inc/connectivity/sdbcx/IRefreshable.hxx
@@ -39,18 +39,27 @@ namespace connectivity
{
public:
virtual void refreshGroups() = 0;
+
+ protected:
+ ~IRefreshableGroups() {}
};
class OOO_DLLPUBLIC_DBTOOLS SAL_NO_VTABLE IRefreshableUsers
{
public:
virtual void refreshUsers() = 0;
+
+ protected:
+ ~IRefreshableUsers() {}
};
class OOO_DLLPUBLIC_DBTOOLS SAL_NO_VTABLE IRefreshableColumns
{
public:
virtual void refreshColumns() = 0;
+
+ protected:
+ ~IRefreshableColumns() {}
};
}
}
diff --git a/connectivity/inc/connectivity/sdbcx/VCollection.hxx b/connectivity/inc/connectivity/sdbcx/VCollection.hxx
index c3262b450ca0..6db38b278464 100644
--- a/connectivity/inc/connectivity/sdbcx/VCollection.hxx
+++ b/connectivity/inc/connectivity/sdbcx/VCollection.hxx
@@ -73,6 +73,7 @@ namespace connectivity
class OOO_DLLPUBLIC_DBTOOLS SAL_NO_VTABLE IObjectCollection
{
public:
+ virtual ~IObjectCollection();
virtual void reserve(size_t nLength) = 0;
virtual bool exists(const ::rtl::OUString& _sName ) = 0;
virtual bool empty() = 0;
diff --git a/connectivity/inc/connectivity/virtualdbtools.hxx b/connectivity/inc/connectivity/virtualdbtools.hxx
index fe023e2acfc9..cf42a52db14b 100644
--- a/connectivity/inc/connectivity/virtualdbtools.hxx
+++ b/connectivity/inc/connectivity/virtualdbtools.hxx
@@ -226,6 +226,9 @@ namespace connectivity
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxComponent,
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxActualConnection
) = 0;
+
+ protected:
+ ~IDataAccessTools() {}
};
//================================================================
@@ -244,6 +247,9 @@ namespace connectivity
virtual sal_Int32 getSupportedTextEncodings(
::std::vector< rtl_TextEncoding >& /* [out] */ _rEncs
) const = 0;
+
+ protected:
+ ~IDataAccessCharSet() {}
};
//================================================================
@@ -272,6 +278,9 @@ namespace connectivity
const ::com::sun::star::lang::Locale& _rLocale,
const ::com::sun::star::util::Date& _rNullDate
) const = 0;
+
+ protected:
+ ~IDataAccessTypeConversion() {}
};
//================================================================
@@ -295,6 +304,9 @@ namespace connectivity
const sal_Char _cDecSeparator,
const IParseContext* _pContext
) const = 0;
+
+ protected:
+ ~ISQLParseNode() {}
};
//================================================================
@@ -313,6 +325,9 @@ namespace connectivity
) const = 0;
virtual const IParseContext& getContext() const = 0;
+
+ protected:
+ ~ISQLParser() {}
};
//================================================================
@@ -344,6 +359,9 @@ namespace connectivity
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRowSet >& _rxRowSet,
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxColumn
) = 0;
+
+ protected:
+ ~IDataAccessToolsFactory() {}
};
//....................................................................
diff --git a/connectivity/inc/connectivity/warningscontainer.hxx b/connectivity/inc/connectivity/warningscontainer.hxx
index 273390ccbf7f..937fd8be343b 100644
--- a/connectivity/inc/connectivity/warningscontainer.hxx
+++ b/connectivity/inc/connectivity/warningscontainer.hxx
@@ -50,6 +50,9 @@ namespace dbtools
virtual void appendWarning(const ::com::sun::star::sdbc::SQLException& _rWarning) = 0;
virtual void appendWarning(const ::com::sun::star::sdbc::SQLWarning& _rWarning) = 0;
virtual void appendWarning(const ::com::sun::star::sdb::SQLContext& _rContext) = 0;
+
+ protected:
+ ~IWarningsContainer() {}
};
//====================================================================
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx
index 00a061c9b102..12d4fa9aeb0e 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfile.cxx
@@ -601,8 +601,10 @@ nsProfile::CreateInstance(nsISupports* aOuter, const nsID& aIID,
}
//Register profile manager
+#include "pre_include_mozilla.h"
#include "nsIComponentManager.h"
#include "nsIComponentRegistrar.h"
+#include "post_include_mozilla.h"
static const nsCID kProfileManagerCID = NS_PROFILE_CID;
diff --git a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
index 16787167476b..98a4a949507c 100644
--- a/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
+++ b/connectivity/source/drivers/mozab/bootstrap/MNSProfileDiscover.cxx
@@ -66,9 +66,10 @@
#include <rmsdef.h>
#endif
+#include "pre_include_mozilla.h"
#include "nsICharsetConverterManager.h"
#include "nsIPlatformCharset.h"
-
+#include "post_include_mozilla.h"
#if defined (XP_UNIX)
# define USER_ENVIRONMENT_VARIABLE "USER"
diff --git a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx
index 70a6b7bff246..ebee40a1419f 100644
--- a/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx
+++ b/connectivity/source/drivers/mozab/mozillasrc/MDatabaseMetaDataHelper.cxx
@@ -40,7 +40,10 @@
#include <osl/mutex.hxx>
#include <osl/conditn.hxx>
+#include "pre_include_mozilla.h"
#include <nsIAbDirFactoryService.h>
+#include "post_include_mozilla.h"
+
#include <MNSInit.hxx>
#include <MNameMapper.hxx>
#include "MNSMozabProxy.hxx"
diff --git a/connectivity/source/drivers/mozab/post_include_mozilla.h b/connectivity/source/drivers/mozab/post_include_mozilla.h
index a63db2b480c8..37fbc9a278b4 100755
--- a/connectivity/source/drivers/mozab/post_include_mozilla.h
+++ b/connectivity/source/drivers/mozab/post_include_mozilla.h
@@ -26,7 +26,9 @@
*
************************************************************************/
-#if defined __SUNPRO_CC
+#if defined __GNUC__ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
+#pragma GCC diagnostic pop
+#elif defined __SUNPRO_CC
#pragma enable_warn
#elif defined _MSC_VER
#pragma warning(pop)
diff --git a/connectivity/source/drivers/mozab/pre_include_mozilla.h b/connectivity/source/drivers/mozab/pre_include_mozilla.h
index 7e2c5fe6607d..81e407ba37d4 100755
--- a/connectivity/source/drivers/mozab/pre_include_mozilla.h
+++ b/connectivity/source/drivers/mozab/pre_include_mozilla.h
@@ -55,8 +55,9 @@
#endif
#endif
-#if defined __GNUC__
- #pragma GCC system_header
+#if defined __GNUC__ && ((__GNUC__ == 4 && __GNUC_MINOR__ >= 6) || __GNUC__ > 4)
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wnon-virtual-dtor"
#elif defined __SUNPRO_CC
#pragma disable_warn
#elif defined _MSC_VER
diff --git a/connectivity/source/inc/TResultSetHelper.hxx b/connectivity/source/inc/TResultSetHelper.hxx
index 874b9d93d82b..e32e9ed11f4b 100644
--- a/connectivity/source/inc/TResultSetHelper.hxx
+++ b/connectivity/source/inc/TResultSetHelper.hxx
@@ -52,6 +52,9 @@ namespace connectivity
virtual sal_Int32 getDriverPos() const = 0;
virtual sal_Bool deletedVisible() const = 0;
virtual sal_Bool isRowDeleted() const = 0;
+
+ protected:
+ ~IResultSetHelper() {}
};
}
diff --git a/connectivity/source/inc/hsqldb/HConnection.hxx b/connectivity/source/inc/hsqldb/HConnection.hxx
index f86fdb9f4432..1102e7e0d9f2 100644
--- a/connectivity/source/inc/hsqldb/HConnection.hxx
+++ b/connectivity/source/inc/hsqldb/HConnection.hxx
@@ -52,6 +52,9 @@ namespace connectivity
public:
virtual ::osl::Mutex& getMutex() const = 0;
virtual void checkDisposed() const = 0;
+
+ protected:
+ ~IMethodGuardAccess() {}
};
//==========================================================================
diff --git a/connectivity/source/sdbcx/VCollection.cxx b/connectivity/source/sdbcx/VCollection.cxx
index 66ccb4d92df5..c4f76eef2d87 100644
--- a/connectivity/source/sdbcx/VCollection.cxx
+++ b/connectivity/source/sdbcx/VCollection.cxx
@@ -231,7 +231,8 @@ namespace
// -----------------------------------------------------------------------------
};
}
-// -----------------------------------------------------------------------------
+
+IObjectCollection::~IObjectCollection() {}
IMPLEMENT_SERVICE_INFO(OCollection,"com.sun.star.sdbcx.VContainer" , "com.sun.star.sdbcx.Container")