author | simon <simon> | 2002-12-28 10:41:25 (UTC) |
---|---|---|
committer | simon <simon> | 2002-12-28 10:41:25 (UTC) |
commit | 857560112f6df95a84040b43462731f63824b3d7 (patch) (unidiff) | |
tree | 9a1e8734e427838cf33b3eb764335bf2c62b930b | |
parent | 4c05428a793bcfed723377ad33dadac5ddcd1b99 (diff) | |
download | opie-857560112f6df95a84040b43462731f63824b3d7.zip opie-857560112f6df95a84040b43462731f63824b3d7.tar.gz opie-857560112f6df95a84040b43462731f63824b3d7.tar.bz2 |
- include string.h for memcmp
-rw-r--r-- | noncore/apps/opie-reader/StyleConsts.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/noncore/apps/opie-reader/StyleConsts.h b/noncore/apps/opie-reader/StyleConsts.h index 5aacdf0..9701d19 100644 --- a/noncore/apps/opie-reader/StyleConsts.h +++ b/noncore/apps/opie-reader/StyleConsts.h | |||
@@ -1,70 +1,71 @@ | |||
1 | #ifndef __STYLECONSTS_H | 1 | #ifndef __STYLECONSTS_H |
2 | #define __STYLECONSTS_H | 2 | #define __STYLECONSTS_H |
3 | 3 | ||
4 | typedef unsigned short StyleType; | 4 | typedef unsigned short StyleType; |
5 | 5 | ||
6 | #include <stdlib.h> | 6 | #include <stdlib.h> |
7 | #include <string.h> | ||
7 | #include <qglobal.h> | 8 | #include <qglobal.h> |
8 | class QPixmap; | 9 | class QPixmap; |
9 | 10 | ||
10 | struct GraphicLink | 11 | struct GraphicLink |
11 | { | 12 | { |
12 | QPixmap* graphic; | 13 | QPixmap* graphic; |
13 | bool isLink; | 14 | bool isLink; |
14 | unsigned long link; | 15 | unsigned long link; |
15 | GraphicLink(QPixmap* p, bool isLnk, unsigned long tgt) : | 16 | GraphicLink(QPixmap* p, bool isLnk, unsigned long tgt) : |
16 | graphic(p), isLink(isLnk), link(tgt) {} | 17 | graphic(p), isLink(isLnk), link(tgt) {} |
17 | ~GraphicLink(); | 18 | ~GraphicLink(); |
18 | }; | 19 | }; |
19 | 20 | ||
20 | struct pmstore | 21 | struct pmstore |
21 | { | 22 | { |
22 | unsigned int count; | 23 | unsigned int count; |
23 | GraphicLink* graphic; | 24 | GraphicLink* graphic; |
24 | pmstore(QPixmap* p, bool isLnk, unsigned long tgt) : count(1) | 25 | pmstore(QPixmap* p, bool isLnk, unsigned long tgt) : count(1) |
25 | { | 26 | { |
26 | graphic = new GraphicLink(p, isLnk, tgt); | 27 | graphic = new GraphicLink(p, isLnk, tgt); |
27 | } | 28 | } |
28 | ~pmstore(); | 29 | ~pmstore(); |
29 | }; | 30 | }; |
30 | 31 | ||
31 | enum EalignmentType | 32 | enum EalignmentType |
32 | { | 33 | { |
33 | m_AlignLeft, | 34 | m_AlignLeft, |
34 | m_AlignRight, | 35 | m_AlignRight, |
35 | m_AlignCentre, | 36 | m_AlignCentre, |
36 | m_AlignJustify | 37 | m_AlignJustify |
37 | }; | 38 | }; |
38 | 39 | ||
39 | class CBasicStyle | 40 | class CBasicStyle |
40 | { | 41 | { |
41 | friend class CStyle; | 42 | friend class CStyle; |
42 | bool m_bold, | 43 | bool m_bold, |
43 | m_italic; | 44 | m_italic; |
44 | int m_fontsize; | 45 | int m_fontsize; |
45 | EalignmentType m_align; | 46 | EalignmentType m_align; |
46 | unsigned char red, green, blue; | 47 | unsigned char red, green, blue; |
47 | unsigned long data; | 48 | unsigned long data; |
48 | bool isLink; | 49 | bool isLink; |
49 | bool m_underline; | 50 | bool m_underline; |
50 | bool m_strikethru; | 51 | bool m_strikethru; |
51 | bool m_monospaced; | 52 | bool m_monospaced; |
52 | unsigned char m_leftmargin, m_rightmargin; | 53 | unsigned char m_leftmargin, m_rightmargin; |
53 | CBasicStyle() | 54 | CBasicStyle() |
54 | { | 55 | { |
55 | unset(); | 56 | unset(); |
56 | } | 57 | } |
57 | bool operator!=(const CBasicStyle& rhs) | 58 | bool operator!=(const CBasicStyle& rhs) |
58 | { | 59 | { |
59 | return (memcmp(this, &rhs, sizeof(CBasicStyle)) != 0); | 60 | return (memcmp(this, &rhs, sizeof(CBasicStyle)) != 0); |
60 | } | 61 | } |
61 | void unset() | 62 | void unset() |
62 | { | 63 | { |
63 | m_bold = false; | 64 | m_bold = false; |
64 | m_italic = false; | 65 | m_italic = false; |
65 | m_fontsize = 0; | 66 | m_fontsize = 0; |
66 | m_align = m_AlignLeft; | 67 | m_align = m_AlignLeft; |
67 | red = green = blue = 0; | 68 | red = green = blue = 0; |
68 | data = 0; | 69 | data = 0; |
69 | isLink = false; | 70 | isLink = false; |
70 | m_underline = false; | 71 | m_underline = false; |