libstaroffice_internal.hxx File Reference
#include <assert.h>
#include <math.h>
#include <cmath>
#include <limits>
#include <map>
#include <memory>
#include <ostream>
#include <string>
#include <vector>
#include <librevenge-stream/librevenge-stream.h>
#include <librevenge/librevenge.h>
#include <stdint.h>
#include <inttypes.h>

Go to the source code of this file.

Classes

struct  STOFF_shared_ptr_noop_deleter< T >
 an noop deleter used to transform a libwpd pointer in a false std::shared_ptr More...
 
class  libstoff::VersionException
 
class  libstoff::FileException
 
class  libstoff::ParseException
 
class  libstoff::GenericException
 
class  libstoff::WrongPasswordException
 
struct  STOFFColor
 the class to store a color More...
 
struct  STOFFBorderLine
 a border line More...
 
struct  STOFFField
 a field More...
 
struct  STOFFLink
 a link More...
 
struct  STOFFNote
 a note More...
 
struct  STOFFEmbeddedObject
 small class use to define a embedded object More...
 
struct  STOFFVariable< T >
 a generic variable template: value + flag to know if the variable is set More...
 
class  STOFFVec2< T >
 small class which defines a vector with 2 elements More...
 
struct  STOFFVec2< T >::PosSizeLtX
 internal struct used to create sorted map, sorted by X More...
 
struct  STOFFVec2< T >::PosSizeLtY
 internal struct used to create sorted map, sorted by Y More...
 
class  STOFFVec3< T >
 small class which defines a vector with 3 elements More...
 
struct  STOFFVec3< T >::PosSizeLt
 internal struct used to create sorted map, sorted by X, Y, Z More...
 
class  STOFFBox2< T >
 small class which defines a 2D Box More...
 
struct  STOFFBox2< T >::PosSizeLt
 internal struct used to create sorted map, sorted first min then max More...
 

Namespaces

namespace  libstoff
 namespace used to regroup all libwpd functions, enumerations which we have redefined for internal usage
 

Macros

#define M_PI   3.14159265358979323846
 
#define STOFF_FALLTHROUGH   ((void) 0)
 fall through attributes
 
#define LIBSTOFF_ATTRIBUTE_PRINTF(fmt, arg)
 
#define STOFF_N_ELEMENTS(m)   sizeof(m)/sizeof(m[0])
 
#define STOFF_DEBUG_MSG(M)
 

Typedefs

typedef std::shared_ptr< STOFFGraphicListenerSTOFFGraphicListenerPtr
 a smart pointer of STOFFGraphicListener
 
typedef std::shared_ptr< STOFFInputStreamSTOFFInputStreamPtr
 a smart pointer of STOFFInputStream
 
typedef std::shared_ptr< STOFFListenerSTOFFListenerPtr
 a smart pointer of STOFFListener
 
typedef std::shared_ptr< STOFFListManagerSTOFFListManagerPtr
 a smart pointer of STOFFListManager
 
typedef std::shared_ptr< STOFFParserStateSTOFFParserStatePtr
 a smart pointer of STOFFParserState
 
typedef std::shared_ptr< STOFFSpreadsheetListenerSTOFFSpreadsheetListenerPtr
 a smart pointer of STOFFSpreadsheetListener
 
typedef std::shared_ptr< STOFFSubDocumentSTOFFSubDocumentPtr
 a smart pointer of STOFFSubDocument
 
typedef std::shared_ptr< STOFFTextListenerSTOFFTextListenerPtr
 a smart pointer of STOFFTextListener
 
typedef STOFFVec2< bool > STOFFVec2b
 STOFFVec2 of bool.
 
typedef STOFFVec2< int > STOFFVec2i
 STOFFVec2 of int.
 
typedef STOFFVec2< long > STOFFVec2l
 STOFFVec2 of long.
 
typedef STOFFVec2< float > STOFFVec2f
 STOFFVec2 of float.
 
typedef STOFFVec3< bool > STOFFVec3b
 STOFFVec3 of bool.
 
typedef STOFFVec3< unsigned char > STOFFVec3uc
 STOFFVec3 of unsigned char.
 
typedef STOFFVec3< int > STOFFVec3i
 STOFFVec3 of int.
 
typedef STOFFVec3< float > STOFFVec3f
 STOFFVec3 of float.
 
typedef STOFFBox2< int > STOFFBox2i
 STOFFBox2 of int.
 
typedef STOFFBox2< float > STOFFBox2f
 STOFFBox2 of float.
 
typedef STOFFBox2< long > STOFFBox2l
 STOFFBox2 of long.
 

Enumerations

enum  libstoff::Position {
  libstoff::Left = 0 , libstoff::Right = 1 , libstoff::Top = 2 , libstoff::Bottom = 3 ,
  libstoff::HMiddle = 4 , libstoff::VMiddle = 5
}
 basic position enum More...
 
enum  {
  libstoff::LeftBit = 0x01 , libstoff::RightBit = 0x02 , libstoff::TopBit =0x4 , libstoff::BottomBit = 0x08 ,
  libstoff::HMiddleBit = 0x10 , libstoff::VMiddleBit = 0x20
}
 basic position enum bits More...
 
enum  libstoff::NumberingType {
  libstoff::NONE , libstoff::BULLET , libstoff::ARABIC , libstoff::LOWERCASE ,
  libstoff::UPPERCASE , libstoff::LOWERCASE_ROMAN , libstoff::UPPERCASE_ROMAN
}
 
enum  libstoff::SubDocumentType {
  libstoff::DOC_NONE , libstoff::DOC_CHART , libstoff::DOC_CHART_ZONE , libstoff::DOC_COMMENT_ANNOTATION ,
  libstoff::DOC_GRAPHIC_GROUP , libstoff::DOC_HEADER_FOOTER_REGION , libstoff::DOC_NOTE , libstoff::DOC_SHEET ,
  libstoff::DOC_TABLE , libstoff::DOC_TEXT_BOX
}
 

Functions

uint8_t libstoff::readU8 (librevenge::RVNGInputStream *input)
 
void libstoff::appendUnicode (uint32_t val, librevenge::RVNGString &buffer)
 adds an unicode character to a string
 
librevenge::RVNGString libstoff::getString (std::vector< uint32_t > const &unicode)
 transform a unicode string in a RNVGString
 
template<typename T >
bool libstoff::checkAddOverflow (T x, T y)
 checks whether addition of x and y would overflow
 
std::string libstoff::numberingTypeToString (NumberingType type)
 
std::string libstoff::numberingValueToString (NumberingType type, int value)
 
bool libstoff::convertToDateTime (uint32_t date, uint32_t time, std::string &dateTime)
 convert a date/time in a date time format
 
void libstoff::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
 
librevenge::RVNGString libstoff::simplifyString (librevenge::RVNGString const &s)
 returns a simplify version of a string.
 
std::string libstoff::getCellName (STOFFVec2i const &cellPos, STOFFVec2b const &relative=STOFFVec2b(true, true))
 returns the cell name corresponding to a cell's position
 
float libstoff::getScaleFactor (librevenge::RVNGUnit orig, librevenge::RVNGUnit dest)
 factor to convert from one unit to other
 
STOFFVec2f libstoff::rotatePointAroundCenter (STOFFVec2f const &point, STOFFVec2f const &center, float angle)
 rotate a point around center, angle is given in degree
 
STOFFBox2f libstoff::rotateBoxFromCenter (STOFFBox2f const &box, float angle)
 rotate a bdox and returns the final bdbox, angle is given in degree
 

Macro Definition Documentation

◆ LIBSTOFF_ATTRIBUTE_PRINTF

#define LIBSTOFF_ATTRIBUTE_PRINTF (   fmt,
  arg 
)

◆ M_PI

#define M_PI   3.14159265358979323846

◆ STOFF_DEBUG_MSG

#define STOFF_DEBUG_MSG (   M)

◆ STOFF_FALLTHROUGH

#define STOFF_FALLTHROUGH   ((void) 0)

fall through attributes

◆ STOFF_N_ELEMENTS

#define STOFF_N_ELEMENTS (   m)    sizeof(m)/sizeof(m[0])

Typedef Documentation

◆ STOFFBox2f

typedef STOFFBox2<float> STOFFBox2f

STOFFBox2 of float.

◆ STOFFBox2i

typedef STOFFBox2<int> STOFFBox2i

STOFFBox2 of int.

◆ STOFFBox2l

typedef STOFFBox2<long> STOFFBox2l

STOFFBox2 of long.

◆ STOFFGraphicListenerPtr

a smart pointer of STOFFGraphicListener

◆ STOFFInputStreamPtr

typedef std::shared_ptr<STOFFInputStream> STOFFInputStreamPtr

a smart pointer of STOFFInputStream

◆ STOFFListenerPtr

typedef std::shared_ptr<STOFFListener> STOFFListenerPtr

a smart pointer of STOFFListener

◆ STOFFListManagerPtr

typedef std::shared_ptr<STOFFListManager> STOFFListManagerPtr

a smart pointer of STOFFListManager

◆ STOFFParserStatePtr

typedef std::shared_ptr<STOFFParserState> STOFFParserStatePtr

a smart pointer of STOFFParserState

◆ STOFFSpreadsheetListenerPtr

◆ STOFFSubDocumentPtr

typedef std::shared_ptr<STOFFSubDocument> STOFFSubDocumentPtr

a smart pointer of STOFFSubDocument

◆ STOFFTextListenerPtr

typedef std::shared_ptr<STOFFTextListener> STOFFTextListenerPtr

a smart pointer of STOFFTextListener

◆ STOFFVec2b

typedef STOFFVec2<bool> STOFFVec2b

STOFFVec2 of bool.

◆ STOFFVec2f

typedef STOFFVec2<float> STOFFVec2f

STOFFVec2 of float.

◆ STOFFVec2i

typedef STOFFVec2<int> STOFFVec2i

STOFFVec2 of int.

◆ STOFFVec2l

typedef STOFFVec2<long> STOFFVec2l

STOFFVec2 of long.

◆ STOFFVec3b

typedef STOFFVec3<bool> STOFFVec3b

STOFFVec3 of bool.

◆ STOFFVec3f

typedef STOFFVec3<float> STOFFVec3f

STOFFVec3 of float.

◆ STOFFVec3i

typedef STOFFVec3<int> STOFFVec3i

STOFFVec3 of int.

◆ STOFFVec3uc

typedef STOFFVec3<unsigned char> STOFFVec3uc

STOFFVec3 of unsigned char.


Generated on Fri Apr 14 2023 04:41:10 for libstaroffice by doxygen 1.9.6