34 #ifndef LIBSTAROFFICE_INTERNAL_H 35 #define LIBSTAROFFICE_INTERNAL_H 52 #define M_PI 3.14159265358979323846 55 #include <librevenge-stream/librevenge-stream.h> 56 #include <librevenge/librevenge.h> 58 #if defined(_MSC_VER) || defined(__DJGPP__) 60 typedef signed char int8_t;
61 typedef unsigned char uint8_t;
62 typedef signed short int16_t;
63 typedef unsigned short uint16_t;
64 typedef signed int int32_t;
65 typedef unsigned int uint32_t;
66 typedef unsigned __int64 uint64_t;
67 typedef __int64 int64_t;
77 # ifdef HAVE_INTTYPES_H 78 # include <inttypes.h> 85 # include <inttypes.h> 94 # define gmtime_r(tp,tmp) (gmtime(tp)?(*(tmp)=*gmtime(tp),(tmp)):0) 95 # define localtime_r(tp,tmp) (localtime(tp)?(*(tmp)=*localtime(tp),(tmp)):0) 105 #if defined(HAVE_CLANG_ATTRIBUTE_FALLTHROUGH) 106 # define STOFF_FALLTHROUGH [[clang::fallthrough]] 107 #elif defined(HAVE_GCC_ATTRIBUTE_FALLTHROUGH) 108 # define STOFF_FALLTHROUGH __attribute__((fallthrough)) 110 # define STOFF_FALLTHROUGH ((void) 0) 113 #if defined(HAVE_FUNC_ATTRIBUTE_FORMAT) 114 # define LIBSTOFF_ATTRIBUTE_PRINTF(fmt, arg) __attribute__((format(printf, fmt, arg))) 116 # define LIBSTOFF_ATTRIBUTE_PRINTF(fmt, arg) 119 #define STOFF_N_ELEMENTS(m) sizeof(m)/sizeof(m[0]) 127 #define STOFF_DEBUG_MSG(M) libstoff::printDebugMsg M 129 #define STOFF_DEBUG_MSG(M) 159 uint8_t
readU8(librevenge::RVNGInputStream *input);
161 void appendUnicode(uint32_t val, librevenge::RVNGString &buffer);
163 librevenge::RVNGString
getString(std::vector<uint32_t>
const &unicode);
169 return (x < 0 && y < std::numeric_limits<T>::lowest() - x)
170 || (x > 0 && y > std::numeric_limits<T>::max() - x);
195 STOFFColor(
unsigned char r,
unsigned char g,
unsigned char b,
unsigned char a=255) :
196 m_value(uint32_t((a<<24)+(r<<16)+(g<<8)+b))
208 double w=1.-double(k)/255.;
210 (static_cast<unsigned char>(255 * (1-
double(c)/255) * w),
211 static_cast<unsigned char>(255 * (1-
double(m)/255) * w),
212 static_cast<unsigned char>(255 * (1-
double(y)/255) * w)
218 double c=(1-((L>=128) ? (2*
double(L)-255) : (255-2*
double(L)))/255)*
220 double tmp=std::fmod((
double(H)*6/255),2)-1;
221 double x=c*(1-(tmp>0 ? tmp : -tmp));
222 auto C=
static_cast<unsigned char>(255*c);
223 auto M=
static_cast<unsigned char>(double(L)-255*c/2);
224 auto X=
static_cast<unsigned char>(255*x);
225 if (H<=42)
return STOFFColor(static_cast<unsigned char>(M+C),static_cast<unsigned char>(M+X),static_cast<unsigned char>(M));
226 if (H<=85)
return STOFFColor(static_cast<unsigned char>(M+X),static_cast<unsigned char>(M+C),static_cast<unsigned char>(M));
227 if (H<=127)
return STOFFColor(static_cast<unsigned char>(M),static_cast<unsigned char>(M+C),static_cast<unsigned char>(M+X));
228 if (H<=170)
return STOFFColor(static_cast<unsigned char>(M),static_cast<unsigned char>(M+X),static_cast<unsigned char>(M+C));
229 if (H<=212)
return STOFFColor(static_cast<unsigned char>(M+X),static_cast<unsigned char>(M),static_cast<unsigned char>(M+C));
230 return STOFFColor(static_cast<unsigned char>(M+C),static_cast<unsigned char>(M),static_cast<unsigned char>(M+X));
254 return static_cast<unsigned char>((m_value>>24)&0xFF);
259 m_value=(m_value&0xFFFFFF)|uint32_t(alpha<<24);
264 return static_cast<unsigned char>(m_value&0xFF);
269 return static_cast<unsigned char>((m_value>>16)&0xFF);
274 return static_cast<unsigned char>((m_value>>8)&0xFF);
279 return (m_value&0xFFFFFF)==0;
284 return (m_value&0xFFFFFF)==0xFFFFFF;
289 return (c.
m_value&0xFFFFFF)==(m_value&0xFFFFFF);
294 return !operator==(c);
299 return (c.
m_value&0xFFFFFF)<(m_value&0xFFFFFF);
304 return (c.
m_value&0xFFFFFF)<=(m_value&0xFFFFFF);
309 return !operator<=(c);
314 return !operator<(c);
319 std::string str()
const;
332 bool addTo(librevenge::RVNGPropertyList &propList, std::string which=
"")
const;
336 return m_outWidth==0 && m_inWidth==0;
341 return !operator!=(orig);
369 void addTo(librevenge::RVNGPropertyList &propList)
const;
382 bool addTo(librevenge::RVNGPropertyList &propList)
const;
391 enum Type { FootNote, EndNote };
415 std::string
const &type=
"image/pict") : m_dataList(), m_typeList(), m_filenameLink(
"")
417 add(binaryData, type);
428 if (!m_filenameLink.empty())
430 for (
const auto &i : m_dataList) {
437 void add(librevenge::RVNGBinaryData
const &binaryData, std::string
const &type=
"image/pict")
439 size_t pos=m_dataList.size();
440 if (pos<m_typeList.size()) pos=m_typeList.size();
441 m_dataList.resize(pos+1);
442 m_dataList[pos]=binaryData;
443 m_typeList.resize(pos+1);
444 m_typeList[pos]=type;
447 bool addTo(librevenge::RVNGPropertyList &propList)
const;
449 bool addAsFillImageTo(librevenge::RVNGPropertyList &propList)
const;
523 return std::forward<STOFFVariable &>(*this);
530 return std::forward<STOFFVariable &>(*this);
610 return (c==0) ? m_x : m_y;
616 return (c==0) ? m_x : m_y;
655 const T diff = std::numeric_limits<T>::min() + std::numeric_limits<T>::max();
701 bool operator<(STOFFVec2<T>
const &p)
const 708 if (m_x < p.
m_x)
return -1;
709 if (m_x > p.
m_x)
return 1;
710 if (m_y < p.
m_y)
return -1;
711 if (m_y > p.
m_y)
return 1;
717 if (m_y < p.
m_y)
return -1;
718 if (m_y > p.
m_y)
return 1;
719 if (m_x < p.
m_x)
return -1;
720 if (m_x > p.
m_x)
return 1;
725 friend std::ostream &operator<< (std::ostream &o, STOFFVec2<T>
const &f)
727 o << f.m_x <<
"x" << f.m_y;
738 return s1.
cmp(s2) < 0;
744 typedef std::map<STOFFVec2<T>, T,
struct PosSizeLtX>
MapX;
753 return s1.
cmpY(s2) < 0;
759 typedef std::map<STOFFVec2<T>, T,
struct PosSizeLtY>
MapY;
789 for (
int c = 0; c < 3; c++) m_val[c] = T(p[c]);
821 void set(T xx, T yy, T zz)
844 void add(T dx, T dy, T dz)
854 for (
int c = 0; c < 3; c++) m_val[c] = T(m_val[c]+p.
m_val[c]);
860 for (
int c = 0; c < 3; c++) m_val[c] = T(m_val[c]-p.
m_val[c]);
867 for (
auto &c : m_val) c = T(c*scale);
902 bool operator<(STOFFVec3<T>
const &p)
const 909 for (
int c = 0; c < 3; c++) {
910 if (m_val[c]<p.
m_val[c])
return -1;
911 if (m_val[c]>p.
m_val[c])
return 1;
917 friend std::ostream &operator<< (std::ostream &o, STOFFVec3<T>
const &f)
919 o << f.m_val[0] <<
"x" << f.m_val[1] <<
"x" << f.m_val[2];
930 return s1.
cmp(s2) < 0;
936 typedef std::map<STOFFVec3<T>, T,
struct PosSizeLt>
Map;
967 for (
int c=0; c < 2; c++) m_pt[c] = p[c];
1001 return m_pt[1]-m_pt[0];
1007 (m_pt[0].y()+m_pt[1].y())/2);
1030 m_pt[1] = m_pt[0]+sz;
1035 m_pt[0] = m_pt[1]-sz;
1041 m_pt[0] = centerPt - 0.5*sz;
1042 m_pt[1] = centerPt + (sz - 0.5*sz);
1064 m_pt[0][1]<box.
m_pt[0][1]?m_pt[0][1] : box.
m_pt[0][1]);
1066 m_pt[1][1]>box.
m_pt[1][1]?m_pt[1][1] : box.
m_pt[1][1]);
1074 m_pt[0][1]>box.
m_pt[0][1]?m_pt[0][1] : box.
m_pt[0][1]);
1076 m_pt[1][1]<box.
m_pt[1][1]?m_pt[1][1] : box.
m_pt[1][1]);
1090 bool operator<(STOFFBox2<T>
const &p)
const 1098 int diff = m_pt[0].cmpY(p.
m_pt[0]);
1099 if (diff)
return diff;
1100 diff = m_pt[1].cmpY(p.
m_pt[1]);
1101 if (diff)
return diff;
1106 friend std::ostream &operator<< (std::ostream &o, STOFFBox2<T>
const &f)
1108 o <<
"(" << f.m_pt[0] <<
"<->" << f.m_pt[1] <<
")";
1119 return s1.
cmp(s2) < 0;
1125 typedef std::map<STOFFBox2<T>, T,
struct PosSizeLt>
Map;
1144 void splitString(librevenge::RVNGString
const &
string, librevenge::RVNGString
const &delim,
1145 librevenge::RVNGString &string1, librevenge::RVNGString &string2);
1149 librevenge::RVNGString
simplifyString(librevenge::RVNGString
const &s);
1154 float getScaleFactor(librevenge::RVNGUnit orig, librevenge::RVNGUnit dest);
Definition: libstaroffice_internal.hxx:178
STOFFVec3< float > STOFFVec3f
STOFFVec3 of float.
Definition: libstaroffice_internal.hxx:950
std::vector< std::string > m_typeList
the picture type: one type by representation
Definition: libstaroffice_internal.hxx:458
friend STOFFVec2< T > operator*(U scale, STOFFVec2< T > const &p1)
generic operator*
Definition: libstaroffice_internal.hxx:684
T x() const
first element
Definition: libstaroffice_internal.hxx:597
void extend(T val)
extends the bdbox by (val, val) keeping the center
Definition: libstaroffice_internal.hxx:1053
an noop deleter used to transform a libwpd pointer in a false std::shared_ptr
Definition: libstaroffice_internal.hxx:100
bool isEmpty() const
return true if the picture contains no data
Definition: libstaroffice_internal.hxx:426
void add(librevenge::RVNGBinaryData const &binaryData, std::string const &type="image/pict")
add a picture
Definition: libstaroffice_internal.hxx:437
void setZ(T zz)
resets the third element
Definition: libstaroffice_internal.hxx:838
Type m_type
the note type
Definition: libstaroffice_internal.hxx:397
std::map< STOFFVec3< bool >, bool, struct PosSizeLt > Map
map of STOFFVec3
Definition: libstaroffice_internal.hxx:936
STOFFVec3< T > & operator+=(STOFFVec3< T > const &p)
operator+=
Definition: libstaroffice_internal.hxx:852
Definition: libstaroffice_internal.hxx:180
internal struct used to create sorted map, sorted by X
Definition: libstaroffice_internal.hxx:734
Definition: libstaroffice_internal.hxx:178
static STOFFColor black()
return the back color
Definition: libstaroffice_internal.hxx:233
STOFFBox2< T > getIntersection(STOFFBox2< T > const &box) const
returns the intersection between this and box
Definition: libstaroffice_internal.hxx:1070
std::string getCellName(STOFFVec2i const &cellPos, STOFFVec2b const &relative)
returns the cell name corresponding to a cell's position
Definition: libstaroffice_internal.cxx:455
uint32_t value() const
return the rgba value
Definition: libstaroffice_internal.hxx:247
void setX(T xx)
resets the first element
Definition: libstaroffice_internal.hxx:626
friend STOFFVec2< T > operator+(STOFFVec2< T > const &p1, STOFFVec2< T > const &p2)
operator+
Definition: libstaroffice_internal.hxx:671
T & operator[](int c)
operator[]
Definition: libstaroffice_internal.hxx:613
STOFFVec2< long > STOFFVec2l
STOFFVec2 of long.
Definition: libstaroffice_internal.hxx:769
STOFFVec2f rotatePointAroundCenter(STOFFVec2f const &point, STOFFVec2f const ¢er, float angle)
rotate a point around center, angle is given in degree
Definition: libstaroffice_internal.cxx:471
a border line
Definition: libstaroffice_internal.hxx:326
friend STOFFVec2< T > operator-(STOFFVec2< T > const &p1, STOFFVec2< T > const &p2)
operator-
Definition: libstaroffice_internal.hxx:677
STOFFBorderLine()
constructor
Definition: libstaroffice_internal.hxx:328
Definition: libstaroffice_internal.hxx:182
Definition: libstaroffice_internal.hxx:180
STOFFVec2< T > & max()
the maximum 2D point (in x and in y)
Definition: libstaroffice_internal.hxx:986
Definition: libstaroffice_internal.hxx:143
librevenge::RVNGString m_filenameLink
a picture link
Definition: libstaroffice_internal.hxx:460
T x() const
first element
Definition: libstaroffice_internal.hxx:793
std::string numberingValueToString(NumberingType type, int value)
Definition: libstaroffice_internal.cxx:146
void insert(STOFFVariable const &orig)
update the current value if orig is set
Definition: libstaroffice_internal.hxx:533
Definition: libstaroffice_internal.hxx:180
T operator[](int c) const
operator[]
Definition: libstaroffice_internal.hxx:607
Definition: libstaroffice_internal.hxx:185
a generic variable template: value + flag to know if the variable is set
Definition: libstaroffice_internal.hxx:509
Definition: libstaroffice_internal.hxx:182
std::shared_ptr< STOFFTextListener > STOFFTextListenerPtr
a smart pointer of STOFFTextListener
Definition: libstaroffice_internal.hxx:501
bool isEmpty() const
returns true if the border is empty
Definition: libstaroffice_internal.hxx:334
small class which defines a 2D Box
Definition: libstaroffice_internal.hxx:955
std::map< STOFFVec2< bool >, bool, struct PosSizeLtX > MapX
map of STOFFVec2
Definition: libstaroffice_internal.hxx:744
small class which defines a vector with 2 elements
Definition: libstaroffice_internal.hxx:588
STOFFVec3< bool > STOFFVec3b
STOFFVec3 of bool.
Definition: libstaroffice_internal.hxx:944
bool operator==(STOFFBox2< T > const &p) const
comparison operator==
Definition: libstaroffice_internal.hxx:1080
int cmp(STOFFBox2< T > const &p) const
comparison function : fist sorts min by Y,X values then max extremity
Definition: libstaroffice_internal.hxx:1096
Definition: libstaroffice_internal.hxx:178
T z() const
third element
Definition: libstaroffice_internal.hxx:803
int m_outWidth
the outline width in TWIP
Definition: libstaroffice_internal.hxx:353
Class to store a frame style.
Definition: STOFFFrameStyle.hxx:45
void resizeFromCenter(STOFFVec2< T > const &sz)
resize the box keeping the center
Definition: libstaroffice_internal.hxx:1038
STOFFVec2< T > m_pt[2]
the two extremities
Definition: libstaroffice_internal.hxx:1129
T m_x
first element
Definition: libstaroffice_internal.hxx:761
bool operator()(STOFFBox2< T > const &s1, STOFFBox2< T > const &s2) const
comparaison function
Definition: libstaroffice_internal.hxx:1117
STOFFVec2< T > size() const
the box size
Definition: libstaroffice_internal.hxx:999
STOFFColor & operator=(uint32_t argb)
operator=
Definition: libstaroffice_internal.hxx:200
Definition: libstaroffice_internal.hxx:185
bool operator()(STOFFVec2< T > const &s1, STOFFVec2< T > const &s2) const
comparaison function
Definition: libstaroffice_internal.hxx:751
std::shared_ptr< STOFFInputStream > STOFFInputStreamPtr
a smart pointer of STOFFInputStream
Definition: libstaroffice_internal.hxx:489
STOFFVariable()
constructor
Definition: libstaroffice_internal.hxx:511
unsigned char getRed() const
returns the red value
Definition: libstaroffice_internal.hxx:267
STOFFColor m_color
the border color
Definition: libstaroffice_internal.hxx:357
int m_inWidth
the inline width in TWIP
Definition: libstaroffice_internal.hxx:355
STOFFBox2< long > STOFFBox2l
STOFFBox2 of long.
Definition: libstaroffice_internal.hxx:1137
Definition: libstaroffice_internal.hxx:185
a link
Definition: libstaroffice_internal.hxx:375
uint32_t m_value
the argb color
Definition: libstaroffice_internal.hxx:322
Definition: libstaroffice_internal.hxx:182
T m_val[3]
the values
Definition: libstaroffice_internal.hxx:940
librevenge::RVNGPropertyList m_propertyList
the property list
Definition: libstaroffice_internal.hxx:371
Definition: libstaroffice_internal.hxx:182
bool operator>=(STOFFColor const &c) const
operator>=
Definition: libstaroffice_internal.hxx:312
T y() const
second element
Definition: libstaroffice_internal.hxx:798
std::ostream & operator<<(std::ostream &o, STOFFColor const &c)
Definition: libstaroffice_internal.cxx:214
Definition: libstaroffice_internal.hxx:180
STOFFBox2(STOFFBox2< U > const &p)
generic constructor
Definition: libstaroffice_internal.hxx:965
a class to define the parser state
Definition: STOFFParser.hxx:49
void splitString(librevenge::RVNGString const &string, librevenge::RVNGString const &delim, librevenge::RVNGString &string1, librevenge::RVNGString &string2)
split a string in two. If the delimiter is not present, string1=string
Definition: libstaroffice_internal.cxx:414
STOFFVec2< T > const & min() const
the minimum 2D point (in x and in y)
Definition: libstaroffice_internal.hxx:971
std::shared_ptr< STOFFParserState > STOFFParserStatePtr
a smart pointer of STOFFParserState
Definition: libstaroffice_internal.hxx:495
STOFFVariable & operator=(STOFFVariable const &orig)
copy operator
Definition: libstaroffice_internal.hxx:517
NumberingType
Definition: libstaroffice_internal.hxx:182
void scale(U factor)
scales all points of the box by factor
Definition: libstaroffice_internal.hxx:1046
bool operator!=(STOFFVec2< T > const &p) const
comparison!=
Definition: libstaroffice_internal.hxx:696
friend STOFFVec3< T > operator+(STOFFVec3< T > const &p1, STOFFVec3< T > const &p2)
operator+
Definition: libstaroffice_internal.hxx:872
bool operator!=(STOFFColor const &c) const
operator!=
Definition: libstaroffice_internal.hxx:292
STOFFBox2< T > getUnion(STOFFBox2< T > const &box) const
returns the union between this and box
Definition: libstaroffice_internal.hxx:1060
bool operator==(STOFFBorderLine const &orig) const
operator==
Definition: libstaroffice_internal.hxx:339
internal struct used to create sorted map, sorted by X, Y, Z
Definition: libstaroffice_internal.hxx:926
bool isWhite() const
return true if the color is white
Definition: libstaroffice_internal.hxx:282
Definition: libstaroffice_internal.hxx:182
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition: libstaroffice_internal.cxx:81
STOFFVec2(T xx=0, T yy=0)
constructor
Definition: libstaroffice_internal.hxx:592
int cmp(STOFFVec2< T > const &p) const
a comparison function: which first compares x then y
Definition: libstaroffice_internal.hxx:706
STOFFVariable & operator=(T const &val)
set a value
Definition: libstaroffice_internal.hxx:526
int cmpY(STOFFVec2< T > const &p) const
a comparison function: which first compares y then x
Definition: libstaroffice_internal.hxx:715
T m_data
the value
Definition: libstaroffice_internal.hxx:579
STOFFBox2< int > STOFFBox2i
STOFFBox2 of int.
Definition: libstaroffice_internal.hxx:1133
bool operator<(STOFFColor const &c) const
operator<
Definition: libstaroffice_internal.hxx:297
void setMax(STOFFVec2< T > const &y)
resets the maximum point
Definition: libstaroffice_internal.hxx:1022
a note
Definition: libstaroffice_internal.hxx:389
STOFFVec3< unsigned char > STOFFVec3uc
STOFFVec3 of unsigned char.
Definition: libstaroffice_internal.hxx:946
bool operator!=(STOFFBorderLine const &orig) const
operator!=
Definition: libstaroffice_internal.hxx:344
STOFFBox2(STOFFVec2< T > minPt=STOFFVec2< T >(), STOFFVec2< T > maxPt=STOFFVec2< T >())
constructor
Definition: libstaroffice_internal.hxx:959
Definition: libstaroffice_internal.hxx:185
T const * operator->() const
operator*
Definition: libstaroffice_internal.hxx:541
STOFFVec3< int > STOFFVec3i
STOFFVec3 of int.
Definition: libstaroffice_internal.hxx:948
class to store the paragraph properties
Definition: STOFFParagraph.hxx:47
Definition: libstaroffice_internal.hxx:147
bool checkAddOverflow(T x, T y)
checks whether addition of x and y would overflow
Definition: libstaroffice_internal.hxx:167
STOFFVec2< T > & operator-=(STOFFVec2< T > const &p)
operator-=
Definition: libstaroffice_internal.hxx:652
Definition: libstaroffice_internal.hxx:185
Definition: libstaroffice_internal.hxx:135
void resizeFromMax(STOFFVec2< T > const &sz)
resize the box keeping the maximum
Definition: libstaroffice_internal.hxx:1033
T const & operator*() const
operator*
Definition: libstaroffice_internal.hxx:552
friend STOFFVec3< T > operator*(U scale, STOFFVec3< T > const &p1)
generic operator*
Definition: libstaroffice_internal.hxx:885
std::string m_HRef
the href field
Definition: libstaroffice_internal.hxx:385
This class contents the main functions needed to create a spreadsheet processing Document.
Definition: STOFFSpreadsheetListener.hxx:64
std::shared_ptr< STOFFSpreadsheetListener > STOFFSpreadsheetListenerPtr
a smart pointer of STOFFSpreadsheetListener
Definition: libstaroffice_internal.hxx:497
STOFFColor(uint32_t argb=0)
constructor
Definition: libstaroffice_internal.hxx:191
std::string numberingTypeToString(NumberingType type)
Definition: libstaroffice_internal.cxx:124
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition: libstaroffice_internal.cxx:52
void setAlpha(unsigned char alpha)
reset the alpha value
Definition: libstaroffice_internal.hxx:257
STOFFVec2< T > center() const
the box center
Definition: libstaroffice_internal.hxx:1004
STOFFVariable(STOFFVariable const &orig)
copy constructor
Definition: libstaroffice_internal.hxx:515
std::map< STOFFVec2< bool >, bool, struct PosSizeLtY > MapY
map of STOFFVec2
Definition: libstaroffice_internal.hxx:759
std::shared_ptr< STOFFSubDocument > STOFFSubDocumentPtr
a smart pointer of STOFFSubDocument
Definition: libstaroffice_internal.hxx:499
#define LIBSTOFF_ATTRIBUTE_PRINTF(fmt, arg)
Definition: libstaroffice_internal.hxx:116
bool operator>(STOFFColor const &c) const
operator>
Definition: libstaroffice_internal.hxx:307
Definition: libstaroffice_internal.hxx:185
STOFFColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
constructor from color
Definition: libstaroffice_internal.hxx:195
small class which defines a vector with 3 elements
Definition: libstaroffice_internal.hxx:776
void setMin(STOFFVec2< T > const &x)
resets the minimum point
Definition: libstaroffice_internal.hxx:1017
void setY(T yy)
resets the second element
Definition: libstaroffice_internal.hxx:833
STOFFVec2< bool > STOFFVec2b
STOFFVec2 of bool.
Definition: libstaroffice_internal.hxx:765
void setY(T yy)
resets the second element
Definition: libstaroffice_internal.hxx:631
bool operator<=(STOFFColor const &c) const
operator<=
Definition: libstaroffice_internal.hxx:302
Definition: libstaroffice_internal.hxx:180
STOFFVec2< T > & operator+=(STOFFVec2< T > const &p)
operator+=
Definition: libstaroffice_internal.hxx:646
SubDocumentType
Definition: libstaroffice_internal.hxx:185
void resizeFromMin(STOFFVec2< T > const &sz)
resize the box keeping the minimum
Definition: libstaroffice_internal.hxx:1028
Definition: libstaroffice_internal.hxx:178
Type
enum to define note type
Definition: libstaroffice_internal.hxx:391
STOFFField()
basic constructor
Definition: libstaroffice_internal.hxx:365
This class contains the code needed to create Graphic document.
Definition: STOFFGraphicListener.hxx:59
a class which stores section properties
Definition: STOFFSection.hxx:45
librevenge::RVNGString getString(std::vector< uint32_t > const &unicode)
transform a unicode string in a RNVGString
Definition: libstaroffice_internal.cxx:63
std::vector< librevenge::RVNGBinaryData > m_dataList
the picture content: one data by representation
Definition: libstaroffice_internal.hxx:456
Definition: libstaroffice_internal.hxx:178
a small structure used to store the informations about a list
Definition: STOFFList.hxx:109
a field
Definition: libstaroffice_internal.hxx:363
a structure used to define a picture shape
Definition: STOFFGraphicShape.hxx:45
namespace used to regroup all libwpd functions, enumerations which we have redefined for internal usa...
Definition: libstaroffice_internal.cxx:50
small class use to define a embedded object
Definition: libstaroffice_internal.hxx:408
librevenge::RVNGString simplifyString(librevenge::RVNGString const &s)
returns a simplify version of a string.
Definition: libstaroffice_internal.cxx:430
unsigned char getGreen() const
returns the green value
Definition: libstaroffice_internal.hxx:272
T & operator[](int c)
operator[]
Definition: libstaroffice_internal.hxx:814
STOFFVec3(STOFFVec3< U > const &p)
generic copy constructor
Definition: libstaroffice_internal.hxx:787
STOFFBox2f rotateBoxFromCenter(STOFFBox2f const &box, float angle)
rotate a bdox and returns the final bdbox, angle is given in degree
Definition: libstaroffice_internal.cxx:479
T & operator*()
operator*
Definition: libstaroffice_internal.hxx:557
internal struct used to create sorted map, sorted by Y
Definition: libstaroffice_internal.hxx:749
friend STOFFVec3< T > operator-(STOFFVec3< T > const &p1, STOFFVec3< T > const &p2)
operator-
Definition: libstaroffice_internal.hxx:878
This class contains the code needed to create Text document.
Definition: STOFFTextListener.hxx:59
std::shared_ptr< STOFFGraphicListener > STOFFGraphicListenerPtr
a smart pointer of STOFFGraphicListener
Definition: libstaroffice_internal.hxx:485
Definition: libstaroffice_internal.hxx:151
STOFFVec2< int > STOFFVec2i
STOFFVec2 of int.
Definition: libstaroffice_internal.hxx:767
STOFFLink()
basic constructor
Definition: libstaroffice_internal.hxx:377
STOFFVec3< T > & operator*=(U scale)
generic operator*=
Definition: libstaroffice_internal.hxx:865
int m_number
the note number if defined
Definition: libstaroffice_internal.hxx:401
Definition: libstaroffice_internal.hxx:185
void add(T dx, T dy)
increases the actuals values by dx and dy
Definition: libstaroffice_internal.hxx:637
int m_distance
the border distance
Definition: libstaroffice_internal.hxx:359
STOFFVec2(STOFFVec2< U > const &p)
generic copy constructor
Definition: libstaroffice_internal.hxx:594
Definition: libstaroffice_internal.hxx:185
T y() const
second element
Definition: libstaroffice_internal.hxx:602
the class to store a color
Definition: libstaroffice_internal.hxx:189
Class to store font.
Definition: STOFFFont.hxx:43
Position
basic position enum
Definition: libstaroffice_internal.hxx:178
std::map< STOFFBox2< int >, int, struct PosSizeLt > Map
map of STOFFBox2
Definition: libstaroffice_internal.hxx:1125
bool operator==(STOFFColor const &c) const
operator==
Definition: libstaroffice_internal.hxx:287
void setSet(bool newVal)
define if the variable is set
Definition: libstaroffice_internal.hxx:573
abstract class used to store a subdocument (with a comparison function)
Definition: STOFFSubDocument.hxx:41
STOFFVariable(T const &def)
constructor with a default value
Definition: libstaroffice_internal.hxx:513
bool operator!=(STOFFVec3< T > const &p) const
comparison!=
Definition: libstaroffice_internal.hxx:897
STOFFVec2< T > const & max() const
the maximum 2D point (in x and in y)
Definition: libstaroffice_internal.hxx:976
internal struct used to create sorted map, sorted first min then max
Definition: libstaroffice_internal.hxx:1115
STOFFVec3< T > & operator-=(STOFFVec3< T > const &p)
operator-=
Definition: libstaroffice_internal.hxx:858
Definition: libstaroffice_internal.hxx:185
Definition: libstaroffice_internal.hxx:139
librevenge::RVNGString m_label
the note label
Definition: libstaroffice_internal.hxx:399
bool isSet() const
return true if the variable is set
Definition: libstaroffice_internal.hxx:568
Definition: libstaroffice_internal.hxx:182
int cmp(STOFFVec3< T > const &p) const
a comparison function: which first compares x values, then y values then z values.
Definition: libstaroffice_internal.hxx:907
STOFFVec3(T xx=0, T yy=0, T zz=0)
constructor
Definition: libstaroffice_internal.hxx:780
unsigned char getAlpha() const
returns the alpha value
Definition: libstaroffice_internal.hxx:252
STOFFVec2< T > & min()
the minimum 2D point (in x and in y)
Definition: libstaroffice_internal.hxx:981
T m_y
second element
Definition: libstaroffice_internal.hxx:761
std::shared_ptr< STOFFListener > STOFFListenerPtr
a smart pointer of STOFFListener
Definition: libstaroffice_internal.hxx:491
void setX(T xx)
resets the first element
Definition: libstaroffice_internal.hxx:828
A class which defines the page properties.
Definition: STOFFPageSpan.hxx:75
Definition: libstaroffice_internal.hxx:180
STOFFVec2< T > & operator*=(U scale)
generic operator*=
Definition: libstaroffice_internal.hxx:663
bool operator==(STOFFVec2< T > const &p) const
comparison==
Definition: libstaroffice_internal.hxx:691
bool convertToDateTime(uint32_t date, uint32_t time, std::string &dateTime)
convert a date/time in a date time format
Definition: libstaroffice_internal.cxx:389
void operator()(T *)
Definition: libstaroffice_internal.hxx:101
basic class to store an entry in a file This contained :
Definition: STOFFEntry.hxx:46
Definition: libstaroffice_internal.hxx:178
static STOFFColor colorFromHSL(unsigned char H, unsigned char S, unsigned char L)
return a color from a hsl color (basic)
Definition: libstaroffice_internal.hxx:216
STOFFVec2< float > STOFFVec2f
STOFFVec2 of float.
Definition: libstaroffice_internal.hxx:771
bool operator()(STOFFVec2< T > const &s1, STOFFVec2< T > const &s2) const
comparaison function
Definition: libstaroffice_internal.hxx:736
std::shared_ptr< STOFFListManager > STOFFListManagerPtr
a smart pointer of STOFFListManager
Definition: libstaroffice_internal.hxx:493
static STOFFColor colorFromCMYK(unsigned char c, unsigned char m, unsigned char y, unsigned char k)
return a color from a cmyk color ( basic)
Definition: libstaroffice_internal.hxx:206
STOFFEmbeddedObject(librevenge::RVNGBinaryData const &binaryData, std::string const &type="image/pict")
constructor
Definition: libstaroffice_internal.hxx:414
virtual class which defines the ancestor of all main zone parser
Definition: STOFFParser.hxx:89
bool operator==(STOFFVec3< T > const &p) const
comparison==
Definition: libstaroffice_internal.hxx:892
T * operator->()
operator*
Definition: libstaroffice_internal.hxx:546
This class contains a virtual interface to all listener.
Definition: STOFFListener.hxx:50
unsigned char getBlue() const
returns the green value
Definition: libstaroffice_internal.hxx:262
Class to store a graphic style.
Definition: STOFFGraphicStyle.hxx:44
STOFFVec2< T > const & operator[](int c) const
the two extremum points which defined the box
Definition: libstaroffice_internal.hxx:993
bool operator!=(STOFFBox2< T > const &p) const
comparison operator!=
Definition: libstaroffice_internal.hxx:1085
STOFFBox2< float > STOFFBox2f
STOFFBox2 of float.
Definition: libstaroffice_internal.hxx:1135
bool isBlack() const
return true if the color is black
Definition: libstaroffice_internal.hxx:277
Class to define the position of an object (textbox, picture, ..) in the document. ...
Definition: STOFFPosition.hxx:47
Definition: libstaroffice_internal.hxx:182
Definition: libstaroffice_internal.hxx:185
T operator[](int c) const
operator[]
Definition: libstaroffice_internal.hxx:808
STOFFNote(Type type)
constructor
Definition: libstaroffice_internal.hxx:393
bool operator()(STOFFVec3< T > const &s1, STOFFVec3< T > const &s2) const
comparaison function
Definition: libstaroffice_internal.hxx:928
static STOFFColor white()
return the white color
Definition: libstaroffice_internal.hxx:238
bool m_set
a flag to know if the variable is set or not
Definition: libstaroffice_internal.hxx:581
a manager which manages the lists, keeps the different kind of lists, to assure the unicity of each l...
Definition: STOFFList.hxx:209
float getScaleFactor(librevenge::RVNGUnit orig, librevenge::RVNGUnit dest)
factor to convert from one unit to other
Definition: libstaroffice_internal.cxx:499
STOFFEmbeddedObject()
empty constructor
Definition: libstaroffice_internal.hxx:410
void add(T dx, T dy, T dz)
increases the actuals values by dx, dy, dz
Definition: libstaroffice_internal.hxx:844