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
| 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 More...
void | appendUnicode (uint32_t val, librevenge::RVNGString &buffer)
| adds an unicode character to a string More...
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 More...
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 More...
librevenge::RVNGString | simplifyString (librevenge::RVNGString const &s)
| returns a simplify version of a string. More...
STOFFVec2f | rotatePointAroundCenter (STOFFVec2f const &point, STOFFVec2f const &center, float angle)
| rotate a point around center, angle is given in degree More...
STOFFBox2f | rotateBoxFromCenter (STOFFBox2f const &box, float angle)
| rotate a bdox and returns the final bdbox, angle is given in degree More...
float | getScaleFactor (librevenge::RVNGUnit orig, librevenge::RVNGUnit dest)
| factor to convert from one unit to other More...
template<typename T >
bool | checkAddOverflow (T x, T y)
| checks whether addition of `x` and `y` would overflow More...
template<class T >
double | convertMiniMToPoint (T const &value)
| convert 1/100th millimeter to point More...
template<class T >
STOFFVec2f | convertMiniMToPointVect (T const &value)
| convert 1/100th millimeter vector to point More...

## 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(), STOFFTextListener::insertUnicode(), STOFFSpreadsheetListener::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< bool >::add(), and STOFFVec2< bool >::operator-=().

## ◆ convertMiniMToPoint()

template<class T >

double libstoff::convertMiniMToPoint | ( | T const & | value | ) |

convert 1/100th millimeter to point

Referenced by StarGraphicAttribute::StarGAttributeInt::addTo(), StarGraphicAttribute::StarGAttributeUInt::addTo(), StarFrameAttribute::StarFAttributeBorder::addTo(), StarFrameAttribute::StarFAttributeShadow::addTo(), StarGraphicAttribute::StarGAttributeCrop::addTo(), StarGraphicAttribute::StarGAttributeNamedDash::addTo(), StarGraphicAttribute::StarGAttributeNamedHatch::addTo(), StarGraphicStruct::StarPolygon::addToPath(), StarObjectSmallGraphicInternal::SdrGraphicCircle::send(), StarObjectSmallGraphicInternal::SdrGraphicMeasure::send(), StarObjectSmallGraphicInternal::SdrGraphicPath::send(), StarObjectModelInternal::Page::updatePageSpan(), and StarObjectSmallGraphicInternal::SdrGraphicText::updateTransformProperties().

## ◆ convertMiniMToPointVect()

template<class T >

STOFFVec2f libstoff::convertMiniMToPointVect | ( | T const & | value | ) |

convert 1/100th millimeter vector to point

Referenced by StarObjectSmallGraphicInternal::SdrGraphicRect::send(), StarObjectSmallGraphicInternal::SdrGraphicGraph::send(), StarObjectSmallGraphicInternal::SdrGraphicOLE::send(), and StarObjectSmallGraphicInternal::SdrGraphicText::sendTextZone().

## ◆ 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().

## ◆ 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 operator<<(), StarObjectSmallText::read(), StarObjectModel::read(), StarGraphicStruct::StarBrush::read(), StarWriterStruct::Bookmark::read(), StarWriterStruct::DatabaseName::read(), StarWriterStruct::Dictionary::read(), StarWriterStruct::Macro::read(), StarWriterStruct::NoteInfo::read(), StarWriterStruct::Redline::read(), StarCellAttribute::StarCAttributePattern::read(), StarWriterStruct::TOX::read(), StarCharAttribute::StarCAttributeFont::read(), StarWriterStruct::TOX51::read(), StarParagraphAttribute::StarPAttributeNumericRuler::read(), StarPageAttribute::StarPAttributePage::read(), StarGraphicAttribute::StarGAttributeNamed::read(), StarCharAttribute::StarCAttributeFootnote::read(), StarCharAttribute::StarCAttributeINetFmt::read(), StarCharAttribute::StarCAttributeRefMark::read(), StarAttributeManager::readAttribute(), StarObjectNumericRuler::readAttributeLevel(), SDGParser::readBitmap(), StarObjectSpreadsheet::readCalcDocument(), SWFieldManager::readField(), StarObjectSmallGraphic::readFmFormObject(), StarFileManager::readFont(), StarFileManager::readJobSetUp(), StarObjectNumericRuler::readLevel(), StarFileManager::readMathDocument(), StarFormatManager::readNumberFormat(), StarFormatManager::readNumberFormatter(), StarObject::readPersistData(), 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::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(), StarObjectPageStyle::read(), StarObjectNumericRuler::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().