Changeset View
Changeset View
Standalone View
Standalone View
words/part/KWOdfWriter.cpp
Show First 20 Lines • Show All 311 Lines • ▼ Show 20 Line(s) | 306 | foreach (KoShape *shape, fs->shapes()) { | |||
---|---|---|---|---|---|
312 | 312 | | |||
313 | if (shape->minimumHeight() > 1) { | 313 | if (shape->minimumHeight() > 1) { | ||
314 | shape->setAdditionalAttribute("fo:min-height", QString::number(shape->minimumHeight()) + "pt"); | 314 | shape->setAdditionalAttribute("fo:min-height", QString::number(shape->minimumHeight()) + "pt"); | ||
315 | } | 315 | } | ||
316 | 316 | | |||
317 | // shape properties | 317 | // shape properties | ||
318 | const qreal pagePos = page.offsetInDocument(); | 318 | const qreal pagePos = page.offsetInDocument(); | ||
319 | 319 | | |||
320 | shape->setAdditionalAttribute("text:anchor-type", "page"); | | |||
321 | shape->setAdditionalAttribute("text:anchor-page-number", QString::number(page.pageNumber())); | 320 | shape->setAdditionalAttribute("text:anchor-page-number", QString::number(page.pageNumber())); | ||
322 | context.addShapeOffset(shape, QTransform(1, 0, 0 , 1, 0, -pagePos)); | 321 | context.addShapeOffset(shape, QTransform(1, 0, 0 , 1, 0, -pagePos)); | ||
323 | shape->saveOdf(context); | 322 | m_document->anchorOfShape(shape)->saveOdf(context); | ||
324 | context.removeShapeOffset(shape); | 323 | context.removeShapeOffset(shape); | ||
325 | shape->removeAdditionalAttribute("fo:min-height"); | 324 | shape->removeAdditionalAttribute("fo:min-height"); | ||
326 | shape->removeAdditionalAttribute("text:anchor-page-number"); | 325 | shape->removeAdditionalAttribute("text:anchor-page-number"); | ||
327 | shape->removeAdditionalAttribute("text:anchor-page-number"); | | |||
328 | shape->removeAdditionalAttribute("text:anchor-type"); | 326 | shape->removeAdditionalAttribute("text:anchor-type"); | ||
329 | } | 327 | } | ||
330 | } | 328 | } | ||
331 | 329 | | |||
332 | if (mainTextFrame) { | 330 | if (mainTextFrame) { | ||
333 | if (! mainTextFrame->shapes().isEmpty() && mainTextFrame->shapes().first()) { | 331 | if (! mainTextFrame->shapes().isEmpty() && mainTextFrame->shapes().first()) { | ||
334 | KoTextShapeData *shapeData = qobject_cast<KoTextShapeData *>(mainTextFrame->shapes().first()->userData()); | 332 | KoTextShapeData *shapeData = qobject_cast<KoTextShapeData *>(mainTextFrame->shapes().first()->userData()); | ||
335 | if (shapeData) { | 333 | if (shapeData) { | ||
▲ Show 20 Lines • Show All 168 Lines • Show Last 20 Lines |