summaryrefslogtreecommitdiff
path: root/sc
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 /sc
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 'sc')
-rw-r--r--sc/inc/filter.hxx3
-rw-r--r--sc/inc/scabstdlg.hxx3
-rw-r--r--sc/source/core/tool/interpr3.cxx15
-rw-r--r--sc/source/filter/inc/exp_op.hxx2
-rw-r--r--sc/source/filter/inc/ftools.hxx1
-rw-r--r--sc/source/ui/attrdlg/scdlgfact.hxx2
-rw-r--r--sc/source/ui/docshell/impex.cxx1
-rw-r--r--sc/source/ui/inc/dpgroupdlg.hxx7
-rw-r--r--sc/source/ui/vba/vbarange.cxx6
9 files changed, 40 insertions, 0 deletions
diff --git a/sc/inc/filter.hxx b/sc/inc/filter.hxx
index f868b70715a9..eb6229d0bfdb 100644
--- a/sc/inc/filter.hxx
+++ b/sc/inc/filter.hxx
@@ -126,6 +126,9 @@ class ScFormatFilterPlugin {
virtual FltError ScExportHTML( SvStream&, const String& rBaseURL, ScDocument*, const ScRange& rRange, const CharSet eDest, sal_Bool bAll,
const String& rStreamPath, String& rNonConvertibleChars ) = 0;
virtual FltError ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest ) = 0;
+
+protected:
+ ~ScFormatFilterPlugin() {}
};
// scfilt plugin symbol
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx
index 43b058940d71..6e5d0010510e 100644
--- a/sc/inc/scabstdlg.hxx
+++ b/sc/inc/scabstdlg.hxx
@@ -510,6 +510,9 @@ public:
// for tabpage
virtual CreateTabPage GetTabPageCreatorFunc( sal_uInt16 nId ) = 0;
virtual GetTabPageRanges GetTabPageRangesFunc( sal_uInt16 nId ) = 0;
+
+protected:
+ ~ScAbstractDialogFactory() {}
};
#endif
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx
index 57feeaa16789..d19e3a8164bf 100644
--- a/sc/source/core/tool/interpr3.cxx
+++ b/sc/source/core/tool/interpr3.cxx
@@ -65,6 +65,9 @@ class ScDistFunc
{
public:
virtual double GetValue(double x) const = 0;
+
+protected:
+ ~ScDistFunc() {}
};
// iteration for inverse distributions
@@ -1989,6 +1992,8 @@ public:
ScGammaDistFunction( ScInterpreter& rI, double fpVal, double fAlphaVal, double fBetaVal ) :
rInt(rI), fp(fpVal), fAlpha(fAlphaVal), fBeta(fBetaVal) {}
+ virtual ~ScGammaDistFunction() {}
+
double GetValue( double x ) const { return fp - rInt.GetGammaDist(x, fAlpha, fBeta); }
};
@@ -2028,6 +2033,8 @@ public:
ScBetaDistFunction( ScInterpreter& rI, double fpVal, double fAlphaVal, double fBetaVal ) :
rInt(rI), fp(fpVal), fAlpha(fAlphaVal), fBeta(fBetaVal) {}
+ virtual ~ScBetaDistFunction() {}
+
double GetValue( double x ) const { return fp - rInt.GetBetaDist(x, fAlpha, fBeta); }
};
@@ -2082,6 +2089,8 @@ public:
ScTDistFunction( ScInterpreter& rI, double fpVal, double fDFVal ) :
rInt(rI), fp(fpVal), fDF(fDFVal) {}
+ virtual ~ScTDistFunction() {}
+
double GetValue( double x ) const { return fp - 2 * rInt.GetTDist(x, fDF); }
};
@@ -2115,6 +2124,8 @@ public:
ScFDistFunction( ScInterpreter& rI, double fpVal, double fF1Val, double fF2Val ) :
rInt(rI), fp(fpVal), fF1(fF1Val), fF2(fF2Val) {}
+ virtual ~ScFDistFunction() {}
+
double GetValue( double x ) const { return fp - rInt.GetFDist(x, fF1, fF2); }
};
@@ -2149,6 +2160,8 @@ public:
ScChiDistFunction( ScInterpreter& rI, double fpVal, double fDFVal ) :
rInt(rI), fp(fpVal), fDF(fDFVal) {}
+ virtual ~ScChiDistFunction() {}
+
double GetValue( double x ) const { return fp - rInt.GetChiDist(x, fDF); }
};
@@ -2183,6 +2196,8 @@ public:
ScChiSqDistFunction( ScInterpreter& rI, double fpVal, double fDFVal ) :
rInt(rI), fp(fpVal), fDF(fDFVal) {}
+ virtual ~ScChiSqDistFunction() {}
+
double GetValue( double x ) const { return fp - rInt.GetChiSqDistCDF(x, fDF); }
};
diff --git a/sc/source/filter/inc/exp_op.hxx b/sc/source/filter/inc/exp_op.hxx
index 3dabe04e6070..dd1e28cdda91 100644
--- a/sc/source/filter/inc/exp_op.hxx
+++ b/sc/source/filter/inc/exp_op.hxx
@@ -44,6 +44,8 @@ class SotStorage;
class ExportTyp
{
protected:
+ ~ExportTyp() {}
+
SvStream& aOut; // Ausgabe-Stream
ScDocument* pD; // Dokument
CharSet eZielChar; // Ziel-Zeichensatz
diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx
index 4bfac0961c83..64a5d5224cae 100644
--- a/sc/source/filter/inc/ftools.hxx
+++ b/sc/source/filter/inc/ftools.hxx
@@ -293,6 +293,7 @@ typedef ::std::vector< ::rtl::OUString > ScfStringVec;
class ScFormatFilterPluginImpl : public ScFormatFilterPlugin {
public:
ScFormatFilterPluginImpl();
+ virtual ~ScFormatFilterPluginImpl() {}
// various import filters
virtual FltError ScImportLotus123( SfxMedium&, ScDocument*, CharSet eSrc = RTL_TEXTENCODING_DONTKNOW );
virtual FltError ScImportQuattroPro( SfxMedium &rMedium, ScDocument *pDoc );
diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx
index 9c9e0b710a3b..bb749aaffb92 100644
--- a/sc/source/ui/attrdlg/scdlgfact.hxx
+++ b/sc/source/ui/attrdlg/scdlgfact.hxx
@@ -389,6 +389,8 @@ class ScAbstractDialogFactory_Impl : public ScAbstractDialogFactory
{
public:
+ virtual ~ScAbstractDialogFactory_Impl() {}
+
virtual AbstractScImportAsciiDlg * CreateScImportAsciiDlg( Window* pParent, String aDatName, //add for ScImportAsciiDlg
SvStream* pInStream, int nId,
sal_Unicode cSep = '\t');
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index d4a8f80e6073..ff2929f08117 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -2070,6 +2070,7 @@ class ScFormatFilterMissing : public ScFormatFilterPlugin {
{
OSL_FAIL("Missing file filters");
}
+ virtual ~ScFormatFilterMissing() {}
virtual FltError ScImportLotus123( SfxMedium&, ScDocument*, CharSet ) RETURN_ERROR
virtual FltError ScImportQuattroPro( SfxMedium &, ScDocument * ) RETURN_ERROR
virtual FltError ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT ) RETURN_ERROR
diff --git a/sc/source/ui/inc/dpgroupdlg.hxx b/sc/source/ui/inc/dpgroupdlg.hxx
index 7a1770ab6844..f6c88c94b0b9 100644
--- a/sc/source/ui/inc/dpgroupdlg.hxx
+++ b/sc/source/ui/inc/dpgroupdlg.hxx
@@ -50,6 +50,9 @@ public:
double GetValue() const;
void SetValue( bool bAuto, double fValue );
+protected:
+ ~ScDPGroupEditHelper() {}
+
private:
virtual bool ImplGetValue( double& rfValue ) const = 0;
virtual void ImplSetValue( double fValue ) = 0;
@@ -71,6 +74,8 @@ public:
RadioButton& rRbAuto, RadioButton& rRbMan,
ScDoubleField& rEdValue );
+ virtual ~ScDPNumGroupEditHelper() {}
+
private:
virtual bool ImplGetValue( double& rfValue ) const;
virtual void ImplSetValue( double fValue );
@@ -88,6 +93,8 @@ public:
RadioButton& rRbAuto, RadioButton& rRbMan,
DateField& rEdValue, const Date& rNullDate );
+ virtual ~ScDPDateGroupEditHelper() {}
+
private:
virtual bool ImplGetValue( double& rfValue ) const;
virtual void ImplSetValue( double fValue );
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index d8c3a9fc75ee..23a7492a6313 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1018,6 +1018,9 @@ class RangeProcessor
{
public:
virtual void process( const uno::Reference< excel::XRange >& xRange ) = 0;
+
+protected:
+ ~RangeProcessor() {}
};
class RangeValueProcessor : public RangeProcessor
@@ -1025,6 +1028,7 @@ class RangeValueProcessor : public RangeProcessor
const uno::Any& m_aVal;
public:
RangeValueProcessor( const uno::Any& rVal ):m_aVal( rVal ) {}
+ virtual ~RangeValueProcessor() {}
virtual void process( const uno::Reference< excel::XRange >& xRange )
{
xRange->setValue( m_aVal );
@@ -1036,6 +1040,7 @@ class RangeFormulaProcessor : public RangeProcessor
const uno::Any& m_aVal;
public:
RangeFormulaProcessor( const uno::Any& rVal ):m_aVal( rVal ) {}
+ virtual ~RangeFormulaProcessor() {}
virtual void process( const uno::Reference< excel::XRange >& xRange )
{
xRange->setFormula( m_aVal );
@@ -1047,6 +1052,7 @@ class RangeCountProcessor : public RangeProcessor
sal_Int32 nCount;
public:
RangeCountProcessor():nCount(0){}
+ virtual ~RangeCountProcessor() {}
virtual void process( const uno::Reference< excel::XRange >& xRange )
{
nCount = nCount + xRange->getCount();