23#ifndef LIBWPS_INTERNAL_H
24#define LIBWPS_INTERNAL_H
38#include <librevenge-stream/librevenge-stream.h>
39#include <librevenge/librevenge.h>
42#define M_PI 3.14159265358979323846
45#if defined(_MSC_VER) || defined(__DJGPP__)
46typedef signed char int8_t;
47typedef unsigned char uint8_t;
48typedef signed short int16_t;
49typedef unsigned short uint16_t;
50typedef signed int int32_t;
51typedef unsigned int uint32_t;
64# define gmtime_r(tp,tmp) (gmtime(tp)?(*(tmp)=*gmtime(tp),(tmp)):0)
65# define localtime_r(tp,tmp) (localtime(tp)?(*(tmp)=*localtime(tp),(tmp)):0)
68#if defined(SHAREDPTR_TR1)
70using std::tr1::shared_ptr;
71#elif defined(SHAREDPTR_STD)
75#include <boost/shared_ptr.hpp>
76using boost::shared_ptr;
119#if defined(__clang__) || defined(__GNUC__)
120# define WPS_ATTRIBUTE_PRINTF(fmt, arg) __attribute__((__format__(__printf__, fmt, arg)))
122# define WPS_ATTRIBUTE_PRINTF(fmt, arg)
130#define WPS_DEBUG_MSG(M) libwps::printDebugMsg M
132#define WPS_DEBUG_MSG(M)
168uint8_t
readU8(librevenge::RVNGInputStream *input);
169uint16_t
readU16(librevenge::RVNGInputStream *input);
170uint32_t
readU32(librevenge::RVNGInputStream *input);
172int8_t
read8(librevenge::RVNGInputStream *input);
173int16_t
read16(librevenge::RVNGInputStream *input);
174int32_t
read32(librevenge::RVNGInputStream *input);
178 return readU8(input.get());
191 return read8(input.get());
195 return read16(input.get());
199 return read32(input.get());
218void appendUnicode(uint32_t val, librevenge::RVNGString &buffer);
221#define WPS_LE_GET_GUINT16(p) \
222 (uint16_t)((((uint8_t const *)(p))[0] << 0) | \
223 (((uint8_t const *)(p))[1] << 8))
224#define WPS_LE_GET_GUINT32(p) \
225 (uint32_t)((((uint8_t const *)(p))[0] << 0) | \
226 (((uint8_t const *)(p))[1] << 8) | \
227 (((uint8_t const *)(p))[2] << 16) | \
228 (((uint8_t const *)(p))[3] << 24))
230#define WPS_LE_PUT_GUINT16(p, v) \
231 *((uint8_t*)(p)) = uint8_t(v); \
232 *(((uint8_t*)(p)) + 1) = uint8_t((v) >> 8)
234#define WPS_LE_PUT_GUINT32(p, v) \
235 *((uint8_t*)(p)) = uint8_t(v); \
236 *(((uint8_t*)(p)) + 1) = uint8_t((v) >> 8); \
237 *(((uint8_t*)(p)) + 2) = uint8_t((v) >> 16); \
238 *(((uint8_t*)(p)) + 3) = uint8_t((v) >> 24)
280 WPSColor(
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a=255) :
281 m_value(uint32_t((a<<24)+(r<<16)+(g<<8)+b))
312 return (
unsigned char)((
m_value>>24)&0xFF);
317 return (
unsigned char)(
m_value&0xFF);
322 return (
unsigned char)((
m_value>>16)&0xFF);
327 return (
unsigned char)((
m_value>>8)&0xFF);
337 return (
m_value&0xFFFFFF)==0xFFFFFF;
372 std::string
str()
const;
393 bool addTo(librevenge::RVNGPropertyList &propList, std::string which=
"")
const;
448 add(binaryData, type);
465 void add(librevenge::RVNGBinaryData
const &binaryData, std::string type=
"image/pict")
475 bool addTo(librevenge::RVNGPropertyList &propList)
const;
496 bool addTo(librevenge::RVNGPropertyList &propList)
const;
498 librevenge::RVNGString
getString()
const;
510#define WPS_EXTRA_LARGE_BIT 1
511#define WPS_VERY_LARGE_BIT 2
512#define WPS_LARGE_BIT 4
513#define WPS_SMALL_PRINT_BIT 8
514#define WPS_FINE_PRINT_BIT 0x10
515#define WPS_SUPERSCRIPT_BIT 0x20
516#define WPS_SUBSCRIPT_BIT 0x40
517#define WPS_OUTLINE_BIT 0x80
518#define WPS_ITALICS_BIT 0x100
519#define WPS_SHADOW_BIT 0x200
520#define WPS_REDLINE_BIT 0x400
521#define WPS_DOUBLE_UNDERLINE_BIT 0x800
522#define WPS_BOLD_BIT 0x1000
523#define WPS_STRIKEOUT_BIT 0x2000
524#define WPS_UNDERLINE_BIT 0x4000
525#define WPS_SMALL_CAPS_BIT 0x8000
526#define WPS_BLINK_BIT 0x10000L
527#define WPS_REVERSEVIDEO_BIT 0x20000L
528#define WPS_ALL_CAPS_BIT 0x40000L
529#define WPS_EMBOSS_BIT 0x80000L
530#define WPS_ENGRAVE_BIT 0x100000L
531#define WPS_OVERLINE_BIT 0x400000L
532#define WPS_HIDDEN_BIT 0x800000L
535#define WPS_PAGE_BREAK 0x00
536#define WPS_SOFT_PAGE_BREAK 0x01
537#define WPS_COLUMN_BREAK 0x02
541#define WPS_RIGHT 0x01
542#define WPS_CENTER 0x02
544#define WPS_BOTTOM 0x04
572 return (c==0) ?
m_x :
m_y;
578 return (c==0) ?
m_x :
m_y;
685 o << f.
m_x <<
"x" << f.
m_y;
697 return s1.
cmp(s2) < 0;
709 return s1.
cmpY(s2) < 0;
738 for (
int c=0; c < 2; c++)
m_pt[c] = p[c];
812 m_pt[0] = ctr - 0.5*sz;
813 m_pt[1] = ctr + (sz - 0.5*sz);
817 template <
class U>
void scale(U factor)
870 if (diff)
return diff;
872 if (diff)
return diff;
879 o <<
"(" << f.
m_pt[0] <<
"<->" << f.
m_pt[1] <<
")";
891 return s1.
cmp(s2) < 0;
925 for (
int c = 0; c < 3; c++)
m_val[c] = T(p[c]);
957 void set(T xx, T yy, T zz)
980 void add(T dx, T dy, T dz)
1003 for (
int c = 0; c < 3; c++)
m_val[c] = T(
m_val[c]*scale);
1045 for (
int c = 0; c < 3; c++)
1068 return s1.
cmp(s2) < 0;
1126 for (
int coord=0; coord<2; ++coord)
1130 for (
int i=0; i<2; ++i)
1131 value+=row[i]*dir[i];
1147 for (
int row=0; row<2; ++row)
1150 for (
int col=0; col<3; ++col)
1153 for (
int i=0; i<3; ++i)
1154 value+=(*
this)[row][i]*(i==2 ? (col==2 ? 1.f : 0.f) : mat[i][col]);
1238bool encodeLotusPassword(
char const *password, uint16_t &key, std::vector<uint8_t> &keys, uint8_t
const(&defValues)[16]);
small class which defines a vector with 2 elements
Definition libwps_internal.h:551
T x() const
first element
Definition libwps_internal.h:559
friend Vec2< T > operator*(U scale, Vec2< T > const &p1)
generic operator*
Definition libwps_internal.h:642
void setX(T xx)
resets the first element
Definition libwps_internal.h:588
int cmpY(Vec2< T > const &p) const
a comparison function: which first compares y then x
Definition libwps_internal.h:673
T m_x
first element
Definition libwps_internal.h:713
Vec2< T > & operator-=(Vec2< T > const &p)
operator-=
Definition libwps_internal.h:613
Vec2< T > & operator*=(U scale)
generic operator*=
Definition libwps_internal.h:621
T y() const
second element
Definition libwps_internal.h:564
Vec2(T xx=0, T yy=0)
constructor
Definition libwps_internal.h:554
bool operator!=(Vec2< T > const &p) const
comparison!=
Definition libwps_internal.h:654
void set(T xx, T yy)
resets the two elements
Definition libwps_internal.h:582
void add(T dx, T dy)
increases the actuals values by dx and dy
Definition libwps_internal.h:599
Vec2< T > & operator+=(Vec2< T > const &p)
operator+=
Definition libwps_internal.h:606
friend Vec2< T > operator+(Vec2< T > const &p1, Vec2< T > const &p2)
operator+
Definition libwps_internal.h:629
bool operator==(Vec2< T > const &p) const
comparison==
Definition libwps_internal.h:649
bool operator<(Vec2< T > const &p) const
comparison<: sort by y
Definition libwps_internal.h:659
int cmp(Vec2< T > const &p) const
a comparison function: which first compares x then y
Definition libwps_internal.h:664
T & operator[](int c)
operator[]
Definition libwps_internal.h:575
friend Vec2< T > operator-(Vec2< T > const &p1, Vec2< T > const &p2)
operator-
Definition libwps_internal.h:635
T operator[](int c) const
operator[]
Definition libwps_internal.h:569
Vec2(Vec2< U > const &p)
generic copy constructor
Definition libwps_internal.h:556
T m_y
second element
Definition libwps_internal.h:713
void setY(T yy)
resets the second element
Definition libwps_internal.h:593
friend std::ostream & operator<<(std::ostream &o, Vec2< T > const &f)
operator<<: prints data in form "XxY"
Definition libwps_internal.h:683
Definition WKSContentListener.h:53
Basic class used to store a spreadsheet sub document.
Definition WKSSubDocument.h:36
small class which defines a 2D WPSBox
Definition libwps_internal.h:727
WPSBox2< T > getUnion(WPSBox2< T > const &box) const
returns the union between this and box
Definition libwps_internal.h:830
Vec2< T > const & min() const
the minimum 2D point (in x and in y)
Definition libwps_internal.h:742
void scale(U factor)
scales all points of the box by factor
Definition libwps_internal.h:817
Vec2< T > m_pt[2]
the two extremities
Definition libwps_internal.h:901
Vec2< T > center() const
the box center
Definition libwps_internal.h:776
Vec2< T > const & max() const
the maximum 2D point (in x and in y)
Definition libwps_internal.h:747
int cmp(WPSBox2< T > const &p) const
comparison function : fist sorts min by Y,X values then max extremity
Definition libwps_internal.h:867
void resizeFromMax(Vec2< T > const &sz)
resize the box keeping the maximum
Definition libwps_internal.h:804
void set(Vec2< T > const &x, Vec2< T > const &y)
resets the data to minimum x and maximum y
Definition libwps_internal.h:782
WPSBox2(WPSBox2< U > const &p)
generic constructor
Definition libwps_internal.h:736
void resizeFromMin(Vec2< T > const &sz)
resize the box keeping the minimum
Definition libwps_internal.h:799
Vec2< T > & min()
the minimum 2D point (in x and in y)
Definition libwps_internal.h:752
void setMax(Vec2< T > const &y)
resets the maximum point
Definition libwps_internal.h:793
std::map< WPSBox2< T >, T, struct PosSizeLt > Map
map of WPSBox2
Definition libwps_internal.h:897
Vec2< T > size() const
the box size
Definition libwps_internal.h:771
WPSBox2< T > getIntersection(WPSBox2< T > const &box) const
returns the intersection between this and box
Definition libwps_internal.h:840
bool operator!=(WPSBox2< T > const &p) const
comparison operator!=
Definition libwps_internal.h:856
WPSBox2(Vec2< T > minPt=Vec2< T >(), Vec2< T > maxPt=Vec2< T >())
constructor
Definition libwps_internal.h:730
Vec2< T > & max()
the maximum 2D point (in x and in y)
Definition libwps_internal.h:757
friend std::ostream & operator<<(std::ostream &o, WPSBox2< T > const &f)
print data in form X0xY0<->X1xY1
Definition libwps_internal.h:877
bool operator==(WPSBox2< T > const &p) const
comparison operator==
Definition libwps_internal.h:851
void setMin(Vec2< T > const &x)
resets the minimum point
Definition libwps_internal.h:788
void resizeFromCenter(Vec2< T > const &sz)
resize the box keeping the center
Definition libwps_internal.h:809
void extend(T val)
extends the bdbox by (val, val) keeping the center
Definition libwps_internal.h:824
bool operator<(WPSBox2< T > const &p) const
comparison operator< : fist sorts min by Y,X values then max extremity
Definition libwps_internal.h:861
Vec2< T > const & operator[](int c) const
the two extremum points which defined the box
Definition libwps_internal.h:765
a structure used to defined the cell position, and a format
Definition WPSCell.h:278
Definition WPSContentListener.h:45
basic class to store an entry in a file This contained :
Definition WPSEntry.h:39
define the font properties
Definition WPSFont.h:37
virtual class for content listener
Definition WPSListener.h:37
Class to define the position of an object (textbox, picture, ..) in the document.
Definition WPSPosition.h:40
virtual class to define a sub document
Definition WPSSubDocument.h:34
small class which defines a vector with 3 elements
Definition libwps_internal.h:913
std::map< WPSVec3< T >, T, struct PosSizeLt > Map
map of WPSVec3
Definition libwps_internal.h:1074
bool operator==(WPSVec3< T > const &p) const
comparison==
Definition libwps_internal.h:1028
friend WPSVec3< T > operator-(WPSVec3< T > const &p1, WPSVec3< T > const &p2)
operator-
Definition libwps_internal.h:1014
T y() const
second element
Definition libwps_internal.h:934
friend WPSVec3< T > operator*(U scale, WPSVec3< T > const &p1)
generic operator*
Definition libwps_internal.h:1021
WPSVec3< T > & operator*=(U scale)
generic operator*=
Definition libwps_internal.h:1001
WPSVec3< T > & operator+=(WPSVec3< T > const &p)
operator+=
Definition libwps_internal.h:988
WPSVec3(T xx=0, T yy=0, T zz=0)
constructor
Definition libwps_internal.h:916
friend WPSVec3< T > operator+(WPSVec3< T > const &p1, WPSVec3< T > const &p2)
operator+
Definition libwps_internal.h:1008
bool operator!=(WPSVec3< T > const &p) const
comparison!=
Definition libwps_internal.h:1033
T & operator[](int c)
operator[]
Definition libwps_internal.h:950
bool operator<(WPSVec3< T > const &p) const
comparison<: which first compares x values, then y values then z values.
Definition libwps_internal.h:1038
void setY(T yy)
resets the second element
Definition libwps_internal.h:969
T x() const
first element
Definition libwps_internal.h:929
void set(T xx, T yy, T zz)
resets the three elements
Definition libwps_internal.h:957
T m_val[3]
the values
Definition libwps_internal.h:1078
void setX(T xx)
resets the first element
Definition libwps_internal.h:964
WPSVec3(WPSVec3< U > const &p)
generic copy constructor
Definition libwps_internal.h:923
int cmp(WPSVec3< T > const &p) const
a comparison function: which first compares x values, then y values then z values.
Definition libwps_internal.h:1043
WPSVec3< T > & operator-=(WPSVec3< T > const &p)
operator-=
Definition libwps_internal.h:994
void add(T dx, T dy, T dz)
increases the actuals values by dx, dy, dz
Definition libwps_internal.h:980
void setZ(T zz)
resets the third element
Definition libwps_internal.h:974
friend std::ostream & operator<<(std::ostream &o, WPSVec3< T > const &f)
operator<<: prints data in form "XxYxZ"
Definition libwps_internal.h:1054
T z() const
third element
Definition libwps_internal.h:939
T operator[](int c) const
operator[]
Definition libwps_internal.h:944
Definition libwps_internal.h:145
Definition libwps_internal.h:160
Definition libwps_internal.h:150
Definition libwps_internal.h:155
Definition libwps_internal.h:140
WPSBox2< int > WPSBox2i
WPSBox2 of int.
Definition libwps_internal.h:905
shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition libwps_internal.h:88
WPSVec3< float > WPSVec3f
WPSVec3 of float.
Definition libwps_internal.h:1086
Vec2< int > Vec2i
Vec2 of int.
Definition libwps_internal.h:719
Vec2< float > Vec2f
Vec2 of float.
Definition libwps_internal.h:721
shared_ptr< WKSContentListener > WKSContentListenerPtr
shared pointer to WKSContentListener
Definition libwps_internal.h:115
WPSBox2< float > WPSBox2f
WPSBox2 of float.
Definition libwps_internal.h:907
Vec2< bool > Vec2b
Vec2 of bool.
Definition libwps_internal.h:717
#define WPS_ATTRIBUTE_PRINTF(fmt, arg)
Definition libwps_internal.h:122
shared_ptr< WKSSubDocument > WKSSubDocumentPtr
shared pointer to WKSSubDocument
Definition libwps_internal.h:117
shared_ptr< WPSListener > WPSListenerPtr
shared pointer to WPSListener
Definition libwps_internal.h:106
shared_ptr< WPSHeader > WPSHeaderPtr
shared pointer to WPSHeader
Definition libwps_internal.h:110
WPSVec3< unsigned char > WPSVec3uc
WPSVec3 of unsigned char.
Definition libwps_internal.h:1082
shared_ptr< WPSCell > WPSCellPtr
shared pointer to WPSCell
Definition libwps_internal.h:104
shared_ptr< WPSSubDocument > WPSSubDocumentPtr
shared pointer to WPSSubDocument
Definition libwps_internal.h:112
WPSVec3< int > WPSVec3i
WPSVec3 of int.
Definition libwps_internal.h:1084
shared_ptr< WPSContentListener > WPSContentListenerPtr
shared pointer to WPSContentListener
Definition libwps_internal.h:108
Definition libwps_internal.cpp:39
NumberingType
Definition libwps_internal.h:244
@ BULLET
Definition libwps_internal.h:244
@ LOWERCASE_ROMAN
Definition libwps_internal.h:244
@ NONE
Definition libwps_internal.h:244
@ LOWERCASE
Definition libwps_internal.h:244
@ UPPERCASE_ROMAN
Definition libwps_internal.h:244
@ UPPERCASE
Definition libwps_internal.h:244
@ ARABIC
Definition libwps_internal.h:244
uint16_t readU16(librevenge::RVNGInputStream *input)
Definition libwps_internal.cpp:64
bool readDataToEnd(RVNGInputStreamPtr &input, librevenge::RVNGBinaryData &data)
try to read the last bytes from input and store them in a librevenge::RVNGBinaryData
Definition libwps_internal.cpp:346
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition libwps_internal.cpp:40
bool readDouble2Inv(RVNGInputStreamPtr &input, double &res, bool &isNaN)
read a double store with 2 bytes: exponent 1.5 bytes, kind of mantisse 0.5 bytes
Definition libwps_internal.cpp:273
int8_t read8(librevenge::RVNGInputStream *input)
Definition libwps_internal.cpp:59
uint32_t readU32(librevenge::RVNGInputStream *input)
Definition libwps_internal.cpp:76
std::string numberingTypeToString(NumberingType type)
Definition libwps_internal.cpp:357
bool readDouble4Inv(RVNGInputStreamPtr &input, double &res, bool &isNaN)
read a double store with 4 bytes: exponent 3.5 bytes, mantisse 0.5 bytes
Definition libwps_internal.cpp:303
bool readData(RVNGInputStreamPtr &input, unsigned long size, librevenge::RVNGBinaryData &data)
try to read sz bytes from input and store them in a librevenge::RVNGBinaryData
Definition libwps_internal.cpp:332
int16_t read16(librevenge::RVNGInputStream *input)
Definition libwps_internal.cpp:71
int32_t read32(librevenge::RVNGInputStream *input)
Definition libwps_internal.cpp:85
bool encodeLotusPassword(char const *password, uint16_t &key, std::vector< uint8_t > &keys, uint8_t const(&defValues)[16])
try to encode a lotus file
Definition libwps_internal.cpp:836
bool readDouble10(RVNGInputStreamPtr &input, double &res, bool &isNaN)
read a double store with 10 bytes: mantisse 8 bytes, exponent 2 bytes
Definition libwps_internal.cpp:224
bool readDouble8(RVNGInputStreamPtr &input, double &res, bool &isNaN)
read a double store with 8 bytes: mantisse 6.5 bytes, exponent 1.5 bytes
Definition libwps_internal.cpp:173
Justification
Definition libwps_internal.h:247
@ JustificationFull
Definition libwps_internal.h:247
@ JustificationCenter
Definition libwps_internal.h:247
@ JustificationRight
Definition libwps_internal.h:248
@ JustificationFullAllLines
Definition libwps_internal.h:248
@ JustificationLeft
Definition libwps_internal.h:247
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string ( with correct encoding ).
Definition libwps_internal.cpp:718
@ NoBreakBit
Definition libwps_internal.h:250
@ NoBreakWithNextBit
Definition libwps_internal.h:250
bool readDouble4(RVNGInputStreamPtr &input, double &res, bool &isNaN)
read a double store with 4 bytes: mantisse 2.5 bytes, exponent 1.5 bytes
Definition libwps_internal.cpp:90
SubDocumentType
Definition libwps_internal.h:246
@ DOC_TEXT_BOX
Definition libwps_internal.h:246
@ DOC_NOTE
Definition libwps_internal.h:246
@ DOC_NONE
Definition libwps_internal.h:246
@ DOC_COMMENT_ANNOTATION
Definition libwps_internal.h:246
@ DOC_HEADER_FOOTER
Definition libwps_internal.h:246
@ DOC_TABLE
Definition libwps_internal.h:246
internal struct used to create sorted map, sorted by X
Definition libwps_internal.h:693
bool operator()(Vec2< T > const &s1, Vec2< T > const &s2) const
comparaison function
Definition libwps_internal.h:695
internal struct used to create sorted map, sorted by Y
Definition libwps_internal.h:705
bool operator()(Vec2< T > const &s1, Vec2< T > const &s2) const
comparaison function
Definition libwps_internal.h:707
a border list
Definition libwps_internal.h:380
Style
the line style
Definition libwps_internal.h:382
@ LargeDot
Definition libwps_internal.h:382
@ None
Definition libwps_internal.h:382
@ Simple
Definition libwps_internal.h:382
@ Dot
Definition libwps_internal.h:382
@ Dash
Definition libwps_internal.h:382
Pos
Definition libwps_internal.h:385
@ Bottom
Definition libwps_internal.h:385
@ Top
Definition libwps_internal.h:385
@ Left
Definition libwps_internal.h:385
@ Right
Definition libwps_internal.h:385
bool operator==(WPSBorder const &orig) const
operator==
Definition libwps_internal.h:401
std::string m_extra
extra data ( if needed)
Definition libwps_internal.h:431
bool operator!=(WPSBorder const &orig) const
operator!=
Definition libwps_internal.h:407
Style m_style
the border style
Definition libwps_internal.h:419
friend std::ostream & operator<<(std::ostream &o, WPSBorder const &border)
operator<<
Definition libwps_internal.cpp:631
Type
the line repetition
Definition libwps_internal.h:384
@ Double
Definition libwps_internal.h:384
@ Single
Definition libwps_internal.h:384
@ Triple
Definition libwps_internal.h:384
bool isEmpty() const
returns true if the border is empty
Definition libwps_internal.h:395
bool addTo(librevenge::RVNGPropertyList &propList, std::string which="") const
add the border property to proplist (if needed )
Definition libwps_internal.cpp:529
std::vector< double > m_widthsList
the different length used for each line/sep (if defined)
Definition libwps_internal.h:427
@ RightBit
Definition libwps_internal.h:386
@ BottomBit
Definition libwps_internal.h:386
@ TopBit
Definition libwps_internal.h:386
@ LeftBit
Definition libwps_internal.h:386
WPSBorder()
constructor
Definition libwps_internal.h:389
int m_width
the border width
Definition libwps_internal.h:423
Type m_type
the border repetition
Definition libwps_internal.h:421
int compare(WPSBorder const &orig) const
compare two cell
Definition libwps_internal.cpp:511
WPSColor m_color
the border color
Definition libwps_internal.h:429
internal struct used to create sorted map, sorted first min then max
Definition libwps_internal.h:887
bool operator()(WPSBox2< T > const &s1, WPSBox2< T > const &s2) const
comparaison function
Definition libwps_internal.h:889
the class to store a color
Definition libwps_internal.h:274
unsigned char getRed() const
returns the red value
Definition libwps_internal.h:320
static WPSColor white()
return the white color
Definition libwps_internal.h:296
WPSColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
constructor from color
Definition libwps_internal.h:280
bool operator>=(WPSColor const &c) const
operator>=
Definition libwps_internal.h:365
std::string str() const
print the color in the form #rrggbb
Definition libwps_internal.cpp:413
unsigned char getGreen() const
returns the green value
Definition libwps_internal.h:325
bool operator>(WPSColor const &c) const
operator>
Definition libwps_internal.h:360
uint32_t value() const
return the rgba value
Definition libwps_internal.h:305
bool operator==(WPSColor const &c) const
operator==
Definition libwps_internal.h:340
WPSColor(uint32_t argb=0)
constructor
Definition libwps_internal.h:276
WPSColor & operator=(uint32_t argb)
operator=
Definition libwps_internal.h:285
uint32_t m_value
the argb color
Definition libwps_internal.h:375
bool isWhite() const
return true if the color is white
Definition libwps_internal.h:335
bool operator!=(WPSColor const &c) const
operator!=
Definition libwps_internal.h:345
unsigned char getBlue() const
returns the green value
Definition libwps_internal.h:315
static WPSColor barycenter(float alpha, WPSColor const &colA, float beta, WPSColor const &colB)
return alpha*colA+beta*colB
Definition libwps_internal.cpp:386
bool isBlack() const
return true if the color is black
Definition libwps_internal.h:330
unsigned char getAlpha() const
returns the alpha value
Definition libwps_internal.h:310
friend std::ostream & operator<<(std::ostream &o, WPSColor const &c)
operator<< in the form #rrggbb
Definition libwps_internal.cpp:401
bool operator<=(WPSColor const &c) const
operator<=
Definition libwps_internal.h:355
bool operator<(WPSColor const &c) const
operator<
Definition libwps_internal.h:350
static WPSColor black()
return the back color
Definition libwps_internal.h:291
Definition libwps_internal.h:254
double m_width
Definition libwps_internal.h:258
double m_rightGutter
Definition libwps_internal.h:260
WPSColumnDefinition()
Definition libwps_internal.h:255
double m_leftGutter
Definition libwps_internal.h:259
Definition libwps_internal.h:264
uint32_t m_attributes
Definition libwps_internal.h:268
WPSColumnProperties()
Definition libwps_internal.h:265
uint8_t m_alignment
Definition libwps_internal.h:269
small class use to define a embedded object
Definition libwps_internal.h:439
bool isEmpty() const
return true if the picture contains no data
Definition libwps_internal.h:455
WPSEmbeddedObject(librevenge::RVNGBinaryData const &binaryData, std::string type="image/pict")
constructor
Definition libwps_internal.h:445
WPSEmbeddedObject()
empty constructor
Definition libwps_internal.h:441
virtual ~WPSEmbeddedObject()
destructor
Definition libwps_internal.h:451
std::vector< librevenge::RVNGBinaryData > m_dataList
the picture content: one data by representation
Definition libwps_internal.h:480
bool addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist
Definition libwps_internal.cpp:668
void add(librevenge::RVNGBinaryData const &binaryData, std::string type="image/pict")
add a picture
Definition libwps_internal.h:465
friend std::ostream & operator<<(std::ostream &o, WPSEmbeddedObject const &pict)
operator<<
Definition libwps_internal.cpp:698
std::vector< std::string > m_typeList
the picture type: one type by representation
Definition libwps_internal.h:482
a field
Definition libwps_internal.h:487
Type m_type
the type
Definition libwps_internal.h:500
std::string m_DTFormat
the date/time format using strftime format if defined (see strftime)
Definition libwps_internal.h:502
Type
Defines some basic type for field.
Definition libwps_internal.h:489
@ None
Definition libwps_internal.h:489
@ PageNumberNext
Definition libwps_internal.h:489
@ Link
Definition libwps_internal.h:489
@ Title
Definition libwps_internal.h:489
@ Date
Definition libwps_internal.h:489
@ PageCount
Definition libwps_internal.h:489
@ Database
Definition libwps_internal.h:489
@ PageNumber
Definition libwps_internal.h:489
@ Time
Definition libwps_internal.h:489
librevenge::RVNGString getString() const
returns a string corresponding to the field (if possible) */
Definition libwps_internal.cpp:453
libwps::NumberingType m_numberingType
the number type ( for number field )
Definition libwps_internal.h:504
bool addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist (if possible)
Definition libwps_internal.cpp:423
std::string m_data
the database/link field ( if defined )
Definition libwps_internal.h:506
WPSField(Type type)
basic constructor
Definition libwps_internal.h:492
small structure use to store a stream and it debug file
Definition WPSStream.h:30
internal struct used to create sorted map, sorted by X, Y, Z
Definition libwps_internal.h:1064
bool operator()(WPSVec3< T > const &s1, WPSVec3< T > const &s2) const
comparaison function
Definition libwps_internal.h:1066
a noop deleter used to transform a librevenge pointer in a false shared_ptr
Definition libwps_internal.h:82
void operator()(T *)
Definition libwps_internal.h:83