MCPcopy Create free account
hub / github.com/KDE/labplot / addConditionalFormatting

Method addConditionalFormatting

src/3rdparty/QXlsx/source/xlsxworksheet.cpp:1066–1080  ·  view source on GitHub ↗

! * Add one ConditionalFormatting \a cf to the sheet. * Returns true on success. */

Source from the content-addressed store, hash-verified

1064 * Returns true on success.
1065 */
1066bool Worksheet::addConditionalFormatting(const ConditionalFormatting &cf)
1067{
1068 Q_D(Worksheet);
1069 if (cf.ranges().isEmpty())
1070 return false;
1071
1072 for (int i=0; i<cf.d->cfRules.size(); ++i) {
1073 const std::shared_ptr<XlsxCfRuleData> &rule = cf.d->cfRules[i];
1074 if (!rule->dxfFormat.isEmpty())
1075 d->workbook->styles()->addDxfFormat(rule->dxfFormat);
1076 rule->priority = 1;
1077 }
1078 d->conditionalFormattingList.append(cf);
1079 return true;
1080}
1081
1082/*!
1083 * Insert an \a image at the position \a row, \a column

Callers

nothing calls this directly

Calls 6

addDxfFormatMethod · 0.80
stylesMethod · 0.80
appendMethod · 0.80
isEmptyMethod · 0.45
rangesMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected