pptdoc.cpp
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 This file implements a simplified abstraction of Microsoft Powerpoint documents.
23*/
24
25#include <kdebug.h>
26#include <pptdoc.h>
27#include <tqptrlist.h>
28
29const int PptDoc::s_area = 30512;
30
31PptDoc::PptDoc(
32 const myFile &mainStream,
33 const myFile &currentUser,
34 const myFile &pictures) :
35 Powerpoint()
36{
37 m_mainStream = mainStream;
38 m_currentUser = currentUser;
39 m_pictures = pictures;
40}
41
42PptDoc::~PptDoc()
43{
44}
45/*
46void PptDoc::gotSlide(
47 PptSlide &slide)
48{
49 Slide ourSlide;
50 unsigned i;
51
52 for (i = 0; i < slide.text.count(); i++)
53 {
54 SlideText *text = slide.text.at(i);
55 TQStringList data(TQStringList::split(TQChar('\r'), text->data, true));
56 unsigned j;
57
58 switch (text->type)
59 {
60 case TITLE_TEXT:
61 case CENTER_TITLE_TEXT:
62 ourSlide.title = data.join("\n");
63 break;
64 case NOTES_TEXT:
65 ourSlide.notes = data.join("\n");
66 break;
67 case BODY_TEXT:
68 case OTHER_TEXT:
69 case CENTER_BODY_TEXT:
70 case HALF_BODY_TEXT:
71 case QUARTER_BODY_TEXT:
72 for (j = 0; j < data.count(); j++)
73 {
74 ourSlide.body.append(data[j]);
75 }
76 break;
77 }
78 }
79
80 gotSlide(slide);
81}
82*/
83
84bool PptDoc::parse()
85{
86 return Powerpoint::parse(m_mainStream, m_currentUser, m_pictures);
87}