summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-05-07 16:01:41 (UTC)
committer mickeyl <mickeyl>2003-05-07 16:01:41 (UTC)
commitfd0b11fbfe36e87845df9282bb4ed090c7f51d35 (patch) (side-by-side diff)
tree06e94be413f05d62675556969cae772742628fb3
parente150dfd5151aa59eb373aa58df5d9644c6c65b52 (diff)
downloadopie-fd0b11fbfe36e87845df9282bb4ed090c7f51d35.zip
opie-fd0b11fbfe36e87845df9282bb4ed090c7f51d35.tar.gz
opie-fd0b11fbfe36e87845df9282bb4ed090c7f51d35.tar.bz2
g++3 fixlet
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-reader/StyleConsts.h2
1 files changed, 0 insertions, 2 deletions
diff --git a/noncore/apps/opie-reader/StyleConsts.h b/noncore/apps/opie-reader/StyleConsts.h
index 29d7501..5817b54 100644
--- a/noncore/apps/opie-reader/StyleConsts.h
+++ b/noncore/apps/opie-reader/StyleConsts.h
@@ -1,104 +1,102 @@
#ifndef __STYLECONSTS_H
#define __STYLECONSTS_H
typedef unsigned short StyleType;
-#ifdef _WINDOWS
#include <string.h>
-#endif
#include <stdlib.h>
#include <qglobal.h>
class QImage;
struct GraphicLink
{
QImage* graphic;
bool isLink;
unsigned long link;
GraphicLink(QImage* p, bool isLnk, unsigned long tgt) :
graphic(p), isLink(isLnk), link(tgt) {}
~GraphicLink();
};
struct pmstore
{
unsigned int count;
bool m_isScaleable;
GraphicLink* graphic;
pmstore(bool _canScale, QImage* p, bool isLnk, unsigned long tgt) : count(1), m_isScaleable(_canScale)
{
graphic = new GraphicLink(p, isLnk, tgt);
}
~pmstore();
};
enum EalignmentType
{
m_AlignLeft,
m_AlignRight,
m_AlignCentre,
m_AlignJustify
};
class CBasicStyle
{
friend class CStyle;
bool m_bold,
m_italic;
int m_fontsize;
EalignmentType m_align;
unsigned char red, green, blue;
unsigned long data;
bool isLink;
bool m_underline;
bool m_strikethru;
bool m_monospaced;
unsigned char m_leftmargin, m_rightmargin;
signed char m_extraspace;
signed char m_voffset;
CBasicStyle()
{
unset();
}
bool operator!=(const CBasicStyle& rhs)
{
return (memcmp(this, &rhs, sizeof(CBasicStyle)) != 0);
}
void unset()
{
m_bold = false;
m_italic = false;
m_fontsize = 0;
m_align = m_AlignLeft;
red = green = blue = 0;
data = 0;
isLink = false;
m_underline = false;
m_strikethru = false;
m_leftmargin = 0;
m_rightmargin = 0;
m_monospaced = false;
m_extraspace = 0;
m_voffset = 0;
}
};
class CStyle
{
CBasicStyle sty;
pmstore* graphic;
public:
signed char getVOffset() { return sty.m_voffset; }
void setVOffset(signed char sp) { sty.m_voffset = sp; }
signed char getExtraSpace() { return sty.m_extraspace; }
void setExtraSpace(signed char sp) { sty.m_extraspace = sp; }
bool getPictureLink()
{
return (graphic != NULL && graphic->graphic->isLink);
}
unsigned long getPictureLinkData()
{
return graphic->graphic->link;
}
void setLeftMargin(unsigned char m) { sty.m_leftmargin = m; }
unsigned char getLeftMargin() { return sty.m_leftmargin; }