filters

pptxml.h

00001 /*
00002     Copyright (C) 2000, S.R.Haque <shaheedhaque@hotmail.com>.
00003     This file is part of the KDE project
00004 
00005     This library is free software; you can redistribute it and/or
00006     modify it under the terms of the GNU Library General Public
00007     License as published by the Free Software Foundation; either
00008     version 2 of the License, or (at your option) any later version.
00009 
00010     This library is distributed in the hope that it will be useful,
00011     but WITHOUT ANY WARRANTY; without even the implied warranty of
00012     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013     Library General Public License for more details.
00014 
00015     You should have received a copy of the GNU Library General Public License
00016     along with this library; see the file COPYING.LIB.  If not, write to
00017     the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00018     Boston, MA 02111-1307, USA.
00019 
00020 DESCRIPTION
00021 */
00022 
00023 #ifndef PPTXML_H
00024 #define PPTXML_H
00025 
00026 #include <pptdoc.h>
00027 #include <qobject.h>
00028 #include <qstring.h>
00029 
00030 #define ALIGN_LEFT      1
00031 #define ALIGN_RIGHT     2
00032 #define ALIGN_CENTER    4
00033 #define ALIGN_JUSTIFY   8
00034 
00035 class myFile;
00036 class QDomDocument;
00037 
00038 class PptXml:
00039     public QObject,
00040     private PptDoc
00041 {
00042 
00043     Q_OBJECT
00044 
00045 public:
00046     PptXml(
00047         const myFile &mainStream,
00048         const myFile &currentUser,
00049         const myFile &pictures);
00050     ~PptXml();
00051 
00052     bool convert();
00053 
00054     const QString getXml() const;
00055 
00056 signals:
00057     // See olefilter.h for information
00058     void signalSavePic(
00059         const QString &nameIN,
00060         QString &storageId,
00061         const QString &extension,
00062         unsigned int length,
00063         const char *data);
00064 
00065     void signalSavePart(
00066         const QString &nameIN,
00067         QString &storageId,
00068         QString &mimeType,
00069         const QString &extension,
00070         unsigned int length,
00071         const char *data);
00072 
00073     void signalPart(
00074         const QString& nameIN,
00075         QString &storageId,
00076         QString &mimeType);
00077 
00078 private:
00079     PptXml(const PptXml &);
00080     const PptXml &operator=(const PptXml &);
00081 
00082     // Error handling and reporting support.
00083 
00084     static const int s_area;
00085 
00086     // The conversion is done exactly once. Has it already happened?
00087 
00088     bool m_isConverted;
00089     bool m_success;
00090     bool m_half;
00091     unsigned m_y;
00092     QString m_embedded;
00093     QString m_pages;
00094     QString m_titles;
00095     QString m_notes;
00096     QString m_text;
00097     void encode(QString &text);
00098 
00099     // Override the base class functions.
00100 
00101     void gotDrawing(
00102         unsigned id,
00103         QString type,
00104         unsigned length,
00105         const char *data);
00106     void gotSlide(PptSlide &slide);
00107     void setPlaceholder(PptSlide &slide);
00108 };
00109 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys