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

« back to all changes in this revision

Viewing changes to kspread/dialogs/kspread_dlg_area.cc

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2006-04-20 21:38:53 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20060420213853-j5lxluqvymxt2zny
Tags: 1:1.5.0-0ubuntu2
UbuntuĀ uploadĀ 

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
   You should have received a copy of the GNU Library General Public License
19
19
   along with this library; see the file COPYING.LIB.  If not, write to
20
 
   the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21
 
   Boston, MA 02111-1307, USA.
 
20
   the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
21
 * Boston, MA 02110-1301, USA.
22
22
*/
23
23
 
24
 
 
25
 
 
26
 
#include "kspread_dlg_area.h"
27
 
#include "kspread_view.h"
28
 
#include "kspread_sheet.h"
29
 
#include "kspread_doc.h"
30
 
#include "kspread_locale.h"
31
 
 
32
24
#include <qlayout.h>
33
25
#include <qlabel.h>
34
26
#include <qlineedit.h>
 
27
 
35
28
#include <kmessagebox.h>
36
29
 
37
 
KSpreadarea::KSpreadarea( KSpreadView * parent, const char * name, const QPoint & _marker )
 
30
#include "kspread_doc.h"
 
31
#include "kspread_locale.h"
 
32
#include "kspread_sheet.h"
 
33
#include "kspread_view.h"
 
34
#include "selection.h"
 
35
 
 
36
#include "kspread_dlg_area.h"
 
37
 
 
38
using namespace KSpread;
 
39
 
 
40
AreaDialog::AreaDialog( View * parent, const char * name, const QPoint & _marker )
38
41
  : KDialogBase( parent, name, TRUE, i18n("Area Name"), Ok | Cancel )
39
42
{
40
43
  m_pView  = parent;
58
61
 
59
62
}
60
63
 
61
 
void KSpreadarea::slotAreaNamechanged( const QString & text)
 
64
void AreaDialog::slotAreaNamechanged( const QString & text)
62
65
{
63
66
  enableButtonOK(!text.isEmpty());
64
67
}
65
68
 
66
 
void KSpreadarea::slotOk()
 
69
void AreaDialog::slotOk()
67
70
{
68
71
  QString tmp(m_areaName->text());
69
72
  if( !tmp.isEmpty() )
70
73
  {
71
74
    tmp = tmp.lower();
72
75
 
73
 
    QRect rect( m_pView->selection() );
 
76
    QRect rect( m_pView->selectionInfo()->selection() );
74
77
    bool newName = true;
75
78
    QValueList<Reference>::Iterator it;
76
79
    QValueList<Reference> area = m_pView->doc()->listArea();