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

« back to all changes in this revision

Viewing changes to kspread/kspread_factory.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:
17
17
   Boston, MA 02111-1307, USA.
18
18
*/
19
19
 
20
 
#include "kspread_factory.h"
21
20
#include "kspread_doc.h"
22
21
#include "kspread_aboutdata.h"
23
22
#include "KSpreadAppIface.h"
24
23
 
25
 
#include <klocale.h>
26
 
#include <kinstance.h>
27
 
#include <kstddirs.h>
 
24
#include <kstandarddirs.h>
28
25
#include <kdebug.h>
29
 
#include <kiconloader.h>
30
26
 
31
27
extern "C"
32
28
{
34
30
    {
35
31
        return new KSpreadFactory;
36
32
    }
37
 
};
 
33
}
38
34
 
39
35
KInstance* KSpreadFactory::s_global = 0;
40
36
DCOPObject* KSpreadFactory::s_dcopObject = 0;
61
57
  s_dcopObject = 0L;
62
58
}
63
59
 
64
 
KParts::Part* KSpreadFactory::createPart( QWidget *parentWidget, const char *widgetName, QObject* parent, const char* name, const char* classname, const QStringList & )
 
60
KParts::Part* KSpreadFactory::createPartObject( QWidget *parentWidget, const char *widgetName, QObject* parent, const char* name, const char* classname, const QStringList & )
65
61
{
66
62
  bool bWantKoDocument = ( strcmp( classname, "KoDocument" ) == 0 );
67
63
 
70
66
  if ( !bWantKoDocument )
71
67
    doc->setReadWrite( false );
72
68
 
73
 
  emit objectCreated( doc );
74
69
  return doc;
75
70
}
76
71
 
86
81
    if ( !s_global )
87
82
    {
88
83
      s_global = new KInstance(aboutData());
 
84
 
 
85
      s_global->dirs()->addResourceType( "kspread_template",
 
86
                                          KStandardDirs::kde_default("data") + "kspread/templates/");
 
87
 
89
88
      s_global->dirs()->addResourceType( "toolbar",
90
89
                                         KStandardDirs::kde_default("data") + "koffice/toolbar/");
91
90
      s_global->dirs()->addResourceType( "extensions", KStandardDirs::kde_default("data") + "kspread/extensions/");