Класс BinaryConditionalFormatOperator
Класс BinaryConditionalFormatOperator представляет собой оператор, который содержит настройки применения форматирования для правил "Между" и "Не между". Используется при создании правила условного форматирования (ConditionalFormatRule). В качестве аргументов могут использоваться как значения, так и формулы.
Конструктор
BinaryConditionalFormatOperator(ConditionalFormatBinaryCondition condition, std::string firstArgument, std::string secondArgument)
Пример
Table sheet = document.getBlocks().getTable(0).get();
ConditionalFormatTableRules rules = sheet.getConditionalFormatRules();
auto binaryStyle = ConditionalFormatCellStyle();
auto cellProperties = CellProperties();
cellProperties.fill = Fill(Color(ColorRGBA(255, 0, 0, 150)));
binaryStyle.cellProperties = cellProperties;
CellRange cellRange = sheet.getCellRange("F2:F12");
auto cellRangePosition = cellRange.getTableRange();
auto binaryOperator = createBinaryConditionalFormatOperator(ConditionalFormatBinaryCondition::NotBetween, "=$F$12", "=$F$9");
auto binaryRule = ConditionalFormatRule(binaryOperator, binaryStyle, cellRangePosition, false);
rules.addRule(binaryRule);