mirror of
https://github.com/webodf/WebODF.git
synced 2026-11-30 16:47:58 +01:00
Give native client a dirview and reintroduce the ability to show odf files.
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
#include "odf.h"
|
||||
#include "odfcontainer.h"
|
||||
#include <QtCore/QDebug>
|
||||
|
||||
OdfContainer* Odf::getContainer(const QString& url) {
|
||||
return new OdfContainer(url, this);
|
||||
}
|
||||
|
||||
void
|
||||
Odf::addFile(const QString& containerid, const QString& path)
|
||||
{
|
||||
if (!openfiles.contains(containerid)) {
|
||||
openfiles.insert(containerid, new OdfContainer(path, this));
|
||||
}
|
||||
}
|
||||
|
||||
QString
|
||||
Odf::load(QString containerid, QString path, QVariant callback)
|
||||
{
|
||||
OdfContainer* c = openfiles.value(containerid);
|
||||
if (!c) return QString();
|
||||
return c->loadAsString(path);
|
||||
}
|
||||
Reference in New Issue
Block a user