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

« back to all changes in this revision

Viewing changes to kexi/core/keximainwindow.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
/* This file is part of the KDE project
 
2
   Copyright (C) 2003 Lucijan Busch <lucijan@kde.org>
 
3
   Copyright (C) 2003-2005 Jaroslaw Staniek <js@iidea.pl>
 
4
 
 
5
   This library is free software; you can redistribute it and/or
 
6
   modify it under the terms of the GNU Library General Public
 
7
   License as published by the Free Software Foundation; either
 
8
   version 2 of the License, or (at your option) any later version.
 
9
 
 
10
   This library is distributed in the hope that it will be useful,
 
11
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
13
   Library General Public License for more details.
 
14
 
 
15
   You should have received a copy of the GNU Library General Public License
 
16
   along with this library; see the file COPYING.LIB.  If not, write to
 
17
   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 
18
   Boston, MA 02111-1307, USA.
 
19
*/
 
20
 
 
21
#ifndef KEXIMAINWINDOW_H
 
22
#define KEXIMAINWINDOW_H
 
23
 
 
24
#include "kexisharedactionhost.h"
 
25
#include "kexi.h"
 
26
#include "tristate.h"
 
27
 
 
28
#include <kmdimainfrm.h>
 
29
 
 
30
#include <qintdict.h>
 
31
 
 
32
class KexiDialogBase;
 
33
class KexiProject;
 
34
namespace KexiPart {
 
35
        class Item;
 
36
}
 
37
 
 
38
/**
 
39
 * @short Kexi's main window interface
 
40
 * This interface is implemented by KexiMainWindowImpl class.
 
41
 * KexiMainWindow offers simple features what lowers cross-dependency (and also avoids
 
42
 * circular dependencies between Kexi modules).
 
43
 */
 
44
class KEXICORE_EXPORT KexiMainWindow : public KMdiMainFrm, public KexiSharedActionHost
 
45
{
 
46
        Q_OBJECT
 
47
        public:
 
48
                KexiMainWindow();
 
49
                virtual ~KexiMainWindow();
 
50
 
 
51
                //! Project data of currently opened project or NULL if no project here yet.
 
52
                virtual KexiProject *project() = 0;
 
53
                
 
54
                /*! Registers dialog \a dlg for watching and adds it to the main window's stack. */
 
55
                virtual void registerChild(KexiDialogBase *dlg) = 0;
 
56
 
 
57
                virtual QPopupMenu* findPopupMenu(const char *popupName) = 0;
 
58
 
 
59
                /*! Generates ID for private "document" like Relations window.
 
60
                 Private IDs are negative numbers (while ID regular part instance's IDs are >0)
 
61
                 Private means that the object is not stored as-is in the project but is somewhat 
 
62
                 generated and in most cases there is at most one unique instance document of such type (part).
 
63
                 To generate this ID, just app-wide internal counter is used. */
 
64
                virtual int generatePrivateID() = 0;
 
65
 
 
66
                /*! \return a list of all actions defined by application. 
 
67
                 Not all of them are shared. Don't use plug these actions 
 
68
                 in your windows by hand but user methods from KexiViewBase! */
 
69
                virtual KActionPtrList allActions() const = 0;
 
70
 
 
71
        public slots:
 
72
                //! Opens object pointed by \a item in a view \a viewMode
 
73
                virtual KexiDialogBase * openObject(KexiPart::Item *item, int viewMode = Kexi::DataViewMode) = 0;
 
74
                //! For convenience
 
75
                virtual KexiDialogBase * openObject(const QCString& mime, const QString& name, int viewMode = Kexi::DataViewMode) = 0;
 
76
 
 
77
                /*! Received information from active view that \a dlg has switched 
 
78
                its property buffer, so property editor contents should be reloaded. 
 
79
                 If \a force is true, property editor's data is reloaded even 
 
80
                 if the currently pointed buffer is the same as before.
 
81
                 If \a preservePrevSelection is true and there was a buffer 
 
82
                 set before call, previously selected item will be preselected 
 
83
                 in the editor (if found). */
 
84
                virtual void propertyBufferSwitched(KexiDialogBase *dlg, bool force=false, 
 
85
                        bool preservePrevSelection = true) = 0;
 
86
 
 
87
                /*! Saves dialog's \a dlg data. It dialog's data is never saved,
 
88
                 User is asked for name and caption, before saving.
 
89
                 \return true on successul closing or false on saving error.
 
90
                 If saving was cancelled by user, cancelled is returned.
 
91
                 \a messageWhenAskingForName is a i18n'ed text that will be visible
 
92
                 within name/caption dialog (see KexiNameDialog), which is popped 
 
93
                 up for never saved objects. */
 
94
                virtual tristate saveObject( KexiDialogBase *dlg,
 
95
                        const QString& messageWhenAskingForName = QString::null ) = 0;
 
96
        
 
97
                virtual tristate closeDialog(KexiDialogBase *dlg) = 0;
 
98
 
 
99
        protected slots:
 
100
                virtual void slotObjectRenamed(const KexiPart::Item &item) = 0;
 
101
 
 
102
};
 
103
 
 
104
 
 
105
#endif
 
106