Commit 04b2c17f authored by Pierre Ducroquet's avatar Pierre Ducroquet

Clean up...

svn path=/trunk/koffice/; revision=689158
parent 6a06a9fc
......@@ -834,23 +834,16 @@ void KoTextLoader::loadSpan(KoTextLoadingContext& context, const KoXmlElement& p
QString result;
if (localName == "date") {
QDateTime dateTime = QDateTime::fromString(ts.attributeNS(KoXmlNS::text, "date-value"), Qt::ISODate);
KoInlineObject *dateObject = dateFactory->createInlineObject(new KoProperties());
if (dateFormat.isEmpty())
result = dateTime.date().toString(Qt::LocalDate);
//((KoVariable *)dateObject)->setValue(dateTime.date().toString(Qt::LocalDate));
else
result = dateTime.date().toString(dateFormat);
//((KoVariable *)dateObject)->setValue(dateTime.date().toString(dateFormat));
//kDebug() << dateTime.date().toString(dateFormat) << endl;
} else {
QDateTime dateTime = QDateTime::fromString(ts.attributeNS(KoXmlNS::text, "time-value"), Qt::ISODate);
KoInlineObject *dateObject = dateFactory->createInlineObject(new KoProperties());
if (dateFormat.isEmpty())
result = dateTime.time().toString(Qt::LocalDate);
//((KoVariable *)dateObject)->setValue(dateTime.time().toString(Qt::LocalDate));
else
result = dateTime.time().toString(dateFormat);
//((KoVariable *)dateObject)->setValue(dateTime.time().toString(dateFormat));
}
((KoVariable *)dateObject)->setValue(result);
textObjectManager->insertInlineObject(cursor, dateObject);
......
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