~ubuntu-branches/ubuntu/breezy/koffice/breezy

« back to all changes in this revision

Viewing changes to kspread/KSpreadMapIface.cc

  • Committer: Bazaar Package Importer
  • Author(s): Ben Burton
  • Date: 2004-05-09 11:33:00 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20040509113300-vfrdadqsvjfuhn3b
Tags: 1:1.3.1-1
* New upstream bugfix release.
* Built against newer imagemagick (closes: #246623).
* Made koffice-libs/kformula recommend/depend on latex-xft-fonts, which
  provides mathematical fonts that the formula editor can use.  Also
  patched the kformula part to make these fonts the default.
* Changed kword menu hint from "WordProcessors" to "Word processors"
  (closes: #246209).
* Spellchecker configuration is now fixed (closes: #221256, #227568).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include "KSpreadMapIface.h"
2
2
 
3
3
#include "kspread_map.h"
4
 
#include "kspread_table.h"
5
4
#include "kspread_doc.h"
6
5
 
7
 
#include <kapp.h>
 
6
#include <kapplication.h>
8
7
#include <dcopclient.h>
9
8
#include <kdebug.h>
10
9
 
16
15
 
17
16
DCOPRef KSpreadMapIface::table( const QString& name )
18
17
{
19
 
    KSpreadTable* t = m_map->findTable( name );
 
18
    KSpreadSheet* t = m_map->findTable( name );
20
19
    if ( !t )
21
20
        return DCOPRef();
22
21
 
25
24
 
26
25
DCOPRef KSpreadMapIface::tableByIndex( int index )
27
26
{
28
 
    KSpreadTable* t = m_map->tableList().at( index );
 
27
    KSpreadSheet* t = m_map->tableList().at( index );
29
28
    if ( !t )
30
29
    {
31
30
        kdDebug(36001) << "+++++ No table found at index " << index << endl;
46
45
{
47
46
    QStringList names;
48
47
 
49
 
    QList<KSpreadTable>& lst = m_map->tableList();
50
 
    QListIterator<KSpreadTable> it( lst );
 
48
    QPtrList<KSpreadSheet>& lst = m_map->tableList();
 
49
    QPtrListIterator<KSpreadSheet> it( lst );
51
50
    for( ; it.current(); ++it )
52
51
        names.append( it.current()->name() );
53
52
 
58
57
{
59
58
    QValueList<DCOPRef> t;
60
59
 
61
 
    QList<KSpreadTable>& lst = m_map->tableList();
62
 
    QListIterator<KSpreadTable> it( lst );
 
60
    QPtrList<KSpreadSheet>& lst = m_map->tableList();
 
61
    QPtrListIterator<KSpreadSheet> it( lst );
63
62
    for( ; it.current(); ++it )
64
63
        t.append( DCOPRef( kapp->dcopClient()->appId(), it.current()->dcopObject()->objId() ) );
65
64
 
71
70
    if ( m_map->findTable( name ) )
72
71
        return table( name );
73
72
 
74
 
    KSpreadTable* t = new KSpreadTable( m_map, name );
 
73
    KSpreadSheet* t = new KSpreadSheet( m_map, name );
75
74
    t->setTableName( name );
76
75
    m_map->doc()->addTable( t );
77
76
 
89
88
    if ( fun[ len - 1 ] != ')' || fun[ len - 2 ] != '(' )
90
89
        return FALSE;
91
90
 
92
 
    KSpreadTable* t = m_map->findTable( fun.left( len - 2 ).data() );
 
91
    KSpreadSheet* t = m_map->findTable( fun.left( len - 2 ).data() );
93
92
    if ( !t )
94
93
        return FALSE;
95
94