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 INCLUDED_SW_SOURCE_FILTER_WW8_DOCXFOOTNOTES_HXX
21 #define INCLUDED_SW_SOURCE_FILTER_WW8_DOCXFOOTNOTES_HXX
23 #include <sal/types.h>
27 class SwFormatFootnote
;
31 typedef std::vector
< const SwFormatFootnote
* > FootnotesVector
;
33 /** Remember footnotes/endnotes so that we can dump them in one go.
35 Also remember the last added footnote Id to be able to write it in the
36 DocxAttributeOutput::EndRunProperties() method.
39 /// The current footnote, that was not written yet.
42 /// List of the footnotes.
43 FootnotesVector m_aFootnotes
;
46 FootnotesList() : m_nCurrent( -1 ) {}
48 void add( const SwFormatFootnote
& rFootnote
)
50 m_aFootnotes
.push_back( &rFootnote
);
51 m_nCurrent
= m_aFootnotes
.size() - 1;
54 /// Return the current footnote/endnote and clear the 'current' state.
55 const SwFormatFootnote
* getCurrent( sal_Int32
& rId
)
57 // anything to write at all?
64 // skip ids 0 and 1 - they are reserved for separator and
65 // continuationSeparator
68 const SwFormatFootnote
*pFootnote
= m_aFootnotes
[m_nCurrent
];
74 /// Return all the footnotes/endnotes.
75 const FootnotesVector
& getVector() const
80 /// Do we have any footnotes/endnotes at all?
83 return m_aFootnotes
.empty();
89 #endif // INCLUDED_SW_SOURCE_FILTER_WW8_DOCXFOOTNOTES_HXX
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */