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

« back to all changes in this revision

Viewing changes to kdgantt/KDGanttViewTaskLinkGroup.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
/* -*- Mode: C++ -*-
 
2
   $Id: KDGanttViewTaskLinkGroup.h 360310 2004-11-04 09:53:53Z danders $
 
3
   KDGantt - a multi-platform charting engine
 
4
*/
 
5
 
 
6
/****************************************************************************
 
7
 ** Copyright (C)  2002-2004 Klar�lvdalens Datakonsult AB.  All rights reserved.
 
8
 **
 
9
 ** This file is part of the KDGantt library.
 
10
 **
 
11
 ** This file may be distributed and/or modified under the terms of the
 
12
 ** GNU General Public License version 2 as published by the Free Software
 
13
 ** Foundation and appearing in the file LICENSE.GPL included in the
 
14
 ** packaging of this file.
 
15
 **
 
16
 ** Licensees holding valid commercial KDGantt licenses may use this file in
 
17
 ** accordance with the KDGantt Commercial License Agreement provided with
 
18
 ** the Software.
 
19
 **
 
20
 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
 
21
 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 
22
 **
 
23
 ** See http://www.klaralvdalens-datakonsult.se/Public/products/ for
 
24
 **   information about KDGantt Commercial License Agreements.
 
25
 **
 
26
 ** Contact info@klaralvdalens-datakonsult.se if any conditions of this
 
27
 ** licensing are not clear to you.
 
28
 **
 
29
 ** As a special exception, permission is given to link this program
 
30
 ** with any edition of Qt, and distribute the resulting executable,
 
31
 ** without including the source code for Qt in the source distribution.
 
32
 **
 
33
 **********************************************************************/
 
34
 
 
35
#ifndef KDGANTTVIEWTASKLINKGROUP_H
 
36
#define KDGANTTVIEWTASKLINKGROUP_H
 
37
 
 
38
#include "KDGanttViewTaskLink.h"
 
39
#include <qptrlist.h>
 
40
#include <qdict.h>
 
41
 
 
42
class KDTimeTableWidget;
 
43
class KDGanttView;
 
44
 
 
45
class KDGanttViewTaskLinkGroup : public QObject
 
46
{
 
47
public:
 
48
    KDGanttViewTaskLinkGroup( const QString& name );
 
49
    KDGanttViewTaskLinkGroup();
 
50
    ~KDGanttViewTaskLinkGroup();
 
51
    void insert (KDGanttViewTaskLink*) ;
 
52
    bool remove (KDGanttViewTaskLink*);
 
53
 
 
54
    void setVisible( bool show );
 
55
    bool visible() const;
 
56
 
 
57
    void setHighlight( bool highlight );
 
58
    bool highlight() const;
 
59
 
 
60
    void setColor( const QColor& color );
 
61
    QColor color() const;
 
62
    void setHighlightColor( const QColor& color );
 
63
    QColor highlightColor() const;
 
64
 
 
65
    static KDGanttViewTaskLinkGroup* find( const QString& name );
 
66
 
 
67
    void createNode( QDomDocument& doc,
 
68
                     QDomElement& parentElement );
 
69
    static KDGanttViewTaskLinkGroup* createFromDomElement( QDomElement& );
 
70
 
 
71
    void generateAndInsertName( const QString& name );
 
72
 
 
73
private:
 
74
    friend class KDTimeTableWidget;
 
75
    friend class KDGanttViewTaskLink;
 
76
 
 
77
    bool isvisible,ishighlighted;
 
78
    QColor myColor, myColorHL;
 
79
    QPtrList<KDGanttViewTaskLink> myTaskLinkList;
 
80
    QString _name;
 
81
 
 
82
    void insertItem(KDGanttViewTaskLink*);
 
83
    void removeItem (KDGanttViewTaskLink*);
 
84
 
 
85
    static QDict<KDGanttViewTaskLinkGroup> sGroupDict;
 
86
};
 
87
 
 
88
#endif