Debian Codegraph @

src/lib/EPUBPagedGenerator.cpp

raw
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /*
3 * This file is part of the libepubgen 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 #include "EPUBPagedGenerator.h"
11
12 #include <libepubgen/libepubgen-decls.h>
13
14 #include "EPUBGenerator.h"
15 #include "EPUBHTMLGenerator.h"
16 #include "EPUBSplitGuard.h"
17
18 namespace libepubgen
19 {
20
21 using librevenge::RVNGPropertyList;
22 using librevenge::RVNGString;
23
24 class EPUBPagedGenerator::Impl : public EPUBGenerator
25 {
26 // disable copying
27 Impl(const Impl &);
28 Impl &operator=(const Impl &);
29
30 public:
31 Impl(EPUBPackage *const package, int version);
32
33 private:
34 void startHtmlFile() override;
35 void endHtmlFile() override;
36
37 public:
38 bool m_firstPage;
39 };
40
41 EPUBPagedGenerator::Impl::Impl(EPUBPackage *const package, int version)
42 : EPUBGenerator(package, version)
43 , m_firstPage(true)
44 {
45 }
46
47 void EPUBPagedGenerator::setSplitMethod(EPUBSplitMethod split)
48 {
49 m_impl->setSplitMethod(split);
50 }
51
52 void EPUBPagedGenerator::setSplitHeadingLevel(const unsigned level)
53 {
54 m_impl->getSplitGuard().setSplitHeadingLevel(level);
55 }
56
57 void EPUBPagedGenerator::setSplitSize(const unsigned size)
58 {
59 m_impl->getSplitGuard().setSplitSize(size);
60 }
61
62 void EPUBPagedGenerator::Impl::startHtmlFile()
63 {
64 }
65
66 void EPUBPagedGenerator::Impl::endHtmlFile()
67 {
68 }
69
70 EPUBPagedGenerator::EPUBPagedGenerator(EPUBPackage *const package, int version)
71 : m_impl(new Impl(package, version))
72 {
73 }
74
75 void EPUBPagedGenerator::startDocument(const RVNGPropertyList &propList)
76 {
77 m_impl->startDocument(propList);
78 }
79
80 void EPUBPagedGenerator::endDocument()
81 {
82 m_impl->endDocument();
83 }
84
85 void EPUBPagedGenerator::setDocumentMetaData(const RVNGPropertyList &propList)
86 {
87 m_impl->setDocumentMetaData(propList);
88
89 m_impl->getHtml()->setDocumentMetaData(propList);
90 }
91
92 void EPUBPagedGenerator::defineEmbeddedFont(const RVNGPropertyList &propList)
93 {
94 (void) propList;
95 }
96
97 void EPUBPagedGenerator::startSlide(const RVNGPropertyList &/*propList*/)
98 {
99 if (!m_impl->m_firstPage)
100 m_impl->startNewHtmlFile();
101 m_impl->m_firstPage = false;
102 }
103
104 void EPUBPagedGenerator::endSlide()
105 {
106 }
107
108 void EPUBPagedGenerator::startMasterSlide(const RVNGPropertyList &propList)
109 {
110 (void) propList;
111 }
112
113 void EPUBPagedGenerator::endMasterSlide()
114 {
115 }
116
117 void EPUBPagedGenerator::setStyle(const RVNGPropertyList &propList)
118 {
119 (void) propList;
120 }
121
122 void EPUBPagedGenerator::setSlideTransition(const RVNGPropertyList &propList)
123 {
124 (void) propList;
125 }
126
127 void EPUBPagedGenerator::startLayer(const RVNGPropertyList &propList)
128 {
129 (void) propList;
130 }
131
132 void EPUBPagedGenerator::endLayer()
133 {
134 }
135
136 void EPUBPagedGenerator::startEmbeddedGraphics(const RVNGPropertyList &propList)
137 {
138 (void) propList;
139 }
140
141 void EPUBPagedGenerator::endEmbeddedGraphics()
142 {
143 }
144
145 void EPUBPagedGenerator::openGroup(const RVNGPropertyList &propList)
146 {
147 (void) propList;
148 }
149
150 void EPUBPagedGenerator::closeGroup()
151 {
152 }
153
154 void EPUBPagedGenerator::drawRectangle(const RVNGPropertyList &propList)
155 {
156 (void) propList;
157 }
158
159 void EPUBPagedGenerator::drawEllipse(const RVNGPropertyList &propList)
160 {
161 (void) propList;
162 }
163
164 void EPUBPagedGenerator::drawPolygon(const RVNGPropertyList &propList)
165 {
166 (void) propList;
167 }
168
169 void EPUBPagedGenerator::drawPolyline(const RVNGPropertyList &propList)
170 {
171 (void) propList;
172 }
173
174 void EPUBPagedGenerator::drawPath(const RVNGPropertyList &propList)
175 {
176 (void) propList;
177 }
178
179 void EPUBPagedGenerator::drawGraphicObject(const RVNGPropertyList &propList)
180 {
181 (void) propList;
182 }
183
184 void EPUBPagedGenerator::drawConnector(const RVNGPropertyList &propList)
185 {
186 (void) propList;
187 }
188
189 void EPUBPagedGenerator::startTextObject(const RVNGPropertyList &/*propList*/)
190 {
191 m_impl->getSplitGuard().openLevel();
192 }
193
194 void EPUBPagedGenerator::endTextObject()
195 {
196 m_impl->getSplitGuard().closeLevel();
197 }
198
199 void EPUBPagedGenerator::insertTab()
200 {
201 m_impl->getHtml()->insertTab();
202 }
203
204 void EPUBPagedGenerator::insertSpace()
205 {
206 m_impl->getHtml()->insertSpace();
207 }
208
209 void EPUBPagedGenerator::insertText(const RVNGString &text)
210 {
211 m_impl->getHtml()->insertText(text);
212 }
213
214 void EPUBPagedGenerator::insertLineBreak()
215 {
216 m_impl->getHtml()->insertLineBreak();
217 }
218
219 void EPUBPagedGenerator::insertField(const RVNGPropertyList &propList)
220 {
221 m_impl->getHtml()->insertField(propList);
222 }
223
224 void EPUBPagedGenerator::openOrderedListLevel(const RVNGPropertyList &propList)
225 {
226 m_impl->getSplitGuard().openLevel();
227
228 m_impl->getHtml()->openOrderedListLevel(propList);
229 }
230
231 void EPUBPagedGenerator::openUnorderedListLevel(const RVNGPropertyList &propList)
232 {
233 m_impl->getSplitGuard().openLevel();
234
235 m_impl->getHtml()->openUnorderedListLevel(propList);
236 }
237
238 void EPUBPagedGenerator::closeOrderedListLevel()
239 {
240 m_impl->getSplitGuard().closeLevel();
241
242 m_impl->getHtml()->closeOrderedListLevel();
243 }
244
245 void EPUBPagedGenerator::closeUnorderedListLevel()
246 {
247 m_impl->getSplitGuard().closeLevel();
248
249 m_impl->getHtml()->closeUnorderedListLevel();
250 }
251
252 void EPUBPagedGenerator::openListElement(const RVNGPropertyList &propList)
253 {
254 m_impl->getSplitGuard().openLevel();
255
256 m_impl->getHtml()->openListElement(propList);
257 }
258
259 void EPUBPagedGenerator::closeListElement()
260 {
261 m_impl->getSplitGuard().closeLevel();
262
263 m_impl->getHtml()->closeListElement();
264 }
265
266 void EPUBPagedGenerator::defineParagraphStyle(const RVNGPropertyList &propList)
267 {
268 m_impl->getHtml()->defineParagraphStyle(propList);
269 }
270
271 void EPUBPagedGenerator::openParagraph(const RVNGPropertyList &propList)
272 {
273 m_impl->getSplitGuard().openLevel();
274
275 m_impl->getHtml()->openParagraph(propList);
276 }
277
278 void EPUBPagedGenerator::closeParagraph()
279 {
280 m_impl->getSplitGuard().closeLevel();
281
282 m_impl->getHtml()->closeParagraph();
283 }
284
285 void EPUBPagedGenerator::defineCharacterStyle(const RVNGPropertyList &propList)
286 {
287 m_impl->getHtml()->defineCharacterStyle(propList);
288 }
289
290 void EPUBPagedGenerator::openSpan(const RVNGPropertyList &propList)
291 {
292 m_impl->getHtml()->openSpan(propList);
293 }
294
295 void EPUBPagedGenerator::closeSpan()
296 {
297 m_impl->getHtml()->closeSpan();
298 }
299
300 void EPUBPagedGenerator::openLink(const RVNGPropertyList &propList)
301 {
302 m_impl->getHtml()->openLink(propList);
303 }
304
305 void EPUBPagedGenerator::closeLink()
306 {
307 m_impl->getHtml()->closeSpan();
308 }
309
310 void EPUBPagedGenerator::startTableObject(const RVNGPropertyList &propList)
311 {
312 m_impl->getSplitGuard().openLevel();
313
314 m_impl->getHtml()->openTable(propList);
315 }
316
317 void EPUBPagedGenerator::openTableRow(const RVNGPropertyList &propList)
318 {
319 m_impl->getHtml()->openTableRow(propList);
320 }
321
322 void EPUBPagedGenerator::closeTableRow()
323 {
324 m_impl->getHtml()->closeTableRow();
325 }
326
327 void EPUBPagedGenerator::openTableCell(const RVNGPropertyList &propList)
328 {
329 m_impl->getHtml()->openTableCell(propList);
330 }
331
332 void EPUBPagedGenerator::closeTableCell()
333 {
334 m_impl->getHtml()->closeTableCell();
335 }
336
337 void EPUBPagedGenerator::insertCoveredTableCell(const RVNGPropertyList &propList)
338 {
339 m_impl->getHtml()->insertCoveredTableCell(propList);
340 }
341
342 void EPUBPagedGenerator::endTableObject()
343 {
344 m_impl->getHtml()->closeTable();
345 }
346
347 void EPUBPagedGenerator::startComment(const RVNGPropertyList &propList)
348 {
349 (void) propList;
350 }
351
352 void EPUBPagedGenerator::endComment()
353 {
354 }
355
356 void EPUBPagedGenerator::startNotes(const RVNGPropertyList &propList)
357 {
358 (void) propList;
359 }
360
361 void EPUBPagedGenerator::endNotes()
362 {
363 }
364
365 void EPUBPagedGenerator::defineChartStyle(const RVNGPropertyList &propList)
366 {
367 (void) propList;
368 }
369
370 void EPUBPagedGenerator::openChart(const RVNGPropertyList &propList)
371 {
372 (void) propList;
373 }
374
375 void EPUBPagedGenerator::closeChart()
376 {
377 }
378
379 void EPUBPagedGenerator::openChartTextObject(const RVNGPropertyList &propList)
380 {
381 (void) propList;
382 }
383
384 void EPUBPagedGenerator::closeChartTextObject()
385 {
386 }
387
388 void EPUBPagedGenerator::openChartPlotArea(const RVNGPropertyList &propList)
389 {
390 (void) propList;
391 }
392
393 void EPUBPagedGenerator::closeChartPlotArea()
394 {
395 }
396
397 void EPUBPagedGenerator::insertChartAxis(const RVNGPropertyList &propList)
398 {
399 (void) propList;
400 }
401
402 void EPUBPagedGenerator::openChartSeries(const librevenge::RVNGPropertyList &propList)
403 {
404 (void) propList;
405 }
406
407 void EPUBPagedGenerator::closeChartSeries()
408 {
409 }
410
411 void EPUBPagedGenerator::openAnimationSequence(const RVNGPropertyList &propList)
412 {
413 (void) propList;
414 }
415
416 void EPUBPagedGenerator::closeAnimationSequence()
417 {
418 }
419
420 void EPUBPagedGenerator::openAnimationGroup(const RVNGPropertyList &propList)
421 {
422 (void) propList;
423 }
424
425 void EPUBPagedGenerator::closeAnimationGroup()
426 {
427 }
428
429 void EPUBPagedGenerator::openAnimationIteration(const RVNGPropertyList &propList)
430 {
431 (void) propList;
432 }
433
434 void EPUBPagedGenerator::closeAnimationIteration()
435 {
436 }
437
438 void EPUBPagedGenerator::insertMotionAnimation(const RVNGPropertyList &propList)
439 {
440 (void) propList;
441 }
442
443 void EPUBPagedGenerator::insertColorAnimation(const RVNGPropertyList &propList)
444 {
445 (void) propList;
446 }
447
448 void EPUBPagedGenerator::insertAnimation(const RVNGPropertyList &propList)
449 {
450 (void) propList;
451 }
452
453 void EPUBPagedGenerator::insertEffect(const RVNGPropertyList &propList)
454 {
455 (void) propList;
456 }
457
458 }
459
460 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */