#include <MSPUBCollector.h>
Classes | |
struct | PageInfo |
Public Types | |
typedef std::list< ContentChunkReference >::const_iterator | ccr_iterator_t |
Public Member Functions | |
MSPUBCollector (::librevenge::RVNGDrawingInterface *painter) | |
virtual | ~MSPUBCollector () |
void | collectMetaData (const librevenge::RVNGPropertyList &metaData) |
bool | addPage (unsigned seqNum) |
bool | addTextString (const std::vector< TextParagraph > &str, unsigned id) |
void | addTextShape (unsigned stringId, unsigned seqNum) |
bool | addImage (unsigned index, ImgType type, librevenge::RVNGBinaryData img) |
void | setBorderImageOffset (unsigned index, unsigned offset) |
librevenge::RVNGBinaryData * | addBorderImage (ImgType type, unsigned borderArtIndex) |
void | setShapePage (unsigned seqNum, unsigned pageSeqNum) |
void | setNextPage (unsigned seqNum) |
void | setShapeType (unsigned seqNum, ShapeType type) |
void | setShapeCropType (unsigned seqNum, ShapeType cropType) |
void | setShapePictureRecolor (unsigned seqNum, const ColorReference &recolor) |
void | setShapePictureBrightness (unsigned seqNum, int brightness) |
void | setShapePictureContrast (unsigned seqNum, int contrast) |
void | setShapeTableInfo (unsigned seqNum, const TableInfo &ti) |
void | setShapeBorderImageId (unsigned seqNum, unsigned borderImageId) |
void | setShapeCoordinatesInEmu (unsigned seqNum, int xs, int ys, int xe, int ye) |
void | setShapeImgIndex (unsigned seqNum, unsigned index) |
void | setShapeFill (unsigned seqNum, boost::shared_ptr< Fill > fill, bool skipIfNotBg) |
void | setShapeDash (unsigned seqNum, const Dash &dash) |
void | setAdjustValue (unsigned seqNum, unsigned index, int adjust) |
void | setShapeRotation (unsigned seqNum, double rotation) |
void | setShapeFlip (unsigned, bool, bool) |
void | setShapeMargins (unsigned seqNum, unsigned left, unsigned top, unsigned right, unsigned bottom) |
void | setShapeBorderPosition (unsigned seqNum, BorderPosition pos) |
void | setShapeCoordinatesRotated90 (unsigned seqNum) |
void | setShapeCustomPath (unsigned seqNum, const DynamicCustomShape &shape) |
void | setShapeClipPath (unsigned seqNum, const std::vector< libmspub::Vertex > &clip) |
void | setShapeVerticalTextAlign (unsigned seqNum, VerticalAlign va) |
void | designateMasterPage (unsigned seqNum) |
void | setMasterPage (unsigned pageSeqNum, unsigned masterSeqNum) |
void | setShapeStretchBorderArt (unsigned seqNum) |
void | setShapeShadow (unsigned seqNum, const Shadow &shadow) |
void | addEOTFont (const librevenge::RVNGString &name, const librevenge::RVNGBinaryData &data) |
void | beginGroup () |
bool | endGroup () |
void | setShapeLineBackColor (unsigned seqNum, ColorReference backColor) |
void | addShapeLine (unsigned seqNum, Line line) |
void | setShapeOrder (unsigned seqNum) |
void | setPageBgShape (unsigned pageSeqNum, unsigned seqNum) |
void | setWidthInEmu (unsigned long) |
void | setHeightInEmu (unsigned long) |
void | setShapeNumColumns (unsigned seqNum, unsigned numColumns) |
void | setShapeColumnSpacing (unsigned seqNum, unsigned spacing) |
void | setShapeBeginArrow (unsigned seqNum, const Arrow &arrow) |
void | setShapeEndArrow (unsigned seqNum, const Arrow &arrow) |
void | addTextColor (ColorReference c) |
void | addFont (std::vector< unsigned char > name) |
void | addDefaultCharacterStyle (const CharacterStyle &style) |
void | addDefaultParagraphStyle (const ParagraphStyle &style) |
void | addPaletteColor (Color) |
bool | setCurrentGroupSeqNum (unsigned seqNum) |
void | useEncodingHeuristic () |
void | setTableCellTextEnds (unsigned textId, const std::vector< unsigned > &ends) |
void | setTextStringOffset (unsigned textId, unsigned offset) |
bool | go () |
bool | hasPage (unsigned seqNum) const |
Static Public Member Functions | |
static librevenge::RVNGString | getColorString (const Color &) |
Private Member Functions | |
MSPUBCollector (const MSPUBCollector &) | |
MSPUBCollector & | operator= (const MSPUBCollector &) |
std::vector< int > | getShapeAdjustValues (const ShapeInfo &info) const |
boost::optional< unsigned > | getMasterPageSeqNum (unsigned pageSeqNum) const |
void | setRectCoordProps (Coordinate, librevenge::RVNGPropertyList *) const |
boost::optional< std::vector< libmspub::TextParagraph > > | getShapeText (const ShapeInfo &info) const |
void | setupShapeStructures (ShapeGroupElement &elt) |
void | addBlackToPaletteIfNecessary () |
void | assignShapesToPages () |
void | writePage (unsigned pageSeqNum) const |
void | writePageShapes (unsigned pageSeqNum) const |
void | writePageBackground (unsigned pageSeqNum) const |
void | writeImage (double x, double y, double height, double width, ImgType type, const librevenge::RVNGBinaryData &blob, boost::optional< Color > oneBitColor) const |
bool | pageIsMaster (unsigned pageSeqNum) const |
boost::function< void(void)> | paintShape (const ShapeInfo &info, const Coordinate &relativeTo, const VectorTransformation2D &foldedTransform, bool isGroup, const VectorTransformation2D &thisTransform) const |
double | getCalculationValue (const ShapeInfo &info, unsigned index, bool recursiveEntry, const std::vector< int > &adjustValues) const |
librevenge::RVNGPropertyList | getCharStyleProps (const CharacterStyle &, boost::optional< unsigned > defaultCharStyleIndex) const |
librevenge::RVNGPropertyList | getParaStyleProps (const ParagraphStyle &, boost::optional< unsigned > defaultParaStyleIndex) const |
double | getSpecialValue (const ShapeInfo &info, const CustomShape &shape, int arg, const std::vector< int > &adjustValues) const |
void | ponderStringEncoding (const std::vector< TextParagraph > &str) |
const char * | getCalculatedEncoding () const |
Private Attributes | |
librevenge::RVNGDrawingInterface * | m_painter |
std::list< ContentChunkReference > | m_contentChunkReferences |
double | m_width |
double | m_height |
bool | m_widthSet |
bool | m_heightSet |
unsigned short | m_numPages |
std::map< unsigned, std::vector< TextParagraph > > | m_textStringsById |
std::map< unsigned, PageInfo > | m_pagesBySeqNum |
std::vector< std::pair< ImgType, librevenge::RVNGBinaryData > > | m_images |
std::vector< BorderArtInfo > | m_borderImages |
std::vector< ColorReference > | m_textColors |
std::vector< std::vector< unsigned char > > | m_fonts |
std::vector< CharacterStyle > | m_defaultCharStyles |
std::vector< ParagraphStyle > | m_defaultParaStyles |
std::map< unsigned, ShapeType > | m_shapeTypesBySeqNum |
std::vector< Color > | m_paletteColors |
std::vector< unsigned > | m_shapeSeqNumsOrdered |
std::map< unsigned, unsigned > | m_pageSeqNumsByShapeSeqNum |
std::map< unsigned, unsigned > | m_bgShapeSeqNumsByPageSeqNum |
std::set< unsigned > | m_skipIfNotBgSeqNums |
ShapeGroupElement * | m_currentShapeGroup |
boost::ptr_vector< ShapeGroupElement > | m_topLevelShapes |
std::map< unsigned, ShapeGroupElement * > | m_groupsBySeqNum |
std::list< EmbeddedFontInfo > | m_embeddedFonts |
std::map< unsigned, ShapeInfo > | m_shapeInfosBySeqNum |
std::set< unsigned > | m_masterPages |
std::set< unsigned > | m_shapesWithCoordinatesRotated90 |
std::map< unsigned, unsigned > | m_masterPagesByPageSeqNum |
std::map< unsigned, std::vector< unsigned > > | m_tableCellTextEndsByTextId |
std::map< unsigned, unsigned > | m_stringOffsetsByTextId |
std::vector< bool > | m_calculationValuesSeen |
std::vector< unsigned > | m_pageSeqNumsOrdered |
bool | m_encodingHeuristic |
std::vector< unsigned char > | m_allText |
boost::optional< const char * > | m_calculatedEncoding |
librevenge::RVNGPropertyList | m_metaData |
Friends | |
class | Fill |
class | ImgFill |
class | SolidFill |
class | GradientFill |
class | PatternFill |
typedef std::list<ContentChunkReference>::const_iterator libmspub::MSPUBCollector::ccr_iterator_t |
libmspub::MSPUBCollector::MSPUBCollector | ( | ::librevenge::RVNGDrawingInterface * | painter | ) |
|
virtual |
|
private |
|
private |
librevenge::RVNGBinaryData * libmspub::MSPUBCollector::addBorderImage | ( | ImgType | type, |
unsigned | borderArtIndex | ||
) |
Referenced by libmspub::MSPUBParser::parseBorderArtChunk().
void libmspub::MSPUBCollector::addDefaultCharacterStyle | ( | const CharacterStyle & | style | ) |
Referenced by libmspub::MSPUBParser::parseDefaultStyle().
void libmspub::MSPUBCollector::addDefaultParagraphStyle | ( | const ParagraphStyle & | style | ) |
Referenced by libmspub::MSPUBParser::parseDefaultStyle().
void libmspub::MSPUBCollector::addEOTFont | ( | const librevenge::RVNGString & | name, |
const librevenge::RVNGBinaryData & | data | ||
) |
Referenced by libmspub::MSPUBParser::parseFontChunk().
void libmspub::MSPUBCollector::addFont | ( | std::vector< unsigned char > | name | ) |
Referenced by libmspub::MSPUBParser::parseFonts().
bool libmspub::MSPUBCollector::addImage | ( | unsigned | index, |
ImgType | type, | ||
librevenge::RVNGBinaryData | img | ||
) |
Referenced by libmspub::MSPUBParser2k::parseContents(), and libmspub::MSPUBParser::parseEscherDelay().
bool libmspub::MSPUBCollector::addPage | ( | unsigned | seqNum | ) |
Referenced by libmspub::MSPUBParser2k::parse2kShapeChunk(), and libmspub::MSPUBParser::parsePageChunk().
void libmspub::MSPUBCollector::addPaletteColor | ( | Color | c | ) |
void libmspub::MSPUBCollector::addShapeLine | ( | unsigned | seqNum, |
Line | line | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape(), and libmspub::MSPUBParser2k::parseShapeLine().
void libmspub::MSPUBCollector::addTextColor | ( | ColorReference | c | ) |
void libmspub::MSPUBCollector::addTextShape | ( | unsigned | stringId, |
unsigned | seqNum | ||
) |
Referenced by libmspub::MSPUBParser::parseShape(), and libmspub::MSPUBParser2k::parseShapeType().
bool libmspub::MSPUBCollector::addTextString | ( | const std::vector< TextParagraph > & | str, |
unsigned | id | ||
) |
|
private |
void libmspub::MSPUBCollector::beginGroup | ( | ) |
Referenced by libmspub::MSPUBParser2k::parseGroup(), and libmspub::MSPUBParser::parseShapeGroup().
void libmspub::MSPUBCollector::collectMetaData | ( | const librevenge::RVNGPropertyList & | metaData | ) |
Referenced by libmspub::MSPUBParser::parseMetaData().
void libmspub::MSPUBCollector::designateMasterPage | ( | unsigned | seqNum | ) |
Referenced by libmspub::MSPUBParser::parsePageChunk().
bool libmspub::MSPUBCollector::endGroup | ( | ) |
Referenced by libmspub::MSPUBParser2k::parseGroup(), and libmspub::MSPUBParser::parseShapeGroup().
|
private |
|
private |
|
private |
|
static |
|
private |
|
private |
|
private |
|
private |
|
private |
bool libmspub::MSPUBCollector::go | ( | ) |
bool libmspub::MSPUBCollector::hasPage | ( | unsigned | seqNum | ) | const |
Referenced by libmspub::MSPUBParser2k::parse2kShapeChunk().
|
private |
|
private |
|
private |
|
private |
void libmspub::MSPUBCollector::setAdjustValue | ( | unsigned | seqNum, |
unsigned | index, | ||
int | adjust | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape().
void libmspub::MSPUBCollector::setBorderImageOffset | ( | unsigned | index, |
unsigned | offset | ||
) |
Referenced by libmspub::MSPUBParser::parseBorderArtChunk().
bool libmspub::MSPUBCollector::setCurrentGroupSeqNum | ( | unsigned | seqNum | ) |
Referenced by libmspub::MSPUBParser::parseEscherShape(), and libmspub::MSPUBParser2k::parseGroup().
void libmspub::MSPUBCollector::setHeightInEmu | ( | unsigned long | heightInEmu | ) |
Referenced by libmspub::MSPUBParser97::parseDocument(), and libmspub::MSPUBParser2k::parseDocument().
void libmspub::MSPUBCollector::setMasterPage | ( | unsigned | pageSeqNum, |
unsigned | masterSeqNum | ||
) |
Referenced by libmspub::MSPUBParser::parsePageChunk().
void libmspub::MSPUBCollector::setNextPage | ( | unsigned | seqNum | ) |
void libmspub::MSPUBCollector::setPageBgShape | ( | unsigned | pageSeqNum, |
unsigned | seqNum | ||
) |
Referenced by libmspub::MSPUBParser::parsePageChunk().
|
private |
void libmspub::MSPUBCollector::setShapeBeginArrow | ( | unsigned | seqNum, |
const Arrow & | arrow | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape().
void libmspub::MSPUBCollector::setShapeBorderImageId | ( | unsigned | seqNum, |
unsigned | borderImageId | ||
) |
Referenced by libmspub::MSPUBParser::parseShape().
void libmspub::MSPUBCollector::setShapeBorderPosition | ( | unsigned | seqNum, |
BorderPosition | pos | ||
) |
void libmspub::MSPUBCollector::setShapeClipPath | ( | unsigned | seqNum, |
const std::vector< libmspub::Vertex > & | clip | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape().
void libmspub::MSPUBCollector::setShapeColumnSpacing | ( | unsigned | seqNum, |
unsigned | spacing | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape().
void libmspub::MSPUBCollector::setShapeCoordinatesInEmu | ( | unsigned | seqNum, |
int | xs, | ||
int | ys, | ||
int | xe, | ||
int | ye | ||
) |
void libmspub::MSPUBCollector::setShapeCoordinatesRotated90 | ( | unsigned | seqNum | ) |
void libmspub::MSPUBCollector::setShapeCropType | ( | unsigned | seqNum, |
ShapeType | cropType | ||
) |
Referenced by libmspub::MSPUBParser::parseShape().
void libmspub::MSPUBCollector::setShapeCustomPath | ( | unsigned | seqNum, |
const DynamicCustomShape & | shape | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape().
void libmspub::MSPUBCollector::setShapeDash | ( | unsigned | seqNum, |
const Dash & | dash | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape().
void libmspub::MSPUBCollector::setShapeEndArrow | ( | unsigned | seqNum, |
const Arrow & | arrow | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape().
void libmspub::MSPUBCollector::setShapeFill | ( | unsigned | seqNum, |
boost::shared_ptr< Fill > | fill, | ||
bool | skipIfNotBg | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape(), and libmspub::MSPUBParser2k::parseShapeFill().
void libmspub::MSPUBCollector::setShapeFlip | ( | unsigned | seqNum, |
bool | flipVertical, | ||
bool | flipHorizontal | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape(), and libmspub::MSPUBParser2k::parseShapeFlips().
void libmspub::MSPUBCollector::setShapeImgIndex | ( | unsigned | seqNum, |
unsigned | index | ||
) |
void libmspub::MSPUBCollector::setShapeLineBackColor | ( | unsigned | seqNum, |
ColorReference | backColor | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape().
void libmspub::MSPUBCollector::setShapeMargins | ( | unsigned | seqNum, |
unsigned | left, | ||
unsigned | top, | ||
unsigned | right, | ||
unsigned | bottom | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape().
void libmspub::MSPUBCollector::setShapeNumColumns | ( | unsigned | seqNum, |
unsigned | numColumns | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape().
void libmspub::MSPUBCollector::setShapeOrder | ( | unsigned | seqNum | ) |
void libmspub::MSPUBCollector::setShapePage | ( | unsigned | seqNum, |
unsigned | pageSeqNum | ||
) |
void libmspub::MSPUBCollector::setShapePictureBrightness | ( | unsigned | seqNum, |
int | brightness | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape().
void libmspub::MSPUBCollector::setShapePictureContrast | ( | unsigned | seqNum, |
int | contrast | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape().
void libmspub::MSPUBCollector::setShapePictureRecolor | ( | unsigned | seqNum, |
const ColorReference & | recolor | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape().
void libmspub::MSPUBCollector::setShapeRotation | ( | unsigned | seqNum, |
double | rotation | ||
) |
void libmspub::MSPUBCollector::setShapeShadow | ( | unsigned | seqNum, |
const Shadow & | shadow | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape().
void libmspub::MSPUBCollector::setShapeStretchBorderArt | ( | unsigned | seqNum | ) |
Referenced by libmspub::MSPUBParser::parseShape().
void libmspub::MSPUBCollector::setShapeTableInfo | ( | unsigned | seqNum, |
const TableInfo & | ti | ||
) |
Referenced by libmspub::MSPUBParser::parseShape().
void libmspub::MSPUBCollector::setShapeType | ( | unsigned | seqNum, |
ShapeType | type | ||
) |
Referenced by libmspub::MSPUBParser::parseEscherShape(), and libmspub::MSPUBParser2k::parseShapeType().
void libmspub::MSPUBCollector::setShapeVerticalTextAlign | ( | unsigned | seqNum, |
VerticalAlign | va | ||
) |
Referenced by libmspub::MSPUBParser::parseShape().
void libmspub::MSPUBCollector::setTableCellTextEnds | ( | unsigned | textId, |
const std::vector< unsigned > & | ends | ||
) |
Referenced by libmspub::MSPUBParser::parseQuill().
void libmspub::MSPUBCollector::setTextStringOffset | ( | unsigned | textId, |
unsigned | offset | ||
) |
Referenced by libmspub::MSPUBParser::parseQuill().
|
private |
void libmspub::MSPUBCollector::setWidthInEmu | ( | unsigned long | widthInEmu | ) |
Referenced by libmspub::MSPUBParser97::parseDocument(), and libmspub::MSPUBParser2k::parseDocument().
void libmspub::MSPUBCollector::useEncodingHeuristic | ( | ) |
Referenced by libmspub::MSPUBParser97::MSPUBParser97().
|
private |
|
private |
|
private |
|
private |
|
friend |
|
friend |
|
friend |
|
friend |
|
friend |
|
private |
|
private |
|
private |
|
mutableprivate |
|
mutableprivate |
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by addEOTFont().
|
private |
|
private |
|
private |
|
private |
Referenced by setRectCoordProps().
|
private |
|
private |
Referenced by libmspub::ImgFill::getProperties(), and libmspub::PatternFill::getProperties().
|
private |
|
private |
|
private |
Referenced by collectMetaData().
|
private |
|
private |
|
private |
|
private |
Referenced by setNextPage().
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Referenced by setRectCoordProps().
|
private |