23 #ifndef LIBWPS_INTERNAL_H 24 #define LIBWPS_INTERNAL_H 37 #include <librevenge-stream/librevenge-stream.h> 38 #include <librevenge/librevenge.h> 41 #define M_PI 3.14159265358979323846 44 #if defined(_MSC_VER) || defined(__DJGPP__) 45 typedef signed char int8_t;
46 typedef unsigned char uint8_t;
47 typedef signed short int16_t;
48 typedef unsigned short uint16_t;
49 typedef signed int int32_t;
50 typedef unsigned int uint32_t;
52 # include <inttypes.h> 63 # define gmtime_r(tp,tmp) (gmtime(tp)?(*(tmp)=*gmtime(tp),(tmp)):0) 64 # define localtime_r(tp,tmp) (localtime(tp)?(*(tmp)=*localtime(tp),(tmp)):0) 67 #if defined(SHAREDPTR_TR1) 69 using std::tr1::shared_ptr;
70 #elif defined(SHAREDPTR_STD) 72 using std::shared_ptr;
74 #include <boost/shared_ptr.hpp> 75 using boost::shared_ptr;
117 #if defined(__clang__) || defined(__GNUC__) 118 # define WPS_ATTRIBUTE_PRINTF(fmt, arg) __attribute__((__format__(__printf__, fmt, arg))) 120 # define WPS_ATTRIBUTE_PRINTF(fmt, arg) 128 #define WPS_DEBUG_MSG(M) libwps::printDebugMsg M 130 #define WPS_DEBUG_MSG(M) 161 uint8_t
readU8(librevenge::RVNGInputStream *input);
162 uint16_t
readU16(librevenge::RVNGInputStream *input);
163 uint32_t
readU32(librevenge::RVNGInputStream *input);
165 int8_t
read8(librevenge::RVNGInputStream *input);
166 int16_t
read16(librevenge::RVNGInputStream *input);
167 int32_t
read32(librevenge::RVNGInputStream *input);
171 return readU8(input.get());
184 return read8(input.get());
188 return read16(input.get());
192 return read32(input.get());
211 void appendUnicode(uint32_t val, librevenge::RVNGString &buffer);
214 #define WPS_LE_GET_GUINT16(p) \ 215 (uint16_t)((((uint8_t const *)(p))[0] << 0) | \ 216 (((uint8_t const *)(p))[1] << 8)) 217 #define WPS_LE_GET_GUINT32(p) \ 218 (uint32_t)((((uint8_t const *)(p))[0] << 0) | \ 219 (((uint8_t const *)(p))[1] << 8) | \ 220 (((uint8_t const *)(p))[2] << 16) | \ 221 (((uint8_t const *)(p))[3] << 24)) 223 #define WPS_LE_PUT_GUINT16(p, v) \ 224 *((uint8_t*)(p)) = uint8_t(v); \ 225 *(((uint8_t*)(p)) + 1) = uint8_t((v) >> 8) 227 #define WPS_LE_PUT_GUINT32(p, v) \ 228 *((uint8_t*)(p)) = uint8_t(v); \ 229 *(((uint8_t*)(p)) + 1) = uint8_t((v) >> 8); \ 230 *(((uint8_t*)(p)) + 2) = uint8_t((v) >> 16); \ 231 *(((uint8_t*)(p)) + 3) = uint8_t((v) >> 24) 273 WPSColor(
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a=255) :
274 m_value(uint32_t((a<<24)+(r<<16)+(g<<8)+b))
305 return (
unsigned char)((m_value>>24)&0xFF);
310 return (
unsigned char)(m_value&0xFF);
315 return (
unsigned char)((m_value>>16)&0xFF);
320 return (
unsigned char)((m_value>>8)&0xFF);
325 return (m_value&0xFFFFFF)==0;
330 return (m_value&0xFFFFFF)==0xFFFFFF;
335 return (c.
m_value&0xFFFFFF)==(m_value&0xFFFFFF);
340 return !operator==(c);
345 return (c.
m_value&0xFFFFFF)<(m_value&0xFFFFFF);
350 return (c.
m_value&0xFFFFFF)<=(m_value&0xFFFFFF);
355 return !operator<=(c);
360 return !operator<(c);
365 std::string str()
const;
375 enum Style { None, Simple, Dot, LargeDot, Dash };
377 enum Type { Single, Double, Triple };
378 enum Pos { Left = 0, Right = 1, Top = 2, Bottom = 3 };
379 enum { LeftBit = 0x01, RightBit = 0x02, TopBit=0x4, BottomBit = 0x08 };
382 WPSBorder() : m_style(Simple), m_type(Single), m_width(1), m_widthsList(), m_color(
WPSColor::black()), m_extra(
"") { }
386 bool addTo(librevenge::RVNGPropertyList &propList, std::string which=
"")
const;
390 return m_style==None || m_width <= 0;
402 return !operator==(orig);
405 int compare(
WPSBorder const &orig)
const;
439 std::string type=
"image/pict") : m_dataList(), m_typeList()
441 add(binaryData, type);
450 for (
size_t i=0; i<m_dataList.size(); ++i)
452 if (!m_dataList[i].empty())
458 void add(librevenge::RVNGBinaryData
const &binaryData, std::string type=
"image/pict")
460 size_t pos=m_dataList.size();
461 if (pos<m_typeList.size()) pos=m_typeList.size();
462 m_dataList.resize(pos+1);
463 m_dataList[pos]=binaryData;
464 m_typeList.resize(pos+1);
465 m_typeList[pos]=type;
468 bool addTo(librevenge::RVNGPropertyList &propList)
const;
482 enum Type { None, Database, Date, Link, PageCount, PageNumber, PageNumberNext, Time, Title };
489 bool addTo(librevenge::RVNGPropertyList &propList)
const;
491 librevenge::RVNGString getString()
const;
503 #define WPS_EXTRA_LARGE_BIT 1 504 #define WPS_VERY_LARGE_BIT 2 505 #define WPS_LARGE_BIT 4 506 #define WPS_SMALL_PRINT_BIT 8 507 #define WPS_FINE_PRINT_BIT 0x10 508 #define WPS_SUPERSCRIPT_BIT 0x20 509 #define WPS_SUBSCRIPT_BIT 0x40 510 #define WPS_OUTLINE_BIT 0x80 511 #define WPS_ITALICS_BIT 0x100 512 #define WPS_SHADOW_BIT 0x200 513 #define WPS_REDLINE_BIT 0x400 514 #define WPS_DOUBLE_UNDERLINE_BIT 0x800 515 #define WPS_BOLD_BIT 0x1000 516 #define WPS_STRIKEOUT_BIT 0x2000 517 #define WPS_UNDERLINE_BIT 0x4000 518 #define WPS_SMALL_CAPS_BIT 0x8000 519 #define WPS_BLINK_BIT 0x10000L 520 #define WPS_REVERSEVIDEO_BIT 0x20000L 521 #define WPS_ALL_CAPS_BIT 0x40000L 522 #define WPS_EMBOSS_BIT 0x80000L 523 #define WPS_ENGRAVE_BIT 0x100000L 524 #define WPS_OVERLINE_BIT 0x400000L 525 #define WPS_HIDDEN_BIT 0x800000L 528 #define WPS_PAGE_BREAK 0x00 529 #define WPS_SOFT_PAGE_BREAK 0x01 530 #define WPS_COLUMN_BREAK 0x02 533 #define WPS_LEFT 0x00 534 #define WPS_RIGHT 0x01 535 #define WPS_CENTER 0x02 537 #define WPS_BOTTOM 0x04 547 Vec2(T xx=0,T yy=0) : m_x(xx), m_y(yy) { }
549 template <
class U>
Vec2(
Vec2<U> const &p) : m_x(T(p.x())), m_y(T(p.y())) {}
565 return (c==0) ? m_x : m_y;
571 return (c==0) ? m_x : m_y;
652 bool operator<(Vec2<T>
const &p)
const 659 if (m_x<p.
m_x)
return -1;
660 if (m_x>p.
m_x)
return 1;
661 if (m_y<p.
m_y)
return -1;
662 if (m_y>p.
m_y)
return 1;
668 if (m_y<p.
m_y)
return -1;
669 if (m_y>p.
m_y)
return 1;
670 if (m_x<p.
m_x)
return -1;
671 if (m_x>p.
m_x)
return 1;
676 friend std::ostream &operator<< (std::ostream &o, Vec2<T>
const &f)
678 o << f.m_x <<
"x" << f.m_y;
690 return s1.
cmp(s2) < 0;
702 return s1.
cmpY(s2) < 0;
731 for (
int c=0; c < 2; c++) m_pt[c] = p[c];
766 return m_pt[1]-m_pt[0];
771 return 0.5*(m_pt[0]+m_pt[1]);
794 m_pt[1] = m_pt[0]+sz;
799 m_pt[0] = m_pt[1]-sz;
804 Vec2<T> ctr = 0.5*(m_pt[0]+m_pt[1]);
805 m_pt[0] = ctr - 0.5*sz;
806 m_pt[1] = ctr + (sz - 0.5*sz);
810 template <
class U>
void scale(U factor)
819 m_pt[0] -=
Vec2<T>(val/2,val/2);
820 m_pt[1] +=
Vec2<T>(val-(val/2),val-(val/2));
827 m_pt[0][1]<box.
m_pt[0][1]?m_pt[0][1] : box.
m_pt[0][1]);
829 m_pt[1][1]>box.
m_pt[1][1]?m_pt[1][1] : box.
m_pt[1][1]);
837 m_pt[0][1]>box.
m_pt[0][1]?m_pt[0][1] : box.
m_pt[0][1]);
839 m_pt[1][1]<box.
m_pt[1][1]?m_pt[1][1] : box.
m_pt[1][1]);
854 bool operator<(Box2<T>
const &p)
const 862 int diff = m_pt[0].cmpY(p.
m_pt[0]);
863 if (diff)
return diff;
864 diff = m_pt[1].cmpY(p.
m_pt[1]);
865 if (diff)
return diff;
870 friend std::ostream &operator<< (std::ostream &o, Box2<T>
const &f)
872 o <<
"(" << f.m_pt[0] <<
"<->" << f.m_pt[1] <<
")";
884 return s1.
cmp(s2) < 0;
890 typedef std::map<Box2<T>, T,
struct PosSizeLt>
Map;
std::string m_data
the database/link field ( if defined )
Definition: libwps_internal.h:499
Definition: libwps_internal.h:237
shared_ptr< WPSContentListener > WPSContentListenerPtr
shared pointer to WPSContentListener
Definition: libwps_internal.h:106
Vec2< float > Vec2f
Vec2 of float.
Definition: libwps_internal.h:714
int16_t read16(RVNGInputStreamPtr &input)
Definition: libwps_internal.h:186
WPSColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
constructor from color
Definition: libwps_internal.h:273
void setY(T yy)
resets the second element
Definition: libwps_internal.h:586
a border list
Definition: libwps_internal.h:372
Definition: libwps_internal.h:256
Definition: libwps_internal.h:152
T m_x
first element
Definition: libwps_internal.h:706
libwps::NumberingType m_numberingType
the number type ( for number field )
Definition: libwps_internal.h:497
Definition: libwps_internal.cpp:38
uint8_t readU8(RVNGInputStreamPtr &input)
Definition: libwps_internal.h:169
Vec2< T > const & operator[](int c) const
the two extremum points which defined the box
Definition: libwps_internal.h:758
Vec2< T > const & min() const
the minimum 2D point (in x and in y)
Definition: libwps_internal.h:735
shared_ptr< WPSSubDocument > WPSSubDocumentPtr
shared pointer to WPSSubDocument
Definition: libwps_internal.h:110
bool operator!=(Box2< T > const &p) const
comparison operator!=
Definition: libwps_internal.h:849
int8_t read8(RVNGInputStreamPtr &input)
Definition: libwps_internal.h:182
int cmp(Box2< T > const &p) const
comparison function : fist sorts min by Y,X values then max extremity
Definition: libwps_internal.h:860
friend Vec2< T > operator-(Vec2< T > const &p1, Vec2< T > const &p2)
operator-
Definition: libwps_internal.h:628
WPSEmbeddedObject(librevenge::RVNGBinaryData const &binaryData, std::string type="image/pict")
constructor
Definition: libwps_internal.h:438
T & operator[](int c)
operator[]
Definition: libwps_internal.h:568
small class which defines a 2D Box
Definition: libwps_internal.h:719
internal struct used to create sorted map, sorted first min then max
Definition: libwps_internal.h:879
uint16_t readU16(RVNGInputStreamPtr &input)
Definition: libwps_internal.h:173
define the font properties
Definition: WPSFont.h:36
std::vector< std::string > m_typeList
the picture type: one type by representation
Definition: libwps_internal.h:475
bool operator==(WPSColor const &c) const
operator==
Definition: libwps_internal.h:333
void resizeFromMin(Vec2< T > const &sz)
resize the box keeping the minimum
Definition: libwps_internal.h:792
double m_leftGutter
Definition: libwps_internal.h:252
a field
Definition: libwps_internal.h:479
#define WPS_ATTRIBUTE_PRINTF(fmt, arg)
Definition: libwps_internal.h:120
virtual class for content listener
Definition: WPSListener.h:36
internal struct used to create sorted map, sorted by X
Definition: libwps_internal.h:685
Type m_type
the type
Definition: libwps_internal.h:493
static WPSColor black()
return the back color
Definition: libwps_internal.h:284
int m_width
the border width
Definition: libwps_internal.h:416
static WPSColor white()
return the white color
Definition: libwps_internal.h:289
Definition: libwps_internal.h:239
WPSEmbeddedObject()
empty constructor
Definition: libwps_internal.h:434
Vec2< T > & operator+=(Vec2< T > const &p)
operator+=
Definition: libwps_internal.h:599
Definition: libwps_internal.h:237
Definition: libwps_internal.h:237
void extend(T val)
extends the bdbox by (val, val) keeping the center
Definition: libwps_internal.h:817
Definition: libwps_internal.h:239
Definition: WPSContentListener.h:44
WPSColor & operator=(uint32_t argb)
operator=
Definition: libwps_internal.h:278
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
uint32_t m_attributes
Definition: libwps_internal.h:261
Definition: libwps_internal.h:239
unsigned char getRed() const
returns the red value
Definition: libwps_internal.h:313
Box2< int > Box2i
Box2 of int.
Definition: libwps_internal.h:898
bool isBlack() const
return true if the color is black
Definition: libwps_internal.h:323
bool operator<(WPSColor const &c) const
operator<
Definition: libwps_internal.h:343
bool operator>=(WPSColor const &c) const
operator>=
Definition: libwps_internal.h:358
void add(librevenge::RVNGBinaryData const &binaryData, std::string type="image/pict")
add a picture
Definition: libwps_internal.h:458
Vec2< T > & max()
the maximum 2D point (in x and in y)
Definition: libwps_internal.h:750
Type
Defines some basic type for field.
Definition: libwps_internal.h:482
a structure used to defined the cell position, and a format
Definition: WPSCell.h:251
double m_width
Definition: libwps_internal.h:251
Vec2< T > center() const
the box center
Definition: libwps_internal.h:769
Justification
Definition: libwps_internal.h:240
double m_rightGutter
Definition: libwps_internal.h:253
virtual class to define a sub document
Definition: WPSSubDocument.h:33
WPSField(Type type)
basic constructor
Definition: libwps_internal.h:485
bool operator==(Vec2< T > const &p) const
comparison==
Definition: libwps_internal.h:642
Definition: libwps_internal.h:237
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 isEmpty() const
return true if the picture contains no data
Definition: libwps_internal.h:448
shared_ptr< WPSHeader > WPSHeaderPtr
shared pointer to WPSHeader
Definition: libwps_internal.h:108
Definition: libwps_internal.h:239
bool operator!=(Vec2< T > const &p) const
comparison!=
Definition: libwps_internal.h:647
T y() const
second element
Definition: libwps_internal.h:557
Vec2(T xx=0, T yy=0)
constructor
Definition: libwps_internal.h:547
Box2< float > Box2f
Box2 of float.
Definition: libwps_internal.h:900
Definition: libwps_internal.h:243
uint32_t readU32(RVNGInputStreamPtr &input)
Definition: libwps_internal.h:177
shared_ptr< WPSListener > WPSListenerPtr
shared pointer to WPSListener
Definition: libwps_internal.h:104
void setX(T xx)
resets the first element
Definition: libwps_internal.h:581
std::map< Box2< int >, int, struct PosSizeLt > Map
Definition: libwps_internal.h:890
WPSBorder()
constructor
Definition: libwps_internal.h:382
Definition: libwps_internal.h:243
SubDocumentType
Definition: libwps_internal.h:239
Definition: libwps_internal.h:237
Definition: libwps_internal.h:240
Definition: libwps_internal.h:239
Definition: libwps_internal.h:147
std::vector< double > m_widthsList
the different length used for each line/sep (if defined)
Definition: libwps_internal.h:420
Basic class used to store a spreadsheet sub document.
Definition: WKSSubDocument.h:35
Definition: libwps_internal.h:241
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string ( with correct encoding ).
Definition: libwps_internal.cpp:718
bool isWhite() const
return true if the color is white
Definition: libwps_internal.h:328
shared_ptr< WKSContentListener > WKSContentListenerPtr
shared pointer to WKSContentListener
Definition: libwps_internal.h:113
Vec2< T > const & max() const
the maximum 2D point (in x and in y)
Definition: libwps_internal.h:740
bool operator!=(WPSBorder const &orig) const
operator!=
Definition: libwps_internal.h:400
Definition: libwps_internal.h:239
Definition: libwps_internal.h:137
unsigned char getBlue() const
returns the green value
Definition: libwps_internal.h:308
Box2(Box2< U > const &p)
generic constructor
Definition: libwps_internal.h:729
uint32_t m_value
the argb color
Definition: libwps_internal.h:368
internal struct used to create sorted map, sorted by Y
Definition: libwps_internal.h:697
Vec2< T > m_pt[2]
the two extremities
Definition: libwps_internal.h:894
T x() const
first element
Definition: libwps_internal.h:552
void operator()(T *)
Definition: libwps_internal.h:82
Type
the line repetition
Definition: libwps_internal.h:377
void add(T dx, T dy)
increases the actuals values by dx and dy
Definition: libwps_internal.h:592
std::vector< librevenge::RVNGBinaryData > m_dataList
the picture content: one data by representation
Definition: libwps_internal.h:473
uint8_t m_alignment
Definition: libwps_internal.h:262
Definition: libwps_internal.h:246
bool operator()(Vec2< T > const &s1, Vec2< T > const &s2) const
comparaison function
Definition: libwps_internal.h:700
bool isEmpty() const
returns true if the border is empty
Definition: libwps_internal.h:388
WPSColumnProperties()
Definition: libwps_internal.h:258
Vec2< T > & operator-=(Vec2< T > const &p)
operator-=
Definition: libwps_internal.h:606
WPSColor m_color
the border color
Definition: libwps_internal.h:422
Vec2< T > & operator*=(U scale)
generic operator*=
Definition: libwps_internal.h:614
NumberingType
Definition: libwps_internal.h:237
int32_t read32(RVNGInputStreamPtr &input)
Definition: libwps_internal.h:190
uint32_t value() const
return the rgba value
Definition: libwps_internal.h:298
bool operator!=(WPSColor const &c) const
operator!=
Definition: libwps_internal.h:338
int cmpY(Vec2< T > const &p) const
a comparison function: which first compares y then x
Definition: libwps_internal.h:666
shared_ptr< librevenge::RVNGInputStream > RVNGInputStreamPtr
shared pointer to librevenge::RVNGInputStream
Definition: libwps_internal.h:87
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
Vec2< int > Vec2i
Vec2 of int.
Definition: libwps_internal.h:712
the class to store a color
Definition: libwps_internal.h:266
virtual ~WPSEmbeddedObject()
destructor
Definition: libwps_internal.h:444
Pos
Definition: libwps_internal.h:378
Definition: libwps_internal.h:241
Vec2(Vec2< U > const &p)
generic copy constructor
Definition: libwps_internal.h:549
bool operator==(Box2< T > const &p) const
comparison operator==
Definition: libwps_internal.h:844
T operator[](int c) const
operator[]
Definition: libwps_internal.h:562
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
unsigned char getGreen() const
returns the green value
Definition: libwps_internal.h:318
void resizeFromMax(Vec2< T > const &sz)
resize the box keeping the maximum
Definition: libwps_internal.h:797
bool operator<=(WPSColor const &c) const
operator<=
Definition: libwps_internal.h:348
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
void scale(U factor)
scales all points of the box by factor
Definition: libwps_internal.h:810
std::string numberingTypeToString(NumberingType type)
Definition: libwps_internal.cpp:357
bool operator>(WPSColor const &c) const
operator>
Definition: libwps_internal.h:353
void setMax(Vec2< T > const &y)
resets the maximum point
Definition: libwps_internal.h:786
Box2< T > getUnion(Box2< T > const &box) const
returns the union between this and box
Definition: libwps_internal.h:823
Style
the line style
Definition: libwps_internal.h:375
bool operator==(WPSBorder const &orig) const
operator==
Definition: libwps_internal.h:394
void setMin(Vec2< T > const &x)
resets the minimum point
Definition: libwps_internal.h:781
small class use to define a embedded object
Definition: libwps_internal.h:431
Box2(Vec2< T > minPt=Vec2< T >(), Vec2< T > maxPt=Vec2< T >())
constructor
Definition: libwps_internal.h:723
Definition: libwps_internal.h:142
WPSColumnDefinition()
Definition: libwps_internal.h:248
Style m_style
the border style
Definition: libwps_internal.h:412
Definition: libwps_internal.h:240
Definition: libwps_internal.h:237
shared_ptr< WKSSubDocument > WKSSubDocumentPtr
shared pointer to WKSSubDocument
Definition: libwps_internal.h:115
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
Definition: libwps_internal.h:240
basic class to store an entry in a file This contained :
Definition: WPSEntry.h:37
small class which defines a vector with 2 elements
Definition: libwps_internal.h:543
bool operator()(Vec2< T > const &s1, Vec2< T > const &s2) const
comparaison function
Definition: libwps_internal.h:688
Definition: libwps_internal.h:237
friend Vec2< T > operator*(U scale, Vec2< T > const &p1)
generic operator*
Definition: libwps_internal.h:635
Class to define the position of an object (textbox, picture, ..) in the document. ...
Definition: WPSPosition.h:39
Vec2< T > size() const
the box size
Definition: libwps_internal.h:764
std::string m_extra
extra data ( if needed)
Definition: libwps_internal.h:424
shared_ptr< WPSCell > WPSCellPtr
shared pointer to WPSCell
Definition: libwps_internal.h:99
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
Box2< T > getIntersection(Box2< T > const &box) const
returns the intersection between this and box
Definition: libwps_internal.h:833
std::ostream & operator<<(std::ostream &o, WPSColor const &c)
Definition: libwps_internal.cpp:401
WPSColor(uint32_t argb=0)
constructor
Definition: libwps_internal.h:269
T m_y
second element
Definition: libwps_internal.h:706
a noop deleter used to transform a librevenge pointer in a false shared_ptr
Definition: libwps_internal.h:80
bool operator()(Box2< T > const &s1, Box2< T > const &s2) const
comparaison function
Definition: libwps_internal.h:882
Type m_type
the border repetition
Definition: libwps_internal.h:414
std::string m_DTFormat
the date/time format using strftime format if defined (see strftime)
Definition: libwps_internal.h:495
Definition: WKSContentListener.h:50
int cmp(Vec2< T > const &p) const
a comparison function: which first compares x then y
Definition: libwps_internal.h:657
Vec2< bool > Vec2b
Vec2 of bool.
Definition: libwps_internal.h:710
unsigned char getAlpha() const
returns the alpha value
Definition: libwps_internal.h:303
void resizeFromCenter(Vec2< T > const &sz)
resize the box keeping the center
Definition: libwps_internal.h:802
Vec2< T > & min()
the minimum 2D point (in x and in y)
Definition: libwps_internal.h:745
friend Vec2< T > operator+(Vec2< T > const &p1, Vec2< T > const &p2)
operator+
Definition: libwps_internal.h:622