~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to filters/kword/msword-odf/wv2/src/footnotes97.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-09-21 15:36:35 UTC
  • mfrom: (1.4.1 upstream) (60.2.11 maverick)
  • Revision ID: james.westby@ubuntu.com-20100921153635-6tejqkiro2u21ydi
Tags: 1:2.2.2-0ubuntu3
Add kubuntu_03_fix-crash-on-closing-sqlite-connection-2.2.2.diff and
kubuntu_04_support-large-memo-values-for-msaccess-2.2.2.diff as
recommended by upstream http://kexi-
project.org/wiki/wikiview/index.php@Kexi2.2_Patches.html#sqlite_stab
ility

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* This file is part of the wvWare 2 project
 
2
   Copyright (C) 2002-2003 Werner Trobin <trobin@kde.org>
 
3
 
 
4
   This library is free software; you can redistribute it and/or
 
5
   modify it under the terms of the GNU Library General Public
 
6
   License version 2 as published by the Free Software Foundation.
 
7
 
 
8
   This library is distributed in the hope that it will be useful,
 
9
   but WITHOUT ANY WARRANTY; without even the implied warranty of
 
10
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
11
   Library General Public License for more details.
 
12
 
 
13
   You should have received a copy of the GNU Library General Public License
 
14
   along with this library; see the file COPYING.LIB.  If not, write to
 
15
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
16
   Boston, MA 02111-1307, USA.
 
17
*/
 
18
 
 
19
#ifndef FOOTNOTES97_H
 
20
#define FOOTNOTES97_H
 
21
 
 
22
#include "global.h"
 
23
#include "functordata.h"
 
24
 
 
25
#include <vector>
 
26
#include "wv2_export.h"
 
27
 
 
28
namespace wvWare
 
29
{
 
30
    namespace Word97
 
31
    {
 
32
        struct FIB;
 
33
        struct FRD;
 
34
    }
 
35
    template<class T> class PLCF;
 
36
    template<class T> class PLCFIterator;
 
37
    class OLEStreamReader;
 
38
    struct FootnoteData;
 
39
 
 
40
    /**
 
41
     * @internal
 
42
     */
 
43
    class Footnotes97
 
44
    {
 
45
    public:
 
46
        Footnotes97( OLEStreamReader* tableStream, const Word97::FIB& fib );
 
47
        ~Footnotes97();
 
48
 
 
49
        /**
 
50
         * Get the FootnoteData for the footnote/endnote at @param globalCP.
 
51
         * The @param ok flag is true if a footnote/endnote has been found.
 
52
         * If @param ok is false no footnote/endnote has been found and the
 
53
         * returned FootnoteData structure is invalid.
 
54
         */
 
55
        FootnoteData footnote( U32 globalCP, bool& ok );
 
56
 
 
57
        /**
 
58
         * Returns the global CP of the next footnote reference,
 
59
         * 0xffffffff if none exists.
 
60
         */
 
61
        U32 nextFootnote() const;
 
62
        /**
 
63
         * Returns the global CP of the next endnote reference,
 
64
         * 0xffffffff if none exists.
 
65
         */
 
66
        U32 nextEndnote() const;
 
67
 
 
68
    private:
 
69
        Footnotes97( const Footnotes97& rhs );
 
70
        Footnotes97& operator=( const Footnotes97& rhs );
 
71
 
 
72
        // Ugly, but helps to avoid code duplication
 
73
        void init( U32 fcRef, U32 lcbRef, U32 fcTxt, U32 lcbTxt, OLEStreamReader* tableStream,
 
74
                   PLCF<Word97::FRD>** ref, PLCFIterator<Word97::FRD>** refIt,
 
75
                   std::vector<U32>& txt, std::vector<U32>::const_iterator& txtIt );
 
76
 
 
77
        PLCF<Word97::FRD>* m_footnoteRef;
 
78
        PLCFIterator<Word97::FRD>* m_footnoteRefIt;
 
79
        std::vector<U32> m_footnoteTxt;
 
80
        std::vector<U32>::const_iterator m_footnoteTxtIt;
 
81
 
 
82
        PLCF<Word97::FRD>* m_endnoteRef;
 
83
        PLCFIterator<Word97::FRD>* m_endnoteRefIt;
 
84
        std::vector<U32> m_endnoteTxt;
 
85
        std::vector<U32>::const_iterator m_endnoteTxtIt;
 
86
    };
 
87
 
 
88
} // namespace wvWare
 
89
 
 
90
#endif // FOOTNOTES97_H