-rw-r--r-- | noncore/apps/opie-reader/StyleConsts.h | 2 |
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,72 +1,70 @@ | |||
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 | #ifdef _WINDOWS | ||
7 | #include <string.h> | 6 | #include <string.h> |
8 | #endif | ||
9 | #include <stdlib.h> | 7 | #include <stdlib.h> |
10 | #include <qglobal.h> | 8 | #include <qglobal.h> |
11 | class QImage; | 9 | class QImage; |
12 | 10 | ||
13 | struct GraphicLink | 11 | struct GraphicLink |
14 | { | 12 | { |
15 | QImage* graphic; | 13 | QImage* graphic; |
16 | bool isLink; | 14 | bool isLink; |
17 | unsigned long link; | 15 | unsigned long link; |
18 | GraphicLink(QImage* p, bool isLnk, unsigned long tgt) : | 16 | GraphicLink(QImage* p, bool isLnk, unsigned long tgt) : |
19 | graphic(p), isLink(isLnk), link(tgt) {} | 17 | graphic(p), isLink(isLnk), link(tgt) {} |
20 | ~GraphicLink(); | 18 | ~GraphicLink(); |
21 | }; | 19 | }; |
22 | 20 | ||
23 | struct pmstore | 21 | struct pmstore |
24 | { | 22 | { |
25 | unsigned int count; | 23 | unsigned int count; |
26 | bool m_isScaleable; | 24 | bool m_isScaleable; |
27 | GraphicLink* graphic; | 25 | GraphicLink* graphic; |
28 | pmstore(bool _canScale, QImage* p, bool isLnk, unsigned long tgt) : count(1), m_isScaleable(_canScale) | 26 | pmstore(bool _canScale, QImage* p, bool isLnk, unsigned long tgt) : count(1), m_isScaleable(_canScale) |
29 | { | 27 | { |
30 | graphic = new GraphicLink(p, isLnk, tgt); | 28 | graphic = new GraphicLink(p, isLnk, tgt); |
31 | } | 29 | } |
32 | ~pmstore(); | 30 | ~pmstore(); |
33 | }; | 31 | }; |
34 | 32 | ||
35 | enum EalignmentType | 33 | enum EalignmentType |
36 | { | 34 | { |
37 | m_AlignLeft, | 35 | m_AlignLeft, |
38 | m_AlignRight, | 36 | m_AlignRight, |
39 | m_AlignCentre, | 37 | m_AlignCentre, |
40 | m_AlignJustify | 38 | m_AlignJustify |
41 | }; | 39 | }; |
42 | 40 | ||
43 | class CBasicStyle | 41 | class CBasicStyle |
44 | { | 42 | { |
45 | friend class CStyle; | 43 | friend class CStyle; |
46 | bool m_bold, | 44 | bool m_bold, |
47 | m_italic; | 45 | m_italic; |
48 | int m_fontsize; | 46 | int m_fontsize; |
49 | EalignmentType m_align; | 47 | EalignmentType m_align; |
50 | unsigned char red, green, blue; | 48 | unsigned char red, green, blue; |
51 | unsigned long data; | 49 | unsigned long data; |
52 | bool isLink; | 50 | bool isLink; |
53 | bool m_underline; | 51 | bool m_underline; |
54 | bool m_strikethru; | 52 | bool m_strikethru; |
55 | bool m_monospaced; | 53 | bool m_monospaced; |
56 | unsigned char m_leftmargin, m_rightmargin; | 54 | unsigned char m_leftmargin, m_rightmargin; |
57 | signed char m_extraspace; | 55 | signed char m_extraspace; |
58 | signed char m_voffset; | 56 | signed char m_voffset; |
59 | CBasicStyle() | 57 | CBasicStyle() |
60 | { | 58 | { |
61 | unset(); | 59 | unset(); |
62 | } | 60 | } |
63 | bool operator!=(const CBasicStyle& rhs) | 61 | bool operator!=(const CBasicStyle& rhs) |
64 | { | 62 | { |
65 | return (memcmp(this, &rhs, sizeof(CBasicStyle)) != 0); | 63 | return (memcmp(this, &rhs, sizeof(CBasicStyle)) != 0); |
66 | } | 64 | } |
67 | void unset() | 65 | void unset() |
68 | { | 66 | { |
69 | m_bold = false; | 67 | m_bold = false; |
70 | m_italic = false; | 68 | m_italic = false; |
71 | m_fontsize = 0; | 69 | m_fontsize = 0; |
72 | m_align = m_AlignLeft; | 70 | m_align = m_AlignLeft; |