MCPcopy Create free account
hub / github.com/KDE/okular / renumber

Method renumber

generators/dvi/dviFile.cpp:321–346  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321void dvifile::renumber()
322{
323 dviData.detach();
324
325 // Write the page number to the file, taking good care of byte
326 // orderings.
327 bool bigEndian = (QSysInfo::ByteOrder == QSysInfo::BigEndian);
328
329 for (int i = 1; i <= total_pages; i++) {
330 quint8 *ptr = dviData.data() + page_offset[i - 1] + 1;
331 const quint8 *num = reinterpret_cast<quint8 *>(&i);
332 for (quint8 j = 0; j < 4; j++) {
333 if (bigEndian) {
334 *(ptr++) = num[0];
335 *(ptr++) = num[1];
336 *(ptr++) = num[2];
337 *(ptr++) = num[3];
338 } else {
339 *(ptr++) = num[3];
340 *(ptr++) = num[2];
341 *(ptr++) = num[1];
342 *(ptr++) = num[0];
343 }
344 }
345 }
346}
347
348void dvifile::pdf2psNotFound(const QString &PDFFilename, QString *converrorms)
349{

Callers 1

DVIExportToPSMethod · 0.80

Calls 1

dataMethod · 0.45

Tested by

no test coverage detected