300
301
for (it2 = otherList.begin(); !found && it2 != otherList.end(); ++it2) {
301
302
kDebug() << "Found:" << found;
302
found = ((*it1).val1 == (*it2).val1 &&
303
(*it1).val2 == (*it2).val2 &&
303
found = ((*it1).value1 == (*it2).value1 &&
304
(*it1).value2 == (*it2).value2 &&
304
305
(*it1).cond == (*it2).cond);
306
if ((*it1).strVal1 && !(*it2).strVal1)
308
if (!(*it1).strVal1 && (*it2).strVal1)
310
if ((*it1).strVal1 && (*it2).strVal1
311
&& (*(*it1).strVal1 != *(*it2).strVal1))
316
if ((*it1).strVal2 && !(*it2).strVal2)
318
if (!(*it1).strVal2 && (*it2).strVal2)
320
if ((*it1).strVal2 && (*it2).strVal2
321
&& (*(*it1).strVal2 != *(*it2).strVal2))
326
if ((*it1).colorcond && !(*it2).colorcond)
328
if (!(*it1).colorcond && (*it2).colorcond)
330
if ((*it1).colorcond && (*it2).colorcond
331
&& (*(*it1).colorcond != *(*it2).colorcond))
336
if ((*it1).fontcond && !(*it2).fontcond)
338
if (!(*it1).fontcond && (*it2).fontcond)
340
if ((*it1).fontcond && (*it2).fontcond
341
&& (*(*it1).fontcond != *(*it2).fontcond))
346
if ((*it1).styleName && !(*it2).styleName)
348
if (!(*it1).styleName && (*it2).styleName)
350
if ((*it1).styleName && (*it2).styleName
351
&& (*(*it1).styleName != *(*it2).styleName))
310
if ((*it1).styleName != (*it2).styleName)
442
403
case Conditional::Between :
443
404
cb->setCurrentIndex(6);
446
kl2->setText(*tmp.strVal2);
448
value = value.setNum(tmp.val2);
405
kl2->setText(converter->asString(tmp.value2).asString());
453
408
case Conditional::Different :
454
409
cb->setCurrentIndex(7);
456
kl2->setText(*tmp.strVal2);
458
value = value.setNum(tmp.val2);
410
kl2->setText(converter->asString(tmp.value2).asString());
462
412
case Conditional::DifferentTo :
463
413
cb->setCurrentIndex(8);
561
505
if (newCondition.cond == Conditional::None)
565
double d1 = edit1->text().toDouble(&ok);
572
if (edit2->isEnabled())
573
d2 = edit2->text().toDouble(&ok);
574
// values are already checked...
577
s1 = new QString(edit1->text());
579
if (edit2->isEnabled())
580
s2 = new QString(edit2->text());
582
sn = new QString(sb->currentText());
584
newCondition.val1 = d1;
585
newCondition.val2 = d2;
586
newCondition.strVal1 = s1;
587
newCondition.strVal2 = s2;
588
newCondition.fontcond = 0;
589
newCondition.colorcond = 0;
590
newCondition.styleName = sn;
508
Map *const map = m_selection->activeSheet()->map();
509
ValueParser *const parser = map->parser();
511
newCondition.value1 = parser->parse(edit1->text());
512
newCondition.value2 = parser->parse(edit2->text());
513
newCondition.styleName = sb->currentText();