~ubuntu-branches/ubuntu/breezy/koffice/breezy-security

« back to all changes in this revision

Viewing changes to krita/tools/kis_tool_ellipse.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2005-10-11 14:49:50 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051011144950-lwpngbifzp8nk0ds
Tags: 1:1.4.1-0ubuntu7
* SECURITY UPDATE: fix heap based buffer overflow in the RTF importer of KWord
* Opening specially crafted RTF files in KWord can cause
  execution of abitrary code.
* Add kubuntu_01_rtfimport_heap_overflow.diff
* References:
  CAN-2005-2971
  CESA-2005-005
  http://www.koffice.org/security/advisory-20051011-1.txt

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  kis_tool_ellipse.h - part of Krayon
 
3
 *
 
4
 *  Copyright (c) 2000 John Califf <jcaliff@compuzone.net>
 
5
 *  Copyright (c) 2002 Patrick Julien <freak@codepimps.org>
 
6
 *  Copyright (c) 2004 Clarence Dang <dang@kde.org>
 
7
 *
 
8
 *  This program is free software; you can redistribute it and/or modify
 
9
 *  it under the terms of the GNU General Public License as published by
 
10
 *  the Free Software Foundation; either version 2 of the License, or
 
11
 *  (at your option) any later version.
 
12
 *
 
13
 *  This program is distributed in the hope that it will be useful,
 
14
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
15
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
16
 *  GNU General Public License for more details.
 
17
 *
 
18
 *  You should have received a copy of the GNU General Public License
 
19
 *  along with this program; if not, write to the Free Software
 
20
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
21
 */
 
22
 
 
23
#ifndef __KIS_TOOL_ELLIPSE_H__
 
24
#define __KIS_TOOL_ELLIPSE_H__
 
25
 
 
26
#include "kis_tool_shape.h"
 
27
 
 
28
class KisCanvas;
 
29
class KisDoc;
 
30
class KisPainter;
 
31
class KisView;
 
32
class KisRect;
 
33
 
 
34
class KisToolEllipse : public KisToolShape {
 
35
 
 
36
        typedef KisToolShape super;
 
37
        Q_OBJECT
 
38
 
 
39
public:
 
40
        KisToolEllipse();
 
41
        virtual ~KisToolEllipse();
 
42
 
 
43
        //
 
44
        // KisCanvasObserver interface
 
45
        //
 
46
 
 
47
        virtual void update (KisCanvasSubject *subject);
 
48
 
 
49
        //
 
50
        // KisToolPaint interface
 
51
        //
 
52
 
 
53
        virtual void setup(KActionCollection *collection);
 
54
 
 
55
        virtual void buttonPress(KisButtonPressEvent *event);
 
56
        virtual void move(KisMoveEvent *event);
 
57
        virtual void buttonRelease(KisButtonReleaseEvent *event);
 
58
 
 
59
protected:
 
60
        virtual void draw(const KisPoint& start, const KisPoint& stop);
 
61
 
 
62
protected:
 
63
        KisPoint m_dragCenter;
 
64
        KisPoint m_dragStart;
 
65
        KisPoint m_dragEnd;
 
66
 
 
67
        bool m_dragging;
 
68
        KisImageSP m_currentImage;
 
69
};
 
70
 
 
71
 
 
72
#include "kis_tool_factory.h"
 
73
 
 
74
class KisToolEllipseFactory : public KisToolFactory {
 
75
        typedef KisToolFactory super;
 
76
public:
 
77
        KisToolEllipseFactory(KActionCollection * ac) : super(ac) {};
 
78
        virtual ~KisToolEllipseFactory(){};
 
79
        
 
80
        virtual KisTool * createTool() { 
 
81
                KisTool * t =  new KisToolEllipse(); 
 
82
                Q_CHECK_PTR(t);
 
83
                t -> setup(m_ac);
 
84
                return t; 
 
85
        }
 
86
        virtual KisID id() { return KisID("ellipse", i18n("Ellipse tool")); }
 
87
};
 
88
 
 
89
 
 
90
#endif //__KIS_TOOL_ELLIPSE_H__
 
91