okular/generators/ooo/generator_ooo.cpp

44 lines
1.7 KiB
C++
Raw Normal View History

/***************************************************************************
* Copyright (C) 2006 by Tobias Koenig <tokoe@kde.org> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
***************************************************************************/
#include "generator_ooo.h"
#include "converter.h"
#include <KAboutData>
2014-10-08 11:37:04 +00:00
#include <KLocalizedString>
#include <kconfigdialog.h>
#ifdef WITH_KWALLET
# include <kwallet.h>
#endif
OKULAR_EXPORT_PLUGIN(KOOOGenerator, "libokularGenerator_ooo.json")
KOOOGenerator::KOOOGenerator( QObject *parent, const QVariantList &args )
2015-10-29 12:37:11 +00:00
: Okular::TextDocumentGenerator( new OOO::Converter, QStringLiteral("okular_ooo_generator_settings"), parent, args )
{
}
void KOOOGenerator::addPages( KConfigDialog* dlg )
{
Okular::TextDocumentSettingsWidget *widget = new Okular::TextDocumentSettingsWidget();
2015-10-29 12:37:11 +00:00
dlg->addPage( widget, generalSettings(), i18n("OpenDocument Text"), QStringLiteral("application-vnd.oasis.opendocument.text"), i18n("OpenDocument Text Backend Configuration") );
}
void KOOOGenerator::walletDataForFile( const QString &fileName, QString *walletName, QString *walletFolder, QString *walletKey ) const
{
*walletKey = fileName + QStringLiteral("/opendocument");
#ifdef WITH_KWALLET
*walletName = KWallet::Wallet::LocalWallet();
*walletFolder = KWallet::Wallet::PasswordFolder();
#endif
}
2014-10-02 11:43:03 +00:00
#include "generator_ooo.moc"