libqxp_utils.h File Reference
`#include <cmath>`
`#include <memory>`
`#include <string>`
`#include <boost/cstdint.hpp>`
`#include <librevenge-stream/librevenge-stream.h>`
`#include <librevenge/librevenge.h>`

Go to the source code of this file.

## Classes

struct | libqxp::QXPDummyDeleter
class | libqxp::EndOfStreamException
class | libqxp::GenericException
class | libqxp::FileAccessError
class | libqxp::ParseError
class | libqxp::UnsupportedFormat

## Namespaces

namespace | libqxp

## Macros

#define | QXP_EPSILON 1E-6
#define | QXP_ALMOST_ZERO(m)
#define | QXP_ATTRIBUTE_PRINTF(fmt, arg)
#define | QXP_FALLTHROUGH ((void) 0)
#define | QXP_DEBUG_MSG(M)
#define | QXP_DEBUG(M)
#define | QXP_NUM_ELEMENTS(array)

## Functions

template<typename T, typename... Args>
std::unique_ptr< T > | libqxp::make_unique (Args &&... args)
uint8_t | libqxp::readU8 (librevenge::RVNGInputStream *input, bool)
uint16_t | libqxp::readU16 (librevenge::RVNGInputStream *input, bool bigEndian)
uint32_t | libqxp::readU32 (librevenge::RVNGInputStream *input, bool bigEndian)
uint64_t | libqxp::readU64 (librevenge::RVNGInputStream *input, bool bigEndian)
int16_t | libqxp::readS16 (librevenge::RVNGInputStream *input, bool bigEndian)
int32_t | libqxp::readS32 (librevenge::RVNGInputStream *input, bool bigEndian)
double | libqxp::readFloat16 (librevenge::RVNGInputStream *input, bool bigEndian)
double | libqxp::readFraction (librevenge::RVNGInputStream *input, bool bigEndian)
const unsigned char * | libqxp::readNBytes (librevenge::RVNGInputStream *const input, const unsigned long numBytes)
string | libqxp::readCString (librevenge::RVNGInputStream *input)
string | libqxp::readPascalString (librevenge::RVNGInputStream *input)
std::string | libqxp::readString (librevenge::RVNGInputStream *input, const unsigned length)
std::string | libqxp::readPlatformString (librevenge::RVNGInputStream *input, bool bigEndian)
void | libqxp::skip (librevenge::RVNGInputStream *input, unsigned long numBytes)
void | libqxp::seek (librevenge::RVNGInputStream *const input, const unsigned long pos)
void | libqxp::seekRelative (librevenge::RVNGInputStream *const input, const long pos)
unsigned long | libqxp::getRemainingLength (librevenge::RVNGInputStream *const input)
uint8_t | libqxp::readU8 (const std::shared_ptr< librevenge::RVNGInputStream > input, bool)
uint16_t | libqxp::readU16 (const std::shared_ptr< librevenge::RVNGInputStream > input, const bool bigEndian)
uint32_t | libqxp::readU32 (const std::shared_ptr< librevenge::RVNGInputStream > input, const bool bigEndian)
uint64_t | libqxp::readU64 (const std::shared_ptr< librevenge::RVNGInputStream > input, const bool bigEndian)
int16_t | libqxp::readS16 (std::shared_ptr< librevenge::RVNGInputStream > input, bool bigEndian)
int32_t | libqxp::readS32 (std::shared_ptr< librevenge::RVNGInputStream > input, bool bigEndian)
double | libqxp::readFloat16 (std::shared_ptr< librevenge::RVNGInputStream > input, bool bigEndian)
double | libqxp::readFraction (std::shared_ptr< librevenge::RVNGInputStream > input, bool bigEndian)
const unsigned char * | libqxp::readNBytes (const std::shared_ptr< librevenge::RVNGInputStream > input, const unsigned long numBytes)
std::string | libqxp::readCString (const std::shared_ptr< librevenge::RVNGInputStream > input)
std::string | libqxp::readPascalString (const std::shared_ptr< librevenge::RVNGInputStream > input)
std::string | libqxp::readString (std::shared_ptr< librevenge::RVNGInputStream > input, const unsigned length)
std::string | libqxp::readPlatformString (std::shared_ptr< librevenge::RVNGInputStream > input, bool bigEndian)
void | libqxp::skip (const std::shared_ptr< librevenge::RVNGInputStream > input, const unsigned long numBytes)
void | libqxp::seek (const std::shared_ptr< librevenge::RVNGInputStream > input, const unsigned long pos)
void | libqxp::seekRelative (const std::shared_ptr< librevenge::RVNGInputStream > input, const long pos)
unsigned long | libqxp::getRemainingLength (const std::shared_ptr< librevenge::RVNGInputStream > &input)
double | libqxp::deg2rad (double value)
double | libqxp::normalizeDegAngle (double degAngle)
double | libqxp::normalizeRadAngle (double radAngle)
void | libqxp::appendCharacters (librevenge::RVNGString &text, const char *characters, const size_t size, const char *encoding)

## Macro Definition Documentation

## QXP_ALMOST_ZERO

#define QXP_ALMOST_ZERO | ( |  | m | ) |

Value:
(std::fabs(m) <= QXP_EPSILON)
QXP_EPSILON
#define QXP_EPSILON
Definition libqxp_utils.h:26

Referenced by libqxp::QXPContentCollector::drawOval(), libqxp::QXPContentCollector::drawRectangle(), libqxp::QXPContentCollector::drawText(), libqxp::QXPContentCollector::drawTextBox(), libqxp::QXPContentCollector::drawTextPath(), libqxp::operator==(), libqxp::Point::rotateDeg(), and libqxp::QXPContentCollector::writeFrame().

## QXP_ATTRIBUTE_PRINTF

#define QXP_ATTRIBUTE_PRINTF | ( |  | fmt,
|  |  | arg )

## QXP_DEBUG

#define QXP_DEBUG | ( |  | M | ) |

## QXP_DEBUG_MSG

#define QXP_DEBUG_MSG | ( |  | M | ) |

Referenced by libqxp::appendCharacters(), libqxp::Color::applyShade(), libqxp::QXPContentCollector::collectTextBox(), libqxp::QXPContentCollector::collectTextPath(), libqxp::QXPParser::convertTabStopType(), libqxp::QXPContentCollector::draw(), libqxp::QXPContentCollector::drawGroup(), libqxp::QXPContentCollector::drawText(), libqxp::QXPHeader::encoding(), libqxp::EndOfStreamException::EndOfStreamException(), libqxp::MWAWInputStream::get(), libqxp::QXPParser::getColor(), libqxp::QXPParser::getFont(), libqxp::QXPParser::getLineStyle(), libqxp::MWAWInputStream::getSubStreamById(), libqxp::MWAWInputStream::getSubStreamByName(), libqxp::Text::maxFontSize(), libqxp::QXPParser::parseCollection(), libqxp::QXP4Parser::parseColor(), libqxp::QXP33Parser::parseColors(), libqxp::QXP4Parser::parseColors(), libqxp::QXPParser::parseFonts(), libqxp::QXP33Parser::parseGroup(), libqxp::QXP4Parser::parseGroup(), libqxp::QXP4Parser::parseLineStyles(), libqxp::QXP1Parser::parseObject(), libqxp::QXP33Parser::parseObject(), libqxp::QXP4Parser::parseObject(), libqxp::QXP33Parser::parseObjectHeader(), libqxp::QXP4Parser::parseObjectHeader(), libqxp::QXP1Parser::parsePage(), libqxp::QXPParser::parsePageSettings(), libqxp::QXP4Parser::parseParagraphFormat(), libqxp::QXP33Parser::parsePictureBox(), libqxp::QXP4Parser::parseTabStops(), libqxp::QXPParser::parseText(), libqxp::QXP4Parser::readBezierData(), libqxp::QXPParser::readGradient(), libqxp::QXPParser::readGroupElements(), libqxp::QXPParser::readHorAlign(), libqxp::QXP33Parser::readPolygonData(), libqxp::QXP4Parser::readTextPathSettings(), libqxp::MWAWInputStream::readULong(), libqxp::QXPParser::readVertAlign(), libqxp::QXPDocumentProperties::setAutoLeading(), libqxp::QXP4Parser::skipParagraphStylesheets(), libqxp::QXP4Parser::skipTemplates(), libqxp::MWAWInputStream::subStreamCount(), libqxp::MWAWInputStream::subStreamName(), libqxp::MWAWInputStream::unBinHex(), libqxp::MWAWInputStream::unMacMIME(), libqxp::MWAWInputStream::unMacMIME(), and libqxp::MWAWInputStream::unsplitInternalMergeStream().

## QXP_EPSILON

#define QXP_EPSILON 1E-6

## QXP_FALLTHROUGH

#define QXP_FALLTHROUGH ((void) 0)

Referenced by libqxp::QXPParser::convertTabStopType(), libqxp::QXPHeader::encoding(), libqxp::QXP4Parser::parseLineStyles(), libqxp::QXP1Parser::parseObject(), libqxp::QXP33Parser::parsePictureBox(), libqxp::QXPParser::readGradient(), libqxp::QXPParser::readHorAlign(), libqxp::QXP4Parser::readTextPathSettings(), and libqxp::QXPParser::readVertAlign().

## QXP_NUM_ELEMENTS

#define QXP_NUM_ELEMENTS | ( |  | array | ) |

Value:
(sizeof(array) / sizeof(array[0]))