libmwaw_internal.hxx
Go to the documentation of this file.
/* -*- Mode: C++; c-default-style: "k&r"; indent-tabs-mode: nil; tab-width: 2; c-basic-offset: 2 -*- */
/* libmwaw
* Version: MPL 2.0 / LGPLv2+
*
* The contents of this file are subject to the Mozilla Public License Version
* 2.0 (the "License"); you may not use this file except in compliance with
* the License or as specified alternatively below. You may obtain a copy of
* the License at http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* Major Contributor(s):
* Copyright (C) 2002 William Lachance (wrlach@gmail.com)
* Copyright (C) 2002,2004 Marc Maurer (uwog@uwog.net)
* Copyright (C) 2004-2006 Fridrich Strba (fridrich.strba@bluewin.ch)
* Copyright (C) 2006, 2007 Andrew Ziem
* Copyright (C) 2011, 2012 Alonso Laurent (alonso@loria.fr)
*
*
* All Rights Reserved.
*
* For minor contributions see the git repository.
*
* Alternatively, the contents of this file may be used under the terms of
* the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"),
* in which case the provisions of the LGPLv2+ are applicable
* instead of those above.
*/
#ifndef LIBMWAW_INTERNAL_H
#define LIBMWAW_INTERNAL_H
#ifdef DEBUG
#include <stdio.h>
#endif
#include <math.h>
#include <algorithm>
#include <cmath>
#include <limits>
#include <map>
#include <memory>
#include <ostream>
#include <string>
#include <vector>
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#include <librevenge-stream/librevenge-stream.h>
#include <librevenge/librevenge.h>
#if defined(_MSC_VER) || defined(__DJGPP__)
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed int int32_t;
typedef unsigned int uint32_t;
typedef unsigned __int64 uint64_t;
typedef __int64 int64_t;
#else /* !_MSC_VER && !__DJGPP__*/
# ifdef HAVE_CONFIG_H
# include <config.h>
# ifdef HAVE_STDINT_H
# include <stdint.h>
# endif
# ifdef HAVE_INTTYPES_H
# include <inttypes.h>
# endif
# else
// assume that the headers are there inside LibreOffice build when no HAVE_CONFIG_H is defined
# include <stdint.h>
# include <inttypes.h>
# endif
#endif /* _MSC_VER || __DJGPP__ */
// define gmtime_r and localtime_r on Windows, so that can use
// thread-safe functions on other environments
#ifdef _WIN32
# define gmtime_r(tp,tmp) (gmtime(tp)?(*(tmp)=*gmtime(tp),(tmp)):0)
# define localtime_r(tp,tmp) (localtime(tp)?(*(tmp)=*localtime(tp),(tmp)):0)
#endif
/* ---------- memory --------------- */
template <class T>
struct MWAW_shared_ptr_noop_deleter {
void operator()(T *) {}
};
#if defined(HAVE_FUNC_ATTRIBUTE_FORMAT)
# define LIBMWAW_ATTRIBUTE_PRINTF(fmt, arg) __attribute__((format(printf, fmt, arg)))
#else
# define LIBMWAW_ATTRIBUTE_PRINTF(fmt, arg)
#endif
#define MWAW_N_ELEMENTS(m) sizeof(m)/sizeof(m[0])
#if defined(HAVE_CLANG_ATTRIBUTE_FALLTHROUGH)
# define MWAW_FALLTHROUGH [[clang::fallthrough]]
#elif defined(HAVE_GCC_ATTRIBUTE_FALLTHROUGH)
# define MWAW_FALLTHROUGH __attribute__((fallthrough))
#else
# define MWAW_FALLTHROUGH ((void) 0)
#endif
/* ---------- debug --------------- */
#ifdef DEBUG
namespace libmwaw
{
void printDebugMsg(const char *format, ...) LIBMWAW_ATTRIBUTE_PRINTF(1,2);
}
#define MWAW_DEBUG_MSG(M) libmwaw::printDebugMsg M
#else
#define MWAW_DEBUG_MSG(M)
#endif
namespace libmwaw
{
// Various exceptions:
class VersionException
{
};
class FileException
{
};
class ParseException
{
};
class GenericException
{
};
class WrongPasswordException
{
};
}
/* ---------- input ----------------- */
namespace libmwaw
{
uint8_t readU8(librevenge::RVNGInputStream *input);
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer);
template<typename T>
bool checkAddOverflow(T x, T y)
{
return (x < 0 && y < std::numeric_limits<T>::lowest() - x)
|| (x > 0 && y > std::numeric_limits<T>::max() - x);
}
}
/* ---------- small enum/class ------------- */
namespace libmwaw
{
enum Position { Left = 0, Right = 1, Top = 2, Bottom = 3, HMiddle = 4, VMiddle = 5 };
enum { LeftBit = 0x01, RightBit = 0x02, TopBit=0x4, BottomBit = 0x08, HMiddleBit = 0x10, VMiddleBit = 0x20 };
enum NumberingType { NONE, BULLET, ARABIC, LOWERCASE, UPPERCASE, LOWERCASE_ROMAN, UPPERCASE_ROMAN };
std::string numberingTypeToString(NumberingType type);
std::string numberingValueToString(NumberingType type, int value);
enum WritingMode { WritingLeftTop, WritingLeftBottom, WritingRightTop, WritingRightBottom, WritingInherited };
std::string writingModeToString(WritingMode mode);
enum SubDocumentType { DOC_NONE, DOC_CHART, DOC_CHART_ZONE, DOC_COMMENT_ANNOTATION, DOC_GRAPHIC_GROUP, DOC_HEADER_FOOTER, DOC_NOTE, DOC_SHEET, DOC_TABLE, DOC_TEXT_BOX };
}
struct MWAWColor {
explicit MWAWColor(uint32_t argb=0)
: m_value(argb)
{
}
MWAWColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
: m_value(uint32_t((a<<24)+(r<<16)+(g<<8)+b))
{
}
MWAWColor(MWAWColor const &) = default;
MWAWColor(MWAWColor &&) = default;
MWAWColor &operator=(MWAWColor const &) = default;
MWAWColor &operator=(MWAWColor &&) = default;
MWAWColor &operator=(uint32_t argb)
{
m_value = argb;
return *this;
}
static MWAWColor colorFromCMYK(unsigned char c, unsigned char m, unsigned char y, unsigned char k)
{
double w=1.-static_cast<double>(k)/255.;
return MWAWColor
(static_cast<unsigned char>(255 * (1-static_cast<double>(c)/255) * w),
static_cast<unsigned char>(255 * (1-static_cast<double>(m)/255) * w),
static_cast<unsigned char>(255 * (1-static_cast<double>(y)/255) * w)
);
}
static MWAWColor colorFromHSL(unsigned char H, unsigned char S, unsigned char L)
{
double c=(1-((L>=128) ? (2*static_cast<double>(L)-255) : (255-2*static_cast<double>(L)))/255)*
static_cast<double>(S)/255;
double tmp=std::fmod((static_cast<double>(H)*6/255),2)-1;
double x=c*(1-(tmp>0 ? tmp : -tmp));
auto C=static_cast<unsigned char>(255*c);
auto M=static_cast<unsigned char>(static_cast<double>(L)-255*c/2);
auto X=static_cast<unsigned char>(255*x);
if (H<=42) return MWAWColor(static_cast<unsigned char>(M+C),static_cast<unsigned char>(M+X),static_cast<unsigned char>(M));
if (H<=85) return MWAWColor(static_cast<unsigned char>(M+X),static_cast<unsigned char>(M+C),static_cast<unsigned char>(M));
if (H<=127) return MWAWColor(static_cast<unsigned char>(M),static_cast<unsigned char>(M+C),static_cast<unsigned char>(M+X));
if (H<=170) return MWAWColor(static_cast<unsigned char>(M),static_cast<unsigned char>(M+X),static_cast<unsigned char>(M+C));
if (H<=212) return MWAWColor(static_cast<unsigned char>(M+X),static_cast<unsigned char>(M),static_cast<unsigned char>(M+C));
return MWAWColor(static_cast<unsigned char>(M+C),static_cast<unsigned char>(M),static_cast<unsigned char>(M+X));
}
static MWAWColor black()
{
return MWAWColor(0,0,0);
}
static MWAWColor white()
{
return MWAWColor(255,255,255);
}
static MWAWColor barycenter(float alpha, MWAWColor const &colA,
float beta, MWAWColor const &colB);
uint32_t value() const
{
return m_value;
}
unsigned char getAlpha() const
{
return static_cast<unsigned char>((m_value>>24)&0xFF);
}
unsigned char getBlue() const
{
return static_cast<unsigned char>(m_value&0xFF);
}
unsigned char getRed() const
{
return static_cast<unsigned char>((m_value>>16)&0xFF);
}
unsigned char getGreen() const
{
return static_cast<unsigned char>((m_value>>8)&0xFF);
}
bool isBlack() const
{
return (m_value&0xFFFFFF)==0;
}
bool isWhite() const
{
return (m_value&0xFFFFFF)==0xFFFFFF;
}
bool operator==(MWAWColor const &c) const
{
return (c.m_value&0xFFFFFF)==(m_value&0xFFFFFF);
}
bool operator!=(MWAWColor const &c) const
{
return !operator==(c);
}
bool operator<(MWAWColor const &c) const
{
return (c.m_value&0xFFFFFF)<(m_value&0xFFFFFF);
}
bool operator<=(MWAWColor const &c) const
{
return (c.m_value&0xFFFFFF)<=(m_value&0xFFFFFF);
}
bool operator>(MWAWColor const &c) const
{
return !operator<=(c);
}
bool operator>=(MWAWColor const &c) const
{
return !operator<(c);
}
friend std::ostream &operator<< (std::ostream &o, MWAWColor const &c);
std::string str() const;
protected:
uint32_t m_value;
};
struct MWAWBorder {
enum Style { None, Simple, Dot, LargeDot, Dash };
enum Type { Single, Double, Triple };
MWAWBorder()
: m_style(Simple)
, m_type(Single)
, m_width(1)
, m_widthsList()
, m_color(MWAWColor::black())
, m_extra("") { }
MWAWBorder(MWAWBorder const &) = default;
MWAWBorder(MWAWBorder &&) = default;
MWAWBorder &operator=(MWAWBorder const &) = default;
MWAWBorder &operator=(MWAWBorder &&) = default;
bool addTo(librevenge::RVNGPropertyList &propList, std::string which="") const;
bool isEmpty() const
{
return m_style==None || m_width <= 0;
}
bool operator==(MWAWBorder const &orig) const
{
return !operator!=(orig);
}
bool operator!=(MWAWBorder const &orig) const
{
return m_style != orig.m_style || m_type != orig.m_type ||
m_width < orig.m_width || m_width > orig.m_width || m_color != orig.m_color ||
m_widthsList != orig.m_widthsList;
}
int compare(MWAWBorder const &orig) const;
friend std::ostream &operator<< (std::ostream &o, MWAWBorder const &border);
friend std::ostream &operator<< (std::ostream &o, MWAWBorder::Style const &style);
Style m_style;
// multiple borders
Type m_type;
double m_width;
std::vector<double> m_widthsList;
MWAWColor m_color;
std::string m_extra;
};
struct MWAWField {
enum Type { None, PageCount, PageNumber, Date, Time, Title, Database, BookmarkStart, BookmarkEnd };
explicit MWAWField(Type type)
: m_type(type)
, m_numberingType(libmwaw::ARABIC)
, m_DTFormat("")
, m_data("")
{
}
MWAWField(MWAWField &&) = default;
MWAWField(MWAWField const &) = default;
MWAWField &operator=(MWAWField const &) = default;
MWAWField &operator=(MWAWField &&) = default;
bool addTo(librevenge::RVNGPropertyList &propList) const;
librevenge::RVNGString getString() const;
Type m_type;
libmwaw::NumberingType m_numberingType;
std::string m_DTFormat;
std::string m_data;
};
struct MWAWLink {
MWAWLink()
: m_HRef("")
{
}
bool addTo(librevenge::RVNGPropertyList &propList) const;
std::string m_HRef;
};
struct MWAWNote {
enum Type { FootNote, EndNote };
explicit MWAWNote(Type type)
: m_type(type)
, m_label("")
, m_number(-1)
{
}
Type m_type;
librevenge::RVNGString m_label;
int m_number;
};
struct MWAWEmbeddedObject {
MWAWEmbeddedObject()
: m_dataList()
, m_typeList()
{
}
explicit MWAWEmbeddedObject(librevenge::RVNGBinaryData const &binaryData,
std::string const &type="image/pict") : m_dataList(), m_typeList()
{
add(binaryData, type);
}
MWAWEmbeddedObject(MWAWEmbeddedObject const &)=default;
MWAWEmbeddedObject &operator=(MWAWEmbeddedObject const &)=default;
MWAWEmbeddedObject &operator=(MWAWEmbeddedObject &&)=default;
~MWAWEmbeddedObject();
bool isEmpty() const
{
for (auto const &data : m_dataList) {
if (!data.empty())
return false;
}
return true;
}
void add(librevenge::RVNGBinaryData const &binaryData, std::string const &type="image/pict")
{
size_t pos=m_dataList.size();
if (pos<m_typeList.size()) pos=m_typeList.size();
m_dataList.resize(pos+1);
m_dataList[pos]=binaryData;
m_typeList.resize(pos+1);
m_typeList[pos]=type;
}
bool addTo(librevenge::RVNGPropertyList &propList) const;
friend std::ostream &operator<<(std::ostream &o, MWAWEmbeddedObject const &pict);
int cmp(MWAWEmbeddedObject const &pict) const;
std::vector<librevenge::RVNGBinaryData> m_dataList;
std::vector<std::string> m_typeList;
};
// forward declarations of basic classes and smart pointers
struct MWAWStream;
class MWAWEntry;
class MWAWFont;
class MWAWGraphicEncoder;
class MWAWGraphicShape;
class MWAWGraphicStyle;
class MWAWHeader;
class MWAWList;
class MWAWPageSpan;
class MWAWParagraph;
class MWAWParser;
class MWAWPosition;
class MWAWSection;
class MWAWFontConverter;
class MWAWFontManager;
class MWAWGraphicListener;
class MWAWInputStream;
class MWAWListener;
class MWAWListManager;
class MWAWParserState;
class MWAWPresentationListener;
class MWAWRSRCParser;
class MWAWSpreadsheetListener;
class MWAWSubDocument;
class MWAWTextListener;
typedef std::shared_ptr<MWAWFontConverter> MWAWFontConverterPtr;
typedef std::shared_ptr<MWAWFontManager> MWAWFontManagerPtr;
typedef std::shared_ptr<MWAWGraphicListener> MWAWGraphicListenerPtr;
typedef std::shared_ptr<MWAWInputStream> MWAWInputStreamPtr;
typedef std::shared_ptr<MWAWListener> MWAWListenerPtr;
typedef std::shared_ptr<MWAWListManager> MWAWListManagerPtr;
typedef std::shared_ptr<MWAWParserState> MWAWParserStatePtr;
typedef std::shared_ptr<MWAWPresentationListener> MWAWPresentationListenerPtr;
typedef std::shared_ptr<MWAWRSRCParser> MWAWRSRCParserPtr;
typedef std::shared_ptr<MWAWSpreadsheetListener> MWAWSpreadsheetListenerPtr;
typedef std::shared_ptr<MWAWSubDocument> MWAWSubDocumentPtr;
typedef std::shared_ptr<MWAWTextListener> MWAWTextListenerPtr;
template <class T> struct MWAWVariable {
MWAWVariable()
: m_data()
, m_set(false) {}
explicit MWAWVariable(T const &def)
: m_data(def)
, m_set(false) {}
MWAWVariable(MWAWVariable const &orig)
: m_data(orig.m_data)
, m_set(orig.m_set) {}
MWAWVariable &operator=(MWAWVariable const &) = default;
MWAWVariable &operator=(T const &val)
{
m_data = val;
m_set = true;
return std::forward<MWAWVariable &>(*this);
}
void insert(MWAWVariable const &orig)
{
if (orig.m_set) {
m_data = orig.m_data;
m_set = orig.m_set;
}
}
T const *operator->() const
{
return &m_data;
}
T *operator->()
{
m_set = true;
return &m_data;
}
T const &operator*() const
{
return m_data;
}
T &operator*()
{
m_set = true;
return m_data;
}
T const &get() const
{
return m_data;
}
bool isSet() const
{
return m_set;
}
void setSet(bool newVal)
{
m_set=newVal;
}
protected:
T m_data;
bool m_set;
};
/* ---------- vec2/box2f ------------- */
template <class T> class MWAWVec2
{
public:
explicit MWAWVec2(T xx=0,T yy=0)
: m_x(xx)
, m_y(yy) { }
template <class U> explicit MWAWVec2(MWAWVec2<U> const &p)
: m_x(T(p.x()))
, m_y(T(p.y())) {}
T x() const
{
return m_x;
}
T y() const
{
return m_y;
}
T operator[](int c) const
{
if (c<0 || c>1) throw libmwaw::GenericException();
return (c==0) ? m_x : m_y;
}
T &operator[](int c)
{
if (c<0 || c>1) throw libmwaw::GenericException();
return (c==0) ? m_x : m_y;
}
void set(T xx, T yy)
{
m_x = xx;
m_y = yy;
}
void setX(T xx)
{
m_x = xx;
}
void setY(T yy)
{
m_y = yy;
}
void add(T dx, T dy)
{
if (libmwaw::checkAddOverflow(m_x, dx) || libmwaw::checkAddOverflow(m_y, dy))
throw libmwaw::GenericException();
m_x += dx;
m_y += dy;
}
MWAWVec2<T> &operator+=(MWAWVec2<T> const &p)
{
add(p.m_x, p.m_y);
return *this;
}
MWAWVec2<T> &operator-=(MWAWVec2<T> const &p)
{
// check if negation of either of the coords will cause overflow
const T diff = std::numeric_limits<T>::min() + std::numeric_limits<T>::max();
if (libmwaw::checkAddOverflow(p.m_x, diff) || libmwaw::checkAddOverflow(p.m_y, diff))
throw libmwaw::GenericException();
add(-p.m_x, -p.m_y);
return *this;
}
template <class U>
MWAWVec2<T> &operator*=(U scale)
{
m_x = T(m_x*scale);
m_y = T(m_y*scale);
return *this;
}
friend MWAWVec2<T> operator+(MWAWVec2<T> const &p1, MWAWVec2<T> const &p2)
{
MWAWVec2<T> p(p1);
return p+=p2;
}
friend MWAWVec2<T> operator-(MWAWVec2<T> const &p1, MWAWVec2<T> const &p2)
{
MWAWVec2<T> p(p1);
return p-=p2;
}
template <class U>
friend MWAWVec2<T> operator*(U scale, MWAWVec2<T> const &p1)
{
MWAWVec2<T> p(p1);
return p *= scale;
}
bool operator==(MWAWVec2<T> const &p) const
{
return cmpY(p) == 0;
}
bool operator!=(MWAWVec2<T> const &p) const
{
return cmpY(p) != 0;
}
bool operator<(MWAWVec2<T> const &p) const
{
return cmpY(p) < 0;
}
int cmp(MWAWVec2<T> const &p) const
{
if (m_x < p.m_x) return -1;
if (m_x > p.m_x) return 1;
if (m_y < p.m_y) return -1;
if (m_y > p.m_y) return 1;
return 0;
}
int cmpY(MWAWVec2<T> const &p) const
{
if (m_y < p.m_y) return -1;
if (m_y > p.m_y) return 1;
if (m_x < p.m_x) return -1;
if (m_x > p.m_x) return 1;
return 0;
}
friend std::ostream &operator<< (std::ostream &o, MWAWVec2<T> const &f)
{
o << f.m_x << "x" << f.m_y;
return o;
}
struct PosSizeLtX {
bool operator()(MWAWVec2<T> const &s1, MWAWVec2<T> const &s2) const
{
return s1.cmp(s2) < 0;
}
};
typedef std::map<MWAWVec2<T>, T,struct PosSizeLtX> MapX;
struct PosSizeLtY {
bool operator()(MWAWVec2<T> const &s1, MWAWVec2<T> const &s2) const
{
return s1.cmpY(s2) < 0;
}
};
typedef std::map<MWAWVec2<T>, T,struct PosSizeLtY> MapY;
protected:
T m_x, m_y;
};
typedef MWAWVec2<bool> MWAWVec2b;
typedef MWAWVec2<int> MWAWVec2i;
typedef MWAWVec2<long> MWAWVec2l;
typedef MWAWVec2<float> MWAWVec2f;
template <class T> class MWAWVec3
{
public:
explicit MWAWVec3(T xx=0,T yy=0,T zz=0)
{
m_val[0] = xx;
m_val[1] = yy;
m_val[2] = zz;
}
template <class U> explicit MWAWVec3(MWAWVec3<U> const &p)
{
for (int c = 0; c < 3; c++) m_val[c] = T(p[c]);
}
T x() const
{
return m_val[0];
}
T y() const
{
return m_val[1];
}
T z() const
{
return m_val[2];
}
T operator[](int c) const
{
if (c<0 || c>2) throw libmwaw::GenericException();
return m_val[c];
}
T &operator[](int c)
{
if (c<0 || c>2) throw libmwaw::GenericException();
return m_val[c];
}
void set(T xx, T yy, T zz)
{
m_val[0] = xx;
m_val[1] = yy;
m_val[2] = zz;
}
void setX(T xx)
{
m_val[0] = xx;
}
void setY(T yy)
{
m_val[1] = yy;
}
void setZ(T zz)
{
m_val[2] = zz;
}
void add(T dx, T dy, T dz)
{
m_val[0] += dx;
m_val[1] += dy;
m_val[2] += dz;
}
MWAWVec3<T> &operator+=(MWAWVec3<T> const &p)
{
for (int c = 0; c < 3; c++) m_val[c] = T(m_val[c]+p.m_val[c]);
return *this;
}
MWAWVec3<T> &operator-=(MWAWVec3<T> const &p)
{
for (int c = 0; c < 3; c++) m_val[c] = T(m_val[c]-p.m_val[c]);
return *this;
}
template <class U>
MWAWVec3<T> &operator*=(U scale)
{
for (auto &c : m_val) c = T(c*scale);
return *this;
}
friend MWAWVec3<T> operator+(MWAWVec3<T> const &p1, MWAWVec3<T> const &p2)
{
MWAWVec3<T> p(p1);
return p+=p2;
}
friend MWAWVec3<T> operator-(MWAWVec3<T> const &p1, MWAWVec3<T> const &p2)
{
MWAWVec3<T> p(p1);
return p-=p2;
}
template <class U>
friend MWAWVec3<T> operator*(U scale, MWAWVec3<T> const &p1)
{
MWAWVec3<T> p(p1);
return p *= scale;
}
bool operator==(MWAWVec3<T> const &p) const
{
return cmp(p) == 0;
}
bool operator!=(MWAWVec3<T> const &p) const
{
return cmp(p) != 0;
}
bool operator<(MWAWVec3<T> const &p) const
{
return cmp(p) < 0;
}
int cmp(MWAWVec3<T> const &p) const
{
for (int c = 0; c < 3; c++) {
if (m_val[c]<p.m_val[c]) return -1;
if (m_val[c]>p.m_val[c]) return 1;
}
return 0;
}
friend std::ostream &operator<< (std::ostream &o, MWAWVec3<T> const &f)
{
o << f.m_val[0] << "x" << f.m_val[1] << "x" << f.m_val[2];
return o;
}
struct PosSizeLt {
bool operator()(MWAWVec3<T> const &s1, MWAWVec3<T> const &s2) const
{
return s1.cmp(s2) < 0;
}
};
typedef std::map<MWAWVec3<T>, T,struct PosSizeLt> Map;
protected:
T m_val[3];
};
typedef MWAWVec3<unsigned char> MWAWVec3uc;
typedef MWAWVec3<int> MWAWVec3i;
typedef MWAWVec3<float> MWAWVec3f;
template <class T> class MWAWBox2
{
public:
explicit MWAWBox2(MWAWVec2<T> minPt=MWAWVec2<T>(), MWAWVec2<T> maxPt=MWAWVec2<T>())
: m_data(minPt, maxPt)
{
}
template <class U> explicit MWAWBox2(MWAWBox2<U> const &p)
: m_data(MWAWVec2<T>(p.min()), MWAWVec2<T>(p.max()))
{
}
MWAWVec2<T> const &min() const
{
return m_data.first;
}
MWAWVec2<T> const &max() const
{
return m_data.second;
}
MWAWVec2<T> &min()
{
return m_data.first;
}
MWAWVec2<T> &max()
{
return m_data.second;
}
MWAWVec2<T> const &operator[](int c) const
{
if (c<0 || c>1) throw libmwaw::GenericException();
return c==0 ? m_data.first : m_data.second;
}
MWAWVec2<T> size() const
{
return m_data.second-m_data.first;
}
MWAWVec2<T> center() const
{
return MWAWVec2<T>((m_data.first.x()+m_data.second.x())/2,
(m_data.first.y()+m_data.second.y())/2);
}
void set(MWAWVec2<T> const &x, MWAWVec2<T> const &y)
{
m_data.first = x;
m_data.second = y;
}
void setMin(MWAWVec2<T> const &x)
{
m_data.first = x;
}
void setMax(MWAWVec2<T> const &y)
{
m_data.second = y;
}
void resizeFromMin(MWAWVec2<T> const &sz)
{
m_data.second = m_data.first+sz;
}
void resizeFromMax(MWAWVec2<T> const &sz)
{
m_data.first = m_data.second-sz;
}
void resizeFromCenter(MWAWVec2<T> const &sz)
{
MWAWVec2<T> centerPt = center();
MWAWVec2<T> decal(sz.x()/2,sz.y()/2);
m_data.first = centerPt - decal;
m_data.second = centerPt + (sz - decal);
}
template <class U> void scale(U factor)
{
m_data.first *= factor;
m_data.second *= factor;
}
void extend(T val)
{
m_data.first -= MWAWVec2<T>(val/2,val/2);
m_data.second += MWAWVec2<T>(val-(val/2),val-(val/2));
}
MWAWBox2<T> getUnion(MWAWBox2<T> const &box) const
{
MWAWBox2<T> res;
res.m_data.first=MWAWVec2<T>(m_data.first[0]<box.m_data.first[0]?m_data.first[0] : box.m_data.first[0],
m_data.first[1]<box.m_data.first[1]?m_data.first[1] : box.m_data.first[1]);
res.m_data.second=MWAWVec2<T>(m_data.second[0]>box.m_data.second[0]?m_data.second[0] : box.m_data.second[0],
m_data.second[1]>box.m_data.second[1]?m_data.second[1] : box.m_data.second[1]);
return res;
}
MWAWBox2<T> getIntersection(MWAWBox2<T> const &box) const
{
MWAWBox2<T> res;
res.m_data.first=MWAWVec2<T>(m_data.first[0]>box.m_data.first[0]?m_data.first[0] : box.m_data.first[0],
m_data.first[1]>box.m_data.first[1]?m_data.first[1] : box.m_data.first[1]);
res.m_data.second=MWAWVec2<T>(m_data.second[0]<box.m_data.second[0]?m_data.second[0] : box.m_data.second[0],
m_data.second[1]<box.m_data.second[1]?m_data.second[1] : box.m_data.second[1]);
return res;
}
bool operator==(MWAWBox2<T> const &mat) const
{
return m_data==mat.m_data;
}
bool operator!=(MWAWBox2<T> const &mat) const
{
return m_data!=mat.m_data;
}
bool operator<(MWAWBox2<T> const &mat) const
{
return m_data<mat.m_data;
}
bool operator<=(MWAWBox2<T> const &mat) const
{
return m_data<=mat.m_data;
}
bool operator>(MWAWBox2<T> const &mat) const
{
return m_data>mat.m_data;
}
bool operator>=(MWAWBox2<T> const &mat) const
{
return m_data>=mat.m_data;
}
friend std::ostream &operator<< (std::ostream &o, MWAWBox2<T> const &f)
{
o << "(" << f.min() << "<->" << f.max() << ")";
return o;
}
protected:
std::pair<MWAWVec2<T>, MWAWVec2<T> > m_data;
};
typedef MWAWBox2<int> MWAWBox2i;
typedef MWAWBox2<float> MWAWBox2f;
typedef MWAWBox2<long> MWAWBox2l;
class MWAWTransformation
{
public:
explicit MWAWTransformation(MWAWVec3f const &xRow=MWAWVec3f(1,0,0), MWAWVec3f const &yRow=MWAWVec3f(0,1,0))
: m_data(xRow, yRow)
, m_isIdentity(false)
{
checkIdentity();
}
bool isIdentity() const
{
return m_isIdentity;
}
void checkIdentity() const
{
m_isIdentity= m_data.first==MWAWVec3f(1,0,0) && m_data.second==MWAWVec3f(0,1,0);
}
MWAWVec3f const &operator[](int c) const
{
if (c<0 || c>1) throw libmwaw::GenericException();
return c==0 ? m_data.first : m_data.second;
}
MWAWVec2f operator*(MWAWVec2f const &pt) const
{
if (m_isIdentity) return pt;
return multiplyDirection(pt)+MWAWVec2f(m_data.first[2],m_data.second[2]);
}
MWAWVec2f multiplyDirection(MWAWVec2f const &dir) const
{
if (m_isIdentity) return dir;
MWAWVec2f res;
for (int coord=0; coord<2; ++coord) {
MWAWVec3f const &row=coord==0 ? m_data.first : m_data.second;
float value=0;
for (int i=0; i<2; ++i)
value+=row[i]*dir[i];
res[coord]=value;
}
return res;
}
MWAWBox2f operator*(MWAWBox2f const &box) const
{
if (m_isIdentity) return box;
return MWAWBox2f(operator*(box.min()), operator*(box.max()));
}
MWAWTransformation operator*(MWAWTransformation const &mat) const
{
if (mat.m_isIdentity) return *this;
MWAWTransformation res;
for (int row=0; row<2; ++row) {
MWAWVec3f &resRow=row==0 ? res.m_data.first : res.m_data.second;
for (int col=0; col<3; ++col) {
float value=0;
for (int i=0; i<3; ++i)
value+=(*this)[row][i]*(i==2 ? (col==2 ? 1.f : 0.f) : mat[i][col]);
resRow[col]=value;
}
}
res.checkIdentity();
return res;
}
MWAWTransformation &operator*=(MWAWTransformation const &mat)
{
if (!mat.m_isIdentity)
*this=(*this)*mat;
return *this;
}
bool operator==(MWAWTransformation const &mat) const
{
return m_data==mat.m_data;
}
bool operator!=(MWAWTransformation const &mat) const
{
return m_data!=mat.m_data;
}
bool operator<(MWAWTransformation const &mat) const
{
return m_data<mat.m_data;
}
bool operator<=(MWAWTransformation const &mat) const
{
return m_data<=mat.m_data;
}
bool operator>(MWAWTransformation const &mat) const
{
return m_data>mat.m_data;
}
bool operator>=(MWAWTransformation const &mat) const
{
return m_data>=mat.m_data;
}
bool decompose(float &rotation, MWAWVec2f &shearing, MWAWTransformation &transform, MWAWVec2f const &center) const;
static MWAWTransformation translation(MWAWVec2f const &trans)
{
return MWAWTransformation(MWAWVec3f(1, 0, trans[0]), MWAWVec3f(0, 1, trans[1]));
}
static MWAWTransformation scale(MWAWVec2f const &trans)
{
return MWAWTransformation(MWAWVec3f(trans[0], 0, 0), MWAWVec3f(0, trans[1], 0));
}
static MWAWTransformation rotation(float angle, MWAWVec2f const &center=MWAWVec2f(0,0));
static MWAWTransformation shear(MWAWVec2f s, MWAWVec2f const &center=MWAWVec2f(0,0))
{
return MWAWTransformation(MWAWVec3f(1, s[0], -s[0]*center[1]), MWAWVec3f(s[1], 1, -s[1]*center[0]));
}
protected:
std::pair<MWAWVec3f, MWAWVec3f > m_data;
mutable bool m_isIdentity;
};
// some format function
namespace libmwaw
{
bool convertDTFormat(std::string const &dtFormat, librevenge::RVNGPropertyListVector &propVect);
}
// some geometrical function
namespace libmwaw
{
MWAWVec2f rotatePointAroundCenter(MWAWVec2f const &point, MWAWVec2f const &center, float angle);
MWAWBox2f rotateBoxFromCenter(MWAWBox2f const &box, float angle);
}
#endif /* LIBMWAW_INTERNAL_H */
// vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab:
MWAWBox2
small class which defines a 2D Box
Definition libmwaw_internal.hxx:1025
MWAWBox2::MWAWBox2
MWAWBox2(MWAWBox2< U > const &p)
generic constructor
Definition libmwaw_internal.hxx:1033
MWAWBox2::operator>
bool operator>(MWAWBox2< T > const &mat) const
operator>
Definition libmwaw_internal.hxx:1169
MWAWBox2< int >::max
MWAWVec2< int > const & max() const
Definition libmwaw_internal.hxx:1044
MWAWBox2::resizeFromCenter
void resizeFromCenter(MWAWVec2< T > const &sz)
resize the box keeping the center
Definition libmwaw_internal.hxx:1106
MWAWBox2::min
MWAWVec2< T > & min()
the minimum 2D point (in x and in y)
Definition libmwaw_internal.hxx:1049
MWAWBox2< int >::min
MWAWVec2< int > const & min() const
Definition libmwaw_internal.hxx:1039
MWAWBox2::scale
void scale(U factor)
scales all points of the box by factor
Definition libmwaw_internal.hxx:1115
MWAWBox2::operator==
bool operator==(MWAWBox2< T > const &mat) const
operator==
Definition libmwaw_internal.hxx:1149
MWAWBox2::max
MWAWVec2< T > & max()
the maximum 2D point (in x and in y)
Definition libmwaw_internal.hxx:1054
MWAWBox2::setMin
void setMin(MWAWVec2< T > const &x)
resets the minimum point
Definition libmwaw_internal.hxx:1085
MWAWBox2::center
MWAWVec2< T > center() const
the box center
Definition libmwaw_internal.hxx:1072
MWAWBox2::operator<=
bool operator<=(MWAWBox2< T > const &mat) const
operator<=
Definition libmwaw_internal.hxx:1164
MWAWBox2::operator<<
friend std::ostream & operator<<(std::ostream &o, MWAWBox2< T > const &f)
print data in form X0xY0<->X1xY1
Definition libmwaw_internal.hxx:1179
MWAWBox2::operator<
bool operator<(MWAWBox2< T > const &mat) const
operator<
Definition libmwaw_internal.hxx:1159
MWAWBox2::operator!=
bool operator!=(MWAWBox2< T > const &mat) const
operator!=
Definition libmwaw_internal.hxx:1154
MWAWBox2::set
void set(MWAWVec2< T > const &x, MWAWVec2< T > const &y)
resets the data to minimum x and maximum y
Definition libmwaw_internal.hxx:1079
MWAWBox2::extend
void extend(T val)
extends the bdbox by (val, val) keeping the center
Definition libmwaw_internal.hxx:1122
MWAWBox2::operator>=
bool operator>=(MWAWBox2< T > const &mat) const
operator>=
Definition libmwaw_internal.hxx:1174
MWAWBox2::getIntersection
MWAWBox2< T > getIntersection(MWAWBox2< T > const &box) const
returns the intersection between this and box
Definition libmwaw_internal.hxx:1139
MWAWBox2::resizeFromMax
void resizeFromMax(MWAWVec2< T > const &sz)
resize the box keeping the maximum
Definition libmwaw_internal.hxx:1101
MWAWBox2::resizeFromMin
void resizeFromMin(MWAWVec2< T > const &sz)
resize the box keeping the minimum
Definition libmwaw_internal.hxx:1096
MWAWBox2::operator[]
MWAWVec2< T > const & operator[](int c) const
the two extremum points which defined the box
Definition libmwaw_internal.hxx:1061
MWAWBox2::size
MWAWVec2< T > size() const
the box size
Definition libmwaw_internal.hxx:1067
MWAWBox2::MWAWBox2
MWAWBox2(MWAWVec2< T > minPt=MWAWVec2< T >(), MWAWVec2< T > maxPt=MWAWVec2< T >())
constructor
Definition libmwaw_internal.hxx:1028
MWAWBox2< int >::m_data
std::pair< MWAWVec2< int >, MWAWVec2< int > > m_data
Definition libmwaw_internal.hxx:1187
MWAWBox2::setMax
void setMax(MWAWVec2< T > const &y)
resets the maximum point
Definition libmwaw_internal.hxx:1090
MWAWBox2::getUnion
MWAWBox2< T > getUnion(MWAWBox2< T > const &box) const
returns the union between this and box
Definition libmwaw_internal.hxx:1129
MWAWEntry
basic class to store an entry in a file This contained :
Definition MWAWEntry.hxx:47
MWAWFontConverter
a namespace used to convert Mac font characters in unicode
Definition MWAWFontConverter.hxx:63
MWAWFontManager
a font manager which can be used to store fonts, ...
Definition MWAWFont.hxx:583
MWAWFont
Class to store font.
Definition MWAWFont.hxx:44
MWAWGraphicEncoder
main class used to define store librevenge::RVNGDrawingInterface lists of command in a librevenge::RV...
Definition MWAWGraphicEncoder.hxx:56
MWAWGraphicListener
This class contains the code needed to create Graphic document.
Definition MWAWGraphicListener.hxx:60
MWAWGraphicShape
a structure used to define a picture shape
Definition MWAWGraphicShape.hxx:46
MWAWGraphicStyle
a structure used to define a picture style
Definition MWAWGraphicStyle.hxx:48
MWAWHeader
a function used by MWAWDocument to store the version of document
Definition MWAWHeader.hxx:57
MWAWInputStream
Internal class used to read the file stream Internal class used to read the file stream,...
Definition MWAWInputStream.hxx:54
MWAWListManager
a manager which manages the lists, keeps the different kind of lists, to assure the unicity of each l...
Definition MWAWList.hxx:218
MWAWList
a small structure used to store the informations about a list
Definition MWAWList.hxx:125
MWAWListener
This class contains a virtual interface to all listener.
Definition MWAWListener.hxx:50
MWAWPageSpan
A class which defines the page properties.
Definition MWAWPageSpan.hxx:99
MWAWParagraph
class to store the paragraph properties
Definition MWAWParagraph.hxx:85
MWAWParserState
a class to define the parser state
Definition MWAWParser.hxx:50
MWAWParser
virtual class which defines the ancestor of all main zone parser
Definition MWAWParser.hxx:100
MWAWPosition
Class to define the position of an object (textbox, picture, ..) in the document.
Definition MWAWPosition.hxx:48
MWAWPresentationListener
This class contains code needed to write a presention document.
Definition MWAWPresentationListener.hxx:60
MWAWRSRCParser
the main class to read a Mac resource fork
Definition MWAWRSRCParser.hxx:47
MWAWSection
a class which stores section properties
Definition MWAWSection.hxx:46
MWAWSpreadsheetListener
This class contents the main functions needed to create a spreadsheet processing Document.
Definition MWAWSpreadsheetListener.hxx:66
MWAWSubDocument
abstract class used to store a subdocument (with a comparison function)
Definition MWAWSubDocument.hxx:42
MWAWTextListener
This class contents the main functions needed to create a Word processing Document.
Definition MWAWTextListener.hxx:65
MWAWTransformation
a transformation which stored the first row of a 3x3 perspective matrix
Definition libmwaw_internal.hxx:1199
MWAWTransformation::multiplyDirection
MWAWVec2f multiplyDirection(MWAWVec2f const &dir) const
operator* for direction
Definition libmwaw_internal.hxx:1233
MWAWTransformation::checkIdentity
void checkIdentity() const
check if a matrix is the identity matrix
Definition libmwaw_internal.hxx:1214
MWAWTransformation::shear
static MWAWTransformation shear(MWAWVec2f s, MWAWVec2f const &center=MWAWVec2f(0, 0))
returns a shear transformation letting center invariant, ie.
Definition libmwaw_internal.hxx:1328
MWAWTransformation::scale
static MWAWTransformation scale(MWAWVec2f const &trans)
returns a scaling transformation
Definition libmwaw_internal.hxx:1317
MWAWTransformation::rotation
static MWAWTransformation rotation(float angle, MWAWVec2f const &center=MWAWVec2f(0, 0))
returns a rotation transformation around center.
Definition libmwaw_internal.cxx:646
MWAWTransformation::operator*
MWAWBox2f operator*(MWAWBox2f const &box) const
operator* for box2f
Definition libmwaw_internal.hxx:1247
MWAWTransformation::operator*
MWAWVec2f operator*(MWAWVec2f const &pt) const
operator* for vec2f
Definition libmwaw_internal.hxx:1227
MWAWTransformation::operator[]
MWAWVec3f const & operator[](int c) const
the two extremum points which defined the box
Definition libmwaw_internal.hxx:1221
MWAWTransformation::isIdentity
bool isIdentity() const
returns true if the matrix is an identity matrix
Definition libmwaw_internal.hxx:1209
MWAWTransformation::operator>=
bool operator>=(MWAWTransformation const &mat) const
operator>=
Definition libmwaw_internal.hxx:1302
MWAWTransformation::operator*=
MWAWTransformation & operator*=(MWAWTransformation const &mat)
operator*=
Definition libmwaw_internal.hxx:1270
MWAWTransformation::operator*
MWAWTransformation operator*(MWAWTransformation const &mat) const
operator* for transform
Definition libmwaw_internal.hxx:1253
MWAWTransformation::translation
static MWAWTransformation translation(MWAWVec2f const &trans)
returns a translation transformation
Definition libmwaw_internal.hxx:1312
MWAWTransformation::m_data
std::pair< MWAWVec3f, MWAWVec3f > m_data
the data
Definition libmwaw_internal.hxx:1334
MWAWTransformation::operator<
bool operator<(MWAWTransformation const &mat) const
operator<
Definition libmwaw_internal.hxx:1287
MWAWTransformation::operator==
bool operator==(MWAWTransformation const &mat) const
operator==
Definition libmwaw_internal.hxx:1277
MWAWTransformation::operator<=
bool operator<=(MWAWTransformation const &mat) const
operator<=
Definition libmwaw_internal.hxx:1292
MWAWTransformation::MWAWTransformation
MWAWTransformation(MWAWVec3f const &xRow=MWAWVec3f(1, 0, 0), MWAWVec3f const &yRow=MWAWVec3f(0, 1, 0))
constructor
Definition libmwaw_internal.hxx:1202
MWAWTransformation::operator>
bool operator>(MWAWTransformation const &mat) const
operator>
Definition libmwaw_internal.hxx:1297
MWAWTransformation::decompose
bool decompose(float &rotation, MWAWVec2f &shearing, MWAWTransformation &transform, MWAWVec2f const &center) const
try to decompose the matrix in a rotation + scaling/translation matrix.
Definition libmwaw_internal.cxx:655
MWAWTransformation::operator!=
bool operator!=(MWAWTransformation const &mat) const
operator!=
Definition libmwaw_internal.hxx:1282
MWAWTransformation::m_isIdentity
bool m_isIdentity
flag to know if this matrix is an identity matrix
Definition libmwaw_internal.hxx:1336
MWAWVec2
small class which defines a vector with 2 elements
Definition libmwaw_internal.hxx:656
MWAWVec2::operator+
friend MWAWVec2< T > operator+(MWAWVec2< T > const &p1, MWAWVec2< T > const &p2)
operator+
Definition libmwaw_internal.hxx:742
MWAWVec2::operator<<
friend std::ostream & operator<<(std::ostream &o, MWAWVec2< T > const &f)
operator<<: prints data in form "XxY"
Definition libmwaw_internal.hxx:796
MWAWVec2::add
void add(T dx, T dy)
increases the actuals values by dx and dy
Definition libmwaw_internal.hxx:708
MWAWVec2::operator[]
T operator[](int c) const
operator[]
Definition libmwaw_internal.hxx:678
MWAWVec2::setY
void setY(T yy)
resets the second element
Definition libmwaw_internal.hxx:702
MWAWVec2::operator-=
MWAWVec2< T > & operator-=(MWAWVec2< T > const &p)
operator-=
Definition libmwaw_internal.hxx:723
MWAWVec2< bool >::m_x
bool m_x
Definition libmwaw_internal.hxx:832
MWAWVec2::cmp
int cmp(MWAWVec2< T > const &p) const
a comparison function: which first compares x then y
Definition libmwaw_internal.hxx:777
MWAWVec2::operator+=
MWAWVec2< T > & operator+=(MWAWVec2< T > const &p)
operator+=
Definition libmwaw_internal.hxx:717
MWAWVec2::cmpY
int cmpY(MWAWVec2< T > const &p) const
a comparison function: which first compares y then x
Definition libmwaw_internal.hxx:786
MWAWVec2::operator<
bool operator<(MWAWVec2< T > const &p) const
comparison<: sort by y
Definition libmwaw_internal.hxx:772
MWAWVec2::operator*
friend MWAWVec2< T > operator*(U scale, MWAWVec2< T > const &p1)
generic operator*
Definition libmwaw_internal.hxx:755
MWAWVec2< bool >::y
bool y() const
Definition libmwaw_internal.hxx:673
MWAWVec2::MapX
std::map< MWAWVec2< T >, T, struct PosSizeLtX > MapX
map of MWAWVec2
Definition libmwaw_internal.hxx:815
MWAWVec2< bool >::x
bool x() const
Definition libmwaw_internal.hxx:668
MWAWVec2::operator==
bool operator==(MWAWVec2< T > const &p) const
comparison==
Definition libmwaw_internal.hxx:762
MWAWVec2::set
void set(T xx, T yy)
resets the two elements
Definition libmwaw_internal.hxx:691
MWAWVec2::MWAWVec2
MWAWVec2(T xx=0, T yy=0)
constructor
Definition libmwaw_internal.hxx:659
MWAWVec2::operator*=
MWAWVec2< T > & operator*=(U scale)
generic operator*=
Definition libmwaw_internal.hxx:734
MWAWVec2< bool >::m_y
bool m_y
Definition libmwaw_internal.hxx:832
MWAWVec2::operator[]
T & operator[](int c)
operator[]
Definition libmwaw_internal.hxx:684
MWAWVec2::operator!=
bool operator!=(MWAWVec2< T > const &p) const
comparison!=
Definition libmwaw_internal.hxx:767
MWAWVec2::setX
void setX(T xx)
resets the first element
Definition libmwaw_internal.hxx:697
MWAWVec2::MapY
std::map< MWAWVec2< T >, T, struct PosSizeLtY > MapY
map of MWAWVec2
Definition libmwaw_internal.hxx:830
MWAWVec2::operator-
friend MWAWVec2< T > operator-(MWAWVec2< T > const &p1, MWAWVec2< T > const &p2)
operator-
Definition libmwaw_internal.hxx:748
MWAWVec2::MWAWVec2
MWAWVec2(MWAWVec2< U > const &p)
generic copy constructor
Definition libmwaw_internal.hxx:663
MWAWVec3
small class which defines a vector with 3 elements
Definition libmwaw_internal.hxx:848
MWAWVec3::operator*=
MWAWVec3< T > & operator*=(U scale)
generic operator*=
Definition libmwaw_internal.hxx:936
MWAWVec3::z
T z() const
third element
Definition libmwaw_internal.hxx:874
MWAWVec3::Map
std::map< MWAWVec3< T >, T, struct PosSizeLt > Map
map of MWAWVec3
Definition libmwaw_internal.hxx:1007
MWAWVec3::MWAWVec3
MWAWVec3(T xx=0, T yy=0, T zz=0)
constructor
Definition libmwaw_internal.hxx:851
MWAWVec3::operator[]
T operator[](int c) const
operator[]
Definition libmwaw_internal.hxx:879
MWAWVec3::operator+=
MWAWVec3< T > & operator+=(MWAWVec3< T > const &p)
operator+=
Definition libmwaw_internal.hxx:923
MWAWVec3::operator*
friend MWAWVec3< T > operator*(U scale, MWAWVec3< T > const &p1)
generic operator*
Definition libmwaw_internal.hxx:956
MWAWVec3::x
T x() const
first element
Definition libmwaw_internal.hxx:864
MWAWVec3::add
void add(T dx, T dy, T dz)
increases the actuals values by dx, dy, dz
Definition libmwaw_internal.hxx:915
MWAWVec3::operator[]
T & operator[](int c)
operator[]
Definition libmwaw_internal.hxx:885
MWAWVec3::setX
void setX(T xx)
resets the first element
Definition libmwaw_internal.hxx:899
MWAWVec3::setY
void setY(T yy)
resets the second element
Definition libmwaw_internal.hxx:904
MWAWVec3::operator-=
MWAWVec3< T > & operator-=(MWAWVec3< T > const &p)
operator-=
Definition libmwaw_internal.hxx:929
MWAWVec3::setZ
void setZ(T zz)
resets the third element
Definition libmwaw_internal.hxx:909
MWAWVec3::operator-
friend MWAWVec3< T > operator-(MWAWVec3< T > const &p1, MWAWVec3< T > const &p2)
operator-
Definition libmwaw_internal.hxx:949
MWAWVec3::operator<<
friend std::ostream & operator<<(std::ostream &o, MWAWVec3< T > const &f)
operator<<: prints data in form "XxYxZ"
Definition libmwaw_internal.hxx:988
MWAWVec3::set
void set(T xx, T yy, T zz)
resets the three elements
Definition libmwaw_internal.hxx:892
MWAWVec3::operator!=
bool operator!=(MWAWVec3< T > const &p) const
comparison!=
Definition libmwaw_internal.hxx:968
MWAWVec3::operator==
bool operator==(MWAWVec3< T > const &p) const
comparison==
Definition libmwaw_internal.hxx:963
MWAWVec3::operator+
friend MWAWVec3< T > operator+(MWAWVec3< T > const &p1, MWAWVec3< T > const &p2)
operator+
Definition libmwaw_internal.hxx:943
MWAWVec3::MWAWVec3
MWAWVec3(MWAWVec3< U > const &p)
generic copy constructor
Definition libmwaw_internal.hxx:858
MWAWVec3< unsigned char >::m_val
unsigned char m_val[3]
Definition libmwaw_internal.hxx:1011
MWAWVec3::y
T y() const
second element
Definition libmwaw_internal.hxx:869
MWAWVec3::cmp
int cmp(MWAWVec3< T > const &p) const
a comparison function: which first compares x values, then y values then z values.
Definition libmwaw_internal.hxx:978
MWAWVec3::operator<
bool operator<(MWAWVec3< T > const &p) const
comparison<: which first compares x values, then y values then z values.
Definition libmwaw_internal.hxx:973
libmwaw::FileException
Definition libmwaw_internal.hxx:140
libmwaw::GenericException
Definition libmwaw_internal.hxx:148
libmwaw::ParseException
Definition libmwaw_internal.hxx:144
libmwaw::VersionException
Definition libmwaw_internal.hxx:136
libmwaw::WrongPasswordException
Definition libmwaw_internal.hxx:152
MWAWPresentationListenerPtr
std::shared_ptr< MWAWPresentationListener > MWAWPresentationListenerPtr
a smart pointer of MWAWPresentationListener
Definition libmwaw_internal.hxx:559
MWAWListManagerPtr
std::shared_ptr< MWAWListManager > MWAWListManagerPtr
a smart pointer of MWAWListManager
Definition libmwaw_internal.hxx:555
MWAWVec2i
MWAWVec2< int > MWAWVec2i
MWAWVec2 of int.
Definition libmwaw_internal.hxx:838
MWAWGraphicListenerPtr
std::shared_ptr< MWAWGraphicListener > MWAWGraphicListenerPtr
a smart pointer of MWAWGraphicListener
Definition libmwaw_internal.hxx:549
MWAWSpreadsheetListenerPtr
std::shared_ptr< MWAWSpreadsheetListener > MWAWSpreadsheetListenerPtr
a smart pointer of MWAWSpreadsheetListener
Definition libmwaw_internal.hxx:563
MWAWSubDocumentPtr
std::shared_ptr< MWAWSubDocument > MWAWSubDocumentPtr
a smart pointer of MWAWSubDocument
Definition libmwaw_internal.hxx:565
MWAWBox2f
MWAWBox2< float > MWAWBox2f
MWAWBox2 of float.
Definition libmwaw_internal.hxx:1193
MWAWVec2l
MWAWVec2< long > MWAWVec2l
MWAWVec2 of long.
Definition libmwaw_internal.hxx:840
MWAWFontConverterPtr
std::shared_ptr< MWAWFontConverter > MWAWFontConverterPtr
a smart pointer of MWAWFontConverter
Definition libmwaw_internal.hxx:545
MWAWBox2i
MWAWBox2< int > MWAWBox2i
MWAWBox2 of int.
Definition libmwaw_internal.hxx:1191
MWAWParserStatePtr
std::shared_ptr< MWAWParserState > MWAWParserStatePtr
a smart pointer of MWAWParserState
Definition libmwaw_internal.hxx:557
MWAWRSRCParserPtr
std::shared_ptr< MWAWRSRCParser > MWAWRSRCParserPtr
a smart pointer of MWAWRSRCParser
Definition libmwaw_internal.hxx:561
MWAWBox2l
MWAWBox2< long > MWAWBox2l
MWAWBox2 of long.
Definition libmwaw_internal.hxx:1195
MWAWListenerPtr
std::shared_ptr< MWAWListener > MWAWListenerPtr
a smart pointer of MWAWListener
Definition libmwaw_internal.hxx:553
MWAWVec2f
MWAWVec2< float > MWAWVec2f
MWAWVec2 of float.
Definition libmwaw_internal.hxx:842
MWAWVec2b
MWAWVec2< bool > MWAWVec2b
MWAWVec2 of bool.
Definition libmwaw_internal.hxx:836
MWAWVec3f
MWAWVec3< float > MWAWVec3f
MWAWVec3 of float.
Definition libmwaw_internal.hxx:1019
MWAWVec3i
MWAWVec3< int > MWAWVec3i
MWAWVec3 of int.
Definition libmwaw_internal.hxx:1017
LIBMWAW_ATTRIBUTE_PRINTF
#define LIBMWAW_ATTRIBUTE_PRINTF(fmt, arg)
Definition libmwaw_internal.hxx:108
MWAWFontManagerPtr
std::shared_ptr< MWAWFontManager > MWAWFontManagerPtr
a smart pointer of MWAWFontManager
Definition libmwaw_internal.hxx:547
MWAWVec3uc
MWAWVec3< unsigned char > MWAWVec3uc
MWAWVec3 of unsigned char.
Definition libmwaw_internal.hxx:1015
MWAWTextListenerPtr
std::shared_ptr< MWAWTextListener > MWAWTextListenerPtr
a smart pointer of MWAWTextListener
Definition libmwaw_internal.hxx:567
MWAWInputStreamPtr
std::shared_ptr< MWAWInputStream > MWAWInputStreamPtr
a smart pointer of MWAWInputStream
Definition libmwaw_internal.hxx:551
libmwaw
namespace used to regroup all libwpd functions, enumerations which we have redefined for internal usa...
Definition libmwaw_internal.cxx:51
libmwaw::writingModeToString
std::string writingModeToString(WritingMode mode)
a function to convert a writing mode in string lt-rb, ...
Definition libmwaw_internal.cxx:184
libmwaw::WritingMode
WritingMode
the different writing mode
Definition libmwaw_internal.hxx:185
libmwaw::WritingLeftBottom
@ WritingLeftBottom
Definition libmwaw_internal.hxx:185
libmwaw::WritingLeftTop
@ WritingLeftTop
Definition libmwaw_internal.hxx:185
libmwaw::WritingInherited
@ WritingInherited
Definition libmwaw_internal.hxx:185
libmwaw::WritingRightBottom
@ WritingRightBottom
Definition libmwaw_internal.hxx:185
libmwaw::WritingRightTop
@ WritingRightTop
Definition libmwaw_internal.hxx:185
libmwaw::numberingTypeToString
std::string numberingTypeToString(NumberingType type)
Definition libmwaw_internal.cxx:106
libmwaw::SubDocumentType
SubDocumentType
Definition libmwaw_internal.hxx:188
libmwaw::DOC_CHART
@ DOC_CHART
Definition libmwaw_internal.hxx:188
libmwaw::DOC_CHART_ZONE
@ DOC_CHART_ZONE
Definition libmwaw_internal.hxx:188
libmwaw::DOC_TEXT_BOX
@ DOC_TEXT_BOX
Definition libmwaw_internal.hxx:188
libmwaw::DOC_HEADER_FOOTER
@ DOC_HEADER_FOOTER
Definition libmwaw_internal.hxx:188
libmwaw::DOC_NONE
@ DOC_NONE
Definition libmwaw_internal.hxx:188
libmwaw::DOC_TABLE
@ DOC_TABLE
Definition libmwaw_internal.hxx:188
libmwaw::DOC_SHEET
@ DOC_SHEET
Definition libmwaw_internal.hxx:188
libmwaw::DOC_COMMENT_ANNOTATION
@ DOC_COMMENT_ANNOTATION
Definition libmwaw_internal.hxx:188
libmwaw::DOC_GRAPHIC_GROUP
@ DOC_GRAPHIC_GROUP
Definition libmwaw_internal.hxx:188
libmwaw::DOC_NOTE
@ DOC_NOTE
Definition libmwaw_internal.hxx:188
libmwaw::rotatePointAroundCenter
MWAWVec2f rotatePointAroundCenter(MWAWVec2f const &point, MWAWVec2f const &center, float angle)
rotate a point around center, angle is given in degree
Definition libmwaw_internal.cxx:700
libmwaw::checkAddOverflow
bool checkAddOverflow(T x, T y)
checks whether addition of x and y would overflow
Definition libmwaw_internal.hxx:165
libmwaw::readU8
uint8_t readU8(librevenge::RVNGInputStream *input)
Definition libmwaw_internal.cxx:52
libmwaw::VMiddleBit
@ VMiddleBit
Definition libmwaw_internal.hxx:178
libmwaw::LeftBit
@ LeftBit
Definition libmwaw_internal.hxx:178
libmwaw::BottomBit
@ BottomBit
Definition libmwaw_internal.hxx:178
libmwaw::HMiddleBit
@ HMiddleBit
Definition libmwaw_internal.hxx:178
libmwaw::TopBit
@ TopBit
Definition libmwaw_internal.hxx:178
libmwaw::RightBit
@ RightBit
Definition libmwaw_internal.hxx:178
libmwaw::numberingValueToString
std::string numberingValueToString(NumberingType type, int value)
Definition libmwaw_internal.cxx:130
libmwaw::appendUnicode
void appendUnicode(uint32_t val, librevenge::RVNGString &buffer)
adds an unicode character to a string
Definition libmwaw_internal.cxx:63
libmwaw::rotateBoxFromCenter
MWAWBox2f rotateBoxFromCenter(MWAWBox2f const &box, float angle)
rotate a bdox and returns the final bdbox, angle is given in degree
Definition libmwaw_internal.cxx:708
libmwaw::convertDTFormat
bool convertDTFormat(std::string const &dtFormat, librevenge::RVNGPropertyListVector &propVect)
convert a DTFormat in a propertyList
Definition libmwaw_internal.cxx:324
libmwaw::NumberingType
NumberingType
Definition libmwaw_internal.hxx:180
libmwaw::NONE
@ NONE
Definition libmwaw_internal.hxx:180
libmwaw::BULLET
@ BULLET
Definition libmwaw_internal.hxx:180
libmwaw::LOWERCASE_ROMAN
@ LOWERCASE_ROMAN
Definition libmwaw_internal.hxx:180
libmwaw::UPPERCASE_ROMAN
@ UPPERCASE_ROMAN
Definition libmwaw_internal.hxx:180
libmwaw::LOWERCASE
@ LOWERCASE
Definition libmwaw_internal.hxx:180
libmwaw::UPPERCASE
@ UPPERCASE
Definition libmwaw_internal.hxx:180
libmwaw::ARABIC
@ ARABIC
Definition libmwaw_internal.hxx:180
libmwaw::Position
Position
basic position enum
Definition libmwaw_internal.hxx:176
libmwaw::VMiddle
@ VMiddle
Definition libmwaw_internal.hxx:176
libmwaw::Top
@ Top
Definition libmwaw_internal.hxx:176
libmwaw::Bottom
@ Bottom
Definition libmwaw_internal.hxx:176
libmwaw::HMiddle
@ HMiddle
Definition libmwaw_internal.hxx:176
libmwaw::Left
@ Left
Definition libmwaw_internal.hxx:176
libmwaw::Right
@ Right
Definition libmwaw_internal.hxx:176
MWAWBorder
a border
Definition libmwaw_internal.hxx:333
MWAWBorder::operator!=
bool operator!=(MWAWBorder const &orig) const
operator!=
Definition libmwaw_internal.hxx:366
MWAWBorder::m_style
Style m_style
the border style
Definition libmwaw_internal.hxx:380
MWAWBorder::compare
int compare(MWAWBorder const &orig) const
compare two borders
Definition libmwaw_internal.cxx:432
MWAWBorder::MWAWBorder
MWAWBorder()
constructor
Definition libmwaw_internal.hxx:340
MWAWBorder::Type
Type
the line repetition
Definition libmwaw_internal.hxx:337
MWAWBorder::Single
@ Single
Definition libmwaw_internal.hxx:337
MWAWBorder::Double
@ Double
Definition libmwaw_internal.hxx:337
MWAWBorder::Triple
@ Triple
Definition libmwaw_internal.hxx:337
MWAWBorder::m_type
Type m_type
the border repetition
Definition libmwaw_internal.hxx:385
MWAWBorder::MWAWBorder
MWAWBorder(MWAWBorder const &)=default
MWAWBorder::operator=
MWAWBorder & operator=(MWAWBorder const &)=default
MWAWBorder::m_extra
std::string m_extra
extra data ( if needed)
Definition libmwaw_internal.hxx:395
MWAWBorder::m_widthsList
std::vector< double > m_widthsList
the different length used for each line/sep (if defined)
Definition libmwaw_internal.hxx:391
MWAWBorder::operator==
bool operator==(MWAWBorder const &orig) const
operator==
Definition libmwaw_internal.hxx:361
MWAWBorder::Style
Style
the line style
Definition libmwaw_internal.hxx:335
MWAWBorder::Simple
@ Simple
Definition libmwaw_internal.hxx:335
MWAWBorder::Dash
@ Dash
Definition libmwaw_internal.hxx:335
MWAWBorder::Dot
@ Dot
Definition libmwaw_internal.hxx:335
MWAWBorder::LargeDot
@ LargeDot
Definition libmwaw_internal.hxx:335
MWAWBorder::None
@ None
Definition libmwaw_internal.hxx:335
MWAWBorder::m_width
double m_width
the border total width in point
Definition libmwaw_internal.hxx:387
MWAWBorder::operator<<
friend std::ostream & operator<<(std::ostream &o, MWAWBorder const &border)
operator<<
Definition libmwaw_internal.cxx:541
MWAWBorder::addTo
bool addTo(librevenge::RVNGPropertyList &propList, std::string which="") const
add the border property to proplist (if needed )
Definition libmwaw_internal.cxx:444
MWAWBorder::operator=
MWAWBorder & operator=(MWAWBorder &&)=default
MWAWBorder::m_color
MWAWColor m_color
the border color
Definition libmwaw_internal.hxx:393
MWAWBorder::MWAWBorder
MWAWBorder(MWAWBorder &&)=default
MWAWBorder::isEmpty
bool isEmpty() const
returns true if the border is empty
Definition libmwaw_internal.hxx:356
MWAWColor
the class to store a color
Definition libmwaw_internal.hxx:192
MWAWColor::getGreen
unsigned char getGreen() const
returns the green value
Definition libmwaw_internal.hxx:279
MWAWColor::getBlue
unsigned char getBlue() const
returns the green value
Definition libmwaw_internal.hxx:269
MWAWColor::MWAWColor
MWAWColor(MWAWColor const &)=default
copy constructor
MWAWColor::operator<
bool operator<(MWAWColor const &c) const
operator<
Definition libmwaw_internal.hxx:304
MWAWColor::barycenter
static MWAWColor barycenter(float alpha, MWAWColor const &colA, float beta, MWAWColor const &colB)
return alpha*colA+beta*colB
Definition libmwaw_internal.cxx:206
MWAWColor::colorFromCMYK
static MWAWColor colorFromCMYK(unsigned char c, unsigned char m, unsigned char y, unsigned char k)
return a color from a cmyk color ( basic)
Definition libmwaw_internal.hxx:218
MWAWColor::str
std::string str() const
print the color in the form #rrggbb
Definition libmwaw_internal.cxx:232
MWAWColor::operator>
bool operator>(MWAWColor const &c) const
operator>
Definition libmwaw_internal.hxx:314
MWAWColor::black
static MWAWColor black()
return the back color
Definition libmwaw_internal.hxx:245
MWAWColor::MWAWColor
MWAWColor(MWAWColor &&)=default
move assignement
MWAWColor::operator=
MWAWColor & operator=(MWAWColor &&)=default
move operator=
MWAWColor::colorFromHSL
static MWAWColor colorFromHSL(unsigned char H, unsigned char S, unsigned char L)
return a color from a hsl color (basic)
Definition libmwaw_internal.hxx:228
MWAWColor::value
uint32_t value() const
return the rgba value
Definition libmwaw_internal.hxx:259
MWAWColor::operator<<
friend std::ostream & operator<<(std::ostream &o, MWAWColor const &c)
operator<< in the form #rrggbb
Definition libmwaw_internal.cxx:220
MWAWColor::isWhite
bool isWhite() const
return true if the color is white
Definition libmwaw_internal.hxx:289
MWAWColor::operator>=
bool operator>=(MWAWColor const &c) const
operator>=
Definition libmwaw_internal.hxx:319
MWAWColor::operator!=
bool operator!=(MWAWColor const &c) const
operator!=
Definition libmwaw_internal.hxx:299
MWAWColor::operator<=
bool operator<=(MWAWColor const &c) const
operator<=
Definition libmwaw_internal.hxx:309
MWAWColor::MWAWColor
MWAWColor(uint32_t argb=0)
constructor
Definition libmwaw_internal.hxx:194
MWAWColor::operator=
MWAWColor & operator=(MWAWColor const &)=default
operator=
MWAWColor::white
static MWAWColor white()
return the white color
Definition libmwaw_internal.hxx:250
MWAWColor::m_value
uint32_t m_value
the argb color
Definition libmwaw_internal.hxx:329
MWAWColor::MWAWColor
MWAWColor(unsigned char r, unsigned char g, unsigned char b, unsigned char a=255)
constructor from color
Definition libmwaw_internal.hxx:199
MWAWColor::getAlpha
unsigned char getAlpha() const
returns the alpha value
Definition libmwaw_internal.hxx:264
MWAWColor::operator=
MWAWColor & operator=(uint32_t argb)
operator=
Definition libmwaw_internal.hxx:212
MWAWColor::isBlack
bool isBlack() const
return true if the color is black
Definition libmwaw_internal.hxx:284
MWAWColor::operator==
bool operator==(MWAWColor const &c) const
operator==
Definition libmwaw_internal.hxx:294
MWAWColor::getRed
unsigned char getRed() const
returns the red value
Definition libmwaw_internal.hxx:274
MWAWEmbeddedObject
small class use to define a embedded object
Definition libmwaw_internal.hxx:467
MWAWEmbeddedObject::cmp
int cmp(MWAWEmbeddedObject const &pict) const
a comparison function
Definition libmwaw_internal.cxx:606
MWAWEmbeddedObject::MWAWEmbeddedObject
MWAWEmbeddedObject(MWAWEmbeddedObject const &)=default
MWAWEmbeddedObject::~MWAWEmbeddedObject
~MWAWEmbeddedObject()
destructor
Definition libmwaw_internal.cxx:575
MWAWEmbeddedObject::isEmpty
bool isEmpty() const
return true if the picture contains no data
Definition libmwaw_internal.hxx:486
MWAWEmbeddedObject::operator=
MWAWEmbeddedObject & operator=(MWAWEmbeddedObject &&)=default
MWAWEmbeddedObject::m_typeList
std::vector< std::string > m_typeList
the picture type: one type by representation
Definition libmwaw_internal.hxx:514
MWAWEmbeddedObject::operator<<
friend std::ostream & operator<<(std::ostream &o, MWAWEmbeddedObject const &pict)
operator<<
Definition libmwaw_internal.cxx:631
MWAWEmbeddedObject::MWAWEmbeddedObject
MWAWEmbeddedObject()
empty constructor
Definition libmwaw_internal.hxx:469
MWAWEmbeddedObject::operator=
MWAWEmbeddedObject & operator=(MWAWEmbeddedObject const &)=default
MWAWEmbeddedObject::MWAWEmbeddedObject
MWAWEmbeddedObject(librevenge::RVNGBinaryData const &binaryData, std::string const &type="image/pict")
constructor
Definition libmwaw_internal.hxx:475
MWAWEmbeddedObject::addTo
bool addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist
Definition libmwaw_internal.cxx:579
MWAWEmbeddedObject::add
void add(librevenge::RVNGBinaryData const &binaryData, std::string const &type="image/pict")
add a picture
Definition libmwaw_internal.hxx:495
MWAWEmbeddedObject::m_dataList
std::vector< librevenge::RVNGBinaryData > m_dataList
the picture content: one data by representation
Definition libmwaw_internal.hxx:512
MWAWField::Type
Type
Defines some basic type for field.
Definition libmwaw_internal.hxx:401
MWAWField::BookmarkStart
@ BookmarkStart
Definition libmwaw_internal.hxx:401
MWAWField::PageCount
@ PageCount
Definition libmwaw_internal.hxx:401
MWAWField::Title
@ Title
Definition libmwaw_internal.hxx:401
MWAWField::Database
@ Database
Definition libmwaw_internal.hxx:401
MWAWField::BookmarkEnd
@ BookmarkEnd
Definition libmwaw_internal.hxx:401
MWAWField::None
@ None
Definition libmwaw_internal.hxx:401
MWAWField::PageNumber
@ PageNumber
Definition libmwaw_internal.hxx:401
MWAWField::Time
@ Time
Definition libmwaw_internal.hxx:401
MWAWField::Date
@ Date
Definition libmwaw_internal.hxx:401
MWAWField::m_DTFormat
std::string m_DTFormat
the date/time format using strftime format if defined
Definition libmwaw_internal.hxx:424
MWAWField::m_numberingType
libmwaw::NumberingType m_numberingType
the number type ( for number field )
Definition libmwaw_internal.hxx:422
MWAWField::operator=
MWAWField & operator=(MWAWField const &)=default
MWAWField::MWAWField
MWAWField(MWAWField &&)=default
MWAWField::getString
librevenge::RVNGString getString() const
returns a string corresponding to the field (if possible) *‍/
Definition libmwaw_internal.cxx:294
MWAWField::operator=
MWAWField & operator=(MWAWField &&)=default
MWAWField::m_data
std::string m_data
the database/link field ( if defined ) or the bookmark name
Definition libmwaw_internal.hxx:426
MWAWField::m_type
Type m_type
the type
Definition libmwaw_internal.hxx:420
MWAWField::addTo
bool addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist (if possible)
Definition libmwaw_internal.cxx:240
MWAWField::MWAWField
MWAWField(MWAWField const &)=default
MWAWField::MWAWField
MWAWField(Type type)
basic constructor
Definition libmwaw_internal.hxx:404
MWAWLink::addTo
bool addTo(librevenge::RVNGPropertyList &propList) const
add the link property to proplist (if needed )
Definition libmwaw_internal.cxx:423
MWAWLink::m_HRef
std::string m_HRef
the href field
Definition libmwaw_internal.hxx:441
MWAWLink::MWAWLink
MWAWLink()
basic constructor
Definition libmwaw_internal.hxx:432
MWAWNote::Type
Type
enum to define note type
Definition libmwaw_internal.hxx:447
MWAWNote::FootNote
@ FootNote
Definition libmwaw_internal.hxx:447
MWAWNote::EndNote
@ EndNote
Definition libmwaw_internal.hxx:447
MWAWNote::m_number
int m_number
the note number if defined
Definition libmwaw_internal.hxx:460
MWAWNote::m_type
Type m_type
the note type
Definition libmwaw_internal.hxx:456
MWAWNote::MWAWNote
MWAWNote(Type type)
constructor
Definition libmwaw_internal.hxx:449
MWAWNote::m_label
librevenge::RVNGString m_label
the note label
Definition libmwaw_internal.hxx:458
MWAWStream
small structure use to store a stream and it debug file
Definition MWAWStream.hxx:41
MWAWVariable::operator*
T & operator*()
operator*
Definition libmwaw_internal.hxx:624
MWAWVariable::operator*
T const & operator*() const
operator*
Definition libmwaw_internal.hxx:619
MWAWVariable::insert
void insert(MWAWVariable const &orig)
update the current value if orig is set
Definition libmwaw_internal.hxx:600
MWAWVariable::operator=
MWAWVariable & operator=(MWAWVariable const &)=default
copy operator
MWAWVariable::isSet
bool isSet() const
return true if the variable is set
Definition libmwaw_internal.hxx:635
MWAWVariable::m_data
T m_data
the value
Definition libmwaw_internal.hxx:646
MWAWVariable::operator->
T const * operator->() const
operator*
Definition libmwaw_internal.hxx:608
MWAWVariable::MWAWVariable
MWAWVariable()
constructor
Definition libmwaw_internal.hxx:579
MWAWVariable::MWAWVariable
MWAWVariable(T const &def)
constructor with a default value
Definition libmwaw_internal.hxx:583
MWAWVariable::setSet
void setSet(bool newVal)
define if the variable is set
Definition libmwaw_internal.hxx:640
MWAWVariable::m_set
bool m_set
a flag to know if the variable is set or not
Definition libmwaw_internal.hxx:648
MWAWVariable::get
T const & get() const
return the current value
Definition libmwaw_internal.hxx:630
MWAWVariable::MWAWVariable
MWAWVariable(MWAWVariable const &orig)
copy constructor
Definition libmwaw_internal.hxx:587
MWAWVariable::operator=
MWAWVariable & operator=(T const &val)
set a value
Definition libmwaw_internal.hxx:593
MWAWVariable::operator->
T * operator->()
operator*
Definition libmwaw_internal.hxx:613
MWAWVec2::PosSizeLtX
internal struct used to create sorted map, sorted by X
Definition libmwaw_internal.hxx:805
MWAWVec2::PosSizeLtX::operator()
bool operator()(MWAWVec2< T > const &s1, MWAWVec2< T > const &s2) const
comparaison function
Definition libmwaw_internal.hxx:807
MWAWVec2::PosSizeLtY
internal struct used to create sorted map, sorted by Y
Definition libmwaw_internal.hxx:820
MWAWVec2::PosSizeLtY::operator()
bool operator()(MWAWVec2< T > const &s1, MWAWVec2< T > const &s2) const
comparaison function
Definition libmwaw_internal.hxx:822
MWAWVec3::PosSizeLt
internal struct used to create sorted map, sorted by X, Y, Z
Definition libmwaw_internal.hxx:997
MWAWVec3::PosSizeLt::operator()
bool operator()(MWAWVec3< T > const &s1, MWAWVec3< T > const &s2) const
comparaison function
Definition libmwaw_internal.hxx:999
MWAW_shared_ptr_noop_deleter
an noop deleter used to transform a libwpd pointer in a false std::shared_ptr
Definition libmwaw_internal.hxx:101
MWAW_shared_ptr_noop_deleter::operator()
void operator()(T *)
Definition libmwaw_internal.hxx:102