Commit 68321206 authored by Boudewijn Rempt's avatar Boudewijn Rempt

Add some more loading api, unittest will follow

svn path=/trunk/koffice/; revision=664145
parent 4c82b9b7
......@@ -34,6 +34,9 @@ public:
const QString id, name;
QString tooltip;
QString iconName;
quint32 loadingPriority;
QString odfElementName;
};
......@@ -59,6 +62,23 @@ QString KoShapeFactory::name() const {
return d->name;
}
int KoShapeFactory::loadingPriority() const
{
return d->loadingPriority;
}
QString KoShapeFactory::odfElementName() const
{
return d->odfElementName;
}
bool KoShapeFactory::supports(KoXmlElement e) const
{
Q_UNUSED( e );
// XXX: Implement
return false;
}
void KoShapeFactory::addTemplate(KoShapeTemplate &params) {
params.id = d->id;
d->templates.append(params);
......
......@@ -27,6 +27,8 @@
#include <flake_export.h>
#include <KoXmlReader.h>
class KoShape;
class KoProperties;
class KoShapeConfigFactory;
......@@ -172,6 +174,17 @@ public:
*/
QString name() const;
/// lower prio means the shape is more generic and will be checked later
int loadingPriority() const;
/// the name used for quick checking if this shapeFactory is able to
/// load Odf data identified by the element name.
QString odfElementName() const;
/// returns true if this shapeFactory is able to load the ODF type
/// started at argument element. ('draw:line' / 'draw:frame' / etc)
bool supports(KoXmlElement e) const;
protected:
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment