You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

43 lines
1.7 KiB

/***************************************************************************
* 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>
#include <KConfigDialog>
#include <KLocalizedString>
#ifdef WITH_KWALLET
#include <kwallet.h>
#endif
OKULAR_EXPORT_PLUGIN(KOOOGenerator, "libokularGenerator_ooo.json")
KOOOGenerator::KOOOGenerator(QObject *parent, const QVariantList &args)
: Okular::TextDocumentGenerator(new OOO::Converter, QStringLiteral("okular_ooo_generator_settings"), parent, args)
{
}
void KOOOGenerator::addPages(KConfigDialog *dlg)
{
Okular::TextDocumentSettingsWidget *widget = new Okular::TextDocumentSettingsWidget();
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
}
#include "generator_ooo.moc"