Changeset View
Changeset View
Standalone View
Standalone View
src/wrtembed/KReportDesigner.cpp
Show First 20 Lines • Show All 345 Lines • ▼ Show 20 Line(s) | 339 | { | |||
---|---|---|---|---|---|
346 | content.setAttribute(QLatin1String("xmlns:svg"), QLatin1String("urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0")); | 346 | content.setAttribute(QLatin1String("xmlns:svg"), QLatin1String("urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0")); | ||
347 | 347 | | |||
348 | doc.appendChild(content); | 348 | doc.appendChild(content); | ||
349 | 349 | | |||
350 | //title | 350 | //title | ||
351 | content.appendChild(propertyToElement(&doc, d->title)); | 351 | content.appendChild(propertyToElement(&doc, d->title)); | ||
352 | 352 | | |||
353 | #ifdef KREPORT_SCRIPTING | 353 | #ifdef KREPORT_SCRIPTING | ||
354 | saveInterpreter = d->originalInterpreter; | ||||
355 | | ||||
354 | if (!d->script->value().toString().isEmpty()) { | 356 | if (!d->script->value().toString().isEmpty()) { | ||
355 | if (d->script->value().toString() != d->originalScript || d->originalInterpreter == QLatin1String("qtscript")) { | 357 | if (d->script->value().toString() != d->originalScript || d->originalInterpreter == QLatin1String("qtscript") || d->originalInterpreter.isEmpty() ) { | ||
356 | //The script has changed so force interpreter to 'javascript'. Also set if was using qtscript | 358 | //The script has changed so force interpreter to 'javascript'. Also set if was using qtscript | ||
357 | saveInterpreter = QLatin1String("javascript"); | 359 | saveInterpreter = QLatin1String("javascript"); | ||
358 | } else { | 360 | } | ||
359 | saveInterpreter = d->originalInterpreter; | | |||
360 | } | 361 | } | ||
361 | 362 | | |||
362 | QDomElement scr = propertyToElement(&doc, d->script); | 363 | QDomElement scr = propertyToElement(&doc, d->script); | ||
363 | scr.setAttribute(QLatin1String("report:script-interpreter"), saveInterpreter); | 364 | scr.setAttribute(QLatin1String("report:script-interpreter"), saveInterpreter); | ||
364 | content.appendChild(scr); | 365 | content.appendChild(scr); | ||
365 | } | | |||
366 | #endif | 366 | #endif | ||
367 | 367 | | |||
368 | QDomElement grd = doc.createElement(QLatin1String("report:grid")); | 368 | QDomElement grd = doc.createElement(QLatin1String("report:grid")); | ||
369 | KReportUtils::addPropertyAsAttribute(&grd, d->showGrid); | 369 | KReportUtils::addPropertyAsAttribute(&grd, d->showGrid); | ||
370 | KReportUtils::addPropertyAsAttribute(&grd, d->gridDivisions); | 370 | KReportUtils::addPropertyAsAttribute(&grd, d->gridDivisions); | ||
371 | KReportUtils::addPropertyAsAttribute(&grd, d->gridSnap); | 371 | KReportUtils::addPropertyAsAttribute(&grd, d->gridSnap); | ||
372 | KReportUtils::addPropertyAsAttribute(&grd, d->unit); | 372 | KReportUtils::addPropertyAsAttribute(&grd, d->unit); | ||
373 | content.appendChild(grd); | 373 | content.appendChild(grd); | ||
▲ Show 20 Lines • Show All 1150 Lines • Show Last 20 Lines |