filters

powerpointfilter.cc

00001 /* This file is part of the KDE project
00002    Copyright (C) 1999 Werner Trobin <trobin@kde.org>
00003 
00004    This library is free software; you can redistribute it and/or
00005    modify it under the terms of the GNU Library General Public
00006    License as published by the Free Software Foundation; either
00007    version 2 of the License, or (at your option) any later version.
00008 
00009    This library is distributed in the hope that it will be useful,
00010    but WITHOUT ANY WARRANTY; without even the implied warranty of
00011    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012    Library General Public License for more details.
00013 
00014    You should have received a copy of the GNU Library General Public License
00015    along with this library; see the file COPYING.LIB.  If not, write to
00016    the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
00017    Boston, MA 02111-1307, USA.
00018 */
00019 
00020 #include <pptxml.h>
00021 #include <powerpointfilter.h>
00022 
00023 PowerPointFilter::PowerPointFilter(
00024     const myFile &mainStream,
00025     const myFile &currentUser,
00026     const myFile &pictures):
00027         FilterBase()
00028 {
00029     m_tree = new PptXml(mainStream, currentUser, pictures);
00030 
00031     // Hook up the embedded object support.
00032 
00033     connect(
00034         m_tree,
00035         SIGNAL(signalPart(const QString&, QString &, QString &)),
00036         this,
00037         SIGNAL(signalPart(const QString&, QString &, QString &)));
00038 
00039     // Hook up the embedded picture support.
00040 
00041     connect(
00042         m_tree,
00043         SIGNAL(signalSavePic(const QString &, QString &, const QString &, unsigned int, const char *)),
00044         this,
00045         SIGNAL(signalSavePic(const QString &, QString &, const QString &, unsigned int, const char *)));
00046 
00047     // Hook up the embedded part support.
00048 
00049     connect(
00050         m_tree,
00051         SIGNAL(signalSavePart(const QString &, QString &, QString &, const QString &, unsigned int, const char *)),
00052         this,
00053         SIGNAL(signalSavePart(const QString &, QString &, QString &, const QString &, unsigned int, const char *)));
00054 }
00055 
00056 PowerPointFilter::~PowerPointFilter()
00057 {
00058     delete m_tree;
00059 }
00060 
00061 bool PowerPointFilter::filter()
00062 {
00063     return m_tree->convert();
00064 }
00065 
00066 const QDomDocument * const PowerPointFilter::part()
00067 {
00068     m_part = QDomDocument("DOC");
00069     m_part.setContent(m_tree->getXml());
00070     return &m_part;
00071 }
00072 
00073 #include <powerpointfilter.moc>
KDE Home | KDE Accessibility Home | Description of Access Keys