summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode/fntcap.cxx
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 /sw/source/core/txtnode/fntcap.cxx
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 'sw/source/core/txtnode/fntcap.cxx')
-rw-r--r--sw/source/core/txtnode/fntcap.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index dce161822d58..aaac7060d6d8 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -118,8 +118,9 @@ protected:
SwDrawTextInfo &rInf;
SwCapitalInfo* pCapInf; // referes to additional information
// required by the ::Do function
-public:
SwDoCapitals ( SwDrawTextInfo &rInfo ) : rInf( rInfo ), pCapInf( 0 ) { }
+ ~SwDoCapitals() {}
+public:
virtual void Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont ) = 0;
virtual void Do() = 0;
inline OutputDevice& GetOut() { return rInf.GetOut(); }
@@ -138,6 +139,7 @@ protected:
Size aTxtSize;
public:
SwDoGetCapitalSize( SwDrawTextInfo &rInfo ) : SwDoCapitals ( rInfo ) { }
+ virtual ~SwDoGetCapitalSize() {}
virtual void Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont );
virtual void Do();
const Size &GetSize() const { return aTxtSize; }
@@ -198,6 +200,7 @@ public:
: SwDoCapitals ( rInfo ), pExtraPos( pExtra ), nTxtWidth( nWidth ),
nBreak( STRING_LEN )
{ }
+ virtual ~SwDoGetCapitalBreak() {}
virtual void Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont );
virtual void Do();
xub_StrLen GetBreak() const { return nBreak; }
@@ -288,6 +291,7 @@ public:
SwDoDrawCapital( SwDrawTextInfo &rInfo ) :
SwDoCapitals( rInfo ), pUpperFnt(0), pLowerFnt(0)
{ }
+ virtual ~SwDoDrawCapital() {}
virtual void Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont );
virtual void Do();
void DrawSpace( Point &rPos );
@@ -386,6 +390,7 @@ public:
SwDoCapitalCrsrOfst( SwDrawTextInfo &rInfo, const sal_uInt16 nOfs ) :
SwDoCapitals( rInfo ), pUpperFnt(0), pLowerFnt(0), nCrsr( 0 ), nOfst( nOfs )
{ }
+ virtual ~SwDoCapitalCrsrOfst() {}
virtual void Init( SwFntObj *pUpperFont, SwFntObj *pLowerFont );
virtual void Do();
@@ -471,6 +476,8 @@ public:
nCapWidth( nCapitalWidth ),
nOrgWidth( rInfo.GetWidth() )
{ }
+
+ virtual ~SwDoDrawStretchCapital() {}
};
/*************************************************************************