2
* This file is part of Office 2007 Filters for KOffice
4
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
6
* Contact: Suresh Chande suresh.chande@nokia.com
8
* This library is free software; you can redistribute it and/or
9
* modify it under the terms of the GNU Lesser General Public License
10
* version 2.1 as published by the Free Software Foundation.
12
* This library is distributed in the hope that it will be useful, but
13
* WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15
* Lesser General Public License for more details.
17
* You should have received a copy of the GNU Lesser General Public
18
* License along with this library; if not, write to the Free Software
19
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
24
#ifndef DOCXXMLNOTESREADER_H
25
#define DOCXXMLNOTESREADER_H
27
#include <MsooXmlReader.h>
30
//! Data structure for a single note
34
DocxNote() : number(-1) {}
35
bool isNull() const { return number < 0; }
37
int number; //!< Note number, initialized to -1
40
//! A context structure for DocxXmlNotesReader
41
class DocxXmlNotesReaderContext : public MSOOXML::MsooXmlReaderContext
44
DocxXmlNotesReaderContext(QMap<int, DocxNote>& _notes);
45
QMap<int, DocxNote> *notes;
48
//! A class reading MSOOXML notes markup - endnotes.xml or footnotes.xml part.
49
class DocxXmlNotesReader : public MSOOXML::MsooXmlReader
52
explicit DocxXmlNotesReader(KoOdfWriters *writers);
53
virtual ~DocxXmlNotesReader();
54
virtual KoFilter::ConversionStatus read(MSOOXML::MsooXmlReaderContext* context = 0);
57
KoFilter::ConversionStatus read_notes();
58
KoFilter::ConversionStatus read_note(const char *noteType);
60
DocxXmlNotesReaderContext* m_context;
68
#endif //DOCXXMLNOTESREADER_H