summaryrefslogtreecommitdiff
path: root/starmath
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 /starmath
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 'starmath')
-rw-r--r--starmath/inc/visitors.hxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/starmath/inc/visitors.hxx b/starmath/inc/visitors.hxx
index f4855dc93cbf..9f792124d1c4 100644
--- a/starmath/inc/visitors.hxx
+++ b/starmath/inc/visitors.hxx
@@ -65,12 +65,16 @@ public:
virtual void Visit( SmRootSymbolNode* pNode ) = 0;
virtual void Visit( SmRectangleNode* pNode ) = 0;
virtual void Visit( SmVerticalBraceNode* pNode ) = 0;
+
+protected:
+ ~SmVisitor() {}
};
/** Simple visitor for testing SmVisitor */
class SmVisitorTest : public SmVisitor
{
public:
+ virtual ~SmVisitorTest() {}
void Visit( SmTableNode* pNode );
void Visit( SmBraceNode* pNode );
void Visit( SmBracebodyNode* pNode );
@@ -142,6 +146,8 @@ public:
void Visit( SmRectangleNode* pNode );
void Visit( SmVerticalBraceNode* pNode );
protected:
+ ~SmDefaultingVisitor() {}
+
/** Method invoked by Visit methods by default */
virtual void DefaultVisit( SmNode* pNode ) = 0;
};
@@ -154,6 +160,7 @@ class SmCaretDrawingVisitor : public SmDefaultingVisitor
public:
/** Given position and device this constructor will draw the caret */
SmCaretDrawingVisitor( OutputDevice& rDevice, SmCaretPos position, Point offset, bool caretVisible );
+ virtual ~SmCaretDrawingVisitor() {}
void Visit( SmTextNode* pNode );
using SmDefaultingVisitor::Visit;
private:
@@ -181,6 +188,7 @@ public:
pos.pSelectedNode->Accept( this );
}
+ virtual ~SmCaretPos2LineVisitor() {}
void Visit( SmTextNode* pNode );
using SmDefaultingVisitor::Visit;
SmCaretLine GetResult( ){
@@ -212,6 +220,7 @@ public:
this->Position = position;
pTree->Accept( this );
}
+ virtual ~SmDrawingVisitor() {}
void Visit( SmTableNode* pNode );
void Visit( SmBraceNode* pNode );
void Visit( SmBracebodyNode* pNode );
@@ -268,6 +277,7 @@ class SmSetSelectionVisitor : public SmDefaultingVisitor
{
public:
SmSetSelectionVisitor( SmCaretPos startPos, SmCaretPos endPos, SmNode* pNode);
+ virtual ~SmSetSelectionVisitor() {}
void Visit( SmBinHorNode* pNode );
void Visit( SmUnHorNode* pNode );
void Visit( SmFontNode* pNode );
@@ -327,6 +337,7 @@ class SmCaretPosGraphBuildingVisitor : public SmVisitor
public:
/** Builds a caret position graph for pRootNode */
SmCaretPosGraphBuildingVisitor( SmNode* pRootNode );
+ virtual ~SmCaretPosGraphBuildingVisitor() {}
void Visit( SmTableNode* pNode );
void Visit( SmBraceNode* pNode );
void Visit( SmBracebodyNode* pNode );
@@ -372,6 +383,7 @@ class SmCloningVisitor : public SmVisitor
{
public:
SmCloningVisitor( ){ pResult = NULL; }
+ virtual ~SmCloningVisitor() {}
void Visit( SmTableNode* pNode );
void Visit( SmBraceNode* pNode );
void Visit( SmBracebodyNode* pNode );
@@ -417,6 +429,7 @@ class SmSelectionDrawingVisitor : public SmDefaultingVisitor
public:
/** Draws a selection on rDevice for the selection on pTree */
SmSelectionDrawingVisitor( OutputDevice& rDevice, SmNode* pTree, Point Offset );
+ virtual ~SmSelectionDrawingVisitor() {}
void Visit( SmTextNode* pNode );
using SmDefaultingVisitor::Visit;
private:
@@ -444,6 +457,7 @@ public:
: rCmdText( rText ) {
pNode->Accept( this );
}
+ virtual ~SmNodeToTextVisitor() {}
void Visit( SmTableNode* pNode );
void Visit( SmBraceNode* pNode );
void Visit( SmBracebodyNode* pNode );