Commit 61780e50 authored by Thomas Zander's avatar Thomas Zander
Browse files

Hmm, lets commit my version then, since this one has the distinct advantage...

Hmm, lets commit my version then, since this one has the distinct advantage that it actually compiles :)

svn path=/trunk/koffice/; revision=544179
parent 1f527d00
......@@ -101,11 +101,6 @@ void KWmf::genericArc(
static_cast<unsigned int>(stopAngle));
}
int KWmf::handleIndex(void) const
{
return m_objectHandles.count();
}
//-----------------------------------------------------------------------------
KWmf::WinObjPenHandle *KWmf::handleCreatePen(void)
{
......@@ -122,16 +117,6 @@ KWmf::WinObjBrushHandle *KWmf::handleCreateBrush(void)
return handle;
}
//-----------------------------------------------------------------------------
void KWmf::handleDelete(int idx)
{
if (idx >= 0 && idx < m_objectHandles.count())
{
delete m_objectHandles[idx];
m_objectHandles[idx] = NULL;
}
}
//
//
//
......@@ -339,9 +324,6 @@ bool KWmf::parse(
startedAt = stream.device()->pos();
stream.setByteOrder(QDataStream::LittleEndian); // Great, I love Qt !
qDeleteAll(m_objectHandles);
m_objectHandles.clear();
typedef struct _RECT
{
S16 left;
......@@ -580,7 +562,6 @@ void KWmf::opBrushCreateIndirect(
};
Qt::BrushStyle style;
WinObjBrushHandle *handle = handleCreateBrush();
S16 arg;
S32 colour;
S16 discard;
......@@ -669,7 +650,6 @@ void KWmf::opObjectDelete(
S16 idx;
operands >> idx;
handleDelete(idx);
}
//-----------------------------------------------------------------------------
......@@ -680,7 +660,7 @@ void KWmf::opObjectSelect(
S16 idx;
operands >> idx;
if (idx >= 0 && idx < m_objectHandles.size())
if (idx >= 0 && idx < m_objectHandles.count())
m_objectHandles[idx]->apply(*this);
}
......@@ -705,7 +685,6 @@ void KWmf::opPenCreateIndirect(
Qt::SolidLine // PS_ALTERNATE
};
WinObjPenHandle *handle = handleCreatePen();
S16 arg;
S32 colour;
......
......@@ -30,10 +30,12 @@ DESCRIPTION
#ifndef KWMF_H
#define KWMF_H
#include <q3valuestack.h>
//Added by qt3to4:
#include <QPolygon>
#include <koffice_export.h>
#include <QList>
#include <q3valuestack.h>
class QDataStream;
class QPolygon;
......@@ -143,12 +145,9 @@ private:
unsigned m_width;
};
int handleIndex(void) const;
WinObjPenHandle *handleCreatePen(void);
WinObjBrushHandle *handleCreateBrush(void);
void handleDelete(int idx);
static const int s_maxHandles;
WinObjHandle **m_objectHandles;
QList<WinObjHandle *>m_objectHandles;
unsigned getColour(S32 colour);
QPoint normalisePoint(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment