CDRStylesCollector.h Source File documentation

CDRStylesCollector.h
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libcdr project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 */
9
10 #ifndef __CDRSTYLESCOLLECTOR_H__
11 #define __CDRSTYLESCOLLECTOR_H__
12
13 #include <map>
14 #include <utility>
15 #include <vector>
16
17 #include <librevenge/librevenge.h>
18
19 #include "CDRTypes.h"
20 #include "CDRCollector.h"
21
22 namespace libcdr
23 {
24
25 class CDRPath;
26 class CDRTransforms;
27
28 class CDRStylesCollector : public CDRCollector
29 {
30 public:
31 CDRStylesCollector(CDRParserState &ps);
32 ~CDRStylesCollector() override;
33
34 // collector functions
35 void collectPage(unsigned level) override;
36 void collectObject(unsigned) override {}
37 void collectGroup(unsigned) override {}
38 void collectVect(unsigned) override {}
39 void collectOtherList() override {}
40 void collectPath(const CDRPath &) override {}
41 void collectLevel(unsigned) override {}
42 void collectTransform(const CDRTransforms &, bool) override {}
43 void collectFillStyle(unsigned id, const CDRFillStyle &fillStyle) override;
44 void collectFillStyleId(unsigned) override {}
45 void collectLineStyle(unsigned id, const CDRLineStyle &lineStyle) override;
46 void collectLineStyleId(unsigned) override {}
47 void collectRotate(double,double,double) override {}
48 void collectFlags(unsigned, bool) override {}
49 void collectPageSize(double width, double height, double offsetX, double offsetY) override;
50 void collectPolygonTransform(unsigned, unsigned, double, double, double, double) override {}
51 void collectBitmap(unsigned, double, double, double, double) override {}
52 void collectBmp(unsigned imageId, unsigned colorModel, unsigned width, unsigned height, unsigned bpp, const std::vector<unsigned> &palette, const std::vector<unsigned char> &bitmap) override;
53 void collectBmp(unsigned imageId, const std::vector<unsigned char> &bitmap) override;
54 void collectBmpf(unsigned patternId, unsigned width, unsigned height, const std::vector<unsigned char> &pattern) override;
55 void collectPpdt(const std::vector<std::pair<double, double> > &, const std::vector<unsigned> &) override {}
56 void collectFillTransform(const CDRTransforms &) override {}
57 void collectFillOpacity(double) override {}
58 void collectPolygon() override {}
59 void collectSpline() override {}
60 void collectColorProfile(const std::vector<unsigned char> &profile) override;
61 void collectBBox(double, double, double, double) override {}
62 void collectSpnd(unsigned) override {}
63 void collectVectorPattern(unsigned, const librevenge::RVNGBinaryData &) override {}
64 void collectPaletteEntry(unsigned colorId, unsigned userId, const CDRColor &color) override;
65 void collectText(unsigned textId, unsigned styleId, const std::vector<unsigned char> &data,
66 const std::vector<unsigned char> &charDescriptions, const std::map<unsigned, CDRStyle> &styleOverrides) override;
67 void collectArtisticText(double, double) override {}
68 void collectParagraphText(double, double, double, double) override {}
69 void collectStld(unsigned id, const CDRStyle &style) override;
70 void collectStyleId(unsigned) override {}
71
72 private:
73 CDRStylesCollector(const CDRStylesCollector &);
74 CDRStylesCollector &operator=(const CDRStylesCollector &);
75
76 CDRParserState &m_ps;
77 CDRPage m_page;
78 };
79
80 } // namespace libcdr
81
82 #endif /* __CDRCOLLECTOR_H__ */
83 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
libcdr::CDRStylesCollector::collectBmp
void collectBmp(unsigned imageId, unsigned colorModel, unsigned width, unsigned height, unsigned bpp, const std::vector< unsigned > &palette, const std::vector< unsigned char > &bitmap) override
Definition: CDRStylesCollector.cpp:29
libcdr::CDRStylesCollector::collectObject
void collectObject(unsigned) override
Definition: CDRStylesCollector.h:36
libcdr::writeU16
void writeU16(librevenge::RVNGBinaryData &buffer, const int value)
Definition: libcdr_utils.cpp:311
libcdr::CDRStylesCollector::~CDRStylesCollector
~CDRStylesCollector() override
Definition: CDRStylesCollector.cpp:25
libcdr::CDRStylesCollector::collectVect
void collectVect(unsigned) override
Definition: CDRStylesCollector.h:38
libcdr::CDRTextLine::append
void append(const CDRText &text)
Definition: CDRTypes.h:356
libcdr::CDRStylesCollector::collectPolygonTransform
void collectPolygonTransform(unsigned, unsigned, double, double, double, double) override
Definition: CDRStylesCollector.h:50
libcdr::CDRStylesCollector::collectSpnd
void collectSpnd(unsigned) override
Definition: CDRStylesCollector.h:62
libcdr::CDRText
Definition: CDRTypes.h:343
libcdr::CDRStylesCollector::collectPage
void collectPage(unsigned level) override
Definition: CDRStylesCollector.cpp:190
libcdr::CDRStylesCollector::collectArtisticText
void collectArtisticText(double, double) override
Definition: CDRStylesCollector.h:67
libcdr::CDRStylesCollector::collectPaletteEntry
void collectPaletteEntry(unsigned colorId, unsigned userId, const CDRColor &color) override
Definition: CDRStylesCollector.cpp:206
libcdr::CDRStylesCollector::collectVectorPattern
void collectVectorPattern(unsigned, const librevenge::RVNGBinaryData &) override
Definition: CDRStylesCollector.h:63
CDR_DEBUG_MSG
#define CDR_DEBUG_MSG(M)
Definition: libcdr_utils.h:56
libcdr::CDRStylesCollector::m_page
CDRPage m_page
Definition: CDRStylesCollector.h:77
libcdr::CDRStylesCollector::collectTransform
void collectTransform(const CDRTransforms &, bool) override
Definition: CDRStylesCollector.h:42
libcdr::CDRStylesCollector::collectFillStyle
void collectFillStyle(unsigned id, const CDRFillStyle &fillStyle) override
Definition: CDRStylesCollector.cpp:270
libcdr::CDRCollector
Definition: CDRCollector.h:61
libcdr::CDRInternalStream
Definition: CDRInternalStream.h:20
libcdr::CDRPage
Definition: CDRTypes.h:239
libcdr::CDRStylesCollector::collectStyleId
void collectStyleId(unsigned) override
Definition: CDRStylesCollector.h:70
libcdr::CDRStylesCollector::collectText
void collectText(unsigned textId, unsigned styleId, const std::vector< unsigned char > &data, const std::vector< unsigned char > &charDescriptions, const std::map< unsigned, CDRStyle > &styleOverrides) override
Definition: CDRStylesCollector.cpp:211
libcdr::CDRStylesCollector::collectColorProfile
void collectColorProfile(const std::vector< unsigned char > &profile) override
Definition: CDRStylesCollector.cpp:200
libcdr::CDRStylesCollector::m_ps
CDRParserState & m_ps
Definition: CDRStylesCollector.h:76
libcdr::CDRLineStyle
Definition: CDRTypes.h:113
libcdr::CDRStylesCollector::collectLineStyleId
void collectLineStyleId(unsigned) override
Definition: CDRStylesCollector.h:46
libcdr::CDRStylesCollector::collectPolygon
void collectPolygon() override
Definition: CDRStylesCollector.h:58
libcdr::CDRStylesCollector::collectBBox
void collectBBox(double, double, double, double) override
Definition: CDRStylesCollector.h:61
libcdr::CDRStylesCollector::collectBmpf
void collectBmpf(unsigned patternId, unsigned width, unsigned height, const std::vector< unsigned char > &pattern) override
Definition: CDRStylesCollector.cpp:195
libcdr::writeU32
void writeU32(librevenge::RVNGBinaryData &buffer, const int value)
Definition: libcdr_utils.cpp:317
libcdr::appendCharacters
void appendCharacters(librevenge::RVNGString &text, std::vector< unsigned char > characters, unsigned short charset)
Definition: libcdr_utils.cpp:325
libcdr::CDRStylesCollector::operator=
CDRStylesCollector & operator=(const CDRStylesCollector &)
libcdr::CDRParserState
Definition: CDRCollector.h:30
libcdr::CDRStylesCollector::collectSpline
void collectSpline() override
Definition: CDRStylesCollector.h:59
libcdr::CDRStylesCollector::collectPpdt
void collectPpdt(const std::vector< std::pair< double, double > > &, const std::vector< unsigned > &) override
Definition: CDRStylesCollector.h:55
libcdr::CDRStyle::overrideStyle
void overrideStyle(const CDRStyle &override)
Definition: CDRTypes.h:154
libcdr::CDRStylesCollector::CDRStylesCollector
CDRStylesCollector(CDRParserState &ps)
Definition: CDRStylesCollector.cpp:20
libcdr::CDRStyle
Definition: CDRTypes.h:137
libcdr::CDRStylesCollector::collectPageSize
void collectPageSize(double width, double height, double offsetX, double offsetY) override
Definition: CDRStylesCollector.cpp:182
CDRCollector.h
libcdr
Definition: CDRCollector.h:24
libcdr::CDRTextLine
Definition: CDRTypes.h:352
libcdr::CDRStylesCollector::collectPath
void collectPath(const CDRPath &) override
Definition: CDRStylesCollector.h:40
libcdr::CDRStylesCollector::collectStld
void collectStld(unsigned id, const CDRStyle &style) override
Definition: CDRStylesCollector.cpp:265
libcdr::CDRStylesCollector::collectOtherList
void collectOtherList() override
Definition: CDRStylesCollector.h:39
libcdr::CDRStylesCollector::collectFillTransform
void collectFillTransform(const CDRTransforms &) override
Definition: CDRStylesCollector.h:56
libcdr::CDRStylesCollector
Definition: CDRStylesCollector.h:28
libcdr::CDRStylesCollector::collectLevel
void collectLevel(unsigned) override
Definition: CDRStylesCollector.h:41
libcdr::CDRStylesCollector::collectBitmap
void collectBitmap(unsigned, double, double, double, double) override
Definition: CDRStylesCollector.h:51
libcdr::CDRColor
Definition: CDRTypes.h:53
libcdr::CDRFillStyle
Definition: CDRTypes.h:101
libcdr::CDRStylesCollector::collectRotate
void collectRotate(double, double, double) override
Definition: CDRStylesCollector.h:47
CDRTypes.h
libcdr::CDRTransforms
Definition: CDRTransforms.h:48
libcdr::CDRStylesCollector::collectFillOpacity
void collectFillOpacity(double) override
Definition: CDRStylesCollector.h:57
libcdr::CDRPattern
Definition: CDRTypes.h:216
libcdr::CDRStylesCollector::collectFillStyleId
void collectFillStyleId(unsigned) override
Definition: CDRStylesCollector.h:44
libcdr::CDRStylesCollector::collectLineStyle
void collectLineStyle(unsigned id, const CDRLineStyle &lineStyle) override
Definition: CDRStylesCollector.cpp:275
libcdr::CDRStylesCollector::collectFlags
void collectFlags(unsigned, bool) override
Definition: CDRStylesCollector.h:48
libcdr::CDRStylesCollector::collectParagraphText
void collectParagraphText(double, double, double, double) override
Definition: CDRStylesCollector.h:68
libcdr::CDRStylesCollector::collectGroup
void collectGroup(unsigned) override
Definition: CDRStylesCollector.h:37
libcdr::CDRPath
Definition: CDRPath.h:36
libcdr_utils.h
CDRStylesCollector.h
CDRInternalStream.h
libcdr::CDRStyle::m_charSet
unsigned short m_charSet
Definition: CDRTypes.h:139