void TableStyle::replaceNamedResources(ResourceCollection& newNames) { QMap<QString, QString>::ConstIterator it; if (!isInhFillColor() && (it = newNames.colors().find(fillColor())) != newNames.colors().end()) setFillColor(it.value()); // TODO: Do we need to do something else? E.g. CharStyle calls its updateFeatures(). }
void LineStyle::replaceNamedResources(ResourceCollection& newNames) { QMap<QString,QString>::ConstIterator it; QList<LineStyle>::iterator itl, itle = m_Sublines.end(); if (!inh_Color && (it = newNames.colors().find(color())) != newNames.colors().end()) setColor(it.value()); if (hasParent() && (it = newNames.lineStyles().find(parent())) != newNames.lineStyles().end()) setParent(it.value()); for (itl = m_Sublines.begin(); itl != itle; ++itl) (*itl).replaceNamedResources(newNames); }
void PageItem_Group::replaceNamedResources(ResourceCollection& newNames) { QMap<QString,QString>::ConstIterator it; it = newNames.colors().find(softShadowColor()); if (it != newNames.colors().end()) setSoftShadowColor(*it); for (int em = 0; em < groupItemList.count(); ++em) { PageItem* embedded = groupItemList.at(em); embedded->replaceNamedResources(newNames); } }
void CharStyle::replaceNamedResources(ResourceCollection& newNames) { QMap<QString,QString>::ConstIterator it; if (!inh_FillColor && (it = newNames.colors().find(fillColor())) != newNames.colors().end()) setFillColor(it.value()); if (!inh_StrokeColor && (it = newNames.colors().find(strokeColor())) != newNames.colors().end()) setStrokeColor(it.value()); if (hasParent() && (it = newNames.charStyles().find(parent())) != newNames.charStyles().end()) setParent(it.value()); if (!inh_Font && (it = newNames.fonts().find(font().scName())) != newNames.fonts().end()) setFont(newNames.availableFonts->findFont(it.value(), NULL)); updateFeatures(); }