1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef _DOCXFOOTNOTES_HXX_
21 #define _DOCXFOOTNOTES_HXX_
25 #include <rtl/string.hxx>
26 #include <rtl/ustring.hxx>
27 #include <sax/fshelper.hxx>
33 typedef ::std::vector
< const SwFmtFtn
* > FootnotesVector
;
35 /** Remember footnotes/endnotes so that we can dump them in one go.
37 Also rememeber the last added footnote Id to be able to write it in the
38 DocxAttributeOutput::EndRunProperties() method.
41 /// The current footnote, that was not written yet.
44 /// List of the footnotes.
45 FootnotesVector m_aFootnotes
;
48 FootnotesList() : m_nCurrent( -1 ) {}
50 void add( const SwFmtFtn
& rFootnote
)
52 m_aFootnotes
.push_back( &rFootnote
);
53 m_nCurrent
= m_aFootnotes
.size() - 1;
56 /// Return the current footnote/endnote and clear the 'current' state.
57 const SwFmtFtn
* getCurrent( sal_Int32
& rId
)
59 // skip ids 0 and 1 - they are reserved for separator and
60 // continuationSeparator
63 // anything to write at all?
70 const SwFmtFtn
*pFootnote
= m_aFootnotes
[m_nCurrent
];
76 /// Return all the footnotes/endnotes.
77 const FootnotesVector
& getVector() const
82 /// Do we have any footnotes/endnotes at all?
85 return m_aFootnotes
.empty();
91 #endif // _DOCXFOOTNOTES_HXX_
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */