Ejemplo n.º 1
0
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();
}
Ejemplo n.º 2
0
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();
}