/* This file is part of the wvWare 2 project Copyright (C) 2002-2003 Werner Trobin This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License version 2 as published by the Free Software Foundation. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef FOOTNOTES97_H #define FOOTNOTES97_H #include "global.h" #include "functordata.h" #include namespace wvWare { namespace Word97 { struct FIB; struct FRD; } template class PLCF; template class PLCFIterator; class OLEStreamReader; struct FootnoteData; /** * @internal */ class Footnotes97 { public: Footnotes97( OLEStreamReader* tableStream, const Word97::FIB& fib ); ~Footnotes97(); /** * Get the FootnoteData for the footnote/endnote at @param globalCP. * The @param ok flag is true if a footnote/endnote has been found. * If @žaram ok is false no footnote/endnote has been found and the * returned FootnoteData structure is invalid. */ FootnoteData footnote( U32 globalCP, bool& ok ); /** * Returns the global CP of the next footnote reference, * 0xffffffff if none exists. */ U32 nextFootnote() const; /** * Returns the global CP of the next endnote reference, * 0xffffffff if none exists. */ U32 nextEndnote() const; private: Footnotes97( const Footnotes97& rhs ); Footnotes97& operator=( const Footnotes97& rhs ); // Ugly, but helps to avoid code duplication void init( U32 fcRef, U32 lcbRef, U32 fcTxt, U32 lcbTxt, OLEStreamReader* tableStream, PLCF** ref, PLCFIterator** refIt, std::vector& txt, std::vector::const_iterator& txtIt ); PLCF* m_footnoteRef; PLCFIterator* m_footnoteRefIt; std::vector m_footnoteTxt; std::vector::const_iterator m_footnoteTxtIt; PLCF* m_endnoteRef; PLCFIterator* m_endnoteRefIt; std::vector m_endnoteTxt; std::vector::const_iterator m_endnoteTxtIt; }; } // namespace wvWare #endif // FOOTNOTES97_H