kpresenter

KPrBgSpellCheck.cpp

00001 // -*- Mode: c++; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 4; -*-
00002 /* This file is part of the KDE project
00003    Copyright (C) 2002 David Faure <faure@kde.org>
00004    2002 Laurent Montel <lmontel@mandrakesoft.com>
00005 
00006    This library is free software; you can redistribute it and/or
00007    modify it under the terms of the GNU Library General Public
00008    License as published by the Free Software Foundation; either
00009    version 2 of the License, or (at your option) any later version.
00010 
00011    This library is distributed in the hope that it will be useful,
00012    but WITHOUT ANY WARRANTY; without even the implied warranty of
00013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014    Library General Public License for more details.
00015 
00016    You should have received a copy of the GNU Library General Public License
00017    along with this library; see the file COPYING.LIB.  If not, write to
00018    the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020 */
00021 
00022 
00023 #include "KPrBgSpellCheck.h"
00024 #include "KPrDocument.h"
00025 #include "KPrTextObject.h"
00026 
00027 #include "KoTextIterator.h"
00028 #include "KoTextObject.h"
00029 
00030 #include <kspell2/broker.h>
00031 using namespace KSpell2;
00032 
00033 #include <kdebug.h>
00034 #include <kconfig.h>
00035 #include <klocale.h>
00036 
00037 KPrBgSpellCheck::KPrBgSpellCheck(KPrDocument *_doc)
00038     : KoBgSpellCheck(Broker::openBroker( KSharedConfig::openConfig( "kpresenterrc" ) ), _doc )
00039 {
00040     m_doc=_doc;
00041     m_currentObj=0L;
00042 }
00043 
00044 KPrBgSpellCheck::~KPrBgSpellCheck()
00045 {
00046 }
00047 
00048 
00049 KoTextIterator *KPrBgSpellCheck::createWholeDocIterator() const
00050 {
00051     QValueList<KoTextObject *> objects = m_doc->visibleTextObjects( );
00052 
00053     kdDebug()<<"Number of visible text objects = "<< objects.count() << endl;
00054 
00055     if ( objects.isEmpty() )
00056         return 0;
00057 
00058     return new KoTextIterator( objects, 0, 0 );
00059 }
00060 
KDE Home | KDE Accessibility Home | Description of Access Keys