summaryrefslogtreecommitdiff
path: root/formula
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 /formula
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 'formula')
-rw-r--r--formula/inc/formula/ExternalReferenceHelper.hxx3
-rw-r--r--formula/inc/formula/IControlReferenceHandler.hxx3
-rw-r--r--formula/inc/formula/IFunctionDescription.hxx18
-rw-r--r--formula/source/ui/dlg/ControlHelper.hxx2
-rw-r--r--formula/source/ui/dlg/formula.cxx2
5 files changed, 28 insertions, 0 deletions
diff --git a/formula/inc/formula/ExternalReferenceHelper.hxx b/formula/inc/formula/ExternalReferenceHelper.hxx
index 68d286037a1a..e884ae7b0227 100644
--- a/formula/inc/formula/ExternalReferenceHelper.hxx
+++ b/formula/inc/formula/ExternalReferenceHelper.hxx
@@ -38,6 +38,9 @@ namespace formula
{
public:
virtual ::rtl::OUString getCacheTableName(sal_uInt16 nFileId, size_t nTabIndex) const = 0;
+
+ protected:
+ ~ExternalReferenceHelper() {}
};
// =============================================================================
} // formula
diff --git a/formula/inc/formula/IControlReferenceHandler.hxx b/formula/inc/formula/IControlReferenceHandler.hxx
index f078544f9527..aa1da3f3de32 100644
--- a/formula/inc/formula/IControlReferenceHandler.hxx
+++ b/formula/inc/formula/IControlReferenceHandler.hxx
@@ -41,6 +41,9 @@ namespace formula
virtual void HideReference( sal_Bool bDoneRefMode = sal_True ) = 0;
virtual void ReleaseFocus( RefEdit* pEdit, RefButton* pButton = NULL ) = 0;
virtual void ToggleCollapsed( RefEdit* pEdit, RefButton* pButton = NULL ) = 0;
+
+ protected:
+ ~IControlReferenceHandler() {}
};
} // formula
#endif // FORMULA_ICONTROL_REFERENCE_HANDLER_HXX_INCLUDED
diff --git a/formula/inc/formula/IFunctionDescription.hxx b/formula/inc/formula/IFunctionDescription.hxx
index e3f6d8497785..e8ead931df00 100644
--- a/formula/inc/formula/IFunctionDescription.hxx
+++ b/formula/inc/formula/IFunctionDescription.hxx
@@ -64,6 +64,9 @@ namespace formula
virtual const IFunctionDescription* getFunctionByName(const ::rtl::OUString& _sFunctionName) const = 0;
virtual sal_Unicode getSingleToken(const EToken _eToken) const = 0;
+
+ protected:
+ ~IFunctionManager() {}
};
class SAL_NO_VTABLE IFunctionCategory
@@ -75,6 +78,9 @@ namespace formula
virtual const IFunctionDescription* getFunction(sal_uInt32 _nPos) const = 0;
virtual sal_uInt32 getNumber() const = 0;
virtual ::rtl::OUString getName() const = 0;
+
+ protected:
+ ~IFunctionCategory() {}
};
class SAL_NO_VTABLE IFunctionDescription
@@ -99,6 +105,9 @@ namespace formula
virtual ::rtl::OUString getParameterName(sal_uInt32 _nPos) const = 0;
virtual ::rtl::OUString getParameterDescription(sal_uInt32 _nPos) const = 0;
virtual bool isParameterOptional(sal_uInt32 _nPos) const = 0;
+
+ protected:
+ ~IFunctionDescription() {}
};
class SAL_NO_VTABLE IFormulaToken
@@ -106,6 +115,9 @@ namespace formula
public:
virtual bool isFunction() const = 0;
virtual sal_uInt32 getArgumentCount() const = 0;
+
+ protected:
+ ~IFormulaToken() {}
};
class SAL_NO_VTABLE IStructHelper
@@ -117,6 +129,9 @@ namespace formula
virtual String GetEntryText(SvLBoxEntry* pEntry) const = 0;
virtual SvLBoxEntry* GetParent(SvLBoxEntry* pEntry) const = 0;
+
+ protected:
+ ~IStructHelper() {}
};
class SAL_NO_VTABLE IFormulaEditorHelper
@@ -153,6 +168,9 @@ namespace formula
virtual void doClose(sal_Bool _bOk) = 0;
virtual void insertEntryToLRUList(const IFunctionDescription* pDesc) = 0;
virtual void showReference(const String& _sFormula) = 0;
+
+ protected:
+ ~IFormulaEditorHelper() {}
};
}
diff --git a/formula/source/ui/dlg/ControlHelper.hxx b/formula/source/ui/dlg/ControlHelper.hxx
index 0cc96d284abe..b1aa6369218a 100644
--- a/formula/source/ui/dlg/ControlHelper.hxx
+++ b/formula/source/ui/dlg/ControlHelper.hxx
@@ -146,6 +146,8 @@ public:
ArgInput();
+ virtual ~ArgInput() {}
+
void InitArgInput ( FixedText* pftArg,
ImageButton* pbtnFx,
ArgEdit* pedArg,
diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx
index 3789538a3d80..de692bd138b8 100644
--- a/formula/source/ui/dlg/formula.cxx
+++ b/formula/source/ui/dlg/formula.cxx
@@ -85,6 +85,8 @@ namespace formula
public:
OFormulaToken(bool _bFunction,sal_Int32 _nParaCount) : m_nParaCount(_nParaCount),m_bIsFunction(_bFunction){}
+ virtual ~OFormulaToken() {}
+
virtual bool isFunction() const { return m_bIsFunction; }
virtual sal_uInt32 getArgumentCount() const { return m_nParaCount; }
};