mirror of
https://invent.kde.org/graphics/okular
synced 2024-11-05 18:34:53 +00:00
c325b342f3
Summary: Disables KWallet integration if there's no KWallet, KJS if there's no KJS and KDocTools. Here's a list of frameworks that don't work on Android: https://cgit.kde.org/sysadmin/ci-tooling.git/tree/local-metadata/project-ignore-rules.yaml Test Plan: Still works locally, ran Okular and Okular Mobile on Android. Reviewers: #okular, aacid Subscribers: aacid Tags: #okular Differential Revision: https://phabricator.kde.org/D12177
43 lines
1.7 KiB
C++
43 lines
1.7 KiB
C++
/***************************************************************************
|
|
* 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 <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 )
|
|
: 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"
|