filters
pptdoc.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 This file implements a simplified abstraction of Microsoft Powerpoint documents. 00023 */ 00024 00025 #ifndef PPTDOC_H 00026 #define PPTDOC_H 00027 00028 #include <kdebug.h> 00029 #include <myfile.h> 00030 #include <powerpoint.h> 00031 #include <qstring.h> 00032 #include <qstringlist.h> 00033 00034 class myFile; 00035 00036 class PptDoc: 00037 protected Powerpoint 00038 { 00039 protected: 00040 00041 // Construction. Invoke with the OLE streams that comprise the Powerpoint document. 00042 00043 PptDoc( 00044 const myFile &mainStream, 00045 const myFile ¤tUser, 00046 const myFile &pictures); 00047 virtual ~PptDoc(); 00048 00049 // Metadata. 00050 00051 QString getAuthor(void) const; 00052 00053 // Call the parse() function to process the document. The callbacks return 00054 // the text along with any relevant attributes. 00055 00056 bool parse(); 00057 00058 virtual void gotDrawing( 00059 unsigned id, 00060 QString type, 00061 unsigned length, 00062 const char *data) = 0; 00063 virtual void gotSlide(PptSlide &slide) = 0; 00064 00065 private: 00066 PptDoc(const PptDoc &); 00067 const PptDoc &operator=(const PptDoc &); 00068 00069 // Error handling and reporting support. 00070 00071 static const int s_area; 00072 00073 myFile m_mainStream; 00074 myFile m_currentUser; 00075 myFile m_pictures; 00076 00077 // Override the base class functions. 00078 00079 //void gotSlide( 00080 // PptSlide &slide); 00081 }; 00082 #endif