void ViewAdaptor::setSelectionComment(const QString& comment) { CommentCommand* command = new CommentCommand(); command->setSheet(m_view->activeSheet()); command->setText(kundo2_i18n("Add Comment")); command->setComment(comment.trimmed()); command->add(*m_view->selection()); command->execute(); }
void CommentDialog::slotOk() { CommentCommand* command = new CommentCommand(); command->setSheet(m_selection->activeSheet()); command->setText(kundo2_i18n("Add Comment")); command->setComment(multiLine->toPlainText().trimmed()); command->add(*m_selection); command->execute(m_selection->canvas()); accept(); }