Changeset View
Changeset View
Standalone View
Standalone View
generators/dvi/psgs.cpp
Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Line(s) | |||||
90 | 90 | | |||
91 | 91 | | |||
92 | void ghostscript_interface::setBackgroundColor(const PageNumber& page, const QColor& background_color, bool permanent) { | 92 | void ghostscript_interface::setBackgroundColor(const PageNumber& page, const QColor& background_color, bool permanent) { | ||
93 | #ifdef DEBUG_PSGS | 93 | #ifdef DEBUG_PSGS | ||
94 | qCDebug(OkularDviDebug) << "ghostscript_interface::setBackgroundColor( " << page << ", " << background_color << " )"; | 94 | qCDebug(OkularDviDebug) << "ghostscript_interface::setBackgroundColor( " << page << ", " << background_color << " )"; | ||
95 | #endif | 95 | #endif | ||
96 | 96 | | |||
97 | if (pageList.value(page) == 0) { | 97 | if (pageList.value(page) == 0) { | ||
98 | pageInfo *info = new pageInfo(QString::null); //krazy:exclude=nullstrassign for old broken gcc | 98 | pageInfo *info = new pageInfo(QString()); | ||
99 | info->background = background_color; | 99 | info->background = background_color; | ||
100 | if (permanent) | 100 | if (permanent) | ||
101 | info->permanentBackground = background_color; | 101 | info->permanentBackground = background_color; | ||
102 | // Check if dict is big enough | 102 | // Check if dict is big enough | ||
103 | if (pageList.count() > pageList.capacity() -2) | 103 | if (pageList.count() > pageList.capacity() -2) | ||
104 | pageList.reserve(pageList.capacity()*2); | 104 | pageList.reserve(pageList.capacity()*2); | ||
105 | pageList.insert(page, info); | 105 | pageList.insert(page, info); | ||
106 | } else { | 106 | } else { | ||
▲ Show 20 Lines • Show All 247 Lines • Show Last 20 Lines |