~ubuntu-branches/ubuntu/natty/koffice/natty-security

« back to all changes in this revision

Viewing changes to filters/karbon/wpg/import/GraphicsElement.hxx

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2011-01-19 12:29:32 UTC
  • mfrom: (0.17.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20110119122932-8acdswnc4rc2owxq
Tags: 1:2.3.1-0ubuntu1
* New upstream release
* Add kubuntu_03_libwpg_02.diff from Fedora for libwpg 0.2 support,
  add back libwpg-dev build-depend
* Depend on libwpd-dev not libwpd8-dev
* Remove kubuntu_02_kpresenterpart.diff now upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* GraphicsElement: The items we are collecting to be put into the Writer
2
 
 * document: paragraph and spans of text, as well as section breaks.
3
 
 *
4
 
 * Copyright (C) 2002-2003 William Lachance (william.lachance@sympatico.ca)
5
 
 * 
6
 
 * This program is free software; you can redistribute it and/or
7
 
 * modify it under the terms of the GNU Lesser General Public
8
 
 * License as published by the Free Software Foundation; either
9
 
 * version 2 of the License, or (at your option) any later version.
10
 
 *
11
 
 * This program is distributed in the hope that it will be useful,
12
 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14
 
 * Library General Public License for more details.
15
 
 *
16
 
 * You should have received a copy of the GNU Library General Public
17
 
 * License along with this library; if not, write to the 
18
 
 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 
19
 
 * Boston, MA  02111-1301 USA
20
 
 *
21
 
 * For further information visit http://libwpd.sourceforge.net
22
 
 *
23
 
 */
24
 
 
25
 
/* "This product is not manufactured, approved, or supported by 
26
 
 * Corel Corporation or Corel Corporation Limited."
27
 
 */
28
 
 
29
 
#ifndef _GRAPHICSELEMENT_H
30
 
#define _GRAPHICSELEMENT_H
31
 
#include <string>
32
 
#include <map>
33
 
#include <vector>
34
 
 
35
 
#include "GraphicsHandler.hxx"
36
 
 
37
 
class GraphicsElement
38
 
{
39
 
public: 
40
 
        virtual ~GraphicsElement() {}
41
 
        virtual void write(GraphicsHandler *pHandler) const = 0;
42
 
        virtual void print() const {}
43
 
};
44
 
 
45
 
class TagGraphicsElement : public GraphicsElement
46
 
{
47
 
public:
48
 
        explicit TagGraphicsElement(const char *szTagName) : msTagName(szTagName) {}
49
 
        const std::string &getTagName() const { return msTagName; }
50
 
        virtual void print() const;
51
 
private:
52
 
        const std::string msTagName;
53
 
};
54
 
 
55
 
class OpenTagGraphicsElement : public TagGraphicsElement
56
 
{
57
 
public:
58
 
        explicit OpenTagGraphicsElement(const char *szTagName) : TagGraphicsElement(szTagName) {}
59
 
        ~OpenTagGraphicsElement() {}
60
 
        void addAttribute(const std::string &szAttributeName, const std::string &sAttributeValue);
61
 
        virtual void write(GraphicsHandler *pHandler) const;
62
 
        virtual void print () const;
63
 
private:
64
 
        std::vector<std::pair<std::string, std::string> > maAttrList;
65
 
};
66
 
 
67
 
class CloseTagGraphicsElement : public TagGraphicsElement
68
 
{
69
 
public:
70
 
        explicit CloseTagGraphicsElement(const char *szTagName) : TagGraphicsElement(szTagName) {}
71
 
        virtual void write(GraphicsHandler *pHandler) const;
72
 
};
73
 
 
74
 
class CharDataGraphicsElement : public GraphicsElement
75
 
{
76
 
public:
77
 
        CharDataGraphicsElement(const char *sData) : GraphicsElement(), msData(sData) {}
78
 
        virtual void write(GraphicsHandler *pHandler) const;
79
 
private:
80
 
        std::string msData;
81
 
};
82
 
 
83
 
 
84
 
#endif