filters

pptxml.h
1/*
2 Copyright (C) 2000, S.R.Haque <shaheedhaque@hotmail.com>.
3 This file is part of the KDE project
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19
20DESCRIPTION
21*/
22
23#ifndef PPTXML_H
24#define PPTXML_H
25
26#include <pptdoc.h>
27#include <tqobject.h>
28#include <tqstring.h>
29
30#define ALIGN_LEFT 1
31#define ALIGN_RIGHT 2
32#define ALIGN_CENTER 4
33#define ALIGN_JUSTIFY 8
34
35class myFile;
36class TQDomDocument;
37
38class PptXml:
39 public TQObject,
40 private PptDoc
41{
42
43 TQ_OBJECT
44
45
46public:
47 PptXml(
48 const myFile &mainStream,
49 const myFile &currentUser,
50 const myFile &pictures);
51 ~PptXml();
52
53 bool convert();
54
55 const TQString getXml() const;
56
57signals:
58 // See olefilter.h for information
59 void signalSavePic(
60 const TQString &nameIN,
61 TQString &storageId,
62 const TQString &extension,
63 unsigned int length,
64 const char *data);
65
66 void signalSavePart(
67 const TQString &nameIN,
68 TQString &storageId,
69 TQString &mimeType,
70 const TQString &extension,
71 unsigned int length,
72 const char *data);
73
74 void signalPart(
75 const TQString& nameIN,
76 TQString &storageId,
77 TQString &mimeType);
78
79private:
80 PptXml(const PptXml &);
81 const PptXml &operator=(const PptXml &);
82
83 // Error handling and reporting support.
84
85 static const int s_area;
86
87 // The conversion is done exactly once. Has it already happened?
88
89 bool m_isConverted;
90 bool m_success;
91 bool m_half;
92 unsigned m_y;
93 TQString m_embedded;
94 TQString m_pages;
95 TQString m_titles;
96 TQString m_notes;
97 TQString m_text;
98 void encode(TQString &text);
99
100 // Override the base class functions.
101
102 void gotDrawing(
103 unsigned id,
104 TQString type,
105 unsigned length,
106 const char *data);
107 void gotSlide(PptSlide &slide);
108 void setPlaceholder(PptSlide &slide);
109};
110#endif