filters

powerpointfilter.cpp
1/* This file is part of the KDE project
2 Copyright (C) 1999 Werner Trobin <trobin@kde.org>
3
4 This library is free software; you can redistribute it and/or
5 modify it under the terms of the GNU Library General Public
6 License as published by the Free Software Foundation; either
7 version 2 of the License, or (at your option) any later version.
8
9 This library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Library General Public License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to
16 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 Boston, MA 02110-1301, USA.
18*/
19
20#include <pptxml.h>
21#include <powerpointfilter.h>
22
23PowerPointFilter::PowerPointFilter(
24 const myFile &mainStream,
25 const myFile &currentUser,
26 const myFile &pictures):
27 FilterBase()
28{
29 m_tree = new PptXml(mainStream, currentUser, pictures);
30
31 // Hook up the embedded object support.
32
33 connect(
34 m_tree,
35 TQ_SIGNAL(signalPart(const TQString&, TQString &, TQString &)),
36 this,
37 TQ_SIGNAL(signalPart(const TQString&, TQString &, TQString &)));
38
39 // Hook up the embedded picture support.
40
41 connect(
42 m_tree,
43 TQ_SIGNAL(signalSavePic(const TQString &, TQString &, const TQString &, unsigned int, const char *)),
44 this,
45 TQ_SIGNAL(signalSavePic(const TQString &, TQString &, const TQString &, unsigned int, const char *)));
46
47 // Hook up the embedded part support.
48
49 connect(
50 m_tree,
51 TQ_SIGNAL(signalSavePart(const TQString &, TQString &, TQString &, const TQString &, unsigned int, const char *)),
52 this,
53 TQ_SIGNAL(signalSavePart(const TQString &, TQString &, TQString &, const TQString &, unsigned int, const char *)));
54}
55
56PowerPointFilter::~PowerPointFilter()
57{
58 delete m_tree;
59}
60
61bool PowerPointFilter::filter()
62{
63 return m_tree->convert();
64}
65
66const TQDomDocument * const PowerPointFilter::part()
67{
68 m_part = TQDomDocument("DOC");
69 m_part.setContent(m_tree->getXml());
70 return &m_part;
71}
72
73#include <powerpointfilter.moc>