kpresenter

KPrBgSpellCheck.cpp
1/* This file is part of the KDE project
2 Copyright (C) 2002 David Faure <faure@kde.org>
3 2002 Laurent Montel <lmontel@mandrakesoft.com>
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*/
20
21
22#include "KPrBgSpellCheck.h"
23#include "KPrDocument.h"
24#include "KPrTextObject.h"
25
26#include "KoTextIterator.h"
27#include "KoTextObject.h"
28
29#include <tdespell2/broker.h>
30using namespace KSpell2;
31
32#include <kdebug.h>
33#include <tdeconfig.h>
34#include <tdelocale.h>
35
36KPrBgSpellCheck::KPrBgSpellCheck(KPrDocument *_doc)
37 : KoBgSpellCheck(Broker::openBroker( TDESharedConfig::openConfig( "kpresenterrc" ) ), _doc )
38{
39 m_doc=_doc;
40 m_currentObj=0L;
41}
42
43KPrBgSpellCheck::~KPrBgSpellCheck()
44{
45}
46
47
48KoTextIterator *KPrBgSpellCheck::createWholeDocIterator() const
49{
50 TQValueList<KoTextObject *> objects = m_doc->visibleTextObjects( );
51
52 kdDebug()<<"Number of visible text objects = "<< objects.count() << endl;
53
54 if ( objects.isEmpty() )
55 return 0;
56
57 return new KoTextIterator( objects, 0, 0 );
58}
59