File indexing completed on 2024-05-12 16:29:20

0001 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
0002 /* writerperfect
0003  * Version: MPL 2.0 / LGPLv2.1+
0004  *
0005  * This Source Code Form is subject to the terms of the Mozilla Public
0006  * License, v. 2.0. If a copy of the MPL was not distributed with this
0007  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
0008  *
0009  * Major Contributor(s):
0010  * Copyright (C) 2002-2004 William Lachance (wrlach@gmail.com)
0011  * Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
0012  *
0013  * For minor contributions see the git repository.
0014  *
0015  * Alternatively, the contents of this file may be used under the terms
0016  * of the GNU Lesser General Public License Version 2.1 or later
0017  * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are
0018  * applicable instead of those above.
0019  *
0020  * For further information visit http://libwpd.sourceforge.net
0021  */
0022 
0023 #ifndef _STRING_DOCUMENT_HANDLER_H
0024 #define _STRING_DOCUMENT_HANDLER_H
0025 
0026 #include <libodfgen/libodfgen.hxx>
0027 
0028 class StringDocumentHandler : public OdfDocumentHandler
0029 {
0030 public:
0031     StringDocumentHandler();
0032 
0033     char const *cstr() const
0034     {
0035         return m_data.cstr();
0036     }
0037 
0038     void startDocument() override {}
0039     void endDocument() override;
0040     void startElement(const char *psName, const librevenge::RVNGPropertyList &xPropList) override;
0041     void endElement(const char *psName) override;
0042     void characters(const librevenge::RVNGString &sCharacters) override;
0043 private:
0044 private:
0045     librevenge::RVNGString m_data;
0046     bool m_isTagOpened;
0047     librevenge::RVNGString m_openedTagName;
0048 };
0049 #endif
0050 
0051 /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */