13 #include "pluginapi.h"
16 #include "fpointarray.h"
17 #include "vgradient.h"
27 #include <librevenge/librevenge.h>
28 #include <librevenge-stream/librevenge-stream.h>
29 #include <librevenge-generators/librevenge-generators.h>
31 struct RawPainterPrivate;
33 class RawPainter :
public librevenge::RVNGDrawingInterface
36 RawPainter(
ScribusDoc* Doc,
double x,
double y,
double w,
double h,
int iflags, QList<PageItem*> *Elem, QStringList *iColors, QStringList *iPatterns,
Selection* tSel, QString fTyp);
39 void startDocument(
const librevenge::RVNGPropertyList &propList);
41 void setDocumentMetaData(
const librevenge::RVNGPropertyList &propList);
42 void defineEmbeddedFont(
const librevenge::RVNGPropertyList &propList);
43 void startPage(
const librevenge::RVNGPropertyList &propList);
45 void startMasterPage(
const librevenge::RVNGPropertyList &propList);
47 void startLayer(
const librevenge::RVNGPropertyList &propList);
49 void startEmbeddedGraphics(
const librevenge::RVNGPropertyList &propList);
50 void endEmbeddedGraphics();
52 void openGroup(
const librevenge::RVNGPropertyList &propList);
55 void setStyle(
const librevenge::RVNGPropertyList &propList);
57 void drawRectangle(
const librevenge::RVNGPropertyList &propList);
58 void drawEllipse(
const librevenge::RVNGPropertyList &propList);
59 void drawPolyline(
const librevenge::RVNGPropertyList &propList);
60 void drawPolygon(
const librevenge::RVNGPropertyList &propList);
61 void drawPath(
const librevenge::RVNGPropertyList &propList);
62 void drawGraphicObject(
const librevenge::RVNGPropertyList &propList);
63 void drawConnector(
const librevenge::RVNGPropertyList &propList);
64 void startTextObject(
const librevenge::RVNGPropertyList &propList);
67 void startTableObject(
const librevenge::RVNGPropertyList &propList);
68 void openTableRow(
const librevenge::RVNGPropertyList &propList);
70 void openTableCell(
const librevenge::RVNGPropertyList &propList);
71 void closeTableCell();
72 void insertCoveredTableCell(
const librevenge::RVNGPropertyList &propList);
73 void endTableObject();
75 void openOrderedListLevel(
const librevenge::RVNGPropertyList &propList);
76 void closeOrderedListLevel();
78 void openUnorderedListLevel(
const librevenge::RVNGPropertyList &propList);
79 void closeUnorderedListLevel();
80 void openListElement(
const librevenge::RVNGPropertyList &propList);
81 void closeListElement();
83 void defineParagraphStyle(
const librevenge::RVNGPropertyList &propList);
84 void openParagraph(
const librevenge::RVNGPropertyList &propList);
85 void closeParagraph();
87 void defineCharacterStyle(
const librevenge::RVNGPropertyList &propList);
88 void openSpan(
const librevenge::RVNGPropertyList &propList);
91 void openLink(
const librevenge::RVNGPropertyList &propList);
96 void insertText(
const librevenge::RVNGString &text);
97 void insertLineBreak();
98 void insertField(
const librevenge::RVNGPropertyList &propList);
99 double valueAsPoint(
const librevenge::RVNGProperty *prop);
100 QString constructFontName(QString fontBaseName, QString fontStyle);
101 double fromPercentage(
const QString &s );
102 QColor parseColorN(
const QString &rgbColor );
103 QString parseColor(
const QString &s );
104 void insertImage(
PageItem* ite, QString imgExt, QByteArray &imageData);
108 void recolorItem(
PageItem* ite, QString efVal);
112 RawPainterPrivate *m_pImpl;
117 QList<PageItem*> *Elements;
118 QStringList *importedColors;
119 QStringList *importedPatterns;
123 QList<PageItem*> Items;
126 QStack<groupEntry> groupStack;
128 QString CurrColorFill;
129 QString CurrColorStroke;
130 double CurrStrokeShade;
131 double CurrFillShade;
132 double CurrStrokeTrans;
133 double CurrFillTrans;
136 double gradientAngle;
139 QString gradColor1Str;
141 double gradColor1Trans;
142 QString gradColor2Str;
144 double gradColor2Trans;
145 QVector<double> dashArray;
146 Qt::PenJoinStyle lineJoin;
147 Qt::PenCapStyle lineEnd;
151 librevenge::RVNGPropertyList m_style;
156 double m_maxFontSize;
164 class RawPainterPres :
public librevenge::RVNGRawTextGenerator
167 RawPainterPres(
ScribusDoc* Doc,
double x,
double y,
double w,
double h,
int iflags, QList<PageItem*> *Elem, QStringList *iColors, QStringList *iPatterns,
Selection* tSel, QString fTyp);
169 void startDocument(
const librevenge::RVNGPropertyList &propList);
171 void setDocumentMetaData(
const librevenge::RVNGPropertyList &propList);
172 void defineEmbeddedFont(
const librevenge::RVNGPropertyList &propList);
173 void definePageStyle(
const librevenge::RVNGPropertyList &propList);
174 void openPageSpan(
const librevenge::RVNGPropertyList &propList);
175 void closePageSpan();
176 void openHeader(
const librevenge::RVNGPropertyList &propList);
178 void openFooter(
const librevenge::RVNGPropertyList &propList);
180 void defineParagraphStyle(
const librevenge::RVNGPropertyList &propList);
181 void openParagraph(
const librevenge::RVNGPropertyList &propList);
182 void closeParagraph();
183 void defineCharacterStyle(
const librevenge::RVNGPropertyList &propList);
184 void openSpan(
const librevenge::RVNGPropertyList &propList);
186 void openLink(
const librevenge::RVNGPropertyList &propList);
188 void defineSectionStyle(
const librevenge::RVNGPropertyList &propList);
189 void openSection(
const librevenge::RVNGPropertyList &propList);
193 void insertText(
const librevenge::RVNGString &text);
194 void insertLineBreak();
195 void insertField(
const librevenge::RVNGPropertyList &propList);
196 void openOrderedListLevel(
const librevenge::RVNGPropertyList &propList);
197 void openUnorderedListLevel(
const librevenge::RVNGPropertyList &propList);
198 void closeOrderedListLevel();
199 void closeUnorderedListLevel();
200 void openListElement(
const librevenge::RVNGPropertyList &propList);
201 void closeListElement();
202 void openFootnote(
const librevenge::RVNGPropertyList &propList);
203 void closeFootnote();
204 void openEndnote(
const librevenge::RVNGPropertyList &propList);
206 void openComment(
const librevenge::RVNGPropertyList &propList);
208 void openTextBox(
const librevenge::RVNGPropertyList &propList);
210 void openTable(
const librevenge::RVNGPropertyList &propList);
211 void openTableRow(
const librevenge::RVNGPropertyList &propList);
212 void closeTableRow();
213 void openTableCell(
const librevenge::RVNGPropertyList &propList);
214 void closeTableCell();
215 void insertCoveredTableCell(
const librevenge::RVNGPropertyList &propList);
217 void openFrame(
const librevenge::RVNGPropertyList &propList);
219 void openGroup(
const librevenge::RVNGPropertyList &propList);
221 void defineGraphicStyle(
const librevenge::RVNGPropertyList &propList);
222 void drawRectangle(
const librevenge::RVNGPropertyList &propList);
223 void drawEllipse(
const librevenge::RVNGPropertyList &propList);
224 void drawPolygon(
const librevenge::RVNGPropertyList &propList);
225 void drawPolyline(
const librevenge::RVNGPropertyList &propList);
226 void drawPath(
const librevenge::RVNGPropertyList &propList);
227 void drawConnector(
const librevenge::RVNGPropertyList &propList);
228 void insertBinaryObject(
const librevenge::RVNGPropertyList &propList);
229 void insertEquation(
const librevenge::RVNGPropertyList &propList);
231 QList<PageItem*> *mElements;
233 QList<QList<PageItem*> > pageElements;
238 #include <libwpd-stream/libwpd-stream.h>
239 #include <libwpd/libwpd.h>
240 #include <libwpg/libwpg.h>
246 RawPainter(
ScribusDoc* Doc,
double x,
double y,
double w,
double h,
int iflags, QList<PageItem*> *Elem, QStringList *iColors, QStringList *iPatterns,
Selection* tSel, QString fTyp);
247 void startGraphics(const ::WPXPropertyList &propList);
249 void startLayer(const ::WPXPropertyList &propList);
251 void startEmbeddedGraphics(const ::WPXPropertyList &propList);
252 void endEmbeddedGraphics();
253 void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient);
254 void drawRectangle(const ::WPXPropertyList &propList);
255 void drawEllipse(const ::WPXPropertyList &propList);
256 void drawPolyline(const ::WPXPropertyListVector &vertices);
257 void drawPolygon(const ::WPXPropertyListVector &vertices);
258 void drawPath(const ::WPXPropertyListVector &path);
259 void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData);
260 void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path);
261 void endTextObject();
262 void startTextLine(const ::WPXPropertyList &propList);
264 void startTextSpan(const ::WPXPropertyList &propList);
266 void insertText(const ::WPXString &str);
267 QString constructFontName(QString fontBaseName, QString fontStyle);
268 double valueAsPoint(
const WPXProperty *prop);
269 double fromPercentage(
const QString &s );
270 QColor parseColorN(
const QString &rgbColor );
271 QString parseColor(
const QString &s );
272 void insertImage(
PageItem* ite, QString imgExt, QByteArray &imageData);
276 void recolorItem(
PageItem* ite, QString efVal);
282 QList<PageItem*> *Elements;
285 QList<PageItem*> Items;
288 QStack<groupEntry> groupStack;
289 QStringList *importedColors;
290 QStringList *importedPatterns;
292 QString CurrColorFill;
293 QString CurrColorStroke;
294 double CurrStrokeShade;
295 double CurrFillShade;
296 double CurrStrokeTrans;
297 double CurrFillTrans;
300 double gradientAngle;
303 QString gradColor1Str;
305 double gradColor1Trans;
306 QString gradColor2Str;
308 double gradColor2Trans;
309 QVector<double> dashArray;
310 Qt::PenJoinStyle lineJoin;
311 Qt::PenCapStyle lineEnd;
319 WPXPropertyList m_style;
324 double m_maxFontSize;
Definition: charstyle.h:78
Definition: rawpainter.h:283
Definition: WPGPaintInterface.h:41
Definition: vgradient.h:78
Definition: paragraphstyle.h:27
the Document Class
Definition: scribusdoc.h:90
Definition: rawpainter.h:243
Definition: pageitem.h:92
Definition: fpointarray.h:42
Definition: selection.h:34