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

« back to all changes in this revision

Viewing changes to lib/kformula/kformuladocument.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:
40
40
class ContextStyle;
41
41
class SymbolAction;
42
42
class SymbolTable;
 
43
class DocumentWrapper;
43
44
 
44
45
 
45
46
/**
63
64
 * bother to ask the document. It's legal to directly create
64
65
 * or destroy a Container object.
65
66
 */
66
 
class Document : public QObject {
 
67
class KOFORMULA_EXPORT Document : public QObject {
67
68
    Q_OBJECT
68
69
 
69
70
    friend class DocumentWrapper;
106
107
     * Load a kformula DomDocument with all its formulas.
107
108
     * This must only be called on a virgin document.
108
109
     */
109
 
    bool loadXML( QDomDocument doc );
 
110
    bool loadXML( const QDomDocument& doc );
110
111
 
111
112
    /**
 
113
     * Load a OASIS content.xml DomDocument
 
114
     * @since 1.4
 
115
     */
 
116
    bool loadOasis( const QDomDocument& doc );
 
117
    
 
118
    /**
112
119
     * Load the document settings.
113
120
     */
114
121
    bool loadDocumentPart( QDomElement node );
121
128
    /**
122
129
     * Save the document settings.
123
130
     */
124
 
    QDomElement saveDocumentPart( QDomDocument doc );
 
131
    QDomElement saveDocumentPart( QDomDocument& doc );
125
132
 
126
133
 
127
134
    /**
261
268
 * A Wrapper that constracts the actions and must be given a real
262
269
 * document to work with.
263
270
 */
264
 
class DocumentWrapper : public QObject {
 
271
class KOFORMULA_EXPORT DocumentWrapper : public QObject {
265
272
    Q_OBJECT
266
273
 
267
274
public:
280
287
    Document* document() const { return m_document; }
281
288
 
282
289
    /**
 
290
     * Enables our action according to enabled.
 
291
     */
 
292
    void setEnabled( bool enabled );
 
293
 
 
294
    /**
283
295
     * Inserts the document we are wrapping. This must be called once
284
296
     * before the wrapper can be used.
285
297
     */
321
333
    KAction* getInsertRowAction()        { return m_insertRowAction; }
322
334
    KAction* getRemoveRowAction()        { return m_removeRowAction; }
323
335
 
 
336
    void enableMatrixActions(bool);
324
337
    KSelectAction* getLeftBracketAction()  { return m_leftBracket; }
325
338
    KSelectAction* getRightBracketAction() { return m_rightBracket; }
326
339
    SymbolAction* getSymbolNamesAction()  { return m_symbolNamesAction; }