libstoff Namespace Reference documentation

Namespaces | Classes | Enumerations | Functions
libstoff Namespace Reference

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

## Namespaces
namespace | Debug

## Classes
class | DebugFile
class | DebugStream
class | FileException
class | GenericException
class | ParseException
class | VersionException
class | WrongPasswordException

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

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

## Detailed Description

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

## Enumeration Type Documentation

## ◆ anonymous enum

anonymous enum

basic position enum bits

Enumerator
LeftBit |
RightBit |
TopBit |
BottomBit |
HMiddleBit |
VMiddleBit |

## ◆ NumberingType

enum libstoff::NumberingType

Enumerator
NONE |
BULLET |
ARABIC |
LOWERCASE |
UPPERCASE |
LOWERCASE_ROMAN |
UPPERCASE_ROMAN |

## ◆ Position

enum libstoff::Position

basic position enum

Enumerator
Left |
Right |
Top |
Bottom |
HMiddle |
VMiddle |

## ◆ SubDocumentType

enum libstoff::SubDocumentType

Enumerator
DOC_NONE |
DOC_CHART |
DOC_CHART_ZONE |
DOC_COMMENT_ANNOTATION |
DOC_GRAPHIC_GROUP |
DOC_HEADER_FOOTER_REGION |
DOC_NOTE |
DOC_SHEET |
DOC_TABLE |
DOC_TEXT_BOX |

## Function Documentation

## ◆ appendUnicode()

void libstoff::appendUnicode | ( | uint32_t | val,
|  | librevenge::RVNGString & | buffer )

adds an unicode character to a string

Referenced by StarParagraphAttribute::StarPAttributeBulletNumeric::addTo(), StarParagraphAttribute::StarPAttributeTabStop::addTo(), getString(), STOFFGraphicListener::insertUnicode(), STOFFSpreadsheetListener::insertUnicode(), STOFFTextListener::insertUnicode(), StarWriterStruct::DatabaseName::read(), StarObjectNumericRuler::readAttributeLevel(), StarObjectNumericRuler::readLevel(), SWFieldManagerInternal::updateDatabaseName(), and StarCellFormulaInternal::Token::updateFunction().

## ◆ checkAddOverflow()

template<typename T >

bool libstoff::checkAddOverflow | ( | T | x,
|  | T | y )

checks whether addition of `x` and `y` would overflow

Referenced by STOFFVec2< T >::add(), and STOFFVec2< T >::operator-=().

## ◆ convertToDateTime()

bool libstoff::convertToDateTime | ( | uint32_t | date,
|  | uint32_t | time,
|  | std::string & | dateTime )

convert a date/time in a date time format

Referenced by StarObject::readSfxDocumentInformation().

## ◆ getCellName()

std::string libstoff::getCellName | ( | STOFFVec2i const & | cellPos,
|  | STOFFVec2b const & | relative )

returns the cell name corresponding to a cell's position

Referenced by STOFFCell::getCellName(), and STOFFChart::Position::getCellName().

## ◆ getScaleFactor()

float libstoff::getScaleFactor | ( | librevenge::RVNGUnit | orig,
|  | librevenge::RVNGUnit | dest )

factor to convert from one unit to other

## ◆ getString()

librevenge::RVNGString libstoff::getString | ( | std::vector< uint32_t > const & | unicode | ) |

transform a unicode string in a RNVGString

Referenced by StarCellAttribute::StarCAttributePattern::read(), StarCharAttribute::StarCAttributeFont::read(), StarCharAttribute::StarCAttributeFootnote::read(), StarCharAttribute::StarCAttributeINetFmt::read(), StarCharAttribute::StarCAttributeRefMark::read(), StarGraphicAttribute::StarGAttributeNamed::read(), StarGraphicStruct::StarBrush::read(), StarObjectModel::read(), StarObjectSmallText::read(), StarPageAttribute::StarPAttributePage::read(), StarParagraphAttribute::StarPAttributeNumericRuler::read(), StarWriterStruct::Bookmark::read(), StarWriterStruct::DatabaseName::read(), StarWriterStruct::Dictionary::read(), StarWriterStruct::Macro::read(), StarWriterStruct::NoteInfo::read(), StarWriterStruct::Redline::read(), StarWriterStruct::TOX51::read(), StarWriterStruct::TOX::read(), StarAttributeManager::readAttribute(), StarObjectNumericRuler::readAttributeLevel(), SDGParser::readBitmap(), StarObjectSpreadsheet::readCalcDocument(), SWFieldManager::readField(), StarObjectSmallGraphic::readFmFormObject(), StarFileManager::readFont(), StarFileManager::readJobSetUp(), StarObjectNumericRuler::readLevel(), StarObjectMath::readMathDocument(), StarFormatManager::readNumberFormat(), StarFormatManager::readNumberFormatter(), StarObject::readPersistData(), SWFieldManager::readPersistField(), StarObjectDraw::readPresentationData(), StarObjectSpreadsheet::readSCChangeTrack(), StarObjectSpreadsheet::readSCColumn(), StarObjectSpreadsheet::readSCData(), StarObjectSpreadsheet::readSCDBData(), StarObjectSpreadsheet::readSCDBPivot(), StarObjectChart::readSCHAttributes(), StarObjectChart::readSCHMemChart(), StarObjectSpreadsheet::readSCMatrix(), StarObjectSpreadsheet::readSCQueryParam(), StarObjectSpreadsheet::readSCTable(), StarCellFormula::readSCToken(), StarCellFormula::readSCToken3(), StarObjectDraw::readSdrCustomShow(), StarObjectModel::readSdrLayer(), StarObjectModel::readSdrLayerSet(), StarObjectSmallGraphic::readSDROutlinerParaObject(), StarObjectModel::readSdrPage(), StarObjectModel::readSdrPageUnknownZone1(), StarObjectSmallGraphic::readSDUDObject(), StarObject::readSfxDocumentInformation(), StarZone::readStringsPool(), StarItemPool::readStyles(), StarObjectSmallGraphic::readSVDRObject(), StarObjectSmallGraphic::readSVDRObjectAttrib(), StarObjectSmallGraphic::readSVDRObjectGraph(), StarObjectSmallGraphic::readSVDRObjectGroup(), StarObjectSmallGraphic::readSVDRObjectOLE(), StarFileManager::readSVGDI(), StarFormatManager::readSWFormatDef(), StarObjectText::readSWGraphNode(), StarObjectText::readSWImageMap(), StarObjectText::readSWOLENode(), StarFormatManager::readSWPatternLCL(), StarObjectText::readSWSection(), StarObjectText::readSWTextZone(), StarItemPool::readV1(), StarItemPool::readV2(), and StarObjectText::readWriterDocument().

## ◆ numberingTypeToString()

std::string libstoff::numberingTypeToString | ( | NumberingType | type | ) |

## ◆ numberingValueToString()

std::string libstoff::numberingValueToString | ( | NumberingType | type,
|  | int | value )

## ◆ readU8()

uint8_t libstoff::readU8 | ( | librevenge::RVNGInputStream * | input | ) |

## ◆ rotateBoxFromCenter()

STOFFBox2f libstoff::rotateBoxFromCenter | ( | STOFFBox2f const & | box,
|  | float | angle )

rotate a bdox and returns the final bdbox, angle is given in degree

## ◆ rotatePointAroundCenter()

STOFFVec2f libstoff::rotatePointAroundCenter | ( | STOFFVec2f const & | point,
|  | STOFFVec2f const & | center,
|  | float | angle )

rotate a point around center, angle is given in degree

Referenced by rotateBoxFromCenter().

## ◆ simplifyString()

librevenge::RVNGString libstoff::simplifyString | ( | librevenge::RVNGString const & | s | ) |

returns a simplify version of a string.

Note
  this function is mainly used to try to test for searching a string when some encoding problem has happens

Referenced by StarItemPool::findStyleWithFamily(), StarObjectNumericRuler::getList(), StarObjectNumericRuler::read(), StarObjectPageStyle::read(), StarObjectPageStyle::updatePageSpan(), and StarItemPool::updateStyles().

## ◆ splitString()

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

Referenced by StarWriterStruct::DatabaseName::read(), SWFieldManagerInternal::FieldHiddenText::send(), and SWFieldManagerInternal::updateDatabaseName().