bool WText::RichText::setText(const WString& newText) { text = newText; bool ok = checkWellFormed(); if (!ok) format = PlainText; return ok; }
bool WText::RichText::setFormat(TextFormat newFormat) { if (format != newFormat) { TextFormat oldFormat = format; format = newFormat; bool ok = checkWellFormed(); if (!ok) format = oldFormat; return ok; } else return true; }
bool WText::setTextFormat(TextFormat textFormat) { if (textFormat_ != textFormat) { TextFormat oldTextFormat = textFormat_; textFormat_ = textFormat; bool textok = checkWellFormed(); if (!textok) textFormat_ = oldTextFormat; return textok; } else return true; }
bool WText::setText(const WString& text) { if (canOptimizeUpdates() && (text == text_)) return true; text_ = text; bool textok = checkWellFormed(); if (!textok) textFormat_ = PlainText; flags_.set(BIT_TEXT_CHANGED); repaint(RepaintInnerHtml); return textok; }