~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to kspread/dialogs/CommentDialog.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-09-21 15:36:35 UTC
  • mfrom: (1.4.1 upstream) (60.2.11 maverick)
  • Revision ID: james.westby@ubuntu.com-20100921153635-6tejqkiro2u21ydi
Tags: 1:2.2.2-0ubuntu3
Add kubuntu_03_fix-crash-on-closing-sqlite-connection-2.2.2.diff and
kubuntu_04_support-large-memo-values-for-msaccess-2.2.2.diff as
recommended by upstream http://kexi-
project.org/wiki/wikiview/index.php@Kexi2.2_Patches.html#sqlite_stab
ility

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
using namespace KSpread;
41
41
 
42
42
CommentDialog::CommentDialog(QWidget* parent, Selection* selection)
43
 
  : KDialog( parent )
 
43
        : KDialog(parent)
44
44
{
45
 
    setCaption( i18n("Cell Comment") );
46
 
    setModal( true );
47
 
    setButtons( Ok|Cancel);
 
45
    setCaption(i18n("Cell Comment"));
 
46
    setModal(true);
 
47
    setButtons(Ok | Cancel);
48
48
 
49
49
    m_selection = selection;
50
50
 
51
51
    QWidget *page = new QWidget();
52
 
    setMainWidget( page );
53
 
    QVBoxLayout *lay1 = new QVBoxLayout( page );
 
52
    setMainWidget(page);
 
53
    QVBoxLayout *lay1 = new QVBoxLayout(page);
54
54
    lay1->setMargin(KDialog::marginHint());
55
55
    lay1->setSpacing(KDialog::spacingHint());
56
56
 
57
 
    multiLine = new KTextEdit( page );
 
57
    multiLine = new KTextEdit(page);
58
58
    lay1->addWidget(multiLine);
59
59
 
60
60
    multiLine->setFocus();
61
61
 
62
62
    const QString comment = Cell(m_selection->activeSheet(), m_selection->marker()).comment();
63
 
    if ( !comment.isEmpty() )
64
 
        multiLine->setText( comment );
 
63
    if (!comment.isEmpty())
 
64
        multiLine->setText(comment);
65
65
 
66
 
    connect( this, SIGNAL( okClicked() ), this, SLOT( slotOk() ) );
67
 
    connect(multiLine, SIGNAL(textChanged ()),this, SLOT(slotTextChanged()));
 
66
    connect(this, SIGNAL(okClicked()), this, SLOT(slotOk()));
 
67
    connect(multiLine, SIGNAL(textChanged()), this, SLOT(slotTextChanged()));
68
68
 
69
69
    slotTextChanged();
70
 
    resize( 400, height() );
 
70
    resize(400, height());
71
71
}
72
72
 
73
73
void CommentDialog::slotTextChanged()
74
74
{
75
 
    enableButtonOk( !multiLine->toPlainText().isEmpty());
 
75
    enableButtonOk(!multiLine->toPlainText().isEmpty());
76
76
}
77
77
 
78
78
void CommentDialog::slotOk()