LCOV - code coverage report
Current view: top level - libreoffice/writerperfect/source/filter - DocumentElement.hxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 15 0.0 %
Date: 2012-12-17 Functions: 0 20 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /* DocumentElement: The items we are collecting to be put into the Writer
       3             :  * document: paragraph and spans of text, as well as section breaks.
       4             :  *
       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/.
       8             :  *
       9             :  * For further information visit http://libwpd.sourceforge.net
      10             :  */
      11             : 
      12             : #ifndef _DOCUMENTELEMENT_H
      13             : #define _DOCUMENTELEMENT_H
      14             : #include <libwpd/libwpd.h>
      15             : #include <libwpd/WPXProperty.h>
      16             : #include <libwpd/WPXString.h>
      17             : #include <vector>
      18             : 
      19             : #include "OdfDocumentHandler.hxx"
      20             : 
      21           0 : class DocumentElement
      22             : {
      23             : public:
      24           0 :     virtual ~DocumentElement() {}
      25             :     virtual void write(OdfDocumentHandler *pHandler) const = 0;
      26           0 :     virtual void print() const {}
      27             : };
      28             : 
      29             : class TagElement : public DocumentElement
      30             : {
      31             : public:
      32           0 :     virtual ~TagElement() {}
      33           0 :     TagElement(const WPXString &szTagName) : msTagName(szTagName) {}
      34           0 :     const WPXString &getTagName() const
      35             :     {
      36           0 :         return msTagName;
      37             :     }
      38             :     virtual void print() const;
      39             : private:
      40             :     WPXString msTagName;
      41             : };
      42             : 
      43             : class TagOpenElement : public TagElement
      44             : {
      45             : public:
      46           0 :     TagOpenElement(const WPXString &szTagName) : TagElement(szTagName), maAttrList() {}
      47           0 :     virtual ~TagOpenElement() {}
      48             :     void addAttribute(const WPXString &szAttributeName, const WPXString &sAttributeValue);
      49             :     virtual void write(OdfDocumentHandler *pHandler) const;
      50             :     virtual void print () const;
      51             : private:
      52             :     WPXPropertyList maAttrList;
      53             : };
      54             : 
      55             : class TagCloseElement : public TagElement
      56             : {
      57             : public:
      58           0 :     TagCloseElement(const WPXString &szTagName) : TagElement(szTagName) {}
      59           0 :     virtual ~TagCloseElement() {}
      60             :     virtual void write(OdfDocumentHandler *pHandler) const;
      61             : };
      62             : 
      63             : class CharDataElement : public DocumentElement
      64             : {
      65             : public:
      66           0 :     CharDataElement(const WPXString &sData) : DocumentElement(), msData(sData) {}
      67           0 :     virtual ~CharDataElement() {}
      68             :     virtual void write(OdfDocumentHandler *pHandler) const;
      69             : private:
      70             :     WPXString msData;
      71             : };
      72             : 
      73             : class TextElement : public DocumentElement
      74             : {
      75             : public:
      76           0 :     TextElement(const WPXString &sTextBuf) : DocumentElement(), msTextBuf(sTextBuf, false) {}
      77           0 :     virtual ~TextElement() {}
      78             :     virtual void write(OdfDocumentHandler *pHandler) const;
      79             : 
      80             : private:
      81             :     WPXString msTextBuf;
      82             : };
      83             : 
      84             : #endif
      85             : 
      86             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10