Fix building KOffice plugin.

This resolves issue #4.

Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Signed-off-by: gregory guy <gregory-tde@laposte.net>
pull/3/head
Slávek Banko 5 years ago
parent 5b9fb94722
commit 9bf530c039
No known key found for this signature in database
GPG Key ID: 608F5293A04BE668

@ -20,7 +20,7 @@ else
AC_MSG_RESULT(no) AC_MSG_RESULT(no)
fi], [AC_MSG_RESULT(no); want_koffice_plugin="no"]) fi], [AC_MSG_RESULT(no); want_koffice_plugin="no"])
KDE_CHECK_HEADER(koDocument.h, KDE_CHECK_HEADER(KoDocument.h,
have_koffice=yes, have_koffice=yes,
have_koffice=no) have_koffice=no)

@ -53,7 +53,7 @@
#include <tqlayout.h> #include <tqlayout.h>
#include <tqptrlist.h> #include <tqptrlist.h>
#include <tqpainter.h> #include <tqpainter.h>
#include <koFrame.h> #include <KoFrame.h>
class KMPlayerFactory : public KParts::Factory { class KMPlayerFactory : public KParts::Factory {
public: public:
@ -94,7 +94,7 @@ KParts::Part *KMPlayerFactory::createPartObject
KOfficeMPlayer::KOfficeMPlayer (TQWidget *parentWidget, const char *widgetName, TQObject* parent, const char* name, bool singleViewMode) KOfficeMPlayer::KOfficeMPlayer (TQWidget *parentWidget, const char *widgetName, TQObject* parent, const char* name, bool singleViewMode)
: KoDocument (parentWidget, widgetName, parent, name, singleViewMode), : KoDocument (parentWidget, widgetName, parent, name, singleViewMode),
m_config (new TDEConfig ("kmplayerrc")), m_config (new TDEConfig ("kmplayerrc")),
m_player (new KMPlayer (parentWidget, 0L, 0L, 0L, m_config)) m_player (new KMPlayer::PartBase (parentWidget, 0L, 0L, 0L, m_config))
{ {
setInstance (KMPlayerFactory::instance (), false); setInstance (KMPlayerFactory::instance (), false);
setReadWrite (false); setReadWrite (false);
@ -111,7 +111,7 @@ void KOfficeMPlayer::paintContent (TQPainter& p, const TQRect& r, bool, double,
p.fillRect (r, TQBrush (TQColor (0, 0, 0))); p.fillRect (r, TQBrush (TQColor (0, 0, 0)));
} }
bool KOfficeMPlayer::initDoc() { bool KOfficeMPlayer::initDoc(InitDocFlags flags, TQWidget* parentWidget) {
kdDebug() << "KOfficeMPlayer::initDoc" << endl; kdDebug() << "KOfficeMPlayer::initDoc" << endl;
return true; return true;
} }
@ -133,6 +133,11 @@ bool KOfficeMPlayer::loadOasis (const TQDomDocument &, KoOasisStyles &, const TQ
return true; return true;
} }
bool KOfficeMPlayer::saveOasis( KoStore* store, KoXmlWriter* manifestWriter )
{
return true;
}
TQDomDocument KOfficeMPlayer::saveXML() { TQDomDocument KOfficeMPlayer::saveXML() {
TQDomDocument doc = createDomDocument ("kmplayer", TQString::number(1.0)); TQDomDocument doc = createDomDocument ("kmplayer", TQString::number(1.0));
TQDomElement docelm = doc.documentElement(); TQDomElement docelm = doc.documentElement();

@ -25,8 +25,8 @@
#include <tdeparts/factory.h> #include <tdeparts/factory.h>
#include <kurl.h> #include <kurl.h>
#ifdef HAVE_KOFFICE #ifdef HAVE_KOFFICE
#include <koDocument.h> #include <KoDocument.h>
#include <koView.h> #include <KoView.h>
#endif //HAVE_KOFFICE #endif //HAVE_KOFFICE
#include <tqobject.h> #include <tqobject.h>
#include <tqvaluelist.h> #include <tqvaluelist.h>
@ -39,10 +39,12 @@
class TDEProcess; class TDEProcess;
class TDEAboutData; class TDEAboutData;
class KMPlayer;
class TDEInstance; class TDEInstance;
class TDEConfig; class TDEConfig;
class TQIODevice; class TQIODevice;
namespace KMPlayer {
class PartBase;
}
#ifdef HAVE_KOFFICE #ifdef HAVE_KOFFICE
class KOfficeMPlayer; class KOfficeMPlayer;
@ -64,22 +66,23 @@ class KOfficeMPlayer : public KoDocument {
public: public:
KOfficeMPlayer (TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject* parent = 0, const char* name = 0, bool singleViewMode = false); KOfficeMPlayer (TQWidget *parentWidget = 0, const char *widgetName = 0, TQObject* parent = 0, const char* name = 0, bool singleViewMode = false);
~KOfficeMPlayer (); virtual ~KOfficeMPlayer ();
virtual void paintContent (TQPainter& painter, const TQRect& rect, virtual void paintContent (TQPainter& painter, const TQRect& rect,
bool transparent = false, double zoomX = 1.0, double zoomY = 1.0); bool transparent = false, double zoomX = 1.0, double zoomY = 1.0);
virtual bool initDoc (); virtual bool initDoc (InitDocFlags flags, TQWidget* parentWidget=0);
virtual bool loadXML (TQIODevice *, const TQDomDocument &); virtual bool loadXML (TQIODevice *, const TQDomDocument &);
virtual bool loadOasis (const TQDomDocument &, KoOasisStyles &, const TQDomDocument &, KoStore *); virtual bool loadOasis (const TQDomDocument &, KoOasisStyles &, const TQDomDocument &, KoStore *);
virtual bool saveOasis( KoStore *store, KoXmlWriter *manifestWriter );
virtual TQDomDocument saveXML (); virtual TQDomDocument saveXML ();
virtual TQCString mimeType() const { return "application/x-kmplayer"; } virtual TQCString mimeType() const { return "application/x-kmplayer"; }
KMPlayer * player () const { return m_player; } KMPlayer::PartBase * player () const { return m_player; }
protected: protected:
virtual KoView* createViewInstance (TQWidget* parent, const char* name); virtual KoView* createViewInstance (TQWidget* parent, const char* name);
private: private:
TDEConfig * m_config; TDEConfig * m_config;
KMPlayer * m_player; KMPlayer::PartBase * m_player;
KOfficeMPlayerView * m_view; KOfficeMPlayerView * m_view;
}; };
#endif //HAVE_KOFFICE #endif //HAVE_KOFFICE

Loading…
Cancel
Save