#include <MSPUBCollector.h>
Classes | |
struct | PageInfo |
Public Types | |
typedef std::list < ContentChunkReference > ::const_iterator | ccr_iterator_t |
Public Member Functions | |
MSPUBCollector (::libwpg::WPGPaintInterface *painter) | |
virtual | ~MSPUBCollector () |
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, WPXBinaryData img) |
void | setBorderImageOffset (unsigned index, unsigned offset) |
WPXBinaryData * | 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) |
WPXBinaryData & | addEOTFont (const WPXString &name) |
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 | setNextTableCellTextEnds (const std::vector< unsigned > &ends) |
void | setTextStringOffset (unsigned textId, unsigned offset) |
bool | go () |
bool | hasPage (unsigned seqNum) const |
Static Public Member Functions | |
static WPXString | 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, WPXPropertyList *) 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 WPXBinaryData &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 |
WPXPropertyList | getCharStyleProps (const CharacterStyle &, boost::optional< unsigned > defaultCharStyleIndex) const |
WPXPropertyList | 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 | |
libwpg::WPGPaintInterface * | 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, WPXBinaryData > > | 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::vector< std::vector < unsigned > > | m_tableCellTextEndsVector |
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 |
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 | ( | ::libwpg::WPGPaintInterface * | painter | ) |
libmspub::MSPUBCollector::~MSPUBCollector | ( | ) | [virtual] |
libmspub::MSPUBCollector::MSPUBCollector | ( | const MSPUBCollector & | ) | [private] |
void libmspub::MSPUBCollector::addBlackToPaletteIfNecessary | ( | ) | [private] |
WPXBinaryData * libmspub::MSPUBCollector::addBorderImage | ( | ImgType | type, |
unsigned | borderArtIndex | ||
) |
void libmspub::MSPUBCollector::addDefaultCharacterStyle | ( | const CharacterStyle & | style | ) |
void libmspub::MSPUBCollector::addDefaultParagraphStyle | ( | const ParagraphStyle & | style | ) |
WPXBinaryData & libmspub::MSPUBCollector::addEOTFont | ( | const WPXString & | name | ) |
void libmspub::MSPUBCollector::addFont | ( | std::vector< unsigned char > | name | ) |
bool libmspub::MSPUBCollector::addImage | ( | unsigned | index, |
ImgType | type, | ||
WPXBinaryData | img | ||
) |
bool libmspub::MSPUBCollector::addPage | ( | unsigned | seqNum | ) |
void libmspub::MSPUBCollector::addShapeLine | ( | unsigned | seqNum, |
Line | line | ||
) |
void libmspub::MSPUBCollector::addTextShape | ( | unsigned | stringId, |
unsigned | seqNum | ||
) |
bool libmspub::MSPUBCollector::addTextString | ( | const std::vector< TextParagraph > & | str, |
unsigned | id | ||
) |
void libmspub::MSPUBCollector::assignShapesToPages | ( | ) | [private] |
void libmspub::MSPUBCollector::beginGroup | ( | ) |
void libmspub::MSPUBCollector::designateMasterPage | ( | unsigned | seqNum | ) |
bool libmspub::MSPUBCollector::endGroup | ( | ) |
const char * libmspub::MSPUBCollector::getCalculatedEncoding | ( | ) | const [private] |
double libmspub::MSPUBCollector::getCalculationValue | ( | const ShapeInfo & | info, |
unsigned | index, | ||
bool | recursiveEntry, | ||
const std::vector< int > & | adjustValues | ||
) | const [private] |
Referenced by paintShape().
WPXPropertyList libmspub::MSPUBCollector::getCharStyleProps | ( | const CharacterStyle & | style, |
boost::optional< unsigned > | defaultCharStyleIndex | ||
) | const [private] |
WPXString libmspub::MSPUBCollector::getColorString | ( | const Color & | color | ) | [static] |
boost::optional< unsigned > libmspub::MSPUBCollector::getMasterPageSeqNum | ( | unsigned | pageSeqNum | ) | const [private] |
WPXPropertyList libmspub::MSPUBCollector::getParaStyleProps | ( | const ParagraphStyle & | style, |
boost::optional< unsigned > | defaultParaStyleIndex | ||
) | const [private] |
std::vector< int > libmspub::MSPUBCollector::getShapeAdjustValues | ( | const ShapeInfo & | info | ) | const [private] |
boost::optional< std::vector< libmspub::TextParagraph > > libmspub::MSPUBCollector::getShapeText | ( | const ShapeInfo & | info | ) | const [private] |
double libmspub::MSPUBCollector::getSpecialValue | ( | const ShapeInfo & | info, |
const CustomShape & | shape, | ||
int | arg, | ||
const std::vector< int > & | adjustValues | ||
) | const [private] |
bool libmspub::MSPUBCollector::go | ( | ) |
bool libmspub::MSPUBCollector::hasPage | ( | unsigned | seqNum | ) | const |
MSPUBCollector& libmspub::MSPUBCollector::operator= | ( | const MSPUBCollector & | ) | [private] |
bool libmspub::MSPUBCollector::pageIsMaster | ( | unsigned | pageSeqNum | ) | const [private] |
boost::function< void(void)> libmspub::MSPUBCollector::paintShape | ( | const ShapeInfo & | info, |
const Coordinate & | relativeTo, | ||
const VectorTransformation2D & | foldedTransform, | ||
bool | isGroup, | ||
const VectorTransformation2D & | thisTransform | ||
) | const [private] |
Referenced by writePageShapes().
void libmspub::MSPUBCollector::ponderStringEncoding | ( | const std::vector< TextParagraph > & | str | ) | [private] |
void libmspub::MSPUBCollector::setAdjustValue | ( | unsigned | seqNum, |
unsigned | index, | ||
int | adjust | ||
) |
void libmspub::MSPUBCollector::setBorderImageOffset | ( | unsigned | index, |
unsigned | offset | ||
) |
bool libmspub::MSPUBCollector::setCurrentGroupSeqNum | ( | unsigned | seqNum | ) |
void libmspub::MSPUBCollector::setHeightInEmu | ( | unsigned long | heightInEmu | ) |
void libmspub::MSPUBCollector::setMasterPage | ( | unsigned | pageSeqNum, |
unsigned | masterSeqNum | ||
) |
void libmspub::MSPUBCollector::setNextPage | ( | unsigned | seqNum | ) |
void libmspub::MSPUBCollector::setNextTableCellTextEnds | ( | const std::vector< unsigned > & | ends | ) |
void libmspub::MSPUBCollector::setPageBgShape | ( | unsigned | pageSeqNum, |
unsigned | seqNum | ||
) |
void libmspub::MSPUBCollector::setRectCoordProps | ( | Coordinate | coord, |
WPXPropertyList * | props | ||
) | const [private] |
void libmspub::MSPUBCollector::setShapeBeginArrow | ( | unsigned | seqNum, |
const Arrow & | arrow | ||
) |
void libmspub::MSPUBCollector::setShapeBorderImageId | ( | unsigned | seqNum, |
unsigned | borderImageId | ||
) |
void libmspub::MSPUBCollector::setShapeBorderPosition | ( | unsigned | seqNum, |
BorderPosition | pos | ||
) |
void libmspub::MSPUBCollector::setShapeClipPath | ( | unsigned | seqNum, |
const std::vector< libmspub::Vertex > & | clip | ||
) |
void libmspub::MSPUBCollector::setShapeColumnSpacing | ( | unsigned | seqNum, |
unsigned | spacing | ||
) |
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 | ||
) |
void libmspub::MSPUBCollector::setShapeCustomPath | ( | unsigned | seqNum, |
const DynamicCustomShape & | shape | ||
) |
void libmspub::MSPUBCollector::setShapeDash | ( | unsigned | seqNum, |
const Dash & | dash | ||
) |
void libmspub::MSPUBCollector::setShapeEndArrow | ( | unsigned | seqNum, |
const Arrow & | arrow | ||
) |
void libmspub::MSPUBCollector::setShapeFill | ( | unsigned | seqNum, |
boost::shared_ptr< Fill > | fill, | ||
bool | skipIfNotBg | ||
) |
void libmspub::MSPUBCollector::setShapeFlip | ( | unsigned | seqNum, |
bool | flipVertical, | ||
bool | flipHorizontal | ||
) |
void libmspub::MSPUBCollector::setShapeImgIndex | ( | unsigned | seqNum, |
unsigned | index | ||
) |
void libmspub::MSPUBCollector::setShapeLineBackColor | ( | unsigned | seqNum, |
ColorReference | backColor | ||
) |
void libmspub::MSPUBCollector::setShapeMargins | ( | unsigned | seqNum, |
unsigned | left, | ||
unsigned | top, | ||
unsigned | right, | ||
unsigned | bottom | ||
) |
void libmspub::MSPUBCollector::setShapeNumColumns | ( | unsigned | seqNum, |
unsigned | numColumns | ||
) |
void libmspub::MSPUBCollector::setShapeOrder | ( | unsigned | seqNum | ) |
void libmspub::MSPUBCollector::setShapePage | ( | unsigned | seqNum, |
unsigned | pageSeqNum | ||
) |
void libmspub::MSPUBCollector::setShapePictureBrightness | ( | unsigned | seqNum, |
int | brightness | ||
) |
void libmspub::MSPUBCollector::setShapePictureContrast | ( | unsigned | seqNum, |
int | contrast | ||
) |
void libmspub::MSPUBCollector::setShapePictureRecolor | ( | unsigned | seqNum, |
const ColorReference & | recolor | ||
) |
void libmspub::MSPUBCollector::setShapeRotation | ( | unsigned | seqNum, |
double | rotation | ||
) |
void libmspub::MSPUBCollector::setShapeShadow | ( | unsigned | seqNum, |
const Shadow & | shadow | ||
) |
void libmspub::MSPUBCollector::setShapeStretchBorderArt | ( | unsigned | seqNum | ) |
void libmspub::MSPUBCollector::setShapeTableInfo | ( | unsigned | seqNum, |
const TableInfo & | ti | ||
) |
void libmspub::MSPUBCollector::setShapeType | ( | unsigned | seqNum, |
ShapeType | type | ||
) |
void libmspub::MSPUBCollector::setShapeVerticalTextAlign | ( | unsigned | seqNum, |
VerticalAlign | va | ||
) |
void libmspub::MSPUBCollector::setTextStringOffset | ( | unsigned | textId, |
unsigned | offset | ||
) |
void libmspub::MSPUBCollector::setupShapeStructures | ( | ShapeGroupElement & | elt | ) | [private] |
Referenced by assignShapesToPages().
void libmspub::MSPUBCollector::setWidthInEmu | ( | unsigned long | widthInEmu | ) |
Referenced by libmspub::MSPUBParser97::MSPUBParser97().
void libmspub::MSPUBCollector::writeImage | ( | double | x, |
double | y, | ||
double | height, | ||
double | width, | ||
ImgType | type, | ||
const WPXBinaryData & | blob, | ||
boost::optional< Color > | oneBitColor | ||
) | const [private] |
void libmspub::MSPUBCollector::writePage | ( | unsigned | pageSeqNum | ) | const [private] |
void libmspub::MSPUBCollector::writePageBackground | ( | unsigned | pageSeqNum | ) | const [private] |
void libmspub::MSPUBCollector::writePageShapes | ( | unsigned | pageSeqNum | ) | const [private] |
friend class Fill [friend] |
friend class GradientFill [friend] |
friend class ImgFill [friend] |
friend class PatternFill [friend] |
friend class SolidFill [friend] |
std::vector<unsigned char> libmspub::MSPUBCollector::m_allText [private] |
std::map<unsigned, unsigned> libmspub::MSPUBCollector::m_bgShapeSeqNumsByPageSeqNum [private] |
std::vector<BorderArtInfo> libmspub::MSPUBCollector::m_borderImages [private] |
boost::optional<const char *> libmspub::MSPUBCollector::m_calculatedEncoding [mutable, private] |
std::vector<bool> libmspub::MSPUBCollector::m_calculationValuesSeen [mutable, private] |
std::list<ContentChunkReference> libmspub::MSPUBCollector::m_contentChunkReferences [private] |
std::vector<CharacterStyle> libmspub::MSPUBCollector::m_defaultCharStyles [private] |
std::vector<ParagraphStyle> libmspub::MSPUBCollector::m_defaultParaStyles [private] |
std::list<EmbeddedFontInfo> libmspub::MSPUBCollector::m_embeddedFonts [private] |
Referenced by addEOTFont().
bool libmspub::MSPUBCollector::m_encodingHeuristic [private] |
std::vector<std::vector<unsigned char> > libmspub::MSPUBCollector::m_fonts [private] |
std::map<unsigned, ShapeGroupElement *> libmspub::MSPUBCollector::m_groupsBySeqNum [private] |
double libmspub::MSPUBCollector::m_height [private] |
bool libmspub::MSPUBCollector::m_heightSet [private] |
std::vector<std::pair<ImgType, WPXBinaryData> > libmspub::MSPUBCollector::m_images [private] |
Referenced by libmspub::ImgFill::getProperties(), and libmspub::PatternFill::getProperties().
std::set<unsigned> libmspub::MSPUBCollector::m_masterPages [private] |
std::map<unsigned, unsigned> libmspub::MSPUBCollector::m_masterPagesByPageSeqNum [private] |
unsigned short libmspub::MSPUBCollector::m_numPages [private] |
std::map<unsigned, PageInfo> libmspub::MSPUBCollector::m_pagesBySeqNum [private] |
std::map<unsigned, unsigned> libmspub::MSPUBCollector::m_pageSeqNumsByShapeSeqNum [private] |
std::vector<unsigned> libmspub::MSPUBCollector::m_pageSeqNumsOrdered [private] |
libwpg::WPGPaintInterface* libmspub::MSPUBCollector::m_painter [private] |
std::vector<Color> libmspub::MSPUBCollector::m_paletteColors [private] |
std::map<unsigned, ShapeInfo> libmspub::MSPUBCollector::m_shapeInfosBySeqNum [private] |
std::vector<unsigned> libmspub::MSPUBCollector::m_shapeSeqNumsOrdered [private] |
std::set<unsigned> libmspub::MSPUBCollector::m_shapesWithCoordinatesRotated90 [private] |
std::map<unsigned, ShapeType> libmspub::MSPUBCollector::m_shapeTypesBySeqNum [private] |
std::set<unsigned> libmspub::MSPUBCollector::m_skipIfNotBgSeqNums [private] |
std::map<unsigned, unsigned> libmspub::MSPUBCollector::m_stringOffsetsByTextId [private] |
Referenced by setTextStringOffset().
std::vector<std::vector<unsigned> > libmspub::MSPUBCollector::m_tableCellTextEndsVector [private] |
std::vector<ColorReference> libmspub::MSPUBCollector::m_textColors [private] |
std::map<unsigned, std::vector<TextParagraph> > libmspub::MSPUBCollector::m_textStringsById [private] |
boost::ptr_vector<ShapeGroupElement> libmspub::MSPUBCollector::m_topLevelShapes [private] |
double libmspub::MSPUBCollector::m_width [private] |
bool libmspub::MSPUBCollector::m_widthSet [private] |